manage = {
  tinterfaceURL: 'manage-interface.aspx',
  tckBackString: function(_strers)
  {
    var tbool = false;
    var tstrers = _strers;
    if (tstrers.substr(0, 11) == '<!--jtbc-->') tbool = true;
    return tbool;
  },
  tckrBackString: function(_strers)
  {
    var tstrers = _strers;
    if (tstrers.substr(0, 11) == '<!--jtbc-->') tstrers = tstrers.substr(11);
    return tstrers;
  },
  tckPageUnloadChanged: function(_url, _form, _message)
  {
    var turl = _url;
    var tform = _form;
    var tmessage = _message;
    var tPageUnloadChanged = false;
    if (manage.form.tHasBeenChanged(tform))
    {
      tPageUnloadChanged = true;
      manage.message.tConfirm(tmessage, 'location.href =\'' + turl + '\';');
    };
    return tPageUnloadChanged;
  },
  tgetPoundURLParameter: function(_strers)
  {
    var tmpstr = '';
    var tstrers = _strers;
    var tinum = tstrers.indexOf('#');
    if (tinum == -1) tmpstr = null;
    else tmpstr = tstrers.substr(tinum + 1);
    return tmpstr;
  },
  tHref: function(_url, _event)
  {
    var turl = _url;
    var tevent = _event;
    tevent = window.event || tevent;
    if (tevent.ctrlKey) window.open(turl, '_blank', 'width=' + screen.width + ',height=' + screen.height + ',toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes');
    else
    {
      var tUnloadState = false;
      if (typeof(pageOnBeforeUnload) != 'undefined')
      {
        if (pageOnBeforeUnload(turl)) tUnloadState = true;
      };
      if (!tUnloadState) location.href = turl;
    };
    return false;
  },
  tHrefOut: function(_obj)
  {
    var tobj = _obj;
    if (tobj.className == 'hover') tobj.className = 'normal';
  },
  tHrefOver: function(_obj)
  {
    var tobj = _obj;
    if (tobj.className != 'selected') tobj.className = 'hover';
  },
  tIDSelect: function(_obj, _id)
  {
    var tid = _id;
    var tobj = _obj;
    var tcontainerObj = $I('checkbox-' + tid + '-container');
    if (tobj && tcontainerObj)
    {
      if (!tobj.disabled)
      {
        if (!tobj.checked)
        {
          var tOldClass = tcontainerObj.getAttribute('olclass');
          tcontainerObj.className = tOldClass;
          tcontainerObj.setAttribute('oclass', tOldClass);
        }
        else
        {
          tcontainerObj.className = 'containerSelected';
          tcontainerObj.setAttribute('oclass', 'containerSelected');
        };
      };
    };
  },
  tIDSelectAll: function(_obj, _name)
  {
    var tobj = _obj;
    var tname = _name;
    manage.tIDSelect(tobj, 0);
    var tobjs = document.getElementsByName(tname);
    if (tobjs)
    {
      for (ti = 0; ti < tobjs.length; ti ++)
      {
        if (!tobjs[ti].disabled)
        {
          tobjs[ti].checked = tobj.checked;
          manage.tIDSelect(tobjs[ti], tobjs[ti].value);
        };
      };
    };
  },
  tPlayWav: function(_name)
  {
    var tname = _name;
    var tObj = $I('wavPlayer');
    if (!cls.tisie()) tObj = $I('wavPlayers');
    if (tObj)
    {
      if (tObj.getAttribute('switch') != '0')
      {
        tObj.src = tObj.getAttribute('baseurl') + tname + '.wav';
        try { tObj.play(); } catch(e) {};
      };
    };
  },
  tRemoveOnClickByClassName: function(_obj, _classname)
  {
    var tobj = _obj;
    var tclassname = _classname;
    if (tobj.className == tclassname)
    {
      tobj.onclick = function() {};
      tobj.onmouseover = function() {};
      if (tclassname == 'grayer')
      {
        var tTitle = '';
        tTitle += tobj.getAttribute('grayertitle');
        tTitle += tobj.getAttribute('title');
        tobj.setAttribute('title', tTitle);
      };
    };
  },
  tSetClassName: function(_id, _name)
  {
    var tid = _id;
    var tname = _name;
    var tObj = $I(tid);
    if (tObj) tObj.className = tname;
  },
  tSelectMenu: function(_menu, _genre)
  {
    var tmenu = _menu;
    var tgenre = _genre;
    if (tmenu && tgenre)
    {
      if (tmenu == ':default:') tmenu = ':root:';
      tmenu = tmenu.replace(/(\/)/g, '-');
      tgenre = tgenre.replace(/(\/)/g, '-');
      var tmenuObj = $I('menu-' + tmenu);
      if (tmenuObj) tmenuObj.className = 'selected';
      var tgenreAry = tgenre.split('-');
      for (ti = 0; ti < tgenreAry.length; ti ++)
      {
        var tleftmenuAId = 'leftmenu';
        for (tk = 0; tk <= ti; tk ++) tleftmenuAId += '-' + tgenreAry[tk];
        var tleftmenuAIdObj = $I(tleftmenuAId);
        if (tleftmenuAIdObj) tleftmenuAIdObj.className = 'selected';
        var tleftmenuTrId = 'leftmenu-tr';
        for (tk = 0; tk < ti; tk ++) tleftmenuTrId += '-' + tgenreAry[tk];
        var tleftmenuTrObj = $I(tleftmenuTrId);
        if (tleftmenuTrObj) tleftmenuTrObj.className = '';
      };
    };
  },
  tSelectedSwitch: function(_id, _action, _message, _attentions)
  {
    var tid = _id;
    var taction = _action;
    var tmessage = _message;
    var tattentions = _attentions;
    if (!tid) manage.message.tAlert(tmessage);
    else manage.message.tConfirm(tattentions, taction);
  }
};

