// JavaScript Document
//***********************************
// 函数名: DrawImage
// 作  用: 缩放图片比例
// 参  数: ImgD:图片项,Imgwidth:设定宽度,Imgheight:设定高度
// 返回值: 无
// oncontextmenu=self.event.returnValue=false onselectstart="return false" 
//***********************************
function DrawImage(ImgD,Imgwidth,Imgheight){
   var image=new Image();
   image.src=ImgD.src;
   if(image.width>0 && image.height>0){
    if(image.width/image.height>= Imgwidth/Imgheight){
		 if(image.width>Imgwidth){  
			 ImgD.width=Imgwidth;
			 ImgD.height=(image.height*Imgwidth)/image.width;
		 }
		 else{
			 ImgD.width=image.width;  
			 ImgD.height=image.height;
		 }
		 ImgD.alt=image.width+"×"+image.height;

     }
    else{
		 if(image.height>Imgheight){  
			 ImgD.height=Imgheight;
			 ImgD.width=(image.width*Imgheight)/image.height;     
		 }
		 else{
			 ImgD.width=image.width;  
			 ImgD.height=image.height;
		 }

		 ImgD.alt=image.width+"×"+image.height;
     }
    }
   else{
		ImgD.src="/images/no.gif";
		ImgD.alt="攀枝花辉跃电子"
    }
   } 
   
   
   
function show(i){
var tr=document.getElementById("cp_cl1_"+i);
var img=document.getElementById("img_cl1_"+i);
if (tr.style.display=="none"){
tr.style.display="";
img.src="images/class2.gif";
}
else
{
tr.style.display="none";
img.src="images/class1.gif";
}
}