function x_window(imgSrc) {
margin = 20;
x_win = open("", "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); x_win.document.close();}
else {x_win.document.body.appendChild(img);}
}
img.src = imgSrc;
}
