function ShowPhoto(imgName, iwidth, iheight, scaleX, scaleY)
{	
	imgWidth = Math.ceil((iwidth * scaleX) + iwidth/2);
	imgHeight = Math.ceil((iheight * scaleY) + iheight/2);	
	
	var positionX = (screen.width-imgWidth)/2;
	var positionY = (screen.height-imgHeight)/2;
	
	//alert(imgWidth + " " + imgHeight);
	
    large_image_win = window.open('', 'Pic' , 'left=' + positionX + ', top=' + positionY + ', width=' + imgWidth + ', height=' + imgHeight + '');
    large_image_win.document.write("<div width=100% style=float:left;><img src='" + imgName + "'></div>");
   	large_image_win.focus();
}

function PopSized(url, width, height) {
	var windowWidth = parseInt(width) + 10;
	var windowHeight = parseInt(height) + 36;
	
	var positionX = (screen.width-windowWidth)/2;
	var positionY = (screen.height-windowHeight)/2;	

large_image_win = window.open("",'Pic','top='+ positionY +', left='+ positionX +', width=' + windowWidth + ', height=' + windowHeight + ', scrollbars=0,resizable=0');
large_image_win.document.close();
large_image_win.resizeTo(windowWidth, windowHeight);
large_image_win.document.writeln ("<html><head></head><body style='margin:0px;padding:0px;'><div style=\"float:left\"> " +
								  "<p style=\"margin-bottom:0px;margin-top:0px\"><img src="+url+" height="+height+" width="+width+"></p></div>" +
								  "</div></body></html>");
large_image_win.focus();

}


