// JavaScript Documentn

/*
function name()
{
	try
	{
	}
	catch(err)
	{
		alert("error in function: " + err.description);
	}	
}
*/

function navigateTo(url)
{
	window.location.href = url;	
}

var pages = new Array("bodyOverview","bodyIngredients","bodyRecipes", "bodyInstructions", "bodyMedia", "bodyAQs", "bodyLinks");

// hides all body block except the given named block.  Pass "" to hide all blocks
function hideAllBut(blockName)
{
	try
	{
		for (i = 0; i < pages.length; i++)
		{
			var e = document.getElementById(pages[i]);
			if(e == null)
				continue;
			if(pages[i] != blockName) // not the block we care about, so hide it
			{
				e.style.display = "none";
			}
			else // show it
			{
				e.style.display = "block";
			}
		}
	}
	catch(err)
	{
		alert("error in hideAllBut: " + err.description);
	}	
}

function showOverview()
{ 
	try
	{
		navigateTo("index.html");
	}
	catch(err)
	{
		alert("error in showOverview: " + err.description);
	}	
}


function showIngredients()
{ 
	try
	{
		navigateTo("ingredients.html");
	}
	catch(err)
	{
		alert("error in function: " + err.description);
	}	
}

function showRecipes()
{ 
	try
	{
		navigateTo("recipes.html");
	}
	catch(err)
	{
		alert("error in function: " + err.description);
	}	
}

function showInstructions()
{ 
	try
	{
		navigateTo("instructions.html");
	}
	catch(err)
	{
		alert("error in function: " + err.description);
	}	
}

function showMedia()
{ 
	try
	{
		navigateTo("media.html");
	}
	catch(err)
	{
		alert("error in function: " + err.description);
	}	
}

function showAQs()
{ 
	try
	{
		navigateTo("aqs.html");
	}
	catch(err)
	{
		alert("error in function: " + err.description);
	}	
}

function showLinks()
{
	try
	{
		navigateTo("links.html");
	}
	catch(err)
	{
		alert("error in function: " + err.description);
	}	
}