manage.ajaxselect = {
  tTopx: 5,
  tWord: Array,
  tHiddenTimeout: null,
  tTop1FillFid: 0,
  tTop1FillNext1Obj: null,
  tTop1FillTimeout: null,
  tFill: function(_id, _value, _itype, _value_id)
  {
    var tid = _id;
    var tvalue = _value;
    var titype = _itype;
    var tvalueid = _value_id;
    var tObj1 = $I(tid);
    var tObj2 = $I(tid + '-depot');
    if (tObj1 && tObj2)
    {
      var toValue = tObj1.value;
      if (tObj1.getAttribute('mode') == 'id') tvalue = tvalueid;
      if (tObj1.getAttribute('multi') == 'true')
      {
        if (toValue.indexOf(';') == -1) tvalue = tvalue + ';';
        else tvalue = toValue.substr(0, toValue.lastIndexOf(';')) + ';' + tvalue + ';';
      };
      tObj1.value = tvalue;
      if (titype != 1) tObj2.style.display = 'none';
    };
  },
  tHidden: function(_obj)
  {
    var tobj = _obj;
    manage.ajaxselect.tHiddenTimeout = setTimeout('manage.ajaxselect.tHiddens($I(\'' + tobj.id + '\'));', 600);
  },
  tHiddens: function(_obj)
  {
    var tobj = _obj;
    if (tobj)
    {
      var tObj1 = $I(tobj.id + '-depot');
      if (tObj1)
      {
        tObj1.innerHTML = '';
        tObj1.style.display = 'none';
      };
    };
  },
  tShow: function(_obj, _url, _keycode)
  {
    var tobj = _obj;
    var turl = _url;
    var tkeycode = _keycode;
    if (tkeycode != 13 && tkeycode != 38 && tkeycode != 40)
    {
      var tnWordValue = tobj.value;
      var tnWord = manage.ajaxselect.tWord[tobj.id];
      if (tkeycode == 59 || tkeycode == 186 || tkeycode == 188)
      {
        tnWordValue = tnWordValue.substr(0, tnWordValue.length - 1) + ';';
        tobj.value = tnWordValue;
      };
      if (tnWordValue.indexOf(';') != -1) tnWordValue = tnWordValue.substr(tnWordValue.lastIndexOf(';') + 1);
      if (tnWord != tnWordValue)
      {
        manage.ajaxselect.tWord[tobj.id] = tnWordValue;
        if (!tnWordValue) manage.ajaxselect.tHiddens(tobj);
        else cls.tigets(turl + iescape(tnWordValue), manage.ajaxselect.tShows, tobj.id);
      };
    };
  },
  tShows: function(_strers, _id)
  {
    var tid = _id;
    var tstrers = _strers;
    if (manage.tckBackString(tstrers))
    {
      var tObj1 = $I(tid + '-depot');
      if (tObj1)
      {
        tstrers = manage.tckrBackString(tstrers)
        if (tstrers != '')
        {
          tObj1.innerHTML = tstrers;
          tObj1.style.display = '';
        }
        else tObj1.style.display = 'none';
      };
    };
  },
  tSelectTop1: function(_obj, _keycode)
  {
    var tobj = _obj;
    var tkeycode = _keycode;
    var tfid = tobj.id;
    var tnext1objid = 0;
    var tnTopX = 0;
    var tTopX = manage.ajaxselect.tTopx;
    clearTimeout(manage.ajaxselect.tTop1FillTimeout);
    for (ti = 1; ti <= tTopX; ti ++)
    {
      var tnobj = $I('ajaxselect-td-' + tfid + '-' + ti);
      if (tnobj)
      {
        if (tnobj.className == 'tdash') tnext1objid = ti;
        tnTopX = ti;
        tnobj.className = '';
        tnobj.style.backgroundColor = '#FFFFFF';
      };
    };
    var tnext1obj = null;
    if (tkeycode == 38)
    {
      tnext1objid = tnext1objid - 1;
      if (tnext1objid <= 0) tnext1objid = tnTopX;
      tnext1obj = $I('ajaxselect-td-' + tfid + '-' + tnext1objid);
      if (!tnext1obj) tnext1obj = $I('ajaxselect-td-' + tfid + '-1');
    };
    if (tkeycode == 40)
    {
      tnext1objid = tnext1objid + 1;
      if (tnext1objid > tTopX) tnext1objid = 1;
      tnext1obj = $I('ajaxselect-td-' + tfid + '-' + tnext1objid);
      if (!tnext1obj) tnext1obj = $I('ajaxselect-td-' + tfid + '-1');
    };
    if (tnext1obj)
    {
      tnext1obj.className = 'tdash';
      tnext1obj.style.backgroundColor = '#EFEFEF';
      manage.ajaxselect.tTop1FillFid = tfid;
      manage.ajaxselect.tTop1FillNext1Obj = tnext1obj;
      if (tobj.getAttribute('multi') != 'true') manage.ajaxselect.tSelectTop1Fill();
      else manage.ajaxselect.tTop1FillTimeout = setTimeout('manage.ajaxselect.tSelectTop1Fill();', 600);
    };
  },
  tSelectTop1Fill: function()
  {
    var tfid = manage.ajaxselect.tTop1FillFid;
    var tnext1obj = manage.ajaxselect.tTop1FillNext1Obj;
    manage.ajaxselect.tFill(tfid, tnext1obj.innerHTML, 1, tnext1obj.getAttribute('valueid'));
  }
};

