function toUrl(url){
document.location= url;
}  

//menu change class   
   function ChangeClass(menu, newClass) { 
	 if (document.getElementById) { 
	 	document.getElementById(menu).className = newClass;
	 } 
} 

//menu change sub class  
   function ChangeSubClass(menu, newClass) { 
	 if (document.getElementById) { 
	 	document.getElementById(menu).className = newClass;
	 } 
} 

//document.onselectstart = new Function("return false");





function goToURL(form)
  {
    var myindex=form.dropdownmenu.selectedIndex
    if(!myindex=="")
      {
        window.location.href=form.dropdownmenu.options[myindex].value;
      }
}


function ShowDetails(id,maxID)
{
        var i=1;
	for (i=1; i <= maxID; i++) 
	{
	document.getElementById(i).style.display = "none";	
	}
	document.getElementById(id).style.display = "block";
}

function HideDetails(maxID)
{
 var i=1;
	for (i=1; i <= maxID; i++) 
	{
	document.getElementById(i).style.display = "none";
}
}

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/3 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}

function popUp(URL){day=new Date();id=day.getTime();eval("page"+id+" = window.open(URL, '"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=740,height=400');");}

function check_contactform()
{
	if(document.editForm.elements['onderwerp'].value=='')
	{
		document.editForm.elements['onderwerp'].style.backgroundColor='#DCA3B4';
		document.editForm.elements['onderwerp'].focus();
		return false;
	}
	else if(document.editForm.elements['email'].value=='')
	{
		document.editForm.elements['email'].style.backgroundColor='#DCA3B4';
		document.editForm.elements['email'].focus();
		return false;
	}
	else if(document.editForm.elements['bericht'].value=='')
	{
		document.editForm.elements['bericht'].style.backgroundColor='#DCA3B4';
		document.editForm.elements['bericht'].focus();
		return false;
	}
	else if(document.editForm.elements['code'].value=='')
	{
		document.editForm.elements['code'].style.backgroundColor='#DCA3B4';
		document.editForm.elements['code'].focus();
		return false;
	}
}
function check_aanmeldform()
{
	if(document.editForm.elements['naam'].value=='')
	{
		document.editForm.elements['naam'].style.backgroundColor='#DCA3B4';
		document.editForm.elements['naam'].focus();
		return false;
	}
	else if(document.editForm.elements['email'].value=='')
	{
		document.editForm.elements['email'].style.backgroundColor='#DCA3B4';
		document.editForm.elements['email'].focus();
		return false;
	}
	else if(document.editForm.elements['code'].value=='')
	{
		document.editForm.elements['code'].style.backgroundColor='#DCA3B4';
		document.editForm.elements['code'].focus();
		return false;
	}
}

function check_boekingform()
{
	if(document.editForm.elements['naam'].value=='')
	{
		document.editForm.elements['naam'].style.backgroundColor='#DCA3B4';
		document.editForm.elements['naam'].focus();
		return false;
	}
	else if(document.editForm.elements['email'].value=='')
	{
		document.editForm.elements['email'].style.backgroundColor='#DCA3B4';
		document.editForm.elements['email'].focus();
		return false;
	}
	else if(document.editForm.elements['straat'].value=='')
	{
		document.editForm.elements['straat'].style.backgroundColor='#DCA3B4';
		document.editForm.elements['straat'].focus();
		return false;
	}
	else if(document.editForm.elements['plaats'].value=='')
	{
		document.editForm.elements['plaats'].style.backgroundColor='#DCA3B4';
		document.editForm.elements['plaats'].focus();
		return false;
	}
}


function forgotpassword(e)
{
	var IE = document.all?true:false;
	var tempX = 0;
	var tempY = 0;
	if (IE)
	{
	    tempX = event.clientX + document.body.scrollLeft;
   		tempY = event.clientY + document.body.scrollTop;
	}
	else
	{
	    tempX = e.pageX
    	tempY = e.pageY
	}
	
	if(document.getElementById('backgrounddiv')) {
		document.getElementById('backgrounddiv').style.width = document.body.clientWidth + 'px';
		document.getElementById('backgrounddiv').style.height = document.body.clientHeight + 'px';
		document.getElementById('backgrounddiv').style.filter = 'alpha(opacity=0)';
		document.getElementById('backgrounddiv').style.opacity = '0';
		document.getElementById('backgrounddiv').style.visibility = 'visible';
	}

	if(document.getElementById('forgotpassword')) {
		document.getElementById('forgotpassword').style.filter = 'alpha(opacity=80)';
		document.getElementById('forgotpassword').style.opacity = '.80';
		document.getElementById('forgotpassword').style.left = (tempX-230);
		document.getElementById('forgotpassword').style.top = tempY + 'px';
		document.getElementById('forgotpassword').style.height = '130';
		document.getElementById('forgotpassword').style.visibility = 'visible';
		document.forgotpasswordform.email.focus();
	}
}

