/*
* Title : TabControl
* Author : SeeGuitar
* Date : 2011-5-4
*/
function scrollDoor(){}
scrollDoor.prototype = {
	listTab : function(menus,divs,openClass,closeClass,ontype){
	var _this = this;
	if(menus.length != divs.length){
		alert("The number of Tabs are diffdrent from the Divs' !");
		return false;
	}
	for(var i = 0 ; i < menus.length ; i++){
		_this.$(menus[i]).value = i;
		if(ontype=='onclick'){
			_this.$(menus[i]).onclick = function(){
				for(var j = 0 ; j < menus.length ; j++){
					_this.$(menus[j]).className = closeClass;
					_this.$(divs[j]).style.display = "none";
				}
				_this.$(menus[this.value]).className = openClass;
				_this.$(divs[this.value]).style.display = "block";
			}
		}
		else{
			_this.$(menus[i]).onmouseover = function(){
				for(var j = 0 ; j < menus.length ; j++){
					_this.$(menus[j]).className = closeClass;
					_this.$(divs[j]).style.display = "none";
				}
				_this.$(menus[this.value]).className = openClass;
				_this.$(divs[this.value]).style.display = "block";
			}
		} // end if
	} //end for
	},
	$ : function(oid){
		if(typeof(oid) == "string")
			return document.getElementById(oid);
		return oid;
	}
}
