function ratestar_over(num) {
	for(var i=1;i<=num;i++) {
		$('rs'+i).src="/img/star.gif";		
	}
	for(var i=5;i>num;i--) {
		$('rs'+i).src="/img/star_grey.gif";		
	}
}
function ratestar_out(num) {
	$('rs1').src='/img/star_grey.gif';
	$('rs2').src='/img/star_grey.gif';
	$('rs3').src='/img/star_grey.gif';
	$('rs4').src='/img/star_grey.gif';
	$('rs5').src='/img/star_grey.gif';
}

function RateCore() {
	this.currentPage = Object();
	this.ident ='';
	
	this.Rate = function(id,rating) {	
		 var data = new Object();	 
		 data['id'] = id;
		 data['rating'] = rating;
		 data['action'] = 'rating';
		 data['widget'] = 'articlespage';

		 this.InitializeRequest('POST', '/ajax.php');
         this.Commit(postquery(data));	
	}
	
	this.OnSuccess = function()
      {
      	//alert(this.GetResponseText());
      	eval(this.GetResponseText());
      	// fade(0,"form_"+this.ident);
      	// $("loading_"+this.ident).style.display = 'none';
      }
}

RateCore.prototype = new ajax();
Rate = new RateCore();