// Browser detection
var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var NS4 = (bName == "Netscape" && bVer == 4);
var MOZ = (bName == "Netscape" && bVer >= 5);
var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);

// Icons im Head (in einem div) austauschen
var HeadArray = new Array();
var HeadActivated = new Array();
function changeHeadImg(imageNo, mode) {
  if ((MOZ || IE4 || NS4) && HeadActivated[imageNo]) {
    if (NS4) {
      self.document.layers["buttons"].document.images["head_"+imageNo].src = HeadArray[imageNo][mode].src;
    } else if (MOZ) {
      self.document.images["head_"+imageNo].src = HeadArray[imageNo][mode].src;
    } else {
      eval("self.document.all.head_" + imageNo + ".src = HeadArray[" + imageNo + "][" + mode + "].src");
    }
  }
}

// Loginname im DIV "lname" ausgeben
function show_login(mytxt) {
  var logtxt = '';
  var tablewidth = '';
  var tablealign = 'right';

  if (top.shortlogin > 10) {
    tablealign = 'left';
  }
  if (top.shortlogin > 10 && top.shortlogin < 20 ) {
    if (top.shortlogin == 11) {
      logtxt = 'Willkommen ';
    } else {
      logtxt = 'Welcome ';
    }
  } else if (top.shortlogin != 1 && top.shortlogin != 41) {
    logtxt = 'Login: ';
    tablewidth = ' width="256"';
  }
  //-- boot, drupa, beauty, rehacare mit Layern, ohne Tabelle (Marko)
  if (top.shortlogin >= 40) {
    var info = logtxt + mytxt;
  } else {
    var info = '<table border="0" cellspacing="0" cellpadding="0"' + tablewidth + '><tr><td align="' + tablealign + '" valign="middle" class="topnavi">' + logtxt + mytxt + '</TD></TR></TABLE>';
  }

  if (document.layers) {
    document.lname.document.write(info);
    document.lname.document.close();
  } else if (document.all) {
    document.all.lname.innerHTML = info;
  } else {
    document.getElementById("lname").innerHTML = info;
  }
  return;
}

// Reload nach Resize jetzt nur noch beim NS4
function my_reload () {
  if (NS4) { window.location.reload(); }
}

// Um JS-Fehler zu vermeiden
function markSelection ( area ) {
  return;
}


// Druckfunktion
function printing( url ) {
  fenster = window.open( url, 'printing',
	   'width=660,height=440,scrollbars=yes,menubar=yes,toolbar=yes,location=no,statusbar=no,resizable=yes');
  fenster.focus();
  return;
}


