/*
 *  Give it a DOM object and let it strip out
 *  those pesky #text nodes from mozilla for you
 */
function stripEmptyTextNodes(element) {
	for(var i = 0; i < element.childNodes.length; i++) {
		alert(element.childNodes[i].nodeName);
		if(element.childNodes[i].nodeName == "#text") {
			element.removeChild(element.childNodes[i]);
			i--;
		}
	}
	return element;
}

/*
 *  Do a simple getElementById and strip out the #text
 *  nodes while your at it, pass it an Object or a String
 *  of an ID
 */
function grabStrippedElement(ele) {
	if(typeof ele == "string") {
		return stripEmptyTextNodes(document.getElementById(ele));
	}else {
		return stripEmptyTextNodes(ele);
	}
}
function grabElement(ele) {
	if(typeof ele == "string") {
		return document.getElementById(ele);
	}else {
		return ele;
	}
}
function gE(ele) {
	return grabElement(ele);
}
function grabElesByTag(eleType) {
	if(arguments.length < 2) {
		return document.getElementsByTagName(eleType);
	}else {
		return arguments[1].getElementsByTagName(eleType);
	}
}
function gET(eleType) {
	if(arguments.length < 2) {
		return document.getElementsByTagName(eleType);
	}else {
		return arguments[1].getElementsByTagName(eleType);
	}
}
function grabEleByNameAndClass(name, className, element) {
	var collectionWithClass = new Array();
	var searchElement = grabElement(element);
	var collection = grabElesByTag(name, searchElement);
	for(var i=0;i<collection.length;i++) {
		if(hasClass(collection[i], className)) {
			collectionWithClass.push(collection[i]);
		}
	}
	return collectionWithClass;
}
function grabElesByNameAndClass(name, className, element) {
	return grabEleByNameAndClass(name, className, element);
}
function grabElesByTagAndClass(name, className, element) {
	return grabEleByNameAndClass(name, className, element);
}
function gETAC(name, className, element) {
	return grabEleByNameAndClass(name, className, element);
}
var __isNS__ = false;
if(document.getElementById && !document.all) {
	__isNS__ = true;
}
