//
// Determine browser type
//
 
var browser = navigator.appName;
browser     = browser.toUpperCase();
 
if(browser == 'MICROSOFT INTERNET EXPLORER')
  browser = 'MSIE'
else
  if(browser == 'NETSCAPE')
    {
     var agent   = navigator.userAgent;
     agent       = agent.toUpperCase();
     agent       = agent.indexOf('FIREFOX');
     if(agent != -1)
       browser = 'FIREFOX'
    }
  else
    browser = 'Other'
 
//
//
//
 
var newSrc = false;
 
//
// Timer for backbutton
//
 
var setTimer  = false;
var backDelay = 5250;
var backTimer = null;
var initDone  = false;
 
//
//  Controls for updateing the Performance Fact section
//
 
var PFtimer = null;
var PFcount = 0;         // Number of updates
var PFdelay = 11;        // Seconds to delay between updates
 
//
//  Controls for updating the AD section
//
 
var ADtimer = null;
var ADcount = 0;         // Number of updates
var ADdelay = 15;        // Seconds to delay between updates
 
//
//    Reposition all the elements after a resize
//
 
  function NewSize()
    {
 
     var bWidth  = "";
     var bHeight = "";
 
     if (self.innerWidth)
      {
       bWidth = self.innerWidth;
       bHeight = self.innerHeight;
      }
     else
      if (document.documentElement
         && document.documentElement.clientWidth)
        {
         bWidth = document.documentElement.clientWidth;
         bHeight = document.documentElement.clientHeight;
        }
      else
        if (document.body)
          {
           bWidth = document.body.clientWidth;
           bHeight = document.body.clientHeight;
          }
 
     var cWidth;
 
     if(browser == 'NETSCAPE')
       cWidth =  bWidth - (160 + 172 + 20);
     else
       cWidth  = bWidth - (160 + 172);
 
     var cText   = document.getElementById('ctext');
     var lText   = document.getElementById('ltext');
     var rText   = document.getElementById('rtext');
     var dBar    = document.getElementById('dbar');
     var lSide   = document.getElementById('lside');
     var rSide   = document.getElementById('rside');
     var sBody   = document.getElementById('sbody');
     var Util    = document.getElementById('util');
     var pBanner = document.getElementById('banner');
 
     var imgHeight = 0;
     if(pBanner != null)
       {
        imgHeight = pBanner.offsetHeight;
        var imgWidth  = pBanner.offsetWidth;
 
        pBanner.style.width = cWidth + 'px';
        pBanner.style.left  = cText.offsetLeft;
        pBanner.style.height = imgHeight;
 
        imgHeight = imgHeight +14;
 
       }
 
     if(browser == 'MSIE')
       {
        var wSize = document.body.clientWidth;
 
        dBar.style.width = (wSize - 140) + "px";
        Util.style.width = (wSize - 140) + "px";
        rSide.style.left = (wSize - 168) + "px";
        cText.style.width = cWidth + "px";
       }
 
     rSide.style.height = (bHeight - 114) + "px";
     lSide.style.height = (bHeight - 114) + "px";
     sBody.style.height = (bHeight - 114) + "px";
     cText.style.height = (bHeight - 134 - imgHeight) + "px";
     lText.style.height = (bHeight - 160) + "px";
     rText.style.height = (bHeight - 160) + "px";
 
    }
 
//
//    Set a timer for the AD section
//
 
  function setAdTimer()
    {
 
     if(ADcount != 0)
       {
        ADcount = ADcount - 1;
        iDelay  = ADdelay * 1000;
        var cItem = window.frames["lTextframe"];
        ADtimer = self.setTimeout('AdRefresh()', iDelay);
       }
 
    }
 
//
//    Set a timer for the Performance Fact section
//
 
  function setPFTimer()
    {
     if(PFcount != 0)
       {
        PFcount = PFcount - 1;
        iDelay  = PFdelay * 1000;
        var cItem = window.frames["rTextframe"];
        PFtimer = self.setTimeout('PFRefresh()', iDelay);
       }
 
    }
 
//
//    Refresh the AD frame
//
 
  function AdRefresh()
    {
 
     var cItem = window.frames["lTextframe"];
     cItem.location.reload();
 
    }
 
//
//    Refresh the center Performance Fact
//
 
  function PFRefresh()
    {
 
     var cItem = window.frames["rTextframe"];
     cItem.location.reload();
 
    }
 
//
//  Clear the backbutton timer
//
  function clearTimer()
    {
     if(backTimer != null)
       {
        clearTimeout(backTimer);
        backTimer = null;
       }
    }
 
//
//  Set the backbutton timer
//
  function setBackTimer()
    {
     if(setTimer)
       backTimer = self.setTimeout("checkBack()", backDelay);
    }
