//显示flash，避免IE的激活障碍
function flash(movie,width,height,paramname,paramvalue){
	var swfHtml="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\""+width+"\" height=\""+height+"\">";
	swfHtml+="<param name=\"movie\" value=\""+movie+"\">";
	swfHtml+="<param name=\"quality\" value=\"high\">";
	if(paramname!="" && paramvalue!=""){
		var nameArr=new Array();
		var valueArr=new Array();
		nameArr=paramname.split(",");
		valueArr=paramvalue.split(",");
		if(nameArr.length==valueArr.length){
			for(iCount=0;iCount<nameArr.length;iCount++){
				swfHtml+="<param name=\""+nameArr[iCount]+"\" value=\""+valueArr[iCount]+"\">";
			}
		}
	}
	swfHtml+="<embed src=\""+movie+"\" width=\""+width+"\" height=\""+height+"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" wmode=\"opaque\"></embed>";
	swfHtml+="</object>";
	document.write(swfHtml);
}

function exchangePicture(imgid,pictureurl){
	imgid.src=pictureurl;
}


function checkform(){

	if (document.enquiry.Address.value==""){
		window.alert("请输入联系地址！");
		document.enquiry.Address.focus();
		return false;
	}
	if (document.enquiry.Product.value==""){
		window.alert("请输入您要订购的产品！");
		document.enquiry.Product.focus();
		return false;
	}
	if (document.enquiry.OrderNum.value==""){
		window.alert("请输入您要订购产品的数量！");
		document.enquiry.OrderNum.focus();
		return false;
	}
	if (document.enquiry.Phone.value==""){
		window.alert("请输入联系电话！");
		document.enquiry.Phone.focus();
		return false;
	}
	if (document.enquiry.Contact.value==""){
		window.alert("请输入联系人！");
		document.enquiry.Contact.focus();
		return false;
	}
	if (document.enquiry.Content.value==""){
		window.alert("请填写完订购说明！");
		document.enquiry.Content.focus();
		return false;
	}
	return true;
}


function check(){

	if (document.form1.Title.value==""){
		window.alert("请输入留言标题！");
		document.form1.Title.focus();
		return false;
	}
	if (document.form1.Contacts.value==""){
		window.alert("请填写联系人姓名！");
		document.form1.Contacts.focus();
		return false;
	}
	if (document.form1.Address.value==""){
		window.alert("请输入联系地址！");
		document.form1.Address.focus();
		return false;
	}
	if (document.form1.Tel.value==""){
		window.alert("请输入联系电话！");
		document.form1.Tel.focus();
		return false;
	}
	if (document.form1.Content.value==""){
		window.alert("请填写留言内容！");
		document.form1.Content.focus();
		return false;
	}
	return true;
}


function ratImg(Img,blw,blh){
	var i=Img.width;
	var j=Img.height; 

	if (i>blw){
		var zjbl1=blw/i;
		var zjbl2=blh/j;
		if (zjbl1<zjbl2){
			zjbl=zjbl1;
		}else{
			zjbl=zjbl2;
		}
		i=i*zjbl;
		j=j*zjbl;
	}else{
		if (j>blh){
			zjbl=blh/j;
			j=blh;
			i=i*zjbl;
		}
	}

	Img.width=i;
	Img.height=j;
}

function bbImg(o){
	var zoom=parseInt(o.style.zoom, 10)||100;
	zoom+=event.wheelDelta/12;
	if (zoom>0) o.style.zoom=zoom+'%';
	return false;
}

//信息显示字体大小
var size=12;			//字体大小
function fontZoom(){	//设置字体
	size=12;
	document.getElementById('fontZoom').style.fontSize=size+'px';
}

function fontMax(){	//字体放大
	size=size+2;
	document.getElementById('fontZoom').style.fontSize=size+'px';
}

function fontMin(){	//字体缩小
	size=size-2;
	if (size < 2 ){
		size=2;
	}
	document.getElementById('fontZoom').style.fontSize=size+'px';
}