// fonction pour afficher l'adresse de facturation

afficheFacturation = function(){
							var adresse_other = document.getElementById('adresse_other');
							var adresse_self = document.getElementById('adresse_self');
							if (!adresse_other || !adresse_self) return;
							var monDiv = document.getElementById('facturation');
								adresse_other.onclick= function(){	
									monDiv.style.display = 'block';		
								}
								adresse_self.onclick= function(){	
									monDiv.style.display = 'none';		
								}
						}

addEvent(window, "load", afficheFacturation);

	function limite(textarea, max)
{
    if(textarea.value.length >= max)
    {
        textarea.value = textarea.value.substring(0,max);
    }
    var reste = max - textarea.value.length;
    var affichage_reste =  reste + ' caractÃ¨res restants';
    document.getElementById('max_desc').innerHTML = affichage_reste;
}
	

var Functions_2 = {
	Start: function(){
	
		if(document.getElementById('identify')) Functions_2.lostmail_Form();
		if(document.getElementById('identify')) Functions_2.identification_Form();
		if(document.getElementById('newsletter')) Functions_2.Newsletter_Form();
		if(document.getElementById('mail_form')) Functions_2.Mail_Form();
		if(document.getElementById('address_form')) Functions_2.Address_Form();
		if(document.getElementById('order_form') && document.getElementById('page').className == 'checkout-4') Functions_2.Order_Form();
		if(document.getElementById('btn-discount')) Functions_2.Pop_In_Discount();
		if(document.getElementById('search_form')) Functions_2.Search_Form(document.getElementById('search_form'));
	},
	
	Search_Form: function(Form){
		var Error_in_Page = false,
			Error_Message = 'The form isn\'t correctly filled in \n',
			Chp_Area_Code = document.getElementById('area_code'),
			Chp_Post_Code = document.getElementById('post_code'),
			storetype = document.getElementById('storetype');
		
		Form.onsubmit = function(){
			// refine search : if completed, no error
			if(storetype && storetype.value) {return true;}
			
			if(Chp_Area_Code.value != '' && !/^[a-zA-Z][a-zA-Z0-9]{0,3}$/.test(Chp_Area_Code.value)){
				Error_in_Page = true;
				Error_Message += '- Area Code : invalid format \n';
				Field_in_Red(Chp_Area_Code);
			}else{
				Gray_Field(Chp_Area_Code);
			}
			
			if(Chp_Post_Code.value != '' && !/^\d[a-zA-Z]{2}$/.test(Chp_Post_Code.value)){
				Error_in_Page = true;
				Error_Message += '- Post Code : invalid format \n';
				Field_in_Red(Chp_Post_Code);
			}else{
				Gray_Field(Chp_Post_Code);
			}
			
			if(Chp_Area_Code.value == '' || Chp_Post_Code.value == '') {
				Error_in_Page = true;
				Error_Message += '- Post Code : Mandatory Field \n';
			}
			if(Chp_Area_Code.value == '') {Field_in_Red(Chp_Area_Code);}
			if(Chp_Post_Code.value == '') {Field_in_Red(Chp_Post_Code);}
			
			if(Error_in_Page == true){
				alert(Error_Message);
				Error_Message = 'The form isn\'t correctly filled in \n';
				Error_in_Page = false;
				return false;
			}else{
				return true;
			}
		};
		
		function Field_in_Red(obj){obj.style.border = '1px solid red';}
		function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
	},
	
	Pop_In_Discount: function(){
		document.getElementById('btn-discount').onclick = function(){
			if(window.pageYOffset){document.getElementById('messagesent').style.top = (250+window.pageYOffset) + 'px';}
			else{document.getElementById('messagesent').style.top = (250+document.documentElement.scrollTop) + 'px';}
			document.getElementById('messagesent').style.display = 'block';
			return false;
		}
	},
	
	Newsletter_Form: function() {
		var Email = document.getElementById('newsletter');
		
		Email.form.onsubmit = function() {
			var Form_Error = false,
				Error_Msg = 'Address email \n';
			
			if(Email.value == ''){
				Form_Error = true;
				Error_Msg += '- Address Email: Mandatory Field \n';
				Red_Field(Email);
			}else{
					var email_newsletter = Email.value.toLowerCase(); 
					if (email_newsletter.search(/^[a-zA-Z0-9\-_]+[a-zA-Z0-9\.\-_]*@[a-zA-Z0-9\-_]+\.[a-zA-Z\.\-_]{1,}[a-zA-Z\-_]+$/) == -1)
					{
					Form_Error = true;
					Error_Msg += '- Email incorrect \n';
					Red_Field(Email);
				}else
				Gray_Field(Email);
			}
				
			if(Form_Error == true){alert(Error_Msg);return false;}
			else{return true;}
			
			function Red_Field(obj){obj.style.border = '1px solid red';}
			function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
		};
	},
	
	identification_Form: function() {
		var Email = document.getElementById('email');
		var Password = document.getElementById('password');
		
		Email.form.onsubmit = function() {
			var Form_Error = false,
				Error_Msg = 'Error(s) : \n \n';
			
			if(Email.value == ''){
				Form_Error = true;
				Error_Msg += '- Address Email: Mandatory Field \n';
				Red_Field(Email);
			}else{
				var email_identification = Email.value.toLowerCase(); 
					if (email_identification.search(/^[a-zA-Z0-9\-_]+[a-zA-Z0-9\.\-_]*@[a-zA-Z0-9\-_]+\.[a-zA-Z\.\-_]{1,}[a-zA-Z\-_]+$/) == -1)
					{
					Form_Error = true;
					Error_Msg += '- Address Email: Email incorrect \n';
					Red_Field(Email);
				}else
				Gray_Field(Email);
			}
			if(Password.value == ''){
			Form_Error = true;
				Error_Msg += '- Password: invalid password \n';
				Red_Field(Email);
			}else{
					Gray_Field(Password);
				}
			
			if(Form_Error == true){alert(Error_Msg);return false;}
			else{return true;}
			
			function Red_Field(obj){obj.style.border = '1px solid red';}
			function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
		};
	},
	
	
	lostmail_Form: function() {
		var Email = document.getElementById('lostpassword');
		if(Email){
		Email.form.onsubmit = function() {
			var Form_Error = false,
				Error_Msg = 'Email \n';
			
			if(Email.value == ''){
				Form_Error = true;
				Error_Msg += '- Adresse Email: Mandatory field \n';
				Red_Field(Email);
			}else{
				var email_lostpassword = Email.value.toLowerCase(); 
					if (email_lostpassword.search(/^[a-zA-Z0-9\-_]+[a-zA-Z0-9\.\-_]*@[a-zA-Z0-9\-_]+\.[a-zA-Z\.\-_]{1,}[a-zA-Z\-_]+$/) == -1)
					{
					Form_Error = true;
					Error_Msg += '- Email incorrect \n';
					Red_Field(Email);
				}else
				Gray_Field(Email);
			}
				
			if(Form_Error == true){alert(Error_Msg);return false;}
			else{var email = document.getElementById("lostpassword").value;
 			var storeId=document.getElementById("storeId").value;
 			affichDetail('ResetPassword?URL=ClarinsForgotMyPasswordView&logonId='+email+'&challengeAnswer=-&storeId='+storeId,'details_box');
 			return false;
 			}
			
			function Red_Field(obj){obj.style.border = '1px solid red';}
			function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
		};
		}
	},
	
	Mail_Form: function(){
		if(document.getElementById('mail_form').className == 'newsletter-registration'){
			Functions_2.Formulaires.Check_Radio_Title(document.getElementById('mail_form'));
			Functions_2.Formulaires.NL_Registration(document.getElementById('mail_form'));
		}
	},
	
	Address_Form: function(){
		var AdressForm = document.getElementById('address_form');
		
		if(document.getElementById('country')) Functions_2.Formulaires.Country_Restriction();
		
		if(AdressForm.className == 'shipping') Functions_2.Formulaires.shipping(AdressForm);
		
		if(AdressForm.className == 'ask-clarins' || AdressForm.className == 'join-clarins' || AdressForm.className == 'join-clarins_qas'){
			Functions_2.Formulaires.Check_Radio_Title(AdressForm);
			if(document.getElementById('subject')){Functions_2.Formulaires.Send_Question(AdressForm);}
			else if(document.getElementById('page').className == 'checkout-2a'){Functions_2.Formulaires.Checkout_2a();}
			else if(document.getElementById('page').className == 'change-details'){Functions_2.Formulaires.Change_Details();}
			else if(document.getElementById('page').className == 'address-mgmt'){Functions_2.Formulaires.Address_Mgmt();}
			else if(document.getElementById('page').className == 'tunnel-address-mgmt'){Functions_2.Formulaires.Tunnel_Address_Mgmt();}
			else if(document.getElementById('page').className == 'join-clarins-qas'){Functions_2.Formulaires.Join_Clarins_qas(AdressForm);}
			else{Functions_2.Formulaires.Join_Clarins(AdressForm);}
		}
	},
	
	Order_Form: function(){
		var OrderForm = document.getElementById('order_form');
		var Card_Type = document.getElementById('type');
		
		//var Debit_Card = new Array('visa_debit', 'visa_electron', 'uk_maestro', 'solo', 'delta');
		//var Credit_Card = new Array('visa', 'mastercard', 'jcb','amex');
		
		//var Issue_Number = document.getElementById('issue_number');
		//var Block_Start_Date = document.getElementById('start-month').parentNode;
		var name = document.getElementById('name');
		
		//Check_Card_Type();
		
		//Card_Type.onchange = function(){Check_Card_Type();}
		
		//function Check_Card_Type(){
			//for(var i = 0; i<Debit_Card.length;i++){
				//if(Card_Type.value == Debit_Card[i]){
				//	Issue_Number.parentNode.style.display = 'block';
				//	if(Debit_Card[i] == 'delta') Block_Start_Date.style.display = 'none';
				//	else Block_Start_Date.style.display = 'block';
				//}
			//}
			
			//for(var i = 0; i<Credit_Card.length;i++){
				//if(Card_Type.value == Credit_Card[i]){
					//Issue_Number.parentNode.style.display = 'none';
				//	Block_Start_Date.style.display = 'none';
				//}
			//}
		
		
		OrderForm.onsubmit = function(){
			var Error_Message = 'The form isn\'t correctly filled in \n';
			var maReg = new RegExp ( "^[a-zA-Z][ a-zA-Z]*[a-zA-Z]$", "gi" );
			var date = new Date();
			var year = date.getFullYear();
			var month = date.getMonth()+1;
			
			
			
			if ( (name.value.search( maReg )) == -1  || (name.value == ''))
			{
					var Error_in_Page = true;
					Error_Message += '- Name : invalid format \n';
					Field_in_Red(document.getElementById('name'));
			}
			else
			{
					Gray_Field(document.getElementById('name'));
			}
			
			var number = document.getElementById('number');
			
			
			if(/^[\d\s]{15,20}$/.test(number.value) && number.value.match(/\d/g).length >= 15)
			{
				Gray_Field(document.getElementById('number'));
			}
			else
			{
				var Error_in_Page = true;
				Error_Message += '- Credit card number incorrect \n';
				Field_in_Red(document.getElementById('number'));	
				
			}
			
			
			
			
			if((document.getElementById('expiry-month').value < month)&&(document.getElementById('expiry-year').value == year)){
				var Error_in_Page = true;
				Error_Message += '- Expiry date : Date expired \n';
				Field_in_Red(document.getElementById('expiry-year'));
				Field_in_Red(document.getElementById('expiry-month'));
				}
				 else if(document.getElementById('expiry-year').value < year){
				var Error_in_Page = true;
				Error_Message += '- Expiry date : Date expired \n';
				Field_in_Red(document.getElementById('expiry-year'));
				Field_in_Red(document.getElementById('expiry-month'));
				}
				else
				{
				Gray_Field(document.getElementById('expiry-year'));
				Gray_Field(document.getElementById('expiry-month'));
				}
			
			
			
			
			
			
			
			
			
			var security_code = document.getElementById('security_code');
			
			if ((isNaN(security_code.value)) || (security_code.value.length < 3) || (security_code == ''))
			{
				var Error_in_Page = true;
				Error_Message += '- Security code incorrect \n';
				Field_in_Red(document.getElementById('security_code'));
			}
			else
			{
				Gray_Field(document.getElementById('security_code'));
			}
			
			/*for(var i = 0; i<Debit_Card.length;i++){
				if(Card_Type.value == Debit_Card[i] && Issue_Number.value.length != 2){
					var Error_in_Page = true;
					Error_Message += '- Issue Number : 2 characters required \n';
					Field_in_Red(Issue_Number);
				}
				
				if(Card_Type.value == Debit_Card[i] && Issue_Number.value.length == 2){Gray_Field(Issue_Number);}
			}*/
			
			if(Error_in_Page == true){alert(Error_Message);return false;}
			else{return true;}
		}
		
		function Field_in_Red(obj){obj.style.border = '1px solid red';}
		function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
	},
	
	Formulaires:{
	
		shipping: function(Form){
		var InputsForm = Form.getElementsByTagName('input');
			
			var Chps_Firstname = document.getElementById('firstname');
			var Chps_Lastname = document.getElementById('lastname');
			var Chps_Address = document.getElementById('address_line_1');
			var Chps_City = document.getElementById('city');
			var Chps_Area_Code = document.getElementById('area_code');
			var Chps_Post_Code = document.getElementById('post_code');
			var Chps_Email = document.getElementById('email');
			var Chps_Email_Confirm = document.getElementById('email_confirm');
			var zip = document.getElementById('zip');
			var phone = document.getElementById('phone');
			var Title_Checked,livraison;
			var country = document.getElementById('country');
			var password =  document.getElementById('password');
			var password_confirm =  document.getElementById('password_confirm');
			
			
			
			Form.onsubmit = function(){
			
			if(document.getElementById("address_form")){
		
				var form=document.getElementById("address_form");
				if(form.year && form.month && form.day && form.year.value != '' && form.month.value != '' && form.day.value !=''){
						if(form.day.value<10 && form.month.value<10)
							form.demographicField5.value=form.year.value+"/0"+form.month.value+"/0"+form.day.value;	
						else if(form.day.value<10)	
							form.demographicField5.value=form.year.value+"/"+form.month.value+"/0"+form.day.value;	
						else if(form.month.value<10)	
							form.demographicField5.value=form.year.value+"/0"+form.month.value+"/"+form.day.value;	
						else 
							form.demographicField5.value=form.year.value+"/"+form.month.value+"/"+form.day.value;		
					}
			}	
			var Error_Msg = 'The form isn\'t correctly filled in \n';
			var Form_Error= false;	
				
				
				for(var i = 0, a;a = InputsForm[i];i++){
					if(InputsForm[i].name == 'personTitle'){
							
						if(InputsForm[i].checked){Title_Checked = InputsForm[i].value;}
						
					}
					
										
				}
				if (!Title_Checked){ 
					Error_Msg += '- Genre : Mandatory Field \n';
					Form_Error = true;
				}
				
				if(Chps_Firstname.value == ''){
					Form_Error = true;
					Error_Msg += '- First name : Mandatory Field \n';
					Red_Field(Chps_Firstname);
				}else{
					Gray_Field(Chps_Firstname);
				}
				
				if(Chps_Lastname.value == ''){
					Form_Error = true;
					Error_Msg += '- Last name : Mandatory Field \n';
					Red_Field(Chps_Lastname);
				}else{
					Gray_Field(Chps_Lastname);
				}
				
				if(Chps_Address.value == ''){
					Form_Error = true;
					Error_Msg += '- Adresse ligne 1 : Mandatory Field \n';
					Red_Field(Chps_Address);
				}else{
					Gray_Field(Chps_Address);
				}
				
				if(Chps_City.value == ''){
					Form_Error = true;
					Error_Msg += '- City : Mandatory Field \n';
					Red_Field(Chps_City);
				}else{
					Gray_Field(Chps_City);
				}
				
				if(zip.value == '' ){
							Form_Error = true;
							Error_Msg += '- Zip code : Mandatory Field \n';
							Red_Field(zip);
						}else{
							
							Gray_Field(zip);
							if (isNaN(zip.value) && country.value=="US" ) {
								Form_Error = true;
								Error_Msg += '- Zip code : number format invalid \n';
								Red_Field(zip);
							}
							else
							{
							if (utf8StringByteLength(trim(zip.value)) < '5'){
							Error_Msg += ' - Zip code : string size does not meet minimum length expected (5) \n';
							Red_Field(zip);
							}
							}
							
						}
				
				if(phone.value == ''){
					Form_Error = true;
					Error_Msg += '- Phone number : Mandatory Field \n';
					Red_Field(phone);
				}else{
					//phone.value = phone.value.replace(/\D/g, '');
					Gray_Field(phone);
					var phoneValue = phone.value;
					if (phoneValue.length < 14 && country.value=="US" ){
						Form_Error = true;
						Error_Msg += '- Phone number : string size does not meet minimum length expected (14chiffres) \n';
						Red_Field(phone);
					
					}
				}
				
				
				
				if(Chps_Email.value == ''){
					Form_Error = true;
					Error_Msg += '- Adresse email: Mandatory Field \n';
					Red_Field(Chps_Email);
				}else{
					var email = Chps_Email.value.toLowerCase(); 
					if (email.search(/^[a-zA-Z0-9\-_]+[a-zA-Z0-9\.\-_]*@[a-zA-Z0-9\-_]+\.[a-zA-Z\.\-_]{1,}[a-zA-Z\-_]+$/) == -1)
					{
						Form_Error = true;
						Error_Msg += '- Email incorrect \n';
						Red_Field(Chps_Email);
					}else
					Gray_Field(Chps_Email);
				}
				
				if(Chps_Email_Confirm.value == ''){
					Form_Error = true;
					Error_Msg += '- Email confirmation : Mandatory Field \n';
					Red_Field(Chps_Email_Confirm);
				}else{
					var email_confirm = Chps_Email_Confirm.value.toLowerCase(); 
					if (email_confirm.search(/^[a-zA-Z0-9\-_]+[a-zA-Z0-9\.\-_]*@[a-zA-Z0-9\-_]+\.[a-zA-Z\.\-_]{1,}[a-zA-Z\-_]+$/) == -1)
					{
						Form_Error = true;
						Error_Msg += '- Email confirmation incorrect \n';
						Red_Field(Chps_Email_Confirm);
					}else
					Gray_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Email.value != Chps_Email_Confirm.value && Chps_Email_Confirm.value != ''){
					Form_Error = true;
					Error_Msg += '-Email & Re-type email : Fields aren\'t equivalent \n';
					Red_Field(Chps_Email_Confirm);
				}
				
				
				// si on livre Ã  une personne 
				
				
				for(var i = 0, a;a = InputsForm[i];i++){
					if(InputsForm[i].name == 'livraison'){
							
						if(InputsForm[i].checked){livraison = InputsForm[i].value;}
						
					}
					
										
				}
				if (!livraison) Error_Msg += '- Choisissez une adresse de livraison \n';
				
				if (livraison=='adresse_other') {
				
						
						
						
						var Chps_Firstname2 = document.getElementById('firstname2');
						var Chps_Lastname2 = document.getElementById('lastname2');
						var Chps_Address2 = document.getElementById('address_line_1bis');
						var Chps_City2 = document.getElementById('city2');
						var Chps_Email2 = document.getElementById('email2');
						var Chps_Email_Confirm2 = document.getElementById('email_confirm2');
						var zip2 = document.getElementById('zip2');
						var phone2 = document.getElementById('phone2');
						var Title_Checked2;
						var country2 = document.getElementById('country2');
						
						
						for(var i = 0, a;a = InputsForm[i];i++){
							if(InputsForm[i].name == 'personTitle2'){
								if(InputsForm[i].checked){Title_Checked2 = InputsForm[i].value;}
							}				
						}
						if (!Title_Checked2) {
							Form_Error = true;
							Error_Msg += '- Genre facturation: Mandatory Field \n';
						}
						
						
						if(Chps_Firstname2.value == ''){
											Form_Error = true;
											Error_Msg += '- Prénom facturation : Mandatory Field \n';
											Red_Field(Chps_Firstname2);
										}else{
											Gray_Field(Chps_Firstname2);
										}
										
										if(Chps_Lastname2.value == ''){
											Form_Error = true;
											Error_Msg += '- Nom facturation : Mandatory Field \n';
											Red_Field(Chps_Lastname2);
										}else{
											Gray_Field(Chps_Lastname2);
										}						
						
						
						if(Chps_Address2.value == ''){
							Form_Error = true;
							Error_Msg += '- Adresse ligne 1 facturation : Mandatory Field \n';
							Red_Field(Chps_Address2);
						}else{
							Gray_Field(Chps_Address2);
						}
						
						if(Chps_City2.value == ''){
							Form_Error = true;
							Error_Msg += '- Ville facturation : Mandatory Field \n';
							Red_Field(Chps_City2);
						}else{
							Gray_Field(Chps_City2);
						}
						
						if(zip2.value == '' ){
							Form_Error = true;
							Error_Msg += '- Code postal facturation : Mandatory Field \n';
							Red_Field(zip2);
						}else{
							
							Gray_Field(zip2);
							if (!/[0-9]{5}/.test(zip2.value) && country2.value=="FR" ) {
								Form_Error = true;
								Error_Msg += '- Code postal facturation : Mandatory Field \n';
								Red_Field(zip2);
							}
						}
						
						if(phone2.value == ''){
							Form_Error = true;
							Error_Msg += '- Telephone  facturation : Mandatory Field \n';
							Red_Field(phone2);
						}else{
							Gray_Field(phone2);
						}
						
						
						if(Chps_Email2.value == ''){
							Form_Error = true;
							Error_Msg += '- Adresse email : Mandatory Field \n';
							Red_Field(Chps_Email2);
						}else{
							if (Chps_Email2.value.indexOf("@") == "-1" || Chps_Email2.value.indexOf(".") == "-1"){
								Form_Error = true;
								Error_Msg += '- Email n\'est pas saisi correctement \n';
								Red_Field(Chps_Email2);
							}else
							Gray_Field(Chps_Email2);
						}
						
						if(Chps_Email_Confirm2.value == ''){
							Form_Error = true;
							Error_Msg += '- Email confirmation facturation: Mandatory Field \n';
							Red_Field(Chps_Email_Confirm2);
						}else{
							if (Chps_Email_Confirm2.value.indexOf("@") == "-1" || Chps_Email_Confirm2.value.indexOf(".") == "-1"){
								Form_Error = true;
								Error_Msg += '- Email confirmation facturation n\'est pas saisi correctement \n';
								Red_Field(Chps_Email_Confirm2);
							}else
							Gray_Field(Chps_Email_Confirm2);
						}
						
						if(Chps_Email2.value != Chps_Email_Confirm2.value && Chps_Email_Confirm2.value != ''){
							Form_Error = true;
							Error_Msg += '- Les champs email ne sont pas Ã©quivalents \n';
							Red_Field(Chps_Email_Confirm);
						}
						
						
				
				}
				//pour clarins and me
				
				if (password && password_confirm)
				{
					if (password.value != password_confirm.value && password.value!= '' && password_confirm.value != ''){
						
							Form_Error=true;
							Error_Msg += '- Fields aren\'t equivalent \n';
							Red_Field(password);
					}else {
						Gray_Field(password);
						Gray_Field(password_confirm);
							
					}
					if (password.value==''){
							Form_Error=true;
							Error_Msg += '- your password : Mandatory Field \n';
							Red_Field(password);
					}
					
					if (password_confirm.value==''){
							Form_Error=true;
							Error_Msg += '- Re-enter your password: Mandatory Field \n';
							Red_Field(password_confirm);
					}
				}
				if(Form_Error == true){alert(Error_Msg);return false;}
				else{return true;}
			};
			
			function Red_Field(obj){obj.style.border = '1px solid red';}
			function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
		},
		
	
	
		Check_Radio_Title: function(Form){
			var InputPrecise = document.getElementById('precise');
			var InputsForm = Form.getElementsByTagName('input');
			
			InputPrecise.style.visibility = 'hidden';

			for(var i = 0, a;a = InputsForm[i];i++){
				if(InputsForm[i].name == 'title'){
					if(InputsForm[i].id == 'title_other') InputsForm[i].onclick = function(){InputPrecise.style.visibility = 'visible';}
					else InputsForm[i].onclick = function(){InputPrecise.style.visibility = 'hidden';}
				}
			}
		},
		
		Country_Restriction: function(){
			var Post_Restriction_Error = document.getElementById('address_data').getElementsByTagName('div')[0].innerHTML;
			
			document.getElementById('country').onchange = function(){
				if(this.value == 2){
					var Restriction_Error = '<b class="red" id="restriction_cntry_msg"><br />Sorry Only addresses in UK can register</b>';
					document.getElementById('address_data').getElementsByTagName('div')[0].innerHTML += Restriction_Error;
				}else{
					if(document.getElementById('restriction_cntry_msg')){
						document.getElementById('address_data').getElementsByTagName('div')[0].innerHTML = Post_Restriction_Error;
					}
				}
			}
		},
		
		
		
		
		Join_Clarins: function(Form){
			var InputsForm = Form.getElementsByTagName('input');
			
			var Chps_Precise = document.getElementById('precise');
			var Chps_Firstname = document.getElementById('firstname');
			var Chps_Lastname = document.getElementById('lastname');
			var Chps_Address = document.getElementById('address_line_1');
			var Chps_City = document.getElementById('city');
			var Chps_Area_Code = document.getElementById('area_code');
			var Chps_Post_Code = document.getElementById('post_code');
			var Chps_Email = document.getElementById('email');
			var Chps_Email_Confirm = document.getElementById('email_confirm');
			var Chps_Password = document.getElementById('password');
			var Chps_Password_Confirm = document.getElementById('password_confirm');
			
			Form.onsubmit = function(){
				var Error_Msg = 'The form isn\'t correctly filled in \n';
				
				for(var i = 0, a;a = InputsForm[i];i++){
					if(InputsForm[i].name == 'title'){
						if(InputsForm[i].checked){Title_Checked = InputsForm[i];}
						
						if(InputsForm[i].checked && InputsForm[i].id == 'title_other' && Chps_Precise.value == ''){
							var Form_Error = true;
							Error_Msg += '- Precise Title : Mandatory Field \n';
							Red_Field(Chps_Precise);
						}else{
							Gray_Field(Chps_Precise);
						}
					}
					
					if(InputsForm[i].name == 'gender'){
						if(InputsForm[i].checked){Gender_Checked = InputsForm[i];}
					}
				}
				
				// Vérification Title et Gender
				if(Title_Checked.value == 'Mr.' && Gender_Checked.value == 'Female'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Mr. can\'t be a Female \n';
				}
				
				if(Title_Checked.value == 'Miss.' && Gender_Checked.value == 'Male'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Miss. can\'t be a Male \n';
				}
				
				if(Title_Checked.value == 'Mrs.' && Gender_Checked.value == 'Male'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Mrs. can\'t be a Male \n';
				}
				
				if(Chps_Firstname.value == ''){
					Form_Error = true;
					Error_Msg += '- Firstname : Mandatory Field \n';
					Red_Field(Chps_Firstname);
				}else{
					Gray_Field(Chps_Firstname);
				}
				
				if(Chps_Lastname.value == ''){
					Form_Error = true;
					Error_Msg += '- Lastname : Mandatory Field \n';
					Red_Field(Chps_Lastname);
				}else{
					Gray_Field(Chps_Lastname);
				}
				
				if(Chps_Address.value == ''){
					Form_Error = true;
					Error_Msg += '- Address Line 1 : Mandatory Field \n';
					Red_Field(Chps_Address);
				}else{
					Gray_Field(Chps_Address);
				}
				
				if(Chps_City.value == ''){
					Form_Error = true;
					Error_Msg += '- Town / City : Mandatory Field \n';
					Red_Field(Chps_City);
				}else{
					Gray_Field(Chps_City);
				}
				
				if(Chps_Area_Code.value != '' && !/^[a-zA-Z][a-zA-Z0-9]{0,3}$/.test(Chps_Area_Code.value)){
					Form_Error = true;
					Error_Msg += '- Area Code : invalid format \n';
					Red_Field(Chps_Area_Code);
				}else{
					Gray_Field(Chps_Area_Code);
				}
				
				if(Chps_Area_Code.value == '' || Chps_Post_Code.value == ''){
					Form_Error = true;
					Error_Msg += '- Post Code : Mandatory Field \n';
				}
				
				if(Chps_Post_Code.value != '' && !/^\d[a-zA-Z]{2}$/.test(Chps_Post_Code.value)) {
					Form_Error = true;
					Error_Msg += '- Post Code : invalid format \n';
					Red_Field(Chps_Post_Code);
				}else{
					Gray_Field(Chps_Post_Code);
				}
				
				if(Chps_Area_Code.value == '') Red_Field(Chps_Area_Code);
				if(Chps_Post_Code.value == '') Red_Field(Chps_Post_Code);
				
				if(document.getElementById('country').value == 2){
					Form_Error = true;
					Error_Msg += '- Country : Only addresses in UK can register \n';
				}
				
				if(Chps_Email.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address: Mandatory Field \n';
					Red_Field(Chps_Email);
				}else{
					Gray_Field(Chps_Email);
				}
				
				if(Chps_Email_Confirm.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : Mandatory Field \n';
					Red_Field(Chps_Email_Confirm);
				}else{
					Gray_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Email.value != Chps_Email_Confirm.value && Chps_Email_Confirm.value != ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : False \n';
					Red_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Password.value == ''){
					var Form_Error = true;
					Error_Msg += '- Password : Mandatory Field \n';
					Red_Field(Chps_Password);
				}else{
					Gray_Field(Chps_Password);
				}
				
				if(Chps_Password_Confirm.value == ''){
					var Form_Error = true;
					Error_Msg += '- Password Confirm : Mandatory Field \n';
					Red_Field(Chps_Password_Confirm);
				}else{
					Gray_Field(Chps_Password_Confirm);
				}
				
				if(Chps_Password.value != Chps_Password_Confirm.value && Chps_Password_Confirm.value != ''){
					Form_Error = true;
					Error_Msg += '- Password Confirm : False \n';
					Red_Field(Chps_Password_Confirm);
				}
				
				if(Form_Error == true){alert(Error_Msg);return false;}
				else{return true;}
			};
			
			function Red_Field(obj){obj.style.border = '1px solid red';}
			function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
		},
		
		
		
		
		
		
		Join_Clarins_qas: function(Form){
			var InputsForm = Form.getElementsByTagName('input');
		
			var Chps_Precise = document.getElementById('precise');
			var Chps_Firstname = document.getElementById('firstname');
			var Chps_Lastname = document.getElementById('lastname');
			var Chps_Area_Code = document.getElementById('area_code');
			var Chps_Post_Code = document.getElementById('post_code');
			var Chps_Email = document.getElementById('email');
			var Chps_Email_Confirm = document.getElementById('email_confirm');
			var Butt_Ok = document.getElementById('ok');
			var Butt_Sel_Address = document.getElementById('select_address');
			var Butt_Sel_Address = document.getElementById('select_address');
			var Address=document.getElementById('address');
			var continueQas=document.getElementById('continueQas');
			var Chps_Password = document.getElementById('password');
			var Chps_Password_Confirm = document.getElementById('password_confirm');
			var Chps_Address1 = document.getElementById('address_line_1');
			var Chps_Address2 = document.getElementById('address_line_2');
			var Chps_Address3 = document.getElementById('address_line_3');
			var Chps_Area_Code2 = document.getElementById('area_code2');
			var Chps_Post_Code2 = document.getElementById('post_code2');
			var Chps_City = document.getElementById('city');
			var Continue_Qas = document.getElementById('continue_qas');
		
			
			
			
			Continue_Qas.onclick = function(){
				var Error_Msg = 'The form isn\'t correctly filled in \n';
				
				for(var i = 0, a;a = InputsForm[i];i++){
					if(InputsForm[i].name == 'title'){
						if(InputsForm[i].checked){Title_Checked = InputsForm[i];}
						
						if(InputsForm[i].checked && InputsForm[i].id == 'title_other' && Chps_Precise.value == ''){
							var Form_Error = true;
							Error_Msg += '- Precise Title : Mandatory Field \n';
							Red_Field(Chps_Precise);
						}else{
							Gray_Field(Chps_Precise);
						}
					}
					
					if(InputsForm[i].name == 'gender'){
						if(InputsForm[i].checked){Gender_Checked = InputsForm[i];}
					}
				}
				
				// Vérification Title et Gender
				/*if(Title_Checked.value == 'Mr.' && Gender_Checked.value == 'Female'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Mr. can\'t be a Female \n';
				}
				
				if(Title_Checked.value == 'Miss.' && Gender_Checked.value == 'Male'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Miss. can\'t be a Male \n';
				}
				
				if(Title_Checked.value == 'Mrs.' && Gender_Checked.value == 'Male'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Mrs. can\'t be a Male \n';
				}*/
				
				
				
				
				
				if(Chps_Firstname.value == ''){
					Form_Error = true;
					Error_Msg += '- Firstname : Mandatory Field \n';
					Red_Field(Chps_Firstname);
				}else{
					Gray_Field(Chps_Firstname);
				}
				
				if(Chps_Lastname.value == ''){
					Form_Error = true;
					Error_Msg += '- Lastname : Mandatory Field \n';
					Red_Field(Chps_Lastname);
				}else{
					Gray_Field(Chps_Lastname);
				}
				
				if(Chps_Area_Code.value != '' && !/^[a-zA-Z][a-zA-Z0-9]{0,3}$/.test(Chps_Area_Code.value)){
					Form_Error = true;
					Error_Msg += '- Area Code : invalid format \n';
					Red_Field(Chps_Area_Code);
				}else{
					Gray_Field(Chps_Area_Code);
				}
				
				if(Chps_Area_Code.value == '' || Chps_Post_Code.value == ''){
					Form_Error = true;
					Error_Msg += '- Post Code : Mandatory Field \n';
				}
				
				if(Chps_Post_Code.value != '' && !/^\d[a-zA-Z]{2}$/.test(Chps_Post_Code.value)) {
					Form_Error = true;
					Error_Msg += '- Post Code : invalid format \n';
					Red_Field(Chps_Post_Code);
				}else{
					Gray_Field(Chps_Post_Code);
				}
				
				if(Chps_Area_Code.value == '') Red_Field(Chps_Area_Code);
				if(Chps_Post_Code.value == '') Red_Field(Chps_Post_Code);
				
				
				if (Chps_Email.value.indexOf("@") == "-1" || Chps_Email.value.indexOf(".") == "-1"){
					Form_Error = true;
					Error_Msg += '- Email Address: Syntax error \n';
					Red_Field(Chps_Email);
				}
				
				if (Chps_Email_Confirm.value.indexOf("@") == "-1" || Chps_Email.value.indexOf(".") == "-1"){
					Form_Error = true;
					Error_Msg += '- Email Confirm: Syntax error \n';
					Red_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Email.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address: Mandatory Field \n';
					Red_Field(Chps_Email);
				}
				
				if(Chps_Email_Confirm.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : Mandatory Field \n';
					Red_Field(Chps_Email_Confirm);
				}else{
					Gray_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Email.value != Chps_Email_Confirm.value && Chps_Email_Confirm.value != ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : False \n';
					Red_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Address1.value == ''){
					var Form_Error = true;
					Error_Msg += '- Address line_1 : Mandatory Field \n';
					Red_Field(Chps_Address1);
				}else{
					Gray_Field(Chps_Address1);
				}
				
				if(Chps_Address2.value == ''){
					var Form_Error = true;
					Error_Msg += '- Address line_2 : Mandatory Field \n';
					Red_Field(Chps_Address2);
				}else{
					Gray_Field(Chps_Address2);
				}
				
				if(Chps_Address3.value == ''){
					var Form_Error = true;
					Error_Msg += '- Address line_3 : Mandatory Field \n';
					Red_Field(Chps_Address3);
				}else{
					Gray_Field(Chps_Address3);
				}
				
				
				
				
				if(Chps_Area_Code2.value != '' && !/^[a-zA-Z][a-zA-Z0-9]{0,3}$/.test(Chps_Area_Code2.value)){
					Form_Error = true;
					Error_Msg += '- Area Code : invalid format \n';
					Red_Field(Chps_Area_Code2);
				}else{
					Gray_Field(Chps_Area_Code2);
				}
				
				if(Chps_Area_Code2.value == '' || Chps_Post_Code2.value == ''){
					Form_Error = true;
					Error_Msg += '- Post Code : Mandatory Field \n';
				}
				
				if(Chps_Post_Code2.value != '' && !/^\d[a-zA-Z]{2}$/.test(Chps_Post_Code2.value)) {
					Form_Error = true;
					Error_Msg += '- Post Code : invalid format \n';
					Red_Field(Chps_Post_Code2);
				}else Gray_Field(Chps_Post_Code2);
				
				if(Chps_Area_Code2.value == '') Red_Field(Chps_Area_Code2);
					
					
				if(Chps_Post_Code2.value == '') Red_Field(Chps_Post_Code2);
					
				
				if(Chps_City.value == ''){
					Form_Error = true;
					Error_Msg += '- Town / City : Mandatory Field \n';
					Red_Field(Chps_City);
				}else{
					Gray_Field(Chps_City);
				}
				
				
				
				if(Form_Error == true){alert(Error_Msg);return false;}
				else{
					var affiche = document.getElementById('qas_content2');
					affiche.style.display ='block';
					var NomDiv=document.getElementById("full_address");
					NomDiv.style.display ='block';
					return true;}
			};
			
			function Red_Field(obj){obj.style.border = '1px solid red';}
			function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
			
			
			
			
			
			
			
			Butt_Sel_Address.onclick = function(){
				
				if (Address.value!=("no")){
					var NomDiv=document.getElementById("full_address");
					NomDiv.style.display ='none';
				}
			}
			
			Butt_Ok.onclick = function(){
				var Error_Msg = 'The form isn\'t correctly filled in \n';
				
				for(var i = 0, a;a = InputsForm[i];i++){
					if(InputsForm[i].name == 'title'){
						if(InputsForm[i].checked){Title_Checked = InputsForm[i];}
						
						if(InputsForm[i].checked && InputsForm[i].id == 'title_other' && Chps_Precise.value == ''){
							var Form_Error = true;
							Error_Msg += '- Precise Title : Mandatory Field \n';
							Red_Field(Chps_Precise);
						}else{
							Gray_Field(Chps_Precise);
						}
					}
					
					if(InputsForm[i].name == 'gender'){
						if(InputsForm[i].checked){Gender_Checked = InputsForm[i];}
					}
				}
				
				// Vérification Title et Gender
				/*if(Title_Checked.value == 'Mr.' && Gender_Checked.value == 'Female'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Mr. can\'t be a Female \n';
				}
				
				if(Title_Checked.value == 'Miss.' && Gender_Checked.value == 'Male'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Miss. can\'t be a Male \n';
				}
				
				if(Title_Checked.value == 'Mrs.' && Gender_Checked.value == 'Male'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Mrs. can\'t be a Male \n';
				}*/
				
				
				
				
				
				if(Chps_Firstname.value == ''){
					Form_Error = true;
					Error_Msg += '- Firstname : Mandatory Field \n';
					Red_Field(Chps_Firstname);
				}else{
					Gray_Field(Chps_Firstname);
				}
				
				if(Chps_Lastname.value == ''){
					Form_Error = true;
					Error_Msg += '- Lastname : Mandatory Field \n';
					Red_Field(Chps_Lastname);
				}else{
					Gray_Field(Chps_Lastname);
				}
				
				if(Chps_Area_Code.value != '' && !/^[a-zA-Z][a-zA-Z0-9]{0,3}$/.test(Chps_Area_Code.value)){
					Form_Error = true;
					Error_Msg += '- Area Code : invalid format \n';
					Red_Field(Chps_Area_Code);
				}else{
					Gray_Field(Chps_Area_Code);
				}
				
				if(Chps_Area_Code.value == '' || Chps_Post_Code.value == ''){
					Form_Error = true;
					Error_Msg += '- Post Code : Mandatory Field \n';
				}
				
				if(Chps_Post_Code.value != '' && !/^\d[a-zA-Z]{2}$/.test(Chps_Post_Code.value)) {
					Form_Error = true;
					Error_Msg += '- Post Code : invalid format \n';
					Red_Field(Chps_Post_Code);
				}else{
					Gray_Field(Chps_Post_Code);
				}
				
				if(Chps_Area_Code.value == '') Red_Field(Chps_Area_Code);
				if(Chps_Post_Code.value == '') Red_Field(Chps_Post_Code);
				
				
				if (Chps_Email.value.indexOf("@") == "-1" || Chps_Email.value.indexOf(".") == "-1"){
					Form_Error = true;
					Error_Msg += '- Email Address: Syntax error \n';
					Red_Field(Chps_Email);
				}
				
				if (Chps_Email_Confirm.value.indexOf("@") == "-1" || Chps_Email.value.indexOf(".") == "-1"){
					Form_Error = true;
					Error_Msg += '- Email Confirm: Syntax error \n';
					Red_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Email.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address: Mandatory Field \n';
					Red_Field(Chps_Email);
				}else{
					Gray_Field(Chps_Email);
				}
				
				if(Chps_Email_Confirm.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : Mandatory Field \n';
					Red_Field(Chps_Email_Confirm);
				}else{
					Gray_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Email.value != Chps_Email_Confirm.value && Chps_Email_Confirm.value != ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : False \n';
					Red_Field(Chps_Email_Confirm);
				}
				
				if(Form_Error == true){alert(Error_Msg);return false;}
				else{
					var affiche = document.getElementById('qas_content2');
					affiche.style.display ='block';
					var NomDiv=document.getElementById("full_address");
					NomDiv.style.display ='block';
					return true;}
			};
			
			function Red_Field(obj){obj.style.border = '1px solid red';}
			function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
			
			
			
			
			
			Form.onsubmit = function(){
			
				var Error_Msg = 'The form isn\'t correctly filled in \n';
				
				for(var i = 0, a;a = InputsForm[i];i++){
					if(InputsForm[i].name == 'title'){
						if(InputsForm[i].checked){Title_Checked = InputsForm[i];}
						
						if(InputsForm[i].checked && InputsForm[i].id == 'title_other' && Chps_Precise.value == ''){
							var Form_Error = true;
							Error_Msg += '- Precise Title : Mandatory Field \n';
							Red_Field(Chps_Precise);
						}else{
							Gray_Field(Chps_Precise);
						}
					}
					
					if(InputsForm[i].name == 'gender'){
						if(InputsForm[i].checked){Gender_Checked = InputsForm[i];}
					}
				}
				
				// Vérification Title et Gender
				if(Title_Checked.value == 'Mr.' && Gender_Checked.value == 'Female'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Mr. can\'t be a Female \n';
				}
				
				if(Title_Checked.value == 'Miss.' && Gender_Checked.value == 'Male'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Miss. can\'t be a Male \n';
				}
				
				if(Title_Checked.value == 'Mrs.' && Gender_Checked.value == 'Male'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Mrs. can\'t be a Male \n';
				}
				
				if(Chps_Firstname.value == ''){
					Form_Error = true;
					Error_Msg += '- Firstname : Mandatory Field \n';
					Red_Field(Chps_Firstname);
				}else{
					Gray_Field(Chps_Firstname);
				}
				
				if(Chps_Lastname.value == ''){
					Form_Error = true;
					Error_Msg += '- Lastname : Mandatory Field \n';
					Red_Field(Chps_Lastname);
				}else{
					Gray_Field(Chps_Lastname);
				}
				
				if(Chps_Area_Code.value != '' && !/^[a-zA-Z][a-zA-Z0-9]{0,3}$/.test(Chps_Area_Code.value)){
					Form_Error = true;
					Error_Msg += '- Area Code : invalid format \n';
					Red_Field(Chps_Area_Code);
				}else{
					Gray_Field(Chps_Area_Code);
				}
				
				if(Chps_Area_Code.value == '' || Chps_Post_Code.value == ''){
					Form_Error = true;
					Error_Msg += '- Post Code : Mandatory Field \n';
				}
				
				if(Chps_Post_Code.value != '' && !/^\d[a-zA-Z]{2}$/.test(Chps_Post_Code.value)) {
					Form_Error = true;
					Error_Msg += '- Post Code : invalid format \n';
					Red_Field(Chps_Post_Code);
				}else{
					Gray_Field(Chps_Post_Code);
				}
				
				if(Chps_Area_Code.value == '') Red_Field(Chps_Area_Code);
				if(Chps_Post_Code.value == '') Red_Field(Chps_Post_Code);
				
				
				if (Chps_Email.value.indexOf("@") == "-1" || Chps_Email.value.indexOf(".") == "-1"){
					Form_Error = true;
					Error_Msg += '- Email Address: Syntax error \n';
					Red_Field(Chps_Email);
				}
				
				if (Chps_Email_Confirm.value.indexOf("@") == "-1" || Chps_Email.value.indexOf(".") == "-1"){
					Form_Error = true;
					Error_Msg += '- Email Confirm: Syntax error \n';
					Red_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Email.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address: Mandatory Field \n';
					Red_Field(Chps_Email);
				}else{
					Gray_Field(Chps_Email);
				}
				
				if(Chps_Email_Confirm.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : Mandatory Field \n';
					Red_Field(Chps_Email_Confirm);
				}else{
					Gray_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Email.value != Chps_Email_Confirm.value && Chps_Email_Confirm.value != ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : False \n';
					Red_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Password.value == ''){
					var Form_Error = true;
					Error_Msg += '- Password : Mandatory Field \n';
					Red_Field(Chps_Password);
				}else{
					Gray_Field(Chps_Password);
				}
				
				if(Chps_Password_Confirm.value == ''){
					var Form_Error = true;
					Error_Msg += '- Password Confirm : Mandatory Field \n';
					Red_Field(Chps_Password_Confirm);
				}else{
					Gray_Field(Chps_Password_Confirm);
				}
				if(Chps_Password.value != Chps_Password_Confirm.value && Chps_Password_Confirm.value != ''){
					Form_Error = true;
					Error_Msg += '- Password Confirm : False \n';
					Red_Field(Chps_Password_Confirm);
				}else{
					Gray_Field(Chps_Password_Confirm);
				}
				
				
				
				
				if(Chps_Address1.value == ''){
					var Form_Error = true;
					Error_Msg += '- Address line_1 : Mandatory Field \n';
					Red_Field(Chps_Address1);
				}else{
					Gray_Field(Chps_Address1);
				}
				
				if(Chps_Address2.value == ''){
					var Form_Error = true;
					Error_Msg += '- Address line_2 : Mandatory Field \n';
					Red_Field(Chps_Address2);
				}else{
					Gray_Field(Chps_Address2);
				}
				
				if(Chps_Address3.value == ''){
					var Form_Error = true;
					Error_Msg += '- Address line_3 : Mandatory Field \n';
					Red_Field(Chps_Address3);
				}else{
					Gray_Field(Chps_Address3);
				}
				
				
				
				
				if(Chps_Area_Code2.value != '' && !/^[a-zA-Z][a-zA-Z0-9]{0,3}$/.test(Chps_Area_Code2.value)){
					Form_Error = true;
					Error_Msg += '- Area Code : invalid format \n';
					Red_Field(Chps_Area_Code2);
				}else{
					Gray_Field(Chps_Area_Code2);
				}
				
				if(Chps_Area_Code2.value == '' || Chps_Post_Code2.value == ''){
					Form_Error = true;
					Error_Msg += '- Post Code : Mandatory Field \n';
				}
				
				if(Chps_Post_Code2.value != '' && !/^\d[a-zA-Z]{2}$/.test(Chps_Post_Code2.value)) {
					Form_Error = true;
					Error_Msg += '- Post Code : invalid format \n';
					Red_Field(Chps_Post_Code2);
				}else Gray_Field(Chps_Post_Code2);
				
				if(Chps_Area_Code2.value == '') Red_Field(Chps_Area_Code2);
					
					
				if(Chps_Post_Code2.value == '') Red_Field(Chps_Post_Code2);
					
				
				if(Chps_City.value == ''){
					Form_Error = true;
					Error_Msg += '- Town / City : Mandatory Field \n';
					Red_Field(Chps_City);
				}else{
					Gray_Field(Chps_City);
				}
				
				
				if(Form_Error == true){alert(Error_Msg);return false;}
				else{
					var affiche = document.getElementById('qas_content2');
					affiche.style.display ='block';
					var NomDiv=document.getElementById("full_address");
					NomDiv.style.display ='block';
					return true;}
					
				
			};
			
			function Red_Field(obj){obj.style.border = '1px solid red';}
			function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
			
			
		},
		
		
		
		NL_Registration: function(Form){
			var InputsForm = Form.getElementsByTagName('input');
			var Chps_Precise = document.getElementById('precise');
			var Chps_Firstname = document.getElementById('firstname');
			var Chps_Lastname = document.getElementById('lastname');
			var Chps_Email = document.getElementById('email');
			var Chps_Email_Confirm = document.getElementById('email_confirm');
			
			Form.onsubmit = function(){
				var Error_Msg = 'The form isn\'t correctly filled in \n';
				
				for(var i = 0, a;a = InputsForm[i];i++){
					if(InputsForm[i].name == 'title'){
						if(InputsForm[i].checked){Title_Checked = InputsForm[i];}
						
						if(InputsForm[i].checked && InputsForm[i].id == 'title_other' && Chps_Precise.value == ''){
							var Form_Error = true;
							Error_Msg += '- Precise Title : Mandatory Field \n';
							Red_Field(Chps_Precise);
						}else{
							Gray_Field(Chps_Precise);
						}
					}
					
					if(InputsForm[i].name == 'gender'){
						if(InputsForm[i].checked){Gender_Checked = InputsForm[i];}
					}
				}
				
				// Vérification Title et Gender
				if(Title_Checked.value == 'Mr.' && Gender_Checked.value == 'female'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Mr. can\'t be a Female \n';
				}
				
				if(Title_Checked.value == 'Miss.' && Gender_Checked.value == 'male'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Miss. can\'t be a Male \n';
				}
				
				if(Title_Checked.value == 'Mrs.' && Gender_Checked.value == 'male'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Mrs. can\'t be a Male \n';
				}
				
				if(Chps_Firstname.value == ''){
					Form_Error = true;
					Error_Msg += '- Firstname : Mandatory Field \n';
					Red_Field(Chps_Firstname);
				}else{
					Gray_Field(Chps_Firstname);
				}
				
				if(Chps_Lastname.value == ''){
					Form_Error = true;
					Error_Msg += '- Lastname : Mandatory Field \n';
					Red_Field(Chps_Lastname);
				}else{
					Gray_Field(Chps_Lastname);
				}
				
				if(Chps_Email.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address: Mandatory Field \n';
					Red_Field(Chps_Email);
				}else{
					Gray_Field(Chps_Email);
				}
				
				if(Chps_Email_Confirm.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : Mandatory Field \n';
					Red_Field(Chps_Email_Confirm);
				}else{
					Gray_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Email.value != Chps_Email_Confirm.value && Chps_Email_Confirm.value != ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : False \n';
					Red_Field(Chps_Email_Confirm);
				}
				
				if(Form_Error == true){alert(Error_Msg);return false;}
				else{return true;}
			};
			
			function Red_Field(obj){obj.style.border = '1px solid red';}
			function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
		},
		
		Send_Question: function(Form){
			var InputsForm = Form.getElementsByTagName('input');
			var Chps_Precise = document.getElementById('precise');
			var Chps_Firstname = document.getElementById('firstname');
			var Chps_Lastname = document.getElementById('lastname');
			var Chps_Email = document.getElementById('email');
			var Chps_Email_Confirm = document.getElementById('email_confirm');
			
			Form.onsubmit = function(){
				var Error_Msg = 'The form isn\'t correctly filled in \n';
				
				for(var i = 0, a;a = InputsForm[i];i++){
					if(InputsForm[i].name == 'title'){
						if(InputsForm[i].checked){Title_Checked = InputsForm[i];}
						if(InputsForm[i].checked && InputsForm[i].id == 'title_other' && Chps_Precise.value == ''){
							var Form_Error = true;
							Error_Msg += '- Precise Title : Mandatory Field \n';
							Red_Field(Chps_Precise);
						}else{
							Gray_Field(Chps_Precise);
						}
					}
					
					if(InputsForm[i].name == 'gender'){
						if(InputsForm[i].checked){Gender_Checked = InputsForm[i];}
					}
				}
				
				// Vérification Title et Gender
				if(Title_Checked.value == 'Mr.' && Gender_Checked.value == 'female'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Mr. can\'t be a Female \n';
				}
				
				if(Title_Checked.value == 'Miss.' && Gender_Checked.value == 'male'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Miss. can\'t be a Male \n';
				}
				
				if(Title_Checked.value == 'Mrs.' && Gender_Checked.value == 'male'){
					Form_Error = true;
					Error_Msg += '- Title or Gender : Mrs. can\'t be a Male \n';
				}
				
				if(Chps_Firstname.value == ''){
					Form_Error = true;
					Error_Msg += '- Firstname : Mandatory Field \n';
					Red_Field(Chps_Firstname);
				}else{
					Gray_Field(Chps_Firstname);
				}
				
				if(Chps_Lastname.value == ''){
					Form_Error = true;
					Error_Msg += '- Lastname : Mandatory Field \n';
					Red_Field(Chps_Lastname);
				}else{
					Gray_Field(Chps_Lastname);
				}
				
				if(Chps_Email.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address: Mandatory Field \n';
					Red_Field(Chps_Email);
				}else{
					Gray_Field(Chps_Email);
				}
				
				if(Chps_Email_Confirm.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : Mandatory Field \n';
					Red_Field(Chps_Email_Confirm);
				}else{
					Gray_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Email.value != Chps_Email_Confirm.value && Chps_Email_Confirm.value != ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : False \n';
					Red_Field(Chps_Email_Confirm);
				}
				
				if(Form_Error == true){alert(Error_Msg);return false;}
				else{
					return true;}
			};
			
			function Red_Field(obj){obj.style.border = '1px solid red';}
			function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
		},
		
		Checkout_2a: function(){
			var Form = document.getElementById('address_form');
			
			var InputsForm = Form.getElementsByTagName('input');
			var Chps_Precise = document.getElementById('precise');
			var Chps_Firstname = document.getElementById('firstname');
			var Chps_Lastname = document.getElementById('lastname');
			var Chps_Email = document.getElementById('email');
			var Chps_Email_Confirm = document.getElementById('email_confirm');
			var Chps_Address = document.getElementById('address_line_1');
			var Chps_City = document.getElementById('city');
			var Chps_Area_Code = document.getElementById('area_code');
			var Chps_Post_Code = document.getElementById('post_code');
			
			Form.onsubmit = function(){
				var Error_Msg = 'The form isn\'t correctly filled in \n';
				
				for(var i = 0, a;a = InputsForm[i];i++){
					if(InputsForm[i].name == 'title'){
						if(InputsForm[i].checked){Title_Checked = InputsForm[i];}
						
						if(InputsForm[i].checked && InputsForm[i].id == 'title_other' && Chps_Precise.value == ''){
							var Form_Error = true;
							Error_Msg += '- Precise Title : Mandatory Field \n';
							Red_Field(Chps_Precise);
						}else{
							Gray_Field(Chps_Precise);
						}
					}
				}
				
				if(Chps_Firstname.value == ''){
					Form_Error = true;
					Error_Msg += '- Firstname : Mandatory Field \n';
					Red_Field(Chps_Firstname);
				}else{
					Gray_Field(Chps_Firstname);
				}
				
				if(Chps_Lastname.value == ''){
					Form_Error = true;
					Error_Msg += '- Lastname : Mandatory Field \n';
					Red_Field(Chps_Lastname);
				}else{
					Gray_Field(Chps_Lastname);
				}
				
				if(Chps_Email.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address: Mandatory Field \n';
					Red_Field(Chps_Email);
				}else{
					Gray_Field(Chps_Email);
				}
				
				if(Chps_Address.value == ''){
					Form_Error = true;
					Error_Msg += '- Address Line 1 : Mandatory Field \n';
					Red_Field(Chps_Address);
				}else{
					Gray_Field(Chps_Address);
				}
				
				if(Chps_City.value == ''){
					Form_Error = true;
					Error_Msg += '- Town / City : Mandatory Field \n';
					Red_Field(Chps_City);
				}else{
					Gray_Field(Chps_City);
				}
				
				if(Chps_Area_Code.value != '' && !/^[a-zA-Z][a-zA-Z0-9]{0,3}$/.test(Chps_Area_Code.value)){
					Form_Error = true;
					Error_Msg += '- Area Code : invalid format \n';
					Red_Field(Chps_Area_Code);
				}else{
					Gray_Field(Chps_Area_Code);
				}
				
				if(Chps_Area_Code.value == '' || Chps_Post_Code.value == ''){
					Form_Error = true;
					Error_Msg += '- Post Code : Mandatory Field \n';
				}
				
				if(Chps_Post_Code.value != '' && !/^\d[a-zA-Z]{2}$/.test(Chps_Post_Code.value)) {
					Form_Error = true;
					Error_Msg += '- Post Code : invalid \n';
					Red_Field(Chps_Post_Code);
				}else{
					Gray_Field(Chps_Post_Code);
				}
				
				if(Chps_Area_Code.value == '') Red_Field(Chps_Area_Code);
				if(Chps_Post_Code.value == '') Red_Field(Chps_Post_Code);
				
				if(document.getElementById('country').value == 2){
					Form_Error = true;
					Error_Msg += '- Country : Only addresses in UK can register \n';
				}
				
				if(Chps_Email_Confirm.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : Mandatory Field \n';
					Red_Field(Chps_Email_Confirm);
				}else{
					Gray_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Email.value != Chps_Email_Confirm.value && Chps_Email_Confirm.value != ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : False \n';
					Red_Field(Chps_Email_Confirm);
				}
				
				if(Form_Error == true){alert(Error_Msg);return false;}
				else{return true;}
			};
			
			function Red_Field(obj){obj.style.border = '1px solid red';}
			function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
		},
		
		
		
		
		
		Change_Details: function(){
			var Form = document.getElementById('address_form');
			
			var InputsForm = Form.getElementsByTagName('input');
			var Chps_Precise = document.getElementById('precise');
			var Chps_Firstname = document.getElementById('firstname');
			var Chps_Lastname = document.getElementById('lastname');
			var Chps_Email = document.getElementById('email');
			var Chps_Email_Confirm = document.getElementById('email_confirm');
			var Chps_Address = document.getElementById('address_line_1');
			var Chps_City = document.getElementById('city');
			var Chps_Area_Code = document.getElementById('area_code');
			var Chps_Post_Code = document.getElementById('post_code');
			var Chps_Password = document.getElementById('password');
			var Chps_Password_Confirm = document.getElementById('password_confirm');
			
			Form.onsubmit = function(){
				var Error_Msg = 'The form isn\'t correctly filled in \n';
				
				for(var i = 0, a;a = InputsForm[i];i++){
					if(InputsForm[i].name == 'title'){
						if(InputsForm[i].checked){Title_Checked = InputsForm[i];}
						
						if(InputsForm[i].checked && InputsForm[i].id == 'title_other' && Chps_Precise.value == ''){
							var Form_Error = true;
							Error_Msg += '- Precise Title : Mandatory Field \n';
							Red_Field(Chps_Precise);
						}else{
							Gray_Field(Chps_Precise);
						}
					}
				}
				
				if(Chps_Firstname.value == ''){
					Form_Error = true;
					Error_Msg += '- Firstname : Mandatory Field \n';
					Red_Field(Chps_Firstname);
				}else{
					Gray_Field(Chps_Firstname);
				}
				
				if(Chps_Lastname.value == ''){
					Form_Error = true;
					Error_Msg += '- Lastname : Mandatory Field \n';
					Red_Field(Chps_Lastname);
				}else{
					Gray_Field(Chps_Lastname);
				}
				
				if(Chps_Email.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address: Mandatory Field \n';
					Red_Field(Chps_Email);
				}else{
					Gray_Field(Chps_Email);
				}
				
				if(Chps_Address.value == ''){
					Form_Error = true;
					Error_Msg += '- Address Line 1 : Mandatory Field \n';
					Red_Field(Chps_Address);
				}else{
					Gray_Field(Chps_Address);
				}
				
				if(Chps_City.value == ''){
					Form_Error = true;
					Error_Msg += '- Town / City : Mandatory Field \n';
					Red_Field(Chps_City);
				}else{
					Gray_Field(Chps_City);
				}
				
				if(Chps_Area_Code.value != '' && !/^[a-zA-Z][a-zA-Z0-9]{0,3}$/.test(Chps_Area_Code.value)){
					Form_Error = true;
					Error_Msg += '- Area Code : invalid format \n';
					Red_Field(Chps_Area_Code);
				}else{
					Gray_Field(Chps_Area_Code);
				}
				
				if(Chps_Area_Code.value == '' || Chps_Post_Code.value == ''){
					Form_Error = true;
					Error_Msg += '- Post Code : Mandatory Field \n';
				}
				
				if(Chps_Post_Code.value != '' && !/^\d[a-zA-Z]{2}$/.test(Chps_Post_Code.value)) {
					Form_Error = true;
					Error_Msg += '- Post Code : invalid \n';
					Red_Field(Chps_Post_Code);
				}else{
					Gray_Field(Chps_Post_Code);
				}
				
				if(Chps_Area_Code.value == '') Red_Field(Chps_Area_Code);
				if(Chps_Post_Code.value == '') Red_Field(Chps_Post_Code);
				
				if(document.getElementById('country').value == 2){
					Form_Error = true;
					Error_Msg += '- Country : Only addresses in UK can register \n';
				}
				
				if(Chps_Email_Confirm.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : Mandatory Field \n';
					Red_Field(Chps_Email_Confirm);
				}else{
					Gray_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Email.value != Chps_Email_Confirm.value && Chps_Email_Confirm.value != ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : False \n';
					Red_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Password.value == ''){
					var Form_Error = true;
					Error_Msg += '- Password : Mandatory Field \n';
					Red_Field(Chps_Password);
				}else{
					Gray_Field(Chps_Password);
				}
				
				if(Chps_Password_Confirm.value == ''){
					var Form_Error = true;
					Error_Msg += '- Password Confirm : Mandatory Field \n';
					Red_Field(Chps_Password_Confirm);
				}else{
					Gray_Field(Chps_Password_Confirm);
				}
				
				if(Chps_Password.value != Chps_Password_Confirm.value && Chps_Password_Confirm.value != ''){
					Form_Error = true;
					Error_Msg += '- Password Confirm : False \n';
					Red_Field(Chps_Password_Confirm);
				}
				
				if(Form_Error == true){alert(Error_Msg);return false;}
				else{return true;}
			};
			
			function Red_Field(obj){obj.style.border = '1px solid red';}
			function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
		},
		
		Address_Mgmt: function(){
			var Form = document.getElementById('address_form');
			
			var InputsForm = Form.getElementsByTagName('input');
			var Chps_Precise = document.getElementById('precise');
			var Chps_Firstname = document.getElementById('firstname');
			var Chps_Lastname = document.getElementById('lastname');
			var Chps_Address = document.getElementById('address_line_1');
			var Chps_Post_Code = document.getElementById('post_code');
			var Chps_Email = document.getElementById('email');
			var Chps_Email_Confirm = document.getElementById('email_confirm');
			var Chps_Area_Code = document.getElementById('area_code');
			
			Form.onsubmit = function(){
				var Error_Msg = 'The form isn\'t correctly filled in \n';
				
				for(var i = 0, a;a = InputsForm[i];i++){
					if(InputsForm[i].name == 'title'){
						if(InputsForm[i].checked){Title_Checked = InputsForm[i];}
						
						if(InputsForm[i].checked && InputsForm[i].id == 'title_other' && Chps_Precise.value == ''){
							var Form_Error = true;
							Error_Msg += '- Precise Title : Mandatory Field \n';
							Red_Field(Chps_Precise);
						}else{
							Gray_Field(Chps_Precise);
						}
					}
				}
				
				if(Chps_Firstname.value == ''){
					Form_Error = true;
					Error_Msg += '- Firstname : Mandatory Field \n';
					Red_Field(Chps_Firstname);
				}else{
					Gray_Field(Chps_Firstname);
				}
				
				if(Chps_Lastname.value == ''){
					Form_Error = true;
					Error_Msg += '- Lastname : Mandatory Field \n';
					Red_Field(Chps_Lastname);
				}else{
					Gray_Field(Chps_Lastname);
				}
				
				if(Chps_Email.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address: Mandatory Field \n';
					Red_Field(Chps_Email);
				}else{
					Gray_Field(Chps_Email);
				}
				
				if(Chps_Address.value == ''){
					Form_Error = true;
					Error_Msg += '- Address Line 1 : Mandatory Field \n';
					Red_Field(Chps_Address);
				}else{
					Gray_Field(Chps_Address);
				}
				
				if(Chps_Area_Code.value != '' && !/^[a-zA-Z][a-zA-Z0-9]{0,3}$/.test(Chps_Area_Code.value)){
					Form_Error = true;
					Error_Msg += '- Area Code : invalid format \n';
					Red_Field(Chps_Area_Code);
				}else{
					Gray_Field(Chps_Area_Code);
				}
				
				if(Chps_Area_Code.value == '' || Chps_Post_Code.value == ''){
					Form_Error = true;
					Error_Msg += '- Post Code : Mandatory Field \n';
				}
				
				if(Chps_Post_Code.value != '' && !/^\d[a-zA-Z]{2}$/.test(Chps_Post_Code.value)) {
					Form_Error = true;
					Error_Msg += '- Post Code : invalid \n';
					Red_Field(Chps_Post_Code);
				}else{
					Gray_Field(Chps_Post_Code);
				}
				
				if(Chps_Area_Code.value == '') Red_Field(Chps_Area_Code);
				if(Chps_Post_Code.value == '') Red_Field(Chps_Post_Code);
				
				if(Chps_Email_Confirm.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : Mandatory Field \n';
					Red_Field(Chps_Email_Confirm);
				}else{
					Gray_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Email.value != Chps_Email_Confirm.value && Chps_Email_Confirm.value != ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : False \n';
					Red_Field(Chps_Email_Confirm);
				}
				
				if(Form_Error == true){alert(Error_Msg);return false;}
				else{return true;}
			};
			
			function Red_Field(obj){obj.style.border = '1px solid red';}
			function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
		},
	
		Tunnel_Address_Mgmt: function(){
			var Form = document.getElementById('address_form');
			
			var InputsForm = Form.getElementsByTagName('input');
			var Chps_Precise = document.getElementById('precise');
			var Chps_Firstname = document.getElementById('firstname');
			var Chps_Lastname = document.getElementById('lastname');
			var Chps_City = document.getElementById('city');
			var Chps_Address = document.getElementById('address_line_1');
			var Chps_Post_Code = document.getElementById('post_code');
			var Chps_Email = document.getElementById('email');
			var Chps_Email_Confirm = document.getElementById('email_confirm');
			var Chps_Area_Code = document.getElementById('area_code');
			
			Form.onsubmit = function(){
				var Error_Msg = 'The form isn\'t correctly filled in \n';
				
				for(var i = 0, a;a = InputsForm[i];i++){
					if(InputsForm[i].name == 'title'){
						if(InputsForm[i].checked){Title_Checked = InputsForm[i];}
						
						if(InputsForm[i].checked && InputsForm[i].id == 'title_other' && Chps_Precise.value == ''){
							var Form_Error = true;
							Error_Msg += '- Precise Title : Mandatory Field \n';
							Red_Field(Chps_Precise);
						}else{
							Gray_Field(Chps_Precise);
						}
					}
				}
				
				if(Chps_Firstname.value == ''){
					Form_Error = true;
					Error_Msg += '- Firstname : Mandatory Field \n';
					Red_Field(Chps_Firstname);
				}else{
					Gray_Field(Chps_Firstname);
				}
				
				if(Chps_Lastname.value == ''){
					Form_Error = true;
					Error_Msg += '- Lastname : Mandatory Field \n';
					Red_Field(Chps_Lastname);
				}else{
					Gray_Field(Chps_Lastname);
				}
				
				if(Chps_Email.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address: Mandatory Field \n';
					Red_Field(Chps_Email);
				}else{
					Gray_Field(Chps_Email);
				}
				
				if(Chps_Address.value == ''){
					Form_Error = true;
					Error_Msg += '- Address Line 1 : Mandatory Field \n';
					Red_Field(Chps_Address);
				}
				
				if(Chps_City.value == ''){
					Form_Error = true;
					Error_Msg += '- Town / City : Mandatory Field \n';
					Red_Field(Chps_City);
				}else{
					Gray_Field(Chps_City);
				}
				
				if(Chps_Area_Code.value != '' && !/^[a-zA-Z][a-zA-Z0-9]{0,3}$/.test(Chps_Area_Code.value)){
					Form_Error = true;
					Error_Msg += '- Area Code : invalid format \n';
					Red_Field(Chps_Area_Code);
				}else{
					Gray_Field(Chps_Area_Code);
				}
				
				if(Chps_Area_Code.value == '' || Chps_Post_Code.value == ''){
					Form_Error = true;
					Error_Msg += '- Post Code : Mandatory Field \n';
				}
				
				if(Chps_Post_Code.value != '' && !/^\d[a-zA-Z]{2}$/.test(Chps_Post_Code.value)) {
					Form_Error = true;
					Error_Msg += '- Post Code : invalid \n';
					Red_Field(Chps_Post_Code);
				}else{
					Gray_Field(Chps_Post_Code);
				}
				
				if(Chps_Area_Code.value == '') Red_Field(Chps_Area_Code);
				if(Chps_Post_Code.value == '') Red_Field(Chps_Post_Code);
				
				if(document.getElementById('country').value == 2){
					Form_Error = true;
					Error_Msg += '- Country : Only addresses in UK can register \n';
				}
				
				if(Chps_Email_Confirm.value == ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : Mandatory Field \n';
					Red_Field(Chps_Email_Confirm);
				}else{
					Gray_Field(Chps_Email_Confirm);
				}
				
				if(Chps_Email.value != Chps_Email_Confirm.value && Chps_Email_Confirm.value != ''){
					Form_Error = true;
					Error_Msg += '- Email Address Confirm : False \n';
					Red_Field(Chps_Email_Confirm);
				}
				
				if(Form_Error == true){alert(Error_Msg);return false;}
				else{return true;}
			};
			
			function Red_Field(obj){obj.style.border = '1px solid red';}
			function Gray_Field(obj){obj.style.border = '1px solid #ADB0B0';}
		}
	}
};
function isNum(idChamp)
	{
	n = document.getElementById(idChamp).value;
	if (!(isNaN (n)) == false)
		{
		nomChamp = getLabel(idChamp);
		var errmess = document.getElementById("error_number").innerHTML;
		messageAlert = messageAlert + "\n - " + nomChamp + " : " + errmess;
		document.getElementById(idChamp).style.border = "1px red solid" ;
		}
	else
		{
		document.getElementById(idChamp).style.border = "1px #ADB0B0 solid" ;
		}
	}
//window.onload = function(){Functions_2.Start();}
addEvent(window, "load", Functions_2.Start);

function afficheBoutton() 
	{
	if(navigator.userAgent.indexOf("Firefox")!=-1)
		{
	var pos=navigator.userAgent.indexOf("Firefox")+8;
	if (parseInt(navigator.userAgent.charAt(pos))<=2)
			{
			var e = document.getElementById('gammes');
			var a=e.getElementsByTagName('A');
		
				i=0;
				while(i < a.length)
			{
				if(a[i].name=="All")
					{
					a[i].style.paddingTop= "1px";
					a[i].style.paddingBottom = "2px";
					}
				i++ ;
				}
			}
		}
	}
addEvent(window, "load", afficheBoutton);