function check_getting_started_form()
{
	$("input#contact-name").focus().blur();
	$("input#email").focus().blur();
	$("input#phone-number").focus().blur();

	var name_regex_pattern = /([\S\s])$/;
	if (!name_regex_pattern.test($("input#contact-name").val()))
	{
		$("input#contact-name").focus();
		alert("You must enter a valid contact name");
		return false;
	}

	var email_regex_pattern = /([a-zA-Z0-9_\.\-])\@(([a-zA-Z0-9\-])+)\.([a-zA-Z0-9]{2,4})$/;
	if (!email_regex_pattern.test($("input#email").val()))
	{
		$("input#email").focus();
		alert("You must enter a valid email address");
		return false;
	}

	var phone_regex_pattern = /([0-9\-\s\(\)\+extnsio])+$/;
	if (!phone_regex_pattern.test($("input#phone-number").val()))
	{
		$("input#phone-number").focus();
		alert("You must enter a valid phone number");
		return false;
	}

	return true;
}

$(document).ready(function() {

	$("form#getting-started-form input")
		.focus(function() {
			if ($(this).attr("id") != "outline")
			{
				$("div#" + $(this).attr("id") + "-button").css("display","none");
				$(this).css("border-color","#a9bac3");
			}
		})
		.blur(function() {
			if ($(this).attr("id") != "outline")
			{
				$("div#" + $(this).attr("id") + "-button").removeClass("form-yes").removeClass("form-no");

				switch ($(this).attr("id"))
				{
					case "email":
						var regex_pattern = /([a-zA-Z0-9_\.\-])\@(([a-zA-Z0-9\-])+)\.([a-zA-Z0-9]{2,4})$/;
						break;

					case "phone-number":
						var regex_pattern = /([0-9\-\s\(\)\+extnsio])+$/;
						break;

					case "contact-name":
					default:
						var regex_pattern = /([\S\s])$/;
						break;
				}

				if (regex_pattern.test($(this).val()))
				{
					$("div#" + $(this).attr("id") + "-button").addClass("form-yes");
					$("div#" + $(this).attr("id") + "-button").css("display","block");
				}
				else if ($(this).attr("id") == "contact-name" || $(this).attr("id") == "email" || $(this).attr("id") == "phone-number")
				{
					$("div#" + $(this).attr("id") + "-button").addClass("form-no");
					$(this).css("border-color","#c91a12");
					$("div#" + $(this).attr("id") + "-button").css("display","block");
				}
			}
		})
		.keydown(function(e) {
			if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
				$("a.submit-inquiry").click();
				return false;
			}
			else
			{
				return true;
			}
		});

});