	//---------------------------------------------------------------------------------//
	//------[              			Les allumes du jazz ©   	   		        ]------//
	//------[WebDevelopment	=> Viper ::	jerome.brisbois@libertysurf.fr			]------//
	//------[WebDeveloper	=> ::. yemo - yemoslash@yahoo.fr ::.	 	        ]------//
	//---------------------------------------------------------------------------------//


// Sors le site de toutes frames qui pourrait lui causer nuisance
//if(self!=top)top.location=self.location;

// Aller à l'URL indiquée
function go(URL){	window.location = URL} // END

// Aller à la page mère
function f_mere(URL){alert("fmere");	opener.location = URL} // END

// Time et redir
function time_redir(URL,time){	alert("timeredir"); setTimeout("go('"+URL+"')", time)} //END

// Retour en arrière
function retour(){	history.go(-1)} // END

// Ouverture d'une popup
function popup(URL,nom,option){	window.open(URL,nom,option+",copyhistory=no,screenX=0 screenY=0,top=0 left=0")} // END


function test(){	alert("jjljljlj");}
// Menu de redirection
function menu_redir(targ,selObj,restore){
  	eval(targ+".location = '"+selObj.options[selObj.selectedIndex].value+"'");
  	if(restore)selObj.selectedIndex = 0;
} // END

// Chargement des images
function load() {
if (document.images) {
   this.length=load.arguments.length;
   for (var i=0;i<this.length;i++) {
   	   this[i+1]=new Image();
	   this[i+1].src=load.arguments[i];
       }
   }
}// END

// Vérification des champs d'un formulaire
function trouve_objet(n, d){
	var p,i,x;
	if(!d)d = document;
	if((p = n.indexOf("?")) > 0 && parent.frames.length){
		d = parent.frames[n.substring(p+1)].document;
		n = n.substring(0,p);
	}
	if(!(x = d[n]) && d.all)x = d.all[n];
	for(i=0;!x && i<d.forms.length;i++)x = d.forms[i][n];
	for(i=0;!x && d.layers && i<d.layers.length;i++)x = trouve_objet(n,d.layers[i].document);
	return x;
}

function verif_form(){
/*
	Fr Patched by Nikko 2K (WebMaster@serveur.net) to set focus on last error
	Email Patched by JBViper 2K1 (jerome@timbrefrancais.com)
*/
	var i,p,q,r,nm,test,num,min,max,champ,errors = '',args = verif_form.arguments;
	for(i=0;i<(args.length-2); i+=3){
		test = args[i+2];
		val = trouve_objet(args[i]);
		if(val){
			nm = val.name;
			if((val = val.value) != ""){
				if(test.indexOf('isEmail') != -1){
					p = val.indexOf('@');
					r = val.indexOf('.');
					if(p < 1 || p == (val.length-1)){
						errors += '- le champ '+nm+' doit contenir une adresse mail.\n';
						champ = nm;
					}else if(r < 1 || r == (val.length-1)){
						errors += '- le champ '+nm+' doit contenir une adresse mail.\n';
						champ = nm;
					}
				}else if(test != 'R'){
					num = parseFloat(val);
					if(val != ''+num){
						errors += '- le champ '+nm+' doit contenir un nombre.\n';
						champ = nm;
					}
					if(test.indexOf('inRange') != -1){
						p = test.indexOf(':');
						min = test.substring(8,p);
						max = test.substring(p + 1);
						if(num < min || max < num){
							errors += '- '+nm+' doit contenir un nombre entre '+min+' et '+max+'.\n';
							champ = nm;
						}
					}
				}
			}else if(test.charAt(0) == 'R'){
				errors += '- le champ '+nm+' est requis.\n';
				champ = nm;
			}
		}
	} 
	if(errors){
		alert('L(es) erreur(s) suivante(s) est(sont) apparue(s) :\n'+errors);
		trouve_objet(champ).focus();
	}
	document.erreur = (errors == '');
} // END

// Impression
function imprimer(URL){
	alert(URL);
	if(window.name == "imprimer"){
		self.print();
	}else{
		popup('/print.php?'+URL,'imprimer','width=555,height=500,scrollbars,resizable=no');
	}
} // END





