//== NAVIGATIE ==\\

//navigatie_home
function overme(which) {
  document.getElementById(which).className='donker'
 }
 function outme(which) {
  document.getElementById(which).className='navigatie'
 }
function toggleSub(submenu) {
	//if (document.getElementById(submenu).style.display == 'none') {
	//	document.getElementById(submenu).style.display = 'block'
	//} else {
		document.getElementById(submenu).style.display = 'block'
	//}
}

function CloseSub(submenu) {
	document.getElementById(submenu).style.display = 'none'
}

//== CONTACT CHECK ==\\

function validate_form()
{
	var msg='';
	var streep ='_____________________________________________\n\n'
	var bericht='U heeft niet alle velden ingevuld en daarom kan het formulier niet verstuurd worden.\n\nHieronder staat een overzicht van de velden die u niet, of niet correct heeft ingevuld:\n' + streep;
	

	if(document.aanmelden.naam.value == "") {
		msg += 'Uw Naam \n';
	}
	if(document.aanmelden.telefoon.value == "") {
		msg += 'Telefoon nummer \n';
	}
	if(document.aanmelden.mailfrom.value == "") {
		msg += 'E-mail adres\n';
	} else {
		validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
		strmailfrom = document.aanmelden.mailfrom.value;
		if (strmailfrom.search(validRegExp) == -1)  {
			msg+= 'E-mailadres\n';
		}
	}
		
	if(!msg) {
		document.aanmelden.submit();
	} else {
		alert(bericht + msg + streep);
		return false;
	}
}

//== POPUP 800x900 ==\\
function Start(page)
{
OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=no,status=no,resize=no,width=800,height=900");
}
function pageOpen(page,width,height)
{
	OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=no,statusbar=no,resize=no,width=" + width + ",height=" + height + "");
}
function OpenPopup(theURL,PopupName,PopupWidth,PopupHeight,PopupFeatures)
{
var Xcoor;
var Ycoor;
var Popup;
var FeaturesTotal;
if (PopupHeight && PopupWidth)
	{
	if (window.screen.width > PopupWidth)
		Xcoor = (window.screen.width/2) - (PopupWidth/2);
	else
		Xcoor = 0;
	if (window.screen.height > PopupHeight)
		Ycoor = (window.screen.height/2) - (PopupHeight/2);
	else
		Ycoor = 0;
	if (PopupFeatures)
		FeaturesTotal = PopupFeatures + ",width=" + PopupWidth + ",height=" + PopupHeight + ",left=" + Xcoor + ",top=" + Ycoor + ",screenX=" + Xcoor + ",screenY=" + Ycoor;
	else
		FeaturesTotal = "width=" + PopupWidth + ",height=" + PopupHeight + ",left=" + Xcoor + ",top=" + Ycoor + ",screenX=" + Xcoor + ",screenY=" + Ycoor;
	Popup = window.open(theURL,PopupName,FeaturesTotal);
	Popup.focus;
	}
else
	{
	Popup = window.open(theURL,PopupName);
	Popup.focus;
	}
}
//== POPUP 400x358 ==\\

function Start(page)
{
OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=no,status=no,resize=no,width=400,height=358");
}
function pageOpen(page,width,height)
{
	OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,status=no,scrollbars=no,resize=no,width=" + width + ",height=" + height + "");
}
function OpenPopup(theURL,PopupName,PopupWidth,PopupHeight,PopupFeatures)
{
var Xcoor;
var Ycoor;
var Popup;
var FeaturesTotal;
if (PopupHeight && PopupWidth)
	{
	if (window.screen.width > PopupWidth)
		Xcoor = (window.screen.width/2) - (PopupWidth/2);
	else
		Xcoor = 0;
	if (window.screen.height > PopupHeight)
		Ycoor = (window.screen.height/2) - (PopupHeight/2);
	else
		Ycoor = 0;
	if (PopupFeatures)
		FeaturesTotal = PopupFeatures + ",width=" + PopupWidth + ",height=" + PopupHeight + ",left=" + Xcoor + ",top=" + Ycoor + ",screenX=" + Xcoor + ",screenY=" + Ycoor;
	else
		FeaturesTotal = "width=" + PopupWidth + ",height=" + PopupHeight + ",left=" + Xcoor + ",top=" + Ycoor + ",screenX=" + Xcoor + ",screenY=" + Ycoor;
	Popup = window.open(theURL,PopupName,FeaturesTotal);
	Popup.focus;
	}
else
	{
	Popup = window.open(theURL,PopupName);
	Popup.focus;
	}
}
//== POPUP 520x318 ==\\

function Open(page)
{
OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resize=no,width=520,height=318");
}
function pageOpen(page,width,height)
{
	OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=no,resize=no,width=" + width + ",height=" + height + "");
}
function OpenPopup(theURL,PopupName,PopupWidth,PopupHeight,PopupFeatures)
{
var Xcoor;
var Ycoor;
var Popup;
var FeaturesTotal;
if (PopupHeight && PopupWidth)
	{
	if (window.screen.width > PopupWidth)
		Xcoor = (window.screen.width/2) - (PopupWidth/2);
	else
		Xcoor = 0;
	if (window.screen.height > PopupHeight)
		Ycoor = (window.screen.height/2) - (PopupHeight/2);
	else
		Ycoor = 0;
	if (PopupFeatures)
		FeaturesTotal = PopupFeatures + ",width=" + PopupWidth + ",height=" + PopupHeight + ",left=" + Xcoor + ",top=" + Ycoor + ",screenX=" + Xcoor + ",screenY=" + Ycoor;
	else
		FeaturesTotal = "width=" + PopupWidth + ",height=" + PopupHeight + ",left=" + Xcoor + ",top=" + Ycoor + ",screenX=" + Xcoor + ",screenY=" + Ycoor;
	Popup = window.open(theURL,PopupName,FeaturesTotal);
	Popup.focus;
	}
else
	{
	Popup = window.open(theURL,PopupName);
	Popup.focus;
	}
}