<!--
// Variables naviagteur
var CMIns4=(document.layers)? true:false;
var CMIie4=(document.all)? true:false;
var CMIns6=(!document.all && document.getElementById)? true:false;
// Vérification du formulaire d'envoi
function verifForm(formName,champs,btn) {
	leTableau=eval("new Array("+"\""+champs.replace(/,/gi,"\",\"")+"\""+");");
	var err=0;
	for (var x=0;x<(leTableau.length);x++) {
		if (err==0 && isNaN(leTableau[x])) {
			if (eval("CheckEntry(document."+formName+",'"+leTableau[x]+"',"+leTableau[x+1]+")")) {
			} else {
				err=1;
			}
		}
	}
	if (err==0) {
		if (btn!=0) {
			Hide(btn);
			eval("Show(\""+btn+"Attente\");");
			//eval(btn+"attente_on=new Image();");
			//eval(btn+"attente_on.src=\"../img/attente.gif\";");
			//setTimeout("imgAttente.src=attente_on.src",200);
		}
		eval("document."+formName+".submit()");
	}
}
function Show(id) {
	if (CMIns4) document.layers[id].visibility="show";
	if (CMIie4) document.all[id].style.visibility="visible";
	if (CMIns6) document.getElementById(id).style.visibility="visible";
}
function Hide(id) {
	if (CMIns4) document.layers[id].visibility="hide";
	if (CMIie4) document.all[id].style.visibility="hidden";
	if (CMIns6) document.getElementById(id).style.visibility="hidden";
}
/*ROLLOVERS*/
function rollo(type,imgName,etat) {
	if (type==0) { //bouton detail
		if (etat==1) {
			eval("document."+imgName+".src=bt_detail_b.src;")
		}
		if (etat==0) {
			eval("document."+imgName+".src=bt_detail_a.src;")
		}
	}
	if (type==1) { //bouton page d'accueil + img
		if (etat==1) {
			eval("document.bt_"+imgName+".src=bt_"+imgName+"_b.src;");
			eval("document.img_quefaire.src=img_"+imgName+".src;");
		}
		if (etat==0) {
			eval("document.bt_"+imgName+".src=bt_"+imgName+"_a.src;");
			document.img_quefaire.src=img_quefaire_a.src;
		}
	}
	if (type==2) { //boutons
		if (etat==1) {
			eval("document."+imgName+".src="+imgName+"_b.src;")
		}
		if (etat==0) {
			eval("document."+imgName+".src="+imgName+"_a.src;")
		}
	}
	return true;
}
/*IMPRIMER LA PAGE*/
function printPage() {
	var url=document.location.href;
	if (url.indexOf('?')!=-1) {
		url=url.replace('?','-o-intero-o-')
	}
	if (url.indexOf('&')!=-1) {
		var compteur=1;
		var test=0;
		 while(url.indexOf('&')!=-1 && test!=1) {
			url=url.replace('&','-o-et-o-');
			if (url.indexOf('&')==-1) {
				test=1;
			} 
			compteur++;
		 }
	}
	var url='popup_print.cfm?page='+url;
	var nom="imprime";
	var largeur=680;
	var hauteur=400;
	var top=(screen.height-hauteur)/2;
	var left=(screen.width-largeur)/2;
	window.open(url,nom,"top="+top+",left="+left+",width="+largeur+",height="+hauteur+",toolbar=yes,resizable=yes,menubar=no,scrollbars=yes,status=no,location=no")
}

// Changer de champs automatiquement
function autotablead(original,destination) {
	if (original.getAttribute&&original.value.length==original.getAttribute("maxlength"))
	destination.focus()
}

// Vérification du formulaire d'envoi
function verifForm(formName,champs,btn) {
	leTableau=eval("new Array("+"\""+champs.replace(/,/gi,"\",\"")+"\""+");");
	var err=0;
	for (var x=0;x<(leTableau.length);x++) {
		if (err==0 && isNaN(leTableau[x])) {
			if (eval("CheckEntry(document."+formName+",'"+leTableau[x]+"',"+leTableau[x+1]+")")) {
			} else {
				err=1;
			}
		}
	}
	if (err==0) {
		if (btn!=0) {
			Hide(btn);
			eval("Show(\""+btn+"Attente\");");
			//eval(btn+"attente_on=new Image();");
			//eval(btn+"attente_on.src=\"../img/attente.gif\";");
			//setTimeout("imgAttente.src=attente_on.src",200);
		}
		eval("document."+formName+".submit()");
	}
}

//Changement auto de champs
function autotablead(original,destination) {
	if (original.getAttribute&&original.value.length==original.getAttribute("maxlength"))
	destination.focus()
}
//Compter et limiter le nb de caractères d'un champs
function countInput(val,nb) {
	if (val.value.length>=nb) {
		val.value=val.value.substring(0,nb);
		val.focus();
	}
}
//Uppercase d'un champs
function upperCase(val,nb) {
	if (nb==0) {
		val.value=val.value.toUpperCase();
		val.focus();
	} else {
		if (val.value.length==1) {
			var string=val.value;
			var frst=string.substring(0,1);
			frst=frst.toUpperCase();
			string=frst+string.substring(1,val.value.length);
			val.value=string;
		}
	}
}
//-->