/* -------------------------------------------------------------------------- */
/* JavaScript by Dr. Stefan Immel                              Copyright 2003 */
/* -------------------------------------------------------------------------- */

function breakFrames() {
	if (parent.frames.length > 0) {
		top.location.href=self.document.location.href;
	}
}

function setFrames() {
	if (top.location.href == self.document.location.href &&
		self.document.location.href.indexOf("file:/") != 0 &&
		self.document.location.href.indexOf("#local") <  0 &&
		self.document.location.href.indexOf("#print") <  0 &&
		self.document.location.href.indexOf("#noframes") <  0 ) {
		top.location.href = "/ak/immel/script/redirect.cgi?filename=" + self.document.location.href.replace(RegExp ('#', 'g'), '@');
	}
	window.defaultStatus = document.title;
}

function makeFrames() {
	path = escape(location.pathname);
	alert("Path: " + path + "\nTop: " + top.location + "\nSelf: " + self.location + "\nParent: " + parent.location);
	if (self == parent) {
		if (path != "/" && path != "/ak/immel/script/redirect.cgi" ) {
			ok = confirm("This Page appears to have loaded without the\nappropriate frame structure of menus.\nReload the corresponding menus?");
			if (ok) {
				document.location = "/ak/immel/script/redirect.cgi?filename=" + self.document.location.href.replace(RegExp ('#', 'g'), '@');
			}
		}
	}
}

function printPDF() {
	if ( ! document.cookie ) {
		document.cookie = "PDF Loaded";
		alert('To avoid problems printing this web-site\nthese pages are provided as PDF-files.\nNOTE: For proper printing enable\n\"automatic scaling\" to fit your print-media.\nPDF files will open in new windows,\nwhich can be closed to return to this page.');
	}
}

/* -------------------------------------------------------------------------- */
