function addPrintLinks()
{
	var resumeUtilities = document.getElementsByClassName("navset");
	for (i=0;i<resumeUtilities.length;i++)
	{
		if(resumeUtilities[i].id != "globalnav")
		{
			var newListItem = document.createElement("li");
		
			var newLink = document.createElement("a");		
			newLink.setAttribute("class","printer");		
			var newLinkText = document.createTextNode("Print");
			newLink.appendChild(newLinkText);
			newLink.setAttribute("href","#");		

			newListItem.appendChild(newLink);

			// Add the behaviours for the new links
			newLink.onclick = printResume;
			newLink.onkeypress = printResume;

	 	  // Insert the list item into the navset.
			resumeUtilities[i].appendChild(newListItem);
		}
	}
}

function printResume(e)
{
	if (window.event) 
	{
		window.event.returnValue = false;
		window.event.cancelBubble = true;
	} 
	else if (e) 
	{
		e.stopPropagation();
		e.preventDefault();
	}

	window.print();
}


/**
* Initialize the print link on startup.
*/
Event.observe(window, 'load', addPrintLinks, false);