// JavaScript Document
// voor menu

sfHover = function() {
	var sfEls = document.getElementById("menu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
// start het afspelen
function start_film(film,breedte,hoogte) {
	var tmp = null;
	if (AC_FL_RunContent == 0) {
		tmp = "This page requires AC_RunActiveContent.js.";
	} else {
		tmp = AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', breedte,
			'height', hoogte + 25,
			'src', 'video/jcplayer',
			'quality', 'high',
			'pluginspage', '',
			'align', 'middle',
			'play', 'true',
			'loop', 'false',
			'scale', 'noScale',
			'wmode', 'transparent',
			'devicefont', 'false',
			'id', 'jcplayer',
			'bgcolor', '#000000',
			'name', 'jcplayer',
			'menu', 'true',
			'allowFullScreen', 'false',
			'allowScriptAccess','sameDomain',
			'FlashVars','videoURL=' + film + '&fullScreenButton=false&autoHide=true&autoPlay=true&inkColor=0xffffff&highlightColor=0x999999&backgroundColor1=#000000&backgroundColor2=#000000&&bufferTime=10',
			'movie', 'video/jcplayer',
			'salign','TL'
			); //end AC code	
	}
	document.getElementById('filmzone').innerHTML = tmp;
}
//voor menu: dummy link//
function nolink () {
	return;
}
/*homepage*/
function lees_meer() {
	document.getElementById('lees').style.display = "none";
	document.getElementById('meer').style.display = "inline";
}
function lees_meer_alt() {
	document.getElementById('lees').style.display = "none";
	document.getElementById('meer').style.display = "inline";
	thuis.infLoopStop = true;
	thuis.foto.style.display = "none";
}
/*homepage albeeldingen*/
var thuis = new Array();
function slides(pagina,aantal) {
  	thuis["infLoopStop"] = false;
	thuis["infLoop"] = null;
	thuis["nummer"] = Math.floor(Math.random()*aantal); -1;
	thuis["maxi"] = aantal - 1;
	thuis["pagina"] = pagina;
	thuis["foto"] = document.getElementById("slides");
	infLoop();
 }

infLoop=function(){
	thuis.nummer += 1;
	if (thuis.nummer > thuis.maxi) {thuis.nummer = 0;}
	thuis.foto.src ="images/slides/" + thuis.pagina + "_" + thuis.nummer + ".jpg";
	if(!thuis.infLoopStop) window.setTimeout(infLoop,4000); /*4000 = aantal ms interval*/
};