var collapsedWidget= "#!-- #IMAGES:oplus.gif --#"; var collapsedWidgetStart= "#!-- #IMAGES:oplusstart.gif --#"; var collapsedWidgetEnd= "#!-- #IMAGES:oplusend.gif --#"; var expandedWidget= "#!-- #IMAGES:ominus.gif --#"; var expandedWidgetStart= "#!-- #IMAGES:ominusstart.gif --#"; var expandedWidgetEnd= "#!-- #IMAGES:ominusend.gif --#"; var nodeWidget= "#!-- #IMAGES:onode.gif --#"; var nodeWidgetEnd= "#!-- #IMAGES:onodeend.gif --#"; var emptyspace= "#!-- #IMAGES:oempty.gif --#"; var chainspace= "#!-- #IMAGES:ochain.gif --#"; var jstocClosed= "#!-- #IMAGES:jstoc-closed.gif --#"; var jstocExpand= "#!-- #IMAGES:jstoc-expand.gif --#"; var jstocLeaf= "#!-- #IMAGES:jstoc-leaf.gif --#"; var jstocWidgetChecked= "#!-- #IMAGES:jstoc-checked.gif --#"; var jstocWidgetUnchecked= "#!-- #IMAGES:jstoc-uncheck.gif --#"; var currState= "00000000000000000000000000000000000000000000000000000000000000000000000000000000000"; var expansionState="000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; var global_doclfdnr= 0; var global_jstoccheckboxon = false; var global_checkboxon = false; var global_open_toc = true; // Wenn auf Document geclick wird , dann auch unterordner anzeige und re; var global_jstoc_id = "JSTOC"; var global_jstoc_level1 = "menue"; function meintoc(img, blockNum) { var newString = "" ; var expanded, n ; // alert("hallo im meintoc BlockNr "+blockNum+ " CurrState "+currState+ "typeof id "+typeof(blockNum)); expanded = getcurrstate(blockNum); currState = invertState(currState, expanded, blockNum); // Anzeige �ndern if (expanded == "0") { // alert("Inexpand=0 "+currState.length); if(document.getElementById("OLBlock" + blockNum) != null && document.getElementById("OLBlock" + blockNum) != undefined) { var doc = document.getElementById("OLBlock" + blockNum); // document.getElementById("OLBlock" + blockNum).style.display = "block" ; // doc.style.display = "block" img.src = getExpandedWidgetState(img.src); changeExpandBild(blockNum,true); // alert("Inexpand=0 ende "+currState.length); } else { alert("Kein Eintrag unter "+blockNum); } } else { document.getElementById("OLBlock" + blockNum).style.display = "none" img.src = getCollapsedWidgetState(img.src); changeExpandBild(blockNum,false); // alert("none"); } // alert("Ende meintoc expanded "+expanded+" currState "+currState); } function getcurrstate (blocknr) { return (currState.charAt(blocknr)) } function changeExpandBild(blockNum,expand){ var xx=document.getElementById("nodebild"+blockNum); if (xx) { if (expand) { xx.src = jstocExpand; } else { xx.src = jstocClosed; } } } function invertState(currState, currVal, n) { var newState = currState.substring(0,n) newState += currVal ^ 1 // Bitwise XOR item n // alert("currStatelength "+currState.length+" newState "+newState); newState += currState.substring(n+1,currState.length) return newState } function getExpandedWidgetState(imgURL) { // debugger; if (imgURL.indexOf("start") != -1) { return expandedWidgetStart; } if (imgURL.indexOf("end") != -1) { return expandedWidgetEnd; } // var f = expandedWidget; // debugger; return expandedWidget; } function getCollapsedWidgetState(imgURL) { if (imgURL.indexOf("start") != -1) { return collapsedWidgetStart } if (imgURL.indexOf("end") != -1) { return collapsedWidgetEnd } return collapsedWidget } // erster Aufruf sichtbarkeit function initExpand() { // currstate 0 zu 1 auf // Initialieseiert mit 1 // Alles zu machen // alert("Hallo in initExpand"); if (currState == null) { currState = expansionState; } for (var i = 1; i <= anzBlocks; i++) { if (currState.charAt(i) == 1) { // alert("bild"+i); var f = document.getElementById("bild"+i); document.getElementById("OLBlock" + i).style.display = "block" meintoc(f,i) ; } } } function changeexpand (blockid) { if (blockid > -1) { var f = document.getElementById("bildnode"+blockid); // debugger; meintoc(f,blockid); } } function changelowerlevels(level,lfdnr,open) { // level // ein Element aus toc // lfdnr im Inhaltsverzeichnis // open True = 0effnen False = schlie�en // alert("level in changelower" + level); var spanid; var blocknr; var docelem = document.getElementById(lfdnr); if (level > 1 && typeof(docelem.parentNode) == "object") { var f = docelem.parentNode; while ( typeof(f) == "object" && f.tagName != "BODY") { // alert("type "+typeof(f)+" Type "+f.nodeType+" Name "+f.nodeName); if (f.nodeType == 1 && f.nodeName == "SPAN") { spanid = f.getAttribute("id"); if (spanid.indexOf("OLBlock")!=-1) { blocknr = parseInt(spanid.substr(7)); if (open && f.style.display=="none") { changeexpand(blocknr) } else if(!open && f.style.display=="block"){ changeexpand(blocknr); } level --; } } if (level < 2) { break; } f=f.parentNode; } } return } function checkwidget(img,blocknum) { img.src = getcheckedImg(img.src); } function getcheckedImg(imgURL) { // debugger; if (imgURL.indexOf("checked") != -1) { return jstocWidgetUnchecked; } if (imgURL.indexOf("uncheck") != -1) { return jstocWidgetChecked; } // var f = expandedWidget; // debugger; return imgUrl; } function showCheckbox() { var start=1; var xx = document.getElementById("checkbox"+start); if (xx) { do { xx.style.display="inline"; start++; } while ( xx= document.getElementById("checkbox"+start)) } global_jstoccheckboxon = true; } function unshowCheckbox() { start=1; if (global_jstoccheckboxon) { var xx = document.getElementById("checkbox"+start); if (xx) { do { xx.style.display="none"; start++; } while ( xx= document.getElementById("checkbox"+start)) } } global_jstoccheckboxon=false; } function getcheckednodes(site_name) { var sdomain=""; var start=1; if (global_jstoccheckboxon) { var xx = document.getElementById("checkbox"+start); if (xx) { do { if(xx.src.indexOf("checked") > -1) { var docnode = document.getElementById(xx.getAttribute("lfdnr")); if (docnode) { sdomain+=getdocs(docnode,site_name); } } start++; } while ( xx= document.getElementById("checkbox"+start)) } } //letztes Komma weg if (sdomain) { sdomain = sdomain.substr(0,sdomain.length-1); } return sdomain; } function getdocs(node,site_name) { // Ab hier alle documente in und Unterhalb var sdomain=""; var doclinks = new Array(); var docname; doclinks = node.getElementsByTagName("a"); if(doclinks.length>0) { for ( var i=0 ; i < doclinks.length; i++) { docname = doclinks[i].getAttribute("docname"); if(docname) { sdomain += site_name+":"+docname+","; } } } return sdomain; } function navTextSelect(enable,id,changelowerlevel) { var spantitel=null; var xx = document.getElementById(id); if (xx && xx.className != "NoChangeonSelect" ) { var at = xx.getAttribute("docname"); if (at) { xx = document.getElementById(at); } } if (xx && xx.className != "NoChangeonSelect" ) { if (enable) {xx.className = "NavTextSelected1";} else { xx.className = "NavText";} if (changelowerlevel) { changelowerlevels(xx.getAttribute("level"),xx.getAttribute("lfdnr"),true) ; } } } // Holt die lfd nr aus dem TOC f�r eine Documenten ID function getlfdnr(docid) { var obj = document.getElementById(docid); if (obj) { return parseInt(obj.getAttribute("lfdnr")); } return 0; } function gettitel(docid) { var obj = document.getElementById(docid); if (obj) { if(obj.getAttribute("docname")) { return obj.getAttribute("docname") } else if(obj.getAttribute("titel") ) { return obj.getAttribute("titel") } } return ""; } // Holt den Link aus Dem TOC mit der id function geturi(id) { var obj = document.getElementById(id); if (obj) { return obj.getAttribute("uri"); } return ""; } function geturl(lfdnr) { var docurl=""; var xx = document.getElementById("ali"+lfdnr); if(xx) { docurl = xx.getAttribute("uri"); } return docurl; } function getcurtocobj(lfdnr) { return document.getElementById("ali"+lfdnr); } function markiere_toc_xsl (lfdnr,id) { if (!lfdnr && id) { lfdnr=getlfdnr(id); } if (lfdnr && global_doclfdnr != lfdnr) { jstocUnmarkSelected(); navTextSelect(true,"ali"+lfdnr,true); global_doclfdnr=lfdnr; } global_doclfdnr = lfdnr; var xx = getcurtocobj(lfdnr); if (xx) { if (global_open_toc) { var blockid = parseInt(xx.getAttribute("blockid")); if (blockid ) { var blockimg = document.getElementById("bildnode"+blockid); if (blockimg) { meintoc(blockimg,blockid); } } } var subdiv = xx.getAttribute("subdiv"); if (subdiv && (typeof(global_akt_sub_toc) != "undefined" )) { var tocid; if(subdiv) { if (global_akt_sub_toc != "") { document.getElementById(global_akt_sub_toc).style.display="none"; /* tocid = "hToc" + global_akt_sub_toc.substr(6); document.getElementById(tocid).className = "htocNotSelected"; */ } document.getElementById(subdiv).style.display="block"; global_akt_sub_toc=subdiv; tocid = "hToc" + subdiv.substr(6); document.getElementById(tocid).className = "htocSelected"; } } scrollintoview(xx,global_jstoc_id,40); } } function aktivatesubdoc() { if (typeof(global_akt_sub_toc) != "undefined" && global_akt_sub_toc != "") { $j(".htocNotSelected").hover( function() { hoverin(this)}, function() { hoverout(this)}); } } function hoverin(obj) { $j("#"+global_akt_sub_toc).hide(); var subdiv = "#"+obj.getAttribute("subdiv"); $j(subdiv).show(); } function hoverout(obj) { var subdiv = "#"+obj.getAttribute("subdiv"); $j(subdiv).hide(); $j("#"+global_akt_sub_toc).show(); } function domoveDoc(richtung) { var nextnr; if ( richtung == 1 ) { nextnr=global_doclfdnr+1; } else { nextnr = global_doclfdnr-1; } var xx = document.getElementById("ali"+nextnr); if(xx) { // changelowerlevels(xx.getAttribute("level"),xx,true) ; anzeigeDocument("DOCUMENT",nextnr,"","","",""); // scrollintoview(xx,"JSTOC",40); } } var start_top = 10; var start_left= 100; var start_width=200; var start_height=20; var widget_width = "16px"; var widget_height = "16px"; var chain_height = "20px"; var chain_width = "20px"; var global_akt_sub_toc=""; var global_all_visible=true; function createSubToc(node,i) { var prefix=""; var subdiv = "subdiv"+i; var x = document.createElement("div"); x.setAttribute("id",subdiv); x.style.display="none"; if (node.getAttribute("type") != "doc") { // var id = docnodes[i].getAttribute("id"); // var tocnode = XMLgetElementsByAtt(docxml,id,"id"); // var ihtml = makeToc(tocnode[0],prefix,subdiv); var ihtml = makeToc(node,prefix,subdiv); x.innerHTML = ihtml; } var jstocdiv = document.getElementById(global_jstoc_id); if (jstocdiv) { jstocdiv.appendChild(x); } } function createToc(node) { var ihtml=""; if (node.length) { for (var i = 0 ; i < node.length; i++) { currid++; ihtml += "
"; ihtml += "
"; ihtml += ""; ihtml += ""; ihtml += node[i].getAttribute("title"); ihtml += ""; ihtml += "
"; createSubToc(node[i],i); } } return ihtml; } var blockID = 1; var currid = 0; function makeToc(ol, prefix, subdiv) { var docid; var output = ""; var uri = ""; var nestCount, link, nestPrefix prefix = (prefix) ? prefix : "" for (var i = 0; i < ol.childNodes.length ; i++) { nestCount = ol.childNodes[i].childNodes.length docid = ol.childNodes[i].getAttribute("id"); uri = "#!-- #FUNCTION:document --#&id="+docid; currid++; // uri+="&p="+currid; if (nestCount > 0) { output += "
\n" output += prefix; if (!global_all_visible) { output += ""; } output += ""; output += ""; output += ol.childNodes[i].getAttribute("title"); output += ""; output += "" : ""; } else { output += "style='display:block' >"; nestPrefix += "" ; } output += makeToc(ol.childNodes[i], nestPrefix, subdiv); output += "
\n" } else { output += "
\n"; output += prefix; if (!global_all_visible) { output += ""; output += " "; } output += ""; output += ol.childNodes[i].getAttribute("title"); output += ""; output += "
\n" } } return output } function anzeigeSubTocDocument(node) { // unshowhits(); var varf = parseInt(node.getAttribute("lfdnr")); var titel = node.getAttribute("titel"); var id = node.getAttribute("docname"); var uri = node.getAttribute("uri"); var url = makeUrl(id,uri,titel); // markiere_toc(id,"",varf); anzeigeDocument(global_content,varf,url,id,'',titel,'',global_load_content,"",""); // Documentscrolltop(global_content_container); return false; }