
var currentRating = -1;
function ratingsOverdl(id, rating, text) 
{
	star_obj = document["stars_" + id];
	
	if (rating > 0) {
	star_obj.src="../images/icon-orange" + rating + ".gif";
	if  (rating == 1) { getratetxt("<div class=\"main_text\"><strong>1 star:</strong>" + text + "</div>"); }
	if  (rating == 2) { getratetxt("<div class=\"main_text\"><strong>2 stars:</strong>" + text + "</div>"); }
	if  (rating == 3) { getratetxt("<div class=\"main_text\"><strong>3 stars:</strong>" + text + "</div>"); }
	if  (rating == 4) { getratetxt("<div class=\"main_text\"><strong>4 stars:</strong>" + text + "</div>"); }
	if  (rating == 5) { getratetxt("<div class=\"main_text\"><strong>5 stars:</strong>" + text + "</div>"); }
	} else if (rating == 0) {
	star_obj.src="../images/icon-orange0.gif";
	} else {
	star_obj.src="../images/icon-orange0.gif";
	}
}
function ratingsOutdl (id) 
{
	star_obj = document["stars_" + id];
	if (currentRating == -1) {
	star_obj.src = "../images/icon-orange0.gif";  getratetxt("&nbsp;");
	} else if (currentRating > 0) {
	star_obj.src = "../images/icon-orange" + currentRating + ".gif";
	if  (currentRating == 1) { getratetxt("<div class=\"main_text\"><strong>1 star:</strong> Though it may have some useful functions, this product is unstable, riddled with spyware, or otherwise difficult to use. Download at your own risk.</div>"); }
	if  (currentRating == 2) { getratetxt("<div class=\"main_text\"><strong>2 stars:</strong> This program has major flaws, though it is not completely without merit. I cannot recommend this download unless it is the only one of its kind.</div>"); }
	if  (currentRating == 3) { getratetxt("<div class=\"main_text\"><strong>3 stars:</strong> This is a decent, solid program. It has no major flaws, but it didn&#39;t knock my socks off. There may be similar programs that work better, have more features, or are easier to use.</div>"); }
	if  (currentRating == 4) { getratetxt("<div class=\"main_text\"><strong>4 stars:</strong> Despite a few minor flaws, this program is generally excellent. I recommend this download.</div>"); }
	if  (currentRating == 5) { getratetxt("<div class=\"main_text\"><strong>5 stars:</strong> I can&#39;t recommend this product highly enough.</div>"); }
	} else if (currentRating == 0) {
	star_obj.src = "../images/icon-orange0.gif";   getratetxt("&nbsp;");
	}
	
}
			
function rateObjdl (id, rating) 
{
	setRatingdl(id, rating);
	currentRating = rating;
	//document.submitReview.rating.value=currentRating;
}
function getratetxt(txt) 
{
	//document.getElementById('ratetxt').innerHTML=txt;
}
function setRatingdl(id, score) 
{
  document.getElementById("rating_" + id).value = score;
  document.getElementById("stars_" + id).src = '../images/icon-orange' + score + '.gif';
}	
