//--------------------------------------------------------
function BodyLoad(){
  for(var intFrameNum=1; intFrameNum < 5; intFrameNum++){
    FixFrameHeight(intFrameNum);
  }
}
//--------------------------------------------------------
function FixFrameHeight(intFrameNum){
  var objFrameElement, lngDocHeight, strFrameName;
  strFrameName = 'frameCatFrame' + intFrameNum;
  var objFrameWindow = window.frames[strFrameName];
  if(document.getElementById){
    objFrameElement = document.getElementById(strFrameName);
  }else{
    if(document.all){
      objFrameElement = document.all[strFrameName];
    }else{
      objFrameElement = null;
    }
  }
  if(objFrameElement && objFrameWindow){
    lngDocHeight = GetDocumentHeight(objFrameWindow.document);
    if(lngDocHeight > 0){
      objFrameElement.style.height = lngDocHeight + 10 + "px";
    }else{
      objFrameElement.style.height = "auto";
    }
  }
}
//--------------------------------------------------------
function GetDocumentHeight(objDocument){
  var lngScrollHeight = 0;
  var lngOffsetHeight = 0;
  var lngHeight = 0;
  if(objDocument.height){
    lngHeight = objDocument.height;
  }else if(objDocument.body){
    if(objDocument.body.scrollHeight){
      lngScrollHeight = objDocument.body.scrollHeight;
    }
    if(objDocument.body.offsetHeight){
      lngOffsetHeight = objDocument.body.offsetHeight;
    }
    if(lngScrollHeight && lngOffsetHeight){
      lngHeight = Math.max(lngScrollHeight, lngOffsetHeight);
    }
  }else{
  }
  return lngHeight;
}
//--------------------------------------------------------
