function NewWindow(mypage, myname, w, h, myscroll) {
var winl = (window.screen.width - w) / 2;
var wint = (window.screen.height - h) / 2 -20;
var fw = window.screen.availWidth-10;
var fh = window.screen.availHeight-50;
var winprops;
var agent=navigator.userAgent.toLowerCase();
var khtml = (agent.indexOf("khtml") != -1);

if (myscroll=='full') {
	if (!khtml && document.all) winprops='fullscreen=1,scrollbars=1,status=1';
	else winprops='screenX=0,status=1,screenY=0,scrollbars=1,top=0,left=0,height='+fh+',width='+fw;
}
else if (myscroll=='max' || myscroll=='maxurl' || myscroll=='maxtool') {
	winprops='top=0,left=0,screenX=0,screenY=0,status=1,resizable=1,scrollbars=1,width='+fw;
	if (myscroll=='maxurl') winprops+=',heigth='+(fh-20)+',location=yes,toolbar=yes,menubar=no';
	else winprops+='toolbar=no,menubar=no,height='+fh;

}
else {
	winprops='scrollbars='+myscroll+',resizable=1,height='+h+',width='+w+',top='+wint+',left='+winl;
}
win = window.open(mypage, myname, winprops);
if (document.all) win.focus();
return false;
}

