 //<!-- 

//Aufruf für den Menü Content
document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='scripts/menu_content.js' TYPE='text/javascript'><\/SCRIPT>");

//Variablendeklaration
var topCount = 1;
var menuloaded = false;
var onLayer = false;
var theID;
var menubg = '#001849';

function getPlatform()  //browser platform (BS)
  {
  if (navigator.platform == null || navigator.platform == "")
    return "other";
  else if (navigator.platform.indexOf("Mac") >= 0)
    return "mac";
  else if (navigator.platform.indexOf("Win") >= 0)
    return "win";
  else if (navigator.platform.indexOf("Unix") >= 0)
    return "unix";
  else
    return "other";
  }

function browser_check()
{
	// Überprüfe Browserversion und Typ
	browserName = navigator.appName;
	browserVer = parseInt(navigator.appVersion);

	if (navigator.userAgent.indexOf("Mozilla/3.0") != -1)  version = "ns"; //ns3
	else if (browserName == "Netscape" && browserVer == 4) version = "ns"; //ns4
	else if (browserName == "Netscape" && browserVer >= 5) version = "ns6"; //ns6
	else if (browserName == "Microsoft Internet Explorer" && browserVer >= 3) version = "ie"; //ie4
	else version = "ns2";

return version;
}

// Ermittlung welcher Browser benutz wird
var browser = browser_check();
var platform = getPlatform();

//Erstelle Layer
function menucreater()
{
status = 'Erstelle Menu';

	while(eval("window.ralArray" + topCount)) 
	{
	  topArray = eval("ralArray" + topCount);
	  topName = "ralMenu" + topCount;
	
	if (browser == 'ie' || browser == 'ns6') {MAINmenumaker(topArray,topName);}
	else if (browser == 'ns') {nsmenumaker(topArray,topName);}
	else {}
	
	topCount++;

	//end der While schleife
	}

menuloaded = true;
var clearStatus = "status = \'\'";
setTimeout(clearStatus,500);
//ende
}

function formHandler()
{
	var URL = document.form.site.options[document.form.site.selectedIndex].value;
	window.location.href = URL;
}

//Function to get object
function getObject(obj){
     var theObj;
     if(typeof obj == "string"){
          theObj = eval("document." + coll + obj + styleObj);
     }else{
          theObj = obj;
     }
     return theObj;
}     

//Hintergrund farbe
function setBGColor(obj,color){
     var theObj = getObject(obj);
     if(browser == 'ns'){
          theObj.bgColor = color;
     }else if (browser == 'ie' || browser == 'ns6') {
          theObj.backgroundColor = color;
     }
}

//Schalte Layer ein
function onLayerColor(menu,NSLayer,layerName){
if(browser == 'ns') {var theLayer = eval("document."+menu+".document."+layerName+".document."+NSLayer);}
else if (browser == 'ie') {var theLayer = eval("document.all."+layerName+".style");}
else {theLayer = eval("document.getElementById(\"" +layerName+ "\").style");}

setBGColor(theLayer,'#001849')
}

//Schalte Layer aus
function offLayerColor(menu,NSLayer,layerName){
if(browser == 'ns') {var theLayer = eval("document."+menu+".document."+layerName+".document."+NSLayer);}
else if (browser == 'ie') {var theLayer = eval("document.all."+layerName+".style");}
else {theLayer = eval("document.getElementById(\"" +layerName+ "\").style");}
setBGColor(theLayer,menubg)
}


//Erstellung Menu für IE6+ und NS6+
function MAINmenumaker(Array,MenuName)
{
lwidth=Array[0];
lheight=Array[1];
lleft = Array[2];
ltop=Array[3];
show=Array[4];
flagCode = '';

if (platform == 'mac') {ltop = ltop - 1;}

var mstring = '';

//Erstelle Menu
mstring += '<div id="' +MenuName+ '" style="position:absolute; width:' +lwidth+ 'px; height:' +lheight+ 'px; z-index:1000; left:' +lleft+ 'px; top:' +ltop+ 'px; visibility:' +show+ '" onMouseOver="clearTimeout(theID);onLayer=true;SetMenuVisible(\'' +MenuName+ '\',\'on\')" onMouseOut="clearTimeout(theID);onLayer=false;TimedClose(\'' +MenuName+ '\',\'off\',\'.2\')">';
mstring += '<table border="0" cellspacing="0" cellpadding="1">';
mstring += '<tr>';
mstring += '<td bgcolor="' +menubg+ '" colspan="3" height="5"><img src="../images/corp_bg.gif" height="5"></td>';
mstring += '</tr>';
for (var arraycount=8; arraycount < Array.length; arraycount=arraycount+3)
{
	if (Array[arraycount + 2] == 'on') {flagCode = flag;}
	mstring += '<tr><td bgcolor="' +menubg+ '" nowrap>&nbsp;</td><td bgcolor="' +menubg+ '"><div id="' +MenuName+ '_' +arraycount+ '" onmouseover="onLayerColor(\''+MenuName+'\',\'\',\'' +MenuName+ '_' +arraycount+ '\')" onmouseout="offLayerColor(\''+MenuName+'\',\'\',\'' +MenuName+ '_' +arraycount+ '\')"><a href="' +Array[arraycount + 1]+ '" class="headermenulink">' +Array[arraycount]+ '</a>' +flagCode+ '</div></td><td bgcolor="' +menubg+ '">&nbsp;</td></tr>';
	flagCode = '';
}
mstring += '<tr>';
mstring += '<td bgcolor="' +menubg+ '" colspan="3" height="5"><img src="../images/corp_bg.gif" height="5"></td>';
mstring += '</tr>';
mstring += '</table>';
mstring += '</div>';

document.write(mstring);
}


