/*******************************************************************************************
 * Controle van het contact-formulier van www.viandog.nl. Bij niet ingevulde verplichte    *
 * velden wordt het veld rood gemaakt, en wordt er een foutmelding getoond.                *
 *******************************************************************************************/

function swapland() {
	if (document.buitenland.pag.selectedIndex == 1)
		location = 'b.php?cat=za';
	else if (document.buitenland.pag.selectedIndex == 2)
		location = 'b.php?cat=zb';
	else if (document.buitenland.pag.selectedIndex == 3)
		location = 'b.php?cat=zc';
	else if (document.buitenland.pag.selectedIndex == 4)
		location = 'b.php?cat=zd';
	else if (document.buitenland.pag.selectedIndex == 5)
		location = 'b.php?cat=ze';
	else if (document.buitenland.pag.selectedIndex == 6)
		location = 'b.php?cat=zf';
	else if (document.buitenland.pag.selectedIndex == 7)
		location = 'b.php?cat=zg';
	else if (document.buitenland.pag.selectedIndex == 8)
		location = 'b.php?cat=zh';
	else if (document.buitenland.pag.selectedIndex == 9)
		location = 'b.php?cat=zi';
	else if (document.buitenland.pag.selectedIndex == 10)
		location = 'b.php?cat=zj';
}

function swapkalender() {
	if (document.kalender.pag.selectedIndex == 1)
		location = 'b.php?cat=ya';
	else if (document.kalender.pag.selectedIndex == 2)
		location = 'b.php?cat=pcb';
	else if (document.kalender.pag.selectedIndex == 3)
		location = 'b.php?cat=gdaa';
	else if (document.kalender.pag.selectedIndex == 4)
		location = 'b.php?cat=pcc';
	else if (document.kalender.pag.selectedIndex == 5)
		location = 'b.php?cat=pca';
	else if (document.kalender.pag.selectedIndex == 6)
		location = 'b.php?cat=pcd';
}

function mailafriend() {
	nieuwvenster = window.open ("mailafriend.asp", "mailafriend", "scrollbars=no,resizable=no,toolbar=no,directories=no,status=no,menubar=no,width=400,height=200")
}

function controleer() {
	var adres;
	adres=document.getElementById("email").value;
	if ( adres ==""  || adres.indexOf("@") == -1 || adres.indexOf(".")== -1)
	{
		alert("Vul eerst een geldig e-mail adres in.");
		return false;
	}
} 
