function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	if (init == true) with (navigator) {
		if ((appName == "Netscape") && (parseInt(appVersion) == 4)) {
			document.MM_pgW = innerWidth;
			document.MM_pgH = innerHeight;
			onresize = MM_reloadPage;
		}
	}	else if (innerWidth != document.MM_pgW || innerHeight != document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImgRestore() { //v3.0
	var i, x, a = document.MM_sr;
	for(i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
}

function MM_preloadImages() { //v3.0
	var d = document;
	if (d.images) {
		if (!d.MM_p) d.MM_p = new Array();
		var i, j = d.MM_p.length, a = MM_preloadImages.arguments;
		for (i = 0; i < a.length; i++)
			if (a[i].indexOf("#") != 0) {
				d.MM_p[j] = new Image;
				d.MM_p[j++].src = a[i];
			}
	}
}

function MM_findObj(n, d) { //v4.0
	var p, i, x;
	if (!d) d = document;
	if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
		d = parent.frames[n.substring(p + 1)].document;
		n = n.substring(0, p);
	}
	if (!(x = d[n]) && d.all) x = d.all[n];
	for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
	for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
	if (!x && document.getElementById) x = document.getElementById(n);
	return x;
}

function MM_swapImage() { //v3.0
	var i, j = 0, x, a = MM_swapImage.arguments;
	document.MM_sr = new Array;
	for (i = 0; i < (a.length - 2); i += 3)
		if ((x = MM_findObj(a[i])) != null) {
			document.MM_sr[j++] = x;
			if (!x.oSrc) x.oSrc = x.src;
			x.src = a[i + 2];
		}
}


function addBookmark() {
	if (window.external)
		external.AddFavorite(location.href, document.title)
	else
		alert('Dein Browser unterstützt diese Funktion leider nicht. Um ein Lesezeichen auf diese Seite zu setzen, wähle bitte "Lesezeichen" -> "Lesezeichen hinzufügen".');
}

function printPage() {
	if (document.all) {
		if (navigator.appVersion.indexOf("5.0") == -1) {
			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(6, 2);
			WebBrowser1.outerHTML = "";
		} else self.print();
	} else self.print();
}


function yyLayerScroll(daTarget, delay, ex, ey, dx, dy, sx, sy, daT, daLoop, daFirst ) {//v4.05
//copyright (c)2000,2001 Yaromat.com
	var yyX, yyY, target = MM_findObj(daTarget);
	if (!target.oritop) {
		target.oritop = (document.layers)? target.top : target.style.top;
		target.orileft = (document.layers)? target.left : target.style.left;
	}
	if (document.layers) {
		var ct = target.clip.top;
		var cb = target.clip.bottom;
		var cl = target.clip.left;
		var cr = target.clip.right;
		yyY = Math.abs(Math.round((ct - ey) / sy)); dy = Math.round((ey - ct) / yyY);
		yyX = Math.abs(Math.round((cl - ex) / sx)); dx = Math.round((ex - cl) / yyX);
		if (yyX < 1) { dx = 0; } else { yyX--; }
		if (yyY < 1) { dy = 0; } else { yyY--; }
		var t = target.top;
		var l = target.left;
		target.clip.top = ct + (dy);
		target.clip.bottom = cb + (dy);
		target.top = t - (dy);
		target.clip.left = cl + dx;
		target.clip.right = cr + dx;
		target.left = l - dx;
	} else if ((document.all || document.getElementById) && target.style.clip) {
		var l = parseInt((document.getElementById)? target.style.left : target.style.pixelLeft);
		var t = parseInt((document.getElementById)? target.style.top : target.style.pixelTop);
		var clipv = target.style.clip;
		clipv = clipv.replace(/x/gi, "").replace(/t/gi, "");
		clipv = clipv.split("rec(")[1].split(")")[0].split("p");
		var ct = Number(clipv[0]);
		var cr = Number(clipv[1]);
		var cb = Number(clipv[2]);
		var cl = Number(clipv[3]);
		yyY = Math.abs(Math.round((ct - ey) / sy)); dy = Math.round((ey - ct) / yyY);
		yyX = Math.abs(Math.round((cl - ex) / sx)); dx = Math.round((ex - cl) / yyX);
		if (yyX < 1) dx = 0;
		if (yyY < 1) dy = 0;
		ncl = cl + dx;
		nct = ct + dy;
		ncr = cr + dx;
		ncb = cb + dy;
		target.style.pixelTop = t - dy;
		target.style.pixelLeft = l - dx;
		target.style.left = l - dx;
		target.style.top = t - dy;
		eval("target.style.clip = 'rect(' + nct + ' ' +  ncr + ' ' + ncb + ' ' + ncl +')'");
		yyY--;
		yyX--;
	}
	if (target.tmtScrollo) clearTimeout(target.tmtScrollo);
	if (yyY > 0 || yyX > 0) {
		var doTo = true;
	} else if (delay > -1 && daLoop == true) {
		if (document.layers) {
			target.left = target.orileft;
			target.clip.left = 0;
			target.clip.right = (cr - cl);
			target.top = target.oritop;
			target.clip.top = 0;
			target.clip.bottom = (cb - ct);
		} else {
			eval("target.style.clip = 'rect(' + 0 + ' ' +  (cr-cl) + ' ' + (cb-ct) + ' ' +0 +')'");
			target.style.top = target.oritop;
			target.style.left = target.orileft;
		}
		var doTo = true;
	}
	if (doTo == true) target.tmtScrollo = setTimeout('yyLayerScroll("' + daTarget + '",'  + delay + ',' + ex + ',' + ey + ',' + dx + ',' + dy + ',' + sx + ',' + sy + ',' + false + ',' + daLoop + ')', delay);
}

function MM_findObj(n, d) { //v4.01
	var p, i, x;
	if (!d) d = document;
	if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
		d = parent.frames[n.substring(p + 1)].document;
		n = n.substring(0, p);
	}
	if (!(x = d[n]) && d.all) x = d.all[n];
	for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
	for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
	if (!x && d.getElementById) x = d.getElementById(n);
	return x;
}

function YY_LS(daTarget, yy_x, yy_y, delay, step, loop){//v4.05
	if (document.layers || document.all || document.getElementById)
		yyLayerScroll(daTarget, delay, yy_x, yy_y, 0, 0, step, step, false, loop, true);
}
