// ************************** Navigation *************************************

var timerID = null;
var timerOn = false;
var timecount = 1000;

var isPageFlashPortfolio = false;
var isPageHtmlPortfolio = false;

function showSubMenu(divName,arrowName)
{
	document.getElementById(divName).style.display = 'block';
	document.getElementById(arrowName).style.visibility = 'visible';
}

function hideSubMenu(divName,arrowName)
{
	document.getElementById(divName).style.display = 'none';
	document.getElementById(arrowName).style.visibility = 'hidden';
}

function hideAll()
{
	hideSubMenu("ucNavigation_pnlTell", "ucNavigation_imgArrow1");
	hideSubMenu("ucNavigation_pnlShow", "ucNavigation_imgArrow2");
	hideSubMenu("ucNavigation_pnlDream", "ucNavigation_imgArrow3");
	hideSubMenu("ucNavigation_pnlInk", "ucNavigation_imgArrow4");
	hideSubMenu("ucNavigation_pnlVIP", "ucNavigation_imgArrow5");
	
}

function startTime()
{
	if (timerOn == false) 
	{
		timerID=setTimeout( "hideAll()" , timecount);
		timerOn = true;
	}
}

function stopTime()
{
	if (timerOn) 
	{
		clearTimeout(timerID);
		timerID = null;
		timerOn = false;
	}
}

function changePortfolioSection(id, htmlVersionUrl)
{
	if (isPageHtmlPortfolio)
	{	//Then we need to send them to the htmlVersionUrl
		document.location = "../Portfolio/Section.aspx?SectionID=" + id;
		return true;
	}
	else
	{
		if (isPageFlashPortfolio)
		{
			selectSection(id);
		}
		else
		{
			document.location = "../Portfolio/Portfolio.aspx?SectionID=" + id;
			return true;
		}
	}
}

// ************************** Common Functions *************************************

function showImage(id)
{
	document.getElementById(id).style.visibility = 'visible';	
}

function hideImage(id)
{
	document.getElementById(id).style.visibility = 'hidden';	
}

function swapImage(id, url)
{
	document.getElementById(id).src = url;
}



