
rvg_rating_imagepath = 'http://juiceit.blubrry.com/themes/blubrry/images/rating/';
rvg_rating_url = 'http://www.blubrry.com/metspodcast/4025/new-york-mets-podcast-18/';
rvg_rating_status = '0';
rvg_rating = 0;

// rating system:

function RVG_RatingHTML(rating, imgPath ) // , guid, status)
{
	var guid = 0, str = '', status = 0;
	if( RVG_RatingHTML.arguments.length > 2 )
		guid = RVG_RatingHTML.arguments[2];
	if( RVG_RatingHTML.arguments.length > 3 )
		status = RVG_RatingHTML.arguments[3];

	if( guid != -1 ) // Native Blubrry juice it click
	{
		if( !isNaN(guid) ) // IF it is a number, lets set it to an empty string
			guid = '';
		
		str = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
		if( rating )
		{
			str += "<tr><td width=\"45\" height=\"45\" align=\"center\" valign=\"middle\" style=\"background-image: url("+imgPath+"rating.gif); background-repeat: no-repeat;background-position: center center;\">";
			str += "<span style=\"font-size: 14px; font-family: Geneva, Arial, Helvetica, sans-serif; font-weight: bold; color: #003366\">"+rating+"</span>";
			str += "</td></tr>";
			if( status == 0 )
				str += "<tr><td align=\"center\" valign=\"middle\"><a href=\""+guid+"?R=1\" title=\"Click to rate this eipsode.\"><img alt=\"Click to rate this eipsode.\" style=\"border:0;\" src=\""+imgPath+"rate.gif\" border=0 /></a></td></tr>";
			else
				str += "<tr><td align=\"center\" valign=\"middle\"><a href=\""+guid+"?UR=1\" title=\"Click to unrate this eipsode.\"><img alt=\"Click to unrate this eipsode.\" style=\"border:0;\" src=\""+imgPath+"unrate.gif\" border=0 /></a></td></tr>";
		}
		else
		{
			str += "<tr><td><a href=\""+guid+"?R=1\" title=\"Click to rate this eipsode.\"><img alt=\"Click to rate this eipsode.\" style=\"border:0;\" src=\""+imgPath+"norating.gif\" border=0 /></a></td></tr>";
		}
		
		str += "</table>";
	}
	else // Offsite Rating, navigate them to the guid to rate
	{
			str = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
			str += "<td width=\"45\" height=\"45\" align=\"center\" valign=\"middle\"><a href=\""+status+"\" title=\"Visit Blubrry.com\"><img alt=\"Visit Blubrry.com\" style=\"border:0;\" src=\""+imgPath+"gotorateit.gif\" border=0 /></a></td>";
			str += "</tr></table>";
			str += "</table>";
	}
	
	return str;
}

// Lets add this juice it to the page!
if( rvg_rating != 'undefined' && rvg_rating_imagepath && rvg_rating_url && rvg_rating_status != 'undefined' )
{
	if( rvg_rating_counter )
		rvg_rating_counter++;
	else
		var rvg_rating_counter = 1;

	rvg_rating_div = 'rvg_rating'+rvg_rating_counter;
	document.write('<div id="'+rvg_rating_div+'"></div>');
	var temp = document.getElementById(rvg_rating_div);
	if( temp )
		temp.innerHTML = RVG_RatingHTML(rvg_rating, rvg_rating_imagepath, rvg_rating_url, rvg_rating_status);
}