function getObj(name) {
	if (document.getElementById) {
		// this is the way the standards work
		this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
	}
	else if (document.all) {
		// this is the way old msie versions work
		this.obj = document.all[name];
		this.style = document.all[name].style;
	}
	else if (document.layers) {
		// this is the way nn4 works (nested layers)
		this.obj = getObjNN4(document,name);
		this.style = this.obj;
	}
}

// nested layers
function getObjNN4(obj,name) {
	var x = obj.layers;
	var foundLayer;
	for (var i=0;i<x.length;i++) {
		if (x[i].id == name)
			foundLayer = x[i];
		else if (x[i].layers.length)
			var tmp = getObjNN4(x[i],name);
		if (tmp) foundLayer = tmp;
	}
	return foundLayer;
}