// JavaScript Document
function setupTooltipper() {
	if (document.getElementById){
		navPath = document.getElementById("nav");
		navElements = navPath.getElementsByTagName("li");
		numNav = navElements.length;
		toolTxt = Array(numNav);
		for (var i=0;i<numNav;i++) {
			toolTxt[i]=navElements[i].firstChild.getAttribute("title");
			navElements[i].firstChild.removeAttribute("title");
			navElements[i].firstChild.curNo = i;
			navElements[i].firstChild.onmouseover = function() {
				toolPath = document.getElementById('tooltips');
				nuTooltip = document.createTextNode(toolTxt[this.curNo]);
				toolPath.replaceChild(nuTooltip,toolPath.firstChild);
				document.getElementById('breadcrumbs').className = "hidden";
				toolPath.className = "shown";
				}
			navElements[i].firstChild.onmouseout = function() {
				document.getElementById('breadcrumbs').className = "shown";
				nuTooltip = document.createTextNode('');
				toolPath = document.getElementById('tooltips');
				toolPath.replaceChild(nuTooltip,toolPath.firstChild);
				toolPath.className = "hidden";
				}	
		}
		
	}
}

function soopaPopSetup() {
	var a;
	for (var i = 0; (a = document.links[i]); i++) {
		if (a.target && a.target.indexOf("_soopaPop") == 0) {
			a.onclick = soopaPop;
		}
	}
}

function soopaPop() {
	var a = this.target.split(":");
	var sFeatures = a[1];
	var myW = sFeatures.substr((sFeatures.indexOf("width=") + 6),3);
	var myH = sFeatures.substr((sFeatures.indexOf("height=") + 7),3);
	var myX = Math.floor((screen.availWidth-myW-10)/2);
	var myY = Math.floor((screen.availHeight-myH-15)/2);
	var myPos = ",left=25,top=25";
	sFeatures = sFeatures + myPos;
	window.open(this.href, a.length > 2 ? a[2] : String((new Date()).getTime()), sFeatures);
	return false;
	alert("hi")
}

function hideBlindLinks() {
	for(i=0; i<document.links.length; i++) {
	if (document.links[i].href == 'javascript:;') {
		if (document.links[i].onmouseover == null) {
			document.links[i].onmouseover = function(){return true;};
			}
		}
	}
}

function openPictureWindow_Fever(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
 	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+(Math.floor((screen.availWidth-imageWidth-10)/2))+",top="+(Math.floor((screen.availHeight-imageHeight-10)/2)));
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' title=\"'+alt+'\" alt=\"'+alt+'\" galleryimg=\"no\">');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

function accPopup(theURL,winName,features) {
		newwindow=window.open(theURL,winName,features);
		if (window.focus) {newwindow.focus()}
		return false;
}

function showPerson(userName) {
      var win = window.open("http://www.kirchenserver.net/bwo/opencms/sites/bistum/vk/personen/anzeige.html?f_action=show_user&f_user_name=" + userName,"preview_stelle_person", "toolbar=no, location=no, directories=no, status=no, menubar=0, scrollbars=yes, "+ "resizable=yes, top=10, left=" + ((screen.width-625) / 2) + ", width=525, height=600");
      if (win != null) {
            win.opener = self;
            win.focus();
			}
	  return false;
}
