// JavaScript Document
function validEmail(supposeEmailAddress) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(supposeEmailAddress)){
		return (true)
	}
	return (false)
}

var submitContact = function()
{
	try
	{
		if(!$.trim($('#name').val()) || $.trim($('#name').val()) == 'Name')
		{
			$('#name').focus();
			alert('Please insert a name')
			return false;
		}

		if(!validEmail($('#email').val()))
		{
			$('#email').focus();
			alert('This is not a valid email');
			return false;
		}

		if(!$.trim($('#message').val()) || $.trim($('#message').val()) == 'Comments')
		{
			alert('Please insert some comments')
			return false;
		}
		return true;
	}
	catch(Ex)
	{
	}
}
