function openWindow(url, winWidth, winHeight) {
  closeWindow();
  if (parseInt(navigator.appVersion) >= 4) {
    var xPos = (screen.availWidth-winWidth)/2;
    var yPos = (screen.availHeight-winHeight)/2;
  } else {
    var xPos = 300;
    var yPos = 400;
  }  
  attrib = "menubar=0,status=0,personalbar=0,titlebar=0,toolbar=0,location=0,top="
+ yPos + ",left=" + xPos + ",width=" + winWidth + ",height=" +
winHeight +",resizable=1,scrollbars=1";
  newWin = window.open(url, 'newWin', attrib);
  if (newWin.opener == null) newWin.opener = window; 
  newWin.opener.name = "opener";
  newWin.focus();
}
function openMenuWindow(url, winWidth, winHeight) {
  closeWindow();
  if (parseInt(navigator.appVersion) >= 4) {
    var xPos = (screen.availWidth-winWidth)/2;
    var yPos = (screen.availHeight-winHeight)/2;
  } else {
    var xPos = 300;
    var yPos = 400;
  }  
  attrib = "menubar=1,status=0,personalbar=0,titlebar=0,toolbar=0,location=0,top="
+ yPos + ",left=" + xPos + ",width=" + winWidth + ",height=" +
winHeight +",resizable=1,scrollbars=1";
  newWin = window.open(url, 'newWin', attrib);
  if (newWin.opener == null) newWin.opener = window; 
  newWin.opener.name = "opener";
  newWin.focus();
}
function openMenuWindow2(url, winWidth, winHeight) {
  closeWindow();
  if (parseInt(navigator.appVersion) >= 4) {
    var xPos = (screen.availWidth-winWidth)/2;
    var yPos = (screen.availHeight-winHeight)/2;
  } else {
    var xPos = 300;
    var yPos = 400;
  }  
  attrib = "menubar=1,status=0,personalbar=0,titlebar=0,toolbar=0,location=0,top="
+ yPos + ",left=" + xPos + ",width=" + winWidth + ",height=" +
winHeight +",resizable=1,scrollbars=0";
  newWin = window.open(url, 'newWin', attrib);
  if (newWin.opener == null) newWin.opener = window; 
  newWin.opener.name = "opener";
  newWin.focus();
}

function openMenuWindow3(url, winWidth, winHeight) {
  closeWindow();
  if (parseInt(navigator.appVersion) >= 4) {
    var xPos = (screen.availWidth-winWidth)/2;
    var yPos = (screen.availHeight-winHeight)/2;
  } else {
    var xPos = 300;
    var yPos = 400;
  }  
  attrib = "menubar=0,status=0,personalbar=0,titlebar=0,toolbar=0,location=0,top="
+ yPos + ",left=" + xPos + ",width=" + winWidth + ",height=" +
winHeight +",resizable=0,scrollbars=0";
  newWin = window.open(url, 'newWin', attrib);
  if (newWin.opener == null) newWin.opener = window; 
  newWin.opener.name = "opener";
  newWin.focus();
}

function closeWindow() {
  if ((document.newWin) && (!newWin.closed)) {
    newWin.close();
  } else {
   document.newWin = new Object();
  }
}