
/*IN- EN UITKLAPPEN VAN LAYERS*/
function expand(element)														{ 
if (element.style.display == 'none')											{
element.style.display = '';														}
else																			{
element.style.display = 'none';													}
																				}



/*AANMAKEN VAN EEN COOKIE*/
function SetCookie(cookieName,cookieValue,nDays)								{
var today = new Date();
var expire = new Date();
if (nDays==null || nDays==0) nDays=1;
expire.setTime(today.getTime() + 3600000*24*nDays);
document.cookie = cookieName+"="+escape(cookieValue)
+ ";expires="+expire.toGMTString();
																				}



/*ALLE CHECKBOXES TEGELIJK AAN- OF UITZETTEN*/
function checkEmAll(checkbox)													{
var el = checkbox.form.elements;
var i = el.length;
while (i--)																		{
if (el[i].type == 'checkbox' && el[i].name == 'delete[]')
el[i].checked = checkbox.checked;												}
																				}



/*CONTROLEREN OF FORMULIERVELD WEL IS INGEVULD*/
function inputIsOk(frm, veldlijst, labellijst)									{
var velden = veldlijst.split(',');
var labels = labellijst.split(',');
for (var x=0; x < velden.length; x++)											{
if (frm.elements[velden[x]].value.length == 0)									{
alert('Het veld "' + labels[x] + '" is niet ingevuld.\n');
frm.elements[velden[x]].focus();
return false;
																				}
																				}
return true;
																				}



/*CONTROLEREN OF FORMULIERVELD EEN NUMERIEKE WAARDE BETREFT*/
function isnummer(oInput)														{
var sVal = oInput.value;
if (isNaN(sVal))																{
alert(sVal + " is geen geldige waarde");
oInput.value = "";
																				}
																				}


/*CONTROLEREN OF FORMULIERVELD GÉÉN NUMERIEKE WAARDE BETREFT*/
function isnonummer(oInput)														{
var sVal = oInput.value;
if (isNaN(sVal))																{
} else																			{
alert(sVal + " is geen geldige waarde");
oInput.value = "";
																				}
																				}


/*OPMAAK VERWIJDEREN OF TERUGZETTEN TOT DEFAULT*/
function clearDefaultandCSS(el)													{
if (el.defaultValue==el.value) el.value = ""
// If Dynamic Style is supported, clear the style
if (el.style) el.style.cssText = "color:#000000;"
																				}


//START CHANGE ONMOUSEOVER
function MM_swapImgRestore()													{
var i,x,a=document.MM_sr; 
for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
																				}

function MM_preloadImages()														{
var d=document; 
if(d.images)																	{ 
if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0)														{ 
d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];										}
																				}
																				}

function MM_findObj(n, d)														{
var p,i,x;  
if(!d) d=document; 
if((p=n.indexOf("?"))>0&&parent.frames.length)									{
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);				}
if(!(x=d[n])&&d.all) x=d.all[n]; 
for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
																				}

function MM_swapImage()															{
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; 
for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; 
if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];											}
																				}
//END CHANGE ONMOUSEOVER														

//START BLINKING TEXT
function doBlink()																{
  // Blink, Blink, Blink...
  var blink = document.all.tags("BLINK")
  for (var i=0; i < blink.length; i++)
    blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : "" 
																				}

function startBlink()															{
  // Make sure it is IE4
  if (document.all)
    setInterval("doBlink()",500)
																				}
window.onload = startBlink;
//END BLINKING TEXT

//START OF SUCKERFISH
startList = function()															{
if (document.all&&document.getElementById)										{
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++)										{
node = navRoot.childNodes[i];
if (node.nodeName=="LI")														{
node.onmouseover=function()														{
this.className+=" over";
																				}
  node.onmouseout=function()													{
  this.className=this.className.replace(" over", "");
																				}
																				}
																				}
																				}
																				}
window.onload=startList;
//END OF SUCKERFISH

//OPEN POPUP
function popUp(URL)																{
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, 'Popup', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=300,height=533,left=40,top=40');");
																				}

function MM_openBrWindow(theURL,winName,features)								{ 
window.open(theURL,winName,features);  
																				}

