// Set Main Nav Current Page.
function setCurrentPage()
{
	var URL = location.href;

	// Url search is case sensitive, so first make it lower case.
	URL = URL.toLowerCase();
	
	var Index1 = URL.search("/orchardmanagement/");
	var Index2 = URL.search("/gaps/");
	var Index3 = URL.search("/lawsandregulations/");
	var Index4 = URL.search("/sustainability");
	var Index5 = URL.search("/topicsaz/");
	

	var divElem;
	// If page is found and is tied to a predefined variable, then set the attributes of that element.
	//alert(ProcessingIndex + ' ' + FoodQualityIndex  + ' ' + RegTechInfoIndex  + ' ' + MarketingTipsTools  + ' ' + HandlerServIndex );
	if(Index1 > 0)
	{
		divElem = document.getElementById('lnkAL');
		if (divElem != null)
		{
			divElem.display = "block";
			divElem.style.backgroundPosition = '0px -39px';
			divElem.style.color = "#ffffff";
		}
	}

	if(Index2  != -1)
	{
		divElem = document.getElementById('lnkHN');
		if (divElem != null)
		{
			divElem.display = "block";
			divElem.style.backgroundPosition = '-155px -39px';
			divElem.style.color = "#ffffff";
		}
	}

	if(Index3  != -1)
	{
		divElem = document.getElementById('lnkRI');
		if (divElem != null)
		{
			divElem.display = "block";
			divElem.style.backgroundPosition = '-297px -39px';
			divElem.style.color = "#ffffff";
		}
	}

	if(Index4  != -1)
	{
		divElem = document.getElementById('lnkTI');
		if (divElem != null)
		{
			divElem.display = "block";
			divElem.style.backgroundPosition = '-442px -39px';
			divElem.style.color = "#ffffff";
		}
	}

	if(Index5  != -1)
	{
		divElem = document.getElementById('lnkAA');
		if (divElem != null)
		{
			divElem.display = "block";
			divElem.style.backgroundPosition = '-586px -39px';
			divElem.style.color = "#ffffff";
		}
	}
}
