/* COORDONNEES PERSO */
function maj_ville(pays, code_postal, destination)
{
	var retour;
	var s = destination;
	
	if(code_postal.length != 5)
	{
		return false;
	}
	
	s.options.length = 0;

	retour = select_nav_get("/boutique/script/option_villes.php?pays=" + pays + "&code_postal=" + code_postal + "&time="+Math.random());

	if(retour != "")
	{
		s.options.length = 0;
		eval(retour);
	}
	else
	{
		s.options.length = 0;
		s.options[s.options.length] = new Option('Veuillez indiquer votre code postal et votre pays', '-1');
	}
}

function search_to_selected(valeur, destination)
{
	var i;
	for(i=0; i < destination.options.length; i++)
	{
		if(destination.options[i].value == valeur)
		{
			destination.selectedIndex = i;
		}
	}
}

function checkPro(valeur_pro, objet_a_modifier)
{
	if (valeur_pro == 1)
	{
		objet_a_modifier.readOnly='';
	}
	else
	{
		objet_a_modifier.value='';
		objet_a_modifier.readOnly='readonly';
	}
}


function update_span(doc, value)
{

		if(value == "ch")
			doc.getElementById('nom_code').innerHTML = "NPA * :";
		if(value == "be")
			doc.getElementById('nom_code').innerHTML = "Numéro postal * :";
		if(value == "fr")
			doc.getElementById('nom_code').innerHTML = "Code Postal * :";
}
/* fin coordonnees perso */

function add_cookie_in_form(valeur, formulaire)
{
	formulaire.accepter_cookie = valeur; 
}