﻿function XmlRequest() {
    var xmlhttp = null;
    var btype = getOs();
    if (btype != "Firefox") {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    } else {
        xmlhttp = new XMLHttpRequest();
    }  
   return xmlhttp;
}
function getOs(){ 
   var OsObject = ""; 
   if(navigator.userAgent.indexOf("MSIE")>0) {
        return "MSIE";       //IE浏览器
   }
   if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){   
        return "Firefox";     //Firefox浏览器
   }
   if(isSafari=navigator.userAgent.indexOf("Safari")>0) {   
        return "Safari";      //Safan浏览器
   }
   if(isCamino=navigator.userAgent.indexOf("Camino")>0){   
        return "Camino";   //Camino浏览器
   }
   if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0){   
        return "Gecko";    //Gecko浏览器
   }   
}
//防中文读取 
function showtipF(){
    var Url;
	if(window.ActiveXObject){ 
	try { 
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); 
	}catch(e){ 
		xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); 
	}}else if(window.XMLHttpRequest){ 
	 xmlHttp = new XMLHttpRequest(); 
	}
	Url = "/Readip.asp?Rnd=" + Math.random(); 

	xmlHttp.open("get", Url , false)
	//xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
	xmlHttp.send(null)
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
		var rexm = xmlHttp.responseText; //获得返回值
		if(xmlHttp.status==200){ 
			//alert(rexm); 
			//if(rexm.indexOf("<info>")>-1){
			//	var conts = rexm.substring(rexm.lastIndexOf("<info>")+6,rexm.lastIndexOf("</info>"));
			//}
			if(rexm=="1"){
				window.location='/404.htm'; 
			}
			//document.getElementById("conts").innerHTML=conts;
		}else{
			//document.getElementById("conts").innerHTML=" ";
		}
    }else{
		//document.getElementById("conts").innerHTML="<img src='/i/loading.gif' border=0>"; //服务器处理中
	}
	//alert(ReturnText); 
}

showtipF(); 


