	var icons = new Array('doc','pdf','xls','ppt','mailto');
	var iconDescs = new Array('Microsoft Word or Microsoft Word Viewer is required to open this link.', "Adobe Acrobat Reader is required to open this link.", "Microsoft Excel or Microsoft Excel Viewer is required to open this link.", "Microsoft PowerPoint or Microsoft PowerPoint Viewer is required to open this link.","Clicking this link will open your email editor.");
	var iconLinks = new Array('http://www.microsoft.com/downloads/details.aspx?FamilyID=3657ce88-7cfa-457a-9aec-f4f827f20cac', 'http://www.adobe.com/products/acrobat/readstep2.html','http://www.microsoft.com/downloads/details.aspx?FamilyID=c8378bf4-996c-4569-b547-75edbd03aaf0&DisplayLang=en', 'http://www.microsoft.com/downloads/details.aspx?familyid=048DC840-14E1-467D-8DCA-19D2A8FD7485', null)
	
	var iconRegExs = new Array(), usedIcons = new Array();
	for (var i = 0; i < icons.length; i++)
	{
		iconRegExs[i] = new RegExp(icons[i]);
		usedIcons[i] = false;
	}

	function addIcons()
	{
		var contentArea = document.getElementById("contentarea"), links = contentArea.getElementsByTagName("A"), footnotes = document.getElementById("footnotes");
		//var menu = document.getElementById("LELAWebMenu");
		//links = links.concat(menu.getElementsByTagName("A"));
		
		for(var i = 0; i < links.length; i++) 
		{
			var linkHref = links[i].href, newIconNode = document.createElement("IMG");
			for (var j = 0; j < icons.length; j++)
			{
				if ( linkHref.match(iconRegExs[j]) )
				{
					usedIcons[j] = true;
					newIconNode.src = "/tutor/images/icons/" + icons[j] + ".gif";
					newIconNode.border = 0;
					newIconNode.height = 14;
					newIconNode.width = 14;
					//newIconNode.align = "left";
					//newIconNode.style.display = "block";
					newIconNode.style.paddingRight = "2px";
					newIconNode.alt = iconDescs[j];
					newIconNode.title = iconDescs[j];
					links[i].parentNode.insertBefore(newIconNode, links[i]);
				}
			}
		}
		
		var usedCount = 0;
		for(var i = 0; i < icons.length; i++)
		{
			var brNode = document.createElement("BR");
			if ( usedIcons[i] )
			{
				if ( ++usedCount == 1 )
				{
					var footnoteHeaderNode = document.createElement("H2");
					footnoteHeaderNode.appendChild(document.createTextNode("What do the icons mean?"));
					footnotes.appendChild(footnoteHeaderNode);
				}
				var linkNode = document.createElement('A'), spacerNode = document.createTextNode('- '), descNode = document.createTextNode(iconDescs[i]), imgNode = document.createElement("IMG");
				imgNode.src = "/tutor/images/icons/" + icons[i] + ".gif";
				imgNode.border = 0;
				imgNode.height = 14;
				imgNode.width = 14;
				imgNode.style.paddingRight = "5px";
				imgNode.style.paddingLeft = "1px";
				imgNode.style.display = "inline";
				imgNode.alt = iconDescs[j];
				imgNode.title = iconDescs[j];
				if ( iconLinks[i] != null )
				{
					linkNode.target = '_blank';
					linkNode.href = iconLinks[i];
					linkNode.appendChild(descNode);
					descNode = linkNode;
				}
				footnotes.appendChild(imgNode);
				footnotes.appendChild(spacerNode);
				footnotes.appendChild(descNode);
				if ( i < icons.length - 1 )
					footnotes.appendChild(brNode);
			}
		}
	}
