var popupWindow;
function ImageWindow(viewimage,ImgCaption) {

var options = "width=10,height=10,";
options += "resizable=yes,scrollbars=no,status=no,";
options += "menubar=no,toolbar=no,location=no,directories=no";

var height = "";
var width = "";

popupWindow = window.open("",'imageWin',options);
if(!popupWindow.opener)
popupWindow.document.writeln(' ');
popupWindow.document.writeln('<html><head>');
popupWindow.document.writeln('<title>Image</title>');
popupWindow.document.writeln('<meta http-equiv="author" content="RobertBerger,http://www.robertberger.nl/">');
popupWindow.document.writeln('<style type="text/css">');
popupWindow.document.writeln('body {margin: 0px;background-color: #000000;}');
popupWindow.document.writeln('.caption {bottom: 5px;color: #FFCC00;font-family: verdana,helvetica;font-size: 10pt;text-align: center;position: absolute;width: 100%;}');
popupWindow.document.writeln('.picture {left: 3px;position: absolute;top: 3px;}');
popupWindow.document.writeln('</style>');
popupWindow.document.writeln('<meta http-equiv="expires" content="0">');
popupWindow.document.writeln('<meta name="expires" content="0">');
popupWindow.document.writeln('<script language=javascript>');
popupWindow.document.writeln('function scalepopupWindow(){');
if (ImgCaption)
{
popupWindow.document.writeln('if ((navigator.appName == "Netscape") && (navigator.userAgent.indexOf("Gecko") == -1))');
popupWindow.document.writeln('{window.innerWidth=document.viewimage.width + 5;');
popupWindow.document.writeln('window.innerHeight=document.viewimage.height + 25;}');
popupWindow.document.writeln('else {window.resizeTo(document.viewimage.width + 19,document.viewimage.height + 59);}}');
}
else
{
popupWindow.document.writeln('if ((navigator.appName == "Netscape") && (navigator.userAgent.indexOf("Gecko") == -1))');
popupWindow.document.writeln('{window.innerWidth=document.viewimage.width + 5;');
popupWindow.document.writeln('window.innerHeight=document.viewimage.height + 5;}');
popupWindow.document.writeln('else {window.resizeTo(document.viewimage.width + 19,document.viewimage.height + 39);}}');
}
popupWindow.document.writeln('function vanish()');
popupWindow.document.writeln('{setTimeout("window.close()", 60000);}');
popupWindow.document.writeln('</script></head>');
popupWindow.document.writeln('<body onLoad="javascript:scalepopupWindow();vanish();" onResize="javascript:window.location.reload();">');
popupWindow.document.writeln('<img class="picture" name="viewimage" src="' + viewimage + '" border=0>');
if (ImgCaption)
{
popupWindow.document.writeln('<br><div class="caption">' + ImgCaption + '</div>');
}
popupWindow.document.writeln('</body>');
popupWindow.document.writeln('</html>');
popupWindow.document.close();
popupWindow.focus();
//popupWindow.moveTo(25,25);
}

function openinfobox(par) {

var theinfobox = window.open(par,'infobox','left=100,top=100,toolbar=no,scrollbars=yes,location=no,copyhistory=no,directories=no,status=no,width=400,height=450')
//theinfobox.moveTo(100,100);
theinfobox.focus()
}
