﻿var txt = "";
txt += "<div style=\"width:100%;height:100%;display:none;background-color:black;z-index:1;left:0px;top:0px;position:absolute;-moz-opacity:0.5;\" id=\"mengban\"></div>"
txt +="<div style=\"width:600px;display:none;-moz-opacity:0.8; background-color:#F9DCBA;margin:0px auto;z-index:1001;position:absolute;left:20%;top:20%;line-height:30px;overflow:hidden;\" id=\"viewchinaclass\">";
txt += "<p align=center style=\"color:white;font-weight:bold;height:30px;width:100%;margin:0px;line-height:30px;background:url(/images/chinaChannelbg.bmp) repeat-x;\">中国网栏目</p>"
txt += "<p align=center><a href=\"http://www.china.com.cn\" target=\"_blank\">首页</a> | <a href=\"http://www.china.com.cn/news/node_5704011.htm\" target=\"_blank\">新闻</a> | <a href=\"http://www.china.com.cn/news/node_6267344.htm\" target=\"_blank\" class=\"yf\">观察</a> | <a href=\"http://www.china.com.cn/news/edu/node_7065263.htm\" target=\"_blank\" class=\"yf\">教育</a> | <a href=\"http://www.china.com.cn/news/law/node_7065256.htm\" target=\"_blank\" class=\"yf\">法治</a> | <a href=\"http://www.china.com.cn/economic/node_5001716.htm\" target=\"_blank\">财经</a> | <a href=\"http://www.china.com.cn/sport/node_5069983.htm\" target=\"_blank\">体育</a> | <a href=\"http://www.china.com.cn/culture/node_5001718.htm\" target=\"_blank\">文化</a> | <a href=\"http://www.china.com.cn/bbs\" target=\"_blank\">论坛</a> | <a href=\"http://www.china.com.cn/zhibo/node_7030498.htm\" target=\"_blank\">直播</a> | <a href=\"http://www.china.com.cn/gonghui/node_7026218.htm\" target=\"_blank\">工会</a> | <a href=\"http://invest.china.cn\" target=\"_blank\">投资</a> | <a href=\"http://house.china.com.cn\" target=\"_blank\">地产</a> | <a href=\"http://home.china.com.cn/\" target=\"_blank\">风采中国</a></p>";

txt +="<p align=center><a href=\"http://www.china.com.cn/info/\" target=\"_blank\">优讯</a> | <a href=\"http://www.china.com.cn/policy/node_5001713.htm\" target=\"_blank\">政策</a> | <a href=\"http://www.china.com.cn/news/comment/node_7065229.htm\" target=\"_blank\" class=\"yf\">评论</a> | <a href=\"http://www.china.com.cn/news/tech/node_7065257.htm\" target=\"_blank\" class=\"yf\">科技</a> | <a href=\"http://www.china.com.cn/news/tw/node_7065252.htm\" target=\"_blank\" class=\"yf\">台湾</a> | <a href=\"http://www.china.com.cn/international/node_5001715.htm\" target=\"_blank\">国际</a> | <a href=\"http://www.china.com.cn/travel/node_5001722.htm\" target=\"_blank\">旅游</a> | <a href=\"http://art.china.cn\" target=\"_blank\">艺术</a> | <a href=\"http://blog.china.com.cn/\" target=\"_blank\">博客</a> | <a href=\"http://www.china.com.cn/fangtan/node_7021614.htm\" target=\"_blank\">访谈</a> | <a href=\"http://www.china.com.cn/renkou/node_7048748.htm\" target=\"_blank\">人口</a> | <a href=\"http://y.china.com.cn/\" target=\"_blank\">阳光</a> | <a href=\"http://www.119.cn/\" target=\"_blank\">消防</a> | <a href=\"http://www.cnlive.com/\" target=\"_blank\">视讯中国</a></p>";

