// JavaScript Document
function scrollDoor(){
}
scrollDoor.prototype = {
	sd : 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;
					_this.$(divs[j]).style.display = "none";
				}
				_this.$(menus[this.value]).className = openClass;	
				_this.$(divs[this.value]).style.display = "block";				
			}
		}
		},
	$ : function(oid){
		if(typeof(oid) == "string")
		return document.getElementById(oid);
		return oid;
	}
}
window.onload = function(){
	var SDmodel = new scrollDoor();
	SDmodel.sd(["a01","a02","a03","a04","a05"],["ac01","ac02","ac03","ac04","ac05"],"select","");//头版热门排行选项卡
	SDmodel.sd(["b01","b02","b03"],["bc01","bc02","bc03"],"select","");//女性健康选项卡
	SDmodel.sd(["c01","c02","c03","c04"],["cc01","cc02","cc03","cc04"],"select","");//女性健康热门导读选项卡
	SDmodel.sd(["d01","d02","d03","d04","d05"],["dc01","dc02","dc03","dc04","dc05"],"select","");//美容护肤热门排行选项卡
	SDmodel.sd(["e01","e02","e03","e04","e05","e06","e07","e08"],["ec01","ec02","ec03","ec04","ec05","ec06","ec07","ec08"],"select","");//服饰潮流选项卡
	SDmodel.sd(["f01","f02","f03"],["fc01","fc02","fc03"],"select","");//娱乐八卦选项卡
	SDmodel.sd(["g01","g02","g03"],["gc01","gc02","gc03"],"select","");//娱乐八卦热点选项卡
	SDmodel.sd(["h01","h02","h03"],["hc01","hc02","hc03"],"select","");//友情链接
}