function validate_form ( )
{
	valid = true;

       if ( document.dirform.email_spam.value.length != 0)
        {
                alert ( "This appears to be spam.  Please contact our office 250-372-3242" );
                valid = false;
        }

        if ( document.dirform.name.value == "" )
        {
                alert ( "Please enter Contact Name in the 'name' box." );
                valid = false;
        }

    if ( document.dirform.phone.value == "" )
        {
                alert ( "Please fill in the 'phone' box." );
                valid = false;
        }

// only allow 0-9, hyphen and comma be entered
var checkOK = "0123456789-,";
var checkStr = dirform.phone.value;
var allValid = true;
var decPoints = 0;
var allNum = "";
for (i = 0;  i < checkStr.length;  i++)
{
ch = checkStr.charAt(i);
for (j = 0;  j < checkOK.length;  j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
if (ch != ",")
allNum += ch;
}
if (!allValid)
{
alert("Please enter the phone number as 123-123-1234 format.");
dirform.phone.focus();
return (false);
}

   if ( document.dirform.email.value == "" )
        {
                alert ( "Please fill in the 'email' box." );
                valid = false;
        }

     if (document.dirform.email.value.indexOf("@", 0) < 0)
        {
        	alert("Please enter a valid email address.");
        	valid = false;
        }

     if (document.dirform.email.value.indexOf(".", 0) < 0)
       {
    	alert("Please enter a valid email address.");
              valid = false;
        }

    if ( document.dirform.address.value == "" )
        {
                alert ( "Please fill in the 'address' box." );
                valid = false;
        }


        return valid;
}