function getTargetElement(evt, searchForType) {
	var elem;
	if (evt.target) {
		if (evt.currentTarget && (evt.currentTarget != evt.target)) {
			elem = evt.currentTarget
		} else {
			elem = evt.target
		} 
	}
	else {
		//Internet Explorers event model is screwed up, so we need this hack to find the element that we wan't
		//if the type is not correct, then find the parent
		var foundCorrectType = false;
		elem = evt.srcElement;
		if (elem.className != searchForType) {
			while (elem.tagName != "BODY" && !foundCorrectType) {
					elem = elem.parentNode;
					if (elem.className == searchForType) {
						foundCorrectType = true;
					}
			}
		}
	}
	return elem;
}