function $(e) {return document.getElementById(e);}

//链接地址
//url:转接的地址
//s：等于0时，转接，等于1时，是新打口一个窗口。
function menu_onclick(url,s){ 
if (s==0){window.location = ""+ url +""; }
else{window.open(""+ url +""); }
}


//搜索铵钮链接
//url:转接的地址
//key:搜索关键字
function search_key(url,key)
{
if (url==''){
	alert("搜索地址不对！");
    return false;
	}
if (key == ''){
 //alert("关键字不能为空！");
 alert("Key word can not be empty！");
 $("key_word").focus()
 return false;
 }
else
{
window.location = url + key; 
}
}




/*多个产品图片切换*/

function objSP_Article() {this.ImgUrl="";}
function SlidePic_Article(_id) {this.ID=_id; this.Width=0;this.Height=0; this.TimeOut=5000; this.Effect=23; this.TitleLen=0; this.PicNum=-1; this.Img=null; this.AllPic=new Array(); this.Add=SlidePic_Article_Add; this.Show=SlidePic_Article_Show; this.LoopShow=SlidePic_Article_LoopShow;}
function SlidePic_Article_Add(_SP) {this.AllPic[this.AllPic.length] = _SP;}
function SlidePic_Article_Show() {
  if(this.AllPic[0] == null) return false;
  document.write("<div align='center'><img id='Img_" + this.ID + "' style='width:" + this.Width + "; height:" + this.Height + "; filter: revealTrans(duration=2,transition=23);' src='javascript:null' border='0'>");
  this.Img = document.getElementById("Img_" + this.ID);
  this.LoopShow();
}
function SlidePic_Article_LoopShow() {
  if(this.PicNum<this.AllPic.length-1) this.PicNum++ ; 
  else this.PicNum=0; 
  this.Img.filters.revealTrans.Transition=this.Effect; 
  this.Img.filters.revealTrans.apply(); 
  this.Img.src=this.AllPic[this.PicNum].ImgUrl;
  this.Img.filters.revealTrans.play();
  this.Img.timer=setTimeout(this.ID+".LoopShow()",this.TimeOut);
}


/*多个产品图片切换结束*/


/*鼠标改变框里的内容*/
function setTab(name,cursel,n)
 {
for(i=1;i<=n;i++)
{
var menu=document.getElementById(name+i);
var con=document.getElementById("con_"+name+"_"+i);
menu.className=i==cursel?"hover":"";
con.style.display=i==cursel?"block":"none";
}
}
/*鼠标改变框里的内容结束*/