function createAccountValidation(){
	
	var Sexy = new SexyAlertBox();
	var d = document.createAccount;
	
	//first name
	if ((d.membership[0].checked==false)&&(d.membership[1].checked==false)){
		
		Sexy.error('PLEASE, SELECT MEMBERSHIP!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.membership[0].focus();
				} 
			}
		});									
		return false;
		
	}	
	
	//first name
	if (d.first_name.value == ""){
		
		Sexy.error('PLEASE, TYPE THE FIRST NAME!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.first_name.focus();
				} 
			}
		});									
		return false;
		
	}	
	
	
	//last name
	if (d.last_name.value == ""){
		
		Sexy.error('PLEASE, TYPE THE LAST NAME!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.last_name.focus();
				} 
			}
		});									
		return false;
		
	}	
	
	//email
	if (d.email.value == ""){
		
		Sexy.error('PLEASE, TYPE THE EMAIL!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.email.focus();
				} 
			}
		});									
		return false;
		
	}	
	
	//address
	if (d.address1.value == ""){
		
		Sexy.error('PLEASE, TYPE THE ADDRESS!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.address1.focus();
				} 
			}
		});									
		return false;
		
	}	
	
	//town
	if (d.town.value == ""){
		
		Sexy.error('PLEASE, TYPE THE TOWN!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.town.focus();
				} 
			}
		});									
		return false;
		
	}	
	
	//count
	if (d.count.value == ""){
		
		Sexy.error('PLEASE, TYPE THE COUNT!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.count.focus();
				} 
			}
		});									
		return false;
		
	}	
	
	//telephone
	if (d.telephone.value == ""){
		
		Sexy.error('PLEASE, TYPE THE TELEPHONE!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.telephone.focus();
				} 
			}
		});									
		return false;
		
	}	
	
	//postcode
	if (d.postcode.value == ""){
		
		Sexy.error('PLEASE, TYPE THE POSTCODE!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.postcode.focus();
				} 
			}
		});									
		return false;
		
	}	
	
	var invalid = " "; // Invalid character is a space
	var minLength = 6; // Minimum length
	
	//password1
	if (d.password1.value == ""){
		
		Sexy.error('PLEASE, TYPE THE PASSWORD!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.password1.focus();
				} 
			}
		});									
		return false;
		
	}
	
	// check for minimum length
	if (d.password1.value.length < minLength) {
	
		Sexy.error('YOUR PASSWORD MUST BE AT LEAST '+ minLength +' CHARACTERS LONG. PLEASE, TRY AGAIN!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.password1.focus();
				} 
			}
		});									
		return false;
	}
	

	// check for spaces
	if (d.password1.value.indexOf(invalid) > -1) {
	
		Sexy.error('SORRY, SPACES ARE NOT ALLOWED. PLEASE, TRY AGAIN!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.password1.focus();
				} 
			}
		});									
		return false;
	
	}

	
	if ((d.password2.value != d.password1.value)){
		
		Sexy.error('YOU HAVE TO TYPE THE SAME PASSWORD!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.password2.focus();
				} 
			}
		});									
		return false;
		
	}
	
	if (d.terms.checked == false){
		
		Sexy.error('YOU NEED TO AGREE WITH TERMS &amp; CONDITIONS.', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.terms.focus();
				} 
			}
		});									
		return false;
		
	}

	
	//verify if the e-mail in a valid e-mail
	var validacao;	
	var str = d.email.value;	
    var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	
    if(filter.test(str)){
		
      validacao = true;
	  
	}else{
		
		Sexy.error('THIS IS NOT A VALID E-MAIL!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.email.focus();
				} 
			}
		});									

		validacao = false;
	  
    }	
    return validacao;
	
	
	
}



function vipAreaValidation(){
	var Sexy = new SexyAlertBox();
	var d = document.loginArea;
	
	//verify if the name field is not empty
	if (d.email.value == ""){
		
		Sexy.error('PLEASE, TYPE YOUR EMAIL!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.email.focus();
				} 
			}
		});									
		return false;
		
	}	
	
	//verify if the name field is not empty
	if (d.password.value == ""){
		
		Sexy.error('PLEASE, TYPE YOUR PASSWORD!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.password.focus();
				} 
			}
		});									
		return false;
		
	}
	
	//verify if the e-mail in a valid e-mail
	var validacao;	
	var str = d.email.value;	
    var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	
    if(filter.test(str)){
		
      validacao = true;
	  
	}else{
		
		Sexy.error('THIS IS NOT A VALID E-MAIL!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.email.focus();
				} 
			}
		});									

		validacao = false;
	  
    }	
    return validacao;
	
	
	
	
}

