<!--图片自动等比例缩放-->
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;  
         }  
       }  
}  

<!--产品展示大图效果JS-->
function setTab(/*string*/name,/*int*/ itemCnt,/*int*/ curItem, /**/classHide, /**/classShow)
{
 for(i=1;i<=itemCnt;i++)
 {
  eval("document.getElementById('tab_" + name + "_" + i + "').className='" + classHide + "'");
 } 
 eval("document.getElementById('tab_" + name + "_" + curItem + "').className='" + classShow + "'");
 
 for(i=1;i<=itemCnt;i++)
 {
  eval("ele_hide = document.getElementById('con_" + name + "_" + i +"')");
  if(ele_hide) ele_hide.style.display = "none";
 }
 eval("ele_play = document.getElementById('con_" + name + "_" + curItem + "')");
 if(ele_play) ele_play.style.display = "block";
}


function scan_space(s){
	return -1!=s.indexOf(" ")? true: false;
}


function check_Sum(){
	var EmailId = document.getElementById('pr_coun');
	var prcie = document.getElementById('prcie');
	var prciex = prcie.value
	var Conf_email = EmailId.value;
	var msg = "";
	if(scan_space(Conf_email) ){
		 msg = "0";	
	var StatceCount = "0"
	}
	else{
	var sum = Conf_email*prciex; 
	
	if (Conf_email < 1 ) {
	var StatceCount = 0;
	}
	else{
	var StatceCount = 25+(Conf_email-1)*6;
	}
	
    msg = "$"+ (sum);
	}
	showInfoStyle( "prciex_sum",msg);
	}

function showInfoStyle(id, msg){
	var obj = document.getElementById(id);	
	obj.innerHTML = msg;

}