function NewWindow(mypage, myname, winwidth, winheight) {
	var swidth = screen.width;
	var sheight = screen.height;
	if (winwidth > swidth){
		winwidth = swidth - 100;
	}
	if (winheight > sheight){
		winheight = sheight - 100;
	}
	var winl = (swidth - winwidth) / 2;
	var wint = (sheight - winheight) / 2;
	winprops = 'height='+winheight+',width='+winwidth+',top='+wint+',left='+winl+',location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
