var  flag=false; 
function  DrawImage(ImgD,wid,hei){  
     var  image=new  Image();  
     image.src=ImgD.src;  
     if(image.width>0  &&  image.height>0){  
       flag=true;  
       if(image.width/image.height>=  wid/hei){  
         if(image.width>wid){      
         ImgD.width=wid;  
         ImgD.height=(image.height*wid)/image.width;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=ImgD.alt;  
         }  
       else{  
         if(image.height>hei){      
         ImgD.height=hei;  
         ImgD.width=(image.width*hei)/image.height;
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=ImgD.alt;  
         }  
       }  
}
//导航鼠标滑动样式
function dh_style(this_div,this_name){
this_div.className = "dh_td_over";
document.getElementById("div_"+this_name).className = "dh_div_over";
document.getElementById("a_"+this_name).className = "dh_a_over";
}
function dh_style_over(this_div,this_name){
this_div.className = "";
document.getElementById("div_"+this_name).className = "dh_div";
document.getElementById("a_"+this_name).className = "dh_a";
}
//滑动样式结束
//产品页留言提交表单检查
function chkmess(theform){
	if( theform.email.value == ""){
		alert("please Enter your email");
		theform.email.focus();
		return (false);
	}	
	if(theform.email.value == ""){
		Err += "\n\t please Enter your Email!";
	}else{
		var filter=/^([\w+\.]*)@([\w+])+\.(([\w\.]*){2,4})$/
	   if(!filter.test(theform.email.value))
	   {
	      alert("email format is incorrect!");
		  theform.email.focus();
		  return (false);
	   }
	}
	if(theform.firstname.value == "" || theform.firstname.value == "First Name"){
		alert("Please Enter your firstName");
		theform.firstname.focus();
		return (false);
	}
	if(theform.lastName.value == "" || theform.lastName.value == "Last Name"){
		alert("Please Enter your lastName");
		theform.lastName.focus();
		return (false);
	}	
	if( theform.content.value == ""){
		alert("please Enter your Messages!");
		theform.content.focus();
		return (false);
	}
	return true;
}
//产品页留言提交表单检查结束