//This is the master JavaScript file for the HTML Help documentation.
/* ---------------------------------------------------------------------
 * Aenderungsdatum: 20090226:1335
 * ---------------------------------------------------------------------
 */

/* These functions (doSection, noSection) are used to make sidebars appear and disappear.
*/

var ctBottom = 0;
var ctLeft   = 115;
var ctRight  = 80;
var ctTop = 165;

function openPopup(width, height, url)
{
	window.open(url, 'popup', 'height=' + height + ',width=' + width + ',status=no,toolbar=no,menubar=no,location=no');
}

function initMouseDown() 
{
  if (window.Event) 
  {
    document.captureEvents(Event.MOUSEDOWN);
  }
  document.onmousedown = getMousePosition;
}

function getMousePosition(e)
{
  mouseX = (isNav) ? e.pageX : event.clientX + document.body.scrollLeft;
  mouseY = (isNav) ? e.pageY : event.clientY + document.body.scrollTop;
}

function calcXPosition(mouseX, objectWidth, bodyWidth)
{
    var xPosition;

    if( (parseInt(mouseX)+parseInt(objectWidth)) > parseInt(bodyWidth) )
    {
        if((parseInt(mouseX)-parseInt(objectWidth))>0)
            xPosition=parseInt(mouseX)-parseInt(objectWidth);
        else
        {
            var xDiff=(parseInt(mouseX)+parseInt(objectWidth))-parseInt(bodyWidth);
            if(parseInt(xDiff)<parseInt(mouseX))
                xPosition=parseInt(mouseX)-parseInt(xDiff)-15;
            else
            {
                xPosition=50;
                document.getElementsByTagName("body").item(0).setAttribute("scroll","yes");
            }
        }
    }
    else
        xPosition=parseInt(mouseX);

    return xPosition;
}

function calcYPosition(mouseY, objectHeight, bodyHeight)
{
    var yPosition;

    if( (parseInt(mouseY)+parseInt(objectHeight)) > parseInt(bodyHeight) )
    {
        if((parseInt(mouseY)-parseInt(objectHeight))>0)
            yPosition=parseInt(mouseY)-parseInt(objectHeight);
        else
        {
            var yDiff=(parseInt(mouseY)+parseInt(objectHeight))-parseInt(bodyHeight);
            if(parseInt(yDiff)<parseInt(mouseY))
                yPosition=parseInt(mouseY)-parseInt(yDiff)-15;
            else
            {
                yPosition=50;
                document.getElementsByTagName("body").item(0).setAttribute("scroll","yes");
            }
        }
    }
    else
        yPosition=parseInt(mouseY);

    return yPosition;
}

function openPopupDiv(file, width, height)
{
	var popup = document.getElementById("popup");

    //get body dimension
    var bodyWidth;
    var bodyHeight;
    if(navigator.userAgent.indexOf("Firefox")==-1)
    {
        bodyWidth=document.getElementsByTagName("body").item(0).offsetWidth;
        bodyHeight=document.getElementsByTagName("body").item(0).offsetHeight;
    }
    else
    {
        bodyWidth=window.innerWidth;
        bodyHeight=window.innerHeight;
    }

    //set x position
    popup.style.left = parseInt(calcXPosition(mouseX,width,bodyWidth));

    //set y position
    popup.style.top = parseInt(calcYPosition(mouseY,height,bodyHeight));

    popup.style.width = width;
	popup.style.height = height;
	popup.innerHTML = "<iframe style='width: " + (width-3) + "px; height: " + (height-3) + "px' src='" + file + "'></iframe>";
	popup.style.display = "block";
}

function closePopupDiv()
{
	var popup = document.getElementById("popup");
	popup.style.display = "none";
    document.getElementsByTagName("body").item(0).setAttribute("scroll","no");
}

function doSection (secNum)
{
	//display the section if it's not displayed; hide it if it is displayed
	if (secNum.style.display=="none")
    {
        secNum.style.display=""
    }
	else{secNum.style.display="none"}
}

function noSection (secNum)
{
	//remove the section when user clicks in the opened DIV
	if (secNum.style.display=="")
    {
        secNum.style.display="none"
    }
}

//used only in JAVA projects
function expandDivsAndSpans_javaVersion()
{
    for (i=1; i<document.all.length; i++)
    {
        if(document.all(i).tagName=="DIV" && document.all(i).id.indexOf("exp")!=-1)
        {
            var innerText=document.all(i).innerHTML;
            if(innerText.indexOf("marker")!=-1)
            {
                if(document.all(i).style.display=="none")
                {
                    var idDiv = document.all(i).id;
                    var idArrow = idDiv.replace("exp","ar");
                        doExpand(idDiv,idArrow);
                }
            }
        }
        else if(document.all(i).tagName=="SPAN" && document.all(i).id.indexOf("exp")!=-1)
        {
            var argstr = location.search.substring(1, location.search.length);
            if(argstr!=null && argstr.length!=0)
            {
                if(argstr.indexOf("|")!=-1)
                {
                    var args = argstr.split('|');
                    for(var j=0;j<args.length;j++)
                    {
                                examinNode(document.all(i),args[j],false);
                    }
                }
                else
                            examinNode(document.all(i),argstr,false);
            }

            var innerText=document.all(i).innerHTML;
            if(innerText.indexOf("marker")!=-1)
            {
                   if(document.all(i).style.display=="none")
                   document.all(i).style.display="inline";
            }
        }
    }
}