manage.attachments = {
  tSwfObj: null,
  tStateUploading: false,
  tInit: function(_argVars)
  {
    var targVars = _argVars;
    var tSwfSettings = {
      debug: false,
      upload_url: targVars.upload_url,
      post_params: targVars.post_params,
      flash_url: targVars.flash_url,
      file_post_name: 'file1',
      file_size_limit: targVars.file_size_limit,
      file_types: targVars.file_types,
      file_upload_limit: 100,
      file_queue_limit: 0,

      button_cursor: SWFUpload.CURSOR.HAND,
      button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
      button_image_url: targVars.button_image_url,
      button_width: targVars.button_width,
      button_height: targVars.button_height,
      button_placeholder_id: targVars.button_placeholder_id,

      file_queued_handler: manage.attachments.tFileQueued,
      upload_progress_handler: manage.attachments.tUploadProgress,
      upload_success_handler: manage.attachments.tUploadSuccess
    };
    manage.attachments.tSwfObj = new SWFUpload(tSwfSettings);
    manage.attachments.tInitAttachments();
  },
  tInitAttachments: function()
  {
    var tObj1 = $I('attachmentsList');
    var tObj2 = $I('attachmentsListEmpty');
    if (tObj1 && tObj2)
    {
      var tTrObjs = tObj1.getElementsByTagName('tr');
      if (tTrObjs.length >= 1)
      {
        tObj1.className = 'attachments';
        tObj2.className = 'hidden';
      }
      else
      {
        tObj1.className = 'hidden';
        tObj2.className = 'attachments';
      };
    };
  },
  tInitRsAttachments: function()
  {
    var tObj1 = $I('attachments');
    if (tObj1)
    {
      var tObj1Value = tObj1.value;
      var tObj1ValueArray = tObj1Value.split('|');
      for (var ti = 0; ti < tObj1ValueArray.length; ti ++)
      {
        var tCurrentValue = tObj1ValueArray[ti];
        if (tCurrentValue)
        {
          var tCurrentValueArray = tCurrentValue.split('>');
          var tCurrentValueArrayLength = tCurrentValueArray.length;
          if (tCurrentValueArrayLength == 3)
          {
            var tCurrentFileId = ti;
            var tCurrentFileName = tCurrentValueArray[0];
            var tCurrentFileSize = tCurrentValueArray[1];
            var tCurrentFilePath = tCurrentValueArray[2];
            var tCurrentFileType = tCurrentFilePath.substr(tCurrentFilePath.lastIndexOf('.') + 1);
            if (tCurrentFileType) tCurrentFileType = tCurrentFileType.toLowerCase();
            var tListObj = $I('attachmentsListTBody');
            var tAttachmentsBaseurlImageObj = $I('attachments-baseurl-image');
            var tNewInput1 = document.createElement('input');
            try
            {
              tNewInput1 = document.createElement('<input type="hidden" name="attachments-filename" />');
            }
            catch(e)
            {
              tNewInput1.setAttribute('type', 'hidden');
              tNewInput1.setAttribute('name', 'attachments-filename');
            };
            tNewInput1.setAttribute('id', 'input-attachments-filename-' + tCurrentFileId);
            tNewInput1.setAttribute('filesize', tCurrentFileSize);
            tNewInput1.value = tCurrentFileName;
            var tNewInput2 = document.createElement('input');
            try
            {
              tNewInput2 = document.createElement('<input type="hidden" name="attachments-filepath" />');
            }
            catch(e)
            {
              tNewInput2.setAttribute('type', 'hidden');
              tNewInput2.setAttribute('name', 'attachments-filepath');
            };
            tNewInput2.setAttribute('id', 'input-attachments-filepath-' + tCurrentFileId);
            tNewInput2.value = tCurrentFilePath;
            //*************************************************************************//
            var tNewTr = document.createElement('tr');
            tNewTr.setAttribute('id', 'div-attachments-tr-' + tCurrentFileId);
            var tNewTd1 = document.createElement('td');
            tNewTd1.appendChild(tNewInput1);
            tNewTd1.appendChild(tNewInput2);
            var tNewTd1Span = document.createElement('span');
            tNewTd1Span.className = 'handle';
            if (tAttachmentsBaseurlImageObj)
            {
              var tNewTd1Image = document.createElement('img');
              tNewTd1Image.className = 'hand absmiddle';
              tNewTd1Image.setAttribute('fileid', tCurrentFileId);
              tNewTd1Image.setAttribute('filetype', tCurrentFileType);
              tNewTd1Image.onclick = function()
              {
                var tMyFilePath = '';
                var tMyFileId = this.getAttribute('fileid');
                var tMyFileType = this.getAttribute('filetype');
                var tMyFilePathObj = $I('input-attachments-filepath-' + tMyFileId);
                if (tMyFilePathObj) tMyFilePath = tMyFilePathObj.value;
                if (tMyFilePath)
                {
                  if (tMyFileType == 'jpg' || tMyFileType == 'gif' || tMyFileType == 'png') manage.img.preview.tShow(tMyFilePath, '404 Error!');
                  else window.open(tMyFilePath, '_blank');
                };
              };
              tNewTd1Image.src = tAttachmentsBaseurlImageObj.value + 'files/' + tCurrentFileType + '.gif';
              tNewTd1Image.onerror = function() { this.src = tAttachmentsBaseurlImageObj.value + 'files/default.gif'; };
              tNewTd1Span.appendChild(tNewTd1Image);
            };
            var tNewTd1TextSpan = document.createElement('span');
            tNewTd1TextSpan.style.paddingLeft = '2px';
            tNewTd1TextSpan.setAttribute('fileid', tCurrentFileId);
            tNewTd1TextSpan.setAttribute('id', 'span-attachments-text-' + tCurrentFileId);
            tNewTd1TextSpan.innerHTML = tCurrentFileName;
            tNewTd1Span.appendChild(tNewTd1TextSpan);
            tNewTd1.setAttribute('fileid', tCurrentFileId);
            tNewTd1.ondblclick = function()
            {
              var tMySpanObj = $I('span-attachments-text-' + this.getAttribute('fileid'));
              if (tMySpanObj)
              {
                var tMyEditMode = this.getAttribute('editmode');
                if (tMyEditMode != 'edit')
                {
                  var tMyNewEditInput = document.createElement('input');
                  tMyNewEditInput.className = 'inptext-3';
                  tMyNewEditInput.setAttribute('type', 'text');
                  tMyNewEditInput.setAttribute('fileid', this.getAttribute('fileid'));
                  tMyNewEditInput.setAttribute('id', 'input-attachments-text-' + this.getAttribute('fileid'));
                  tMyNewEditInput.value = tMySpanObj.innerHTML;
                  tMySpanObj.innerHTML = '';
                  tMySpanObj.appendChild(tMyNewEditInput);
                  tMySpanObj.setAttribute('editmode', 'edit');
                  tMyNewEditInput.select();
                  tMyNewEditInput.onblur = function()
                  {
                    var tMyFileId = this.getAttribute('fileid');
                    var tMyValue = cls.tfilenameFilter(this.value);
                    if (!tMyValue) tMyValue = 'Untitled';
                    var tMyObj1 = $I('span-attachments-text-' + tMyFileId);
                    var tMyObj2 = $I('input-attachments-filename-' + tMyFileId);
                    if (tMyObj1 && tMyObj2)
                    {
                      tMyObj2.value = tMyValue;
                      tMyObj1.innerHTML = tMyValue;
                      tMyObj1.setAttribute('editmode', 'normal');
                    };
                  };
                };
              };
            };
            tNewTd1.appendChild(tNewTd1Span);
            tNewTr.appendChild(tNewTd1);
            var tNewTd2 = document.createElement('td');
            tNewTd2.setAttribute('align', 'center');
            tNewTd2.style.width = '120px';
            tNewTd2.innerHTML = cls.tformatByte(tCurrentFileSize);
            tNewTr.appendChild(tNewTd2);
            var tNewTd3 = document.createElement('td');
            tNewTd3.setAttribute('align', 'center');
            tNewTd3.setAttribute('id', 'div-attachments-control-' + tCurrentFileId);
            tNewTd3.style.width = '80px';
            var tMessage100Obj = $I('attachments-state-100');
            if (tMessage100Obj)
            {
              var tNewSpan = document.createElement('span');
              tNewSpan.className = 'green hand';
              tNewSpan.innerHTML = tMessage100Obj.getAttribute('insert');
              tNewSpan.setAttribute('filepath', tCurrentFilePath);
              tNewSpan.setAttribute('filename', tCurrentFileName);
              tNewTd3.appendChild(tNewSpan);
              var tNewImg = document.createElement('img');
              tNewImg.src = tMessage100Obj.getAttribute('img');
              tNewImg.className = 'imgButton';
              tNewImg.setAttribute('fileid', tCurrentFileId);
              tNewImg.setAttribute('title', tMessage100Obj.getAttribute('imgtitle'));
              tNewImg.onclick = function() { manage.attachments.tRemoveFile(this.getAttribute('fileid')); };
              tNewTd3.appendChild(tNewImg);
              tNewSpan.onclick = function() { editor.tInsertAttachments(tMessage100Obj.getAttribute('insertid'), this.getAttribute('filepath'), this.getAttribute('filename')); };
            };
            tNewTr.appendChild(tNewTd3);
            if (tListObj) tListObj.appendChild(tNewTr);
            manage.attachments.tInitAttachments();
            tTableSorting.tInit($I('attachmentsList'));
          };
        };
      };
    };
  },
  tSetInputValue: function()
  {
    var tFilenameObjs = document.getElementsByName('attachments-filename');
    var tFilepathObjs = document.getElementsByName('attachments-filepath');
    if (tFilenameObjs.length == tFilepathObjs.length)
    {
      var tmpstr = '';
      var tobj = $I('attachments');
      for (var ti = 0; ti < tFilenameObjs.length; ti ++)
      {
        if (tFilepathObjs[ti].value) tmpstr = tmpstr + tFilenameObjs[ti].value + '>' + tFilenameObjs[ti].getAttribute('filesize') + '>' + tFilepathObjs[ti].value + '|';
      };
      if (tmpstr) tmpstr = tmpstr.substr(0, tmpstr.length - 1);
      if (tobj) tobj.value = tmpstr;
    };
  },
  tRemoveFile: function(_id)
  {
    var tid = _id;
    var tobj = $I('div-attachments-tr-' + tid);
    if (tobj)
    {
      tobj.parentNode.removeChild(tobj);
      manage.attachments.tSwfObj.cancelUpload(tid);
    };
    manage.attachments.tInitAttachments();
  },
  tStartUpload: function()
  {
    var tStats = manage.attachments.tSwfObj.getStats();
    if (!manage.attachments.tStateUploading)
    {
      if (tStats.files_queued > 0)
      {
        manage.attachments.tSwfObj.startUpload();
        manage.attachments.tStateUploading = true;
      }
      else manage.attachments.tStateUploading = false;
    };
  },
  tFileQueued: function(_file)
  {
    var tfile = _file;
    var tCurrentFileId = tfile.id;
    var tCurrentFileName = tfile.name;
    var tCurrentFileSize = tfile.size;
    var tCurrentFilePath = '';
    var tCurrentFileType = tCurrentFileName.substr(tCurrentFileName.lastIndexOf('.') + 1);
    if (tCurrentFileType) tCurrentFileType = tCurrentFileType.toLowerCase();
    var tListObj = $I('attachmentsListTBody');
    var tAttachmentsBaseurlImageObj = $I('attachments-baseurl-image');
    var tNewInput1 = document.createElement('input');
    try
    {
      tNewInput1 = document.createElement('<input type="hidden" name="attachments-filename" />');
    }
    catch(e)
    {
      tNewInput1.setAttribute('type', 'hidden');
      tNewInput1.setAttribute('name', 'attachments-filename');
    };
    tNewInput1.setAttribute('id', 'input-attachments-filename-' + tCurrentFileId);
    tNewInput1.setAttribute('filesize', tCurrentFileSize);
    tNewInput1.value = tCurrentFileName;
    var tNewInput2 = document.createElement('input');
    try
    {
      tNewInput2 = document.createElement('<input type="hidden" name="attachments-filepath" />');
    }
    catch(e)
    {
      tNewInput2.setAttribute('type', 'hidden');
      tNewInput2.setAttribute('name', 'attachments-filepath');
    };
    tNewInput2.setAttribute('id', 'input-attachments-filepath-' + tCurrentFileId);
    //*************************************************************************//
    var tNewTr = document.createElement('tr');
    tNewTr.setAttribute('id', 'div-attachments-tr-' + tCurrentFileId);
    var tNewTd1 = document.createElement('td');
    tNewTd1.appendChild(tNewInput1);
    tNewTd1.appendChild(tNewInput2);
    var tNewTd1Span = document.createElement('span');
    tNewTd1Span.className = 'handle';
    if (tAttachmentsBaseurlImageObj)
    {
      var tNewTd1Image = document.createElement('img');
      tNewTd1Image.className = 'hand absmiddle';
      tNewTd1Image.setAttribute('fileid', tCurrentFileId);
      tNewTd1Image.setAttribute('filetype', tCurrentFileType);
      tNewTd1Image.onclick = function()
      {
        var tMyFilePath = '';
        var tMyFileId = this.getAttribute('fileid');
        var tMyFileType = this.getAttribute('filetype');
        var tMyFilePathObj = $I('input-attachments-filepath-' + tMyFileId);
        if (tMyFilePathObj) tMyFilePath = tMyFilePathObj.value;
        if (tMyFilePath)
        {
          if (tMyFileType == 'jpg' || tMyFileType == 'gif' || tMyFileType == 'png') manage.img.preview.tShow(tMyFilePath, '404 Error!');
          else window.open(tMyFilePath, '_blank');
        };
      };
      tNewTd1Image.src = tAttachmentsBaseurlImageObj.value + 'files/' + tCurrentFileType + '.gif';
      tNewTd1Image.onerror = function() { this.src = tAttachmentsBaseurlImageObj.value + 'files/default.gif'; };
      tNewTd1Span.appendChild(tNewTd1Image);
    };
    var tNewTd1TextSpan = document.createElement('span');
    tNewTd1TextSpan.style.paddingLeft = '2px';
    tNewTd1TextSpan.setAttribute('fileid', tCurrentFileId);
    tNewTd1TextSpan.setAttribute('id', 'span-attachments-text-' + tCurrentFileId);
    tNewTd1TextSpan.innerHTML = tCurrentFileName;
    tNewTd1Span.appendChild(tNewTd1TextSpan);
    tNewTd1.setAttribute('fileid', tCurrentFileId);
    tNewTd1.ondblclick = function()
    {
      var tMySpanObj = $I('span-attachments-text-' + this.getAttribute('fileid'));
      if (tMySpanObj)
      {
        var tMyEditMode = this.getAttribute('editmode');
        if (tMyEditMode != 'edit')
        {
          var tMyNewEditInput = document.createElement('input');
          tMyNewEditInput.className = 'inptext-3';
          tMyNewEditInput.setAttribute('type', 'text');
          tMyNewEditInput.setAttribute('fileid', this.getAttribute('fileid'));
          tMyNewEditInput.setAttribute('id', 'input-attachments-text-' + this.getAttribute('fileid'));
          tMyNewEditInput.value = tMySpanObj.innerHTML;
          tMySpanObj.innerHTML = '';
          tMySpanObj.appendChild(tMyNewEditInput);
          tMySpanObj.setAttribute('editmode', 'edit');
          tMyNewEditInput.select();
          tMyNewEditInput.onblur = function()
          {
            var tMyFileId = this.getAttribute('fileid');
            var tMyValue = cls.tfilenameFilter(this.value);
            if (!tMyValue) tMyValue = 'Untitled';
            var tMyObj1 = $I('span-attachments-text-' + tMyFileId);
            var tMyObj2 = $I('input-attachments-filename-' + tMyFileId);
            if (tMyObj1 && tMyObj2)
            {
              tMyObj2.value = tMyValue;
              tMyObj1.innerHTML = tMyValue;
              tMyObj1.setAttribute('editmode', 'normal');
            };
          };
        };
      };
    };
    tNewTd1.appendChild(tNewTd1Span);
    tNewTr.appendChild(tNewTd1);
    var tNewTd2 = document.createElement('td');
    tNewTd2.setAttribute('align', 'center');
    tNewTd2.style.width = '120px';
    tNewTd2.innerHTML = cls.tformatByte(tCurrentFileSize);
    tNewTr.appendChild(tNewTd2);
    var tNewTd3 = document.createElement('td');
    tNewTd3.setAttribute('align', 'center');
    tNewTd3.setAttribute('id', 'div-attachments-control-' + tCurrentFileId);
    tNewTd3.style.width = '80px';
    var tMessage0Obj = $I('attachments-state-0');
    if (tMessage0Obj)
    {
      var tNewSpan = document.createElement('span');
      tNewSpan.className = 'gray';
      tNewSpan.innerHTML = tMessage0Obj.value;
      tNewTd3.appendChild(tNewSpan);
      var tNewImg = document.createElement('img');
      tNewImg.src = tMessage0Obj.getAttribute('img');
      tNewImg.className = 'imgButton';
      tNewImg.setAttribute('fileid', tCurrentFileId);
      tNewImg.setAttribute('title', tMessage0Obj.getAttribute('imgtitle'));
      tNewImg.onclick = function() { manage.attachments.tRemoveFile(this.getAttribute('fileid')); };
      tNewTd3.appendChild(tNewImg);
    };
    tNewTr.appendChild(tNewTd3);
    if (tListObj)
    {
      tListObj.appendChild(tNewTr);
      manage.attachments.tStartUpload();
    };
    manage.attachments.tInitAttachments();
    tTableSorting.tInit($I('attachmentsList'));
  },
  tUploadProgress: function(_file, _bytesLoaded, _bytesTotal)
  {
    var tfile = _file;
    var tfileID = tfile.id;
    var tbytesLoaded = _bytesLoaded;
    var tbytesTotal = _bytesTotal;
    var tnpercent = Math.round(tbytesLoaded / tbytesTotal * 100) ;
    var tMessage1Obj = $I('attachments-state-1');
    var tControlObj = $I('div-attachments-control-' + tfileID);
    if (tMessage1Obj && tControlObj)
    {
      tControlObj.innerHTML = '';
      var tNewSpan = document.createElement('span');
      tNewSpan.className = 'yellow';
      tNewSpan.innerHTML = tMessage1Obj.value + '(' + tnpercent + '%)';
      tControlObj.appendChild(tNewSpan);
    };
  },
  tUploadSuccess: function(_file, _serverData)
  {
    var tfile = _file;
    var tfileID = tfile.id;
    var tserverData = _serverData;
    var tMessage10Obj = $I('attachments-state-10');
    var tMessage100Obj = $I('attachments-state-100');
    var tControlObj = $I('div-attachments-control-' + tfileID);
    var tstate = cls.tgetParameter(tserverData, 'state');
    if (tMessage10Obj && tMessage100Obj && tControlObj)
    {
      if (tstate != '-1')
      {
        tControlObj.innerHTML = '';
        var tErrorState = decodeURIComponent(cls.tgetParameter(tserverData, 'errstate'));
        if (tstate == '1') tErrorState = tErrorState + '[' + decodeURIComponent(cls.tgetParameter(tserverData, '-fupmaxsize')) + ']';
        if (tstate == '2') tErrorState = tErrorState + '[' + decodeURIComponent(cls.tgetParameter(tserverData, '-fuptype')) + ']';
        var tNewSpan = document.createElement('span');
        tNewSpan.className = 'red';
        tNewSpan.setAttribute('title', tErrorState);
        tNewSpan.innerHTML = tMessage10Obj.value;
        tControlObj.appendChild(tNewSpan);
        var tNewImg = document.createElement('img');
        tNewImg.src = tMessage10Obj.getAttribute('img');
        tNewImg.className = 'imgButton';
        tNewImg.setAttribute('fileid', tfile.id);
        tNewImg.setAttribute('title', tMessage10Obj.getAttribute('imgtitle'));
        tNewImg.onclick = function() { manage.attachments.tRemoveFile(this.getAttribute('fileid')); };
        tControlObj.appendChild(tNewImg);
      }
      else
      {
        tControlObj.innerHTML = '';
        var tNewSpan = document.createElement('span');
        tNewSpan.className = 'green hand';
        tNewSpan.innerHTML = tMessage100Obj.getAttribute('insert');
        tControlObj.appendChild(tNewSpan);
        var tNewImg = document.createElement('img');
        tNewImg.src = tMessage100Obj.getAttribute('img');
        tNewImg.className = 'imgButton';
        tNewImg.setAttribute('fileid', tfile.id);
        tNewImg.setAttribute('title', tMessage100Obj.getAttribute('imgtitle'));
        tNewImg.onclick = function() { manage.attachments.tRemoveFile(this.getAttribute('fileid')); };
        tControlObj.appendChild(tNewImg);
        var tFileNameObj = $I('input-attachments-filename-' + tfileID);
        var tFilePathObj = $I('input-attachments-filepath-' + tfileID);
        if (tFileNameObj && tFilePathObj)
        {
          tFilePathObj.value = decodeURIComponent(cls.tgetParameter(tserverData, 'fullfilename'));
          tNewSpan.onclick = function() { editor.tInsertAttachments(tMessage100Obj.getAttribute('insertid'), tFilePathObj.value, tFileNameObj.value); };
        };
      };
    };
    manage.attachments.tStateUploading = false;
    manage.attachments.tStartUpload();
  }
};

