		/////////////////////////////////////////////////////////////////////////////////////
	   //																				  //
	  //							FONCTION PRELOAD GLOBAL								 //
	 //																					//
	/////////////////////////////////////////////////////////////////////////////////////

	//  preload global des images

	function preloadcommun()
	{
		// Chargement des images menu haut
		if ( jvsenable )
		{
				ImTmp = new Image ();
				ImTmp.src = "img/p_h_recherche_bt_on.gif";
				ImTmp2 = new Image ();
				ImTmp2.src = "img/p_menu.gif";
				ImTmp3 = new Image ();
				ImTmp3.src = "img/p_menu_activite.gif";
				ImTmp4 = new Image ();
				ImTmp4.src = "img/p_menu_cil.gif";
				ImTmp5 = new Image ();
				ImTmp5.src = "img/p_menu_maisons.gif";
				ImTmp6 = new Image ();
				ImTmp6.src = "img/p_menu_promotion.gif";
				ImTmp7 = new Image ();
				ImTmp7.src = "img/p_menu_recrutement.gif";
				ImTmp8 = new Image ();
				ImTmp8.src = "img/p_menu_contact.gif";
				ImTmp9 = new Image ();
				ImTmp9.src = "img/vignettes/p_retour_on.gif";
				
		}

	}
 
    function SwitchImg (im,sr)
	{
		if (jvsenable)
		{
			if ( document[im] != null ){
				document [im].setAttribute('src', sr);
			}
		}
	}

<!-- SWAP Img menu css -->
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
<!---->

nomimg="photo";
compt=0;
prec=-1;
function diapobouton(sens){
	prec = compt;
	if(sens==1 && compt<=(tab_photo.length-1)){
		if (compt<(tab_photo.length-1)){
			compt+=sens;
			document.images[nomimg].src="img/vignettes/"+tab_photo[compt];
		}
		else {//si on est sur la derniere photo
			compt=0;
			document.images[nomimg].src="img/vignettes/"+tab_photo[0];
		}
	}
	else {
		if(sens==-1 && compt!=0){
			compt+=sens;
			document.images[nomimg].src="img/vignettes/"+tab_photo[compt];
		}
		else {//si on est sur la 1ere photo
			compt=tab_photo.length-1;
			document.images[nomimg].src="img/vignettes/"+tab_photo[tab_photo.length-1];
		}
	}
	//Selectionne la vignette N° compt
	document.getElementById('v'+compt).setAttribute('src', 'img/vignettes/'+tab_vign2[compt]);//v_persoxx.gif
	document.getElementById('v'+compt).setAttribute('onMouseOut', ''); //version all
	if (iedetect == true){
		document.getElementById('v'+compt).onMouseOut = '';} //version IE
	//Déselection de la vignette précédente
	document.getElementById('v'+prec).setAttribute('src', 'img/vignettes/'+tab_vign[prec]);//v_persoxx.gif
	document.getElementById('v'+prec).setAttribute('onMouseOut', 'this.setAttribute("src","img/vignettes/'+tab_vign[prec]+'")'); //version All
	if (iedetect == true){
		document.getElementById('v'+prec).onMouseOut = 'this.setAttribute("src","img/vignettes/'+tab_vign[prec]+'")';} //version IE
	//Mise à jour du commentaire	
	document.getElementById('comment').innerHTML = tab_comment[compt];
	
}//function

