var onloadFunctions = new Array();

function gEBC(searchClass,node,tag) {
	var classElements = new Array();
	if (node == null) node = document;
	if (tag == null) tag = '*';
	
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if (pattern.test(els[i].className)) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}

function gEBI(tag, node) {
	if(node == null) node = document;
	return node.getElementById(tag);
}

function gEBTN(tag, node) {
	if(node == null) node = document;
	return node.getElementsByTagName(tag);
}

function redir(location, time) {
	setTimeout('goToUrl(\'' + location + '\')', time)
}

function goToUrl(location) {
	window.location = location;
}

function addOnloadEvent(value) {
	onloadFunctions[onloadFunctions.length] = value;
}

window.onload = function() {
	for(var xc = 0; xc < onloadFunctions.length; xc++) {
		eval(onloadFunctions[xc]);
	}
}