//function ImgPop(page) {
//	var winl = (screen.width - 375) / 3;
//	var wint = (screen.height - 500) / 3;
//	winprops = 'height=500,width=500,top='+wint+',left='+winl+',scrollbars=no,noresize'
//	win = window.open(page, 'Profile', winprops)
//	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
//}

PositionX = 250;
PositionY = 150;

defaultWidth  = 500;
defaultHeight = 500;




function popImage(imageURL,imageTitle) {

imgWin=window.open('about:blank','','resizable=yes,scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY);

with (imgWin.document) {

writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');

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('window.resizeTo(500,500);');
writeln('winwidth= document.images["Favor"].width+10;');
writeln('winheight= document.images["Favor"].height+80;');

writeln('//alert(winwidth);alert(winheight);');
writeln('window.resizeTo(winwidth,winheight);}');





writeln('function doTitle(){document.title="'+imageTitle+'";}');
writeln('</sc'+'ript>');

writeln('</head><body BACKGROUND="img/diamondbg.gif" scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="Favor" src='+imageURL+' style="display:block;cursor:hand" ONCLICK="window.close()" GALLERYIMG="no"></body></html>');
close();		
}
}
