/*
-------------------------------------------------------------------------------------------
   (c) Copyright 2002-2004 by Zaztech Pvt. Ltd.  All rights reserved.
-------------------------------------------------------------------------------------------
*/
function ZoomPicture(s_Image_Path, s_Image)
{
	var s_Ext = new String(s_Image);
	s_Ext = s_Ext.substring(parseInt(s_Ext.length-3),s_Ext.length);

	if((s_Ext.toUpperCase()=="GIF" || s_Ext.toUpperCase()=="JPG" || s_Ext.toUpperCase()=="PNG" || s_Ext.toUpperCase()=="PEG" || s_Ext.toUpperCase()=="BMP" || s_Ext.toUpperCase()=="WMF" || s_Ext.toUpperCase()=="ICO") && (parseInt(s_Ext.length) == 3))
	{
		var o_Img = new Image();
		var width, height;
		var s_ImageName = s_Image_Path + s_Image;
		o_Img.src = s_ImageName;

		width = parseInt(o_Img.width) + 50;
		height = parseInt(o_Img.height) + 50;

		width = (width < 50,50,width);
		height = (height < 50,50,height);
			
		win = open("", "AppWin", "height=" + parseInt(height) + ", width=" + parseInt(width) + ",resizable=yes");
						
		if(win != null)
		{
			win.document.open("text/html");
			win.resizeTo(parseInt(width),parseInt(height));
				win.document.writeln("<html><head><title>" + s_ImageName + "</title><body onload='setWindowSize();'><center><img src='" + s_ImageName + "' alt='' border='0'></center>" +"\r"+ "<" + "script language='javascript'>" +"\r"+ "{" +"\r"+ "window.setTimeout('window.close()',60000);" + "\r" + "var objImage = new Image(); \r objImage.src='" + s_ImageName + "'; \r function setWindowSize() \r { \r window.resizeTo(parseInt(objImage.width + 40),parseInt(objImage.height + 60)); \r } \r } \r </"+"script></body></html>");
			win.focus();
			win.document.close();
		}			
	}
	else
	{
		var width, height;
		var s_ImageName = s_Image_Path + s_Image;
		win = open(s_ImageName, "AppWin", "resizable=yes");
	}
}