google.load("feeds", "1") //Load Google Ajax Feed API (version 1)

function rssdisplayer(divid, url, feedlimit, showoptions) {
	this.showoptions=showoptions || "" //get string of options to show ("date" and/or "description")
	var feedpointer=new google.feeds.Feed(url) //create new instance of Google Ajax Feed API
	feedpointer.setNumEntries(feedlimit) //set number of items to display
	document.write('<div id="'+divid+'">Loading feed...</div>')
	this.feedcontainer=document.getElementById(divid)
	var displayer=this
	feedpointer.load(function(r) { displayer.formatoutput(r) } )  //call Feed.load() to retrieve and output RSS feed
}

rssdisplayer.prototype.formatoutput=function(result) {
if (!result.error) { //if RSS feed successfully fetched

var thedescription=result.feed.description  //get the feed channel description

var thefeeds=result.feed.entries //get all feed entries as a JSON array

for (var i=0; i<thefeeds.length; i++) { //loop through entries
	var itemtitle="<a href=\"" + thefeeds[i].link + "\" style=\"text-decoration: none;\">" + thefeeds[i].title + "</a>"
	var itemdescription=/description/i.test(this.showoptions)? thefeeds[i].content : ""

rssoutput="<table bgcolor=\"#F0F0F0\" width=430 height=75 cellpadding=0 cellspacing=0 border=0><tr><td align=\"center\"><a href=\"http://www.sweptlineregistry.com\" style=\"text-decoration: none;\"><font size=\"+1\"><b>Dodge Sweptline Truck Registry</b></font><br>" + thedescription + " trucks registered<br>Register your Sweptline today!</td><td align=\"right\">" + itemdescription + "<br>" + itemtitle + "</td></tr></table>"

//document.write("<table bgcolor=\"#F0F0F0\" width=430 height=75 cellpadding=0 cellspacing=0 border=0><tr><td align=\"center\"><a //href=\"http://www.sweptlineregistry.com\" style=\"text-decoration: none;\"><font size=\"+1\"><b>Dodge Sweptline Truck Registry</b></font><br>", thedescription, " //trucks registered<br>Register your Sweptline today!</td><td align=\"right\">", itemdescription, "<br>", itemtitle, "</td></tr></table>")
	}
this.feedcontainer.innerHTML=rssoutput 
}
else //else, output error
alert("Error fetching feeds: "+result.error.message)
}