function goVign(numVign){
/*fonction qui:
1-affiche la photo N° numVign
 -on donne le n° de la photo suivante ou precedente pour le syst de navigation
2-Selectione la vignette N° numVign
3-Deselectione les autres vignettes
*/

compt = numVign;
vNum = '';
vx = /[v]\d{1,2}/;
for (i=0;i<document.images.length;i++){
	vid = document.images[i].id;
	//alert(vid);
	if (vid == 'v'+numVign){
//1
		document.getElementById('photo').setAttribute('src','img/vignettes/'+tab_photo[numVign]);
		document.getElementById('photo').name = tab_photo[numVign];
//2
		document.getElementById('v'+numVign).setAttribute('src', 'img/vignettes/'+tab_vign2[numVign]);//v_persoxx.gif
		//------//
		document.getElementById('v'+numVign).setAttribute('onMouseOut', ''); //version all
		if (iedetect == true){
		document.getElementById('v'+numVign).onMouseOut = '';} //version IE mais ne marche pas, aucune action o_O
	}
	else {
//3
		vNum = vid.substring(1);
		if (vx.test(vid)){
			document.getElementById('v'+vNum).setAttribute('src', 'img/vignettes/'+tab_vign[vNum]);//v_persoxx_on.gif
			
			document.getElementById('v'+vNum).setAttribute('onMouseOut', 'this.setAttribute("src","img/vignettes/'+tab_vign[vNum]+'")'); //version All
			if (iedetect == true){
			document.getElementById('v'+vNum).onMouseOut = 'this.setAttribute("src","img/vignettes/'+tab_vign[vNum]+'")';} //version IE
		}
	}
		//Mise à jour du commentaire	
	document.getElementById('comment').innerHTML = tab_comment[compt];
}//for
}//function

