//AIR-ERV page plugins
// 2010-08-24 Copyright netank.cn
// http://www.netank.cn

//Universal Module

//$ = function(elid) { return  eval(document.getElementById(elid)); }
//function $(){return document.getElementById?document.getElementById(arguments[0]):eval(arguments[0]);}

//end 


//menu plugins

function menuEffect(status,obj){
	var strdiv;
	var strheight;
	var bore=obj.getElementsByTagName("dl").length;
	if (bore>0){
	strdiv=obj.getElementsByTagName("dl").item(0);
	strheight=strdiv.clientHeight;
	}
	var strclass=obj.className;
	if (status=="show"){
	//strdiv.style.height=strheight+"px";
	if (bore>0){strdiv.style.display="block";}
	//window.setInterval(menusub,10);
	if (strclass=="current"){}else{obj.className='on'} 
	//menusub();
	}
	if (status=="hidden"){
	if (bore>0){strdiv.style.display="none";}	
	if (strclass=="current"){}else{obj.className=''}
	}
	
var nw=0;
function menusub(){
	//alert(strheight);
	if (nw<strheight){	
	strdiv.style.height=nw+"px";
	nw=nw+2;
	}else{	
	strdiv.style.height=strheight+"px";
	nw=0;
	window.clearInterval(menusub);
	}
	}
}
function menusubStatus(obj){
	var strdiv=obj.getElementsByTagName("div").item(0);
	var stra=obj.getElementsByTagName("a").item(0);
	stra.className="on"
	strdiv.className="show";
	}
function menusubStatus_hidden(obj){
	var strdiv=obj.getElementsByTagName("div").item(0);
	var stra=obj.getElementsByTagName("a").item(0);
	alert(obj)
	stra.className=""
	strdiv.className="";
	}

//index sidaber
function sidaber(status){
	if(status=='part'){document.getElementById('sidaber').style.height=196+'px';}
	if(status=='all'){document.getElementById('sidaber').style.height=300+'px';}
}
	
//index news
function tab(num){
	var strlength=document.getElementById("tab_title").getElementsByTagName("a").length;
	for(var i=0;i<strlength;i++){
		document.getElementById("tab_title").getElementsByTagName("a").item(i).className="";
		document.getElementById("box"+i).style.display="none";
	}
	document.getElementById("tab_title").getElementsByTagName("a").item(num).className="cursor";
	document.getElementById("box"+num).style.display="block";
}

