function printMenu(menuArray) {
  if (menuArray.length > 0) {
    for (i = 0; i < menuArray.length; i = i + 2) {
      document.writeln('<tr>');
      document.write('<td valign="top">');
      document.write('<a class="MenuL" href="' + menuArray[i + 1] + '"><span title="' + menuArray[i] + ' aufrufen">');
      document.write(menuArray[i]);
      document.write('</span></a>');
      document.writeln('</td>');
      document.writeln('</tr>');
    }
    document.writeln('<tr>');
    document.writeln('<td valign="bottom" height=30><a class="MenuL" href="javascript:parentPage();"><span title="zur&uuml;ck">zur&uuml;ck</span></a></td>');
    document.writeln('</tr>');
  }
  else {
    document.writeln('<tr>');
    document.writeln('<td valign="top"><a class="MenuL" href="javascript:parentPage();"><span title="zur&uuml;ck">zur&uuml;ck</span></a></td>');
    document.writeln('</tr>');
  }
}

function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}

function printBaseMenu(menuArray) {
  if (menuArray.length > 0) {
    for (i = 0; i < menuArray.length; i = i + 2) {
      document.writeln('<tr>');
      document.write('<td valign="top">');
      document.write('<a class="MenuL" href="' + menuArray[i + 1] + '"><span title="' + menuArray[i] + ' aufrufen">');
      document.write(menuArray[i]);
      document.write('</span></a>');
      document.writeln('</td>');
      document.writeln('</tr>');
    }
  }
}


function parentPage() {
  var bParent = false;
  var sURL = document.URL;
  for (i = (sURL.length - 1); i > 0; i--) {
    if ((sURL.substring(i, i + 1) == "/") || (sURL.substring(i, i + 1) == "\\")) {
      if (bParent == true) { //erst beim 2. Mal
        sURL = sURL.substring(0, i + 1) + "index.htm";
        break;
      }
      bParent = true;
    }
  }
  if (sURL == document.URL) {
    sURL = history.back();
  }
  window.location.href = sURL;
}


function getFormDate(d) {
  var iD = d.getDate();
  var iM = d.getMonth() + 1;
  var iY = d.getYear();
  if (iY < 2000) {
    iY = iY + 1900;
  }
  var sD = iM + "." + iY;
  if (iM < 10) {
    sD = "0" + sD;
  }
  sD = iD + "." + sD;
  if (iD < 10) {
    sD = "0" + sD;
  }
  return sD;
}

function getToday() {
  return getFormDate(new Date());
}


