// resize parent frame
var insecwin = true;

if(document.all['nscroll']){
  if(parent.document.body.all['fdisp']){ 
    insecwin = null;
    var h = document.all['nscroll'].offsetHeight + 20;
    parent.document.all['fdisp'].rows = h.toString()+",*";
  }
}
// add a hanging indent to headers with section numbering
// (requires a <span id='secnum'> whose width will be calculated)

if(document.all['secnum']) {
var secnumwidth = document.all['secnum'].offsetWidth;
var ti = "text-indent: -" + secnumwidth + "px";
var ml = "margin-left: " + secnumwidth + "px";
document.styleSheets[0].addRule(".headingheader", ml);
document.styleSheets[0].addRule(".headingheader", ti);
}

// if in secondary window, readjust targets of anchors
if(insecwin){
 var candidates = document.all.tags("A");
 for (i = 0; i < candidates.length; i++){
 if(candidates[i].target){
  candidates[i].target = "mhdisplay2";
 }  
}
}
