function popup(url,winName,W,H,X,Y)
  {
	if(W == undefined) W = 400;	//default width
	if(H == undefined) H = 300; //default height
	if(X == undefined) X = screen.width/2-W/2; //default Xpos (is now centered)
	if(Y == undefined) Y = screen.height/2-H/2; //default Ypos (is now centered)

	winprops = 'height='+H+',width='+W+',top='+X+',left='+Y+',scrollbars=no';

	win = window.open(url, winName, winprops);
	if (parseInt(navigator.appVersion) >= 4)
    {
		win.window.focus();
  	}
  }
