// Function to tag specified moused-over elements as "mouseover" class in IE. Also contains a
// timeout function (in lieu of setting an onLoad) in case the DOM hasn't loaded.

function IEMouseover(root, tag, ttlCounter)
{
	if  (typeof(root) == 'object') { root = root.id; } // stringify

	if (!ttlCounter) { ttlCounter = 0;	}

	if (document.getElementById(root)) {
		var nodes = document.getElementById(root).getElementsByTagName(tag);
		
		if (document.all) {
			for (var i=0; i<nodes.length; i++) {
				nodes[i].onmouseover=function() {
					this.className+=" mouseover";
				}
				nodes[i].onmouseout=function() {
					this.className=this.className.replace(" mouseover", "");
				}
			}
		}
	}
	else {
		if (ttlCounter < 20) { //timeout at 10 secs to load DOM
			setTimeout('IEMouseover("'+root+'","'+tag+'",'+(ttlCounter+1)+');', 500);
		}
		// or fail.
	}
}