function getObj(obj){

  if(document.all){
    if(typeof obj == "string"){
      return document.all(obj).style
    }else{
      return obj.style
    }
  }

  if(document.getElementById){
    if(typeof obj == "string"){
      return document.getElementById(obj).style
    }else{
      return obj.style
    }
  }
  
  if(document.layers){
    if(typeof obj == "string"){
      return document.layers[obj]
    }else{
      return obj
    }
  }
}

function shiftTo(obj, x, y){
  var theObj = getObj(obj)
  if(theObj.moveTo){
    theObj.moveTo(x, y)
  }else if (typeof theObj.left != "undefined"){
    theObj.left = x
    theObj.top = y
  }
}

function bgObj(obj, farge){
  var theObj = getObj(obj)
  theObj.backgroundColor = farge
}

function visObj(obj){
  var theObj = getObj(obj)
  theObj.visibility = "visible"
}

function skjulObj(obj){
  var theObj = getObj(obj)
  theObj.visibility = "hidden"
}