var DHTML = (document.getElementById || document.all || document.layers);

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

function hideShow(elmtId){
	//alert(elmtId);
	if (!DHTML) return;
	var elmt = new getObj(elmtId);
	elmt.style.visibility = (elmt.style.visibility=='visible') ? 'hidden' : 'visible';
}
function show(elmtId){
	//alert(elmtId);
	if (!DHTML) return;
	var elmt = new getObj(elmtId);
	elmt.style.visibility = 'visible';
}
function hide(elmtId){
	//alert(elmtId);
	if (!DHTML) return;
	var elmt = new getObj(elmtId);
	elmt.style.visibility = 'hidden';
}
function sayHello() {
	alert('hello');
}
function changeColor(elmtId, colour1, colour2){
	//alert(elmtId);
	if (!DHTML) return;
	var  elmt = new getObj(elmtId);
	elmt.style.backgroundColor = (elmt.style.backgroundColor==colour1) ? colour2 : colour1;
}

