﻿/*Navigationsleiste*/
window.onload=show;
function show(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}

/*Bildfenster*/
var fenster, a;
fenster=null;
a=null;

function zu() {
if (fenster && !fenster.closed)
fenster.close(); if (a && !a.closed) a.close();
}

window.onunload=zu;

function zeigebild(pic, br, ho, t1, t2) {
zu();
fenster=window.open(pic, "Bild", "scrollbars=no, status=no, toolbar=no, location=no, directories=no, resizable=no, width="+(br+20)+", height="+(ho+70)+", left=170, top=20")
fenster.document.open("text/html");
fenster.document.write("<HTML>\n<body style='margin:10; font-family:Times New Roman' bgcolor=#ffffff>\n")
fenster.document.write("<img src="+pic+">\n<br/><center><span style='font-size: 12px'><strong>"+t1+"</strong><br/>"+t2+"</span></center>")
fenster.document.write("</body>\n</HTML>");
fenster.document.close();
if (fenster) return false;
else return true;
}

/*Pressefenster*/
function zeigepresse(t, pr, b, h) {
zu();
a=window.open(pr, "Presse", "scrollbars=yes, status=no, toolbar=no, location=no, directories=no, resizable=yes, width="+b+", height="+h+", left=20, top=20")
a.document.open("text/html");
a.document.write("<HTML>\n<body style='margin:0; font-family:Times New Roman' bgcolor=#ffffff>\n")
a.document.write("<span style='font-size: 14px'><strong>"+t+"</strong></span><br/><img src="+pr+">")
a.document.write("</body>\n</HTML>");
a.document.close();
if (a) return false;
else return true;
}

/*Postverschlüsselung*/
function decode(s) {
	var n=0;
	var d=2;
	var r="";
	for(var i=0; i < s.length; i++) {
		n=s.charCodeAt(i);
		if (n>=8364) {n = 128;}
		r += String.fromCharCode(n-d);
		d=-d;
	}
	return r;
}

function linkTo_decode(s)	{
	location.href=decode(s);
}