var FrontInfo_pageListByRecursion = {
/* 翻页验证 */
  contentListByPageNo : function(link, totalPages, cestatice, compId) {
    var input = document.getElementById(compId + "_inputPageNo");
    var inputValue = input.value;
    var temp_link = cestatice.replace("this.value", inputValue);

    if(inputValue == null || inputValue == "") {
      alert(i18n_FrontInfo_pageListByRecursion_infopublish_page_invalidnumber);
      input.focus();
      return;
    }

    var str = /^\d+$/;
    if(! str.test(inputValue)) {
      alert(i18n_FrontInfo_pageListByRecursion_infopublish_page_invalidnumber);
      input.value = '';
      input.focus();
      return;
    }

    var inputPageNo = parseInt(inputValue);
    if(inputPageNo == 0) {
      alert(i18n_FrontInfo_pageListByRecursion_infopublish_page_invalidnumber);
      input.value = '';
      input.focus();
      return;
    }

    if(totalPages < inputPageNo) {
      alert(i18n_FrontInfo_pageListByRecursion_infopublish_page_invalidnumber);
      input.value = '';
      input.focus();
      return;
    }

    if(inputPageNo == 0) {
      inputPageNo = 1;
    }

    document.location.replace(temp_link);
  },

/*显示浏览次数*/
  addHitNumber : function(compId) {
    var ulObj = document.getElementById(compId + '_ul');
    if(ulObj != null) {
      var spans = ulObj.getElementsByTagName("span");
      if(spans != null) {
        for(var i = 0; i < spans.length; i ++) {
          if(spans[i].className == 'skim') {
            infoManageService.getDegreeByInfoContentId(spans[i].id.substr(compId.length + 1), function(res) {
              var result = res.split("|");
              if(result != null && result.length == 2) {
                var spanObj = document.getElementById(compId + "_" + result[0]);
                if(spanObj != null) {
                  spanObj.innerHTML = spanObj.innerHTML.replace("(0)", "(" + result[1] + ")");
                }
              }
            });
          }
        }
      }
    }
  }
}