function contactValidation(){
	
	var Sexy = new SexyAlertBox();
	var d = document.contactForm;
	
	//verify if the name field is not empty
	if (d.name.value == ""){
		
		Sexy.error('YOU HAVE TO TYPE YOUR NAME!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.name.focus();
				} 
			}
		});									
		return false;
		
	}	
	
	if (d.adress.value == ""){
		
		Sexy.error('YOU HAVE TO TYPE YOUR ADRESS!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.adress.focus();
				} 
			}
		});									
		return false;
	}	
	
	if (d.postcode.value == ""){
		
		Sexy.error('YOU HAVE TO TYPE THE POST CODE!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.postcode.focus();
				} 
			}
		});									
		return false;
	}
	
	if (d.telephone.value == ""){
		
		Sexy.error('YOU HAVE TO TYPE YOUR TELEPHONE!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.telephone.focus();
				} 
			}
		});									
		return false;
		
	}	
	
	//verify if the e-mail field is not empty
	if (d.email.value == ""){
		
		Sexy.error('YOU HAVE TO TYPE YOUR E-MAIL!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.email.focus();
				} 
			}
		});									
		return false;
	}	
	
	//verify if the message field is not empty
	if (d.msg.value == ""){
		
		Sexy.error('TYPE YOUR MESSAGE!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.msg.focus();
				} 
			}
		});									
		return false;
		
	}	
	
	//verify if the e-mail in a valid e-mail
	var validacao;	
	var str = d.email.value;	
    var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	
    if(filter.test(str)){
		
      validacao = true;
	  
	}else{
		
		Sexy.error('THIS IS NOT A VALID E-MAIL!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.email.focus();
				} 
			}
		});									

		validacao = false;
	  
    }	
    return validacao;


	
}



function mailingValidation(){
	
	var Sexy = new SexyAlertBox();
	var d = document.cadMailingList;
	
	
	//verify if the e-mail field is not empty
	if (d.email.value == "ADD ME TO MAILING LIST"){
		
		Sexy.error('<br>OOPS!<br><br>YOU HAVE TO TYPE YOUR E-MAIL!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.email.focus();
				} 
			}
		});									
		return false;
	}	
	
	
	//verify if the e-mail in a valid e-mail
	var validacao;	
	var str = d.email.value;	
	var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	
	if(filter.test(str)){
		
	  validacao = true;
	  
	}else{
		
		Sexy.error('<br>OOPS!<br><br>THIS IS NOT A VALID E-MAIL.', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.email.focus();
				} 
			}
		});									
	  validacao = false;
	  
	}	
	return validacao;			
}

function memberValidation(){
	
	var Sexy = new SexyAlertBox();
	var d = document.formMember;
	
	if (d.name_member.value == ""){
		
		Sexy.error('<br>OOPS!<br><br>YOU HAVE TO TYPE YOUR NAME!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.name_member.focus();
				} 
			}
		});									
		return false;
	}	
	
	//verify if the e-mail field is not empty
	if (d.email_member.value == ""){

		Sexy.error('<br>OOPS!<br><br>YOU HAVE TO TYPE YOUR E-MAIL!', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.email_member.focus();
				} 
			}
		});									
		return false;
	}
	
	
	//verify if the e-mail in a valid e-mail
	var validacao;	
	var str = d.email_member.value;	
	var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	
	if(filter.test(str)){
		
	  validacao = true;
	  
	}else{
		
		Sexy.error('<br>OOPS!<br><br>THIS IS NOT A VALID E-MAIL.', {
		onComplete:
			function(returnvalue) {
				if (returnvalue) {
					d.email_member.focus();
				} 
			}
		});									
	  validacao = false;
	  
	}	
	return validacao;			
	
}

