var xmlHttp;
var isSuccess ;
function createXMLHttpRequest() {
    var isIE = document.all? true:false;
    //取得http實體
    if(!isIE){ // Mozilla, Safari,...
        xmlHttp = new XMLHttpRequest();
        if (xmlHttp.overrideMimeType) {
            xmlHttp.overrideMimeType('text/xml');
        }
    }else{ // IE
        try {
            // 新版的 IE
            xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
                // 舊版的 IE
                xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
        }
    }
}

function callback(){
    if (xmlHttp.readyState == 4) {
        if (xmlHttp.status == 200){
            var xmlDesc = xmlHttp.responseXML.getElementsByTagName("root")[0].firstChild.data ;
            isSuccess = xmlDesc ;
        }
    }
}

function Trim(input) {
    for (var i = input.length; i > 0; i--)
        input = input.replace(/[\s　]+/g, "");
    return input;
}