//used only in CHM project
function collapsDivsAndSpans_chmVersion()
{
	var depth = 0;
	for (i=1; i<document.all.length; i++)
	{
		if (document.all(i-1).contains(document.all(i))==true)
			depth = depth + 1;
		else
		{
			var elParent = document.all(i-1).parentElement;
			for ( ; depth>0; depth--)
			{
				if (elParent.contains(document.all(i))==true)
					break;
				elParent = elParent.parentElement;
			}
		}
		if((document.all(i).tagName=="DIV" || document.all(i).tagName=="SPAN") && document.all(i).id.indexOf("exp")!=-1)
			document.all(i).style.display="none";
	}
}

//used only in CHM project
function expandDivsAndSpans_chmVersion()
{
	var depth = 0;
	for (i=1; i<document.all.length; i++)
	{
		if (document.all(i-1).contains(document.all(i))==true)
			depth = depth + 1;
		else
		{
			var elParent = document.all(i-1).parentElement;
			for ( ; depth>0; depth--)
			{
				if (elParent.contains(document.all(i))==true)
					break;
				elParent = elParent.parentElement;
			}
		}
		if(document.all(i).tagName=="DIV" && document.all(i).id.indexOf("exp")!=-1)
		{
			var innerText=document.all(i).innerHTML;
			if(innerText.indexOf("FONT")!=-1)
            {
                var idDiv = document.all(i).id;
                var idArrow = idDiv.replace("exp","ar");
                    doExpand(idDiv,idArrow);
            }
        }
		else if(document.all(i).tagName=="SPAN" && document.all(i).id.indexOf("exp")!=-1)
		{
			var innerText=document.all(i).innerHTML;
			if(innerText.indexOf("FONT")!=-1)
				document.all(i).style.display="inline";
		}
	}
}

function doExpand(id,arrowNum)
{
    if (arrowNum=='inline')
    {
		if (document.all)
        {
			if(document.all[id].style.display=='none')
            {
				document.all[id].style.display='inline';
			}
			else
            {
				document.all[id].style.display='none';
			}
			//event.cancelBubble = true;
			return false;
		}
		else if (document.getElementById)
        {
			if(document.getElementById(id).style.display=='none')
            {
				document.getElementById(id).style.display='inline';
			}
			else
            {
				document.getElementById(id).style.display ='none';
			}
			//event.cancelBubble = true;
			return false;
		}
	}
	else
    {
		if (document.all)
        {
			if(document.all[id].style.display=='none')
            {
				document.all[id].style.display='';
				document.all[arrowNum].src="arrowdn.gif"
			}
			else
            {
				document.all[id].style.display='none';
				document.all[arrowNum].src="arrowrt.gif"
			}
			//event.cancelBubble = true;
			return false;
		}
		else if (document.getElementById)
        {
			if(document.getElementById(id).style.display=='none')
            {
				document.getElementById(id).style.display='block';
				document.getElementById(arrowNum).src="arrowdn.gif"
			}
			else
            {
				document.getElementById(id).style.display ='none';
				document.getElementById(arrowNum).src="arrowrt.gif"
			}
			//event.cancelBubble = true;
			return false;
		}
	}
}

function doExpandGrafik(id,arrowNum)
{
	if (document.all)
    {
        if(document.all[id].style.display=='none')
        {
            document.all[id].style.display='';
            document.all[arrowNum].src="GrafikVerbergen.gif"
        }
        else
        {
            document.all[id].style.display='none';
            document.all[arrowNum].src="GrafikAnzeigen.gif"
        }
        event.cancelBubble = true;
        return false;
    }
    else if (document.getElementById)
    {
        if(document.getElementById(id).style.display=='none')
        {
            document.getElementById(id).style.display='block';
            document.getElementById(arrowNum).src="GrafikVerbergen.gif"
        }
        else
        {
            document.getElementById(id).style.display ='none';
            document.getElementById(arrowNum).src="GrafikAnzeigen.gif"
        }
        //event.cancelBubble = true;
        return false;
    }
 }


//OpenAdress() sucht einen Anker in einer Html Datei und schaltet
//den umgebenden Abschnitt sichtbar
//Wenn der Anker nicht in der Datei steht, wird Textausgabe aufgerufen

function OpenAdress()
{
	Abschnitt=location.hash.slice(1);
	if (Abschnitt == "")
	{
		document.write("<H1><font color=#313680 size=5>" +document.title,"</font></H1>");
		document.write("<p>Dies ist nur ein Dummy-Text, der in keiner Hilfe erscheint. Den eigentliche Text der Fehlerhilfe, also der Inhalt der Datei <b>Fehler.doc</b>, können Sie nur über den API-Test im HTML-Workshop prüfen.</p>");
	}
	else
	{
		n=document.anchors.length;
		for(i = 0; i < n; i++)
		{
			if(document.anchors[i].name == Abschnitt)
			{
				document.all.tags("div")[i].style.display="";
				break;
			}
			if(i+1 == n)
			{
				Textausgabe(Abschnitt);
			}
		}
	}
}


//Textausgabe druckt die fehlende Zielanker-ID (=Abschnitt)
// in eine Html-Datei

function Textausgabe(Abschnitt)
{
	document.write("<H1><font color=#313680 size=5>Zu diesem Thema steht Ihnen keine Hilfe zur Verfügung</font></h1>");
	document.write("<P>Bitte benachrichtigen Sie unsere QS-Abteilung unter Angabe der ID " +Abschnitt,".</p>");
	document.write('<a href="mailto:support@dokay.de?subject=Online-Anbindung!">Mail an die dokay GmbH</a>');
}

