//<![CDATA[
function AnAus(){
	var scrollPos;
	if (typeof window.pageYOffset != 'undefined') {
	   scrollPos = window.pageYOffset;}
	else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') {
	   scrollPos = document.documentElement.scrollTop;}
	else if (typeof document.body != 'undefined') {
	   scrollPos = document.body.scrollTop;}
	scrollPos = scrollPos + 80;
	document.getElementById("pplayout").style.top    = scrollPos+"px";
	
	if (document.getElementById("pplayout").style.visibility == "hidden") {
		document.getElementById("pplayout").style.visibility = "visible";}
	else {
		document.getElementById("pplayout").style.visibility = "hidden";}
}
function GroundOnOff() {
	if(document.getElementById("ground").style.display == "block") {
		document.getElementById("ground").style.display = "none";}
}
var BlendCountIMG, BlendCountIMGHG;
function FullSize(Picture, PicHeight, PicWidth) {
	ScrollPosition();
	ScrnY();
	var PicHgW = PicWidth + 8;
	var PicHgH = PicHeight + 38;
	var ImgMarginX	= parseInt(-PicHgW / 2);
	var ImgMarginY	= parseInt(-PicHgH / 2);
	var ShMarginX		= parseInt(-PicHgW / 2 + 10);
	var ShMarginY		= parseInt(-PicHgH / 2 + 10);
	SetOpacity('SCRD', 0);
	SetOpacity('IMGhg', 0);
	SetOpacity('IMGShadow', 0);
	document.getElementById('SCR').style.top			=  ScrollPosY + 'px';
	document.getElementById('SCR').style.display	= 'block';
	document.getElementById('SCRD').style.top			=  ScrollPosY + 'px';
	document.getElementById('SCRD').style.height	=  ScrnHeight + 'px';
	document.getElementById('SCRD').style.display	= 'block';
	document.getElementById('IMGhg').style.display= 'block';
	document.getElementById('IMGhg').style.width	= PicHgW + 'px';
	document.getElementById('IMGhg').style.height	= PicHgH + 'px';
	document.getElementById('IMGhg').style.margin	= ImgMarginY + 'px 0 0 ' +  ImgMarginX + 'px';
	document.getElementById('IMGShadow').style.display= 'block';
	document.getElementById('IMGShadow').style.width	= PicHgW + 'px';
	document.getElementById('IMGShadow').style.height	= PicHgH + 'px';
	document.getElementById('IMGShadow').style.margin = ShMarginY + 'px 0 0 ' +  ShMarginX + 'px';
	document.getElementById('SCRIMG').src = Picture;
	BlendCountIMG	= 0;
	BlendCountIMGHG = 0;
	BlendAct = 1;
	StartOn();
}
function StartOn() {
	if(BlendAct == 1) {
		BlendCountIMG = BlendCountIMG + 10;
		BlendCountIMGHG = BlendCountIMGHG + 3;
		if(BlendCountIMG < 101) {
			SetOpacity('IMGhg', BlendCountIMG);
			SetOpacity('IMGShadow', BlendCountIMGHG);
			SetOpacity('SCRD', BlendCountIMGHG);
			window.setTimeout("StartOn()")
		}
	} else {
		StartOff();
	}
}
function PictureOff() {
	BlendAct = 2;
	StartOff();
}
function StartOff() {
	BlendCountIMG = BlendCountIMG - 10;
	BlendCountIMGHG = BlendCountIMGHG - 3;
	if(BlendCountIMG > 1) {
		SetOpacity('IMGhg', BlendCountIMG);
		SetOpacity('IMGShadow', BlendCountIMGHG);
		SetOpacity('SCRD', BlendCountIMGHG);
		window.setTimeout("StartOff()")
	} else {
		BlendAct = 0;
		document.getElementById("SCR").style.display = "none";
		document.getElementById("SCRD").style.display = "none";
		document.getElementById("IMGShadow").style.display = "none";
		document.getElementById("SCRIMG").src = "images/gla-blank.gif";
	}
}
// ===
function SetOpacity(objId, opacity) {
	opacity = (opacity == 100)?99.999:opacity;
	obj = document.getElementById(objId);
	obj.style.filter = 'alpha(opacity:' + opacity + ')';
	obj.style.KHTMLOpacity = opacity/100;
	obj.style.MozOpacity = opacity/100;
	obj.style.opacity = opacity/100;
}
// ===
var ScrnHeight;
function ScrnY() {
	if (self.innerHeight) {
		ScrnHeight = self.innerHeight;}
	else if (document.documentElement && document.documentElement.clientHeight) {
		ScrnHeight = document.documentElement.clientHeight;}
	else if (document.body) {
		ScrnHeight = document.body.clientHeight;}
}
// ===
var ScrollPosY;
function ScrollPosition() {
	if (typeof window.pageYOffset != 'undefined') {
		ScrollPosY = window.pageYOffset;
	}
	else if (typeof document.compatMode != 'undefined' &&
		document.compatMode != 'BackCompat') {
		ScrollPosY = document.documentElement.scrollTop;
	}
	else if (typeof document.body != 'undefined') {
		ScrollPosY = document.body.scrollTop;
	}
}

