// Neues Fenster öffnen

function f1(a,b,h){window.open(a,'x','width='+b+',height='+h)}
function f2(a,b,h){window.open(a,'x','width='+b+',height='+h+',scrollbars,resizable')}

// -------   Copyright Jahr ---------------

var jetzt = new Date();
var jahr = jetzt.getFullYear();

function copyright() {
document.writeln(jahr)
return
}

// ---------- geaendert am (Datum der Datei) --------- 

var datum = new Date(document.lastModified);
var tag = datum.getDate();
var monat = datum.getMonth();
monat = monat + 1;
var jahr = datum.getFullYear();
if(tag < 10) {
tag = "0" + tag;
}

if(monat < 10) {
monat = "0" + monat;
}

function update() {
document.writeln(tag + "." + monat + "." + jahr)
return
}


// ---------- Wechseln der Stylesheets -----------------

function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

function getPreferredStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "window")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;

function drucken(url)
	{
	open(url,"druckfenster","scrollbars=yes,resizable=yes,locationbar=no,menubar=no,status=no,toolbar=no,height=400,width=660");
	}
	
function centerPopup(popup_name,popup_url,popup_width,popup_height,scrolls, menubars, myWidth,myHeight)
{
	if(!myWidth) {myWidth = 10;}
	if(!myHeight){myHeight = 50;}
	if(!scrolls){scrolls = 'no';}
	if(!menubars){menubars = 'no';}
	var popup_left = (window.screen.width/2)  - (popup_width/2 + myWidth);
	var popup_top  = (window.screen.height/2) - (popup_height/2 + myHeight);
	var fenster = window.open(popup_url ,popup_name,"toolbar=no,location=no,status=no,menubar=" + menubars + ",scrollbars=" + scrolls + ",resizable=no,width=" + popup_width + ",height=" + popup_height + ",left=" + popup_left + ",top=" + popup_top + ",screenX=" + popup_left + ",screenY=" + popup_top);
	fenster.focus();
}

// ---------- Text Wechseln -----------------

function anzeigen(das) {
 if (document.getElementById(das).style.display=='none') {
  document.getElementById(das).style.display='block';
 }
 else {
  document.getElementById(das).style.display='none';
 }
}