manages = {
  ttempArg: null,
  tinterfaceURL: 'manage-interface.aspx',
  tinterfaceContentID: 'rightContent',
  tInit: function(_strArg)
  {
    var tstrArg = _strArg;
    manages.tLoad(tstrArg);
  },
  tLoad: function(_strArg)
  {
    var tstrArg = _strArg;
    manages.ttempArg = tstrArg;
    var tstrURL = manages.tinterfaceURL;
    if (tstrArg) tstrURL += tstrArg;
    manage.windows.tShowPanelLoading();
    cls.tigets(tstrURL, manages.tLoads);
  },
  tLoads: function(_strers)
  {
    var tstrers = _strers;
    manage.windows.tHidePanelLoading();
    if (manage.tckBackString(tstrers))
    {
      setInnerHTML($I(manages.tinterfaceContentID), tstrers);
      var tstrHighlightObj = $I(cls.tgetParameter(manages.ttempArg, 'highlight'));
      if (tstrHighlightObj)
      {
        tstrHighlightObj.className = 'spanHrefSelected';
        tstrHighlightObj.setAttribute('primaryClass', 'spanHrefSelected');
      };
    };
  },
  tEdit: function(_strfname)
  {
    var tstrfname = _strfname;
    var tformObj = $I(tstrfname);
    if (tformObj)
    {
      var tformBeObj = $I(tstrfname + 'BeforeAction');
      if (tformBeObj) eval(tformBeObj.value);
      if (manage.validator.tCheck(tformObj))
      {
        var tAction = tformObj.action;
        var tstrform = cls.form.tgetValues(tformObj);
        $I('ajaxSubmit').disabled = true;
        manage.windows.tShowPanelLoading();
        cls.tiposts(tAction, tstrform, manages.tEdits);
      };
    };
    return false;
  },
  tEdits: function(_strers)
  {
    var tstrers = _strers;
    $I('ajaxSubmit').disabled = false;
    manage.windows.tHidePanelLoading();
    if (manage.tckBackString(tstrers))
    {
      manage.message.tAlert(tstrers);
      if (tstrers.indexOf('<!--200-->') != -1) manages.tRefresh();
    };
  },
  tDelete: function(_strroot, _strvalue)
  {
    var tstrroot = _strroot;
    var tstrvalue = _strvalue;
    manage.windows.tShowPanelLoading();
    cls.tigets(manages.tinterfaceURL + '?type=action&atype=delete&root=' + tstrroot + '&value=' + tstrvalue, manages.tDeletes);
  },
  tDeletes: function(_strers)
  {
    var tstrers = _strers;
    manage.windows.tHidePanelLoading();
    if (manage.tckBackString(tstrers))
    {
      if (tstrers.indexOf('<!--200-->') != -1) manages.tRefresh();
      else manage.message.tAlert(tstrers);
    };
  },
  tRefresh: function()
  {
    manages.tLoad(manages.ttempArg);
  }
};
