         

var windowName = "Popup"
function popitup(URL, width, height, attributes, left, top){
  var d_left = 20 
  var d_top = 20   
  var popcookies = document.cookie
  if (popUpWindow.arguments.length >= 4)  // any additional features? 
    attributes = "," + attributes
  else 
    attributes = "" 
  if (popUpWindow.arguments.length == 6)  // location specified
    attributes += getCoord(width, height, left, top)
  else
    attributes += getCoord(width, height, d_left, d_top)
  if (popcookies.indexOf(windowName) == -1){ // cookie not found 
    window.open(URL, windowName, "width=" + width 
           + ",height=" + height + attributes + ",resize=no,scrollbar=no,toolbar=no,menubar=no")
    document.cookie=windowName+"=visited"
    }
  }



function getCoord(width, height, left, top){
  var coord = ""
  if (left < 0)
    left = screen.width - width + left
  if (top < 0)
    top = screen.height - height + top
  if (top == "cen")
    top = (screen.height - height)/2 - 20
  if (left == "cen")
    left = (screen.width - width)/2
  if (left>0 & top>0)
    coord =  ",screenX=" + left + ",left=" + left	
                + ",screenY=" + top + ",top=" + top
  else
    coord = ""
  return coord
  }

