// JavaScript Document

PosX = 100;
PosY = 100;
defWidth  = 500;
defHeight = 500;

var AutoClose = true;
//check browser 
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optionsNN='scrollbars=no,width='+defWidth+',height='+defHeight+',left='+PosX+',top='+PosY;
var optionsIE='scrollbars=no,width=150,height=100,left='+PosX+',top='+PosY;
function showDetailImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optionsNN);}
if (isIE){imgWin=window.open('about:blank','',optionsIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px; background-color: #ffffff;}</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('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=120-(document.body.clientWidth-document.images[0].width);'); //120 to compensate for ie sb space
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["Detail"].width;');writeln('window.innerHeight=document.images["Detail"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="Detail" src='+imageURL+' style="display:block"></body></html>');
writeln('<div style="text-align: right; position: absolute; top: 0; right: 0; width: 100%;"><a style="padding: 2px; border: 1px solid black; background-color: white; height: 100%" href="javascript: self.close()" style="font-weight: bold;">close</a></div>');
close();		
}}

