//This styles all links within the secondaryNav div, and creates onMouse events for the TDs.
function styleSecondaryNav(){	
	var theTable = document.getElementById('secondaryNavTable');
	var theRows = theTable.getElementsByTagName('tr');
	var theLinks = theTable.getElementsByTagName('a');
	var curr_row;
	
	for (curr_row = 0; curr_row < theRows.length; curr_row++)
	{
		currentpath=window.location.href;
		newpath=theLinks[curr_row].href;
		curr_array=currentpath.split("/");
		new_array=newpath.split("/");

		if(curr_array[curr_array.length-1]=="" || curr_array[curr_array.length-1]=="#"){
				//remove empty value or test link
				curr_array.pop();
		}
		if(new_array[new_array.length-1]==""){
				new_array.pop();
		}
		//alert(curr_array[curr_array.length-1]+" = "+new_array[new_array.length-1]);
		theRow=curr_row;
		theLinks[curr_row].className="secondaryNav";
		
			if(curr_array[curr_array.length-1]==new_array[new_array.length-1] && newpath.lastIndexOf('#')<0){
				theRows[curr_row].className="secondaryNavSelect secondaryNavTD";
				theLinks[curr_row].style.color="#721413";
			}else{
				theRows[curr_row].className="secondaryNavOut secondaryNavTD";
		
				theLinks[curr_row].onmouseover = function() {
					this.parentNode.className="secondaryNavOver secondaryNavTD";		
				}
				theLinks[curr_row].onmouseout = function() {
					this.parentNode.className="secondaryNavOut secondaryNavTD";	
				}
				
			}
		
	
}
	
}