var win = null;
function popup2(url,winName,W,H,X,Y) {
    W = 640;	//default width
    H = 570; //default height
    X = screen.width/2-W/2; //default Xpos (is now centered)
    Y = screen.height/2-H/2; //default Ypos (is now centered)
	
	winprops = 'height='+H+',width='+W+',top='+X+',left='+Y+',toolbar=no,menubar=no,scrollbars=yes';

	win = window.open(url, winName, winprops);
	if (parseInt(navigator.appVersion) >= 4) {
		win.window.focus();
	}
}


function newWindow(mypage,myname,w,h,features) {
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}
