text: ﻿////////////////////////////////////////////////////////////////////////////////////////////////////
  /// VISUAL FUNCTIONS
  ////////////////////////////////////////////////////////////////////////////////////////////////////
  
  $('.form').find('input, textarea').on('keyup blur focus', function (e) {
  
      var $this = $(this),
          label = $this.prev('label');
  
      if (e.type === 'keyup') {
          if ($this.val() === '') {
              label.removeClass('active highlight');
          } else {
              label.addClass('active highlight');
          }
      } else if (e.type === 'blur') {
          if ($this.val() === '') {
              label.removeClass('active highlight');
          } else {
              label.removeClass('highlight');
          }
      } else if (e.type === 'focus') {
  
          if ($this.val() === '') {
              label.removeClass('highlight');
          }
          else if ($this.val() !== '') {
              label.addClass('highlight');
          }
      }
  
  });
  
  ////////////////////////////////////////////////////////////////////////////////////////////////////
  /// DATA FUNCTIONS
  ////////////////////////////////////////////////////////////////////////////////////////////////////
  
  ////////////////////////////////////////////////////////////////////////////////////////////////////
  /// <summary>   NewGroup - Ajax to database. </summary>
  ///
  /// <remarks>   Jacob, 2/24/2020. </remarks>
  ///
  /// <exception> Throws if any general error is found when connecting to the server. </exception>
  ///
  /// <param name="group_name">   Group name from entrybox.  </param>
  /// <param name="group_desc">   Group desc from entrybox.  </param>
  /// <param name="group_class">  Group class from entrybox. </param>
  ///
  /// <returns>   Nothing useful. </returns>
  ////////////////////////////////////////////////////////////////////////////////////////////////////
  
  function NewGroup(name, desc, classcode) {
      var webMethod = "/ProjectServices.asmx/NewGroup";
      var parameters = "{\"group_name\":\"" + encodeURI(name) + "\",\"description\":\"" + encodeURI(desc) + "\",\"class_code\":\"" + encodeURI(classcode) + "\"}";
  
      $.ajax({
          type: "POST",
          url: webMethod,
          data: parameters,
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          success: function (msg) {
              window.location.href = "home.html";
          },
          error: function (e) {
              alert("SERVER ERROR: " + e.message);
          }
      });
  }