function amazon_ranking(id,url,category_title,position){
	var id = id;
	var url = url;
	var category_title = category_title;
	var position = position;
	
	document.getElementById(position).innerHTML = category_title;
	
	
	google.load("feeds", "1");

	function initialize() {
		var feedurl = url;

		var feed = new google.feeds.Feed(feedurl);
		feed.setNumEntries(5);
		feed.load(dispfeed);

		function dispfeed(result){
			if (!result.error){
				var container = document.getElementById(id);
				var htmlstr = '<table>';

				for (var i = 0; i < result.feed.entries.length; i++) {
					var entry = result.feed.entries[i];
					var img_info_array = get_feed_info(entry);
					htmlstr +='<tr><td class = "adjustment">'
					
					if(img_info_array != null){
						htmlstr += '<a target="_blank" href="' + entry.link + '" ><img class="amazon_img" src="' + img_info_array[1] + '" alt="' + img_info_array[2] + '" border="0" hspace="0" vspace="0"></a><br />';
					} else {
						htmlstr += '<a target="_blank" href="' + entry.link + '"><img height = "150px" border="0" hspace="0" src="http://ec1.images-amazon.com/images/G/09/en_JP/nav2/dp/no-image-no-ciu.gif"></a><br />';
					}
					htmlstr += '<a href="' + entry.link + '" target="_blank">' + entry.title.substring(1) + '</a></td></tr>';
				}
				htmlstr +='</table>';
				container.innerHTML = htmlstr;
			}
		}
	}

	google.setOnLoadCallback(initialize);
	
	function get_feed_info(entry){
	
		var temp = entry;
		var info = "";
		var info_array = "";
		var re = /<img src="(.*jpg)" alt="(.*)" border="0" hspace="0" vspace="0">/;
		
		temp.content = temp.content.replace("SL160","SL180");
		info_array = temp.content.match(re);

		return info_array;
	}
}



