var nn=document.layers?true:false;
var n6=document.getElementById?true:false;
var ie=document.all?true:false;
if ((ie) && (n6)) n6 = false;

var bn = navigator.appName;
var vn = navigator.appVersion.substring(0,1);
var bClicked = 0;
var fJS = false;

var anzahl = 7;

menuNor = new Array(anzahl);
menuFoc = new Array(anzahl);

function init() {
	if (((bn == "Netscape") && (vn >= "3")) || ((bn == "Microsoft Internet Explorer") && (vn >= "4"))) {
		for (i=1;i<=anzahl;i++) {
			menuNor[i] = new Image();
			menuNor[i].src = "gif/b_0" + i + "n.gif";
			menuFoc[i] = new Image();
			menuFoc[i].src = "gif/b_0" + i + "f.gif";
		}
		fJS = true;
	}
}

function Focus(idx) {
	if ((fJS) && (idx != bClicked)) {
		var s = "b"+idx;
		document.images[s].src = menuFoc[idx].src;
	}
}

function Select(idx) {
	if ((fJS) && (idx != bClicked)) {
		Reset();
		var s = "b"+idx;
		document.images[s].src = menuFoc[idx].src;
		bClicked = idx;
	}
}

function Blur(idx) {
	if ((fJS) && (idx != bClicked)) {
		var s = "b"+(idx);
		document.images[s].src = menuNor[idx].src;
	}
}

function Click(idx) {	
	if ((fJS) && (idx != bClicked)) {
		if (bClicked >= 1){
			var s = "b" + bClicked;
			document.images[s].src = menuNor[bClicked].src;
		}
		bClicked = idx;
		var s = "b" + idx;
		document.images[s].src = menuFoc[idx].src;
	}
}

function Reset() {
	if (fJS) {
		bClicked = 0;
		for (i=1;i<=anzahl;i++) {
			document.images["b" + i].src = menuNor[i].src;
		}
	}
}

var imp = null;
function impressum() {
	if (imp != null) if (!imp.closed) imp.close();
	imp = window.open('impressum.htm','Impressum','marginwidth=0 marginheight=0,leftmargin=0,topmargin=0,scrollbars=yes,status=no,width=300,height=280,resizable=no');
	if (imp.opener==null) imp.opener=self;
	if (vn >= "4") imp.moveTo(0,0);
	return;
}

var st = null;
function steckbrief(bereich,id) {
	if (st != null) if (!st.closed) st.close();
    st = window.open('steckbrief.asp?bereich=' + bereich + '&id=' + id,'Steckbrief','marginwidth=0 marginheight=0,leftmargin=0,topmargin=0,scrollbars=no,status=no,width=760,height=360,resizable=no');
	if (st.opener==null) st.opener=self;
	if (vn >= "4") st.moveTo((screen.availWidth/2)-380,(screen.availHeight/2)-180);
	return;
}

var site = null;
function sitemap() {
	if (site != null) if (!site.closed) site.close();
	site = window.open('sitemap.htm','Sitemap','marginwidth=0 marginheight=0,leftmargin=0,topmargin=0,scrollbars=no,status=no,width=230,height=530,resizable=no');
	if (site.opener==null) site.opener=self;
	if (vn >= "4") site.moveTo(screen.availWidth-240,0);
	return;
}

var wi = null;
function info(datei,x,y,scbar) {
	tmpScroll = "yes";
	if (scbar == 0) tmpScroll = "no";
	if (!x) var tmpX = 520;
	else var tmpX = x+20;
	if (!y) var tmpY = 350;
	else var tmpY = y+30;
	if (wi != null) if (!wi.closed) wi.close();
	wi = window.open(datei,'Infofenster','marginwidth=0 marginheight=0,leftmargin=0,topmargin=0,scrollbars=' + tmpScroll + ',status=no,width=' + tmpX + ',height=' + tmpY + ',resizable=no');
	if (wi.opener==null) wi.opener=self;
	if (vn >= "4") wi.moveTo((screen.availWidth/2)-tmpX/2,(screen.availHeight/2)-tmpY/2);
	return;
}

var ew = null;
function zoomFenster(datei,x,y,alt,scbar) {
	var tmpX = x+30;
	var tmpY = y+95;
	var tmpSc = "no";
	if (tmpY > 500) {
		tmpY = 500;
		tmpSc = "yes";
		tmpX += 20;
	}
	if (scbar == 1) {
		tmpSc = "yes";
		tmpX += 20;
	}
	if (ew != null) if (!ew.closed) ew.close();
	ew = window.open('zoom.asp?bild=' + datei + '&titel=' + alt,'Infofenster1','marginwidth=0 marginheight=0,leftmargin=0,topmargin=0,scrollbars=' + tmpSc + ',status=no,width=' + tmpX + ',height=' + tmpY + ',resizable=no');
	if (ew.opener==null) ew.opener=self;
	if (vn >= "4") ew.moveTo((screen.availWidth/2)-tmpX/2,(screen.availHeight/2)-tmpY/2);
	return;
}

Begriffe = new Array(4);

Begriffe[0] = "";
Begriffe[1] = "<table border=0 cellpadding=0 cellspacing=0 width='400'><tr><td><img src='gif/tria1.gif' width=359 height=27 border=0></td></tr></table>";
Begriffe[2] = "<table border=0 cellpadding=0 cellspacing=0 width='400'><tr><td><img src='gif/tria2.gif' width=359 height=27 border=0></td></tr></table>";
Begriffe[3] = "<table border=0 cellpadding=0 cellspacing=0 width='400'><tr><td><img src='gif/tria3.gif' width=359 height=27 border=0></td></tr></table>";


function ieFake(fake) {
	if ((document.all) && (fake)) fake.blur();
}

function leiFenster(nr){
	if (nn) {
		with (document.begriff.document) {
			open(); write(Begriffe[nr]); close();
		}
	} 
	else {
		begriff.innerHTML=Begriffe[nr];
	}
}