//create new window that is centered on screen
var win = null;
function newWindow(mypage,myname,w,h,scroll) {
  LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-h)/3 : 0;
  settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable,menubar'
  win = window.open(mypage,myname,settings)
}

day = new Date();
id = day.getTime();

//pop window created above
function popUp(url,w,h,s) {
  newWindow(url,id,w,h,s);
}