<!--
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 ouvreCote(urlimage){
	 Makepop("ressources/"+urlimage,300,300,1,1,1,"cote");
}
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 setlignetexte(){
	var pos_x=((getEcranX()-980)/2)+255;
	var _layer = Dmc_Layer.is_object("lignetexte");
	Dmc_Layer.set_posx(_layer,pos_x);
	Dmc_Layer.f_visible(_layer);
}
window.onresize=setlignetexte;
var imagecaddie=new Image();
imagecaddie.src="images/bt_caddit_r.gif";

var imagebt2=new Image();
imagebt2.src="images/bt_entreprise_r.gif";
var imagebt2s=new Image();
imagebt2s.src="images/sep_bt_r_l.gif";


var imagebt3=new Image();
imagebt3.src="images/bt_contact_r.gif";
var imagebt3s=new Image();
imagebt3s.src="images/sep_bt_r_r.gif";

var imageprof=new Image();
imageprof.src="images/bt_profe_r.gif";

function setmenuhri(index,action){
	/*
	var document.images.bt_menu0.src="images/bt_entreprise.gif";
	var document.images.bt_menu1.src="images/sep_bt.gif";
	var document.images.bt_menu2.src="images/bt_entreprise.gif";
	*/
	if(index==0){
		if(action==true){
			document.images.bt_menu0.src=imagebt2.src;
			document.images.bt_menu1.src=imagebt2s.src;
			
		}else{
			document.images.bt_menu0.src="images/bt_entreprise.gif";
			document.images.bt_menu1.src="images/sep_bt.gif";
		}
	}else if(index==1){
		if(action==true){
			document.images.bt_menu2.src=imagebt3.src;
			document.images.bt_menu1.src=imagebt3s.src;
		}else{
			document.images.bt_menu2.src="images/bt_contact.gif";
			document.images.bt_menu1.src="images/sep_bt.gif";
		}
	}else if(index==2){
		if(action==true){
			document.images.bt_menu4.src=imagecaddie.src;
		}else{
			document.images.bt_menu4.src="images/bt_caddit.gif";
		}
	}else if(index==3){
		if(action==true){
			document.images.bt_menu3.src=imageprof.src;
		}else{
			document.images.bt_menu3.src="images/bt_profe.gif";
		}
	}
	
}

/* ////////////////////////////////////////////// */
/*	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;		
}
/**
  * Traite les actions à faire pour le formulaire recharche
  * auteur : marc
  */
function initrechercher(){
	var objForm = $(document.forms.formmoteur);
	var elementQuery = $("query");
	Event.observe(elementQuery, "focus",function(event){this.value=''});
	Event.observe(elementQuery, "blur",function(event){if(this.value==''){this.value=this.defaultValue}});
	Event.observe(objForm, "submit",function(event){});
}
//-->
