  $(function ()
      {
        $("#select_category").change(function ()
        {
          if(this.value != "")
          {
            document.getElementById("userinput1").style.display = 'inline';
            document.getElementById("stringToQuery").style.display = 'none';
            document.getElementById("userinput1").disabled = false;
          }
          else
          {
            document.getElementById("userinput1").style.display = 'none';
            document.getElementById("stringToQuery").style.display = 'inline';
            document.getElementById("userinput1").disabled = true;
          }
        });
      })
 
      var strlen,id1;
 
      function lookup1(inputString,id)
      {
        var selCat = document.getElementById("select_category").value;
        id1 = id ;
        strlen = id1.length;
        if(isNaN(id1[strlen-1]));
        else
        {
          if(inputString.length < 3)
          {
            $('#displaylist'+id1[strlen-1]).hide();
          }
          else
          {
            $.post("hw_read_excel.php", {queryString: inputString,selCat:selCat }, function(data)
            {
              if(data.length >0)
              {
                $('#displaylist'+id1[strlen-1]).html(data).slideDown();
              }
              else
              {
                $('#displaylist'+id1[strlen-1]).hide();
              }
            });
          }
        }
      }
 
      function addToTextBox(thisValue,thisShow)
      {
        $('#userinput'+id1[strlen-1]).val(thisShow);
        $('#searchFile').val(thisValue);
        $('#displaylist'+id1[strlen-1]).hide();
      }
 
      function fill()
      {
        $('#displaylist'+id1[strlen-1]).hide();
      }
 
      function chk_cat()
      {
        var selCat = document.getElementById("select_category").value;
        if(selCat == "")
        {
//            $("#searchForm").attr("action","http://178.79.156.92/healthwise/hw_pro/health_category_data1.php");
            $("#searchForm").attr("action","http://healthwise.healthlibrary.com/healthwise/hw_pro/health_category_data1.php");
        }
        else
        {
//            $("#searchForm").attr("action","http://178.79.156.92/healthwise/hw_pro/health_category_data.php");
            $("#searchForm").attr("action","http://healthwise.healthlibrary.com/healthwise/hw_pro/health_category_data.php");
        }
      }

