PositionX = 25;
PositionY = 5;

defaultWidth  = 500;
defaultHeight = 500;

var AutoClose = true;

if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=250,height=150,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle, muziek){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');
writeln('<meta http-equiv="imagetoolbar" content="no">');
writeln('<sc'+'ript>');
writeln('function noRightClick() {if (event.button==4) alert("All Rights Reserved - Hofsteden Raamdecoratie")}');
writeln('document.onmousedown=noRightClick');
writeln('var isNN,isIE;');
writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');
writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');
writeln('if (isIE) h=document.images[0].height;');
writeln('if (isIE) w=document.images[0].width;');
writeln('if (isNN) h=document.images["Alex"].height;');
writeln('if (isNN) w=document.images["Alex"].width;');
//writeln('if (h>(screen.height-20)) {w=w*((screen.height-20)/h); h=screen.height-20;};');
writeln('if (isIE){');
//writeln('window.resizeTo(100,100);');
writeln('width=w;');
writeln('height=h;');
writeln('window.resizeTo(width+40,height+80);}');
writeln('if (isNN){');       
writeln('window.innerWidth=w;');
writeln('window.innerHeight=h;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');
writeln('</sc'+'ript>');
if (!AutoClose) 
  writeln('</head><body bgcolor="#ffffff" scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else 
  writeln('</head><body bgcolor="#ffffff" scroll="no" onload="reSizeToImage();doTitle();self.focus()" >');
//writeln('<embed src="'+muziek+'" width="128" height="20" hidden="true" autostart="true"></embed>')
writeln('<center><img name="Alex" src="'+imageURL+'"></center></body></html>');
close();		
}}
