
	var highlightColor = '#d3d3d3';
	var highlightBackgroundColor = '#990000';
	var highlightCursor = 'default';

	function isURLMatch( strToMatch )
	{
		var pageName = location.pathname;
		
		if (pageName == "/") pageName = "index.html";
		
		var pattern = new RegExp(pageName);

		if (strToMatch.search(pattern) > -1)
		{
			if (strToMatch.search(/#/) >-1)
			{
				return false;
			} else {
				return true;
			}
		} else {
			return false;
		};
	}
		
	function canLink( itemName ) 
	{
		if ( itemName ) 
		{
			if ( isURLMatch(itemName) ) {
				return false;
			} else {
				return true;
			};
		};
	}

	function SetNav()
	{
		for (var i=0; i < document.links.length; i++)
		{
			if ( isURLMatch(document.links[i].href) )
			{
				document.links[i].style.color = highlightColor;
				document.links[i].style.backgroundColor = highlightBackgroundColor;
				document.links[i].style.cursor = highlightCursor;
			}
		}
	}

