function $t(){}
$t.prototype = {
	$do : function(menus,divs,openClass,closeClass){
		var _this = this;
		if(menus.length != divs.length)
		{alert("菜单层数量和内容层数量不一致!");
			return false;}				
		for(var i = 0 ; i < menus.length ; i++)
		{	_this.$(menus[i]).value = i;
		
			_this.$(menus[i]).onmouseover = function(){
				for(var j = 0 ; j < menus.length ; j++)
				{	_this.$(menus[j]).className = closeClass[j];
					_this.$(divs[j]).style.display = "none";}
					
				_this.$(menus[this.value]).className = openClass[this.value];
				
				_this.$(divs[this.value]).style.display = "block";				
			}}},
	$ : function(oid){	if(typeof(oid) == "string")
		return document.getElementById(oid);
		return oid;	}
		}				

window.onload = function(){
	var $tabs = new $t();
	$tabs.$do(["sydwa1","sydwa2"],["sydwb1","sydwb2"],["stbq1","stbq1"],["stbq2","stbq2"]);
	$tabs.$do(["zxa1","zxa2"],["zxb1","zxb2"],["stbq1","stbq1"],["stbq2","stbq2"]);


}