	function get_sifat()
	{
	document.declar.Sifat.value=document.declar.D1.options[document.declar.D1.selectedIndex].value;
	}
		function get_ard()
	{
	document.declar.Ard.value=document.declar.AR.options[document.declar.AR.selectedIndex].value;
	}
	function FrontPage_Form1_Validator(theForm)
{

 var checkOK;
  var checkStr;
  var allValid;
  var decPoints;
  var allNum;

if (theForm.CodeArticle.value == "")
  {
    alert("Vous devez saisir votre Code Article!");
    theForm.CodeArticle.focus();
    return (false);
  }

  checkOK = "0123456789";
  checkStr = theForm.CodeArticle.value;
  allValid = true;
  decPoints = 0;
  allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  
  if (!allValid)
  {
    alert("Veuillez saisir seulement des chiffres pour le Code Article!");
    theForm.CodeArticle.focus();
    return (false);
  }

if (theForm.DateConstatation.value == "")
  {
    alert("Vous devez saisir le Numero de Constatation!");
    theForm.DateConstatation.focus();
    return (false);
  }


if (theForm.DateAvisRec.value == "")
  {
    alert("Vous devez saisir votre Date Avis Recomande!");
    theForm.DateAvisRec.focus();
    return (false);
  }

if (theForm.NomPrenom.value == "")
  {
    alert("Vous devez saisir le  Nom et Prénom du proprietaire!");
    theForm.NomPrenom.focus();
    return (false);
  }  
  
  if (theForm.CIN.value == "")
  {
    alert("Vous devez saisir le Numéro de ca Carte d'identite National!");
    theForm.CIN.focus();
    return (false);
  }
  checkOK = "0123456789";
  checkStr = theForm.CIN.value;
  allValid = true;
  decPoints = 0;
  allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  
  if (!allValid)
  {
    alert("Veuillez saisir seulement des chiffres pour le Numéro de ca Carte d'identite National!");
    theForm.CIN.focus();
    return (false);
  }
   
  
  
  if (theForm.DateCIN.value == "")
  {
    alert("Veuillez saisir la date de delivrence de la carte d identite nationale !");
    theForm.DateCIN.focus();
    return (false);
  }
 
  
 if (theForm.NomPrenomC.value == "")
  {
    alert("Vous devez saisir votre Nom et Prénom !");
     theForm.NomPrenomC.focus();
	return (false);
	} 
  if (theForm.D1.options[theForm.D1.selectedIndex].value=="")
  {
    alert("Veuillez saisir la qualité de déclarant");
	theForm.D1.focus();
    return (false);
  } 

  if (theForm.AR.value =="" || theForm.MoudouAA2.value =="" || theForm.MoudouAA3.value =="")
  {
    alert("Veuillez saisir l'adresse complete du sujet de la propriété !");
    theForm.AR.focus();
    return (false);
  }
  
  if (theForm.SurfaceReel.value == "")
  {
    alert("Veuillez saisir la surface reel de la propriété!");
    theForm.SurfaceReel.focus();
    return (false);
  }
  
  if (theForm.NbrService.value == "")
  {
    alert("Veuillez saisir le Nombre de services !");
    theForm.NbrService.focus();
    return (false);
  }

 if (theForm.DPS2.value == "")
  {
    alert("Veuillez saisir le debut de periode de service en precisant l annee !");
    theForm.DPS2.focus();
    return (false);
  }


  return (true);
}
