// XMLHttpRequest オブジェクト 取得
function GetXHRObj() {
    var xmlhttp = false;
    if(typeof ActiveXObject != "undefined"){
        try {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) {
            xmlhttp = false;
        }
    }
    if(!xmlhttp && typeof XMLHttpRequest != "undefined") {
        xmlhttp = new XMLHttpRequest();
    }
    return xmlhttp
}

// トリム関数（Stringオブジェクトの関数として定義）
String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g, "");
}

// 現在読込中 表示
function NowLoadingStart(idName) {
    $("#"+idName).empty();
    $("#"+idName).append($("<img>").attr("class", "NowLoading").attr("src", "image/NowLoading.gif"));
}

// 現在読込中 非表示
function NowLoadingEnd(idName) {
    $("#"+idName).empty();
}

// URLエンコード
function URLencode(str)
{
    return encodeURIComponent(str).replace(/\+/g,"%2B").replace(/\//g,"%2F");
}

