
//Browserabfrage
var isMac, isNav6;
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
  isNav6 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) == 5) ? true : false
  isMac  = (navigator.platform.indexOf("Mac") != -1) ? true : false
}

//Variablen + Funktionen f�r Kalender auf der Homepage
var calopenHtml = "<a href='javascript:calopen();'>Terminkalender hier &ouml;ffnen</a>";
var calcloseHtml = "<a href='javascript:rewrite();'>Terminkalender schlie&szlig;en</a>";

function rewrite() {
  if(isNav6) {
    document.getElementById('vaHeader').innerHTML = calopenHtml;
    document.getElementById('vaCal').style.height='397px';
    document.getElementById('vaCal').style.overflow='hidden';
    document.getElementById('vaCal').style.visibility='hidden';
    document.getElementById('vaFooter').style.visibility='hidden';
    document.getElementById('aktuellHeader').style.margin='-426px 0px 0px 0px';
    document.getElementById('aktuelles').style.visibility='visible';
  } else {
    document.all['vaHeader'].innerHTML = calopenHtml;
    document.all['vaCal'].style.height='397px';
    document.all['vaCal'].style.overflow='auto';
    document.all['vaCal'].style.visibility='hidden';
    document.all['vaFooter'].style.visibility='hidden';
    document.all['aktuellHeader'].style.margin='-425px 0px 0px 0px';
    document.all['aktuelles'].style.visibility='visible';
  }
  if (isNav6 && isMac) {
    document.getElementById('vaCal').style.overflow='auto'; //mu� fuer safari auf auto stehen
  }
  void(0);
}

function calopen() {
  if(isNav6) {
    document.getElementById('vaHeader').innerHTML = calcloseHtml;
    document.getElementById('vaCal').style.overflow='auto';
    document.getElementById('vaCal').style.visibility='visible';
    document.getElementById('vaFooter').style.visibility='visible';
    document.getElementById('aktuelles').style.visibility='hidden';
  } else {
    document.all['vaHeader'].innerHTML = calcloseHtml;
    document.all['vaCal'].style.visibility='visible';
    document.all['vaFooter'].style.visibility='visible';
    document.all['aktuelles'].style.visibility='hidden';
	 document.all['vaCal'].style.overflow='auto';
  }
  void(0);
}


// style="display:none;overflow:auto;height:180px;width:200px;

function layerClose() {
  if(isNav6) {
    document.getElementById('popup').style.visibility='hidden';
  } else {
    document.all['popup'].style.visibility='hidden';
  }
  void(0);
}

// Druckfunktion

var nIE4Win;
var nCanPrint;
var printed; 
function init() {
	printed = "no";
	if (window.print) {
		nCanPrint = "yes";
	} else {
		nCanPrint = "no";
	}
    var agt=navigator.userAgent.toLowerCase();
    nVersion = parseInt(navigator.appVersion);
    nIE  = (agt.indexOf("msie") != -1);
    nWin   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
	nMac = (agt.indexOf("mac") != -1);
	nIE4Win  = (nIE && (nVersion == 4) && nWin);
	doPrint();
}
function doPrint() {
if (nCanPrint == "yes") {
	printed="yes";
		window.print();

	} else if (nIE4Win) {
	printed="yes";
		IEPrint();
	}
	else
	{
 alert("Bitte benutzen Sie die Druckfunktion in Ihrer Navigationsleiste!");		
	}
}

//Popupfunktion
function openWin(url, winName, pWidth, pHeight, scrollbars, status) {
  var paramStr, xPos, yPos;
  xPos = (screen.width - pWidth) / 2;
  yPos = (screen.height - pHeight) / 2;
  paramStr = "location=no,menubar=no,toolbar=no,resizable=yes,width="+pWidth+",height="+pHeight+",top="+yPos+",left="+xPos+",scrollbars="+scrollbars+",status="+status;
  win = window.open(url, winName, paramStr);
 return false;
}
// mit toolbar fuer Printleiste
function openWinP(url, winName, pWidth, pHeight, scrollbars, status) {
  var paramStr, xPos, yPos;
  xPos = (screen.width - pWidth) / 2;
  yPos = (screen.height - pHeight) / 2;
  paramStr = "location=no,menubar=no,toolbar=yes,resizable=yes,width="+pWidth+",height="+pHeight+",top="+yPos+",left="+xPos+",scrollbars="+scrollbars+",status="+status;
  win = window.open(url, winName, paramStr);
 return false;
}


	//follow_us_layer
	jQuery(document).ready(function(){
		jQuery(".follow_us a.link, .follow_us .flapbox").hover(
			function(){
				$(".follow_us .flapbox").show();
			},
			function(){
				$(".follow_us .flapbox").hide();
			}
		);
	
	});
	//share_layer
	jQuery(document).ready(function(){
		jQuery(".share a.link, .share .flapbox").hover(
			function(){
				$(".share .flapbox").show();
			},
			function(){
				$(".share .flapbox").hide();
			}
		);
	
	});




//document.write("\<scr" + "ipt src='http://www.google-analytics.com/ga.js' type='text/javascript'>\<\/script>" );
//document.write('<script type="text/javascript">var pageTracker = _gat._getTracker("UA-3013114-1");pageTracker._initData();pageTracker._trackVisit();</script>');

//document.write('<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>');
//document.write('<script type="text/javascript">_uacct = "UA-3013114-1"; urchinTracker(); </script>');
