var imgPopup = new imgbox();
function imgbox() {
this.windowHandle = null;
return this;
}
function showImg(imgSrc) {
this.windowHandle = window.open("", "imgWin","scrollbars=1,resizable=1");
this.windowHandle.focus();
this.windowHandle.document.open();
	var Cnt = "<html><head><TITLE>SOGAER</TITLE>" 
	+ "<script type=\"text\/javascript\"\>" 
	+ "function resize() {"
  	+ "var w = 10 + parseInt(document.images['image1'].width);"
	+ "var h = 30 + parseInt(document.images['image1'].height);"
	+ "var x = (screen.availWidth - w) / 2;"
	+ "var y = (screen.availHeight - h) / 2;"
	+ "window.resizeTo(w, h);"
	+ "window.moveTo(x, y);"
	+ "window.focus();"
	+ "\}"
	+ "\<\/script\>"
	+ "</head>"
	+ "<body bgcolor=\"#FFFFFF\" leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" bottommargin=\"0\" marginwidth=\"0\" marginheight=\"0\">"
	+ "\<script type='text\/javascript'\>"
	+ "document.write(\"<img name='image1' border='0' src='"+imgSrc+"'>\");"
	+ "document.images['image1'].onload = resize;"
	+ "\<\/script\>"
	+ "</body>"
	+ "</html>";
this.windowHandle.document.write(Cnt);
this.windowHandle.document.close();
}
new imgbox();
imgbox.prototype.showImg = showImg;

