var ajaxReqType = "Content-Type";
var ajaxReqHeader = "application/x-www-form-urlencoded";
var ajaxSendType = "POST";
httpXml = function() {
    this.msXml = true;
    this.XML = null;
    this.onReadyFun = null;
    this.url = null;
    this.sendData = null;
    this.requesType = null;
    this.requestHeader = null;
    this.sendType = null;
	this.sendState=true;
    this.xmlinfo = function(options) {
        //this.setOptions(options)
        this.onReadyFun = options.onReadyFun;
        this.url = options.url;
        //this.options.sendData = options.sendData;
        this.sendData = (options.sendData == '') ? this.sendData : options.sendData;
        this.requesType = (options.requesType == '') ? this.requesType : options.requesType;
        this.requestHeader = (options.requestHeader == '') ? this.requestHeader : options.requestHeader;
        this.sendType = (options.sendData == '') ? this.sendType : options.sendType;
		this.SendState = (options.sendData == '') ? this.sendState : options.sendState;
        if (this.createXML() == false) { return; }

        this.XML.onreadystatechange = this.onReadyFun;
    }

    this.createXML = function() {
        /*if (window.XMLHttpRequest) { // pGiHoXMLHttpRequest
        alert("unwindow xml");
        this.XML = new XMLHttpRequest();  // MozillaBFirefoxBSafari 
        }
        else if (window.ActiveXObject) { // pGiHoActiveXObject
        alert("window xml");
        this.XML = new ActiveXObject("Microsoft.XMLHTTP"); // Internet Explorer
        }
        if (!this.XML) {
        //alert("zs䴩oAjax{\");
        return false;
        }*/
        if (navigator.userAgent.indexOf("Opera") >= 0) {
            this.msXml = false;
            return false;
        }
        else if (navigator.userAgent.indexOf("MSIE") >= 0) {
            /*var strName = "Microsoft.XMLHTTP";
            if (navigator.appVersion.indexOf("MSIE 5.5") < 0) {
            strName = "Msxml2.XMLHTTP";
            }*/
            try {
                this.msXml = true;
                this.XML = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (e) {
                return false;
            }
        }
        else if (navigator.userAgent.indexOf("Mozilla") >= 0) {
            this.XML = new XMLHttpRequest();
            this.msXml = false;
        }
        return true;
    }

    this.linkWeb = function() {
        if (this.XML == null) {
            return;
        }
        this.XML.open(this.sendType, this.url, this.SendState);  // 開啟連結
		//this.XML.open((this.isMsXmlObj() == true)? this.sendType:"GET", this.url, true);  // 開啟連結 火狐用GET
        this.XML.setRequestHeader(this.requesType, this.requestHeader);
		if(this.isMsXmlObj() == true){
        	this.XML.send(this.sendData); 
		}else{
			(this.sendData == null)? this.XML.send(null):this.XML.send(this.sendData); 
		}
		
    }

    this.State = function() {
        if (this.XML.readyState != 4 || this.XML.status != 200) {
            return false;
        }
        return true;
    }

    this.getRes = function() {
        return this.XML.responseText;
    }

    this.isMsXmlObj = function() {//判斷瀏覽器
        return this.msXml;
    }
}
httpXml.prototype.GetHotClub = new httpXml;
httpXml.prototype.LoginAD = new httpXml;
httpXml.prototype.IndexNotice = new httpXml;
httpXml.prototype.G_Recommend = new httpXml;
httpXml.prototype.End_Card = new httpXml;
httpXml.prototype.New_Card = new httpXml;
httpXml.prototype.Blog_AD = new httpXml;
httpXml.prototype.Blog_list = new httpXml;
httpXml.prototype.IndexNotice_list = new httpXml;
httpXml.prototype.IndexNotice_con = new httpXml;
httpXml.prototype.Index_Photo_li = new httpXml;
httpXml.prototype.Index_Photo_data = new httpXml;
httpXml.prototype.Index_video = new httpXml;
httpXml.prototype.Action_IndexAD = new httpXml;
httpXml.prototype.Action_List = new httpXml;
httpXml.prototype.Index_official = new httpXml;
httpXml.prototype.Index_Item = new httpXml;
httpXml.prototype.Index_login = new httpXml;
httpXml.prototype.Index_login_list = new httpXml;
httpXml.prototype.Index_bonus = new httpXml;
httpXml.prototype.a_list = new httpXml;
httpXml.prototype.search_name = new httpXml;
httpXml.prototype.fash_data = new httpXml;
//httpXml.prototype.R_float = new httpXml;
httpXml.prototype.livly_gamelist_link = new httpXml;
httpXml.prototype.livly_writcookies_link = new httpXml;
httpXml.prototype.livly_login_log = new httpXml;
httpXml.prototype.Gbig_writecookies_link = new httpXml;
httpXml.prototype.Gbig_cookiescheck_link = new httpXml;
myAjxa = new httpXml;


