// JavaScript Document


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];}
}




function validForm(fomulaire){
if((document.fomulaire.nom_prenom.value =="" ) ||
(document.fomulaire.societe.value == ""  ) ||
(document.fomulaire.activite.value == ""  ) ||
(document.fomulaire.tel.value == ""  ) ||
(document.fomulaire.message.value == "" ) ||
(document.fomulaire.email.value == ""  ) ){
	alert("Tous les champs sont obligatoire! merci.");	
	}  
	else document.fomulaire.submit();
}
//********************************affiche div
function cache (id)
{


if (document.getElementById(id).style.display == 'block')
	{
	document.getElementById(id).style.display = "none";
    }
}


function show_contenue (id)
{
if (document.getElementById(id).style.display == 'none')
	{
	document.getElementById(id).style.display = "block";
    }
}


function show_cache(id,num_id,nbr_id)
{
if(document.getElementById(id+'-'+num_id).style.display == 'none')
{var i=0;


for(i=1;i<=nbr_id;i++)
	if(i!=num_id)
		cache (id+'-'+i);


show_contenue(id+'-'+num_id);}
else
document.getElementById(id+'-'+num_id).style.display = 'none'
}






function swap_bottom(id,id_num,img){
if(document.getElementById('activite-'+id_num).style.display == 'block'){
var i=0;
for(i=1;i<=4;i++)
	if(i!=id_num)
document.getElementById(id+'-'+i).src='img/'+img+'.gif';
document.getElementById(id+'-'+id_num).src='img/'+img+'_2.gif';}
else
document.getElementById(id+'-'+id_num).src='img/puce_titre.gif';


}




function submitform() {
    	if  (document.sub_form.email_addr.value=='')
  			alert("Cette adresse électronique n'est pas valide");
		else {
  				if ( ((document.sub_form.email_addr.value.indexOf('@',1))==-1)||(document.sub_form.email_addr.value.indexOf('.',1))==-1 )
  					alert("Cette adresse électronique n'est pas valide");


  				else {
                                        window.open("", "formPopup", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,height=200,width=500,toolbar=no", true); 
                                 	document.sub_form.target='formPopup';
  					document.sub_form.submit();
                                      }
  		}
  }	


<!--
//defilement d'image/
function objet() {
this.length = objet.arguments.length
for (var i = 0; i < this.length; i++) this[i+1] = objet.arguments[i]
}
var nom = new objet ("reference-3.jpg", "reference-1.jpg", "reference-5.jpg", "reference-2.jpg",  "reference-4.jpg",  "reference-6.jpg");
var numero = 1;
function changer() {
document.image.src = "img/"+nom[numero];
numero += 1;
if (numero == nom.length + 1) numero = 1;
setTimeout("changer()",4000);
}






///defilement d'image22222222


function runSlideShow(){




  if (document.all){
     document.images.SLIDESIMG.style.filter="blendTrans(duration=2)"
     document.images.SLIDESIMG.style.filter="blendTrans(duration=crossFadeDuration)"
     document.images.SLIDESIMG.filters.blendTrans.Apply()      
  }
  document.images.SLIDESIMG.src = preLoad[j].src
  if (document.all){
     document.images.SLIDESIMG.filters.blendTrans.Play()
  }
  j = j + 1
  if (j > (p-1)) j=0
  t = setTimeout('runSlideShow()', slideShowSpeed)
}


<!--
function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {

        if (test.indexOf('isEmail')!=-1) { 
			var reg=/^[0-9a-zA-Z\.\-_]+@[0-9a-zA-Z\.\-_]+\.[a-z]{2}[a-z]?$/;
        if((val.match(reg))==null)
		/*p=val.indexOf('@'); p2=val.indexOf('.');
          if (p2<1||p<1 || p==(val.length-1)||p2==(val.length-1))  */ errors+='- '+nm+' doit contenir une adresse mail valide.\n';
      } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' doit contenir un nombre.\n';
          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 de 9 chiffres \n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' est vide.\n'; }
    } if (errors) alert('Veuillez verifier les champs suivants:\n'+errors);
    document.MM_returnValue = (errors == '');
} }
//-->

//-->