﻿// JavaScript template using Windows Script Host
function ajaxLoadFile(){
	httpObj = createXMLHttpRequest(displayData);

	if(httpObj){
		httpObj.open("get","http://www.ntv.co.jp/ricohcup/whats_new/index.html",true);
		httpObj.send(null);
	}
}
function displayData(){
	if((httpObj.readyState==4)&&(httpObj.status==200)){
		document.getElementById("whats_new").innerHTML = httpObj.responseText;
	}
}
	
function createXMLHttpRequest(callbackFunc){
	var XMLhttpObject = null;
	try{
		XMLhttpObject=new XMLHttpRequest();
	}catch(e){
		try{
			XMLhttpObject=new ActiveXObject("Microsoft.XMLHTTP");
		}catch(e){
			return null;
		}
	}
	if(XMLhttpObject)XMLhttpObject.onreadystatechange=callbackFunc;
	return XMLhttpObject;
}
window.onload = function(){
	ajaxLoadFile();
}