function replaceThisIf(obj, color, text, condition){
	if(!(obj=="null")){
		if(obj.value == condition){
			obj.value=text;
			obj.style.color=color;
		}
	}
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("room-chooser");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}

function AddEvent(object, evt, func, capture)
{
    if(typeof func != 'function')
    {
        return false;
    }
    if(object.addEventListener)
    {
        object.addEventListener(evt, func, capture);
        return true;
    }
    else if(object.attachEvent)
    {
        object.attachEvent('on' + evt, func);
        return true;
    }
    return false;
}