var nn=document.layers?true:false;
var n6=document.getElementById?true:false;
var ie=document.all?true:false;
if ((ie) && (n6)) n6 = false;

var lay_ticker = "";
var position = 76;
var txtLang = 0;
var goTicker = null;

var sichtbar = "";
var unsichtbar = "";

function tickerInit() {
	if (n6) {
		sichtbar = "visible";
		unsichtbar = "hidden";
		lay_ticker = document.getElementById("ticker").style;
		document.getElementById("ticker").innerHTML = tmpTxt;
		txtLang = document.getElementById("ticker").offsetHeight;
	}
	if (ie) {
		sichtbar = "visible";
		unsichtbar = "hidden";
		lay_ticker = document.all['ticker'].style;
		ticker.innerHTML = tmpTxt;
		txtLang = document.all("ticker").offsetHeight;
	}
	if (nn) {
		sichtbar = "show";
		unsichtbar = "hide";
		lay_ticker = document['ticker1'].document['ticker2'];
		with (document.ticker1.document.ticker2.document) {
			open();
			write(tmpTxt);
			close();
		}
		txtLang = document.height;
	}
	tickerStart();
}

function tickerStart() {
	if (position <= (txtLang*(-1))-5) position = 76;
	lay_ticker.top = position;
	position -= 1
	//alert(position);
	goTicker = setTimeout('tickerStart()',50);
}

function tickerStop() {
	if (goTicker != null) window.clearTimeout(goTicker);
}

var me = null;
function memory(datei) {
	if (me != null) if (!me.closed) me.close();
	var tmpX = 376;
	var tmpY = 480;
    me = window.open(datei,'Memory','left=' + ((screen.availWidth/2)-tmpX/2) + ',top=' + ((screen.availHeight/2)-tmpY/2) + ',marginwidth=0 marginheight=0,leftmargin=0,topmargin=0,scrollbars=no,status=no,width=' + tmpX + ',height=' + tmpY + ',resizable=no');
	if (me.opener==null) me.opener=self;
	return;
}

function drucken() {
	if (window.print) self.print();
	if(document.all && navigator.appVersion.substring(22,23)==4) {
		self.focus();
	    var OLECMDID_PRINT = 6;
	    var OLECMDEXECOPT_DONTPROMPTUSER = 2;
	    var OLECMDEXECOPT_PROMPTUSER = 1;
	    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH="0" HEIGHT="0" CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
	    document.body.insertAdjacentHTML('beforeEnd',WebBrowser);
	    WebBrowser1.ExecWB(OLECMDID_PRINT,OLECMDEXECOPT_DONTPROMPTUSER);
	    WebBrowser1.outerHTML = '';
	}
}

function spTop() {
	if (document.location.href.indexOf("#") > 0) {
		document.location.href = document.location.href.substring(0,document.location.href.indexOf("#"))+"#top";
	} else {
		document.location.href = document.location.href+"#top";
	}
}

function emPage() {
//	alert(document.location.href);
}

function ieFake(fake) {
	if ((document.all) && (fake)) fake.blur();
}

if (document.layers) document.write('<link rel=stylesheet type="text/css" href="styles_nn.css">');
else document.write('<link rel=stylesheet type="text/css" href="styles.css">');

