    google.load("feeds", "1");

function initialize() {
  var feedurl = "http://kagawataxi.soreccha.jp/index_c4640.rdf";
  var feed = new google.feeds.Feed(feedurl);
  feed.setNumEntries(7);
  feed.load(dispfeed);

  function dispfeed(result){
    if (!result.error){
      var container = document.getElementById("feed");
      var htmlstr = "";
//      htmlstr += '<h2><a href="' + result.feed.link + '">' + result.feed.title + '</a></h2>';
//      htmlstr += "<p>説明:" + result.feed.description + "</p>";
//      htmlstr += "<p>作成者:" + result.feed.author + "</p>";

      for (var i = 0; i < result.feed.entries.length; i++) {
        var entry = result.feed.entries[i];

        
//        htmlstr += entry.content;
//        htmlstr += "<p>" + entry.contentSnippet + "</p>";
//        var strdate = createDateString(entry.publishedDate);
//        htmlstr += "(" + strdate + ")";
		  var pdate = new Date(entry.publishedDate);
		  var pyear = pdate.getYear();
		  if(pyear < 2000)pyear +=1900;
		  var pmonth = pdate.getMonth() + 1;
		  var pday = pdate.getDate();
		  htmlstr += "<p>" + pyear + "." + pmonth + "." + pday +"　";
		  htmlstr += '<a href="' + entry.link + '"target="_blank">' + entry.title + '</a>';
//        htmlstr += "<p>[カテゴリ]";
//        for (var j = 0; j < entry.categories.length; j++) {
//          htmlstr += "[" + entry.categories[j] + "]";
//        }
        htmlstr += "</p>";
      }

       container.innerHTML = htmlstr;
    }else{
       alert(result.error.code + ":" + result.error.message);
    }
  }

}

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();
  var strdate = pyear + "年" + pmonth + "月" + pday + "日" + 
              phour + "時" + pminute + "分" + psecond + "秒";

  return strdate;
}

google.setOnLoadCallback(initialize);