manage.form = {
  tInputsData: new Array(),
  tTextareasData: new Array(),
  tSelectsData: new Array(),
  tInitFileds: function(_strform)
  {
    var tForm = _strform;
    var tFormObj = $I(tForm);
    if (tFormObj)
    {
      var tInputObjs = tFormObj.getElementsByTagName("input");
      var tTextareaObjs = tFormObj.getElementsByTagName("textarea");
      var tSelectObjs = tFormObj.getElementsByTagName("select");
      manage.form.tInputsData[tForm] = new Array(tInputObjs.length);
      for (var ti = 0; ti < tInputObjs.length; ti ++)
      {
        manage.form.tInputsData[tForm][ti] = tInputObjs[ti].value;
        if (tInputObjs[ti].type == 'radio') manage.form.tInputsData[tForm][ti] = tInputObjs[ti].checked;
        if (tInputObjs[ti].type == 'checkbox') manage.form.tInputsData[tForm][ti] = tInputObjs[ti].checked;
      };
      manage.form.tTextareasData[tForm] = new Array(tTextareaObjs.length);
      for (var ti = 0; ti < tTextareaObjs.length; ti ++) manage.form.tTextareasData[tForm][ti] = tTextareaObjs[ti].value;
      manage.form.tSelectsData[tForm] = new Array(tSelectObjs.length);
      for (var ti = 0; ti < tSelectObjs.length; ti ++) manage.form.tSelectsData[tForm][ti] = tSelectObjs[ti].value;
    };
  },
  tHasBeenChanged: function(_strform)
  {
    var tBool = false;
    var tForm = _strform;
    var tFormObj = $I(tForm);
    if (tFormObj)
    {
      var tInputObjs = tFormObj.getElementsByTagName("input");
      var tTextareaObjs = tFormObj.getElementsByTagName("textarea");
      var tSelectObjs = tFormObj.getElementsByTagName("select");
      for (var ti = 0; ti < tInputObjs.length; ti ++)
      {
        var tInputObjsValue = tInputObjs[ti].value;
        if (tInputObjs[ti].type == 'radio') tInputObjsValue =  tInputObjs[ti].checked;
        if (tInputObjs[ti].type == 'checkbox') tInputObjsValue =  tInputObjs[ti].checked;
        if (tInputObjsValue != manage.form.tInputsData[tForm][ti]) tBool = true;
      };
      for (var ti = 0; ti < tTextareaObjs.length; ti ++)
      {
        var tTextareaObjsValue = tTextareaObjs[ti].value;
        if (tTextareaObjsValue != manage.form.tTextareasData[tForm][ti]) tBool = true;
      };
      for (var ti = 0; ti < tSelectObjs.length; ti ++)
      {
        var tSelectObjsValue = tSelectObjs[ti].value;
        if (tSelectObjsValue != manage.form.tSelectsData[tForm][ti]) tBool = true;
      };
    };
    return tBool;
  }
};

