// Buffer für Menu leeren
var menuBuffer = null;

// Browser Testscript by Stefan Heimberg <heimbergs@post.ch>
	var isIE = false;
	var isNE = false;
	var isW3C = false;
	var isAny = true;

	if(document.getElementById){isW3C=true;isAny=false;}
	if(document.all){isIE=true;isAny=false;}
	if(document.layers){isNE=true;isAny=false;}
	
	var documentObj = null;

function SetMenuPos()
{
	if(isIE){documentObj = parent.main.document.all.div_haus.style;}
	if(isNE){documentObj = parent.main.document.layers["div_haus"];}
	if(isW3C){documentObj = parent.main.document.getElementById("div_haus").style;}
	
	documentObj.top = document.body.scrollTop;
	documentObj.left = document.body.scrollLeft + 131;

	if(isIE){documentObj = parent.main.document.all.div_info.style;}
	if(isNE){documentObj = parent.main.document.layers["div_info"];}
	if(isW3C){documentObj = parent.main.document.getElementById("div_info").style;}

	documentObj.top = document.body.scrollTop;
	documentObj.left = document.body.scrollLeft + 212;

	parent.main.setTimeout("parent.main.SetMenuPos();", 5);
}

//parent.main.SetMenuPos();

/*for(var i=0; i < parent.frames.length; i++)
{
	parent.frames[i].document.body.onclick = new Function("parent.main.CloseAll()");
}*/

function OpenMenu(menuObj)
{
	menuObj.style.display = '';

	if ( (menuObj != menuBuffer) && (menuBuffer) )
	{
		menuBuffer.style.display='none';
	}
	menuBuffer=menuObj;
}

function CloseAll()
{
	if(isIE){documentObj = parent.main.document.all.div_haus.style;}
	if(isNE){documentObj = parent.main.document.layers["div_haus"];}
	if(isW3C){documentObj = parent.main.document.getElementById("div_haus").style;}

	documentObj.display='none';

	if(isIE){documentObj = parent.main.document.all.div_info.style;}
	if(isNE){documentObj = parent.main.document.layers["div_info"];}
	if(isW3C){documentObj = parent.main.document.getElementById("div_info").style;}

	documentObj.display='none';
}

function OpenMenuSel(mainUrl)
{
	window.location.href = "../pages/"+mainUrl;
}

function ChBgColor( menuObj, color )
{
	menuObj.bgColor = color;
}

function OpenGrund(linkToPage)
{
	window.open(linkToPage,'win_dg','height=370, width=600, toolbar=no, resizable=no, status=no');
}