function x_window(imgSrc) {
margin = 20;
x_win = open("ii", "x_win", "resizable,width=100,height=100,top=0,left=0");
img = new Image();
img.onload = function() {
x_win.resizeTo(w = img.width + margin, h = img.height + margin*3);
x_win.moveTo( (document.body.clientWidth - w) / 2 , (document.body.clientHeight - h) / 2);
if( img.outerHTML ) x_win.document.write( img.outerHTML );
else x_win.document.body.appendChild(img);
}
img.src = imgSrc;
}
var scr='/img.html'

function imgWin(img)
{
var wn=window.open(scr+'?'+escape(img),'win','resizable,width=500,height=400,screenX=0,screenY=0,top=0,left=0')
wn.focus()
return false
}
