/** functions for article pages to adjust position of navigation and banner ads ***/
function setEdge() {

  //***check if there is enough room so nav divs dont collapse smaller than needed length
  //    if not force nav bar width when scroll bar apears
  if ((document.all? window.document.body.scrollWidth : document.width) <= 778)
    {
    var docobj = document.all? eval('document.all.botnavNI.style') : eval('document.getElementById("botnavNI").style')  ;
    docobj.width = 769 +"px" ;
    var docobj1 = document.all? eval('document.all.topnavNI.style') : eval('document.getElementById("topnavNI").style')  ;
    docobj1.width = 769 +"px" ;
    }
    else
    {
    var docobj = document.all? eval('document.all.botnavNI.style') : eval('document.getElementById("botnavNI").style')  ;
    docobj.width = "100%" ;
    var docobj1 = document.all? eval('document.all.topnavNI.style') : eval('document.getElementById("topnavNI").style')  ;
    docobj1.width = "100%" ;
    }


  }//setEdge

 function doCenter () {
   /** check and center top banner  width 728,  **/
  if ((document.all? window.document.body.scrollWidth : document.width) > 729)
    {
    var banner1obj=document.all? eval('document.all.bannerfNI.style') : eval('document.getElementById("bannerfNI").style')  ;
    var banner2obj=document.all? eval('document.all.botrotban.style') : eval('document.getElementById("botrotban").style')  ;
    banner1obj.left= Math.round(  ((document.all? window.document.body.scrollWidth : document.width)   - 728) / 2)  + "px" ;
    banner2obj.left= Math.round(  ((document.all? window.document.body.scrollWidth : document.width)   - 728) / 2)  + "px" ;
    }
  else
    {
    var banner1obj=document.all? eval('document.all.bannerfNI.style') : eval('document.getElementById("bannerfNI").style')  ;
    var banner2obj=document.all? eval('document.all.botrotban.style') : eval('document.getElementById("botrotban").style')  ;
    banner1obj.left=  0 + "px"
    banner2obj.left=  0 + "px"
    }
 }//doCenter

function postLoad () {
    setEdge();
    doCenter();
}//postLoad

function allResize () {
  setEdge();
  doCenter();
  }
//window.onscroll = doScroll;
window.onresize = allResize;
window.onscroll = setEdge;


