/*	textmgt.js
		030224:mgof3rd

		JavaScript to change text link color on
	 	mouseover event, and back again on mouseout.
*/

brightColor = "D82B2B";
normalColor = "AB2828";

function changeColor(e) {
	if (!e)
		e = window.event;

	if (e.target) // "Netscape"
		obj = e.target;
	else if (e.srcElement) // Micro$oft
    obj = e.srcElement;
  else // oops! no idea what we've got here
    return;

	/* work our way up through the hierarchy,
		 until we reach the anchor element itself.
	*/
	while (obj.tagName != "A")
		obj = obj.parentNode;

	if (!e.type) // don't know if this is necessary
		return; // oops!

	theColor = normalColor;
	if (e.type == "mouseover")
		theColor = brightColor;

	if (!obj.style.color) // don't know if this is necessary
		return; // oops!

	obj.style.color = theColor;
}

function flashyLinks() { 
  if (document.links)
    for ( i = 0; i < document.links.length; i++ )
      // register our event handler for each embedded link
			if (document.links[i].className == "embedded_link") {
      	document.links[i].onmouseover = changeColor;
				document.links[i].onmouseout = changeColor;
			}
}