//These functions control the behavior of the homepage go arrows.
function liteGo(spNo)
{
	spNo.style.background="#cc0033";
	spNo.style.color="#FFFFFF";
}

function liteOff(spNo)
{
	spNo.style.background="transparent";
	spNo.style.color="#000000";
}

//Diese Funktion initialisiert die Anzeige im Kopfframe

function INI(dummy)
{
	spYes=dummy;
	spYes.style.fontSize="10pt";
	spYes.style.color="#0000AF";
}

//Diese Funktion markiert den angeklickten Link im Kopfframe
//und hebt die Markierung des zuletzt angeklickten Links auf

function liteOnOff(spNo)
{
	spYes.style.fontSize="7pt";
	spYes.style.color="#000000";
	//spYes.style.background="transparent";
	spNo.style.fontSize="10pt";
	spNo.style.color="#0000AF";
	//spNo.style.background="#DEAFE5";
	spYes=spNo;
}

function INIback(dummy)
{
	//senkrecht();                        //Aufruf der Funktion, wenn senkrechte Ausrichtung der Links im Kopfteil gewünscht ist
	ID=dummy;
	document.all.tags("table")[0].background="dimmed.gif";
	ID.background="background.gif";
}



function senkrecht()
{      	//aktiviert die senkrechte Ausrichtung der Links im Kopfteil

	var i=0;          	//Laufvariable=Anzahl der Tabellenzellen
	Zwischenergebnis="";	//speichert die gesamte sekrechte Tabelle als String
	EndTag="</td></tr>";

	while(i < document.all.tags("td").length)
    {

	    Go="go";		//Erzeugt Anfangstag: Tabellenzeile und -zelle
	    Go=Go.concat(i+1);
	    EndParticle=Go.concat('">');
	    StartParticle='<tr class="Kopf"><td ID="';
	    StartTag=StartParticle.concat(EndParticle);

	    Zusatz=document.all.tags("td")[i].innerHTML;	//liest für jede Zelle alles zwischen <td></td>
	    Zwischenergebnis=Zwischenergebnis.concat(StartTag);	//Neuer Anfangstag <tr class... mit
	    Zwischenergebnis=Zwischenergebnis.concat(Zusatz);	//dem Inhalt der alten Zelle
	    Zwischenergebnis=Zwischenergebnis.concat(EndTag);	//und neuem Tag am Ende </td></tr>
	    i = i + 1;						//nächste Tabellenzelle
    }
	TabelleStart='<table>';
	TabelleEnde="</table>";
	Zwischenergebnis=TabelleStart.concat(Zwischenergebnis);
	Zwischenergebnis=Zwischenergebnis.concat(TabelleEnde);	//Schreibt die neue Tabelle zwischen Table Tags
	document.all.tags("div")[0].innerHTML="";		//löscht die alte Tabelle komplett
	document.all.tags("div")[0].insertAdjacentHTML("AfterBegin",Zwischenergebnis);	//setzt die neue Tabelle komplett ein
}


function background(spBild)
{
	spImg.background="transparent";
	spBild.background="background.gif";
	spImg=spBild;
}

//Glossarfenster für Intranet und Internet erzeugen (IE und NC 6.2)

var version4 = (navigator.appVersion.charAt(0) >= "4");
var popupHandle;
function closePopup()
{
    if(popupHandle != null && !popupHandle.closed)
        popupHandle.close()
}


function displayPopup(position,url,name,height,width,evnt)
{
// position=1 POPUP: makes screen display up and/or left,
//    down and/or right
// depending on where cursor falls and size of window to open
// position=2 CENTER: makes screen fall in center


  var properties = "toolbar=0,location=0,height="+height
  properties = properties+",width="+width

  var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt

  if(navigator.appName == "Microsoft Internet Explorer")
  {
    screenY = document.body.offsetHeight
    screenX = window.screen.availWidth
  }
  else
  {
    //Navigator coordinates
    //screenY = window.outerHeight
    //screenX = window.outerWidth
    //change made 3/16/01 to work with Netscape:
    screenY = screen.height;
    screenX = screen.width;
  }

  if(position == 1)
  {    // if POPUP not CENTER
    cursorX = evnt.screenX
    cursorY = evnt.screenY
    padAmtX = 10
    padAmtY = 10

    if((cursorY + height + padAmtY) > screenY)
    {
      // make sizes a negative number to move left/up
      padAmtY = (-30) + (height*-1);

      // if up or to left, make 30 as padding amount
    }

    if((cursorX + width + padAmtX) > screenX)
    {
      padAmtX = (-30) + (width*-1);
      // if up or to left, make 30 as padding amount
    }

    if(navigator.appName == "Microsoft Internet Explorer")
    {
      leftprop = cursorX + padAmtX
      topprop = cursorY + padAmtY
    }
    else
    { // adjust Netscape coordinates for scrolling
      leftprop = (cursorX - pageXOffset + padAmtX)
      topprop = (cursorY - pageYOffset + padAmtY)
    }
  }
  else
  {	// CENTER
    leftvar = (screenX - width) / 2
    rightvar = (screenY - height) / 2

    if(navigator.appName == "Microsoft Internet Explorer")
    {
      leftprop = leftvar
      topprop = rightvar
    }
    else
    { // adjust Netscape coordinates for scrolling
      leftprop = (leftvar - pageXOffset)
      topprop = (rightvar - pageYOffset)
    }
  }

  if(evnt != null)
  {
    properties = properties+",left="+leftprop
    properties = properties+",top="+topprop
  }

  closePopup()
  popupHandle = open(url,name,properties)
}



