function photoShow(location,width,height){
	window.open(location,'','width='+width+',height='+height+',location=no,menubar=no,toolbar=no,status=no');
}
function registernewsletter(registererror){
	var checkEmail = document.frmregistreer.txtemail.value
	if( checkEmail == "" || 
	   	checkEmail.indexOf('@') == -1 ||
		checkEmail.indexOf("<script") != -1 ||
		( checkEmail.charAt(checkEmail.length-4) != '.' && checkEmail.charAt(checkEmail.length-3) != '.')
	){
		window.alert("" + registererror);
		return false;
	} else {
		document.frmregistreer.submit();
	}
}
function registernewsletter2(registererror){
	registernewsletter(registererror);
}
function ValidateReactie(errormessage){
	var naam = document.frmreactie.txtnaam.value;
	var titel = document.frmreactie.txttitel.value;
	var tekst = document.frmreactie.txttekst.value;		
	
	if(naam == "" || titel == "" || tekst == "")
	window.alert("" + errormessage);
	else
	{
		document.frmreactie.txtsubmit.value = "submit";
		document.frmreactie.submit();
	}

}
function ValidateOnderwerp(error){
	var onderwerp = document.frmthread.txtonderwerp.value;
	
	if(onderwerp == "")
	window.alert("" + error);
	else
	document.frmthread.submit();

}
function OpenProductFotos(id){
	window.open('productfotos.php?id=' + id,'','width=670,height=500,location=no,menubar=no,toolbar=no,status=no,scrollbars=yes');
}
sfHover = function() {
	try {
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");	
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	} catch (error) {}
	try {		
		var sfEls = document.getElementById("nav2").getElementsByTagName("LI");	
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	} catch (error) {}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
