VS.Contact = { 
	init:function(){ 
		E.addListener('GoForm','click',this.Listeners.Validate); 
		E.addListener('ContactFormTopic','change',this.Listeners.ShowTips); 
	},
	Listeners:{ 
		ShowTips:function(){ 
			if($('ContactFormTopic').value == 2){ 
				$('ProblemTips').style.display = ''; 
			} else { 
				$('ProblemTips').style.display = 'none'; 
			} 
		},
		Validate:function(){ 
			var emailregex = new RegExp("^[\\w-_\.+]*[\\w-_\.]\@([\\w-]+\\.)+[\\w-]+[\\w]$");

			if($('ContactFormName').value==''){ 
				VS.Alert('warn','Missing Fields','Oops! Please enter your name to send an email.'); 
				return false; 
			}
			if($('ContactFormEmail').value==''){ 
				VS.Alert('warn','Missing Fields','Oops! Please enter your email address so we can get back to you.'); 
				return false; 
			}
			if(!emailregex.test($('ContactFormEmail').value)){
				VS.Alert('warn','Missing Fields','Oops! The email address you entered doesn\'t look valid. Please recheck and click "Send Message" again.'); 
				return false; 
			} 
			if($('ContactFormMessage').value==''){ 
				VS.Alert('warn','Missing Fields','Oops! You didn\'t enter a message.'); 
				return false; 
			}
			
			if($('recaptcha_response_field').value==''){ 
				VS.Alert('warn','Missing Fields','To help prevent against spam, we use an easy test that only a human can solve. Please enter the words you see in the image in the nearby box.'); 
				return false; 
			}
			
			
			$('ContactForm').submit(); 
		} 
	} 
	
} 
VS.Init.initThese[VS.Init.initThese.length] = 'Contact';