function ViewImage(url,w,h,title) {
    var properties,screenWidth,screenHeight,newWindow,b,h;
        
    // Get screen width and height
    var ns6 = (!document.all && document.getElementById);
    var ie4 = (document.all);
    var ns4 = (document.layers);
        
    if(ns6||ns4) {
        screenWidth = innerWidth;
        screenHeight = innerHeight;
    } else if(ie4) {
        screenWidth = document.body.clientWidth;
        screenHeight = document.body.clientHeight;
    }
        
    x = (screenWidth-b)/2;
    y = (screenHeight-h)/2;
        
    properties="left="+x+",top="+y+",screenX="+x+",screenY="+y+",width="+w+",height="+h+",menubar=no,toolbar=no,statusbar=0";
        
    newWindow=window.open("","",properties);
    newWindow.focus();
    newWindow.document.open();
    with (newWindow) {
      document.write('<html><head>');
      // Mozilla...
      document.write('<scr' + 'ipt type="text/javascr' + 'ipt" language="JavaScr' + 'ipt">');
      document.write("function click() { window.close(); } ");  // close on click
      document.write("document.onmousedown=click ");
      // für Mozilla
      document.write('</scr' + 'ipt>');
      document.write('<title>'+ title +'</title></head>');
      // Dreamweaver...
      document.write('<' + 'body onblur="window.close();" ');// close on focus lost
      document.write('marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">');
      document.write('<img src="'+ url +'"border="0">');
      document.write('</body></html>');
      newWindow.document.close();
    }
}
