
function qoValidate(formElem){var value=$('#'+formElem).val();var elemIndicator=$('#'+formElem+"Val");var regEx;switch(formElem){case'Name':regEx=/^[a-zA-Z]+\ [a-zA-Z]+$/;break;case'Email':regEx=/^[a-zA-Z0-9\-_]+(\.[a-zA-Z0-9\-_]+)*@[a-zA-Z0-9\-_]+(\.[a-zA-Z0-9\-_]+)*\.[a-zA-Z\-_]{2,4}$/;break;case'Phone':regEx=/^\(?[0-9]{3}\)?[\- \.]?[0-9]{3}[\- \.]?[0-9]{4}$/;break;}if(value.match(regEx)){elemIndicator.html("<img height='6' src='imgs/check.png'/>");return true;}else{elemIndicator.html("<img height='6' src='imgs/x.png'/>");return false;}}function qoFormJax(){var name=$('#Name');var email=$('#Email');var phone=$('#Phone');if(qoValidate('Name')&&qoValidate('Phone')&&qoValidate('Email')){var url='jax/qoJax.php';var form=$('#qoForm').serialize(true);$.ajax({data:form+'&random='+Math.random(),url:'jax/qoJax.php',success:function(transport){var respTxt=transport.responseText;$('#qoFormAlert').html(transport);document.forms[0].reset();qoValidate('Name');qoValidate('Phone');qoValidate('Email');}});}else{$('#qoFormAlert').html('<span style="color:#FF0000;font-weight:bold;">Please enter all required information</span>');}}

function load_defuscator() {
	$.getScript('js/jquery.defuscator.js', function() {
		$("body").defuscate({link:false});
	});
}

$(function() {
	load_defuscator();
});