txt += "<p align=center><a href=\"http://www.china.com.cn/aboutchina/node_6175014.htm\" target=\"_blank\">国情</a> | <a href=\"http://www.china.com.cn/photo/node_6183095.htm\" target=\"_blank\">图片</a> | <a href=\"http://www.china.com.cn/zhuanti2009/node_7060602.htm\" target=\"_blank\" class=\"yf\">专题</a> | <a href=\"http://www.china.com.cn/news/env/node_7065258.htm\" target=\"_blank\" class=\"yf\">环境</a> | <a href=\"http://www.china.com.cn/news/local/node_7065251.htm\" target=\"_blank\" class=\"yf\">地方</a> | <a href=\"http://www.china.com.cn/military/node_5036192.htm\" target=\"_blank\">军事</a> | <a href=\"http://www.china.com.cn/health/node_5066872.htm\" target=\"_blank\">健康</a> | <a href=\"http://www.china.com.cn/book/node_5001723.htm\" target=\"_blank\">读书</a> | <a href=\"http://mag.china.com.cn/\" target=\"_blank\">杂志</a> | <a href=\"http://www.china.com.cn/v/\" target=\"_blank\">视频</a> | <a href=\"http://www.chinajtjy.org.cn\" target=\"_blank\">家教</a> | <a href=\"http://dianda.china.com.cn/\" target=\"_blank\">电大</a> | <a href=\"http://union.china.com.cn/\" target=\"_blank\">联盟</a> | <a href=\"http://cn.china.cn/\" target=\"_blank\">供 应 商</a></p>";
txt +="<p align=center style=\"font-weight:bold;\"><a href=\"#\" onclick=\"hiddenClassChina()\">关闭本窗口</a></p>"
txt+="</div>";
document.write(txt);
var displaynode = document.getElementById("viewchinaclass");
var mengban = document.getElementById("mengban");
var chinalinks = displaynode.getElementsByTagName("a");
var chinaInterval = "";
var istepleft,isteptop,istepwidth,istepheight;
for(var i = 0 ; i < chinalinks.length ; i++){
	chinalinks[i].onclick = function(){
		hiddenClassChina();
	}
}
function popClassChina(event){
	var s_left = event.clientX;
	var s_top = event.clientY;
	var e_left = (document.body.offsetWidth - 500) / 2 ;
	var e_top = 300;
	mengban.style.display = "";
	if(isIE()){
		mengban.style.filter = "progid:DXImageTransform.Microsoft.Alpha(enabled=true, opacity=20, finishopacity=50, style=1, startx=0, finishx=0, starty=0, finishy=0)";
		displaynode.style.filter = "progid:DXImageTransform.Microsoft.Alpha(enabled=true, opacity=90, finishopacity=50, style=1, startx=0, finishx=0, starty=0, finishy=0)";
	}
	
	displaynode.style.left = e_left;
	displaynode.style.left = e_top;
	displaynode.style.width = 600 + "px";
	displaynode.style.height = 0 + "px";
	displaynode.style.border = "5px solid #D98E34";
	displaynode.style.display = "block";
	istepleft = s_left;
	isteptop = s_top;
	istepwidth = 1;
	istepheight = 0;
	//if(!isIE()){
	//	displaynode.style.height = 200 + "px";
	//}else{
		chinaInterval = window.setInterval("showHidden("+s_left+","+s_top+","+e_left+","+e_top+")", 1);
	//}
}
function showHidden(s_left,s_top,e_left,e_top){
	if(istepheight == 200){
		window.clearInterval(chinaInterval);
	}
	if(istepheight < 200)
		istepheight = istepheight +10;
	displaynode.style.height = istepheight + "px";
	
}
function hiddenClassChina(){
	displaynode.style.display = "none";
	mengban.style.display = "none";
}
function showmz56(event){
	var mainnavdiv = document.getElementById("mainnav");
	if(document.getElementById("showmz56pop") != null){
		if(isIE()){
			mainnavdiv.lastChild.removeNode(true);
			//mainnavdiv.lastChild.removeAttribute("id");
			mainnavdiv.removeChild(mainnavdiv.lastChild);
			mainnavdiv.lastChild.removeNode(true);
			//mainnavdiv.lastChild.removeAttribute("id");
			mainnavdiv.removeChild(mainnavdiv.lastChild);
			return false;
		}else{
			if(document.getElementById("showmz56pop").style.display != "none")
				document.getElementById("showmz56pop").style.display = "none";
			else
				document.getElementById("showmz56pop").style.display = "block";
			return false;
		}
	}
	var Url="/minzu.xml";
	var xmldom=createXMLDOM(); 
	if(isIE()){
		
		xmldom.async=false;
		xmldom.onreadystatechange= function(){
			var txt56="";
				if(xmldom.readyState==4){
				  var bi=xmldom.documentElement.selectNodes("mz56");
					  if(bi!=null&&bi.length>0){
						   for(var i=0;i<bi.length;i++){
								
								   txt56 += "<a href=\""+bi[i].childNodes[1].text+"\">";
								   txt56 += bi[i].childNodes[0].text;
								   txt56 += "</a>";
								   if((i+1)%14 == 0)
										txt56+="<br />";
						   }
					  }
					 
				 }
			//alert(document.getElementById("pop56mz"));
			
				var oNewNode = document.createElement("DIV");
				oNewNode.style.backgroundColor = "#F9DFBA";
				oNewNode.style.clear = "both";
				oNewNode.setAttribute("id","showmz56pop");
				oNewNode.style.marginBottom = 2+"px";
				//oNewNode.style.color = "white";
				oNewNode.style.lineHeight = 18 + "px";
				oNewNode.innerHTML=txt56;
				mainnavdiv.appendChild(oNewNode);
				
		}
		xmldom.load(Url);
	}else{
		xmldom.open("GET", Url, false);
		xmldom.send(null);
		var htmlcols = xmldom.responseXML.getElementsByTagName("mz56");
		var txt56="";
		for(var i=0;i<htmlcols.length;i++){
							   
		   txt56 += "<a href=\""+htmlcols[i].getElementsByTagName("url")[0].childNodes[0].nodeValue+"\">";
		   txt56 += htmlcols[i].getElementsByTagName("name")[0].childNodes[0].nodeValue;
		   txt56 += "</a>";
		}
		var oNewNode = document.createElement("DIV");
		oNewNode.style.backgroundColor = "#F9DFBA";
		oNewNode.style.clear = "both";
		oNewNode.setAttribute("id","showmz56pop");
		oNewNode.style.marginBottom = 2+"px";
		oNewNode.style.lineHeight = 18 + "px";
		oNewNode.innerHTML=txt56;
		mainnavdiv.appendChild(oNewNode);
		document.getElementById("showmz56pop").style.display = "block";
	}
}
