<!--图片自动等比例缩放-->
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";
}
