
  function RadComboItem()
  {
    this.ComboBox = null;
    this.ClientID = null;
    this.Highlighted = false;
    this.Index = 0;
    this.Enabled = 1;
    this.Selected = 0;
    this.Text = "";
    this.Value = null;
    this.O = new Array();
  }
  function RadComboBox(w,V)
  {
    if (window.tlrkComboBoxes == null)
      {
        window.tlrkComboBoxes = new Array();
      }
    tlrkComboBoxes[V] = this;
    this.Items = new Array();
    this.v = false;
    this.ID = w;
    this.ClientID = V;
    this.T = V;
    this.DropDownID = V + "_DropDown";
    this.InputID = V + "_Input";
    this.ImageID = V + "_Image";
    this.DropDownPlaceholderID = V + "_DropDownPlaceholder";
    this.MoreResultsBoxID = V + "_MoreResultsBox";
    this.MoreResultsBoxImageID = V + "_MoreResultsBoxImage";
    this.MoreResultsBoxMessageID = V + "_MoreResultsBoxMessage";
    this.t = V + "_Header";
    this.S = document.getElementById(this.InputID);
    this.R = document.getElementById(this.ImageID);
    this.r = document.getElementById(this.DropDownPlaceholderID);
    this.Q = document.getElementById(this.ClientID + "_text");
    this.P = document.getElementById(this.ClientID + "_value");
    this.N = document.getElementById(this.ClientID + "_index");
    this.Enabled = true;
    this.DropDownVisible = false;
    this.LoadOnDemandUrl = null;
    this.PollTimeOut = 0;
    this.HighlightedItem = null;
    this.SelectedItem = null;
    this.ItemRequestTimeout = 300;
    this.EnableLoadOnDemand = false;
    this.AutoPostBack = false;
    this.ShowMoreResultsBox = false;
    this.OpenDropDownOnLoad = false;
    this.n = false;
    this.MarkFirstMatch = false;
    this.IsCaseSensitive = false;
    this.PostBackReference = null;
    this.LoadingMessage = "Loading...";
    this.ScrollDownImage = null;
    this.ScrollDownImageDisabled = null;
    this.M = null;
    this.RadComboBoxImagePosition = "Right";
    this.ItemCssClass = null;
    this.ItemCssClassHover = null;
    this.ItemCssClassDisabled = null;
    this.ImageCssClass = null;
    this.ImageCssClassHover = null;
    this.InputCssClass = null;
    this.InputCssClassHover = null;
    this.LoadingMessageCssClass = "ComboBoxLoadingMessage";
    this.AutoCompleteSeparator = null;
    this.OnClientSelectedIndexChanging = null;
    this.OnClientDropDownOpening = null;
    this.OnClientDropDownClosing = null;
    this.OnClientItemsRequesting = null;
    this.OnClientSelectedIndexChanged = null;
    this.OnClientItemsRequested = null;
    this.OnClientKeyPressing = null;
    this.Skin = "Classic";
    this.HideTimeoutID = 0;
    this.m = 0;
    this.L = false;
    this.l = null;
    this.AllowCustomText = false;
    this.ExpandEffectString = null;
    this.HighlightTemplatedItems = false;
    this.CausesValidation = false;
    this.ClientDataString = null;
    this.K = false;
    this.k = - 1;
    this.IsTemplated = false;
    var comboInstance = this;
    if (document.attachEvent)
      {
        document.attachEvent("onclick", (function ()
{
  comboInstance.HideOnClick();
}
));
      }
    else
      {
        document.addEventListener("click", (function ()
{
  comboInstance.HideOnClick();
}
), false);
      }
    if (typeof RadCallbackNamespace != "undefined")
      {
        window.setTimeout((function ()
{
  comboInstance.J(document.getElementById(comboInstance.InputID));
}
), 100);
      }
    else
      {
        if (window.addEventListener)
          {
            window.addEventListener("load", (function ()
{
  comboInstance.J(document.getElementById(comboInstance.InputID));
}
), false);
          }
        else
          {
            this.J(document.getElementById(this.InputID));
          }
      }
    document.getElementById(this.InputID).onblur = (function (e)
{
  comboInstance.H(e);
}
);
    document.getElementById(this.InputID).setAttribute("autocomplete", "off");
    document.getElementById(this.DropDownPlaceholderID).onselectstart = (function ()
{
  return false;
}
);
  }
  function rcbDispatcher(V,eventName,eventArgs)
  {
    var comboInstance = null;
    try
      {
        comboInstance = window[V];
      }
    catch (e)
      {}
    if (typeof comboInstance == "undefined" || comboInstance == null)
      {
        return ;
      }
    if (typeof comboInstance.HandleEvent != "undefined")
      {
        comboInstance.HandleEvent(eventName, eventArgs);
      }
  }
  function rcbAppendStyleSheet(Ih,oi)
  {
    var Oi = navigator.appName == "Microsoft Internet Explorer" && (navigator.userAgent.toLowerCase().indexOf("mac") != - 1 || navigator.appVersion.toLowerCase().indexOf("mac") != - 1);
    var O4 = navigator.userAgent.toLowerCase().indexOf("safari") != - 1;
    if (Oi || O4)
      {
        document.write("<" + "link" + " rel='stylesheet' type='text/css' href='" + oi + "'>");
      }
    else
      {
        var ii = document.createElement("LINK");
        ii.rel = "stylesheet";
        ii.type = "text/css";
        ii.href = oi;
        document.getElementById(Ih + "StyleSheetHolder").appendChild(ii);
      }
  }
  RadComboItem.prototype.Initialize = (function (o)
{
  for (I in o)
    {
      this[I] = o[I];
    }
}
);
  RadComboItem.prototype.A = (function ()
{
  if (this.ComboBox.Items.length > 0)
    {
      var totalHeight = 0;
      for (var i = 0;i <= this.Index;i++)
        {
          var U = document.getElementById(this.ComboBox.Items[i].ClientID);
          if (U)
            {
              totalHeight += U.offsetHeight;
            }
        }
      document.getElementById(this.ComboBox.ClientID + "_DropDown").scrollTop = totalHeight - (document.getElementById(this.ComboBox.ClientID + "_DropDown")).offsetHeight;
    }
}
);
  RadComboItem.prototype.Z = (function ()
{
  if (this.ComboBox.Items.length > 0)
    {
      var totalHeight = 0;
      for (var i = 0;i < this.Index;i++)
        {
          var U = document.getElementById(this.ComboBox.Items[i].ClientID);
          if (U)
            {
              totalHeight += U.offsetHeight;
            }
        }
      var scrollTop = (document.getElementById(this.ComboBox.ClientID + "_DropDown")).scrollTop;
      if (scrollTop > totalHeight)
        {
          document.getElementById(this.ComboBox.ClientID + "_DropDown").scrollTop = totalHeight;
        }
    }
}
);
  RadComboItem.prototype.Highlight = (function ()
{
  if (! this.Highlighted && this.Enabled)
    {
      this.ComboBox.UnHighlightAll();
      if (! this.ComboBox.IsTemplated || this.ComboBox.HighlightTemplatedItems)
        {
          if (document.getElementById(this.ClientID))
            {
              document.getElementById(this.ClientID).className = this.ComboBox.ItemCssClassHover;
            }
        }
      this.Highlighted = true;
      this.ComboBox.HighlightedItem = this;
    }
}
);
  RadComboItem.prototype.UnHighlight = (function ()
{
  if (this.Highlighted && this.Enabled && document.getElementById(this.ClientID))
    {
      document.getElementById(this.ClientID).className = this.ComboBox.ItemCssClass;
      this.Highlighted = false;
      this.ComboBox.HighlightedItem = null;
    }
}
);
  RadComboItem.prototype.Select = (function ()
{
  this.ComboBox.SelectedItem = this;
  this.ComboBox.z(this);
  this.ComboBox.HideDropDown();
  this.ComboBox.W();
}
);
  RadComboBox.prototype.Initialize = (function (h,o)
{
  this.G(h);
  this.g(o);
  this.F();
  this.f();
}
);
  RadComboBox.prototype.G = (function (h)
{
  for (I in h)
    {
      this[I] = h[I];
    }
}
);
  RadComboBox.prototype.F = (function ()
{
  this.ItemCssClass = "ComboBoxItem_" + this.Skin;
  this.ItemCssClassHover = "ComboBoxItemHover_" + this.Skin;
  this.ItemCssClassDisabled = "ComboBoxItemDisabled_" + this.Skin;
  this.ImageCssClass = "ComboBoxImage_" + this.Skin;
  this.ImageCssClassHover = "ComboBoxImageHover_" + this.Skin;
  this.InputCssClass = "ComboBoxInput_" + this.Skin;
  this.InputCssClassHover = "ComboBoxInputHover_" + this.Skin;
  this.LoadingMessageCssClass = "ComboBoxLoadingMessage_" + this.Skin;
}
);
  RadComboBox.prototype.z = (function (item)
{
  if (item != null)
    {
      this.D(item.Text);
      this.SetValue(item.Value);
      this.d(item.Index);
    }
  else
    {
      this.SetText("");
      this.SetValue("");
      this.d("-1");
    }
}
);
  RadComboBox.prototype.W = (function ()
{
  if (this.AutoPostBack && ! this.K)
    {
      if (this.CausesValidation)
        {
          if (typeof WebForm_DoPostBackWithOptions != "function" && ! (typeof Page_ClientValidate != "function" || Page_ClientValidate()))
            {
              return ;
            }
        }
      this.K = true;
      eval(this.PostBackReference);
    }
}
);
  RadComboBox.prototype.H = (function (e)
{
  var C = this.SelectedItem;
  var B = this.HighlightedItem;
  if (C != null && B != null && C != B)
    {
      this.z(B);
      this.o0();
    }
}
);
  RadComboBox.prototype.O0 = (function ()
{
  var l0 = document.getElementById(this.T);
  while (l0.tagName != "FORM")
    {
      l0 = l0.parentNode;
    }
  return l0;
}
);
  RadComboBox.prototype.i0 = (function ()
{
  if ((! document.readyState || document.readyState == "complete") && ! this.L)
    {
      var I0 = this.O0();
      var o1 = document.getElementById(this.DropDownPlaceholderID);
      o1.parentNode.removeChild(o1);
      o1.style.marginLeft = "0";
      var O1 = document.getElementById(this.DropDownPlaceholderID);
      if (O1)
        {
          O1.parentNode.removeChild(O1);
        }
      I0.appendChild(o1);
      this.L = true;
      this.r = document.getElementById(this.DropDownPlaceholderID);
    }
}
);
  RadComboBox.prototype.HideOnClick = (function ()
{
  var comboInstance = this;
  this.HideTimeoutID = window.setTimeout((function ()
{
  comboInstance.DoHideOnClick();
}
), 5);
}
);
  RadComboBox.prototype.DoHideOnClick = (function ()
{
  if (this.HideTimeoutID)
    {
      this.HideDropDown();
    }
}
);
  RadComboBox.prototype.ClearHideTimeout = (function ()
{
  this.HideTimeoutID = 0;
}
);
  RadComboBox.prototype.l1 = (function (text)
{
  var lastIndex = - 1;
  for (var i = 0;i < this.AutoCompleteSeparator.length;i++)
    {
      var i1 = this.AutoCompleteSeparator.charAt(i);
      var I1 = text.lastIndexOf(i1);
      if (I1 > lastIndex)
        {
          lastIndex = I1;
        }
    }
  return lastIndex;
}
);
  RadComboBox.prototype.D = (function (o2)
{
  var O2 = - 1;
  var l2 = this.GetText();
  if (this.AutoCompleteSeparator != null)
    {
      O2 = this.l1(l2);
    }
  var i2 = l2.substring(0, O2 + 1) + o2;
  this.SetText(i2);
}
);
  RadComboBox.prototype.ClearSelection = (function ()
{
  this.z(null);
  this.SelectedItem = null;
  this.I2 = null;
}
);
  RadComboBox.prototype.g = (function (o)
{
  for (var i = 0;i < o.length;i++)
    {
      var item = new RadComboItem();
      item.ComboBox = this;
      item.Index = this.Items.length;
      item.Initialize(o[i]);
      this.Items[this.Items.length] = item;
    }
}
);
  RadComboBox.prototype.f = (function ()
{
  if (this.SelectedItem != null)
    {
      this.SelectedItem.Highlight();
    }
  else
    {
      var l2 = this.GetText();
      var o3 = this.FindItemByText(l2);
      if (o3 != null)
        {
          this.SelectedItem = o3;
          this.SelectedItem.Highlight();
        }
    }
  this.v = true;
  if (this.SelectedItem == null && this.k == - 1 && this.Items.length > 0)
    {
      this.SelectedItem = this.Items[0];
      this.Items[0].Selected = true;
      this.SelectedItem.Highlight();
    }
  var comboInstance = this;
  if (this.OpenDropDownOnLoad)
    {
      if (window.attachEvent)
        {
          window.attachEvent("onload", (function ()
{
  comboInstance.ShowDropDown();
}
));
        }
      else
        {
          window.addEventListener("load", (function ()
{
  comboInstance.ShowDropDown();
}
), false);
        }
    }
}
);
  RadComboBox.prototype.O3 = (function (o,l3)
{
  if (! l3)
    {
      this.Items.length = 0;
    }
  this.HighlightedItem = null;
  this.SelectedItem = null;
  this.v = false;
  if (this.Items.length > 0)
    {
      if (this.Items[0].Text == (document.getElementById(this.InputID)).value)
        {
          this.SetValue(this.Items[0].Value);
        }
      else
        {
          this.SetValue("");
        }
      this.l = this.GetText();
    }
  this.g(o);
}
);
  RadComboBox.prototype.SetText = (function (o2)
{
  document.getElementById(this.InputID).value = o2;
  this.Q.value = o2;
}
);
  RadComboBox.prototype.GetText = (function ()
{
  return (document.getElementById(this.InputID)).value;
}
);
  RadComboBox.prototype.SetValue = (function (value)
{
  if (value || value == "")
    {
      this.P.value = value;
    }
}
);
  RadComboBox.prototype.GetValue = (function ()
{
  return this.P.value;
}
);
  RadComboBox.prototype.d = (function (index)
{
  this.N.value = index;
}
);
  RadComboBox.prototype.i3 = (function (el)
{
  var parent = null;
  var I3 = [];
  var box;
  if (el.getBoundingClientRect)
    {
      box = el.getBoundingClientRect();
      var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
      var scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
      var x = box.left + scrollLeft - 2;
      var y = box.top + scrollTop - 2;
      return [x, y];
    }
  else
    if (document.getBoxObjectFor)
      {
        box = document.getBoxObjectFor(el);
        I3 = [box.x - 2, box.y - 2];
      }
    else
      {
        I3 = [el.offsetLeft, el.offsetTop];
        parent = el.offsetParent;
        if (parent != el)
          {
            while (parent)
              {
                I3[0] += parent.offsetLeft;
                I3[1] += parent.offsetTop;
                parent = parent.offsetParent;
              }
          }
      }
  if (window.opera)
    {
      parent = el.offsetParent;
      while (parent && parent.tagName != "BODY" && parent.tagName != "HTML")
        {
          I3[0] -= parent.scrollLeft;
          I3[1] -= parent.scrollTop;
          parent = parent.offsetParent;
        }
    }
  else
    {
      parent = el.parentNode;
      while (parent && parent.tagName != "BODY" && parent.tagName != "HTML")
        {
          I3[0] -= parent.scrollLeft;
          I3[1] -= parent.scrollTop;
          parent = parent.parentNode;
        }
    }
  return I3;
}
);
  RadComboBox.prototype.o4 = (function (x,y)
{
  if (document.readyState && document.readyState != "complete")
    {
      return ;
    }
  var O4 = navigator.userAgent.toLowerCase().indexOf("safari") != - 1;
  var l4 = window.opera;
  if (O4 || l4 || ! document.all)
    {
      return ;
    }
  if (this.M == null)
    {
      this.M = document.createElement("IFRAME");
      this.M.src = "javascript:false;";
      this.M.id = this.ClientID + "_Overlay";
      this.M.frameBorder = 0;
      this.M.style.position = "absolute";
      this.M.style.visibility = "hidden";
      this.r.parentNode.insertBefore(this.M, this.r);
      this.M.style.zIndex = this.r.style.zIndex - 1;
    }
  this.M.style.left = x;
  this.M.style.top = y;
  var i4 = this.r.offsetWidth;
  var I4 = this.r.offsetHeight;
  this.M.style.width = i4 + "px";
  this.M.style.height = I4 + "px";
  this.M.style.visibility = "visible";
}
);
  RadComboBox.prototype.o5 = (function ()
{
  var O4 = navigator.userAgent.toLowerCase().indexOf("safari") != - 1;
  var l4 = window.opera;
  if (O4 || l4 || ! document.all)
    {
      return ;
    }
  if (this.M != null)
    {
      this.M.style.visibility = "hidden";
    }
}
);
  RadComboBox.prototype.O5 = (function ()
{
  for (l5 in tlrkComboBoxes)
    {
      if (typeof tlrkComboBoxes[l5] != "function" && tlrkComboBoxes[l5].ClientID != this.ClientID)
        {
          tlrkComboBoxes[l5].HideDropDown();
        }
    }
}
);
  RadComboBox.prototype.ShowDropDown = (function ()
{
  if (this.i5(this.OnClientDropDownOpening, this) == false)
    {
      return ;
    }
  this.O5();
  this.i0();
  var I5;
  this.RadComboBoxImagePosition == "Right" ? (I5 = this.S) : (I5 = document.getElementById(this.ImageID));
  var position = this.i3(I5);
  var x = position[0];
  var y = position[1] + I5.offsetHeight;
  var o6 = document.getElementById(this.T);
  O6 = o6.offsetWidth;
  if (this.ExpandEffectString != null && document.all)
    {
      this.r.style.filter = this.ExpandEffectString;
      this.r.filters[0].Apply();
      this.r.filters[0].Play();
    }
  this.r.style.position = "absolute";
  this.r.style.left = x + "px";
  this.r.style.top = y + "px";
  this.r.style.width = O6 - 2 + "px";
  this.r.style.display = "block";
  this.o4(x + "px", y + "px");
  if (this.HighlightedItem != null)
    {
      this.HighlightedItem.A();
    }
  if (this.SelectedItem != null)
    {
      this.SelectedItem.A();
    }
  this.ClearHideTimeout();
  this.DropDownVisible = true;
  try
    {
      document.getElementById(this.InputID).focus();
    }
  catch (e)
    {}
  if (this.EnableLoadOnDemand && this.Items.length == 0)
    {
      this.l6(true, null);
    }
  if (this.SelectedItem != null)
    {
      this.SelectedItem.Highlighted = false;
      this.SelectedItem.Highlight();
      this.SelectedItem.Z();
    }
}
);
  RadComboBox.prototype.FindItemByText = (function (o2)
{
  for (var i = 0;i < this.Items.length;i++)
    {
      if (this.Items[i].Text == o2)
        {
          return this.Items[i];
        }
    }
  return null;
}
);
  RadComboBox.prototype.FindItemByValue = (function (i6)
{
  for (var i = 0;i < this.Items.length;i++)
    {
      if (this.Items[i].Value == i6)
        {
          return this.Items[i];
        }
    }
  return null;
}
);
  RadComboBox.prototype.HideDropDown = (function ()
{
  if (this.DropDownVisible)
    {
      if (this.i5(this.OnClientDropDownClosing, this) == false)
        {
          return ;
        }
      (document.getElementById(this.DropDownPlaceholderID)).style.display = "none";
      this.o5();
      this.DropDownVisible = false;
    }
}
);
  RadComboBox.prototype.ToggleDropDown = (function ()
{
  this.DropDownVisible ? this.HideDropDown() : this.ShowDropDown();
}
);
  RadComboBox.prototype.I6 = (function (o7)
{
  if (o7)
    {
      while (o7 != null)
        {
          if (o7.id && this.O7(o7.id))
            {
              return o7;
            }
          o7 = o7.parentNode;
        }
    }
  return null;
}
);
  RadComboBox.prototype.O7 = (function (l7)
{
  for (var i = 0;i < this.Items.length;i++)
    {
      if (this.Items[i].ClientID == l7)
        {
          return true;
        }
    }
  return false;
}
);
  RadComboBox.prototype.i7 = (function (item)
{
  for (var i = 0;i < this.Items.length;i++)
    {
      if (this.Items[i].ClientID == item.id)
        {
          return this.Items[i];
        }
    }
  return null;
}
);
  RadComboBox.prototype.I7 = (function (o8)
{
  o8.Highlight();
}
);
  RadComboBox.prototype.O8 = (function (o8)
{
  o8.UnHighlight();
}
);
  RadComboBox.prototype.o0 = (function (eventArgs)
{
  var l8 = this.HighlightedItem;
  if (l8 != null)
    {
      if (this.i5(this.OnClientSelectedIndexChanging, l8, eventArgs) == false)
        {
          return ;
        }
      l8.Select();
      this.i5(this.OnClientSelectedIndexChanged, l8, eventArgs);
    }
  this.HideDropDown();
}
);
  RadComboBox.prototype.HandleClick = (function (eventArgs)
{
  this.o0(eventArgs);
}
);
  RadComboBox.prototype.i8 = (function (index)
{
  var i = index;
  var I8 = false;
  while (i < this.Items.length - 1)
    {
      i = i + 1;
      if (this.Items[i].Enabled)
        {
          I8 = true;
          break ;
        }
    }
  if (I8)
    return i;
  return index;
}
);
  RadComboBox.prototype.o9 = (function (index)
{
  var i = index;
  var I8 = false;
  while (i > 0)
    {
      i = i - 1;
      if (this.Items[i].Enabled)
        {
          I8 = true;
          break ;
        }
    }
  if (I8)
    return i;
  return index;
}
);
  RadComboBox.prototype.O9 = (function (comboInstance,eventArgs)
{
  this.i5(this.OnClientKeyPressing, this, eventArgs);
  if (eventArgs.keyCode == 46)
    {
      if (! this.EnableLoadOnDemand && ! this.AllowCustomText)
        {
          this.l9(eventArgs);
        }
    }
  if (eventArgs.keyCode == 40)
    {
      if (eventArgs.altKey && ! this.DropDownVisible)
        {
          this.ShowDropDown();
          return ;
        }
      var index = - 1;
      if (this.HighlightedItem == null && this.Items.length > 0)
        {
          index = 0;
        }
      if (this.HighlightedItem != null)
        {
          index = this.i8(this.HighlightedItem.Index);
        }
      else
        {
          index = this.i8(0);
        }
      if (index >= 0 && this.Items.length > 0)
        {
          if (this.i5(this.OnClientSelectedIndexChanging, this.Items[index], eventArgs) == false)
            {
              return ;
            }
          this.Items[index].Highlight();
          this.Items[index].A();
          this.z(this.Items[index]);
          this.l9(eventArgs);
        }
      return ;
    }
  if (eventArgs.keyCode == 27 && this.DropDownVisible)
    {
      this.HideDropDown();
      return ;
    }
  if (eventArgs.keyCode == 38)
    {
      if (eventArgs.altKey && this.DropDownVisible)
        {
          this.HideDropDown();
          return ;
        }
      var index = - 1;
      if (this.HighlightedItem != null)
        {
          index = this.o9(this.HighlightedItem.Index);
        }
      if (index >= 0)
        {
          if (this.i5(this.OnClientSelectedIndexChanging, this.Items[index], eventArgs) == false)
            {
              return ;
            }
          this.Items[index].Z();
          this.Items[index].Highlight();
          this.z(this.Items[index]);
          this.l9(eventArgs);
        }
      return ;
    }
  if ((eventArgs.keyCode == 13 || eventArgs.keyCode == 9) && this.DropDownVisible)
    {
      if (eventArgs.keyCode == 13)
        {
          this.l9(eventArgs);
        }
      this.o0();
      return ;
    }
  if (eventArgs.keyCode == 9 && ! this.DropDownVisible)
    {
      return ;
    }
  if (eventArgs.keyCode == 35 || eventArgs.keyCode == 36 || eventArgs.keyCode == 37 || eventArgs.keyCode == 39)
    {
      return ;
    }
  if (this.EnableLoadOnDemand && ! eventArgs.altKey && ! eventArgs.ctrlKey && ! (eventArgs.keyCode == 16))
    {
      if (! this.DropDownVisible)
        {
          this.ShowDropDown();
        }
      this.i9(false, eventArgs.keyCode);
      return ;
    }
  var I9 = eventArgs.keyCode;
  if (I9 < 32 || I9 >= 33 && I9 <= 46 || I9 >= 112 && I9 <= 123)
    {
      return ;
    }
  var oa = this;
  window.setTimeout((function ()
{
  oa.Oa();
}
), 20);
}
);
  RadComboBox.prototype.la = (function (eventArgs)
{
  if (eventArgs.preventDefault)
    {
      if (eventArgs.keyCode == 13 || eventArgs.keyCode == 32 && ! this.EnableLoadOnDemand)
        {
          eventArgs.preventDefault();
        }
    }
}
);
  RadComboBox.prototype.ia = (function (s)
{
  if (encodeURIComponent)
    {
      return encodeURIComponent(this.Ia(s));
    }
  if (escape)
    {
      return escape(this.Ia(s));
    }
}
);
  RadComboBox.prototype.Ia = (function (text)
{
  if (typeof text != "number")
    {
      return text.replace(/\x27/g, "&squote");
    }
}
);
  RadComboBox.prototype.ob = (function (Ob,text,keyCode)
{
  if (! this.n)
    {
      this.n = true;
      var lb = text ? text : (document.getElementById(this.InputID)).value;
      var ib = this.GetValue();
      lb = lb.replace(/\x27/g, "&squote");
      var url = this.LoadOnDemandUrl + "&text=" + this.ia(lb);
      url = url + "&comboValue=" + this.ia(ib);
      url = Ob ? url + "&itemCount=" + this.Items.length : url;
      url = url + "&skin=" + this.ia(this.Skin);
      if (this.ClientDataString != null)
        {
          url += "&clientDataString=" + this.ia(this.ClientDataString);
        }
      url = url + "&timeStamp=" + encodeURIComponent(new Date().getTime());
      var xmlRequest = null;
      if (typeof XMLHttpRequest != "undefined")
        {
          xmlRequest = new XMLHttpRequest();
        }
      if (typeof ActiveXObject != "undefined")
        {
          xmlRequest = new ActiveXObject("Microsoft.XMLHTTP");
        }
      xmlRequest.open("GET", url, true);
      var Ib = this;
      xmlRequest.onreadystatechange = (function ()
{
  if (xmlRequest.readyState != 4)
    return ;
  Ib.oc(xmlRequest.responseText, Ob, lb, keyCode, xmlRequest.status);
}
);
      xmlRequest.send("");
    }
}
);
  RadComboBox.prototype.oc = (function (Oc,Ob,lb,keyCode,status)
{
  if (status == 500)
    {
      alert("r.a.d.combobox: Server error in the ItemsRequested event handler, press ok to view the result.");
      document.body.innerHTML = Oc;
      return ;
    }
  eval("var callBackData = " + Oc + ";");
  if (this.ShowMoreResultsBox)
    {
      document.getElementById(this.MoreResultsBoxMessageID).innerHTML = callBackData.Message;
    }
  var lc = this.Items.length;
  this.O3(callBackData.Items, Ob);
  if (Ob)
    {
      document.getElementById(this.DropDownID).removeChild(document.getElementById(this.ClientID + "_LoadingDiv"));
      document.getElementById(this.DropDownID).innerHTML += callBackData.DropDownHtml;
      if (this.Items[(lc + 1)] != null)
        {
          this.Items[(lc + 1)].A();
        }
    }
  else
    {
      document.getElementById(this.DropDownID).innerHTML = callBackData.DropDownHtml;
    }
  this.o4(this.r.style.left, this.r.style.top);
  this.i5(this.OnClientItemsRequested, this, lb, Ob);
  this.n = false;
  var ic = this.FindItemByText(this.GetText());
  if (ic != null)
    {
      ic.Highlight();
      ic.A();
    }
  if (! keyCode)
    return ;
  if (keyCode < 32 || keyCode >= 33 && keyCode <= 46 || keyCode >= 112 && keyCode <= 123)
    {
      return ;
    }
  this.Oa();
}
);
  RadComboBox.prototype.Ic = (function (l2)
{
  var O2 = - 1;
  if (this.AutoCompleteSeparator != null)
    {
      O2 = this.l1(l2);
    }
  var od = l2.substring(O2 + 1, l2.length);
  return od;
}
);
  RadComboBox.prototype.Od = (function (ld,oe)
{
  if (! this.IsCaseSensitive)
    {
      return ld.toLowerCase() == oe.toLowerCase();
    }
  else
    {
      return ld == oe;
    }
}
);
  RadComboBox.prototype.Oa = (function ()
{
  if (! this.MarkFirstMatch)
    return ;
  var l2 = this.GetText();
  var od = this.Ic(l2);
  if (od.length == 0)
    {
      return ;
    }
  for (var i = 0;i < this.Items.length;i++)
    {
      var Oe = this.Items[i].Text;
      if (Oe.length >= od.length)
        {
          var le = Oe.substring(0, od.length);
          if (this.Od(le, od))
            {
              var O2 = - 1;
              if (this.AutoCompleteSeparator != null)
                {
                  O2 = this.l1(l2);
                }
              var i2 = l2.substring(0, O2 + 1) + Oe;
              this.SetText(i2);
              this.SetValue(this.Items[i].Value);
              this.d(this.Items[i].Index);
              if (this.i5(this.OnClientSelectedIndexChanging, this.Items[i], null) == false)
                {
                  return ;
                }
              this.Items[i].Highlight();
              this.Items[i].A();
              var ie = O2 + od.length + 1;
              var Ie = i2.length - ie;
              if (document.all)
                {
                  var of = document.getElementById(this.InputID).createTextRange();
                  of.moveStart("character", ie);
                  of.moveEnd("character", Ie);
                  of.select();
                }
              else
                {
                  document.getElementById(this.InputID).setSelectionRange(ie, ie + Ie);
                }
              return ;
            }
          else
            {
              this.SetValue("");
              this.d(- 1);
              if (this.HighlightedItem != null)
                {
                  this.HighlightedItem.UnHighlight();
                }
            }
        }
    }
  this.SetValue("");
  this.d("-1");
  if (! this.AllowCustomText)
    {
      var Of = l2.substring(0, l2.length - 1);
      if (this.l != null)
        {
          this.SetText(this.l);
          return ;
        }
      this.SetText(Of);
      this.Oa();
    }
}
);
  RadComboBox.prototype.i9 = (function (l3,keyCode)
{
  if (! this.n && ! document.getElementById(this.ClientID + "_LoadingDiv"))
    {
      var comboInstance = this;
      if (this.m)
        {
          window.clearTimeout(this.m);
          this.m = 0;
        }
      this.m = window.setTimeout((function ()
{
  comboInstance.l6(l3, keyCode);
}
), this.ItemRequestTimeout);
    }
}
);
  RadComboBox.prototype.l6 = (function (l3,keyCode)
{
  var lb = (document.getElementById(this.InputID)).value;
  if (lb == "")
    lb = false;
  if (this.i5(this.OnClientItemsRequesting, this, lb, l3) == false)
    {
      return ;
    }
  document.getElementById(this.DropDownID).innerHTML = "<div id=" + this.ClientID + "_LoadingDiv" + " class='" + this.LoadingMessageCssClass + " '>" + this.LoadingMessage + "</div>" + (document.getElementById(this.DropDownID)).innerHTML;
  var comboInstance = this;
  window.setTimeout((function ()
{
  comboInstance.ob(l3, lb, keyCode);
}
), 20);
}
);
  RadComboBox.prototype.RequestItems = (function (text,l3)
{
  this.ob(l3, text, null);
}
);
  RadComboBox.prototype.UnHighlightAll = (function ()
{
  for (var i = 0;i < this.Items.length;i++)
    {
      if (this.Items[i].Highlighted)
        {
          this.Items[i].UnHighlight();
        }
    }
}
);
  RadComboBox.prototype.If = (function ()
{
  document.getElementById(this.InputID).className = this.InputCssClass;
  var og = document.getElementById(this.ImageID);
  if (og)
    {
      og.className = this.ImageCssClass;
    }
}
);
  RadComboBox.prototype.Og = (function ()
{
  document.getElementById(this.InputID).className = this.InputCssClassHover;
  var og = document.getElementById(this.ImageID);
  if (og)
    {
      og.className = this.ImageCssClassHover;
    }
}
);
  RadComboBox.prototype.lg = (function ()
{
  (document.getElementById(this.MoreResultsBoxImageID)).style.cursor = "default";
  document.getElementById(this.MoreResultsBoxImageID).src = this.ScrollDownImageDisabled;
}
);
  RadComboBox.prototype.ig = (function ()
{
  (document.getElementById(this.MoreResultsBoxImageID)).style.cursor = "hand";
  document.getElementById(this.MoreResultsBoxImageID).src = this.ScrollDownImage;
}
);
  RadComboBox.prototype.Ig = (function ()
{
  this.UnHighlightAll();
  this.i9(true, null);
  document.getElementById(this.InputID).focus();
}
);
  RadComboBox.prototype.oh = (function (eventArgs)
{
  if (eventArgs.stopPropagation)
    {
      eventArgs.stopPropagation();
    }
  else
    {
      eventArgs.cancelBubble = true;
    }
}
);
  RadComboBox.prototype.l9 = (function (eventArgs)
{
  if (eventArgs.preventDefault)
    {
      eventArgs.preventDefault();
    }
  else
    {
      eventArgs.returnValue = false;
    }
}
);
  RadComboBox.prototype.i5 = (function (Oh,a,b,lh)
{
  if (! Oh)
    return true;
  RadComboBoxGlobalFirstParam = a;
  RadComboBoxGlobalSecondParam = b;
  RadComboBoxGlobalThirdParam = lh;
  var s = Oh;
  s = s + "(RadComboBoxGlobalFirstParam";
  s = s + ",RadComboBoxGlobalSecondParam";
  s = s + ",RadComboBoxGlobalThirdParam";
  s = s + ");";
  return eval(s);
}
);
  RadComboBox.prototype.HandleEvent = (function (eventName,eventArgs)
{
  var o8;
  var srcElement = document.all ? eventArgs.srcElement : eventArgs.target;
  var item = this.I6(srcElement);
  if (item != null)
    {
      o8 = this.i7(item);
    }
  if (! this.Enabled)
    {
      return ;
    }
  switch (eventName)
  {
    case "showdropdown":
      this.oh(eventArgs);
      this.ShowDropDown();
      break ;
    case "hidedropdown":
      this.oh(eventArgs);
      this.HideDropDown();
      break ;
    case "toggledropdown":
      this.oh(eventArgs);
      this.ToggleDropDown();
      break ;
    case "mouseover":
      if (o8 != null)
        this.I7(o8);
      break ;
    case "mouseout":
      if (o8 != null)
        this.O8(o8);
      break ;
    case "keypress":
      this.O9(this, eventArgs);
      break ;
    case "keydown":
      this.la(eventArgs);
      break ;
    case "click":
      this.HandleClick(eventArgs);
      break ;
    case "inputclick":
      this.oh(eventArgs);
      document.getElementById(this.InputID).select();
      this.ShowDropDown();
      break ;/*
    case "inputimageout":
      this.If();
      break ;
    case "inputimagehover":
      this.Og();
      break ;
    case "moreresultsimageclick":
      this.oh(eventArgs);
      this.Ig();
      break ;
    case "moreresultsimagehover":
      this.ig();
      break ;
    case "moreresultsimageout":
      this.lg();
      break ;*/
  } 
}
);
  RadComboBox.prototype.Enable = (function ()
{
  document.getElementById(this.T).disabled = false;
  this.Enabled = true;
}
);
  RadComboBox.prototype.Disable = (function ()
{
  document.getElementById(this.T).disabled = true;
  this.Enabled = false;
  this.Q.value = this.GetText();
}
);
  RadComboBox.prototype.J = (function (ih)
{
  if (window.opera)
    return ;
  if (document.compatMode && document.compatMode == "CSS1Compat")
    {
      var computedStyle = null;
      if (ih.currentStyle)
        {
          computedStyle = ih.currentStyle;
        }
      else
        if (document.defaultView && document.defaultView.getComputedStyle)
          {
            computedStyle = document.defaultView.getComputedStyle(ih, null);
          }
        else
          {
            return ;
          }
      var height = parseInt(computedStyle.height);
      var width = parseInt(computedStyle.width);
      var paddingTop = parseInt(computedStyle.paddingTop);
      var paddingBottom = parseInt(computedStyle.paddingBottom);
      var paddingLeft = parseInt(computedStyle.paddingLeft);
      var paddingRight = parseInt(computedStyle.paddingRight);
      var borderTop = parseInt(computedStyle.borderTopWidth);
      if (isNaN(borderTop))
        {
          borderTop = 0;
        }
      var borderBottom = parseInt(computedStyle.borderBottomWidth);
      if (isNaN(borderBottom))
        {
          borderBottom = 0;
        }
      var borderLeft = parseInt(computedStyle.borderLeftWidth);
      if (isNaN(borderLeft))
        {
          borderLeft = 0;
        }
      var borderRight = parseInt(computedStyle.borderRightWidth);
      if (isNaN(borderRight))
        {
          borderRight = 0;
        }
      if (! isNaN(height))
        {
          ih.style.height = height - paddingTop - paddingBottom - borderTop - borderBottom + "px";
        }
      if (! isNaN(width))
        {
          ih.style.width = width - paddingLeft - paddingRight - borderLeft - borderRight + "px";
        }
    }
}
);