//// IE hover and focus ******************************************************************************
function chHoverFocus(type, tag, parentId) {
	if (window.attachEvent) {
		window.attachEvent("onload", function() {
			var sfEls = (parentId==null)?document.getElementsByTagName(tag):document.getElementById(parentId).getElementsByTagName(tag);
			type(sfEls);
		});
	}
}

ieHover = function(sfEls) {
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" iehover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}

ieFocus = function(sfEls) {
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onfocus=function() {
			this.className+=" iefocus";
		}
		sfEls[i].onblur=function() {
			this.className=this.className.replace(new RegExp(" iefocus\\b"), "");
		}
	}
}

chHoverFocus(ieHover, "LI");
chHoverFocus(ieHover, "INPUT");
chHoverFocus(ieFocus, "INPUT");
chHoverFocus(ieFocus, "TEXTAREA");
