// Handy addLoadListener function
function addLoadListener(fn) {
	if (typeof window.addEventListener != 'undefined') {
		window.addEventListener('load', fn, false);
	}
	else if (typeof document.addEventListener != 'undefined') {
		document.addEventListener('load', fn, false);
	}
	else if (typeof window.attachEvent != 'undefined') {
		window.attachEvent('onload', fn);
	}
	else {
		return false;
	}
	return true;
}

function showLinkInfo(whichLink) {
	var title = whichLink.getAttribute("title") ? whichLink.getAttribute("title") : ""; // Grabs the title attribute.	
	var description = document.getElementById("description"); // Finds the node with the id "description."
		
	if (description.firstChild.nodeType == 3) { // Check to see if the first child of "description" is a text node.
		description.firstChild.nodeValue = title; // Replaces the first child of description with the title attribute of whatever you want.
	}
	return false;
}

// Calls the showLinkTitle function for links that experience an event (here, onmouseover and onmouseout).  

function swapDescription() {
	var swap = document.getElementById("swap"); // Grabs the "navigation" node.
	var links = swap.getElementsByTagName("a"); // Grabs all the links in the "navigation" node.	
	var description = document.getElementById("description"); // Grabs the "description" node.
	var origdesc = description.firstChild.nodeValue; // Finds the original value of the first child of the description node.
		
	for (var i=0; i<links.length; i++) { // Loops through all the links in the navigation node. 	
		links[i].onmouseup = function () {
			return showLinkInfo(this); // Calls the showLinkTitle function, passing "this", the current link, as the argument.	
		}	
		
	}
}

addLoadListener(swapDescription);