//Browserweiche
if (navigator.userAgent.indexOf("Netscape6") >= 0)
{
  document.write('<STYLE>@import url(StyleNC.css);</STYLE>');
}

else if (navigator.userAgent.indexOf("Netscape/7") >= 0)
{
  document.write('<STYLE>@import url(StyleNC.css);</STYLE>');
}

else if (navigator.userAgent.indexOf("MSIE") != -1)
{
  document.write('<STYLE>@import url(StyleIE.css);</STYLE>');
}

else if (navigator.userAgent.indexOf("Mozilla") != -1)
{
  document.write('<STYLE>@import url(StyleNC.css);</STYLE>');
}


//Header-Bereich zur Non-Scrolling-Area erklären

window.onload = resizeNSRwindow;
window.onresize= resizeNSRwindow;
window.onbeforeprint= set_to_print;
window.onafterprint= reset_form;

function resizeNSRwindow()
{
  if(document.layers)
  {
    //NN 4
    NN4_Resize(true);
  }


  initMouseDown();

  //use in CHM project, otherwise comment
  //collapsDivsAndSpans_chmVersion();
  //expandDivsAndSpans_chmVersion();

  //use in JAVA project, otherwise comment
  //expandDivsAndSpans_javaVersion();
}


function Layer()
{
	document.write("<div style='background-image: url(Layer.js)'>");
}


function NN4_Resize(firstTime)
{
    var mainFrame = document.layers.allCt;
    var header    = document.layers.nsr;
    var content   = document.layers.text;

    var fWidth  = 0;
    var fHeight = 0;
    var hWidth  = 0;
    var hHeight = 0;
    var cWidth  = 0;
    var cHeight = 0;

    if (firstTime)
    {
        fWidth  = window.innerWidth - 26;
        fHeight = window.innerHeight - 26;
        cWidth  = fWidth - (parseInt(ctLeft)+parseInt(ctRight));
        cHeight = fHeight - ctTop;
        hWidth  = fWidth - 30;
    }
    else
    {
        fWidth  = window.innerWidth - 116;
        fHeight = window.innerHeight - 26;
        cWidth  = fWidth - ctRight;
        cHeight = fHeight - 100;
        hWidth  = fWidth;
    }

    mainFrame.style.width  = fWidth;
    mainFrame.style.height = fHeight;

    if(cWidth>=0)
    {
      content.style.width = cWidth;
    }
    else
    {
      content.style.width = 0;
    }
    if(cHeight>=0)
    {
      content.style.height = cHeight;
    }
    else
    {
      content.style.height = 0;
    }

    header.style.width     = hWidth;

    if (firstTime)
    	setTimeout("NN4_Resize(false)",1);

    mainFrame = document.layers.allCt;
    header    = document.layers.nsr;
    content   = document.layers.text;
}

function NN6_Resize(firstTime)
{
    var mainFrame = document.getElementById("allCt");
    var header    = document.getElementById("nsr");
    var content   = document.getElementById("text");

    var fWidth  = 0;
    var fHeight = 0;
    var hWidth  = 0;
    var hHeight = 0;
    var cWidth  = 0;
    var cHeight = 0;

    if (firstTime)
    {
        fWidth  = window.innerWidth - 26;
        fHeight = window.innerHeight - 26;
        cWidth  = fWidth - (parseInt(ctLeft)+parseInt(ctRight));
        cHeight = fHeight - ctTop;
        hWidth  = fWidth - 30;
    }
    else
    {
        fWidth  = window.innerWidth - 4;
        fHeight = window.innerHeight - 4;
        cWidth  = fWidth - (parseInt(ctLeft)+parseInt(ctRight));
        cHeight = fHeight - ctTop;
        hWidth  = fWidth - 30;
    }

    mainFrame.style.width  = fWidth;
    mainFrame.style.height = fHeight;

    if(cWidth>=0)
    {
     content.style.width = cWidth;
    }
    else
    {
     content.style.width = 0;
    }
    if(cHeight>=0)
    {
     content.style.height = cHeight;
    }
    else
    {
     content.style.height = 0;
    }

    header.style.width     = hWidth;

    if (firstTime)
        setTimeout("NN6_Resize(false)",1);
}

function IE_Resize()
{
    var mainFrame = document.all.item("allCt");
    var header    = document.all.item("nsr");
    var content   = document.all.item("text");

    var fWidth  = 0;
    var fHeight = 0;
    var hWidth  = 0;
    var hHeight = 0;
    var cWidth  = 0;
    var cHeight = 0;

    fWidth  = document.body.offsetWidth;
    fHeight = document.body.offsetHeight;
    cWidth  = fWidth - 5;
    cHeight = fHeight - (ctTop + 5);
    hWidth  = fWidth;

    //mainFrame.style.width  = fWidth;
    //mainFrame.style.height = fHeight;
    content.style.top = ctTop;
    if(cWidth>=0)
    {
     content.style.width = cWidth;
    }
    else
    {
     content.style.width = 0;
    }
    if(cHeight>=0)
    {
     content.style.height = cHeight;
    }
    else
    {
     content.style.height = 0;
    }
    header.style.width     = hWidth;
}


