    function validateForm(f)
    {
        var courses = getCourses();
        for (var i=0; i<courses.length; i++)
        {
            try
            {
                var course = courses[i];
                var name = course.RegistrantName();
                    name = trim(name);
                var isVisible = course.IsVisible();
                if (isVisible && name.length == 0)
                {
                    var message = "Please enter a name for registrant #" + course.Index() + ".";
                    alert(message);
                    course.TakeFocus();
                    return false;
                }
            }
            catch(e)
            {
                //alert(OLD_BROWSER_MESSAGE + "\n\nDetails: " + e.message);
                alert(OLD_BROWSER_MESSAGE);
                return false;
            }
        }
        
        /// 
        /// 
        /// 
        /// billing info tests follow
        /// 
        
        /*
        txt_first
        txt_middle
        txt_last
        txt_address_1
        txt_address_2
        txt_state
        txt_zip
        txt_country
        txt_phone_day
        txt_phone_evening
        txt_email
        txt_card_type
        txt_exp_month
        txt_exp_year
        txt_card_number
        */

        if( f.txt_first.value == "" )
        {
          alert( "Please enter your First Name" );
          return false;
        }

        if( f.txt_last.value == "" )
        {
          alert( "Please enter your Last Name" );
          return false;
        }

        if(( f.txt_address_1.value == "" ) && ( f.txt_address_2.value == "" ))
        {
          alert( "Please enter your Street Address" );
          return false;
        }

        if( f.txt_city.value == "" )
        {
          alert( "Please enter your City" );
          return false;
        }

        if( f.txt_email.value == "" )
        {
          alert( "Please enter an Email Address" );
          return false;
        }

        if( isBadEmail(f.txt_email.value) )
        {
          alert( "Please enter a valid Email Address" );
          return false;
        }

        if( f.txt_card_type.options[f.txt_card_type.selectedIndex].value == 0 )
        {
          alert( "Please select a Credit Card Type");
          return false;
        }

        if( f.txt_card_number.value == "" )
        {
          alert( "Please enter a Credit Card Number" );
          return false;
        }

        var s_card = stripBadChars(f.txt_card_number.value);

        if( isNaN(s_card) )
        {
          alert( "Please use only numbers and spaces in your Credit Card Number");
          return false;
        }

        if( s_card.length < 10 )
        {
          alert( "Please enter a valid Credit Card Number");
          return false;
        }

        if( f.txt_exp_month.options[f.txt_exp_month.selectedIndex].value == "0" || f.txt_exp_year.options[f.txt_exp_year.selectedIndex].value == "0" )
        {
          alert( "Please enter Credit Card Expiration Month and Year");
          return false;
        }

        if( f.txt_phone_day.value == "" && f.txt_phone_evening.value == "" )
        {
          alert( "Please enter a Day or Evening Phone");
          return false;
        }

        if( f.txt_country.options[f.txt_country.selectedIndex].value == "USA" || f.txt_country.options[f.txt_country.selectedIndex].value == "Canada" )
        {
          var s_zip = f.txt_zip.value;;
          if ( f.txt_zip.value == "" )
          {
            alert( "Please enter your Zip Code" );
            return false;
          }
          else
          {
            s_zip = stripBadChars(s_zip);
            if ( isNaN(s_zip) )
            {
              alert( "Please use only numbers and dashes (-) in your Zip Code");
              return false;
            }
            if ( s_zip.length < 5 )
            {
              alert( "Please enter a valid Zip Code");
              return false;
            }
          }
        }

        /*
        if( f.txt_nickname.value == "" )
        {
          alert( "Please enter the student's first and last name, if different from credit card holder. " +
                 "Otherwise, enter the name you prefer to be called." );
          return false;
        }
        */

        /*
        if (f.txt_i_agree.value != "on")
        {
            //alert( "Please enter a valid Zip Code");
            //return false;
        }
        */
        
        
        var question = "Your credit card will be charged now. Do you want to continue?";
        
        try
        {
            var totalSpan = document.getElementById("totalSpan");
            if (totalSpan && totalSpan.innerHTML)
            {
                var total = totalSpan.innerHTML;
                var question = "Your credit card will be charged now for $" + total + ". Do you want to continue?";
            }
        }
        catch(e)
        {
        }
        
        var userWantsToChargeCreditCard = confirm(question);
        return userWantsToChargeCreditCard;
        
        //return true;
    }