var nn = (document.layers) ? 1:0
var ie = (document.all) ? 1:0


function ExplorerFix() 
	{ 
	for (a in document.links) document.links[a].onfocus = document.links[a].blur; 
	}


if(ie) document.onmousedown = ExplorerFix;

function mouseOver(id, filename)
	{
	img = eval('document.'+id);
	if (img)
		{
		if (filename != '')
		id = filename;
		img.src = 'img/'+id+'.gif';
		}
	
	}

function mouseOut(id, filename)
	{
	img = eval('document.'+id);
	if (img)
		{
		if (filename != '')
			id = filename;
		img.src = 'img/'+id+'.gif';
		}
	}

function go(url)
	{
	document.location = url;
	}

function navOver(id, color)
	{
	mouseOver('pijl'+id, 'pijltje_rechts_'+color);
	d = eval('document.all.nav'+id);
	d.style.color='#'+color;
	}

function navOut(id,color)
	{
	mouseOut('pijl'+id, 'pijltje_rechts_'+color);
	d = eval('document.all.nav'+id);
	d.style.color='';
	}

function navOverPlezant(id, color)
	{
	mouseOver('pijl'+id, 'plezant/pijl_rechts_'+color);
	d = eval('document.all.nav'+id);
	d.style.color='#'+color;
	}

function navOutPlezant(id,color)
	{
	mouseOut('pijl'+id, 'plezant/pijl_rechts_'+color);
	d = eval('document.all.nav'+id);
	d.style.color='';
	}

function pgOver(id, color)
	{
	d = eval('document.all.pg'+id);
	d.style.color='#'+color;
	}

function pgOut(id)
	{
	d = eval('document.all.pg'+id);
	d.style.color='';
	}

function dagOver(id, color)
	{
	d = eval('document.all.dag'+id);
	d.style.color='#'+color;
	}

function dagOut(id)
	{
	d = eval('document.all.dag'+id);
	d.style.color='';
	}

function checkMailOld(adres)
	{
	var filter=/^(\w+(?:\.\-\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	if (filter.test(adres))
		return true;
	else
		return false;
	}

function popUp(url,width,height,name) 
{
OpenWin=window.open(url, name, "width="+width+",height="+height+",toolbar=no,focus=yes,menubar=no,location=no,scrollbars=yes,resizable=no,status");
OpenWin.focus();
}



var d = document.invulform;



/**
 * DHTML email validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */

function checkMail(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		  // alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		  // alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		   // alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		   // alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		   // alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    //alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    //alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}


