    function validateTextLength(theInput, text)
    {
       if(theInput.value.length <= 0)
       {
          alert(text);
          theInput.focus();
          theInput.select();
          return false;
       }   
       return true;
    }
    
    function validateRadioChecked(theInput, text)
    {        
        // set var radio_choice to false
        var radio_choice = false;
        
        // Loop from zero to the one minus the number of radio button selections
        for (counter = 0; counter < theInput.length; counter++)
        {
            // If a radio button has been selected it will return true
            // (If not it will return false)
            if (theInput[counter].checked)
            radio_choice = true; 
        }
        
        if (!radio_choice)
        {
            // If there were no selections made display an alert box 
            alert(text);
            return (false);
        }
        return (true);           
    }
