function getDivObject(Div_ID)
{
/* MSIE, Konqueror, Opera : */
  if (window.document.all)
    return eval("window.document.all."+Div_ID+".style");

/* Netscape6/Mozilla : */
  if (typeof(window.document.getElementById)=="function")
    return window.document.getElementById(Div_ID).style;

/* and the rest Netscape4 : */
  return eval("window.document."+Div_ID);
}
function getElement(Div_ID)
{
/* MSIE, Konqueror, Opera : */
  if (window.document.all)
    return eval("window.document.all."+Div_ID);

/* Netscape6/Mozilla : */
  if (typeof(window.document.getElementById)=="function")
    return window.document.getElementById(Div_ID);

/* and the rest Netscape4 : */
  return eval("window.document."+Div_ID);
}
var notVisible = -4000;
var isVisible = 230;
var theLastDiv; 
function show(mainDiv)
{
	if(mainDiv)
	{
		var aktMainDiv = getDivObject(mainDiv);
		theLastDiv.left= notVisible;
		theLastDiv = aktMainDiv;
		aktMainDiv.left = isVisible;
		if(mainDiv=="main_1" || mainDiv.substring(0,3)=="sub")
			showSub();
		else
			hideSub();
	}
}
function showSub()
{
	var subDiv = getDivObject("subNavi");
	subDiv.display = "inline";
	//subDiv.visibility = "visible";
}
function hideSub()
{
	var subDiv = getDivObject("subNavi");
	subDiv.display = "none";
	//subDiv.visibility = "hidden";
}
var thePasteArrowXPos = -4000;
var thePasteArrowYPos = -4000;
function showArrow(theElement)
{
	var theArrow = getDivObject("theArrow");
	var a,element;
	/* Element-Objekt zur ID ermitteln */
  	element=getElement(theElement);
	a=getPosition(element);
	thePasteArrowXPos = a.x-21;
	theArrow.left= thePasteArrowXPos;
	//theArrow.left= 0;
	thePasteArrowYPos = a.y-48;
	theArrow.top = thePasteArrowYPos;
	
}
function hideArrow()
{
	var theArrow = getDivObject("theArrow");
	theArrow.left=-4000;
}
function pasteArrow()
{
	var thePasteArrow = getDivObject("thePasteArrow");
	thePasteArrow.left= thePasteArrowXPos;
	thePasteArrow.top = thePasteArrowYPos;
}

function getPosition(element)
/* der Aufruf dieser Funktion ermittelt die absoluten Koordinaten
   des Objekts element */
{
  var elem=element,tagname="",x=0,y=0;
  
/* solange elem ein Objekt ist und die Eigenschaft offsetTop enthaelt
   wird diese Schleife fuer das Element und all seine Offset-Eltern ausgefuehrt */
  while ((typeof(elem)=="object")&&(typeof(elem.tagName)!="undefined"))
  {
    y+=elem.offsetTop;     /* Offset des jeweiligen Elements addieren */
    x+=elem.offsetLeft;    /* Offset des jeweiligen Elements addieren */
    tagname=elem.tagName.toUpperCase(); /* tag-Name ermitteln, Grossbuchstaben */

/* wenn beim Body-tag angekommen elem fuer Abbruch auf 0 setzen */
    if (tagname=="BODY")
      elem=0;

/* wenn elem ein Objekt ist und offsetParent enthaelt
   Offset-Elternelement ermitteln */
    if (typeof(elem)=="object")
      if (typeof(elem.offsetParent)=="object")
        elem=elem.offsetParent;
  }

/* Objekt mit x und y zurueckgeben */
  position=new Object();
  position.x=x;
  position.y=y;
  return position;
}

function hideEntrance()
{
	var theDiv = getDivObject("entrance");
	theDiv.left = -4000;
	theDiv.visibility = "hidden";
	theDiv.zIndex = 0;
	theDiv = getDivObject("mainValue");
	theDiv.left = 0;
	theDiv.top = 0;
	theDiv = getDivObject("info");
	theDiv.left = 800;

}
function newWindow(theFile,theName)
{
	window.open(theFile,theName,"status=no,location=no,menubar=no,resizable=yes");
}
