function ShowNav(obj){
	
	document.getElementById(obj).style.color="#465826";
	document.getElementById(obj).style.lineheight="43px";
	document.getElementById(obj).style.display="block";
	document.getElementById(obj).style.backgroundImage="url(img/Nav_hover.jpg)";
	document.getElementById(obj).style.backgroundPosition="center";
	document.getElementById(obj).style.backgroundRepeat="no-repeat";
}
var flag=false;
function DrawImage(ImgD,iwidth,iheight){
    //参数(图片,允许的宽度,允许的高度)
    var image=new Image();
    image.src=ImgD.src;
    if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= iwidth/iheight){
        if(image.width>iwidth){  
        ImgD.width=iwidth;
        ImgD.height=(image.height*iwidth)/image.width;
        }else{
        ImgD.width=image.width;  
        ImgD.height=image.height;
        }
        ImgD.alt=image.width+"×"+image.height;
        }
    else{
        if(image.height>iheight){  
        ImgD.height=iheight;
        ImgD.width=(image.width*iheight)/image.height;        
        }else{
        ImgD.width=image.width;  
        ImgD.height=image.height;
        }
        ImgD.alt=image.width+"×"+image.height;
        }
    }
} 
function msg(){
	var Obj=document.myform;
	if(Obj.nom.value == "" ) 
		{
			alert("Merci de remplir les champs indiqués");
			Obj.nom.focus();
			return false;
		}
		if(Obj.shehui.value == "" ) 
		{
			alert("Merci de remplir les champs indiqués");
			Obj.shehui.focus();
			return false;
		}
		if(Obj.livraison.value == "" ) 
		{
			alert("Merci de remplir les champs indiqués");
			Obj.livraison.focus();
			return false;
		}
	if(Obj.email.value == "" ) 
		{
			alert("Merci de remplir les champs indiqués");
			Obj.email.focus();
			return false;
		}
		if(Obj.zhuti.value == "" ) 
		{
			alert("Merci de remplir les champs indiqués");
			Obj.zhuti.focus();
			return false;
		}
}

function Productmsg(){
	var Obj=document.myform;
	if(Obj.nom.value == "" ) 
		{
			alert("Merci de remplir les champs indiqués");
			Obj.nom.focus();
			return false;
		}
		if(Obj.shehui.value == "" ) 
		{
			alert("Merci de remplir les champs indiqués");
			Obj.shehui.focus();
			return false;
		}
	if(Obj.email.value == "" ) 
		{
			alert("Merci de remplir les champs indiqués");
			Obj.email.focus();
			return false;
		}
		if(Obj.zhuti.value == "" ) 
		{
			alert("Merci de remplir les champs indiqués");
			Obj.zhuti.focus();
			return false;
		}if(Obj.product.value == "" ) 
		{
			alert("Merci de remplir les champs indiqués");
			Obj.product.focus();
			return false;
		}if(Obj.quantitle.value == "" ) 
		{
			alert("Merci de remplir les champs indiqués");
			Obj.quantitle.focus();
			return false;
		}if(Obj.livraison.value == "" ) 
		{
			alert("Merci de remplir les champs indiqués");
			Obj.livraison.focus();
			return false;
		}
}
