function openwindow(mypage,myname,w,h,features) {
  if(screen.width){
  var winl = (screen.width-w);
  var wint = (screen.height-h);
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += 'resizable=yes,scrollbars=yes,left=140,top=20,';
  win = window.open(mypage,myname,settings);
  win.window.focus();
}

function openWin(width,height,img,title,alt)
{
myWin=open("", "", "width=" + width + ",height=" + height + ",status=no,toolbar=no,menubar=no");
myWin.document.open();
myWin.img =img;
myWin.title=title;
myWin.alt=alt;
myWin.document.write("<html><head><title>" + title + "</title></head><body style=\"margin: 0px; background-color: white;\"><script type=\"text/javascript\"> {document.write('<a href=javascript:window.close()><img src=" + img + " alt=\"" + alt + "\" style=\"border-width: 0px;\"></a>')}</script></body></html>");
myWin.document.close();
}