manage.img = {
	tchange: function(_obj, _type)
  {
    var tobj = _obj;
    var ttype = _type;
    if (tobj)
    {
      if (ttype == 0) tobj.src = tobj.src.replace(/(.0.png)/g, '.1.png');
      if (ttype == 1) tobj.src = tobj.src.replace(/(.1.png)/g, '.0.png');
    };
  },
  tinsertSelects: function(_name, _value)
  {
    var tname = _name;
    var tvalue = _value;
    var tobj = $I(tname);
    if (tobj)
    {
      if (tobj.getAttribute('inserted') != 'yes')
      {
        var tAry = tvalue.split('|');
        for (ti = 0; ti < tAry.length; ti ++)
        {
          if (tAry[ti]) cls.selects.tAdd(tname, tAry[ti], tAry[ti]);
        };
        tobj.setAttribute('inserted', 'yes');
      };
    };
  }
};

manage.img.preview = {
  tError: function(_strErrMessage)
  {
    cls.mask.tClose();
    var tstrErrMessage = _strErrMessage;
    manage.message.tAlert(tstrErrMessage);
  },
  tShow: function(_strURL, _strErrMessage)
  {
    var tstrURL = _strURL;
    var tstrErrMessage = _strErrMessage;
    if (tstrURL)
    {
      var tHTML = '<div class="jimgPreview" onclick="manage.img.preview.tClose();"><img src="' + tstrURL + '" class="hidden" onload="this.className = \'hand\'; cls.img.tResize(this, 400, 300); cls.mask.tSetStyle(); this.parentNode.className = \'jimgPreviews\';" onclick="manage.img.preview.tClose();" onerror="manage.img.preview.tError(\'' + tstrErrMessage + '\');" /></div>';
      cls.mask.tShow(tHTML);
      cls.mask.tSetStyle();
    };
  },
  tClose: function()
  {
    cls.mask.tClose();
  }
};

