function VerifyCheckBox(checkBoxElement)
{
	if (checkBoxElement.checked)	checkBoxElement.value = 'true';
	else checkBoxElement.value = 'false';
}

function SetValueCheckBox(checkBoxElement)
{
	if (checkBoxElement.checked)	checkBoxElement.value = 'Yes';
	else checkBoxElement.value = 'No';
}

function ValidateDataSmall(theForm)
{
	if (theForm.contactDate.value != "")
	{
		//alert('Test');		
		return (false);
	}
	
	if ((theForm.Name.value == "") || (theForm.Name.value == 'Name'))
	{
		alert('Please, enter your full name.');
		theForm.Name.focus();
		return (false);
	}
	
	if ((theForm.Email.value == "") || (theForm.Email.value == 'Email'))
	{
		alert('Please, enter your email.');
		theForm.Email.focus();
		return (false);
	}
	else
	{
		if(!ValidateEmail(theForm.Email.value))
		{
			alert("Please check the emails address");
			theForm.Email.focus();
			return false;
		}
	}
		
	if ((theForm.Comment.value == "") || (theForm.Comment.value == 'Comments'))
	{
		alert('Please, enter your comments.');
		theForm.Comment.focus();
		return (false);
	}
}

function ValidateDataContact(theForm)
{
	if (theForm.contactDate.value != "")
	{
		//alert('Test');		
		return (false);
	}

	if (theForm.requiredfirstName.value == "")
	{
		alert('Please, enter your first name.');
		theForm.requiredfirstName.focus();
		return (false);
	}

	if (theForm.requiredlastName.value == "")
	{
		alert('Please, enter your last name.');
		theForm.requiredlastName.focus();
		return (false);
	}
	
	if (theForm.requiredemail.value == "")
	{
		alert('Please, enter your email.');
		theForm.requiredemail.focus();
		return (false);
	}
	else
	{
		if(!ValidateEmail(theForm.requiredemail.value))
		{
			alert("Please check the emails address");
			theForm.requiredemail.focus();
			return false;
		}
	}
}

function ValidateEmail(valor) 
{
    if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor))
        return true;
    else
        return false;
}