/*function actualResize() {
  var fWidth  = 0;
  var fHeight = 0;
  var hWidth  = 0;
  var hHeight = 0;
  var cWidth  = 0;
  var cHeight = 0;

  var mainFrame = null;
  var header    = null;
  var content   = null;

  if(document.layers){
    //NN 4
    mainFrame = document.layers.allCt;
    header    = document.layers.nsr;
    content   = document.layers.text;

    fWidth  = window.innerWidth - 116;
    fHeight = window.innerHeight - 26;
    cWidth  = fWidth - ctRight;
    cHeight = fHeight - 100;
    hWidth  = fWidth;
  }

  if(document.all){
    //IE browser
    mainFrame = document.all.item("allCt");
    header    = document.all.item("nsr");
    content   = document.all.item("text");

    fWidth  = document.body.offsetWidth;
    fHeight = document.body.offsetHeight;
    cWidth  = fWidth - 5;
    cHeight = fHeight - (ctTop + 5);
    hWidth  = fWidth;
  }

  if(!document.all && document.getElementById){
    //NN 6
    mainFrame = document.getElementById("allCt");
    header    = document.getElementById("nsr");
    content   = document.getElementById("text");

    fWidth  = window.innerWidth - 4;
    fHeight = window.innerHeight - 4;
    cWidth  = fWidth - (ctLeft+ctRight);
    cHeight = fHeight - ctTop;
    hWidth  = fWidth - 30;
  }


  mainFrame.style.width  = fWidth;
  mainFrame.style.height = fHeight;

  if(cWidth>=0) {
   content.style.width = cWidth;
  } else {
   content.style.width = 0;
  }
  if(cHeight >=0) {
   content.style.height = cHeight;
  } else {
   content.style.height = 0;
 }

  header.style.width     = hWidth;

}*/

function set_to_print(){
 var i;
 if (window.text)document.all.text.style.height = "auto";
 for (i=0; i < document.all.length; i++){
  if (document.all[i].tagName == "BODY") {
   document.all[i].scroll = "auto";
   }
  if (document.all[i].tagName == "A") {
   document.all[i].outerHTML = "<A HREF=''>" + document.all[i].innerHTML + "</a>";
   }
  }
  document.all.text.style.overflow= "visible";
}

//********** set for display ************

function reset_form(){
  document.location.reload();
}


//Mit Vorschau-Grafiken arbeiten
function openWin( winHeight, winWidth, picSrc ){
    newWin = window.open('', '', 'height='+ winHeight + ',width='+ winWidth + 'toolbars=no, scrollbars=yes' );
    newWin.document.write("<head><title>"+ picSrc +"</title></head>");
    newWin.document.write("<p align=center>");
    newWin.document.write("<img src=" + picSrc + ">");            newWin.document.write("<br><br><form><input type='button' value='Schließen' onclick='JavaScript:window.close()'>");
    newWin.document.write("</form></p>");
}

// Popups mit Mouseover aus Fußnote ableiten
if (document.layers) {navigator.family = "nn4"}
if (document.all) {navigator.family = "ie4"}
if (window.navigator.userAgent.toLowerCase().match("gecko")) {navigator.family = "gecko"}

overdiv="0";
function popLayer(a)
{
    if(!descarray[a])
    {
        descarray[a]="<font color=red>This popup (#"+a+") isn't setup correctly - needs description</font>";
    }
    if (navigator.family == "gecko")
    {
        pad="0"; bord="1 bordercolor=black";
    }
    else
    {
        pad="1"; bord="0";
    }
    desc = 	  "<table cellspacing=0 cellpadding="+pad+" border="+bord+"><tr><td>\n"
        +"<table cellspacing=0 cellpadding=3 border=0 width=100%><tr><td><font size=-1>\n"
        +descarray[a]
        +"\n</td></tr></table>\n"
        +"</td></tr></table>";

    //get body dimension
    var bodyWidth;
    var bodyHeight;
    if(navigator.userAgent.indexOf("Firefox")==-1)
    {
        bodyWidth=document.getElementsByTagName("body").item(0).offsetWidth;
        bodyHeight=document.getElementsByTagName("body").item(0).offsetHeight;
    }
    else
    {
        bodyWidth=window.innerWidth;
        bodyHeight=window.innerHeight;
    }

    if(navigator.family =="nn4")
    {
        document.object1.document.write(desc);
        document.object1.document.close();

        document.object1.left=x+15;
        document.object1.top=y-5;
    }
    else if(navigator.family =="ie4")
    {
        document.getElementById("object1").innerHTML=desc;

        var objectWidth=document.getElementById("object1").offsetWidth;
        var xPosition=calcXPosition(x, objectWidth, bodyWidth);
        var objectHeight=document.getElementById("object1").offsetHeight;
        var yPosition=calcYPosition(y, objectHeight, bodyHeight);

        document.getElementById("object1").style.left=parseInt(xPosition);
        document.getElementById("object1").style.top=parseInt(yPosition)+10;

//        document.getElementById("object1").style.left=x+15;
//        document.getElementById("object1").style.top=y+145;
    }
    else if(navigator.family =="gecko")//mozilla
    {
        document.getElementById("object1").innerHTML=desc;

        var objectWidth=document.getElementById("object1").offsetWidth;
        var xPosition=calcXPosition(x, objectWidth, bodyWidth);
        var objectHeight=document.getElementById("object1").offsetHeight;
        var yPosition=calcYPosition(y, objectHeight, bodyHeight);

        document.getElementById("object1").style.left=parseInt(xPosition);
        document.getElementById("object1").style.top=parseInt(yPosition);

//        document.getElementById("object1").style.left=x+15;
//        document.getElementById("object1").style.top=y-5;
    }
}

