var url = location.href;
var paraStr = url.substring(url.indexOf("?")+1,url.length); 

if(paraStr != domain){
	location.href = domain;
}

JCalendar.onclick = function(year, month, date) {
	var date = year + "-" + month + "-" + date;
	location.href = "ms/eventList.php?date="+date;
}

function switchTab(o){//选项卡鼠标划动
	var children = $(o).down(0).childElements();//获取对象class='hd'的子类
	var children1 = $(o).next(0).childElements()//获取class=''bd'对象的子类
	children.each(function(node,index){
		node.observe('mouseover', function(){
			if(!node.hasClassName('selected')){//如果不存在‘selected’样式名
				node.addClassName('selected').siblings().each(function(node1){//当前对象加样式selected，它的兄弟结点移除样式selected
					node1.removeClassName('selected');
				})
			};
			
			children1[index].show().siblings().each(function(node1){//当前ul对象show，它的兄弟结点hide
				node1.hide();
			})
			
		}.bind(this))
	})
}
