//
// nicht in frameset? -> load index
//
//
// http://www./~ppk/test.html
// http://www./~ppk/js/framecustom.html
//
// if(window == top) top.location.href = "/index.html" ;
//
// if (top.location.href != self.location.href) top.location.href = self.location.href;
// window.setTimeout('top.location.replace("/xxx.php?"+self.location.href);',1700);
//
//

function HideStatus(){
	//window.status = document.readyState!="complete" ? "Loading..." : "TO.mTO Berlin";
		
		if (document.readyState != "complete") {
			window.status = "Loading...";
		} else {
			window.status = "TO.mTO Berlin";
			//hideLayer("imloading");
		}
}
document.onreadystatechange = HideStatus;

//self.defaultStatus = "TO.mTO Berlin";
// window.defaultStatus
//
function MM_reloadPage(init) {
	//reloads the window if Nav4 resized
	if (init == true) {
		with (navigator) {
			if ((appName == "Netscape") && (parseInt(appVersion) == 4)) {
				document.MM_pgW = innerWidth;
				document.MM_pgH = innerHeight;
				onresize = MM_reloadPage;
			}
		}
	} else if (innerWidth != document.MM_pgW || innerHeight != document.MM_pgH) {
		location.reload();
	}
}
MM_reloadPage(true);
//
function getLayer(name) {
	// Returns a handle to the named layer.
	if (document.layers) {
		return (document.layers[name]);
	} else if (document.all) {
		layer = eval('document.all.'+name+'.style');
		return (layer);
	} else {
		return (null);
	}
}
//
function hideLayer(name) {
	var layer = getLayer(name);
	if (document.layers) {
		layer.visibility = "hide";
	}
	if (document.all) {
		layer.visibility = "hidden";
	}
}
//
// no right click netscape
//
var message = "Function Disabled";
//
function click(e) {
	window.status = "TO.mTO Berlin";
	if (document.all) {
		if (event.button == 2 || event.button == 3) {
			alert(message);
			return false;
		}
	}
	if (document.layers) {
		if (e.which == 3) {
			alert(message);
			return false;
		}
	}
}
if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown = click;
//
// no right click netscape ^^^^
//
// no right click explorer
//
function fnContextMenu(){ 
event.returnValue = false; // cancel the default behavior
}
//
// catch error's
function ke() {
	return true;
}
window.onError = ke;
//
//

/*
window.onerror = myOnError;

function myOnError() {
	window.top.location.href="/noframe/index.htm";
}

if (parent.frames.length < 1) {
	window.top.location.href="/noframe/index.htm";
}
*/
