function clearText(thefield) {
	  if (thefield.defaultValue==thefield.value) { thefield.value = "" }
	} 
	function replaceText(thefield) {
	  if (thefield.value=="") { thefield.value = thefield.defaultValue }
	}
	
	
	
	function ValidateEmail(valor) 
    {
	    if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor))
		    return true;
	    else
		    return false;
    }

	
	function ValidateDataSmall(FirstName,EmailAddress,AboutUs,comments)
	{
	
		if (FirstName.value == "")
		{
			alert('Please, enter your name.');
			FirstName.focus();
			return (false);
		}
		
	
		
		if (EmailAddress.value == "")
		{
			alert('Please, enter your email.');
			EmailAddress.focus();
			return (false);
		}
		else
		{
			if(!ValidateEmail(EmailAddress.value))
			{
				alert("Please check the emails address.");
				EmailAddress.focus();
				return false;
			}
		}
		
		if ((AboutUs.value == "") || (AboutUs.value == AboutUs.defaultValue))
		{
			alert('Please, how did you hear about us.');
			AboutUs.focus();
			return (false);
		}
		
		if ((comments.value == "") || (comments.value ==comments.defaultValue ))
		{
			alert('Please, enter your comments.');
			comments.focus();
			return (false);
		}
		
		return true;
	}

	function OnSubmit()
	{
		
		var FirstName=document.getElementById('FirstName');
		var EmailAddress=document.getElementById('EmailAddress');
		var comments=document.getElementById('comments');	
		var AboutUs=document.getElementById('AboutUs');
		var checkbox=document.getElementById('checkbox');
		
		
		if (ValidateDataSmall(FirstName,EmailAddress,AboutUs,comments))
			window.location.href="savesmallform.aspx?FirstName="+FirstName.value+"&EmailAddress="+EmailAddress.value+"&AboutUs="+AboutUs.value+"&comments="+comments.value+"&checkbox="+checkbox.checked;
		
	}