
	
	var actualwidth;
	var actualheight;

	function windowwidth()
	{
		if (window.innerWidth)
			return window.innerWidth;
		else if (document.body && document.body.offsetWidth)
			return document.body.offsetWidth;
		else
			return 0;
	}

	function windowheight()
	{
		if (window.innerHeight)
			return window.innerHeight;
		else if (document.body && document.body.offsetHeight)
			return document.body.offsetHeight;
		else
			return 0;
	}

	function windowreload()
	{
		if (actualwidth != windowwidth() || actualheight != windowheight())
			location.href = location.href;
	}

	function calculate_banner()
	{
		if(!window.actualwitdth && window.innerWidth)
		{
			window.onresize = windowreload;
			actualwidth = windowwidth();
			actualheight = windowheight();
		}
		else if(!window.actualwidth && document.body && document.body.offsetWidth)
		{
			window.onresize = windowreload;
			actualwidth = windowwidth();
			actualheight = windowheight();
		}
	}

	function contactbanner() {
		if ((navigator.appName == "Netscape") && (navigator.appVersion < "5")) {
			;
		} else {
			if (navigator.appName != "Microsoft Internet Explorer") {
				var leftwidth = window.innerWidth;
				leftwidth = leftwidth * 0.57 - 14 - 186 - 26;
			} else {
				leftwidth = document.body.offsetWidth;				leftwidth = leftwidth * 0.57 - 16 - 186 - 26;
			}

			leftwidth = Math.round(leftwidth);
			document.open();
			document.write("<table cellpadding='0' cellspacing='0'><tr><td nowrap><br><br>");
			document.write("<div style='position:relative; width:" + leftwidth + "px; height:80px; overflow:hidden;'>");

			var totalwidth = 0;
			var i = 0

			var allimgnames = new Array ("images/banner/bergwiese80.jpg",
									"images/banner/hof80.jpg",
									"images/banner/wiese80.jpg",
									"images/banner/bach80.jpg",
									"images/banner/kuehe80.jpg");

			var allimgalts = new Array ("Heiligkreuz im Mai 2002",
									"Heiligkreuz, Geburtshof von Oma Lores Mutter im Mai 2002",
									"Heiligkreuz im Mai 2002",
									"Heiligkreuz im Mai 2002",
									"Heiligkreuz im Mai 2002");

			var allimgwidths = new Array ("104",
									"107",
									"107",
									"60",
									"107");

			while (totalwidth < leftwidth) {
				totalwidth += Math.round(allimgwidths[i]);
				document.write("<img src='" + allimgnames[i] + "' border='0' height='80' alt='" + allimgalts[i] + "' title='" + allimgalts[i] + "'>&nbsp;");
				i++;
				if (i == 5) i = 0;
			}

			document.write("<\/div><\/td><\/tr><\/table>");
			document.close();
		}
	}

