
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=800,height=600');");
return false;
}

function smallpopup(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=500,height=300');");
return false;
}

function openCenteredWindow(url, height, width, name) {

   var left = Math.floor( (screen.width - width) / 2);
   var top = Math.floor( (screen.height - height) / 2);

   if (height <= 1) { height = Math.floor(screen.height * height); }
   if (width <= 1) { width = Math.floor(screen.width * width); }

var parms='toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1'
   var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width
  if (parms) { winParms += "," + parms; }
   var win = window.open(url, name, winParms);
   if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
   
   //return win;
   //dont follow hyperlink
   return false;
}

function openBareWindow(url, height, width, name) {

   var left = Math.floor( (screen.width - width) / 2);
   var top = Math.floor( (screen.height - height) / 2);

   if (height <= 1) { height = Math.floor(screen.height * height); }
   if (width <= 1) { width = Math.floor(screen.width * width); }

var parms='toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0'
   var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width
  if (parms) { winParms += "," + parms; }
   var win = window.open(url, name, winParms);
   if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
   
   //return win;
   //dont follow hyperlink
   return false;
}
