function changediv()
{
//USAGE: changediv(<level>,<DivName>) - <Level> is where you want the div to appear in your stack of visible divs.
// DivName is the name value of an html DIV.

if ( (arguments[0]+1)/(arguments[0]+1) == "1") 	{
	var depth = arguments[0]		
						}
else { alert("Depth not specified in changediv\(\)"); return 1 }

if (!arguments[1]) { alert("No Div specified to be changed!"); return 1 }
else	{
if (depth <= c_level)
  {
	var closes = c_level-depth;
	for (i=0;i<=closes;i++)	
	{
	if (divStack.peek())
		{
		if ( i == closes ) { hideDiv(divStack.pop()) }
		else { divStack.pop() }
		}
	}
  }

	c_level = depth;
	divStack.push(arguments[1])
	showDiv(arguments[1])
	}

}
