// JavaScript Document
function initialize(){
	try {
		xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP");
	} catch(e) {
		xmlHttp2=new XMLHttpRequest();
	}

	// Livedoor地震
	var url = 'common/rss2json.php?num=11&url=' + encodeURIComponent('http://weather.livedoor.com/forecast/rss/earthquake.xml');
	xmlHttp2.open('GET', url, true);
	xmlHttp2.onreadystatechange = function(){
		if(xmlHttp2.readyState == 4 && xmlHttp2.status == 200){
			var xmlDoc = xmlHttp2.responseText;
			eval("data=" + xmlDoc);
			if(data){
				var html = '<ul>';
				for(var i = 0; i < data.length; i++) {
					if(data[i].title.substring(0, 6) != '[ PR ]'){
						var buf = data[i].title;
						buf = buf.replace('[ 最大震度 ]', '');
						buf = buf.replace(' [ 震源地 ] ', '／');
						html += '<li><a href="' + data[i].link + '" target="_blank">' + buf + '</a></li>';
					}
				}
				html += '</ul>';
				document.getElementById("earthquake").innerHTML = html;
			}
		}
	}
	xmlHttp2.send('');


	try {
		xmlHttp1=new ActiveXObject("Microsoft.XMLHTTP");
	} catch(e) {
		xmlHttp1=new XMLHttpRequest();
	}

}