function popupMA()
{ 
  var hoehe=711;
  var breite=1010;
  var eigenschaften='top=0,left=0,width='+breite+',height='+hoehe;
  window.open("i_Mitar_35775.html","Mitarbeiter",eigenschaften,resizable="no");
}

function changeHeadline() {

  zahl1 = Math.floor(Math.random()*8 + 1)
  var randomitem1 = zahl1;
//  alert ("Zahl1: " + zahl1);

  do {
    zahl2 = Math.floor(Math.random()*8 + 1)
  } while (zahl1 == zahl2);
  var randomitem2 = zahl2;

  do {
    zahl3 = Math.floor(Math.random()*8 + 1)
  } while ((zahl3 == zahl2) || (zahl3 == zahl1));
  var randomitem3 = zahl3;
  
//  alert ("Zahl1: " + zahl1 + " - Zahl2: " + zahl2 + " - Zahl3: " + zahl3);

  theObject=MM_findObj("item" + randomitem1);
  if (theObject) {
    theObject.style.display= "block";
  }
  theObject=MM_findObj("item" + randomitem2);
  if (theObject) {
    theObject.style.display= "block";
  }
  theObject=MM_findObj("item" + randomitem3);
  if (theObject) {
    theObject.style.display= "block";
  }
}

function openPrintWindow(theTarget) {
	printWindow = window.open('i_print_35732.html?target='+theTarget,'Print','width=600,height=400,menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=yes');
}

function openGlossar(theTarget) {
	glossarWindow = window.open(theTarget,'Glossar','width=300,height=200,menubar=no,scrollbars=auto,toolbar=no,location=no,directories=no,resizable=yes,status=no');
}

function openRecommendation(theTarget) {
	var ResolvedParams="";
	var CurrentPath="";
	var CurrentUrlVars="";
	CurrentPath = parent.topFrame.location.pathname;
	CurrentUrlVars = parent.topFrame.location.search;
	ResolvedParams=ResolvedParams+"top="+(CurrentPath)+escapeURL(CurrentUrlVars);
	ResolvedParams=ResolvedParams+"&";
	CurrentPath = parent.leftFrame.location.pathname;
	CurrentUrlVars = parent.leftFrame.location.search;
	ResolvedParams=ResolvedParams+"left="+(CurrentPath)+escapeURL(CurrentUrlVars);
	ResolvedParams=ResolvedParams+"&";
	CurrentPath = parent.mainFrame.location.pathname;
	CurrentUrlVars = parent.mainFrame.location.search;
	ResolvedParams=ResolvedParams+"main="+(CurrentPath)+escapeURL(CurrentUrlVars);
	RecommendWindow = window.open('i_recom_35735.html?'+ResolvedParams,'Mail','width=411,height=355,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no');
}

function escapeURL(theURL) {
	var ResolvedURL=theURL;
	ResolvedURL = replaceSubstring(ResolvedURL, "?", "*");
	ResolvedURL = replaceSubstring(ResolvedURL, "=", "~");
	return ResolvedURL;
}

function unescapeURL(theURL) {
	var ResolvedURL=theURL;
	ResolvedURL = replaceSubstring(ResolvedURL, "*", "?");
	ResolvedURL = replaceSubstring(ResolvedURL, "~", "=");
	return ResolvedURL;
}

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();
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function changeContent(id,shtml) {
	theObject=MM_findObj(id);
	if (theObject) {   
		if (typeof theObject.innerHTML != "undefined") theObject.innerHTML = shtml;
	}
}

function Left(str, n) {
	if (n <= 0)     // Invalid bound, return blank string
		return "";
	else if (n > String(str).length)   // Invalid bound, return
		return str;                // entire string
	else // Valid bound, return appropriate substring
		return String(str).substring(0,n);
}
function Right(str, n) {
	if (n <= 0)     // Invalid bound, return blank string
		return "";
	else if (n > String(str).length)   // Invalid bound, return
		return str;                // entire string
	else // Valid bound, return appropriate substring
		var iLen = String(str).length;
		return String(str).substring(iLen, iLen - n);
}

function replaceSubstring(inputString, fromString, toString) {
var tempString = inputString;
for(var i=0;i<inputString.length;i++) {tempString = tempString.replace(fromString,toString);}
return tempString;
}

var LastSelectedID = "";
var LastSelectedBgColor = "";
var LastSelectedFrontColor = "";
function ps(theID) {
	if(LastSelectedID != "") {
		theObject=MM_findObj("el_" + LastSelectedID);
		if (theObject) {
			theObject.style.backgroundColor= LastSelectedBgColor;
			theObject.style.color= LastSelectedFrontColor;
			theObject.style.FontWeight = LastSelectedFontWeight;
		}
	}
	theObject=MM_findObj("el_" + theID);
	if (theObject) {
		LastSelectedID = theID;
		LastSelectedBgColor = theObject.style.backgroundColor;
		LastSelectedFrontColor = theObject.style.color;
	                LastSelectedFontWeight = theObject.style.FontWeight;
		theObject.style.backgroundColor= "#ffffff";
		theObject.style.color= "#666699";
                                theObject.style.FontWeight = "bold";
	}
	return true;

}

function setTopNav(theID) {
	for(var i=1;i<=3;i++) {
		var TopnavClass='navtitel';
		if (theID == i) {
			TopnavClass = "navtitelselected";
		}
		theObject=MM_findObj("topnav" + i);
		if (theObject) {
			theObject.className = TopnavClass;
		}
	}
}

function setCheckedInfo(theStatus) {
//alert("setCheckedInfo");
  var CheckedContent="";
  if(theStatus == '1')
  {
    CheckedContent="<div style='width: 600px; font-family: Verdana, sans-serif; font-size: 10px; font-weight: bold; color: white; background-color: #aaaacc; padding-left: 5px; padding-top: 3px; padding-bottom: 3px; padding-right: 5px;'>Diese Informationen sind Teil des geprüften Konzernabschlusses 2005/06:</div>";
  }
  parent.mainFrame.changeContent("check", CheckedContent);
}

function setSuchtext() {
	var Suchtext = parent.queryFrame.getSuchtext();
	if(Suchtext != ''){
		Suchtext = "\'"+Suchtext+"\' ";
		changeContent("suchbegriff", Suchtext );
	}
}

function getHistory() {
	var theHistoryHTML=parent.hiddenFrame.getHistory();
	changeContent("theHistory", theHistoryHTML);
}

function add2History(thePage, theLink) {
  parent.hiddenFrame.add2History(thePage, theLink);
}


 