function noSpam(user,domain,extention)											{
locationstring = "mailto:" + user + "@" + domain + "." + extention;
window.location = locationstring;
																				}

//END POPUP

//START LAYER SCROLL
var np,objS,divToHidden,divToShow;
var speedSec = 25;												//set time interval between two function call
var _speedPix = speedPix = 25;									//set the number of pixels to decrease/increase div
//var decelEffect = 1.7;										//set for decelerate effect
//var halfPix = 0;
var stopClick = false;
var heightDiv = 300;												//480, 528, 540595
function ShowDivs(sId, arrId){
	if (stopClick) return;
	stopClick = true;
	divToShow = document.getElementById(sId);					//keep the div to make visible
	if (divToShow.style.visibility == 'visible'){
		stopClick = false;
		return;													// at least one tab must be visible always
	}
	if (arrId != ''){
		var myArr = arrId.split(',');
		var i = 0;
		while (i<myArr.length){
			divToHidden = document.getElementById(myArr[i]);	//keep the div to make hidden
			if (divToHidden.style.display == 'block'){
				i = myArr.length;
			}
			i++;
		}
		np = heightDiv - speedPix;
		// like Training Ground
		//objS = setInterval('decreaseHeight()',speedSec);	//call function at regular intervals
		
		// like Apple
		divToShow.style.height = '0px';
		divToShow.style.marginBottom = '0px';
		divToShow.style.display = 'block';
		divToShow.style.visibility = 'visible';
		objS = setInterval('changeHeight()',speedSec);	//call function at regular intervals
	}
}

function changeHeight(){
	if (np >= 0){
		/*
		// decelerate effect
		if (np <= (heightDiv/4) && np > (heightDiv/8) && halfPix == 0 ){
			speedPix = parseInt(speedPix/decelEffect);
			halfPix = 1;
		}
		if (np <= (heightDiv/8) && halfPix == 1){
			speedPix = parseInt(speedPix/decelEffect);
			halfPix = 2;
		}
		// end effect
		*/
		divToShow.style.height = (heightDiv - np - 0) + 'px';
		divToHidden.style.height = np + 'px';
		divToShow.style.marginBottom = '0px';
		np = np - speedPix;
	}
	else{
		clearInterval(objS);	//clear the handler to call this function
		divToHidden.style.display = 'none';
		divToHidden.style.visibility = 'hidden';
		divToShow.style.height = heightDiv + 'px';
		stopClick = false;
		// for decelerate effect
		//speedPix = _speedPix;
		//halfPix = 0;
		// end effect
	}
}

function decreaseHeight(){
	if (np > 0){
		divToHidden.style.height = np + 'px';
		np = np - speedPix;
	}
	else{
		clearInterval(objS);	//clear the handler to call this function
		divToHidden.style.display = 'none';
		divToHidden.style.visibility = 'hidden';
		np = speedPix;
		divToShow.style.height = '0px';
		divToShow.style.display = 'block';
		divToShow.style.visibility = 'visible';
		objS = setInterval('increaseHeight()',speedSec);	//call function at regular intervals
	}
}

function increaseHeight(){
	if (np < heightDiv){
		divToShow.style.height = np + 'px';
		np = np + speedPix;
	}
	else{
		clearInterval(objS);	//clear the handler to call this function
		divToShow.style.height = heightDiv + 'px';
	}
}

var tab = '5';
if (tab == 'r' || tab == 'R'){
	var num = Math.round(Math.random()*3) + 1;
	tab='i'+num;
}
else{
	tab='i'+tab;
}
//document.getElementById(tab).style.visibility = 'visible';
//document.getElementById(tab).style.display = 'block';
//END LAYER SCROLL

//START SET COOKIE
function SetCookie(cookieName,cookieValue,nDays)
{
	var today = new Date();
	var expire = new Date();
	if (nDays==null || nDays==0) nDays=1;
	expire.setTime(today.getTime() + 3600000*24*nDays);
	document.cookie = cookieName+"="+escape(cookieValue)
	+ ";expires="+expire.toGMTString();
}
//END SET COOKIE