var now_date = new Date();
var cache_date = now_date.getYear() + now_date.getMonth()+ now_date.getDate() + now_date.getHours();

function getBlog() {
	var filename = "press_release/index.xml";
	xmlhttp = createXMLHttp();
	if (xmlhttp) {
		xmlhttp.onreadystatechange = check_press;
		xmlhttp.open("GET", filename, true);
		xmlhttp.send(null);
	}
}

function check_press() {
	if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
		xmlDoc = xmlhttp.responseXML;
		nodeDate = xmlDoc.getElementsByTagName("date");
		nodeTitle = xmlDoc.getElementsByTagName("title");
		nodeLink = xmlDoc.getElementsByTagName("link");
		result = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
		for (var i=0; i<nodeDate.length; i++){
			var dateName = nodeDate[i].childNodes[0].data;
			var titleName = nodeTitle[i].childNodes[0].data;
			var linkName = nodeLink[i].childNodes[0].data;
			if(i != 0){
				result += "<tr>";
				result += "<td nowrap=\"nowrap\">■"+dateName+"</td>";
				result += "<td><a href=\""+linkName+"\">"+titleName+"</a></td>";
			  	result += "</tr>";
			}else{
				result += "<tr>";
				result += "<td nowrap=\"nowrap\">■"+dateName+"</td>";
				result += "<td><a href=\""+linkName+"\">"+titleName+"</a>　<img src=\"common/image/top/new.gif\" align=\"baseline\" /></td>";
			  	result += "</tr>";
			}
		}
		result += "</table>";
		document.getElementById("loadPress").innerHTML = result;
	}
}

function createXMLHttp() {
	try {
		return new ActiveXObject ("Microsoft.XMLHTTP");
	}catch(e){
		try {
			return new XMLHttpRequest();
		}catch(e) {
			return null;
		}
	}
	return null;
}

window.onload = getBlog;
