var voteRight;
function vote_titre(value)
{
	if(voteRight)
	{
		var ajx = new Ajax();
		ajx.open('GET',PATH+'/votetitre.php?key='+currentTitleKey+'&v='+(value?'1':'0'),true);
		ajx.send(null);
		vote_setButton(false);
	}

}
function vote_setButton(state)
{
	if(state != undefined)
	{

		var img = document.getElementsByName('voteTitre');
		img[0].className = "voteTitre"+(state?"":"Inactive");
		img[1].className = "voteTitre"+(state?"":"Inactive");
		if(state)
		{
			img[0].onclick = function(){vote_titre(true);}
			img[1].onclick = function(){vote_titre(false);}

		}
		voteRight = state;
	}
	else
	{
		var ajx = new Ajax(function(d,t){vote_setButton((parseInt(t)?true:false))})
		ajx.open('GET',PATH+'/votetitre.php?key='+currentTitleKey+'&test',true);
		ajx.send(null);
	}
}
function owPlayer()
{
	try{
	window.open ('/player.php', 'RadioALbigesPlayer', 'height=240, width=245, toolbar=0, menubar=0, scrollbars=0, resizable=0, status=0');
	}catch(e){alert(e.message)}
}