manage.lang = {
  tTimeout: null,
  tInit: function(_url)
  {
    var turl = _url;
    cls.tigets(turl + manage.tinterfaceURL + '?type=loadslng', manage.lang.tInits, turl);
  },
  tInits: function(_strers, _url)
  {
    var tstrers = _strers;
    var turl = _url;
    if (manage.tckBackString(tstrers))
    {
      tstrers = manage.tckrBackString(tstrers);
      tstrers = tstrers.replace(/(\[\~baseurl\])/g, turl);
      var tLanguageBoxObj = $I('topLanguageBox');
      if (tLanguageBoxObj) tLanguageBoxObj.innerHTML = tstrers;
    };
  },
  tSelect: function(_lang)
  {
    var tlang = _lang;
    var tObj1 = $I('topLanguage');
    var tObj2 = $I('topLanguageSelect');
    var tObj3 = $I('topLanguageSelect-' + tlang);
    if (tObj1 && tObj2 && tObj3)
    {
      if (tObj2.className == 'hidden')
      {
        tObj2.className = '';
        tObj1.onmouseout = manage.lang.tMouseOut;
        tObj1.onmouseover = manage.lang.tMouseOver;
        tObj2.onmouseout = manage.lang.tMouseOut;
        tObj2.onmouseover = manage.lang.tMouseOver;
        manage.lang.tSelectItem(tObj3);
      }
      else
      {
        tObj2.className = 'hidden';
        tObj1.onmouseout = null;
        tObj1.onmouseover = null;
        tObj2.onmouseout = null;
        tObj2.onmouseover = null;
      };
    };
  },
  tSelectItem: function(_obj)
  {
    var tobj = _obj;
    var tParentObj = tobj.parentNode;
    var tLiObjs = document.getElementsByTagName('li');
    for (var ti = 0; ti < tLiObjs.length; ti ++)
    {
      var tCurrentObj = tLiObjs[ti];
      if (tobj != tCurrentObj) tCurrentObj.className = '';
      else tCurrentObj.className = 'selected';
    };
  },
  tSelectLanguage: function(_lng, _url)
  {
    var tlng = _lng;
    var turl = _url;
    cls.tigets(turl + manage.tinterfaceURL + '?type=action&atype=setslng&slng=' + iescape(tlng), manage.lang.tSelectLanguages);
  },
  tSelectLanguages: function(_strers)
  {
    var tstrers = _strers;
    if (tstrers != '$error$') location.reload();
  },
  tMouseOut: function()
  {
    manage.lang.tTimeout = setTimeout('manage.lang.tMouseTimeOut()', 600);
  },
  tMouseOver: function()
  {
    clearTimeout(manage.lang.tTimeout);
  },
  tMouseTimeOut: function()
  {
    var tObj1 = $I('topLanguage');
    var tObj2 = $I('topLanguageSelect');
    if (tObj1 && tObj2)
    {
      tObj2.className = 'hidden';
      tObj1.onmouseout = null;
      tObj1.onmouseover = null;
      tObj2.onmouseout = null;
      tObj2.onmouseover = null;
    };
  }
};

