﻿function popImage(imageURL){

defaultWidth  = 500;
defaultHeight = 500;
var imageTitle='dddd'

PositionX = (screen.width/2)-(defaultWidth/2);
PositionY = (screen.height/2)-(defaultHeight/2);

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='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;


imageURL=imageURL.replace(/ /g,"%20");

if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Yükleniyor...</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('if (isIE){');
writeln('window.resizeTo('+defaultWidth+','+defaultHeight+');');
writeln('width=document.images[0].width;');
writeln('height=document.images[0].height+70;');
writeln('window.resizeTo(width,height);}');
writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');
writeln('window.innerHeight=document.images["George"].height;}}');
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()" onblur="self.close()">');
writeln('<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td align="center">');
writeln('<a href="javascript:self.close()" title="Kapatmak İçin Tıklayın"><img name="George" src=images/urun/'+imageURL+' style="display:block" border=0></a></body></html>');
writeln('</td></tr></table>');
writeln('</a></body></html>');
close();		
}}