function SwitchRub (r)
	{
		SwitchImg ('p_menu','img/p_menu.gif');

		
		if ( r == 'menu_neutre')
		{
			SwitchImg ('p_menu','img/p_menu.gif');
		}			
		if ( r == 'menu_activite')
		{
			SwitchImg ('p_menu','img/p_menu_activite.gif');
		}
		if ( r == 'menu_cil')
		{
			SwitchImg ('p_menu','img/p_menu_cil.gif');
		}
		if ( r == 'menu_maisons')
		{
			SwitchImg ('p_menu','img/p_menu_maisons.gif');
		}
		if ( r == 'menu_promotion')
		{
			SwitchImg ('p_menu','img/p_menu_promotion.gif');
		}
		if ( r == 'menu_recrutement')
		{
			SwitchImg ('p_menu','img/p_menu_recrutement.gif');
		}
		if ( r == 'menu_contact')
		{
			SwitchImg ('p_menu','img/p_menu_contact.gif');
		}
		
	}

	// appel la fonction d'activation de la rubrique
	//	SwitchRub (rub);

	// quand on resize netscape, il reclique le menu
		function resize (evnt)
		{
				SwitchRub (rub);
				return true;
		}

		window.onResize = resize;


	




		//////////////////////////////////////////////////////////////////////////////////////////////////
	   //																							   //
	  //      <A HREF="JAVASCRIPT:PopupWin('popup.html','Popupwin','yes','390','300','200','200')">   //
	 //																								 //
	//////////////////////////////////////////////////////////////////////////////////////////////////
	   
	// popupwin
	// <A HREF="xxxxx" onClick="PopupWin('xxxxx','Popupwin','yes','530','579','50','50');return(false);">

	function PopupWin(URL,FRAME,RESIZABLE,WIDTH,HEIGHT,TOP,LEFT)
	{
		var param = "menubar=no,location=no,directories=no,status=no,toolbar=no,scrollbars=no,resizable="+RESIZABLE+",width="+WIDTH+",height="+HEIGHT+",top="+TOP+",left="+LEFT;
		window.open(URL,FRAME,param); 
	}

	// popupwin2
	// <A HREF="xxxxx" onClick="PopupWin('xxxxx','Popupwin','yes','530','579','50','50');return(false);">

	function PopupWin2(URL,FRAME,RESIZABLE,WIDTH,HEIGHT,TOP,LEFT)
	{
		var param = "menubar=no,location=no,directories=no,status=no,toolbar=no,scrollbars=yes,resizable="+RESIZABLE+",width="+WIDTH+",height="+HEIGHT+",top="+TOP+",left="+LEFT;
		window.open(URL,FRAME,param); 
	}
	

	// popupall
	// se redimensione par raport a l'ecran
	// <A HREF="xxxxx" onClick="Popupall('popup.html','Popupall','yes');return(false);">

	function Popupall(URL,FRAME,RESIZABLE)
	{
		var param = "menubar=no,location=yes,directories=no,status=no,toolbar=yes,scrollbars=yes,resizable="+RESIZABLE+",width="+((screen.width)-150)+",height="+((screen.height)-150)+",top=20,left=100";
		window.open(URL,FRAME,param);
	}

	// popupfull
	// se redimensione par raport a l'ecran
	// <A HREF="xxxxx" onClick="popupfull('popup.html','popupfull','yes');return(false);">

	function Popupfull(URL,FRAME,RESIZABLE)
	{
		var param = "menubar=yes,location=no,directories=no,status=no,toolbar=yes,scrollbars=yes,resizable="+RESIZABLE+",width="+((screen.width)-10)+",height="+((screen.height)-140)+",top=0,left=0";
		window.open(URL,FRAME,param);
	}


		//////////////////////////////////////////////////////////////////////////////////////////////
	   //                                                                                          //
	  //						print	<a href="javascript:imprimer();">						  //
	 //                                                                                          //
	//////////////////////////////////////////////////////////////////////////////////////////////


	// fonction print

	function imprimer()
	{

		if (printenable)
		{
			window.print();
		}
		else
		{
			alert("Votre navigateur n'est pas compatible.\nCliquez sur ok, puis faire clic droit sur la souris\nenfin cliquez sur \"Imprimer\" dans menu contextuel.\nOu Appuyez sur les touches CTRL + P sur PC.")
		}

	}




		//////////////////////////////////////////////////////////////////////////////////////////////
	   //                                                                                          //
	  //										test email										  //
	 //                                                                                          //
	//////////////////////////////////////////////////////////////////////////////////////////////

	function testmail(mail)
	{
		var cpt=0;
		if( mail.length==0)
			return false;
		
		var taille=mail.length;
		
		if(mail.charAt(taille-2)!='.')
			{
			//window.alert(mail.charAt(mail.length-1));
			var pos=0;	
			for( i=0; i<mail.length; i++)
				{
				var verif=mail.charAt(i);

				if(verif=='@' && i>=1)
					{
					cpt++;
					pos=i;
					}
				//window.alert(pos);
				if(pos<=i && pos!=0)
					{
					if(verif=='.') cpt++;
					}
				}
				
			}
				
		if (cpt<2)
			return false;

		return true;
	}







		//////////////////////////////////////////////////////////////////////////////////////////////
	   //                                                                                          //
	  //									test formulaire										  //
	 //                                                                                          //
	//////////////////////////////////////////////////////////////////////////////////////////////


	function testform()
	{

		var erreur="";
		
		if(document.f.societe.value.length<3 && document.f.nom.value.length<3)
		{
			erreur+="Veuillez renplir le champ société ou le champ nom (3 caractères minimum)\n\n";
		}
		
		if(document.f.ville.value.length<3)
		{
			erreur+="Veuillez renplir le champ ville (3 caractères minimum)\n\n";
		}
		/*if(document.f.pays.value.length<2)
		{
			erreur+="Veuillez renplir le champ pays (2 caractères minimum)\n\n";
		}*/
		if(!testmail(document.f.email.value))
		{
			erreur+="Veuillez renplir l'adresse email\n\n";
		}

		if(erreur.length>0)
			{
			window.alert(erreur);
			return false;
			}

		return true;

	}





		//////////////////////////////////////////////////////////////////////////////////////////////
	   //                                                                                          //
	  //									retaille fenetre									  //
	 //                                                                                          //
	//////////////////////////////////////////////////////////////////////////////////////////////

	// <body onload="window.focus();onLoad=RetaillerFenetre();">
	// <a href="javascript:window.close();"><IMG SRC="xxx" name="i" border=0 alt="Cliquer pour fermer la fenêtre"></a>

	
		function RetaillerFenetre()
			{
			if (iedetect == true)
				window.resizeTo(document.i.width+12,document.i.height+30);
			else
				window.resizeTo(document.i.width,document.i.height);

			window.focus();
			}