<!-- 
// (c)1999-2003 Live365, Inc.  All rights reserved.

function DrawRatingStars(total, count, path, mini, site, lang, type)
{
	var alt_en = new Array(
		"Not Applicable",
		"n/a",
		"Poor",
		"So so",
		"Below average",
		"Average",
		"Above average",
		"Good",
		"Quite good",
		"Very good",
		"Excellent",
		"Exceptional!"
	);

	var alt_sp = new Array(
		"No aplica",
		"n/a",
		"Poor",
		"Mediocre",
		"No muy buena",
		"Satisfactoria",
		"Algo buena",
		"Buena",
		"Sobresaliente",
		"Muy buena",
		"Excelente",
		"Excepcional!"
	);

	if (DrawRatingStars.arguments.length < 6 || DrawRatingStars.arguments[5] == "") 
		lang = 'en';
	
	if (DrawRatingStars.arguments.length < 7 || DrawRatingStars.arguments[6] == "") 
		type = 'station';
	
	var rating;
	var image;
	var alt = (lang == "sp") ? alt_sp : alt_en; 
	var height = (mini) ? 12 : 9;
	
	if (path && path != "")
		image = path;
	else if (DrawRatingStars.arguments.length < 5 || DrawRatingStars.arguments[4] == "") 
		image = "/images/";
	else
		image = '/scp/' + site + '/images/';

	if (count > 0)
		rating = total/count;
	else
		rating = 0;

	var count_msg = (type == 'station') ? ' (' + count + ' vote' + ((count != 1) ? 's' : '') + ')' : ' (' + rating + ')';
	
	if (rating == 0) {
		if (mini)
			document.write('<img src="' + image + 'n-a.gif" width="45" height="' + height + '" alt="'+ alt[0] +'">');			
		else 
			document.write(alt[1]);
	}
	else if (rating <= 1.5)
		document.write('<img src="' + image + 'star0-5.gif" width="45" height="' + height + '" alt="'+ alt[2] + count_msg + '">');
	else if (rating <= 2.5)
		document.write('<img src="' + image + 'star1-0.gif" width="45" height="' + height + '" alt="'+ alt[3] + count_msg + '">');
	else if (rating <= 3.5)
		document.write('<img src="' + image + 'star1-5.gif" width="45" height="' + height + '" alt="'+ alt[4] + count_msg + '">');
	else if (rating <= 4.5)
		document.write('<img src="' + image + 'star2-0.gif" width="45" height="' + height + '" alt="'+ alt[5] + count_msg + '">');
	else if (rating <= 5.5)
		document.write('<img src="' + image + 'star2-5.gif" width="45" height="' + height + '" alt="'+ alt[6] + count_msg + '">');
	else if (rating <= 6.5)
		document.write('<img src="' + image + 'star3-0.gif" width="45" height="' + height + '" alt="'+ alt[7] + count_msg + '">');
	else if (rating <= 7.5)
		document.write('<img src="' + image + 'star3-5.gif" width="45" height="' + height + '" alt="'+ alt[8] + count_msg + '">');
	else if (rating <= 8.5)
		document.write('<img src="' + image + 'star4-0.gif" width="45" height="' + height + '" alt="'+ alt[8] + count_msg + '">');
	else if (rating <= 9.5)
 		document.write('<img src="' + image + 'star4-5.gif" width="45" height="' + height + '" alt="'+ alt[9] + count_msg + '">');
	else
		document.write('<img src="' + image + 'star5-0.gif" width="45" height="' + height + '" alt="'+ alt[10]+ count_msg + '">');
}


function DrawListenerStars(TLH, site)
{
	var image;
	var hours = "hours";

	if (DrawListenerStars.arguments.length < 2 || DrawListenerStars.arguments[1] == "") 
		image = "/images/";
	else
		image = '/scp/' + site + '/images/';

	if (TLH <= 9) {
		image += "listener1";

		if (TLH == 1)
			hours = "hour";
	}
	else if (TLH <= 99)
		image += "listener2";
	else if (TLH <= 999)
		image += "listener3";
	else if (TLH <= 9999)
		image += "listener4";
	else
		image += "listener5";

	document.write('<img src="' + image + '.gif" width="45" height="14" alt="' + TLH + ' total listening ' + hours + ' in the last 30 days">');
}

// -->