function ri5Vote(id,rate){
	lsXmlHttp = window.open("RI5Vote/ri5voteset.php?task=vote&user_rating="+rate+"&cid="+id, "Popup", "height=10,width=10,status=no,toolbar=no,menubar=no,location=no");	
	self.focus();
	var div = document.getElementById('ri5vote'+id);
	div.innerHTML='<img src="RI5Vote/images/loading.gif" border="0" align="absmiddle" /> '+ri5vote_lang['UPDATING'];
  }

function ri5VoteUpd(response,id,total,newcount){
	var div = document.getElementById('ri5vote'+id);
	setTimeout(function(){ 
			if(response==1) div.innerHTML=ri5vote_lang['THANKS'];
			else div.innerHTML=ri5vote_lang['ALREADY_VOTE'];
		  },500);
	setTimeout(function(){
			if(newcount!=1)	div.innerHTML='('+(newcount)+' '+ri5vote_lang['VOTES']+')';
			else div.innerHTML='('+(newcount)+' '+ri5vote_lang['VOTE']+')';
			var percentage = (total/newcount)*20;
			document.getElementById('rating'+id).style.width=percentage+'%';
			},2000);
	lsXmlHttp.close(); 
  }
