﻿function AjaxLoad(url) {
    // branch for native XMLHttpRequest object   

	if (window.XMLHttpRequest) {    				
		req = new XMLHttpRequest();	
		//req.onreadystatechange = processReqChange;
		req.ContentType="text/xml";
        req.open("GET", url, false);		
        req.send(null);
       	return req.responseText;
    // branch for IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
		isIE = true;
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
			try
			{
			var XmlHttp = new ActiveXObject("Msxml2.XMLHTTP")
			 XmlHttp.Open( "Get", url, false );
			 XmlHttp.Send();
            return XmlHttp.responseText;
			}
			catch(ex)
			{;}
        }
    }
}
//读取广告Js地址
function XMLoad(_url)
        {
            var url = "Noname2.xml";
            String.prototype.Trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); }
            var xmlDoc;
            var moz = (typeof document.implementation != 'undefined') && (typeof document.implementation.createDocument != 'undefined');
            var ie = (typeof window.ActiveXObject != 'undefined');

            if (moz) {
              xmlDoc = document.implementation.createDocument("", "doc", null);

            } else if (ie) {
              xmlDoc = new ActiveXObject("MSXML2.DOMDocument.3.0");
              xmlDoc.async = false;
              while(xmlDoc.readyState != 4) {};
            }
 
            xmlDoc.load(_url);

            if (moz) {
            var Data = xmlDoc.getElementsByTagName("Data ")[0];
            var _Location= zip.getElementsByTagName("Location")[0].firstChild.nodeValue;
            return _Location;} 
            else if (ie) {
            var _Location= xmlDoc.selectSingleNode("/Data/Location").text;
            return _Location;}   
        }
