	// -----------------------------------------------------------------------
	// NAVIGATEUR
	var NS4 = (document.layers) ? 1 : 0;
	var NS6 = (document.getElementById) ? 1 : 0;
	var IE4 = (document.all) ? 1 : 0;

	// -----------------------------------------------------------------------
	// OUVERTURE DE POP UP
	function openWindow(url, name, w, h, r, s, m,left, top) {
		popupWin = window.open(url, name, 'width=' + w + ',height=' + h + ',resizable=' + r + ',scrollbars=' + s + ',menubar=' + m + ',left=' + left + ',top=' + top);
	}

	// -----------------------------------------------------------------------
	// OUVERTURE DE POP UP
	function seeImage(url, w, h) {
		percent=0;
		if(w>screen.availWidth){
			nw=screen.availWidth-100;
			percent=100*nw/w;
			nh=percent*h/100;
		}else{
			nw=w;
			nh=h;
		}
		if((h>screen.availHeight && percent==0) || (nh>screen.availHeight)){
			nh=screen.availHeight-100;
			percent=100*nh/h;
			nw=percent*w/100;
		}else{
			nw=w;
			nh=h;
		}		popupWin = window.open('popup.php?img='+url, 'image', 'width=' + nw + ',height=' + nh + ',resizable=no,scrollbars=no,menubar=no,left=0,top=0');
	}

	// -----------------------------------------------------------------------
	// VALIDATION D'UN EMAIL
	function checkMail(MAIL){
		var x = MAIL;
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(x)) {
			return false;
		}else{
			return true;
		}
	}
	
	function seeme(div){
		if (NS4) { 
			modMC = document[div];
		}else if (NS6) { 
			modMC = document.getElementById(div).style;
		}else if (IE4) { 
			modMC = [div].style;
		}
		if (modMC.display=="block"){
			modMC.display="none";
		}else{
		modMC.display="block";
		}
	}

	function changeDisplay(div, displayStyle){
		if (NS4) { 
			modMC = document[div];
		}else if (NS6) { 
			modMC = document.getElementById(div).style;
		}else if (IE4) { 
			modMC = [div].style;
		}
		modMC.display=displayStyle;
	}

	function addCount(){
		if (document.forms.addform.prenom.value=="" || document.forms.addform.nom.value=="" || document.forms.addform.adresse.value=="" || document.forms.addform.codepostal.value=="" || document.forms.addform.ville.value=="" || document.forms.addform.telephone.value=="" || document.forms.addform.email.value=="" || document.forms.addform.motdepasse.value=="") { 
			alert('Vous devez compléter tous les champs.\n Merci');
		}else if (checkMail(document.forms.addform.email.value)){
			alert('Le format de votre email n\'est pas valide');
		}else{
			document.forms.addform.submit();
		}
	}