/*
*ÊÊHow to load a feed via the Feeds API.
*/

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

// Our callback function, for when a feed is loaded.
function feedLoaded(result) {
if (!result.error) {
 // Grab the container we will put the results into
    var container = document.getElementById("feed"); 
    container.innerHTML = '';
    // Loop through the feeds, putting the titles onto the page.
    for (var i = 0; i < result.feed.entries.length; i++) {
      var entry = result.feed.entries[i];
      var div = document.createElement("li");
     // div.appendChild(document.createTextNode(entry.content));
      div.innerHTML = entry.content;
      container.appendChild(div);
      }
   }
}

function OnLoad() {
	// Create a feed instance that will grab Flickrs feed.
	var feed = new google.feeds.Feed("http://api.flickr.com/services/feeds/photos_public.gne?id=46975251@N05&lang=en-us&format=rss_200");
	// Calling load sends the request off.ÊÊIt requires a callback function.
	feed.load(feedLoaded);
}

google.setOnLoadCallback(OnLoad);
