function ShowPreviewImg(imageSrc,dispWidth,dispHeight,useAutoSize,Tips,Style,CssClass)
{
	var newWidth = dispWidth;
	var newHeight = dispHeight;
	var sourceWidth;	//源图片的宽度
	var sourceHeight;	//源图片的高度
	useAutoSize = eval(useAutoSize.toLowerCase());
	var outString = '<IMG Src="{Src}" Width="{Width}" Height="{Height}" Border="0"';
	//使用自动按比例缩放
	if (useAutoSize)
	{
		imageOriginal = new Image() ;
		imageOriginal.src = imageSrc ;
		sourceWidth = imageOriginal.width;
		sourceHeight = imageOriginal.height;
		newHeight = ((newWidth / 4) * 3);

		if(newHeight<dispHeight)
		{
			if(sourceHeight>0)
			{
			  newHeight=dispHeight;
			  newWidth=(sourceWidth/sourceHeight)*newHeight;		
			}
			else
			{
			  return;
			}
		}
		else
		{
			if(sourceWidth>0)
		     	{
			  newHeight=(sourceHeight/sourceWidth)*newWidth;
			}
			else
			{
			  
			}
		}
	}
	outString = outString.replace("{Src}",imageSrc);
	outString = outString.replace("{Width}",newWidth);
	outString = outString.replace("{Height}",newHeight);
	if (Tips != null)
	{
		outString += " Alt=" + Tips;
	}
	if (Style != null)
	{
		outString += " Style=" + Style;
	}
	if (Style != null)
	{
		outString += " Class=" + CssClass;
	}
	outString += ">";
	document.write(outString);
}
/*
function infor()
{
if(document.readyState!="complete")
{
setTimeout("infor()",2000);//设置时间
}
else
{
info.style.visibility="hidden"; //让等待信息消失
}

}
*/
