	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'); 


        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.borderColor = '#000000';
   		strNom.style.borderColor  = '#000000';
   		strEmail.style.borderColor  = '#000000';
   		strEmail2.style.borderColor  = '#000000';
   		strPhone.style.borderColor  = '#000000';
		strSecurity.style.borderColor  = '#000000';
		strLearnedAbout.style.borderColor  = '#000000';
		strLearnedAboutOther.style.borderColor  = '#000000';
		

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(strPhone.value == '') 
   		{ 
   		    strPhone.style.border = '2px solid #FF0000';
   		    document.getElementById('strPhoneError').style.display = 'inline';
   		    document.getElementById('strPhoneError').innerHTML = '(requis)'; 
			
			if(Focus=="")
			{
				Focus = "true"
				document.getElementById('strPhone').focus();
			}
   		    Invalide = false;
   		}
   		if(checkInternationalPhone(strPhone.value)==false) 
   		{ 
   		    strPhone.style.borderColor = 'red';
   		    document.getElementById('strPhoneError').style.display = 'inline';
   		    document.getElementById('strPhoneError').innerHTML = '(invalide)'; 
			
			if(Focus=="")
			{
				Focus = "true"
				document.getElementById('strPhone').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("@"));
    }
	
	
/*  PHONE VALIDATION*/

var digits = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()- ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";
// Minimum no of digits in an international phone no.
var minDigitsInIPhoneNumber = 10;

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    return true;
}
function trim(s)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not a whitespace, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (c != " ") returnString += c;
    }
    return returnString;
}
function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function checkInternationalPhone(strPhone){
	var bracket=3
	strPhone=trim(strPhone)
	if(strPhone.indexOf("+")>1) return false
	if(strPhone.indexOf("-")!=-1)bracket=bracket+1
	if(strPhone.indexOf("(")!=-1 && strPhone.indexOf("(")>bracket)return false
	var brchr=strPhone.indexOf("(")
	if(strPhone.indexOf("(")!=-1 && strPhone.charAt(brchr+2)!=")")return false
	if(strPhone.indexOf("(")==-1 && strPhone.indexOf(")")!=-1)return false
	s=stripCharsInBag(strPhone,validWorldPhoneChars);
	return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}
