var isIE
var isNav
var coll = ""
var styleObj = ""

if (parseInt(navigator.appVersion) >= 4) {
  if (navigator.appName == "Netscape") {
    isNav = true
  } else {
    isIE = true
    coll = "all."
    styleObj = ".style"
  }
}

function getObject(obj) {
  var theObj
  if (typeof obj == "string") {
    theObj = eval("document." + coll + obj + styleObj)
  } else {
    theObj = obj
  }
  return theObj
}

function shiftTo(obj, x, y) {
  var theObj = getObject(obj)
  if (isNav) {
    theObj.moveTo(x, y)
  } else {
    theObj.pixelLeft = x
    theObj.pixelTop = y
  }  
}

function shiftBy(obj, deltaX, deltaY) {
  var theObj = getObject(obj)
  if (isNav) {
    theObj.moveBy(deltaX, deltaY)
  } else {
    theObj.pixelLeft += deltaX
    theObj.pixelTop += deltaY
  }  
}

function getObjectLeft(obj) {
  var theObj = getObject(obj)
  return isNav ? theObj.left : theObj.pixelLeft
}

function getObjectTop(obj) {
  var theObj = getObject(obj)
  return isNav ? theObj.top : theObj.pixelTop
}

function handleResize() {
  location.reload()
  return false
}

if (isNav) {
  window.captureEvents(Event.RESIZE)
  window.onresize = handleResize
}
