//
//  Programma:    openwin.js 
//  Functie:      
//  Datum:        augustus 2003 / juni 2004
//  Definieert:   functies OpenWin, GotoUrl, Photo
//  Taal:         Javascript 1.1 (en Photo 1.2?)
//

function OpenWin (url, name, feat) { 
  return window.open(url, name, feat);
}


function GotoUrl (url) {
  eval("parent.location='" + url + "'");
}


var hWin = null;

function Photo(phref, ptitel, px, py, pw, ph)  { 
   
   if (hWin==null || hWin.closed) {
   
     // initiele waarden vb: px, py, pw, ph = 172, 120, 250, 370 
   
     var openString = "width=" + pw.toString() + ",height=" + ph.toString() + 
         ",resizable=1,scrollbars=no,menubar=no,status=no," + 
         "screenY=" + py.toString() + ",screenX=" + px.toString();            
   
      // alert(openString);
   
      hWin = window.open('', '', openString);
   }
   
   hWin.blur();
   
   if (document.all) {
       
     var frameString = "<html>"+
        "<head>" +
        "<title>" + ptitel + "</title>" +
        "</head><body bgcolor='black' onClick='window.close(); return false;'>" +
        "<img name='Pic' src='" + phref + "' alt='' onClick='window.close(); return false;'>" +
        "</body></html>";
       
      hWin.document.open();
      hWin.document.write(frameString);
      hWin.document.close()
   } 
   
   hWin.resizeTo(hWin.document.Pic.width + 2*12 + 10, hWin.document.Pic.height + 2*12 + 10 + 25);
   hWin.moveTo(px, py);
   hWin.focus();   
   return false;
}
