
function compat_getElement(name) {
	var el;
	if(typeof document.getElementById == "function" || typeof document.getElementById == "object") {
		el = document.getElementById(name);
	} else {
		eval('el = document.' + name);
	}
	return el;
}

function compat_getAttribute(el, attribute) {
	return el.getAttribute(attribute);
}

function compat_setAttribute(el, attribute, val) {
	if(el.setAttributeNode != null) {
		var node = new Attr();
		node.name = attribute;
		node.value = val;
		el.setAttributeNode(node);
	} else {
		return eval('el.' + attribute + ' = val');
	}
}