 window.focus();
 PageLoaded = false;
  if (window.name == "") {
   window.name = "MainWindow";
  }

 function GetPassword(Action, ID, URL) {
  window.open("GetPassword.asp?Window=" + window.name + "&ID=" + ID + "&Action=" + Action + "&URL=" + URL, "GetPWD", "width=500,height=200");
 }

  function loeschen(conftext, Action, ID, URL) {
  if (confirm(conftext)) {
    window.open("GetPassword.asp?Window=" + window.name + "&ID=" + ID + "&Action=" + Action + "&URL=" + URL, "GetPWD", "width=500,height=200");
  }
 }

 function NonPublicNewEntry() {
  Check = confirm("Dieser Kalender ist nicht für öffentliche Einträge konfiguriert.\nSie können nur Einträge vornehmen wenn Sie die Zugangsdaten kennen.");
  if (Check) {
   NewEntry();
  }
 }
 
function NewEntry(){
 BName = window.navigator.appName.toLowerCase();
 BVersion = window.navigator.appVersion;
 if (BVersion.substr(0, 1) >= 4) {
  strURL = "NewEntry/EnterData.asp?ID="+document.thisForm.ID.value+"&WindowName="+window.name+"&Datum="+document.thisForm.sDate.value;
  window.open(strURL, "EnterDataWindow", "width=410,height=425");
 } else {
  alert("Für die Dateneingabe in WebCalendar muß ein Browser der Generation 4 oder höher benutzt werden.");
  alert("WebCalendar-Eingabeformular V0.2\nSie benutzen zur Eingabe einen "+BName+"-Browser der Version "+BVersion+".\nZur Benutzung des Eingabeformulars muß ein Netscape oder Microsoft-Browser der Version 4 oder höher verwendet werden.")
 }
}

function Aktualisieren() {
 window.location.reload();
}

// ********* Prüfen, ob Cookies aktiv sind
//if (!document.cookie) { alert("Zur Nutzung von WebCalendar\nmüssen Cookies aktiviert sein!"); }


var mouseover_aktiv = 1;


// ********* Anzeigeblocksteuerung start *********
var x=y=0; //initialisiert die Variablen "x" und "y" global, so dass sie für jede Funktion existieren
document.onmousemove = mouse; //sorgt dafür, dass bei Änderung der Mausposition die Variablen x und y durch die Funktion "mouse()" aktuallisiert werden
// find out if ie runs in quirks mode quirks=document.body; standard=document.documentElement
var docEl = (
  typeof document.compatMode != "undefined" &&
  document.compatMode != "BackCompat"
)? "documentElement" : "body";
function mouse(e) {
  x = (document.all) ? window.event.x + document[docEl].scrollLeft : e.pageX;
  y = (document.all) ? window.event.y + document[docEl].scrollTop : e.pageY;
}
function placeDiv(strId, Text) {
  //document.title = mouseover_aktiv;     // debug
  if ( (div = document.getElementById(strId)) && mouseover_aktiv == 1 ) { //prüft, ob ein div mit id gleich Inhalt der Variablen "strId" existiert und setzt eine refernz mit namen pic, wenn ja
	div.style.display = "block";
	x = x + 30;
	if (x > 320) { x = x - 270; }
	y = y + 20;
	if (y > 170) { y = y - 100; }
	div.style.left = x +"px"; //setzt das div an die x-Position der Maus (in der Variablen "x" durch die Funktion "mouse()" gespeichert)
	div.style.top = y +"px"; //setzt das div an die y-Position der Maus (in der Variablen "y" durch die Funktion "mouse()" gespeichert)
	div.innerHTML = Text;
  }
}
function hideDiv(strId) {
  if ( div = document.getElementById(strId) ) { //prüft, ob ein div mit id gleich Inhalt der Variablen "strId" existiert und setzt eine refernz mit namen pic, wenn ja
	div.style.display = "none";
  }
}
// ********* Anzeigeblocksteuerung stop *********





// ********* Auf - Zu-Steuerung per jQuery start *********
$(document).ready(function() {
	// erst alles in den Klassen "modify" durchsichtig machen
	$('.modify').animate({opacity: 0}, 1);

	$(".box").click(function() {
		aufzu(this);
	});
});

function aufzu(e) {
	var is_auf = -1;
	if ($(e).attr("style")) {
		is_auf = $(e).attr("style").indexOf("solid");
	}else{
		is_auf = -1;
	}
	if (is_auf >= 0) {
		// Ausblenden
		var p = $(e).find('div:first')
		$(p).animate({
			opacity: 0,
			height: "hide"
		}, 1000, 
			function() {
				$(e).css("border", "none");
				$(e).css("padding", "0");
				$(e).css("color", "");
				$(e).css("background-color", "");
			}
		);
    // Mouseover-Box aktivieren
    mouseover_aktiv -= 1;
	} else {
		// Einblenden
		$(e).css("border", "solid 1px black");
		$(e).css("padding", "3px");
		$(e).css("color", "black");
		$(e).css("background-color", "white");
		// Text einblenden
		var p = $(e).find('div:first')
		$(p).animate({
			opacity: 1,
			height: "show"
		}, 1000);
    // Mouseover-Box DEaktivieren
    mouseover_aktiv += 1;
    hideDiv("Termin")
	}
}
// ********* Auf - Zu-Steuerung per jQuery stop *********

