<!--
function add_favoris()
{
	var titre = document.title;
	var url = document.location.href;

	if(navigator.appName == "Microsoft Internet Explorer")
	{
		window.external.AddFavorite(url, titre);
	}
	else if(window.sidebar)
	{
		window.sidebar.addPanel(titre,url,"");
	}
	else
	{
		alert('Appuyez sur les touches CTRL+D pour mettre cette page dans vos favoris.');
	}
}
function checkdata(theForm)
{
	if (theForm.marque.value == "")
		{
		theForm.marque.focus(); alert("Sélectionner un constructeur");	return (false);
		}
   	return (true);
}

function checkdatas(theForm)
{
	if (theForm.cie.value == "")
		{
		theForm.cie.focus(); alert("Entrez la Société ");	return (false);
		}
	if (theForm.name.value == "")
		{
		theForm.name.focus(); alert("Entrez le nom ");	return (false);
		}
	if (theForm.tel.value == "")
		{
		theForm.tel.focus(); alert("Entrez le Téléphone ");	return (false);
		}
	 if (!check_email(theForm.email.value))
        { theForm.email.focus();	alert("e-mail incorrect!"); return (false); }
	if (theForm.mess.value == "")
		{
		theForm.mess.focus(); alert("Entrez votre message ");	return (false);
		}
   	return (true)
}
function check_email(address)
{
  if ((address == "")
    || (address.indexOf ('@') == -1)
    || (address.indexOf ('.') == -1))
      return false;
  return true;
}

function CheckLen(Target) {
// cette fonction calcule et affiche le nombre de caracteres saisi pour le message a envoyer
	StrLen = Target.value.length
	if (StrLen > 500 ) {
		Target.value = Target.value.substring(0,500);
		CharsLeft = 500;
	}
	else {
		CharsLeft = StrLen;
	}
	document.form1.caracteres.value = CharsLeft;
}
//-->