// Googlemap ===
var  Gericht, Str, Ort, map;
function MapSize(PicHeight, PicWidth, AGericht, AStr, AOrt) {
	Gericht = AGericht;
	Str = AStr;
	Ort = AOrt;
	ScrollPosition();
	ScrnY();
	var PicHgW = PicWidth + 40;
	var PicHgH = PicHeight + 60;
	var ImgMarginX	= parseInt(-PicHgW / 2);
	var ImgMarginY	= parseInt(-PicHgH / 2);
	var ShMarginX		= parseInt(-PicHgW / 2 + 10);
	var ShMarginY		= parseInt(-PicHgH / 2 + 10);
	var CloseTop		= PicHgH - 30;
	var CloseLeft		= PicHgW - 40;
	document.getElementById('SCR').style.top			=  ScrollPosY + 'px';
	document.getElementById('SCR').style.display	= 'block';
	document.getElementById('SCRD').style.top			=  ScrollPosY + 'px';
	document.getElementById('SCRD').style.height	=  ScrnHeight + 'px';
	document.getElementById('SCRD').style.display	= 'block';
	document.getElementById('IMGhg').style.display= 'block';
	document.getElementById('IMGhg').style.width	= PicHgW + 'px';
	document.getElementById('IMGhg').style.height	= PicHgH + 'px';
	document.getElementById('IMGhg').style.background	= 'url(images/gla-close.gif) ' + CloseLeft + 'px ' + CloseTop + 'px no-repeat rgb(255,255,255)';
	document.getElementById('IMGhg').style.margin	= ImgMarginY + 'px 0 0 ' +  ImgMarginX + 'px';
	document.getElementById('IMGShadow').style.display= 'block';
	document.getElementById('IMGShadow').style.width	= PicHgW + 'px';
	document.getElementById('IMGShadow').style.height	= PicHgH + 'px';
	document.getElementById('IMGShadow').style.margin = ShMarginY + 'px 0 0 ' +  ShMarginX + 'px';
	initialize();
}
function initialize() {
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById('SCRIMG'));
		geocoder = new GClientGeocoder();
		showAddress(Str + ", " + Ort);
	}
}

function showAddress(address) {
	if (geocoder) {
		geocoder.getLatLng
		(
			address,
			function(point) {
				if (!point) {
					alert("Bitte überprüfen Sie Ihre Eingabe.\n\n\"" + address + "\"\n\nkonnte nicht gefunden werden!\n\nEingabeformat:\nStraße Nummer, PLZ Ort");
				} else {
					map.setCenter(point, 15);
					var marker = new GMarker(point);
					map.addOverlay(marker);
					map.addControl(new GMapTypeControl());
					map.addControl(new GLargeMapControl());
					map.addControl(new GOverviewMapControl(new GSize(160,90)));
					marker.openInfoWindowHtml(Gericht + "<br />" + Str + "<br />" + Ort);
				}
			}
		);
	}
}
function MapOff () {
	GUnload();
	document.getElementById("SCR").style.display = "none";
}
// Footerlinks
function FOn (FObj) {
	FObj.src = FObj.src.replace(/off-/g, "on-");
}
function FOff (FObj) {
	FObj.src = FObj.src.replace(/on-/g, "off-");
}

// Googlemap ===
var  Gericht, Str, Ort, map;
function MapSize(PicHeight, PicWidth, AGericht, AStr, AOrt) {
	Gericht = AGericht;
	Str = AStr;
	Ort = AOrt;
	ScrollPosition();
	ScrnY();
	var PicHgW = PicWidth + 8;
	var PicHgH = PicHeight + 32;
	var ImgMarginX = parseInt(-PicHgW / 2);
	var ImgMarginY = parseInt(-PicHgH / 2);
	var ShMarginX  = parseInt(-PicHgW / 2 + 10);
	var ShMarginY  = parseInt(-PicHgH / 2 + 10);
	var CloseTop   = PicHgH - 24;
	var CloseLeft  = PicHgW - 23;
	document.getElementById('SCR').style.top      =  ScrollPosY + 'px';
	document.getElementById('IMGhg').style.width  = PicHgW + 'px';
	document.getElementById('IMGhg').style.height = PicHgH + 'px';
	document.getElementById('IMGhg').style.margin = ImgMarginY + 'px 0 0 ' +  ImgMarginX + 'px';
	document.getElementById('IMGShadow').style.width  = PicHgW + 'px';
	document.getElementById('IMGShadow').style.height = PicHgH + 'px';
	document.getElementById('IMGShadow').style.margin = ShMarginY + 'px 0 0 ' +  ShMarginX + 'px';
	document.getElementById('SCRIMG').style.height    = PicHeight + "px";
	document.getElementById('MapClose').style.top  = CloseTop + "px";
	document.getElementById('MapClose').style.left = CloseLeft + "px";
	document.getElementById('SCR').style.display  = 'block';
	document.getElementById('IMGShadow').style.display= 'block';
	document.getElementById('IMGhg').style.display= 'block';
	initialize();
}
function initialize() {
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById('SCRIMG'));
		geocoder = new GClientGeocoder();
		showAddress(Str + ", " + Ort);
	}
}

function showAddress(address) {
	if (geocoder) {
		geocoder.getLatLng
		(
			address,
			function(point) {
				if (!point) {
					alert("Bitte überprüfen Sie Ihre Eingabe.\n\n\"" + address + "\"\n\nkonnte nicht gefunden werden!\n\nEingabeformat:\nStraße Nummer, PLZ Ort");
				} else {
					map.setCenter(point, 15);
					var marker = new GMarker(point);
					map.addOverlay(marker);
					map.addControl(new GMapTypeControl());
					map.addControl(new GLargeMapControl());
					map.addControl(new GOverviewMapControl(new GSize(160,90)));
					marker.openInfoWindowHtml(Gericht + "<br />" + Str + "<br />" + Ort);
				}
			}
		);
	}
}
function MapOff () {
	GUnload();
	document.getElementById("SCR").style.display = "none";
}
// Logos
function LScroll() {
	LogoY--;
	if(LogoY < (LogoHeight + 132)) LogoY = 0;
	
	document.getElementById('LogoScroll').style.top = LogoY + "px";
	window.setTimeout("LScroll()", 51);
}
//]]>