function scrollDoor(){ }
scrollDoor.prototype = {
	sd : function(menus,divs,openClass,closeClass,eve){
		var _this = this;
		if(menus.length != divs.length){
			alert("error!");
			return false;
		}				
		for(var i = 0; i < menus.length; i++){	
			_this.$(menus[i]).v = i;				
			_this.$(menus[i])[eve] = function(){
				for(var j = 0; j < menus.length; j++){						
					_this.$(menus[j]).className = closeClass;
					_this.$(divs[j]).style.display = "none";
				}
				_this.$(menus[this.v]).className = openClass;	
				_this.$(divs[this.v]).style.display = "block";
				return false;				
			}
		}
		},
	$ : function(oid){
		if(typeof(oid) == "string")
		return document.getElementById(oid);
		return oid;
	}
}
window.onload = function(){
	var SDmodel = new scrollDoor();
	SDmodel.sd(["tab1","tab2"],["info1","info2"],"on","","onmouseover");
}
