/*按比例生成缩略图*/
function DrawImage(ImgD,W,H){ 
  var flag=false; 
  var image=new Image(); 
  image.src=ImgD.src; 
  if(image.width>0 && image.height>0){ 
    flag=true; 
    if(image.width/image.height>= W/H){ 
      if(image.width>W){
        ImgD.width=W; 
        ImgD.height=(image.height*H)/image.width; 
      }
	  else{ 
        ImgD.width=image.width;
        ImgD.height=image.height; 
      } 
      ImgD.alt= ""; 
    } 
    else{ 
      if(image.height>H){
        ImgD.height=H; 
        ImgD.width=(image.width*W)/image.height; 
      }
	  else{ 
        ImgD.width=image.width;
        ImgD.height=image.height; 
      } 
      ImgD.alt=""; 
    } 
  }
}

function getObject(elementId){
	if(document.getElementById){
		return document.getElementById(elementId);
	}else if(document.all){
		return document.all[elementId];
	}else if(document.layers){
		return document.layers[elementId];
	}
}
function ReImgSize(obj) {
	var pressImg = obj;
	if (pressImg.width>120 && pressImg.width>pressImg.height) {
	    pressImg.style.marginTop=parseInt((120-(120/pressImg.width)*pressImg.height)/2) + "px";
		pressImg.width=120;
	} else if(pressImg.height>120) {
		pressImg.height=120;
	}
}

function Current(index)
{
	var ImageList=["Image4","Image5","Image6","Image7","Image8","Image9","Image10","Image11","Image12","Image13","Image14","Image15"];
	var SrcList=["","ptfe_over","etfe_over","pvce_over","group_profile_over","profile_over","gcyj_over","news_over","sbzl_over","product_over","mcjs_over","contact_us_over"];
	var obj=document.getElementById(ImageList[index]);
	obj.src="images/menu/"+SrcList[index]+".gif";
}