function initialize() {
	var feedUrl = [
		"http://blog.livedoor.jp/tasogaresabou/atom.xml",
		"http://blog.livedoor.jp/aph_eigyou/atom.xml",
		"http://blog.livedoor.jp/aph_kouji/atom.xml",
		"http://blog.livedoor.jp/aph_showroom/atom.xml",
		"http://blog.livedoor.jp/aph_reform/atom.xml",
		"http://blog.livedoor.jp/aph_k/atom.xml"
	];
	var containerName = [
		"tasogaresabou",
		"eigyou",
		"kouji",
		"showroom",
		"reform",
		"aph_k"
	];
	for (var j = 0; j < feedUrl.length; j++) {
		(function (j) {
			var feed = new google.feeds.Feed(feedUrl[j]);
			feed.setNumEntries(1);
			feed.load(dispfeed);
			function dispfeed(result){
				if (!result.error) {
					var container = document.getElementById(containerName[j]);
					var htmlstr = "";
					var blogtitle = "";
					for (var i = 0; i < result.feed.entries.length; i++) {
						var entry = result.feed.entries[i];
						htmlstr += '<p>'
						var strdate = createDateString(entry.publishedDate);
						htmlstr += '<span class="size90">'
						htmlstr += strdate ;
						htmlstr += '</span><br />'
						htmlstr += '<a href="' + entry.link + '" target="_blank">' + entry.title + '</a>';
						htmlstr += '</p>'
					}
					htmlstr += '</ul>';
					container.innerHTML = htmlstr;
				}else{
					alert(result.error.code + ":" + result.error.message);
				}
			}
		}) (j);
	}
}

function createDateString(publishedDate){
	var pdate = new Date(publishedDate);
	var pday = pdate.getDate();
	var pmonth = pdate.getMonth() + 1;
	var pyear = pdate.getFullYear();
	var phour = pdate.getHours();
	var pminute = pdate.getMinutes();
	var psecond = pdate.getSeconds();
	if (pmonth < 10) {pmonth = "0" + pmonth;}
	if (pday < 10) {pday = "0" + pday;}
	var strdate = pyear + "年" + pmonth + "月" + pday + "日";
	return strdate;
}

google.setOnLoadCallback(initialize);

