var total=10;

function show(x){
for(i=1;i<total+1;i++){
eval("a"+ i).style.display="none";
}
eval("a"+x).style.display="";
}
function hideAll(){
for(i=1;i<total+1;i++){
eval("a"+ i).style.display="none";
}
}

function navOn(Bgid){	
	Bgid.style.backgroundImage="url('../image/lmon.gif')";
}
function navOff(Bgid){	
	Bgid.style.backgroundImage="";
}

function navOnh(Bgid){	
	Bgid.style.backgroundImage="url('image/lmon.gif')";
}

function navCk(str){	
	document.location.href=str;
}


//首页专家图片框架控制
function getHomePics(){
var a1=document.getElementById('HomePics');
a1.height=120;
a1.src="info/homepics.asp";
}

//首页专家图片框架控制
function HomeProducts(){
var a1=document.getElementById('HomeProducts');
a1.height=120;
a1.src="info/cp.asp";
}


//图片按比例缩放#1
var flag=false; 
function DrawImage(ImgD,iwidth,iheight){ 
 var image=new Image(); 
// var iwidth = 120;  //定义允许图片宽度 
// var iheight = 180;  //定义允许图片高度
 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; 
  } 
  } 
 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.style.border="1px solid #cccccc"; 
}

//图片按比例缩放#2
function DrawImageb(ImgD,iwidth,iheight){ 
 var image=new Image(); 
// var iwidth = 120;  //定义允许图片宽度 
// var iheight = 180;  //定义允许图片高度
 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; 
  } 
  } 
 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.style.border="1px solid #333333"; 
}

//图片按比例缩放#3
function DrawImagec(ImgD,TolLenth){ 
 var image=new Image(); 
 image.src=ImgD.src; 
 if(image.width>0 && image.height>0){ 
 flag=true;
 if(image.height>image.width)TolLenth=image.width/image.height*TolLenth;
 var n;
 n = Math.sqrt(image.width*TolLenth/image.height);
 ImgD.width = n; 
 ImgD.height= TolLenth / n; 
 ImgD.style.border="1px solid #333333"; 
 }
}

//图片按比例缩放#4
function DrawImaged(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){ 
  ImgD.height=iheight; 
  ImgD.width=(image.width*iheight)/image.height; 
  } 
 else{ 
  ImgD.width=iwidth; 
  ImgD.height=(image.height*iwidth)/image.width;   
 }
 }

}
function DrawImagee(ImgD,iwidth,iheight){ 
 var image=new Image(); 
// var iwidth = 120;  //定义允许图片宽度 
// var iheight = 180;  //定义允许图片高度
 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; 
  } 
  } 
 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.style.border=0; 
}


//图片按比例缩放#5
function DrawImages(i,ImgD,iwidth,iheight){

 var image=new Image(); 
 image.src=ImgD.src; 
 if(image.width>=iwidth && image.height>=iheight){ 
 flag=true;
 if(image.width/image.height>= iwidth/iheight){ 
  ImgD.height=iheight; 
  ImgD.width=(image.width*iheight)/image.height;
  document.getElementById("im"+i).style.left=-1*(ImgD.width-iwidth)/2;
//  document.getElementById("im"+i).style.top=-5;
  }
 else{ 
  ImgD.width=iwidth; 
  ImgD.height=(image.height*iwidth)/image.width;
  document.getElementById("im"+i).style.top=-1*(ImgD.height-iheight)/2;
//  document.getElementById("im"+i).style.left=-5;
 }
 }
 //else{errimg()}
}


function DrawImage_s(ImgD,iwidth,iheight){
 var image=new Image(); 
 image.src=ImgD.src; 
 if(image.width>iwidth || image.height>iheight){ 
 if(image.width/image.height>= iwidth/iheight){ 
  ImgD.height=iheight; 
  ImgD.width=(image.width*iheight)/image.height;
  document.getElementById("im").style.left=-1*(ImgD.width-iwidth)/2;
  document.getElementById("im").style.top=-5;
  }
 else{ 
  ImgD.width=iwidth; 
  ImgD.height=(image.height*iwidth)/image.width;
  document.getElementById("im").style.top=-1*Math.floor((ImgD.height-iheight)/2);
  document.getElementById("im").style.left=-5;
 }
 }
 //else{errimg()}
 //alert(document.getElementById("im").style.top);
}

function checkimgW(t,s){
 var image=new Image(); 
 image.src=t.src; 
 if(image.width>0 && image.height>0){ 
 flag=true;
  if(image.width>s)t.width=s;
  else
  t.width=image.width;
  t.style.border="1px solid #663300";
  t.vspace=8;
  t.hspace=2;
}
}


//网站收藏
function bookmarkit(){
window.external.addFavorite('http://www.easiyo.cn/','易极优-中国大陆地区官方站')
}

function showflash(w,h,u){
var str="<OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width="+w+" height="+h+"><PARAM NAME=movie VALUE='"+u+"'><PARAM NAME=quality VALUE=high><param name='wmode' value='transparent'><embed src='"+u+"' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width="+w+" height="+h+" menu='false' wmode='transparent'></embed></OBJECT>";
document.write (str);
}


function openwin( url, width, height)  
{ 
xposition=0; yposition=0; 
if ((parseInt(navigator.appVersion) >= 4 )) 
{ 
xposition = (screen.width - width) / 2; 
yposition = (screen.height - height) / 2; 
} 
theproperty= "width=" + width + ","  
+ "height=" + height + ","  
+ "location=0,"  
+ "menubar=0," 
+ "resizable=1," 
+ "scrollbars=0," 
+ "status=0,"  
+ "titlebar=0," 
+ "toolbar=0," 
+ "hotkeys=0," 
+ "screenx=" + xposition + "," //仅适用于Netscape 
+ "screeny=" + yposition + "," //仅适用于Netscape 
+ "left=" + xposition + "," //IE 
+ "top=" + yposition; //IE  
window.open( url,"ydjmsg",theproperty ); 
} 
