
	function validateForm001()
   	{
		
var option =document.frmVendez.txtSubject.selectedIndex;
strAchatInstall = document.getElementById('strAchatInstall');

   		strPrenom = document.getElementById('strPrenom');
   		strNom = document.getElementById('strNom');
   		strEmail = document.getElementById('strEmail');
   		strEmail2 = document.getElementById('strEmail2');
		strLearnedAbout = document.getElementById('strLearnedAbout');
		strLearnedAboutOther = document.getElementById('strLearnedAboutOther');

		strSubject = document.getElementById('strSubject');

		strSecurity = document.getElementById('strSecurity');
		FormSecurite = document.getElementById('strFormSecurite'); 

/*CheckBox Particuliers*/
	Declaration = document.getElementById('ckbDeclaration')
	Ted = document.getElementById('ckbTed')
	Rap = document.getElementById('ckbRap')
	Revenus = document.getElementById('ckbRevenus')
	ConseilsFiscaux = document.getElementById('ckbConseilsFiscaux')

/*CheckBox Entreprises*/
	EtatFinancier = document.getElementById('ckbEtatFinancier')
	ImpotCorpo = document.getElementById('ckbImpotCorpo')
	Assistance = document.getElementById('ckbAssistance')
	Remuneration = document.getElementById('ckbRemuneration')
	Conseil = document.getElementById('ckbConseil')
	Incorporation = document.getElementById('ckbIncorporation')
	Aide = document.getElementById('ckbAide')

Autre =  document.getElementById('ckbAutre')
strckbOther =  document.getElementById('strckbOther')



        document.getElementById('strPrenomError').style.display = 'none';
        document.getElementById('strNomError').style.display = 'none';   		
   		document.getElementById('strEmailError').style.display = 'none';
   		document.getElementById('strEmail2Error').style.display = 'none';
		document.getElementById('strLearnedAboutError').style.display = 'none';
		document.getElementById('strLearnedAboutOtherError').style.display = 'none';
		
		document.getElementById('strSubjectError').style.display = 'none';
		document.getElementById('strSecurityError').style.display = 'none';
		
        document.getElementById('strParticuliersError').style.display = 'none';
        document.getElementById('strEntreprisesError').style.display = 'none';   		
		document.getElementById('strckbOtherError').style.display = 'none'; 

		strPrenom.style.borderColor = '#000000';
   		strNom.style.borderColor  = '#000000';
   		strEmail.style.borderColor  = '#000000';
   		strEmail2.style.borderColor  = '#000000';
		strSecurity.style.borderColor  = '#000000';
	
		strLearnedAbout.style.borderColor  = '#000000';
		strLearnedAboutOther.style.borderColor  = '#000000';
		
		strSubject.style.borderColor = '#000000';
		strckbOther.style.borderColor = '#000000';

Invalide = true;
Focus = "";

   		if(strPrenom.value == '') 
   		{ 
   		    strPrenom.style.border = '1px solid #dd7627';
   		    document.getElementById('strPrenomError').style.display = 'inline';
   		    document.getElementById('strPrenomError').innerHTML = '(requis)'; 
			
			if(Focus=="")
			{
				Focus = "true"
				document.getElementById('strPrenom').focus();
			}
			Invalide = false;
   		}
   		   		
   		if(strNom.value == '') 
   		{ 
   		    strNom.style.border = '1px solid #dd7627';
   		    document.getElementById('strNomError').style.display = 'inline';
   		    document.getElementById('strNomError').innerHTML = '(requis)'; 
			
			if(Focus=="")
			{
				Focus = "true"
				document.getElementById('strNom').focus();
			}
   		    Invalide = false;
   		}
   		
   		if(strEmail.value == '') 
   		{ 
   		    strEmail.style.border = '1px solid #dd7627';
   		    document.getElementById('strEmailError').style.display = 'inline';
   		    document.getElementById('strEmailError').innerHTML = '(requis)'; 
			
			if(Focus=="")
			{
				Focus = "true"
				document.getElementById('strEmail').focus();
			}
   		    Invalide = false;
   		}

   		if(!isValidEmail(strEmail.value)) 
   		{ 
   		    strEmail.style.border = '1px solid #dd7627';   		    
   		    document.getElementById('strEmailError').style.display = 'inline';
   		    document.getElementById('strEmailError').innerHTML = '(invalide)'; 
			
			if(Focus=="")
			{
				Focus = "true"
				document.getElementById('strEmail').focus();
			}
   		    Invalide = false;   		
   		}   		   		   		
   		
   		if(strEmail2.value == '') 
   		{ 
   		    strEmail2.style.border = '1px solid #dd7627';
   		    document.getElementById('strEmail2Error').style.display = 'inline';
   		    document.getElementById('strEmail2Error').innerHTML = '(requis)'; 
			
			if(Focus=="")
			{
				Focus = "true"
				document.getElementById('strEmail2').focus();
			}
   		    Invalide = false;
   		}
		
   		if(strEmail.value != strEmail2.value) 
   		{ 
			strEmail2.style.border = '1px solid #dd7627';
   		    document.getElementById('strEmail2Error').style.display = 'inline';
   		    document.getElementById('strEmail2Error').innerHTML = '(pas identique)'; 
			
			if(Focus=="")
			{
				Focus = "true"
				document.getElementById('strEmail2').focus();
			}
   		    Invalide = false;
   		}

		
	if(option == 0)	
   		{ 
   		    strSubject.style.border = '1px solid #dd7627';
   		    document.getElementById('strSubjectError').style.display = 'inline';
   		    document.getElementById('strSubjectError').innerHTML = '(requis)'; 
			
			if(Focus=="")
			{
				Focus = "true"
				document.getElementById('strSubject').focus();
			}
   		    Invalide = false;
   		}

	if(option == 1)	//NE PAS VALIDER SI N'EST PAS SÉLECTIONNER
   		{ 
		
			if(Declaration.checked != true && Ted.checked != true && Rap.checked != true && Revenus.checked != true && ConseilsFiscaux.checked != true && Autre.checked != true)
				{
					document.getElementById('strParticuliersError').style.display = 'inline';
					document.getElementById('strParticuliersError').innerHTML = '(Veuillez cocher au minimum un choix)'; 
					
					if(Focus=="")
					{
						Focus = "true"
						strSubject.focus();
					}
					Invalide = false;
				}
	
		}else if(option == 2){
			
			if(EtatFinancier.checked != true && ImpotCorpo.checked != true && Assistance.checked != true && Remuneration.checked != true && Conseil.checked != true && Incorporation.checked != true && Aide.checked != true && Autre.checked != true)	
				{
					document.getElementById('strEntreprisesError').style.display = 'inline';
					document.getElementById('strEntreprisesError').innerHTML = '(Veuillez cocher au minimum un choix)'; 
					
					if(Focus=="")
					{
						Focus = "true"
						strSubject.focus();
					}
					Invalide = false;
				}
		}
		
		if(Autre.checked == true)
		{
			if(strckbOther.value == '') 
			{ 
				strckbOther.style.border = '1px solid #dd7627';
				document.getElementById('strckbOtherError').style.display = 'inline';
				document.getElementById('strckbOtherError').innerHTML = '(requis)'; 
				
				if(Focus=="")
				{
					Focus = "true"
					strckbOther.focus();
				}
				Invalide = false;
			}
		}
		

		if(strLearnedAbout.value == 'Choisissez') 
   		{ 
   		    strLearnedAbout.style.border = '1px solid #dd7627';
   		    document.getElementById('strLearnedAboutError').style.display = 'inline';
   		    document.getElementById('strLearnedAboutError').innerHTML = '(requis)'; 
			
			if(Focus=="")
			{
				Focus = "true"
				strLearnedAbout.focus();
			}
   		    Invalide = false;
   		}
		if(strLearnedAbout.value == 'Autre')
		{
			if(strLearnedAboutOther.value == '') 
			{ 
				strLearnedAboutOther.style.border = '1px solid #dd7627';
				document.getElementById('strLearnedAboutOtherError').style.display = 'inline';
				document.getElementById('strLearnedAboutOtherError').innerHTML = '(requis)'; 
				
				if(Focus=="")
				{
					Focus = "true"
					strLearnedAboutOther.focus();
				}
				Invalide = false;
			}
		}
		
		

		
   		if(strSecurity.value != FormSecurite.value) 
   		{ 
   		    strSecurity.style.border = '1px solid #dd7627';
   		    document.getElementById('strSecurityError').style.display = 'inline';
   		    document.getElementById('strSecurityError').innerHTML = '<br>(pas identique)'; 
			
			if(Focus=="")
			{
				Focus = "true"
				document.getElementById('strSecurity').focus();
			}
   		    Invalide = false;
   		}   


		
		if(Invalide != false)
		{
   			return true;
		}else
		{
			return false;	
		}
	}

	
   	function isValidEmail(str) 
   	{
        return (str.lastIndexOf(".") > 2) && (str.indexOf("@") > 0) && (str.lastIndexOf(".") > (str.indexOf("@")+1)) && (str.indexOf("@") == str.lastIndexOf("@"));
    }
	
