function popup(modkey, func, params, name, w, h, returnfield, mode, values)
{	
	if(!w)w=400;
	if(!h)h=300;

	NF=window.open('popup.php?id='+modkey+'&func='+func+'&name='+name+'&params='+params+'&returnfield='+returnfield+'&mode='+mode+'&value='+values, 'name', "width="+w+",height="+h+", scrollbars=yes, resizable=yes");
	NF.focus();

} 

function popups(page, wname, w, h){

	if(page.indexOf(".jpg")>0 || page.indexOf(".gif")>0 || page.indexOf(".png")>0){
		NF1=window.open('', '', "width="+w+",height="+h+", scrollbars=no,resizable=no");
		NF1.document.write('<html>');
		NF1.document.write('<head>');
		NF1.document.write('<title>'+decodeURI(wname)+'</title>');
		NF1.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
		NF1.document.write('</head>');
		NF1.document.write('<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
		NF1.document.write('<img src="'+page+'">');
		NF1.document.write('</body>');
		NF1.document.write('</html>');
		NF1.focus();
	}
	else {
		NF1=window.open(page, '', "width="+w+",height="+h+", scrollbars=no,resizable=yes");
		NF1.focus();
	}

}