<!--
function popup(adr,nompop,larg,haut,res){window.open(adr,nompop,'width='+larg+',height='+haut+',scrollbars=1,toolbar=0,location=0,status=0,menubar=0,resizable='+res);}
function imgPopup(nomPop,img,fond,txt,css){
   imgPop = window.open("",nomPop,"scrollbars=yes,width=700,height=550");
   imgPop.document.write("<html>\n\n");
   imgPop.document.write("<head><title>Apercu d'image</title></head>\n\n");
   imgPop.document.write("<body bgcolor=\""+fond+"\">\n");
   imgPop.document.write("  <table border=\"0\" cellpadding=\"0\" cellspacing=\"2\" width=\"100%\">\n");
   imgPop.document.write("    <tr><td align=\"center\"><img src=\"ressources/"+img+"\"></td></tr>\n");
   imgPop.document.write("    <tr><td align=\"center\">\n");
   imgPop.document.write("      <table border=\"0\" cellpadding=\"0\" cellspacing=\"2\">\n");
   imgPop.document.write("        <tr><td><span style=\""+css+"\">"+txt+"</span></td></tr>\n");
   imgPop.document.write("      </table>\n");
   imgPop.document.write("    </td></tr>\n");
   imgPop.document.write("  </table>\n");
   imgPop.document.write("</body>\n\n");
   imgPop.document.write("</html>");
}
function Makepop(url,my_l,my_h,my_s,my_status,my_resize,my_name){
	/* Version 1.0 */
	/* Creation Marc alias DMC */
	addPop=window.open(url,my_name,"width="+my_l+",height="+my_h+",scrollbars="+my_s+",toolbar=0,location=0,status="+my_status+",menubar=no,resizable="+my_resize);addPop.focus();
}
function addEvenement(objet, typeEvent, nomFunction, typePropagation){ 
  if (objet.addEventListener) { 
    objet.addEventListener(typeEvent, nomFunction, typePropagation); 
  } else if (objet.attachEvent) { 
  	objet.attachEvent('on' + typeEvent, nomFunction); 
  } 
}

/* ////////////////////////////////////////////// */
/*	Test un ensemble de caract šres                */
/*	@return true ou false                         */
/* ////////////////////////////////////////////// */
function defendu(string) {
if (!string){return false;}

   var iChars = "abcdefghijklmnopqrstuvwxyz@-_.~0123456789";
   for (var i = 0; i < string.length; i++) {
		if (iChars.indexOf(string.charAt(i).toLowerCase()) == -1){
			return false;
		}
   }
   return true;
} 
/* ////////////////////////////////////////////// */
/*	Test l'email                                  */
/*	@return false ou String                       */
/* ////////////////////////////////////////////// */
function is_Email(emails){
	if (emails.indexOf("@") != -1 && emails.indexOf("..")==-1 && defendu(emails)==true){
			var longueur = emails.split("@");
			if((longueur.length==2) && (longueur[0]!="" && longueur[1]!="")){
				var taille=longueur[1].lastIndexOf(".");
				if(taille!=-1){
					if((longueur[1].length-1-taille)==2 || (longueur[1].length-1-taille)==3 ){
						return true;
					}
					return false;
				}
				return false;
			}
			return false;
	}
	return false;		
}

/******************/
/* NEWS FLASH 2.0 */
/******************/

function afficheNewsFlashv2(largeur, hauteur, anim) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+largeur+'" height="'+hauteur+'" id="" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="'+anim+'" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<embed src="'+anim+'" quality="high" wmode="transparent" width="'+largeur+'" height="'+hauteur+'" name="" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
/******************/
/* MOTEUR de RECH */
/******************/
function formulmaire (){	 
	this.champ = ["nom","prenom","email","tel"];
	this.libelle = ["Nom","Prénom","E-mail","Téléphone"];
	this.test =  ["vide","vide","email","vide"];
	this.formulaire = null;
	this.valider = function(){
		var message ="";
		for(var i =0; i <this.champ.length;i++){
			  switch (this.test[i]){ 
				case "vide"  : message += (testchamp(this,this.champ[i])==false)? "- "+this.libelle[i]+"\n" : "" ; break; 
				case "email" : message += (is_Email(this[this.champ[i]].value)==false)? "- "+this.libelle[i]+"\n" : "" ; break; 
				case "site"  : message += (testchamp(this,this.champ[i])==false)? "- "+this.libelle[i]+"\n" : "" ; break; 
				default : ""; 
			  } 
		}
		if(message !=""){
			message = "Veuillez remplir les champs suivant :\n"+message; 
			alert(message);
		}else{
			//this.formulaire.submit();
			return true;
		}
		return false;
	}
	this.init = function (form){
		this.formulaire = document.forms[form];
		for(var i =0; i <this.champ.length;i++){
			this.formulaire[this.champ[i]].onblur = function (){
				var value = this.value;
				if(this.value == "" || this.value==this.defaultValue){
					this.value =this.defaultValue;
				}
			}

			this.formulaire[this.champ[i]].onfocus = function (){
				if(this.value==this.defaultValue){
					this.value="";
				}
			}
			
		}
		this.formulaire["libelle"] = this.libelle;
		this.formulaire["champ"] = this.champ;
		this.formulaire["test"] = this.test;
		this.formulaire.onsubmit = this.valider;
	};
}
var recheche =  new formulmaire();
recheche.champ = ["query"];
recheche.libelle = ["mot de recherche"],
recheche.test = ["vide"];
addEvenement("window", "load", function(){recheche.init("formrechercher");}, false);

function selectlangue(objselect){
 var langue =objselect.value;
 if(langue!="0"){
 	document.location = langue;
 }
}


function connecter() {
	
var objform = document.forms.fidentification;
var login = objform.login.value;
var password = objform.password.value;

if (login == "") {
	alert("Veuiller saisir votre identifiant");
	objform.login.focus();
	return;
}	

if (password == "") {
	alert("Veuiller saisir votre mot de passe");
	objform.password.focus();
	return;
}	

objform.traitement.value='connexion';
objform.submit();

}
	

//-->
