function __apollo_LinksMenuOnChange(sValue, newWindow)
{
	if (sValue != "")
	{
		if (newWindow == true)
		{
		window.open(sValue);
		}
		else
		{
		window.navigate(sValue);
		}
	}
	return true;
}

function __apollo_SectionsMaxMin(sBtnList, sContentIDList, sMinOrMax)
{
	var IDList = sContentIDList.split(";");
	var BtnList = sBtnList.split(";");
	var tempResult = false;
	if (IDList.length == BtnList.length)
	{
		for (i = 0; i < IDList.length; i++)
		{
			var oBtn = dnn.dom.getById(BtnList[i]);
			if (oBtn != null)
			{
				if (sMinOrMax == "min")
				{
					tempResult = __apollo_SectionMin(oBtn,IDList[i]);
				}
				else
				{
					tempResult = __apollo_SectionMax(oBtn,IDList[i]);
				}
				if (tempResult == false)
				{
					break;
				}
			}
		}
	}
	return tempResult;
}

function __apollo_SectionMax(oBtn, sContentID)
{
	var oContent = dnn.dom.getById(sContentID);
	if (oContent != null)
	{
		var sMinIcon = oBtn.getAttribute('min_icon');
		oBtn.src = sMinIcon;				
		oContent.style.display = '';
		dnn.setVar(oBtn.id + ':exp', 1);

		return true;	//cancel postback
	}
	return false;	//failed so do postback
}

function __apollo_SectionMin(oBtn, sContentID)
{
	var oContent = dnn.dom.getById(sContentID);
	if (oContent != null)
	{
		var sMaxIcon = oBtn.getAttribute('max_icon');
		oBtn.src = sMaxIcon;				
		oContent.style.display = 'none';
		dnn.setVar(oBtn.id + ':exp', 0);

		return true;	//cancel postback
	}
	return false;	//failed so do postback
}

