function validate(thisForm)
        {
      
            if ( thisForm.RefEmail.value == "" )
            {
              alert ('Enter your referrer\'s email address.');
              thisForm.RefEmail.focus();
              return false;
            }
           
           if (! validateEmail(thisForm.RefEmail.value)) {
                alert ('Please enter valid referrer\'s email address.');
                thisForm.RefEmail.focus();
                thisForm.RefEmail.select();
                return false;
            }
            
           if (thisForm.RefFirstName.value == "")
            {
              alert ('Enter your referrer\'s first name.');
              thisForm.RefFirstName.focus();
               return false;
            }
            
            if (thisForm.RefLastName.value == "")
            {
               alert ('Enter your referrer\'s last name.');
               thisForm.RefLastName.focus();
                return false;
            }
            
           
              
            if ( thisForm.RefTelNum1.value != "" && thisForm.RefTelNum2.value != "" && thisForm.RefTelNum3.value != "" && !(validateTel(thisForm.RefTelNum1.value, thisForm.RefTelNum2.value, thisForm.RefTelNum3.value, '')) )
            {
             
              alert ('Enter a valid telephone number.');
              thisForm.RefTelNum1.focus();
              thisForm.RefTelNum1.select();
               return false;
            }
            
           if (thisForm.ConsumerName.value == "")
            {
              alert ('Enter your name.');
              thisForm.ConsumerName.focus();
               return false;
            }

              if (!validateEmail(thisForm.ConsumerEmail.value)) {
                alert ('Your email address is not valid.');
                thisForm.ConsumerEmail.focus();
                thisForm.ConsumerEmail.select();
                 return false;
              }
thisForm.fromURL.value = "valid";

            return true;
}
