	var myFormValidator;
	var inlineValidator;
	
	if(location.href.indexOf("contact") > -1){
	window.addEvent('domready', function(){
		//Form Validation
		myFormValidator = new FormValidator(document.getElementById('contactForm'));
		inlineValidator = new FormValidator.Inline('contactForm');
		
		// Listen for click events on the submit button.
		document.getElementById('contactForm').addEvent( 'submit', function(e){
			// Stops the submission of the form.
			new Event(e).stop();
			
			//document.getElementById('loading').style.display = "block";
			document.getElementById('contactForm').set('send', {
				onComplete: function(response) {
					if(response.match("successfully")){
						document.getElementById('fail').style.display = "none";
						document.getElementById('success').style.display = "block";
						document.getElementById('formContainer').style.display = "none";
					}else{
						document.getElementById('fail').style.display = "block";
						document.getElementById('success').style.display = "none";
					}
				}
			});
			
			//Validate and Send the form.
			if (myFormValidator.validate()) {
					document.getElementById('contactForm').send();
			}
			//document.getElementById('loading').style.display = "none";
		});//form addEvent
				
	});//window addEvent
	}
	