//fnPopWindow('test.htm',320,240,'no','no','no','no','no','no','no','mod','naam');
function fnPopWindow(theUrl,width,height,scrollbars,resizable,menubar,toolbar,personalbar,locationbar,status,mod,naam)
{
	IE = ((document.all)&&(navigator.appVersion.indexOf("MSIE")!=-1)) ? true : false;

	if (IE && mod=='yes') {
	window.showModalDialog(theUrl,window,"dialogWidth: "+width+"px; dialogHeight: "+height+"px; edge: Raised; center: Yes; help: No; scroll: "+scrollbars+"; resizable: "+resizable+"; status: "+status+";");
	}
	
	else {
	var winleft = (screen.width - width) / 2;
	var winUp = (screen.height - height) / 2;
	winUp = winUp -40;
	var winProp = 'width='+width+',height='+height+',left='+winleft+',top='+winUp+',scrollbars='+scrollbars+',resizable='+resizable+',menubar='+menubar+',toolbar='+toolbar+',personalbar='+personalbar+',location='+locationbar+',status='+status+''
	if (naam=='') {
	naam= date.getSeconds ;
	}
	Win = window.open(theUrl, naam, winProp)
	}
}

//fnPopWindow('test.htm',320,240,'no','no','no','no','no','no','no','mod','naam');
function fnPopNuts(theUrl,width,height,scrollbars,resizable,menubar,toolbar,personalbar,locationbar,status,mod,naam)
{
	IE = ((document.all)&&(navigator.appVersion.indexOf("MSIE")!=-1)) ? true : false;
	
	//Get field with current codes
	var url_array = theUrl.split("=");
	var nutscodes = document.getElementById(url_array[1]);
	
	if (nutscodes)
	{
		theUrl += '&value='+ nutscodes.value;
	}
	
	if (IE && mod=='yes') {
	window.showModalDialog(theUrl,window,"dialogWidth: "+width+"px; dialogHeight: "+height+"px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; scroll: "+scrollbars+"; resizable: "+resizable+"; status: "+status+";");
	}
	
	else {
	var winleft = (screen.width - width) / 2;
	var winUp = (screen.height - height) / 2;
	winUp = winUp -40;
	var winProp = 'width='+width+',height='+height+',left='+winleft+',top='+winUp+',scrollbars='+scrollbars+',resizable='+resizable+',menubar='+menubar+',toolbar='+toolbar+',personalbar='+personalbar+',location='+locationbar+',status='+status+''
	if (naam=='') {
	naam= date.getSeconds ;
	}
	Win = window.open(theUrl, naam, winProp)
	}
}
