// JavaScript Document

    /*
    *  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("blogfeed");
        container.innerHTML = '';
    
        // Loop through the feeds, putting the titles onto the page.
        // Check out the result object for a list of properties returned in each entry.
        // http://code.google.com/apis/ajaxfeeds/documentation/reference.html#JSON
        for (var i = 0; i < result.feed.entries.length; i++) {
          var entry=result.feed.entries[i];
          var content=entry.content;
          var title=entry.title;
          var div=document.createElement("div");
          div.className='blogpost';
          var div2=document.createElement("div");
          var html='<p class="posttitle">'+title.link(entry.link)+'</p>';
          div2.innerHTML=html+content;
          div.appendChild(div2);
          container.appendChild(div);
        }
      }
    }
    
    function OnLoad() {
      // Create a feed instance that will grab the feed.
      var feed = new google.feeds.Feed("http://www.insureinfoblog.com/atom.xml");
      feed.setNumEntries(4);
      // Calling load sends the request off.  It requires a callback function.
      feed.load(feedLoaded);
    }
    
    google.setOnLoadCallback(OnLoad);

