function ValidateForm(){        with (document.frmDownload)        {                with (UserName)                {                        if (value == "")                               {                               alert("Please enter User Name.");                               focus();                               return false;                               }                }                                                   with (Email)                {                        var sEmail = value.toLowerCase();                        var sMsg = "Please provide a valid Email address.(e.g. 'user@domain.com')";                                                        if (sEmail.indexOf("@",1) > 0)                                     {                                      if (sEmail.indexOf(".",sEmail.indexOf("@") + 2) >= 0)                                      {}                                      else                                      {                                      alert(sMsg);                                      focus();                                      select();                                      return false;                                      }                                    }                                    else                                      {                                       alert(sMsg);                                       focus();                                       select();                                       return false;                                      }                           }                                                                //hdnSubmit.value = "1";          }                return true;}