//Erstelle Menü für < NS6
function nsmenumaker(Array,MenuName)
{
lwidth=Array[0];
lheight=Array[1];
lleft = Array[6];
ltop=Array[3];
show=Array[5];
flagCode = '';

if (platform == 'mac') {ltop = ltop - 5; lleft = Array[7];}

var mstring = '';

//Erstelle NS Menu
mstring += '<layer name="' +MenuName+ '" visibility="' +show+ '" top="' +ltop+ 'px" left="' +lleft+ 'px" width="' +lwidth+ 'px" height="' +lheight+ 'px" onMouseOver="clearTimeout(theID);onLayer=true;SetMenuVisible(\'' +MenuName+ '\',\'on\')" onMouseOut="clearTimeout(theID);onLayer=false;TimedClose(\'' +MenuName+ '\',\'off\',\'.2\')">';
mstring += '<table border="0" cellspacing="0" cellpadding="1">';
mstring += '<tr>';
mstring += '<td bgcolor="' +menubg+ '" colspan="3" height="5"><img src="../images/corp_bg.gif" height="5"></td>';
mstring += '</tr>';
for (var arraycount=8; arraycount < Array.length; arraycount=arraycount+3)
{
	if (Array[arraycount + 2] == 'on') {flagCode = flag;}
	mstring += '<tr><td bgcolor="' +menubg+ '" nowrap>&nbsp;</td><td bgcolor="' +menubg+ '"><ilayer name="' +MenuName+ '_' +arraycount+ '"><layer name="inner_' +MenuName+ '_' +arraycount+ '" onmouseover="onLayerColor(\''+MenuName+'\',\'inner_' +MenuName+ '_' +arraycount+ '\',\'' +MenuName+ '_' +arraycount+ '\')" onmouseout="offLayerColor(\''+MenuName+'\',\'inner_' +MenuName+ '_' +arraycount+ '\',\'' +MenuName+ '_' +arraycount+ '\')"><a href="' +Array[arraycount + 1]+ '" class="headermenulink">' +Array[arraycount]+ '&nbsp;&nbsp;</a>' +flagCode+ '</layer></ilayer></td><td bgcolor="' +menubg+ '">&nbsp;</td></tr>';
	flagCode = '';
}
mstring += '<tr>';
mstring += '<td bgcolor="' +menubg+ '" colspan="3" height="5"><img src="../images/corp_bg.gif" height="5"></td>';
mstring += '</tr>';
mstring += '</table>';
mstring += '</layer>';

document.write(mstring);
}

function SetMenuVisible(mName,state)
{

if (browser == 'ie')
{
	ieObj = document.all[mName].style;
	
}
else if (browser == 'ns')
{
	nsObj = document.layers[mName];
}
else
{
	ns6Obj = document.getElementById(mName).style;
}


if (state == 'on')
{
	if (browser == 'ie') {ieObj.visibility = "visible";}
	else if (browser == 'ns') {nsObj.visibility = "show";}
	else {ns6Obj.visibility = "visible";}
	
}
else
{
	if (browser == 'ie') {ieObj.visibility = "hidden";}
	else if (browser == 'ns') {nsObj.visibility = "hide";}
	else {ns6Obj.visibility = "hidden";}
}

}

//Timer der menü schliesst
function TimedClose(name,toggle,seconds)
{
if (!onLayer)
{
	var Call = "SetMenuVisible('" +name+ "','" +toggle+ "')";
	theID = setTimeout(Call,1000*seconds);
}
else {alert('error with onLayer status');}

}
function showDate()
{
	
// heutiger Tag.
var now = new Date();

// ArrayList Tage.
var days = new Array('So','Mo','Di','Mi','Do','Fr','Sa');

// Array list of months.
var months = new Array('Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember');

// Berechne Wochentage.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

// Berechne vierstelliges Jahr
function fourdigits(number)	{
	return (number < 1000) ? number + 1900 : number;
								}

// Verbinde alles
today =  days[now.getDay()] + ", " +
               date + ". " + months[now.getMonth()] + " " + (fourdigits(now.getYear())) ;

return today;       
        
   

}

//--> 
