function fixit() {
    //document.getElementById('contentbg').style.height = document.getElementById('mainframe').offsetHeight;
    if(document.all){
      availW = document.body.clientWidth;
      availH = document.body.clientHeight;
   }else{
      availW = innerWidth;
      availH = innerHeight;
   }

    var contentHeight = document.body.scrollHeight;

    if (availH > contentHeight) {
        document.getElementById('contentbg').style.height = availH;
    } else {
        document.getElementById('contentbg').style.height = contentHeight;
    }
}