// JavaScript Document
var Visuel = {
	
	_change : function (id, bg, txt)
	{
		var cible = document.getElementById('tr-'+id);
		var input = document.getElementById('input-'+id);
	
		if(input.checked==false)
		{
			cible.style.background=bg;
			cible.style.color=txt;

		}
		
	},//_change
	
	
	
	_fixe : function (id, bg, txt, bg2, txt2)
	{
		//var cible = document.getElementById(id);
		var input = document.getElementById('input-'+id);
		var cout = document.getElementById('cout-'+id);

		//on determine si l'input est cochée ou non
		if(input.checked==false)
		{
			

			this._change(id, bg, txt);
			input.checked= true;
			Panier._calculer(cout.innerHTML, 1, id,'non', 'commandite');
			
		}
		else
		{
		
			this._change(id, bg2, txt2);
				input.checked= false;
			Panier._calculer(cout.innerHTML, 0, id,'non', 'commandite');
			
		}
		
		
	},//_fixe
	
	_fixe2 : function (id, bg, txt, bg2, txt2)
	{
		//var cible = document.getElementById(id);
		var input = document.getElementById('input-'+id);
		var cout = document.getElementById('cout-'+id);

		//on determine si l'input est cochée ou non
		if(input.checked==false)
		{
			

			this._change(id, bg, txt);
			input.checked= true;
			Panier._calculer(cout.innerHTML, 1, id,'oui', 'commandite');
			
		}
		else
		{
		
			this._change(id, bg2, txt2);
				input.checked= false;
			Panier._calculer(cout.innerHTML, 0, id,'oui', 'commandite');
			
		}
		
		
	}//_fixe2
	
	
} //Visuelur
