function validate_form ( )
{
    valid = true;

    if ( document.contact_agent.contact_name.value == "" )
    {
        alert ( "Please fill in the 'Name' box." );
        valid = false;
    }
    
    if ( document.contact_agent.contact_email.value == "" )
    {
        alert ( "Please fill in the 'Email Address' box." );
        valid = false;
    }
    
    if ( document.contact_agent.message.value == "" )
    {
        alert ( "Please fill in the 'Comments' box." );
        valid = false;
    }
    
    if ( document.contact_agent.verify_code.value == "" )
    {
        alert ( "Please fill in the 'Verification Code' box." );
        valid = false;
    } else {
    if ( document.contact_agent.verify_code.value != document.contact_agent.verify_code2.value )
    {
        alert ( "Wrong Verification Code" );
        valid = false;
    }
    }

    return valid;
}

function validate_email(field,alerttxt)
{
with (field)
{
apos=value.indexOf("@")
dotpos=value.lastIndexOf(".")
if (apos<1||dotpos-apos<2) 
  {alert(alerttxt);return false}
else {return true}
}
}
