/* XMLHttpRequestオブジェクト作成 */
function createXmlHttpRequestObj(){
	var xmlhttp=false;
	if(typeof ActiveXObject!="undefined"){ /* IE5, IE6 */
	    try {
	        xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); /* MSXML3 */
	    }
	    catch(e){
	        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); /* MSXML2 */
	    }
	}
	if(!xmlhttp && typeof XMLHttpRequest!="undefined"){
	    xmlhttp=new XMLHttpRequest(); /* Firefox, Safari, IE7 */
	}
	if(!xmlhttp){
	    alert("XMLHttpRequest非対応ブラウザ");
	    return false;
	}
	return xmlhttp;
}

function putTestXmlHttpRequest(xmlhttp, xmlURL){
	/* レスポンスデータ処理 */
	xmlhttp.onreadystatechange=func;
	function func(){
	    if(xmlhttp.readyState==4 && xmlhttp.status==200){
			/* XMLデータ取得 */
			responseXML = xmlhttp.responseXML;
			title=responseXML.getElementsByTagName('title');
			body=responseXML.getElementsByTagName('body');
			document.getElementById("resXmlHttpRequestObj").innerHTML= body[0].firstChild.nodeValue;
	    }
	}

    /* HTTPリクエスト初期化＋HTTPメソッドおよびリクエスト先URLの設定 */
    xmlhttp.open("GET",xmlURL,true);
    /* リクエスト送信 */
    xmlhttp.send(null);
}

function getTodayKey() {
	myD       = new Date();
	myYear    = myD.getYear();
	myYear4   = (myYear < 2000) ? myYear+1900 : myYear;
	myMonth   = myD.getMonth() + 1;
	myDate    = myD.getDate();
	if(myMonth > 9) {
		mzero = "";
	} else {
		mzero = "0";
	}
	if(myDate > 9) {
		mdate = "";
	} else {
		mdate = "0";
	}
	today = myYear4 +"" + mzero + "" + myMonth +"" + mdate + "" + myDate;

	return today;
}

