// JavaScript Document
// JavaScript Document

function validate_form()
{
    var err = '';

    //getElementById('etc') gets the object on the page where id="etc"
    //selectedIndex == 0 means nothing yet selected 
    
    //Name Field
    if (document.getElementById('Name').value == "")
    {
        err += 'Please enter your Name\n'
    }
    
    //Telephone Field
    if (document.getElementById('TelNo').value == "")
    {
        err += 'Please enter your telephone number\n'
    }
    
    //Email Field
    if (document.getElementById('EmailAddress').value == "")
        
    {
        err += 'Please enter your email address\n'
    }


    if (err == '')
    {
        // passed the test
        return true;
    }
    
    else
    {
        // not passed, popup the errors
        alert("There are some problems with this form\n\n"+err)
        return false;
    }
}