// Javascript 1.2
function NewWindow (mypage, myname, w, h, scroll, pos) {
  var left;
  var top;

  if (pos == "random") {
    left = (screen.width)?Math.floor(Math.random()*(screen.width-w)) : 100;
    top = (screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
  } else if (pos == "center") {
    left = (screen.width)  ? (screen.width-w)/2  : 100;
    top  = (screen.height) ? (screen.height-h)/2 : 100;
  } else {
    left = 0;
    top  = 20;
  }
  var settings='width='+w+',height='+h+',top='+top+',left='+left+',scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';

  var newwin = window.open(mypage,myname,settings);
  newwin.opener = self;
  newwin.focus();
}

function popup(url) {
  NewWindow(url,'image', 700, 700, 'yes', 'center');
}

