// Checks whether the current frameset is the mc frameset
function check_frame() {
	if ((top.length<2) || (top.frames[1].name!="courage")) {
		var name=" ";
		var pos=0;
		name=name + self.location;
		pos=name.lastIndexOf("/");
		name=name.slice(pos+1);
		neu=open("set.html?" + name,"_top");
	}
}

// Sets the default status
function ini(){
	top.defaultStatus= document.title;
}

function changeMenu(){
	var NotFound;
	var count;
	var found=false;
	var hier=parent.frames[1].location + " ";
	hier=hier.slice(0,hier.lastIndexOf("?"));
	var menu=parent.frames[0];
	var menuName=menu.location + " ";
	if (menuName.indexOf("akt.html")<0){
		count=1;
		NotFound=1;
	} else {
		count=0;
		NotFound=0;
	}
	while (count<menu.document.links.length){
		if (hier==menu.document.links[count].href) {
			menu.Active(count);
			found=true;
		} else {
			menu.Passive(count);
		}
		count++;
	}
	if (found!=true){
		if (menu.document.links.length>NotFound){
			if (parent.frames[1].location.href!=""){
				parent.frames[1].location.href=menu.document.links[NotFound].href;
			}
		}
	}	
}

//checks whether there is a page to be displayed
function getframe(standard,Unterframe) {
	var seite=location.search;
	seite=seite.substring(1,seite.length);
	if (seite=="") {
		return (standard);
	}
	else if (seite.search(/akt.html$/)!=-1){
		return(Unterframe + seite);
	}
	else {
		return (seite);
	}
}

//sets the size of the first table to the window size
function setTable() {
	var localheight;
	if (window.opera) {
		localheight = (window.innerHeight - (10 * (1 + (document.getElementsByTagName("td").length / 5)))) / document.getElementsByTagName("td").length;
		for (i=0;i<document.getElementsByTagName("td").length;i++) {
			document.getElementsByTagName("td")[i].height = localheight;
		}
	}
}