var ExistingRegion = "";
var FinalCrumb="";
var PageTitle="";
		
function ShowRegion(regionId)
{			
	if(document.getElementById(regionId))
	{
		if(ExistingRegion != "")
		{
			document.getElementById(ExistingRegion).style.display = "none";
		}
		
		document.getElementById(regionId).style.display = "block";
		ExistingRegion = regionId;
		
	}
}

function changeCountry()
{
	var sbCountry = document.getElementById("countrylist");
		
	if(sbCountry.value != "#")
		document.location.href = sbCountry.value;	
}

function atgLocationChange()
{
    var ddlocationDropDown = document.getElementById("locationDropDown");
    if(ddlocationDropDown.value != "")
        document.location.href = ddlocationDropDown.value;
}

function SetOverrideInfo()
{
	if(FinalCrumb!="")
	{
		if(document.getElementById("spnFinalCrumb"))
		{
		
			document.getElementById("spnFinalCrumb").innerHTML = FinalCrumb;
		}
	}
	
	if(PageTitle!="")
	{
		document.title = PageTitle;
	}
}

function SetPageInformation(TopMenuId, SideMenuId)
{
	if(document.getElementById(TopMenuId))
	{
		document.getElementById(TopMenuId).className = "menuitem_on";
	}
	if(document.getElementById(SideMenuId))
	{
		document.getElementById(SideMenuId).className = "sidenavitem_on";
	}
	SetOverrideInfo();
	
}

function UpdateByTitle()
{
	Title = document.getElementById("h1PageTitle").innerHTML;
	FinalCrumb = Title;
	PageTitle = "Allied Telesis Group :: " + Title;
	SetOverrideInfo();
}

