google.load("feeds", "1") //Load Google Ajax Feed API (version 1)

var feedlimit=5000
var rssoutput="<b>Hotel Search</b><br /><ul>"
var _contain;
var _width;
function rssfeedsetup(argURL, contain,var_width)
	{
		_contain=contain;
		_width = var_width;
	document.getElementById(_contain).innerHTML="";
	rssoutput="";
	////"http://www.res99.com/hotel/deals/10019480/218/las_vegas_nv_hotels.rss"
	var feedpointer=new google.feeds.Feed(argURL) //Google Feed API method
	feedpointer.setNumEntries(feedlimit) //Google Feed API method
	feedpointer.load(displayfeed) //Google Feed API method
	}

function displayfeed(result)
{
	if (!result.error)
	{
		var thefeeds = result.feed.entries
		rssoutput += "<ul>"
		for (var i = 0; i < thefeeds.length; i++) 
		{

				//alert(i);
				rssoutput += "<li style='height:100%;'>"

			rssoutput += "<div id='boxlistin' style='width:"+ _width +"px;' class='dodatak'>"
			rssoutput += "<h4><a href='" + thefeeds[i].link + "'>" + thefeeds[i].title + "</a></h4>"
			rssoutput += "<p>" + thefeeds[i].content + "</p>"
			rssoutput += "</div>"
			rssoutput += "</li>"
		}
		rssoutput += "</ul>"   	
		//alert(rssoutput);
		document.getElementById(_contain).innerHTML=rssoutput;
		document.getElementById(_contain).style.overflowX="hidden";
		document.getElementById(_contain).style.overflowY="scroll";
	}
	else alert("Error fetching feeds!")
}

defaultStep=30; 
step=defaultStep; 
function scrolldown(id){
document.getElementById(id).scrollTop+=step ;
//timerDown=setTimeout("scrolldown('"+id+"')",2) 
}

function scrollup(id){
document.getElementById(id).scrollTop-=step; 
//timerDown=setTimeout("scrollup('"+id+"')",2) 
}
