/////////////////////////////////////////////////////////////////////////
//      _
//    <' )_,  Copyright RealDecoy
//    (    )          2005
//   ~~~~~~~~
//
/////////////////////////////////////////////////////////////////////////


function preLoadNav() {
	var preLoadHolder = new Array(preLoadNav.arguments.length);
	for (var i = 0; i < preLoadNav.arguments.length; i++) {
		preLoadHolder[i] = new Image();
		preLoadHolder[i].src = preLoadNav.arguments[i];
	}
}




//	CHANGE THE ORANGE ARROW TO GREEN WHEN MOUSE OVER
//	------------------------------------------------------------------	//
//	The two scripts below start in the "new" DIV and looks for <A> tag.	//
//	It then finds the last element within them (which should be the		//
//	orange arrow image, and assigns an image swap to it.  This is done	//
//	here and like this so it will save inline JS being written into the	//
//	XHTML code, thus preserving its effeciency.							//

var bWithinContentWrapper;

function setWhatsNewLinksImages() {
	if (document.getElementById) {
		bWithinContentWrapper = false;
		getSubs(document.getElementById("new"));
		/*	bWithinContentWrapper = false;
		getSubs(document.getElementById("pubs"));	*/
	}
}

function getSubs(nameOfNode) {
	if (nameOfNode.childNodes) {
		for (var a = 0; a < nameOfNode.childNodes.length; a++) {
			if ((nameOfNode.childNodes[a].nodeName == "P") || (nameOfNode.childNodes[a].nodeName == "LI")) {
				bWithinContentWrapper = true;
			}			
			
			if (nameOfNode.childNodes[a].nodeName == "A" && bWithinContentWrapper) {
				var linkNode = nameOfNode.childNodes[a];
				linkNode.onmouseover=function() {
					
					//	Seriously cheating here.  This assumes the Image is the LAST
					//	element in the link tag.  It *should* be, but you never know.
					//	If you are reading this to bebug it, I did this rather than
					//	looking through the entire <a> tag for a <img> child node.
					imgObj = linkNode.childNodes[linkNode.childNodes.length-1];
					imgObj.src = "/images/green_arrow.gif";
				}
					
				linkNode.onmouseout=function() {
					
					//	Seriously cheating here.  This assumes the Image is the LAST
					//	element in the link tag.  It *should* be, but you never know.
					//	If you are reading this to bebug it, I did this rather than
					//	looking through the entire <a> tag for a <img> child node.
				
					imgObj = linkNode.childNodes[linkNode.childNodes.length-1];
					imgObj.src = "/images/orange_arrow.gif";
				}
			
			
			} else {
				getSubs(nameOfNode.childNodes[a]);
			}
		}
	}
}
//	------------------------------------------------------------------	//