
function show_notification() {
	dojo.animateProperty({node: "notification",
						  duration: 500,
						  delay: 1000,
						  properties: {
								height: {start: 0, end: 100}
						  }
						  }).play();
}

function hide_notification() {
	dojo.animateProperty({node: "notification",
		  duration: 500,
		  properties: {
				height: {start: 100, end: 0}
		  }
		  }).play();
}

function show_error_notification(message, file, line) {
	document.getElementById('notification').innerHTML = "<span class='error'>" +
	"<h1>Auf dieser Seite ist ein Fehler aufgetreten!</h1>" +
	"<strong>Fehlermeldung:</strong> " + message + "<br />" +
	"<strong>Betroffene Datei:</strong> " + file + "<br />" +
	"<strong>Betroffene Zeile:</strong> " + line +
	"</span>";
	show_notification();
}

function show_debug_notification(message) {
	document.getElementById('notification').innerHTML = "<span class='error'>" +
	"<h1>Debug-Ausgabe</h1>" +
	message + "<br />" +
	"</span>";
	show_notification();
}



// Initialisierung

dojo.addOnLoad( function() {
	var notificator = document.getElementById('notification');
	if (notificator) {
		if (notificator.addEventListener) {
		  notificator.addEventListener("click", hide_notification , false);
		}else{
		  notificator.attachEvent("onClick", hide_notification);
		}
	}
});