function hideLayer()
{
    document.getElementsByTagName("body").item(0).setAttribute("scroll","no");
    if (overdiv == "0")
    {
        if(navigator.family =="nn4")
            eval(document.object1.top="-500");
        else if(navigator.family =="ie4")
            object1.innerHTML="";
        else if(navigator.family =="gecko")
        {
            document.getElementById("object1").innerHTML="";
            //document.getElementById("object1").style.top="-500";
        }
    }
}

var isNav = (navigator.appName.indexOf("Netscape") !=-1);
function handlerMM(e)
{
    x = (isNav) ? e.pageX : event.clientX + document.body.scrollLeft;
    y = (isNav) ? e.pageY : event.clientY + document.body.scrollTop;
}

if (isNav){document.captureEvents(Event.MOUSEMOVE);}
document.onmousemove = handlerMM;



// Interpretiert Eintrag in HTML-Dateien zur korrekten Darstellung von Intranet-Dokumentataionen

function selektionAktualisieren_php (str) {
		Framename = 'frmControl';
		str2 = str.substring(0, str.lastIndexOf("."));
		url = 'php_menue.php?sync=' + str2;
		//alert ();
		//if (typeof (parent[Framename].location.href) != "undefined")
		try	{
			parent[Framename].location.href = url;
			}
		catch(e)
		{
		//alert ("xxx");
		}
} 


//===========================================================================================================

/* ---------------------------------------------------------------
 * Erweitert für WEB-OH70
 * Letze Aenderung: 20080201:2200
 * ---------------------------------------------------------------
 */
 
/* ---------------------------------------------------
 *  Variablen fuer Images
 * --------------------------------------------------- 
 */
var VICONDATA  = "js_m1.gif";
var VICONCLOSE = "js_m2.gif";
var VICONOPEN  = "js_m3.gif";

function selektionAktualisieren_js (str) {
	
  try {
	  var nodeId = top.frmCtlData.document.getElementById('toc');
  } catch (e) { }
	
  try {
		// TOC-Baum prüfen
		var nodeId = top.frmCtlData.document.getElementById('toc');
		var spanTag = nodeId.getElementsByTagName('span');

		for(var i = 0; i < spanTag.length; i++) {
			var ergebnis = spanTag[i].lastChild.href.search(str);
			if (ergebnis != -1) {
				// Markierung setzen
				spanTag[i].className = "mark5";
				// immer den letzten Eintrag markieren
				if (i != 0) {
					spanTag[i-1].className = "markNull";
				}
				
				// div-Container öffnen
				var divObjekt = spanTag[i];
				openClosedDivTags(divObjekt);

			} else {
				spanTag[i].className = "markNull";
			} 
		}

		// Highlighten der Suchwoerter
		f_mark();

	} catch (e) {
		return;
	}
  return;
} 

function openClosedDivTags(obj) {
	
	// Ausstieg falls Anfang der DIV-Tags errreicht ist
	if (obj.parentNode.id == "text") {
	 return; 
	}
	
	if (obj.parentNode.className == "closed") {
		// div-Tag öffnen
		obj.parentNode.className = "open";
		// images setzen - image hat die gleiche Id wie div-Tag
		var imgId = obj.parentNode.id;
		imgId = imgId.replace("div", "img");
		var imgTag = top.frmCtlData.document.getElementById(imgId);
		imgTag.src = VICONOPEN;
		
		// rekursiver Aufruf
		openClosedDivTags(obj.parentNode);
	} else {
		// rekursiver Aufruf
		openClosedDivTags(obj.parentNode);
	}
	return;
}

