// JavaScript Document

steps = 24;
c = 0;

function showMenu()
{
	if(c <= 0)
	{
		slidez = setInterval(openMenu,5);
	}
	else
	{
		clearInterval(slidez);
		slidez = setInterval(closeMenu,5);
	}
}

function openMenu()
{
	var what = document.getElementById("menuholder");

	what.style.width = (parseInt(what.style.width.split("px")[0]) + 25) + "px";
	what.style.marginLeft = (parseInt(what.style.marginLeft.split("px")[0]) - 25) + "px";

	if( c == steps )
	{
		clearInterval(slidez);
	}

	c++;
}

function closeMenu()
{
	var what = document.getElementById("menuholder");

	what.style.width = (parseInt(what.style.width.split("px")[0]) - 25) + "px";
	what.style.marginLeft = (parseInt(what.style.marginLeft.split("px")[0]) + 25) + "px";

	if( c <= 1 )
	{
		clearInterval(slidez);
	}

	c--;
}

function changeImg(what)
{
	document.images["theImg"].src = "blueprint/" + what + ".jpg";
}
