// JavaScript Document
function submitForm() {	
	var url = 'validate.php';
	var rand = Math.random(9999);
	var queryString = $('#mailForm').formSerialize() + '&rand=' + rand;
	$.post(url, queryString, function(data) {
		$("#errorMessage").hide();
		handleFormSubmit(data);
	});
}


function handleFormSubmit(response){	
	if (response == false) {			
		$("#errorMessage").show();
		$("#tblMailSend").hide();
	} else {
		$("#tblForm").hide();
		$("#tblMailSend").show();
	}
	

}