﻿// ----------------------------------------------------
// Checks for and validates search fields then submits 
// the form to the Search service
// created: Sun. 21-May-2006
// author: asaleh
// ----------------------------------------------------

// functions
function ValidateForm(theForm)
{
    // Did the user click on the Search button?
    if (WasCmdSearchClicked(theForm))
    {
        if (IsSearchTextOK(theForm.searchText))
        {
            theForm.submit();
        }
    }
}

function WasCmdSearchClicked(theForm)
{
    if (theForm.cmdSearchPressed.value == '1')
    {
        return true;
    }
    else
    {
        return false;
    }
}