// JavaScript Document
<!--

function openWindow(url, w, h) {
	var options = "width=" + w + ",height=" + h + ",";
	options += "resizable=no,scrollbars=yes,status=no,";
	options += "menubar=no,toolbar=no,location=no,directories=no";
	var newWin = window.open(url, 'newWin', options);
	newWin.focus();
}

function tethis() {
 	var url = "http://www.tethis-interactive.com/index.php?inaute=secretariat_services";
	var options = "toolbar=1, location=1, directories=1, status=1, scrollbars=1, resizable=1, copyhistory=1, menuBar=1, width="+screen.width+",height="+screen.height+",top=0,left=0";
	window.open("http://www.tethis-interactive.com/index.php?inaute=secretariat_services", "newWin", "toolbar=1, location=1, directories=1, status=1, scrollbars=1, resizable=1, copyhistory=1, menuBar=1, width="+screen.width+",height="+screen.height+",top=0,left=0");
}
 
function validator(theForm)
{

  if (theForm.nom.value == "")
  {
    alert("Merci de renseigner le champ \"Nom\".");
    theForm.nom.focus();
    return (false);
  }

  if (theForm.tel.value == "")
  {
    alert("Merci de renseigner le champ \"Téléphone\".");
    theForm.tel.focus();
    return (false);
  }
  if (theForm.email.value != "")
  {	
	var maReg = new RegExp ( "^\\w[\\w+\.\-]*@[\\w\-]+\.\\w[\\w+\.\-]*\\w$", "gi" ) ;
  	var mail=theForm.email.value;
  	if ( mail.search( maReg ) == -1 )
  	{
  		alert("Saisissez une adresse e-mail correcte.\nMerci.");
		theForm.email.focus();
		return(false);
  	}
  }
  return (true);
}

function validossier(theForm){

  if (theForm.Nom.value == ""){
    alert('Merci de renseigner le champ  "Nom".');
    theForm.Nom.focus();
    return(false);
  }

  if (theForm.Prenom.value == "")
  {
    alert("Merci de renseigner le champ  \"Prénom\".");
    theForm.Prenom.focus();
    return (false);
  }

  if (theForm.Adresse.value == "")
  {
    alert("Merci de renseigner le champ  \"Adresse\".");
    theForm.Adresse.focus();
    return (false);
  }

  if (theForm.Localite.value == "")
  {
    alert("Merci de renseigner le champ  \"Ville\".");
    theForm.Localite.focus();
    return (false);
  }

  if (theForm.CodePostal.value == "")
  {
    alert("Merci de renseigner le champ  \"Code Postal\".");
    theForm.CodePostal.focus();
    return (false);
  }

  if (theForm.Telephone.value == "")
  {
    alert("Merci de renseigner le champ  \"Téléphone\".");
    theForm.Telephone.focus();
    return (false);
  }
  return (true);
}

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

nom1 = new Array;
nom1[0] = "img/bepmpmi1.jpg";
nom1[1] = "img/bepmpmi0.jpg";

nom2 = new Array;
nom2[0] = "img/bacproto1.jpg";
nom2[1] = "img/bacproto0.jpg";

timer = 0;
actual_texte = 0;

function alternancebepmpmi() {
	//document.getElementById("photo").src = nom1[actual_texte];
	document.photo.src = nom1[actual_texte];
	actual_texte++;
	if(actual_texte >= nom1.length)
	actual_texte = 0;
	clearInterval(timer);
	if(document.getElementById)timer = setInterval("alternancebepmpmi()",3000);
}
function alternancebacproto() {
	//document.getElementById("photo").src = nom2[actual_texte];
	document.photo.src = nom2[actual_texte];
	actual_texte++;
	if(actual_texte >= nom2.length)
	actual_texte = 0;
	clearInterval(timer);
	if(document.getElementById)timer = setInterval("alternancebacproto()",3000);
}
//-->