manage.login = {
  tIEMessageOk: function()
  {
    var tMessageObj = $I('loginIEMessage');
    if (tMessageObj) tMessageObj.className = 'hidden';
    cls.tigets(manage.tinterfaceURL + '?type=action&atype=iemessageok', nll);
  },
  tLoginClick: function()
  {
    var tformObj = $I('form1');
    if (tformObj)
    {
      var tformBeObj = $I(tformObj.id + 'BeforeAction');
      var tAction = manage.tinterfaceURL + '?type=action&atype=login';
      var tstrform = cls.form.tgetValues(tformObj);
      var tAjaxSubmitObj = $I('ajaxSubmit');
      var tLoginMessageObj = $I('loginMessage');
      if (tAjaxSubmitObj) tAjaxSubmitObj.disabled = true;
      if (tLoginMessageObj) tLoginMessageObj.className = 'hidden';
      var tLoadingTimeout = setTimeout('manage.tSetClassName(\'loginLoading\', \'ash\')', 200);
      cls.tiposts(tAction, tstrform, manage.login.tLoginClicks, tLoadingTimeout);
    };
    return false;
  },
  tLoginClicks: function(_strers, _timeout)
  {
    var tstrers = _strers;
    var tLoadingTimeout = _timeout;
    clearTimeout(tLoadingTimeout);
    var tLoadingObj = $I('loginLoading');
    var tAjaxSubmitObj = $I('ajaxSubmit');
    if (tLoadingObj) tLoadingObj.className = 'hidden';
    if (tAjaxSubmitObj) tAjaxSubmitObj.disabled = false;
    if (manage.tckBackString(tstrers))
    {
      tstrers = manage.tckrBackString(tstrers);
      if (tstrers.indexOf('<!--200-->') != -1) location.reload();
      else
      {
        var tLoginMessageObj = $I('loginMessage');
        var tLoginMessageTextObj = $I('loginMessageText');
        if (tLoginMessageObj) tLoginMessageObj.className = null;
        if (tLoginMessageTextObj) tLoginMessageTextObj.innerHTML = tstrers;
      };
    };
  }
};

manage.logout = {
  tLogoutClick: function(_baseurl)
  {
    var tbaseurl = _baseurl;
    var tlogouturl = tbaseurl + '/' + manage.tinterfaceURL + '?type=action&atype=logout';
    cls.tigets(tlogouturl, manage.logout.tLogoutClicks);
  },
  tLogoutClicks: function(_strers)
  {
    var tstrers = _strers;
    switch (tstrers)
    {
      case '200':
        location.reload();
        break;
      default :
        manage.logout.tLogoutClick();
        break;
    };
  }
};

manage.loading = {
  tLoader: function(_strers)
  {
    var tstrers = _strers;
    if (tstrers)
    {
      var tHTML = '<div class="jloader"><div>' + tstrers + '</div></div>';
      cls.mask.tShow(tHTML);
      cls.mask.tSetStyle();
    };
  },
  tClose: function()
  {
    cls.mask.tClose();
  }
};

