function testMail(email)
{
  var posArobase;
  posArobase = email.indexOf("@");
  if (posArobase == -1) return false;
  var posPoint;
  posPoint = email.lastIndexOf(".");
  if ((posPoint == -1) || (posPoint < posArobase)) return false;
  return true;
}
function testrequis(nom)
{
  if (nom.lastIndexOf("R")==nom.length-2) return true;
  return false;
}
function carClavier(e)
{
	if(window.event)
		{
		return String.fromCharCode(window.event.keyCode);
		}
		else // pour netscape
		{
		return String.fromCharCode(e.which);
		}
}
function testzone(e)
{
caractere = carClavier(e);
//alert(window.event.keyCode);
switch (window.event.keyCode)
	{
	case 34:
		alert ("Le guillemet n'est pas autorisé à la saisie");
		return false;
		break;	
	case 39:
		alert ("L'apostrophe n'est pas autorisé à la saisie");
		return false;
		break;	
	case 60:
		alert ("Le caractere < n'est pas autorisé à la saisie");
		return false;
		break;	
	case 62:
		alert ("Le caractere > n'est pas autorisé à la saisie");
		return false;
		break;	
	}
}
function test_coor(nomForm)
{
champ=nomForm.elements;
data = new Array(nomForm.elements.length);
nbr = champ.length;
i=0;
while (i<nbr)
	{
    testtemp=champ[i].type.substring(0,3);
	switch (testtemp)
    	{
        case "tex" :
        	if (testrequis(champ[i].name)) 
				{
				if (champ[i].value=="") 
					{
					window.alert ("Le champ "+champ[i].name.slice(0,-2)+" doit être renseigné");
					champ[i].focus();
					return false;
					}
				}
		switch (champ[i].name.substr(champ[i].name.length-1))  
			{
	        case "M" : 
    	    if (!testMail(champ[i].value))
        	    {
            	window.alert ("Le champ "+champ[i].name.slice(0,-2)+" semble ne pas avoir le format: nom@domaine.com");
              	champ[i].value="";
              	champ[i].focus();
              	return false;
	            }
			break;
          default :
        }
        break;
      default :
    }
    i++;
  }
 return true;
}