/**
 * @ Created by vxFusion Ltd.
 */

function getYear() {
 	var now = new Date();
	return now.getFullYear();
}

 
function validateForm() {
 	var boolPass = true;
	
	$("#txtName").hide();
	$("#txtPhone").hide();
	$("#txtEmail").hide();
	$("#txtMessage").hide();
	
 	for (i = 0; i < document.forms[0].length; i++) {
		if (document.forms[0].elements[i].value == "") {
			boolPass = false;
			
			if (i == 0) 
				$("#txtName").show();
			else if (i == 1)
				$("#txtPhone").show();
			else if (i == 2)
				$("#txtEmail").show();
			else if (i == 3)
				$("#txtMessage").show();
		}
	}
	if (boolPass == true)
		document.forms[0].submit();
	else 
		$("#error").show();
}

/*
function validateForm() {
 	var boolPass = true;
 	for (i = 0; i < document.forms[0].length; i++) {
		if (document.forms[0].elements[i].type == "checkbox" && document.forms[0].elements[i].checked == false) {
			boolPass = false;
		}
		
		else if (document.forms[0].elements[i].value == "") {
			boolPass = false;
		}
	}
	if (boolPass == true)
		document.forms[0].submit();
	else 
		alert("epic fail");
}
*/