function showDatenschutz() {
	window.open("/datenschutz.php", "datenschutz", "dependent=yes,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,width=450,height=550");
}

function showPicture(pfad, breite, hoehe) {
	posX = (screen.width - breite) / 2;
	posY = (screen.height - hoehe) / 2;
	ansicht = window.open("/picturePreview.php?path="+pfad, "Bildvorschau", "status=no,dependent=yes,toolbar=no,location=no,menubar=no,scrollbars=no,resizable=no,width="+breite+",height="+hoehe+",left="+posX+",top="+posY);
}

var savedBorderColor;
var savedBackgroundColor;
function showContentBorder(obj) {
	savedBorderColor = obj.style.borderColor;
	savedBackgroundColor = obj.style.backgroundColor;
	obj.style.borderColor = "red";
	obj.style.backgroundColor = "#e0e0e0";
}

function hideContentBorder(obj) {
	obj.style.borderColor = savedBorderColor;
	obj.style.backgroundColor = savedBackgroundColor;
}
 
var hideTimer;
function showAdminLayer() {
	window.clearTimeout(hideTimer);
	document.getElementById("adminLayer").style.visibility = "visible";
}
function startHideTimer() {
	hideTimer = window.setTimeout("hideAdminLayer()", 0);
}
var showAdminLayerAlways = false;
function hideAdminLayer() {
	if (!showAdminLayerAlways) document.getElementById("adminLayer").style.visibility = "hidden";
}

var savedBG;
function AdminLayerButtonMouseOver(obj) {
	obj.style.cursor = "hand";
	savedBG = obj.style.backgroundColor;
	obj.style.backgroundColor = "#e0e0e0";
}

function AdminLayerButtonMouseOut(obj) {
	obj.style.backgroundColor = savedBG;
}

// Bildergallerie
var Desc = Array();
var Breite = Array();
var Hoehe = Array();
var _galleryIndex = 0;
var _galleryId = 0;
function ShowGalleryDetailImg(galleryId, galleryIndex) {
	_galleryId = galleryId;
	_galleryIndex = galleryIndex;
	fileUrl = eval("GalleryDetails" + galleryId)[galleryIndex];
	if (Desc[fileUrl]) {
		strDesc = Desc[fileUrl];
	} else {
		strDesc = "&nbsp;";
	}
	breite = Breite[fileUrl];
	hoehe = Hoehe[fileUrl];
	html = '<img src="' + fileUrl + '" alt="">';

	obj = document.getElementById("GalleryImg");
	if (obj) obj.innerHTML = html;

	obj = document.getElementById("GalleryText");
	if (obj) obj.innerHTML = strDesc;

	obj = document.getElementById("GalleryDetails");
	if (obj) obj.style.visibility = "visible";
}

function ShowFirstGalleryImg() {
	ShowGalleryDetailImg(_galleryId, 0);
}

function ShowPrevGalleryImg() {
	var newIndex = _galleryIndex - 1;
	if (newIndex < 0) newIndex = 0;
	ShowGalleryDetailImg(_galleryId, newIndex);
}

function ShowNextGalleryImg() {
	var newIndex = _galleryIndex * 1 + 1;
	var maxIndex = eval("GalleryDetails" + _galleryId).length - 1;
	if (newIndex > maxIndex) newIndex = maxIndex;
	ShowGalleryDetailImg(_galleryId, newIndex);
}

function ShowLastGalleryImg() {
	ShowGalleryDetailImg(_galleryId, eval("GalleryDetails" + _galleryId).length - 1);
}

function CloseGalleryDetails(gallerieId) {
	obj = document.getElementById("GalleryDetails");
	if (obj) obj.style.visibility = "hidden";
}

function SwitchLupe(obj, value) {
    if (obj.childNodes.length > 1) {
        //obj.childNodes[1].width = "20";
        obj.childNodes[1].style.visibility = value;
    }
}



