$(document).ready(function(){

  var documentheight= $(document).height();
  var contenthight =$(".content_left_bottombg").height();
  var bannerheight = $("#bannerheader").height();
  $(".bottominfospacer").height($(".bottominfo").height()+50);
  if(contenthight < documentheight-bannerheight) {
    $(".content_left_bottombg").height(documentheight-bannerheight);
    $(".bottominfo").css("bottom","16px");
    $(".bottominfo").css("right","67px");
  }
});

function resizebg()
{
  var contenthight =$(".content_left_bottombg").height();
  var documentheight= $(document).height();
  var bannerheight = $("#bannerheader").height();
  if(contenthight < documentheight) {
    $(".content_left_bottombg").height(documentheight-bannerheight);
    $(".bottominfo").css("bottom","15px");
  }
}

function resizeVoteSum(chapterid,openid){
  if(openid==0){
    $(".bottominfo").css("top",0);
    $(".content_left_bottombg").height("auto"); 
    resizebg();
    contenthigh=$(".content_left_bottombg").height();
    $(".bottominfo").css("top",contenthigh-81-30);
  }else{
    $(".bottominfo").css("top",0);
    $(".content_left_bottombg").height("auto");
    resizebg();
    contenthigh=$(".content_left_bottombg").height();
    $(".bottominfo").css("top",contenthigh-81-30);
  }
  
}
