function home_settabs(tabsid,tabscontentid){
	MM_findObj("tabs_1").className = "tabs_title_off";
	MM_findObj("tabs_2").className = "tabs_title_off";
	MM_findObj("tabs_3").className = "tabs_title_off";
	MM_findObj(tabsid).className = "tabs_title_on";
	hide("tabs_content_1");
	hide("tabs_content_2");
	hide("tabs_content_3");
	show(tabscontentid);
}
function show(objname) {
  MM_findObj(objname).style.display = "";
}

function hide(objname) {
  MM_findObj(objname).style.display = "none";
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function ShowPicNews(news_id, news_pic, news_tip, news_title, arrow){
	//显示对应的箭头
	hide("arrow_1");
	hide("arrow_2");
	hide("arrow_3");
	show(arrow);
	//显示大图
	MM_findObj("bigpic").innerHTML = "<a href='/institute/detail.asp?news_id="+ news_id +"' target='_blank'><img src='"+ news_pic +"' alt='"+ news_title +"' width='360' height='240' hspace='5' vspace='5' class='img_border' /></a>";
	//显示文字
	MM_findObj("pictxt").innerHTML = "<a href='/institute/detail.asp?news_id="+ news_id +"' target='_blank' class='institute_headline'>"+ news_title +"</a><br /><span class='institute_headline_tip'>"+ news_tip +"</span> <a href='/institute/detail.asp?news_id="+ news_id +"' target='_blank' class='nav'>[详细]</a>"
}

function  AutosizeImage(ImgD,maxwidth,maxheight){  
	 var image=new Image();
	 image.src=ImgD.src;
     if(image.width>0  &&  image.height>0){  
       flag=true;  
       if(image.width/image.height >= maxwidth/maxheight){  
         if(image.width > maxwidth){      
         ImgD.width=maxwidth;  
         ImgD.height=(image.height*maxwidth)/image.width;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }
         }  
       else{  
         if(image.height>maxheight){      
         ImgD.height=maxheight;  
         ImgD.width=(image.width*maxheight)/image.height;            
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         }  
       }  
}   