var asauver = false;function set_asauver (true_or_false){	asauver = true_or_false;	/*	var txt = 'false';	if (asauver)	{	txt = 'true';	}	alert('on est dans set asauver avec la valeur ' + txt);	*/}function get_asauver (){	return asauver;}function alert_passauver(){	if (get_asauver ())	{		alert('ATTENTION : Vous n\'avez pas sauvé les modifications !');	}}function conf_asauver(){	var reponse = true;	if (get_asauver ())	{	reponse = confirm('ATTENTION : Vous n\'avez pas sauvé les modifications \n Voulez-vous continuer SANS sauver ?');	if (reponse)		{ 		set_asauver(false);		}	}	return reponse;}function adapter_stock(principal,secondaire_original,secondaire_modifie,dest_principal,dest_secondaire){var new_val = secondaire_modifie.replace(/[^0-9]/g,'');if (new_val == secondaire_modifie){var diff= secondaire_modifie - secondaire_original;principal = principal - diff;document.getElementById(dest_principal).value = principal;document.getElementById('ori' + dest_principal).value = principal;document.getElementById('ori' + dest_secondaire).value = secondaire_modifie;document.getElementById(dest_secondaire).value = secondaire_modifie;set_asauver (true);}else{	aff_msg('ERREUR : La valeur introduite doit être numérique');	document.getElementById(dest_secondaire).value = secondaire_original;}}function refresh_hidden(dest,old_val,new_value){var new_val = new_value.replace(/[^0-9]/g,'');if (new_val == new_value){document.getElementById('ori' + dest).value = new_value;document.getElementById(dest).value = new_value;set_asauver (true);}else{aff_msg('ERREUR : La valeur introduite doit être numérique');document.getElementById(dest).value = old_val;}/*document.getElementById('ori' + dest).value = new_val;document.getElementById(dest).value = old_val;return false;*/}function aff_msg(msg){	alert(msg);}function conf_del(msg){	return confirm('Voulez-vous vraiment supprimer ' + msg + ' ?');}function annul_remises(destination,dest_nb,valeur){	if ((document.forms.formu.annul_remise.checked) )	{		for (i=1; i<=dest_nb; i++) 		{			document.getElementById(destination + i).innerHTML=valeur;		}		document.getElementById("an").className = "petit3";	}	else	{		alert("\t \t \t \t \t ATTENTION \n les ristournes dues aux promotions sont à nouveau accordées au client");		document.getElementById("an").className = "grasrouge";		/*monObjet.className = "nomDuneAutreClasse" ;*/	}	/*document.getElementById("info_montant").innerHTML="(le montant sera recalculé après enregistrement)";*/}function OpenWin(URL,width,height,nom){	window.open(URL,nom,"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height + ",resizable=no");}function OpenWin2(URL,width,height,nom){	window.open(URL,nom,"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height + ",resizable=yes");}function launchPlayer(){	window.open("http://cache.yacast.fr/V4/rtl/rtl_launch_nv.html","RTL","width=468,height=256,toolbar=no,menubar=no,resizable=no,location=no,directories=no,status=no,scrollbars=no,copyhistory=no"); }function OpenPopUp(URL,width,height,nom){	window.open(URL,nom,"toolbar=yes,location=yes ,status=no,menubar=yes,scrollbars=yes,width=" + width + ",height=" + height + ",resizable=yes");}function WinPopUp(valeur)	{		window.open(valeur,'BonneFête','scrollbars=no, toolbar=no, width=420, height=400, resizable=no, left=1, top=0');	}
