function $(tagID) {
	return document.getElementById(tagID);
}

function $E(tagName) {
	return document.createElement(tagName);
}

function $T(value) {
	return document.createTextNode(value);
}

function clientHeight() {
	return document.documentElement.clientHeight || window.innerHeight;
}

function clientWidth() {
	return document.documentElement.clientWidth || window.innerWidth;
} 

function createHttpRequest() {
	if (window.ActiveXObject) {
		try {
			return new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e1) {
			try {
				return new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e2) {
				return null;
			}
		}
	} else if (window.XMLHttpRequest) {
		return new XMLHttpRequest();
	} else {
		return null;
    }
}

function dropChild(parent) {
	var child = parent.firstChild;
	while (child) {
		parent.removeChild(child);
		child = parent.firstChild;
	}
}

function getNextNode(obj, name) {
	var next = obj.nextSibling;
	while (next && next.tagName != name) {
		next = next.nextSibling;
	}
	return next;
}

function getPreviousNode(obj, name) {
	var prev = obj.previousSibling;
	while (prev && prev.tagName != name) {
		prev = prev.previousSibling;
	}
	return prev;
}

function scrollLeft() {
	return document.body.scrollLeft || document.documentElement.scrollLeft;
} 

function scrollTop() {
	return document.body.scrollTop || document.documentElement.scrollTop;
}
 
