// UA (user agen) contains detailed browser info
var UA = navigator.userAgent.toLowerCase();

// get an element with the id
function getObj(elementID) {
  if (typeof elementID == "string")
    return document.getElementById(elementID);
  else
    return elementID;
}

// Set the text color of an object
function setColor(object, color) {
  getObj(object).style.color = color;
}

// Change the cursor.
// The second argument is optional.
function setCursor(cursortype, thisobj) {
  if (UA.indexOf("msie 5")>=0 && cursortype == 'pointer')
    cursortype = 'hand';
  if (thisobj==null)
    document.body.style.cursor = cursortype;
  else
    getObj(thisObj).style.cursor = cursortype;
}

// Set the background of an object
function setBackground(object, color) {
  getObj(object).style.background = color;
}

// Set the text color of an object
function setColor(object, color) {
  getObj(object).style.color = color;
}

