<script type="text/javascript">
function verifMail(a){
testm = false ;
 for (var j=1 ; j<(a.length) ; j++) {
  if (a.charAt(j)=='@') {
   if (j<(a.length-4)){
    for (var k=j ; k<(a.length-2) ; k++) {
     if (a.charAt(k)=='.') testm = true;
    }
   }
  }
 }
return testm ;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function applyClass(oElement,sCSSClass)

{
     oElement.className = sCSSClass;
}


function ImageMax(chemin)
   {
   i1 = new Image;
   i1.src = chemin;
   html = '<html><head><title><?= $siteName; ?></title></head><body scroll="no" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" onBlur="top.close()"><a href="javascript:close()"><img src="'+chemin+'" border=0 name=ImageMax onLoad="window.resizeTo(document.ImageMax.width+10,document.ImageMax.height+60)"></a></body></html>';
   popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1,left=200,top=200');
   popupImage.document.open();
   popupImage.document.write(html);
   popupImage.document.close()
   };

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function setPointer(theRow, thePointerColor)
{
    if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined') {
        return false;
    }
 
    var row_cells_cnt = theRow.cells.length;
    
    for (var c = 0; c < row_cells_cnt; c++) {
        theRow.cells[c].bgColor = thePointerColor;        
    }
 
    return true;
}

function valid_search(form) {
  if (form.recherche.value == ""){
    alert("Veuillez saisir une recherche.")
	form.recherche.focus();
	return false }
	return true
}
function valid_mail(form) {
  if (form.email.value == ""){
    alert("Veuillez saisir une adresse mail.")
	form.email.focus();
	return false }
  if (verifMail(form.email.value)==false){
    alert("Le format de l'adresse mail n'est pas correct...")
	form.email.focus();
	return false }
	return true
}


</script>

