function slide(div)
{
	var currentSlide = document.getElementById(div).style.display;
	
	if (currentSlide == "none")
	{
		document.getElementById(div).style.display = "block";
		document.getElementById("overlay").style.display = "block";
		setPosition(div, 400, 400);
	}
	else if (currentSlide == "block")
	{
		document.getElementById(div).style.display = "none";
		document.getElementById("overlay").style.display = "none";
	}

	return;
}

function setPosition(div, holderHeight, holderWidth)
{
	var width = returnWidth(div, 0);
	var height = returnHeight(div, 0);
	
	height = height - holderHeight;
	height = height / 2;
	
	width = width - holderWidth;
	width = width / 2;
	
	height = height + "px";
	width = width + "px";
	
	document.getElementById(div).style.top = height;
	document.getElementById(div).style.left = width;
}

function returnWidth(setDiv, reduce) 
{
	// REFERENCE: http://www.howtocreate.co.uk/tutorials/javascript/browserwindow
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' )
	{
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	}
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
	{
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	}
	
	return myWidth;
}

function returnHeight(setDiv, reduce) 
{
	// REFERENCE: http://www.howtocreate.co.uk/tutorials/javascript/browserwindow
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' )
	{
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	}
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
	{
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	}
	
	return myHeight;
}
