function checkContact(theForm)
{
	if (!theForm.name.value)
	{
		alert('Please, enter Name');
		return false;
	}
	if (!checkEmail(theForm))
	{
		return false;
	}
	
	if (!theForm.msg.value)
	{
		alert('Please, enter Message');
		return false;
	}
	
	return true;
}

function checkEmail(theForm)
{
	if (!theForm.email.value)
	{
		alert('Please, enter Email');
		return false;
	}
	var regvar = /^[a-z0-9\._-]+@[a-z0-9\._-]+\.[a-z]{2,4}(,\s*[a-z0-9\._-]+@[a-z0-9\._-]+\.[a-z]{2,4})*$/;
	if (!regvar.test(theForm.email.value)) 
	{
		alert('Please, wrong Email format');
		return false;
	}
	
	return true;
}

