/**
 ** Bibliothèques des fonctions javascript supplémentaires.
 ** Insérer ici vos fonctions ou références à des fonctions
 ** Javascript. Le framework s'occupera de les inclure.
 **/

/**
 ** Fonction de gestion des formulaires
 **/
var msg1 = 'Votre saisie n\'est pas valide pour ';
var lechamp = 'le champ ';
var leschamps = 'les champs ';

function submitFormulaire() {
	var myform = document.formulaire;
	var ok = true;
	if ( myform.ot_demande.value.replace(/^\s+/g, '').replace(/\s+$/g, '') == '' ) {
		ok = false;
		myform.ot_demande.focus();
	}
	if ( myform.os_100_email.value.replace(/^\s+/g, '').replace(/\s+$/g, '') == '' ) {
		ok = false;
		myform.os_100_email.focus();
	}
	if ( myform.os_100_Votreprenom.value.replace(/^\s+/g, '').replace(/\s+$/g, '') == '' ) {
		ok = false;
		myform.os_100_Votreprenom.focus();
	}
	if ( myform.os_100_Votrenom.value.replace(/^\s+/g, '').replace(/\s+$/g, '') == '' ) {
		ok = false;
		myform.os_100_Votrenom.focus();
	}
	

		
	if ( ok ) {
		document.formulaire.submit();
	} else {
		alert("Les champs obligatoires ne sont pas tous saisis");	
	}
}

//
//-----------------------------------------------------------------
// recode les caractères accentués pour les url
//-----------------------------------------------------------------
//

function rempl_accents_url(theURL)
{
		theURL = theURL.replace(/À/g,"%c0"); 
		theURL = theURL.replace(/Á/g,"%c1"); 
		theURL = theURL.replace(/Â/g,"%c2"); 
		theURL = theURL.replace(/Ã/g,"%c3"); 
		theURL = theURL.replace(/Ä/g,"%c4"); 
		theURL = theURL.replace(/Å/g,"%c5"); 
		theURL = theURL.replace(/Æ/g,"%c6"); 
		theURL = theURL.replace(/Ç/g,"%c7"); 
		theURL = theURL.replace(/È/g,"%c8"); 
		theURL = theURL.replace(/É/g,"%c9"); 
		theURL = theURL.replace(/Ê/g,"%ca"); 
		theURL = theURL.replace(/Ë/g,"%cb"); 
		theURL = theURL.replace(/Ì/g,"%cc"); 
		theURL = theURL.replace(/Í/g,"%cd"); 
		theURL = theURL.replace(/Î/g,"%ce"); 
		theURL = theURL.replace(/Ï/g,"%cf"); 
		theURL = theURL.replace(/Ð/g,"%d0"); 
		theURL = theURL.replace(/Ñ/g,"%d1"); 
		theURL = theURL.replace(/Ò/g,"%d2"); 
		theURL = theURL.replace(/Ó/g,"%d3"); 
		theURL = theURL.replace(/Ô/g,"%d4"); 
		theURL = theURL.replace(/Õ/g,"%d5"); 
		theURL = theURL.replace(/Ö/g,"%d6"); 
		theURL = theURL.replace(/×/g,"%d7"); 
		theURL = theURL.replace(/Ø/g,"%d8"); 
		theURL = theURL.replace(/Ù/g,"%d9"); 
		theURL = theURL.replace(/Ú/g,"%da"); 
		theURL = theURL.replace(/Û/g,"%db"); 
		theURL = theURL.replace(/Ü/g,"%dc"); 
		theURL = theURL.replace(/à/g,"%e0"); 
		theURL = theURL.replace(/á/g,"%e1"); 
		theURL = theURL.replace(/â/g,"%e2"); 
		theURL = theURL.replace(/ã/g,"%e3"); 
		theURL = theURL.replace(/ä/g,"%e4"); 
		theURL = theURL.replace(/å/g,"%e5"); 
		theURL = theURL.replace(/æ/g,"%e6"); 
		theURL = theURL.replace(/ç/g,"%e7"); 
		theURL = theURL.replace(/è/g,"%e8"); 
		theURL = theURL.replace(/é/g,"%e9"); 
		theURL = theURL.replace(/ê/g,"%eA"); 
		theURL = theURL.replace(/ë/g,"%eb"); 
		theURL = theURL.replace(/ì/g,"%ec"); 
		theURL = theURL.replace(/í/g,"%ed"); 
		theURL = theURL.replace(/î/g,"%ee"); 
		theURL = theURL.replace(/ï/g,"%ef"); 
		theURL = theURL.replace(/ð/g,"%f0"); 
		theURL = theURL.replace(/ñ/g,"%f1"); 
		theURL = theURL.replace(/ò/g,"%f2"); 
		theURL = theURL.replace(/ó/g,"%f3"); 
		theURL = theURL.replace(/ô/g,"%f4"); 
		theURL = theURL.replace(/õ/g,"%f5"); 
		theURL = theURL.replace(/ö/g,"%f6"); 
		theURL = theURL.replace(/ù/g,"%f9"); 
		theURL = theURL.replace(/ú/g,"%fa"); 
		theURL = theURL.replace(/û/g,"%fb"); 
		theURL = theURL.replace(/ü/g,"%fc"); 

return theURL;
}