function pop(url,w,h,a,s,which_win,winname)
{ 

x = Math.floor((screen.width - w) / 2);
  y = Math.floor((screen.height - h) / 2);	
  now = new Date();
  win_obj=(which_win == null)?window:which_win.opener;
  if (winname == null)
     win_name=(which_win == null)?"newwin":"biggerwin";
  else
     win_name=winname;
	 
var name="newwin";
	 
  msgWindow = win_obj.open(url,name,
			"screenx="+x
		+",screeny="+y
		+",width="+w
		+",height="+h
		+",resizable="+a
		+",scrollbars="+s); 
  msgWindow.focus();
  if (which_win != null)
    which_win.close();   
}
