

 function openWindow(theURL, wname, W, H) {


   if (screen.height<H)
	  H=screen.height-100;

   if (screen.width<W)
	  W=screen.width-40;

	var left = Math.floor( (screen.width - W) / 2);
	var top = Math.floor( (screen.height - H) / 2);

    window.open(theURL,wname,'resizable=yes, scrollbars=yes, width='+W+', height='+H+', left='+left+', top='+top);

}

 function openFixedWindow(theURL, wname, W, H) {


   if (screen.height<H)
	  H=screen.height-100;

   if (screen.width<W)
	  W=screen.width-40;

	var left = Math.floor( (screen.width - W) / 2);
	var top = Math.floor( (screen.height - H) / 2);

a=    window.open(theURL,wname,'resizable=no, scrollbars=no, width='+W+', height='+H+', left='+left+', top='+top);
  a.focus();  

}




 function openFixedScrollWindow(theURL, wname, W, H) {


   if (screen.height<H)
	  H=screen.height-100;

   if (screen.width<W)
	  W=screen.width-40;

	var left = Math.floor( (screen.width - W) / 2);
	var top = Math.floor( (screen.height - H) / 2);

a=    window.open(theURL,wname,'resizable=no, scrollbars=yes, width='+W+', height='+H+', left='+left+', top='+top);
  a.focus();  

}

 function openNoScrollWindow(theURL, wname, W, H) {


   if (screen.height<H)
	  H=screen.height-100;

   if (screen.width<W)
	  W=screen.width-40;

	var left = Math.floor( (screen.width - W) / 2);
	var top = Math.floor( (screen.height - H) / 2);

    window.open(theURL,wname,'resizable=yes, scrollbars=no, width='+W+', height='+H+', left='+left+', top='+top);

}

