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.blog_ban = new httpXml;
httpXml.prototype.blog_background = new httpXml;
httpXml.prototype.blog_marquee = new httpXml;
httpXml.prototype.blog_NewDaily = new httpXml;
httpXml.prototype.blog_category = new httpXml;
httpXml.prototype.blog_Tag = new httpXml;
httpXml.prototype.blog_Total = new httpXml;
httpXml.prototype.blog_BaseData = new httpXml;
httpXml.prototype.blog_icon = new httpXml;
httpXml.prototype.blog_guest = new httpXml;
httpXml.prototype.blog_club = new httpXml;
httpXml.prototype.blog_friend = new httpXml;
httpXml.prototype.blog_dialy = new httpXml;
httpXml.prototype.link_calender = new httpXml;
httpXml.prototype.blog_exodus = new httpXml;
httpXml.prototype.blog_exodus_user = new httpXml;
httpXml.prototype.blog_exodus_Reply = new httpXml;
httpXml.prototype.blog_dialy_Content = new httpXml;
httpXml.prototype.blog_dialy_Reply = new httpXml;
httpXml.prototype.blog_dialy_ReReply = new httpXml;
httpXml.prototype.blog_dialy_Del = new httpXml;
httpXml.prototype.blog_dialyTaglist = new httpXml;
httpXml.prototype.blog_dialyCalendarlist = new httpXml;
httpXml.prototype.blog_check = new httpXml;
httpXml.prototype.blog_CheckBad = new httpXml;
httpXml.prototype.blog_addstyle = new httpXml; 			//新增修改自由版型
httpXml.prototype.blog_addtouch = new httpXml; 		//修改寬窄版
httpXml.prototype.blog_cssstyle = new httpXml; 
httpXml.prototype.blog_Scroll = new httpXml; 
httpXml.prototype.ShowASupload = new httpXml;
httpXml.prototype.blog_message1 = new httpXml; 
httpXml.prototype.blog_message2 = new httpXml; 
httpXml.prototype.blog_message3 = new httpXml; 
httpXml.prototype.blog_message4 = new httpXml; 
httpXml.prototype.blog_message5 = new httpXml; 
httpXml.prototype.blog_message6 = new httpXml;
httpXml.prototype.blog_message7 = new httpXml; 
httpXml.prototype.blog_message8 = new httpXml; 
httpXml.prototype.blog_message9 = new httpXml; 
httpXml.prototype.blog_message10 = new httpXml;
httpXml.prototype.blog_style_data = new httpXml; //判斷寬窄版顯示隱藏
httpXml.prototype.blog_messageCount = new httpXml;
httpXml.prototype.blog_work_AD = new httpXml;
httpXml.prototype.blog_top_echo = new httpXml;
httpXml.prototype.blog_dialy_edit = new httpXml;
//httpXml.prototype.blog_echo_list = new httpXml;
//httpXml.prototype.blog_echo_top_player = new httpXml;
//httpXml.prototype.blog_echo_senddata = new httpXml;
//httpXml.prototype.blog_echo_playerCash = new httpXml;
//httpXml.prototype.blog_echo_playerCash = new httpXml;
httpXml.prototype.blog_top_random = new httpXml;
httpXml.prototype.livly_gamelist_link = new httpXml;
httpXml.prototype.livly_writcookies_link = new httpXml;
httpXml.prototype.livly_login_log = new httpXml;
myAjxa = new httpXml;


