function closeWindow()
{
  close();
}

newWindow=null;

function openWindow2(url,name,popWidth,popHeight){
  if ((document.all) ||
      (document.layers))
    {
   var popLeft = screen.availWidth / 7;
   var popTop = screen.availHeight / 3;
 }
if(!newWindow || newWindow.closed){

  if (document.all)
    {
   newWindow = window.open(url,name,"width="+popWidth+",height="+popHeight+",left="+popLeft+",top="+popTop+",resizable=no,scrollbars=no,toolbars=no,status=no");
	 newWindow.focus();
 }
 
 else if (document.layers)
    {
      newWindow =
	window.open(url,name,"width="+popWidth+",height="+popHeight+",screenX="+popLeft+",screenY="+popTop+",resizable=no,scrollbars=no,toolbars=no,status=no");
   newWindow.focus();
 }
 
  else if (window.open)
    {
       newWindow = window.open(url,name,"width="+popWidth+",height="+popHeight+",resizable=no,scrollbars=no,toolbars=no,status=no");
   newWindow.focus();
 }
}
else{
newWindow.close();

  if (document.all)
    {
   newWindow = window.open(url,name,"width="+popWidth+",height="+popHeight+",left="+popLeft+",top="+popTop+",resizable=no,scrollbars=no,toolbars=no,status=no");
	 newWindow.focus();
 }
 
 else if (document.layers)
    {
      newWindow =
	window.open(url,name,"width="+popWidth+",height="+popHeight+",screenX="+popLeft+",screenY="+popTop+",resizable=no,scrollbars=no,toolbars=no,status=no");
   newWindow.focus();
 }
 
  else if (window.open)
    {
       newWindow = window.open(url,name,"width="+popWidth+",height="+popHeight+",resizable=no,scrollbars=no,toolbars=no,status=no");
   newWindow.focus();
 }
}
}