function f_mark() {
	
	var value = "";
	var color = 0;
	var quote = false;
	
  try {
    // Browserunterscheidung
    if (checkbrowsertypName('firefox') || checkbrowsertypName('opera')) {
  	  var str = top.frames['frmControl'].document.forms['suchexml'].q.value;
    }
    else if (checkbrowsertypName('MSIE')) {
      var str = top.frmControl.suchexml.q.value;
		}
  } catch (e) {
    return;
  }
  
  if(str.indexOf("\"") >= 0) {
    // "scharfe Suche" - alle Anfuehrungszeichen ersetzen
    str = str.replace(/\"/g, "");
    quote = true;
  } else {
		quote = false;
  }

	// Pluszeichen entfernen
	str = str.replace(/\+/g, " ");
  str = trimWhitespace(str);
  var suchwerte = str.split(" ");
	
 	var contentText = top.frmTopic.document.getElementById('text');
  var contentP = contentText.getElementsByTagName('p');  
  var contentB = contentText.getElementsByTagName('b');
  var contentA = contentText.getElementsByTagName('a');
  var contentDiv = contentText.getElementsByTagName('div');
  
  var contentNsr = top.frmTopic.document.getElementById('nsr');
  var contentNsrA = contentNsr.getElementsByTagName('a');
	var contentNsrH1 = contentNsr.getElementsByTagName('H1');
  var contentNsrH2 = contentNsr.getElementsByTagName('H2');
	var contentNsrH3 = contentNsr.getElementsByTagName('H3');
	var contentNsrH4 = contentNsr.getElementsByTagName('H4');
	var contentNsrH5 = contentNsr.getElementsByTagName('H5');
	var contentNsrH6 = contentNsr.getElementsByTagName('H6');
  
	for (var i = 0; i < suchwerte.length; i++) {
		// Suchwort speichern
  	value = suchwerte[i];
  	
  	// hier wird die maximale Styleanzeige fürs Markieren auf 4 gesetzt 
  	if (i <= 3) { 
  	  color = i;
  	} else {
  	  color = 99;
  	}
  	
	  // Alten Inhalt auslesen
	  var v_content = top.frmTopic.document.getElementById('text');
    var v_old = v_content.innerHTML;
  	
	  // Erstmal evtl. vorhandene alte Markierungen entfernen
	  var v_pattern = new RegExp('<span class="mark' + color + '">([^<]*)</span>', 'gi');
	  var v_new = v_old.replace(v_pattern, '$1');
  	
	  if (value != '') {
			// Scharfe Suche definieren
			if (quote) {
				v_pattern  = new RegExp('(\\W)(' + value + ')(\\W)', 'gi');
			} else {
				v_pattern  = new RegExp('(' + value + ')', 'gi');
			}
	    
	    /* ----------------------------------------------------------------------------------------
	     *  In allen nsr-A-Tags nach Suchwoertern suchen und die gefundenen Woerter markieren
	     * ----------------------------------------------------------------------------------------
	     */
	    highlightWords(contentNsrA, v_pattern, color, quote);
	    
	    /* ----------------------------------------------------------------------------------------
	     *  In allen nsr-H1-Tags nach Suchwoertern suchen und die gefundenen Woerter markieren
	     * ----------------------------------------------------------------------------------------
	     */
	    highlightWords(contentNsrH1, v_pattern, color, quote);
			
			/* ----------------------------------------------------------------------------------------
	     *  In allen nsr-H2-Tags nach Suchwoertern suchen und die gefundenen Woerter markieren
	     * ----------------------------------------------------------------------------------------
	     */
	    highlightWords(contentNsrH2, v_pattern, color, quote);
	    
	    /* ----------------------------------------------------------------------------------------
	     *  In allen nsr-H3-Tags nach Suchwoertern suchen und die gefundenen Woerter markieren
	     * ----------------------------------------------------------------------------------------
	     */
	    highlightWords(contentNsrH3, v_pattern, color, quote);

			/* ----------------------------------------------------------------------------------------
	     *  In allen nsr-H4-Tags nach Suchwoertern suchen und die gefundenen Woerter markieren
	     * ----------------------------------------------------------------------------------------
	     */
	    highlightWords(contentNsrH4, v_pattern, color, quote);
		
			/* ----------------------------------------------------------------------------------------
	     *  In allen nsr-H5-Tags nach Suchwoertern suchen und die gefundenen Woerter markieren
	     * ----------------------------------------------------------------------------------------
	     */
	    highlightWords(contentNsrH5, v_pattern, color, quote);

			/* ----------------------------------------------------------------------------------------
	     *  In allen nsr-H6-Tags nach Suchwoertern suchen und die gefundenen Woerter markieren
	     * ----------------------------------------------------------------------------------------
	     */
	    highlightWords(contentNsrH6, v_pattern, color, quote);

	    /* ----------------------------------------------------------------------------------------
	     *  In allen P-Tags nach Suchwoertern suchen und die gefundenen Woerter markieren
	     * ----------------------------------------------------------------------------------------
	     */
      highlightWords(contentP, v_pattern, color, quote);

	    /* ----------------------------------------------------------------------------------------
	     *  In allen B-Tags nach Suchwoertern suchen und die gefundenen Woerter markieren
	     * ----------------------------------------------------------------------------------------
	     */
	    highlightWords(contentB, v_pattern, color, quote);

	    /* ----------------------------------------------------------------------------------------
	     *  In allen A-Tags nach Suchwoertern suchen und die gefundenen Woerter markieren
	     * ----------------------------------------------------------------------------------------
	     */
	    highlightWords(contentA, v_pattern, color, quote);

	    /* ----------------------------------------------------------------------------------------
	     *  In geschlossenen DIV-Tags nach Suchwoertern suchen und die Bereiche öffnen
	     * ----------------------------------------------------------------------------------------
	     */
	    for (var p = 0; p < contentDiv.length; p++) {
        if (contentDiv[p].className == "exparaAuf" && contentDiv[p].innerHTML.toLowerCase().search(value.toLowerCase()) != -1) {
          contentDiv[p].style.display = "block";
        }
      }
      
	  } // if
	} // for
}

function highlightWords(contentTags, v_pattern, color, m_quote) {

	var v_new = "";
	var ergebnis = "";
	
	// Styledatei auslesen
	var stylesheet = top.frmCtlData.document.getElementsByTagName('link')[0].href;

  for (var i = 0; i < contentTags.length; i++) {
		
		// ! Leerzeichen wichtig, da am Ende eines Satzes keine Markierung erfolgen kann
    v_new = contentTags[i].innerHTML + " ";
    
    // auf Images pruefen
    ergebnis = v_new.toLowerCase().search("<img");
    // kein Treffer (es ist kein Image-Tag)
    if (ergebnis == -1) {
      if(m_quote) {
        // nur ganze Woerter markieren
        v_new = v_new.replace(v_pattern, '$1<span class="mark' + color + '">$2</span><link rel="stylesheet" type="text/css" href="' + stylesheet + '">$3');
      } else {
        // nur Wortteile markieren
        v_new = v_new.replace(v_pattern, '<span class="mark' + color + '">$1</span><link rel="stylesheet" type="text/css" href="' + stylesheet + '">');
      }
      contentTags[i].innerHTML = v_new;
    }
  } 
  
  return contentTags;
}


function checkbrowsertypName(name) {
  var agent = navigator.userAgent.toLowerCase();
  if (agent.indexOf(name.toLowerCase())>-1) {
    return true;
  }  
  return false;
}

function trimWhitespace(string) {
/*
 * Diese Funktion entfernt überzählige Leerzeichen am Anfang, Ende
 * oder auch innerhalb einer Zeichenkette.
 */

  var tmp = "";
  var stringLength = string.length;

  for (var i = 0; i < string.length; i++) {
    if ((string.charAt(i) != ' ') && (string.charAt(i) != '+')) {
      tmp += string.charAt(i);
    } 
    else {
      if (tmp.length > 0) {
        if ( (string.charAt(i+1) != ' ') && (string.charAt(i) != '+') && (i != string.length-1) ) {
          tmp += string.charAt(i);
        }
      }
    }
  }
  return tmp;
}


//= END ==========================================================================================================

// Interpretiert Eintrag in HTML-Dateien zur korrekten Darstellung von Intranet-Dokumentataionen
function selektionAktualisieren(str) {
  try {
    var varFrame = top.frames.frmControl;
    if (varFrame) {
      var element = varFrame.document.getElementById('geladen');
      if (element) {
        var verz = varFrame.document.getElementById('verzeichnis');
        if (verz) {
          if (verz.isActive()) {
            verz.setSelection(str);
          } else {
            setTimeout("selektionAktualisieren('"+str+"')", 100);
          }
        } else {
          alert('Applet element nicht gefunden !!');
        }
      }
    }
  } catch (e) {}

   //Auslesen der Begriffe
   var argstr = location.search.substring(1, location.search.length);
   var args = argstr.split('|');
   for(var i=0;i<args.length;i++)
   {
     if (args[i] != "")
     {
         if(args[i].indexOf(":") != -1)
         {
             var arg=args[i].split(':');
             examinNode(document.getElementsByTagName("body")[0], arg[0], false);
         }
         else
             examinNode(document.getElementsByTagName("body")[0], args[i], false);
     }
   }
}

function examinNode(knoten, argum, oneChar)
{
  var nodes = knoten.childNodes.length;
  for (var i = 0; i < nodes; i++)
  {
    if (knoten.childNodes[i].data!=null)
    {
      //alert(knoten.childNodes[i].data);

      var nodeText = knoten.childNodes[i].data;
      var isdigit = false;

      if((argum.substring(0,1)>= '0') && (argum.substring(0,1)<='9') &&
         (argum.substring(argum.length-1, argum.length) >= '0')&&
         (argum.substring(argum.length-1, argum.length) <= '9'))
      {
        isdigit = true;
      }
      if (nodeText.length!=0)
      {
        if((argum.length == 1)&&(argum.charCodeAt(0)<10000)&&(isdigit != true))
        {
           argum= " " + argum;
           var suche=new RegExp(argum, "gi");
           oneChar = true;
        }
        else
        {
           var suche=new RegExp(argum, "gi");
        }
        var enthaelt=nodeText.search(suche);
        if (enthaelt!=-1)
        {
          if(argum.charCodeAt(0)>10000)
               match = true;
          var s1 = nodeText.substring(enthaelt+argum.length, enthaelt+argum.length+1);
          if (s1 == "" || s1 == " " || s1 == "." || s1 == "," || s1 == "!" || s1 == "?" || s1 == ":" || s1== "\"" || s1 == ";" || s1 == ")" || s1 == "%")
          {
            var match = false;
            if(enthaelt == 0)
            {
            	match = true;
            }
            else if(oneChar != true)
            {
              var s2 = nodeText.substring(enthaelt-1, enthaelt);
              if (s2 == "" || s2 == " " || s2 == "." || s2 == "," || s2 == "!" || s2 == "?" || s2 == ":" || s2== "\"" || s2 == "/"|| s2 == ";" || s2 == "(")
              {
                match = true;
              }
            }
            else
            {
            	match = true;
            }
            if ((s2 == "." || s2 == "," || s1 == "." || s1 == ",")&& (isdigit == true))
            {
	      	    match = false;
            }
          }
            //alert("argum="+argum+"\n"+"s1="+s1+"\n"+"s2="+s2+"\n"+"match="+match+"\n"+"oneChar="+oneChar+"\n"+"isdigit="+isdigit);
          if (match==true)
          {
      	    var highlight = document.createElement("marker");
       	    highlight.style.backgroundColor="A0A0A0";

            var node2 = knoten.childNodes[i].cloneNode(false);
            var text0 = nodeText.substring(0, enthaelt); //before highlighting area
            var text1 = document.createTextNode(nodeText.substring(enthaelt, enthaelt+argum.length));
            highlight.appendChild(text1);

            var text2 = nodeText.substring(enthaelt + argum.length, nodeText.length);
            knoten.childNodes[i].data=text0;
            node2.data=text2;
            if (knoten.childNodes.length>i+1)
            {
                knoten.insertBefore(highlight, knoten.childNodes[i+1]);
            }
            else
            {
              knoten.appendChild(highlight);
            }
            if (knoten.childNodes.length>i+2)
            {
              knoten.insertBefore(node2, knoten.childNodes[i+2]);
            }
            else
            {
              knoten.appendChild(node2);
            }
          }
        }
      }
    }
    if (knoten.childNodes[i].hasChildNodes)
    {
      examinNode(knoten.childNodes[i], argum, oneChar);
    }
  }
}