

  var isNav, isIE
  var coll = ""
  var styleObj = ""
  

  //Set global variables for browser detecting and reference building
  if(parseInt(navigator.appVersion) >= 4)
  {
    if( (navigator.appName == "Netscape") || (navigator.appName == "Netscape6"))
    {
      isNav = true
    }
    else
    {
      isIE = true
      coll = "all."
      styleObj = ".style"
    }
  }


  // Returns rendered height of object content in pixels
  function getObjHeight(obj) 
  {
    if(isNav)
    {
      return obj.clip.height
    }
    else
    {
      return obj.clientHeight
    }
  }

  // Return rendered width of object content in pixels

  function getObjWidth(obj) 
  {
    if(isNav)
    {
      return obj.clip.width
    }
    else
    {
      return obj.clientWidth
    }
  }

  // returns the available content width space in browser window
  function getInsideWindowWidth()
  {
    if(isNav)
    {
      return window.innerWidth
    }
    else
    {
      return document.body.clientWidth
    }
  }

  // returns the available content height space in browser window
  function getInsideWindowHeight()
  {
    if(isNav)
    {
      return window.innerHeight
    }
    else
    {
      return document.body.clientHeight
    }
  }

  // position an element at x,y location
  function shiftTo(obj, x, y)
  {
    if(isNav)
    {
      obj.moveTo(x,y)
    }
    else
    {
      obj.pixelLeft = x;
      obj.pixelTop = y;
    }
  }


  // Center my element
  function centerIt()
  { 
    var obj = eval("document." + coll + "mainblock" + styleObj)
    var contentObj = eval("document." + coll + "mainblock")
    var x = Math.round((getInsideWindowWidth()/2) - (getObjWidth(contentObj)/2) + 40)
    if(x < 60) x = 60
    if(x > 150) x = 150
    var y = 70
    shiftTo(obj,x,y)
    obj.visibility = "visible"
  }

  function handleResize()
  {
    if(isNav)
    {

//    alert(getInsideWindowWidth())
//      centerIt()
      location.reload()

    }
    else
    {
      centerIt()
    }
  }