manage.message = {
  tAlert: function(_strers, _strLink)
  {
    var tstrers = _strers;
    var tstrlink = _strLink;
    if (!tstrlink) tstrlink = 'popup.tClose();';
    var tmpHTML = '';
    tmpHTML += '<div class="popup2">';
    tmpHTML += '  <table width="100%" cellpadding="0" cellspacing="0" border="0">';
    tmpHTML += '    <tr>';
    tmpHTML += '      <td height="5" colspan="3" class="alpha1TD50"></td>';
    tmpHTML += '    </tr>';
    tmpHTML += '    <tr>';
    tmpHTML += '      <td width="5" class="alpha1TD50"></td>';
    tmpHTML += '      <td valign="top">';
    tmpHTML += '        <div class="popup2Title">';
    tmpHTML += '          <div>' + decodeURIComponent('%E6%8F%90%E7%A4%BA%E4%BF%A1%E6%81%AF') + '</div>';
    tmpHTML += '          <span class="hand" onclick="popup.tClose();"></span>';
    tmpHTML += '        </div>';
    tmpHTML += '        <div class="popup2Content">';
    tmpHTML += '          <table width="100%" cellpadding="0" cellspacing="0" border="0">';
    tmpHTML += '            <tr>';
    tmpHTML += '              <td class="line1"></td>';
    tmpHTML += '            </tr>';
    tmpHTML += '            <tr>';
    tmpHTML += '              <td height="100" class="popup2ContentText">' + tstrers + '</td>';
    tmpHTML += '            </tr>';
    tmpHTML += '            <tr>';
    tmpHTML += '              <td height="60" valign="top" align="center"><button id="popupAlertOk" type="button" class="BtnOk" onclick="' + tstrlink + '"></button></td>';
    tmpHTML += '            </tr>';
    tmpHTML += '            <tr>';
    tmpHTML += '              <td class="line1"></td>';
    tmpHTML += '            </tr>';
    tmpHTML += '            <tr>';
    tmpHTML += '              <td height="10"></td>';
    tmpHTML += '            </tr>';
    tmpHTML += '          </table>';
    tmpHTML += '        </div>';
    tmpHTML += '      </td>';
    tmpHTML += '      <td width="5" class="alpha1TD50"></td>';
    tmpHTML += '    </tr>';
    tmpHTML += '    <tr>';
    tmpHTML += '      <td height="5" colspan="3" class="alpha1TD50"></td>';
    tmpHTML += '    </tr>';
    tmpHTML += '  </table>';
    tmpHTML += '</div>';
    popup.tShow(tmpHTML);
    manage.tPlayWav('alert');
    var tAlertOkObj = $I('popupAlertOk');
    if (tAlertOkObj) tAlertOkObj.focus();
  },
  tConfirm: function(_strers, _strLink)
  {
    var tstrers = _strers;
    var tstrlink = _strLink;
    var tmpHTML = '';
    tmpHTML += '<div class="popup2">';
    tmpHTML += '  <table width="100%" cellpadding="0" cellspacing="0" border="0">';
    tmpHTML += '    <tr>';
    tmpHTML += '      <td height="5" colspan="3" class="alpha2TD50"></td>';
    tmpHTML += '    </tr>';
    tmpHTML += '    <tr>';
    tmpHTML += '      <td width="5" class="alpha2TD50"></td>';
    tmpHTML += '      <td valign="top">';
    tmpHTML += '        <div class="popup2Title">';
    tmpHTML += '          <div>' + decodeURIComponent('%E6%8F%90%E7%A4%BA%E4%BF%A1%E6%81%AF') + '</div>';
    tmpHTML += '          <span class="hand" onclick="popup.tClose();"></span>';
    tmpHTML += '        </div>';
    tmpHTML += '        <div class="popup2Content">';
    tmpHTML += '          <table width="100%" cellpadding="0" cellspacing="0" border="0">';
    tmpHTML += '            <tr>';
    tmpHTML += '              <td class="line1"></td>';
    tmpHTML += '            </tr>';
    tmpHTML += '            <tr>';
    tmpHTML += '              <td height="100" class="popup2ContentText">' + tstrers + '</td>';
    tmpHTML += '            </tr>';
    tmpHTML += '            <tr>';
    tmpHTML += '              <td height="60" valign="top" align="center"><button id="popupConfirmOk" type="button" class="BtnOk" onclick="' + tstrlink + 'popup.tClose();"></button>&nbsp; &nbsp;<button type="button" class="BtnCancel" onclick="popup.tClose();"></button></td>';
    tmpHTML += '            </tr>';
    tmpHTML += '            <tr>';
    tmpHTML += '              <td class="line1"></td>';
    tmpHTML += '            </tr>';
    tmpHTML += '            <tr>';
    tmpHTML += '              <td height="10"></td>';
    tmpHTML += '            </tr>';
    tmpHTML += '          </table>';
    tmpHTML += '        </div>';
    tmpHTML += '      </td>';
    tmpHTML += '      <td width="5" class="alpha2TD50"></td>';
    tmpHTML += '    </tr>';
    tmpHTML += '    <tr>';
    tmpHTML += '      <td height="5" colspan="3" class="alpha2TD50"></td>';
    tmpHTML += '    </tr>';
    tmpHTML += '  </table>';
    tmpHTML += '</div>';
    popup.tShow(tmpHTML);
    manage.tPlayWav('confirm');
  }
};

manage.pagi = {
  tredirect: function(_baseLink, _page, _event)
  {
    var tpage = _page;
    var tevent = _event;
    var tbaseLink = _baseLink;
    tbaseLink = cls.thtmlDecode(tbaseLink);
    tbaseLink = tbaseLink.replace(/(\[\~page\])/g, tpage);
    manage.tHref(tbaseLink, tevent);
  }
};

manage.validator = {
  tNotnull: /.+/,
  tEmail: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
  tNumber: /^\d+$/,
  tUsername: /^[\u4e00-\u9fa5_a-zA-Z0-9]+$/,
  tCheck: function(_obj, _focus)
  {
    var tobj = _obj;
    var tfocus = _focus;
    var tbool = true;
    var tRmessageString = '';
    if (tobj)
    {
      var tVobj, tFocusObj, tName, tValue;
      var tValueFormat, tValueFormatState, tValueFormatString;
      var tInputObj = tobj.getElementsByTagName('input');
      this.tValueAry = new Array();
      for(ti = 0; ti < tInputObj.length; ti++)
      {
        tVobj = tInputObj[ti];
        tName = tVobj.getAttribute('name');
        tValue = tVobj.value;
        tValueFormat = tVobj.getAttribute('format');
        this.tValueAry[tName] = tValue;
        if (tValueFormat)
        {
          tValueFormatState = false;
          tValueFormatString = '';
          if (tValueFormat.indexOf('->') != -1)
          {
            tValueFormatString = tValueFormat.substr(tValueFormat.indexOf('->') + 2);
            tValueFormat = tValueFormat.substring(0, tValueFormat.indexOf('->'));
          };
          if (tValueFormat == 'SameAs')
          {
            if (this.tValueAry[tValueFormatString] == tValue) tValueFormatState = true;
          }
          else
          {
            if (this['t' + tValueFormat].test(tValue)) tValueFormatState = true;
          };
          if (tValueFormatState)
          {
            var tHintObj = $I('span-' + tName + '-hint');
            if (tHintObj) tHintObj.className = 'hidden';
            tVobj.className = tVobj.getAttribute('normalclass');
          }
          else
          {
            var tthis = this;
            var tHintObj = $I('span-' + tName + '-hint');
            if (tHintObj) tHintObj.className = 'alert';
            tVobj.className = tVobj.getAttribute('errorclass');
            tVobj.onblur = function() { tthis.tCheck(tobj, true); };
            if (!tFocusObj && !tfocus)
            {
              tFocusObj = tVobj;
              tFocusObj.focus();
            };
            tbool = false;
          };
        };
      };
    };
    return tbool;
  }
};

manage.windows = {
  tPanelLoadingTimeout: null,
  tShowPanelLoading: function()
  {
    manage.windows.tPanelLoadingTimeout = setTimeout('manage.windows.tShowPanelLoadings();', 200);
  },
  tShowPanelLoadings: function()
  {
    var tLoadingObj = $I('topLoading');
    if (tLoadingObj) tLoadingObj.style.display = 'block';
  },
  tHidePanelLoading: function()
  {
    var tLoadingObj = $I('topLoading');
    clearTimeout(manage.windows.tPanelLoadingTimeout);
    if (tLoadingObj) tLoadingObj.style.display = 'none';
  }
};
