defaults = {
  tChangeDBType: function(_value)
  {
    var tvalue = _value;
    if (tvalue == '1' || tvalue == '11') $I('installMiddleStep3BoxDB').style.display = '';
    else $I('installMiddleStep3BoxDB').style.display = 'none';
  },
  tClickAgree: function(_obj)
  {
    var tobj = _obj;
    var tobjNext = $I('installBottomStep1-rightBox');
    if (tobj && tobjNext)
    {
      if (tobj.checked) tobjNext.style.display = '';
      else tobjNext.style.display = 'none';
    };
  },
  tSelectDatabase: function(_strers)
  {
    var tthis = this;
    var tstrers = _strers;
    var tobj1 = $I('dbtype');
    var tobj21 = $I('span-access');
    var tobj22 = $I('span-sqlserver');
    var tobj23 = $I('span-sqlite');
    var tobj24 = $I('span-mysql');
    var tobj3 = $I('span-' + tstrers);
    if (tobj1 && tobj21 && tobj22 && tobj23 && tobj24 && tobj3)
    {
      tobj21.className = 'border';
      tobj22.className = 'border';
      tobj23.className = 'border';
      tobj24.className = 'border';
      tobj1.value = tobj3.getAttribute('dbvalue');
      tobj3.className = 'border-selected';
      tthis.tChangeDBType(tobj1.value);
    };
  },
  tStep1Next: function()
  {
    var tobj1 = $I('li-nav-step-1');
    var tobj2 = $I('li-nav-step-2');
    var tobj1s = $I('installMiddleStep1');
    var tobj2s = $I('installMiddleStep2');
    var tobj1b = $I('installBottomStep1');
    var tobj2b = $I('installBottomStep2');
    if (tobj1 && tobj2 && tobj1s && tobj2s && tobj1b && tobj2b)
    {
      tobj1.className = '';
      tobj2.className = 'selected';
      tobj1s.style.display = 'none';
      tobj2s.style.display = '';
      tobj1b.style.display = 'none';
      tobj2b.style.display = '';
    };
  },
  tStep2Prev: function()
  {
    var tobj1 = $I('li-nav-step-1');
    var tobj2 = $I('li-nav-step-2');
    var tobj1s = $I('installMiddleStep1');
    var tobj2s = $I('installMiddleStep2');
    var tobj1b = $I('installBottomStep1');
    var tobj2b = $I('installBottomStep2');
    if (tobj1 && tobj2 && tobj1s && tobj2s && tobj1b && tobj2b)
    {
      tobj1.className = 'selected';
      tobj2.className = '';
      tobj1s.style.display = '';
      tobj2s.style.display = 'none';
      tobj1b.style.display = '';
      tobj2b.style.display = 'none';
    };
  },
  tStep2Next: function()
  {
    var tobj1 = $I('li-nav-step-2');
    var tobj2 = $I('li-nav-step-3');
    var tobj1s = $I('installMiddleStep2');
    var tobj2s = $I('installMiddleStep3');
    var tobj1b = $I('installBottomStep2');
    var tobj2b = $I('installBottomStep3');
    if (tobj1 && tobj2 && tobj1s && tobj2s && tobj1b && tobj2b)
    {
      tobj1.className = '';
      tobj2.className = 'selected';
      tobj1s.style.display = 'none';
      tobj2s.style.display = '';
      tobj1b.style.display = 'none';
      tobj2b.style.display = '';
    };
  },
  tStep3Prev: function()
  {
    var tobj1 = $I('li-nav-step-2');
    var tobj2 = $I('li-nav-step-3');
    var tobj1s = $I('installMiddleStep2');
    var tobj2s = $I('installMiddleStep3');
    var tobj1b = $I('installBottomStep2');
    var tobj2b = $I('installBottomStep3');
    if (tobj1 && tobj2 && tobj1s && tobj2s && tobj1b && tobj2b)
    {
      tobj1.className = 'selected';
      tobj2.className = '';
      tobj1s.style.display = '';
      tobj2s.style.display = 'none';
      tobj1b.style.display = '';
      tobj2b.style.display = 'none';
    };
  },
  tStepDone: function(_strfname)
  {
    var tthis = this;
    var tstrfname = _strfname;
    var tformObj = $I(tstrfname);
    if (tformObj)
    {
      if (wfront.validator.tCheck(tformObj))
      {
        var tAction = tformObj.action;
        var tstrform = cls.form.tgetValues(tformObj);
        $I('installBottomStep3').style.display = 'none';
        $I('installBottomMessage').innerHTML = '';
        $I('installBottomMessage').className = 'loading';
        $I('installBottomMessage').style.display = '';
        cls.tiposts(tAction, tstrform, function(str, arg){ tthis.tStepDones(str, arg); }, {'form': tstrform, 'action': tAction});
      };
    };
    return false;
  },
  tStepDones: function(_strers, _arg)
  {
    var tthis = this;
    var targ = _arg;
    var tstrers = _strers;
    if (wfront.tckBackString(tstrers))
    {
      tstrers = wfront.tckrBackString(tstrers);
      if (tstrers.indexOf('<!--200-->') == -1)
      {
        $I('installBottomStep3').style.display = '';
        $I('installBottomMessage').innerHTML = tstrers;
        $I('installBottomMessage').className = '';
      }
      else
      {
        $I('installBottomMessage').innerHTML = tstrers;
        $I('installBottomMessage').className = '';
        cls.tigets('default-interface.aspx?type=action&atype=clear', nll);
        var tReDirTimeout = setTimeout(function(){ location.href = '../admin/'; }, 5000);
      };
    }
    else
    {
      if (tstrers == '$error$')
      {
        var tReTryTimeout = setTimeout(function(){ cls.tiposts(targ['action'], targ['form'], function(str, arg){ tthis.tStepDones(str, arg); }, {'form': targ['form'], 'action': targ['action']}); }, 2000);
      };
    };
  }
};