function changeImage(x)
{
	document.getElementById('portfolioImage').src=x;
}

var subNav = new Array('subNav1');
var dropDown = new Array('dropDown1');
var disappearSet = 0;

function showSubNav(id)
{
	for (i=0; i<subNav.length; ++i)
	{
  		document.getElementById(subNav[i]).style.display = 'none';
		if (id == subNav[i])
		{
			document.getElementById(id).style.display = 'block';
		}
	}
}

function showDropDown(id)
{
	hideDropDown();
	if(disappearSet == 1)
	{
		clearTimeout(disappear);
	}
	document.getElementById(id).style.display = "block";
}

function hideDropDown()
{		
		for (i=0; i<dropDown.length; ++i)
		{
			document.getElementById(dropDown[i]).style.display = 'none';
		}
}

function stay()
{
	clearTimeout(disappear);
}

function leave()
{
	disappear = setTimeout("hideDropDown()",2000);
	disappearSet = 1;
}