//头文件导航部分
/*var oldWLoad = window.onload;
window.onload = function()
{
	if(typeof oldWLoad == 'function')
		oldWLoad();
	var localurl = location.href;
	if(localurl == 'http://www.dns.com.cn')
		{document.getElementById('dh1').className="dh_di2";	}
	if(localurl .indexOf('/domain/') != -1)
		{document.getElementById('dh2').className="dh_di2";	}   
	if(localurl .indexOf('/bizsms_xxmz/') != -1)
		{document.getElementById('dh3').className="dh_di2";}   
	if(localurl .indexOf('/mail/') != -1)
		{document.getElementById('dh4').className="dh_di2";	}   
	if(localurl .indexOf('/host/') != -1)
		{document.getElementById('dh5').className="dh_di2";	}   
	if(localurl .indexOf('/bizsms_hdpt/') != -1)
		{document.getElementById('dh6').className="dh_di2";	}
	if(localurl .indexOf('Help/price') != -1)
		{document.getElementById('dh7').className="dh_di2";	}   
	if(localurl .indexOf('Help/help') != -1)
		{document.getElementById('dh8').className="dh_di2";	}  
	if(localurl .indexOf('Help/sitemap') != -1)
		{document.getElementById('dh9').className="dh_di2";	}
}
*/

//tab菜单功能
function showDiv(obj,num,len)
{
 for(var id = 1;id<=len;id++)
 {
  var setID=obj+id;
  var setnavID=obj+"nav"+id;
  if(id==num){
	document.getElementById(setID).style.display="block";
	document.getElementById(setnavID).className="active";
  }else{
	document.getElementById(setID).style.display="none";
	document.getElementById(setnavID).className="";
  }
 }  
}

//产品弹出信息
jq_wang=$;
function showLayer(img)
{
	var product = img.parentNode.parentNode;
	var details = document.getElementById("details");
	var divY = document.documentElement.scrollTop + (document.documentElement.clientHeight - 274)/2;
	var ajax = new XMLHttpRequest();
    if(ajax){
        ajax.onreadystatechange = function(){
            if(ajax.readyState == 4){
	            var xmlDetail = ajax.responseXML.getElementsByTagName("detail");
				var details = document.getElementById("details");
				var product = img.parentNode.parentNode;
				for(var i = 0; i < xmlDetail.length; i++)
				{
					if(xmlDetail[i].getAttribute("id") == product.id)
					{
						for(var j = 0; j < xmlDetail[i].childNodes.length; j++){
							if(xmlDetail[i].childNodes[j].nodeType == 4){
								details.innerHTML = "";
								details.innerHTML = xmlDetail[i].childNodes[j].data;
							}
						}
					}
				}
           }
        }
        ajax.open("GET","/templates/member/host/internet.xml",true);
        ajax.send("");
    }
	//details.setAttribute("style","top:"+ divY +"px;left:50%");
	details.style.top = divY + "px";
	details.style.left = (document.documentElement.clientWidth - 553)/2 + "px";
	
	//details.style.display = "block";
	jq_wang("#details").show("normal");
}
function closeLayer()
{
	var details = document.getElementById("details");
	details.innerHTML = "";
	//details.style.display = "none";
	jq_wang("#details").hide("normal");
}
function GotoOtherSite(sleId)
{
	ToSite = document.getElementById(sleId).value;

	window.open('http://'+ToSite);

}