
actText = 0;

/* Hier kommen alle Funktionsaufrufe rein, die bei onLoad aufgerufen werden sollen */
function initFunc()
{
	initJumpNav();	
}

function activateJumpNav(objekt,oname)
{
	actText = oname;
	hideTexts();
}

function hideTexts()
{
	objekt = document.getElementById("right-box");
	laenge = objekt.childNodes.length;
	lastText = -1;	
	for (i=0; i<laenge; i++)
	{
		if (objekt.childNodes[i].nodeName == 'A')
		{
			if (objekt.childNodes[i].getAttributeNode("id") != '')
			{
				oattrib = objekt.childNodes[i].getAttributeNode("id");
				oid = oattrib.nodeValue;
				if (oid == actText)
				{
					lastText = 0;
				}
				else
				{
					lastText = 1;
				}				
			}
		}
		else if (objekt.childNodes[i].nodeName == 'P' && lastText == 1)
		{
			hideElement(objekt.childNodes[i]);
		}	
		else if (objekt.childNodes[i].nodeName == 'DIV' && lastText == 1)
		{
			hideElement(objekt.childNodes[i]);			
		}
		else if (objekt.childNodes[i].nodeName == 'P' && lastText == 0)
		{
			showElement(objekt.childNodes[i]);
		}
		else if (objekt.childNodes[i].nodeName == 'DIV' && lastText == 0)
		{
			showElement(objekt.childNodes[i]);			
		}		
	}
}

function showText(oname)
{
	actText = oname;
	hideTexts();
}

function showElement(objekt)
{
	new Effect.Appear(objekt);
}

function hideElement(objekt)
{
	new Effect.DropOut(objekt);
}

function initJumpNav()
{
	url = window.location.href;
	pos = url.search(/#/);	
	if(pos > -1)
	{	
		pos += 1;
		jumper = url.substring(pos, url.length);
		actText = jumper;
		hideTexts();
	}
}
