	function validateForm001()
   	{
   		strPrenom = document.getElementById('strPrenom');
   		strNom = document.getElementById('strNom');
   		strEmail = document.getElementById('strEmail');
   		strEmail2 = document.getElementById('strEmail2');
   		strPhone = document.getElementById('strPhone');
		strLearnedAbout = document.getElementById('strLearnedAbout');
		strLearnedAboutOther = document.getElementById('strLearnedAboutOther');
		strSecurity = document.getElementById('strSecurity');
		FormSecurite = document.getElementById('FormSecurite'); 
		
		soumission = document.getElementById('soumission');



        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('strPhoneError').style.display = 'none';
		document.getElementById('strSecurityError').style.display = 'none';
		document.getElementById('strLearnedAboutError').style.display = 'none';
		document.getElementById('strLearnedAboutOtherError').style.display = 'none';
		
		strPrenom.style.border = '1px solid #797979';
   		strNom.style.border = '1px solid #797979';
   		strEmail.style.border = '1px solid #797979';
   		strEmail2.style.border = '1px solid #797979';
   		strPhone.style.border = '1px solid #797979';
		strSecurity.style.border = '1px solid #797979';
		strLearnedAbout.style.border = '1px solid #797979';
		strLearnedAboutOther.style.border = '1px solid #797979';
		

Invalide = true;
Focus = "";

   		if(strPrenom.value == '') 
   		{ 
   		    strPrenom.style.border = '2px solid #FF0000';
   		    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 = '2px solid #FF0000';
   		    document.getElementById('strNomError').style.display = 'inline';
   		    document.getElementById('strNomError').style.color = '#FF0000';
   		    document.getElementById('strNomError').innerHTML = '(requis)'; 
			
			if(Focus=="")
			{
				Focus = "true";
				document.getElementById('strNom').focus();
			}
   		    Invalide = false;
   		}
   		
   		if(strEmail.value == '') 
   		{ 
   		    strEmail.style.border = '2px solid #FF0000';
   		    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 = '2px solid #FF0000';   		    
   		    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 = '2px solid #FF0000';
   		    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 = '2px solid #FF0000';
   		    document.getElementById('strEmail2Error').style.display = 'inline';
   		    document.getElementById('strEmail2Error').innerHTML = '(pas identique)'; 
			
			if(Focus=="")
			{
				Focus = "true";
				document.getElementById('strEmail2').focus();
			}
   		    Invalide = false;
   		}
		
   		
   		if(!formatPhone()) 
   		{ 
   		    strPhone.style.border = '2px solid #FF0000';
   		    document.getElementById('strPhoneError').style.display = 'inline';
   		    document.getElementById('strPhoneError').innerHTML = '(requis, le format doit &ecirc;tre ###-###-####)'; 
			
			if(Focus=="")
			{
				Focus = "true";
				document.getElementById('strPhone').focus();
			}
   		    Invalide = false;
   		}
		
		








		
		if(soumission.value == 'true'){

			strService = document.getElementById('strService');
			strServiceOther = document.getElementById('strServiceOther');
			strBudget = document.getElementById('strBudget');
			strBudgetOther = document.getElementById('strBudgetOther');
			strStart = document.getElementById('strStart');
			strStartOther = document.getElementById('strStartOther');
			strDispos = document.getElementById('strDispos');
			strAnnee = document.getElementById('strAnnee');
			
			
			strStart.style.border = '1px solid #797979';
			strService.style.border = '1px solid #797979';
			strBudget.style.border = '1px solid #797979';
			strAnnee.style.border = '1px solid #797979';
			
			document.getElementById('strStartError').style.display = 'none';
			document.getElementById('strServiceError').style.display = 'none';
			document.getElementById('strBudgetError').style.display = 'none';
			document.getElementById('strDisposError').style.display = 'none';
			document.getElementById('strAnneeError').style.display = 'none';
		
		
		
			if(strService.value == 'Choisissez') 
			{ 
				strService.style.border = '2px solid #FF0000';
				document.getElementById('strServiceError').style.display = 'inline';
				document.getElementById('strServiceError').innerHTML = '(requis)'; 
				
				if(Focus=="")
				{
					Focus = "true";
					strService.focus();
				}
				Invalide = false;
			}
			if(strService.value == 'Autre')
			{
				if(strServiceOther.value == '') 
				{ 
					strServiceOther.style.border = '2px solid #FF0000';
					document.getElementById('strServiceOtherError').style.display = 'inline';
					document.getElementById('strServiceOtherError').innerHTML = '(requis)'; 
					
					if(Focus=="")
					{
						Focus = "true";
						strServiceOther.focus();
					}
					Invalide = false;
				}
			}
		
			if(strBudget.value == 'Choisissez') 
			{ 
				strBudget.style.border = '2px solid #FF0000';
				document.getElementById('strBudgetError').style.display = 'inline';
				document.getElementById('strBudgetError').innerHTML = '(requis)'; 
				
				if(Focus=="")
				{
					Focus = "true";
					strBudget.focus();
				}
				Invalide = false;
			}
			if(strBudget.value == 'Oui')
			{
				if(strBudgetOther.value == '') 
				{ 
					strBudgetOther.style.border = '2px solid #FF0000';
					document.getElementById('strBudgetOtherError').style.display = 'inline';
					document.getElementById('strBudgetOtherError').innerHTML = '(requis)'; 
					
					if(Focus=="")
					{
						Focus = "true";
						strBudgetOther.focus();
					}
					Invalide = false;
				}
			}
			
			
			if(strStart.value == 'Choisissez') 
			{ 
				strStart.style.border = '2px solid #FF0000';
				document.getElementById('strStartError').style.display = 'inline';
				document.getElementById('strStartError').innerHTML = '(requis)'; 
				
				if(Focus=="")
				{
					Focus = "true";
					strStart.focus();
				}
				Invalide = false;
			}
			if(strStart.value == 'Autre')
			{
				if(strStartOther.value == '') 
				{ 
					strStartOther.style.border = '2px solid #FF0000';
					document.getElementById('strStartOtherError').style.display = 'inline';
					document.getElementById('strStartOtherError').innerHTML = '(requis)'; 
					
					if(Focus=="")
					{
						Focus = "true";
						strStartOther.focus();
					}
					Invalide = false;
				}
			}
			
			if(strAnnee.value == 'Choisissez') 
			{ 
				strAnnee.style.border = '2px solid #FF0000';
				document.getElementById('strAnneeError').style.display = 'inline';
				document.getElementById('strAnneeError').innerHTML = '(requis)'; 
				
				if(Focus=="")
				{
					Focus = "true";
					strAnnee.focus();
				}
				Invalide = false;
			}
			
			if(strDispos.checked == 0) 
			{ 
				document.getElementById('strDisposError').style.display = 'inline';
				document.getElementById('strDisposError').innerHTML = '(requis)'; 
				
				if(Focus=="")
				{
					Focus = "true";
					strDispos.focus();
				}
				Invalide = false;
			}
			
		}



















		

		if(strLearnedAbout.value == 'Choisissez') 
   		{ 
   		    strLearnedAbout.style.border = '2px solid #FF0000';
   		    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 = '2px solid #FF0000';
				document.getElementById('strLearnedAboutOtherError').style.display = 'inline';
				document.getElementById('strLearnedAboutOtherError').innerHTML = '(requis)'; 
				
				if(Focus=="")
				{
					Focus = "true";
					strLearnedAboutOther.focus();
				}
				Invalide = false;
			}
		}
   		if(strSecurity.value.toLowerCase() != FormSecurite.value.toLowerCase()) 
   		{ 
   		    strSecurity.style.border = '2px solid #FF0000';
   		    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("@"));
    }
	
	
	
	function formatPhone()
{
     var theCount = 0;
     var theString = document.getElementById('strPhone').value;
     var newString = "";
     var myString = theString;
     var theLen = myString.length;
     for ( var i = 0 ; i < theLen ; i++ )
     {
     // Character codes for ints 1 - 9 are 48 - 57
          if ( (myString.charCodeAt(i) >= 48 ) && (myString.charCodeAt(i) <= 57) )
          newString = newString + myString.charAt(i);   
     }
// Now the validation to determine that the remaining string is 9 characters.
     if (newString.length == 10 )
     {
// Now the string has been stripped of other chars it can be reformatted to ###-##-#### 
          var newLen = newString.length;
          var newPhone = "";
          for ( var i = 0 ; i < newLen ; i++ )
          {
               if ( ( i == 2 ) || ( i == 5 ) )
               {
                    newPhone = newPhone + newString.charAt(i) + "-";
               }else{
                    newPhone = newPhone + newString.charAt(i);
               }
          }
          return true;
     }else{
          return false;
     }
}
