function modalWin(x) {
	if (window.showModalDialog) {
		showModalDialog(x,window,"resizable:no;help:no;status:no;scroll:no;");
	} else {
		leftPos = 0
		topPos = 0
		if (screen) {
			leftPos = (screen.width / 2) - 251
			topPos = (screen.height / 2) - 162
	eval("window.open(x,window,'height=350,width=350,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes,left="+leftPos+",top="+topPos+"')");
		}else{
	window.open(x,window,'height=350,width=350,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes');
		}
	}
}

function stopRKey(evt) {
	var evt  = (evt) ? evt : ((event) ? event : null);
	var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
	if ((evt.keyCode == 13) && (node.type=="text")) { return false; }
}


function launchwin(winurl,winname,winfeatures){
	newwin = window.open(winurl,winname,winfeatures);
}
function showmenu(elmnt) { 
	document.all(elmnt).style.visibility="visible" 
	} 
function hidemenu(elmnt) { 
	document.all(elmnt).style.visibility="hidden" 
	}
function showMenuDesc(x){
	window.status = x
	return true
}
function wipeMenuDesc(){
	window.status = ""
	return true
}
function checkDelProduct(){
	if (confirm("Wilt u deze produkt informatie definitief verwijderen?")){
		document.productInfo.submit()
	}
}
function checkEmail(){
	if(IsEmail(document.emailadres.email.value)){
		document.emailadres.submit()
	}else{
		alert("U heeft geen geldig e-mail adres ingevoerd.")
		document.emailadres.email.focus()
	}

}

function IsEmail(email) {
	var tmp = "" + email + "", s = tmp.replace(/^\s*|\s*$/g, "");
	var re = /^(\w|[^_]\.|[\-])+((\@){1}([^_]))(([a-z]|[\d]|[\-]|\.)+|([^_]\.[^_])*)+\.[a-z]{2,3}$/i
	if (!re.test(s)) {return false;}
	re = /\.(a[c-gil-oq-uwz]|b[a-bd-jm-or-tvwyz]|c[acdf-ik-orsuvx-z]|d[ejkmoz]|e[ceghr-u]|f[i-kmorx]|g[abd-ilmnp-uwy]|h[kmnrtu]|i[delm-oq-t]|j[emop]|k[eg-imnprwyz]|l[a-cikr-vy]|m[acdghk-z]|n[ace-giloprtuz]|om|p[ae-hk-nrtwy]|qa|r[eouw]|s[a-eg-ort-vyz]|t[cdf-hjkm-prtvwz]|u[agkmsyz]|v[aceginu]|w[fs]|y[etu]|z[admrw]|com|edu|net|org|mil|gov)$/i
	if (!re.test(s)) {return false;}
	re = /\@\@/
	return(!re.test(s));
}

function showPage(){
	nw=window.open(document.navMenu.subs.options[document.navMenu.subs.options.selectedIndex].value,"_parent")
}
