// JavaScript Document
// 说明：用 JavaScript 实现网页图片等比例缩放 //
function DrawImage(ImgD,FitWidth,FitHeight)
	{ 
		var image=new Image();
		image.src=ImgD.src;
		if(image.width>0 && image.height>0)
			{
				if(image.width/image.height>= FitWidth/FitHeight)
					{
						if(image.width>FitWidth)
							{
								ImgD.width=FitWidth;
								ImgD.height=(image.height*FitWidth)/image.width;
							}
						else
							{
								ImgD.width=image.width;
								ImgD.height=image.height;
							}
					} 
				else
					{ 
						if(image.height>FitHeight)
							{ 
								ImgD.height=FitHeight; 
								ImgD.width=(image.width*FitHeight)/image.height; 
							}
						else
							{ 
								ImgD.width=image.width;
								ImgD.height=image.height;
							}
					 }
			}
	} 
	

//输出 flash

function WriteLogo(Path,Width,Height,Transparent,parm){
	 var Temp,T="",P=""
	 Temp='<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="FlashH" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=8,0,24,0" border="0" width="'+Width+'" height="'+Height+'">'
	 Temp+='<param name="movie" value="'+Path+'"/>'
	 Temp+='<param name="quality" value="High"/>'
	 Temp+='<param name="scale" value="ExactFit"/>'
	 if (Transparent) {Temp+=' <param name="wmode" value="transparent"/>';T='wmode="transparent"'}
	 if (parm!="") {Temp+=' <param name="flashvars" value="'+parm+'"/>';P='FlashVars="'+parm+'"'}
	 Temp+='<embed src="'+Path+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="FlashH" width="'+Width+'" height="'+Height+'" quality="High" '+T+' '+P+' scale="ExactFit"/>'
	 Temp+='</object>'
	 document.write(Temp)
}


function search_product_name()
	{
		if(document.all.search_product.name.value=="")
			{
				alert("请输入产品名")
			}
		else
			{
				document.all.search_product.submit()
			}
	}




//在线留言
where=1
function picnext(){
where++
if (where>10){
where=1
}
document.all.pic.src="head/if"+where+".gif"
}
function picup(){
where--
if(where<1){
where=10
}
document.all.pic.src="head/if"+where+".gif"
}
function tj(){
if(document.ly.name.value==""){
alert("请标出你的署名")
return false
}else if(document.ly.says.value.length<=2){
alert("你要说什么呀")
return false
}else{
document.ly.picname.value=document.all.pic.src
document.ly.submit()
}
}