// top menu

// ��ʾ�Ӳ˵�
function openTopDiv(divId, entity) {
/*
	entity.style.backgroundColor = "#3479B7";
	document.getElementById(divId).style.display = "block";
	document.getElementById(divId).style.zindex = "999";
*/
}

// �����Ӳ˵�
function hideTopDiv(divId, entity) {
/*
	entity.style.backgroundColor = "#72A7D9";
	document.getElementById(divId).style.display = "none";
	document.getElementById(divId).style.zindex = "1";
*/
}
// ��ʾ�Ӳ˵�
function openTopDiv_1(entity) {
	entity.style.backgroundColor = "#3479B7";
}

// �����Ӳ˵�
function hideTopDiv_1(entity) {
	entity.style.backgroundColor = "#72A7D9";
}

// top select
function selectLink(targ, selectObj, restore) {
	eval(targ + ".location='" + selectObj.options[selectObj.selectedIndex].value + "'");
	if (restore) {
		selectObj.selectedIndex = 0;
	}
}
//iframe change
function iframeLoad(entity,path,title){
	
	$(".menu-list").removeClass("InformationList_selected");
	$(".menu-list").addClass("InformationList");
	
	$(entity).parents(".menu-list").removeClass("InformationList");
	$(entity).parents(".menu-list").addClass("InformationList_selected");
	
	var iframeStr = "<iframe id='iframeLoadId' scrolling='no' width='100%' frameborder='0' src='";
	iframeStr += path + "'></iframe>";
	//middle instead with iframe
	$('.jsIdentifyClass').html(iframeStr);
	
	$('.page_position a:last').attr("href","#");
	$('.page_position a:last').text(title);
	
	//iframe's height auto and siteList change
	$("#iframeLoadId").load(function(){
		var h = $(this).contents().find("body").height();
		$(this).height(h+30);
		$(parent.document).contents().find("#iframeLoadId").height(h+30+150);
		
		
	});
}
function showTab(m,n,p,cla_sel,cla_nosel){
	var menu = document.getElementById(p).getElementsByTagName("li");
	for(i=0;i<menu.length;i++){
		menu[i].className = (i+1)==n?cla_sel:cla_nosel;
		var showdiv = document.getElementById("" + m + (i + 1));
		if( n == i + 1 ){
			showdiv.style.display = "block";
		} else {
			showdiv.style.display = "none";
		}
	}
}