function extractPageName(hrefString)
{
	var arr = hrefString.split('.');
	arr = arr[arr.length-2].split('/');
	return arr[arr.length-1].toLowerCase();		
}

function setActiveMenu(arr, crtPage)
{
	for(var i=0; i < arr.length; i++) {
		if(extractPageName(arr[i].href) == crtPage) {
			arr[i].parentNode.style.display = "none";
		}		
	}
}

function setPage()
{
	var crtPage, arrProduct_Related, arrProductCat;

	if(document.location.href)
		crtPage = extractPageName(document.location.href);
	else
		crtPage = extractPageName(document.location);

	arrProduct_Related = document.getElementById("Product_Related");
	arrProductCat = document.getElementById("ProductCat");

	if (arrProduct_Related!=null)
		setActiveMenu(arrProduct_Related.getElementsByTagName("a"), crtPage);

	if (arrProductCat!=null)
		setActiveMenu(arrProductCat.getElementsByTagName("a"), crtPage);

}

