var sporthierarchie= { children:[ { id:0, name:"Sporthierarchie", typ:1, children:[ {id:898,name:"BALLSPIELE",typ:1,bgcolor:"#FFFFFF",children:[{id:903,name:"Badminton",typ:1,bgcolor:"#FFFFFF",children:[]},{id:886,name:"Basketball",typ:1,bgcolor:"#FFFFFF",children:[]},{id:904,name:"Fußball",typ:1,bgcolor:"#FFFFFF",children:[]},{id:882,name:"Tennis",typ:1,bgcolor:"#FFFFFF",children:[]},{id:912,name:"Tischtennis",typ:1,bgcolor:"#FFFFFF",children:[]},{id:887,name:"Volleyball",typ:1,bgcolor:"#FFFFFF",children:[]},{id:893,name:"Weitere",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:901,name:"IM AM UNTER WASSER",typ:1,bgcolor:"#FFFFFF",children:[{id:884,name:"Paddeln",typ:1,bgcolor:"#FFFFFF",children:[]},{id:883,name:"Rudern",typ:1,bgcolor:"#FFFFFF",children:[]},{id:891,name:"Schwimmen",typ:1,bgcolor:"#FFFFFF",children:[]},{id:885,name:"Tauchen",typ:1,bgcolor:"#FFFFFF",children:[]},{id:892,name:"Weiteres",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:902,name:"KAMPFSPORT - KAMPFKUNST",typ:1,bgcolor:"#FFFFFF",children:[{id:890,name:"Aikido",typ:1,bgcolor:"#FFFFFF",children:[]},{id:894,name:"Kampfsportfitness",typ:1,bgcolor:"#FFFFFF",children:[]},{id:889,name:"Taekwondo",typ:1,bgcolor:"#FFFFFF",children:[]},{id:888,name:"Weiteres",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:896,name:"KLETTERN",typ:1,bgcolor:"#FFFFFF",children:[{id:910,name:"Ausrüstung",typ:1,bgcolor:"#FFFFFF",children:[]},{id:913,name:"Kurse",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:899,name:"KONDITION - FITNESS",typ:1,bgcolor:"#FFFFFF",children:[{id:905,name:"Yoga",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:909,name:"OUTDOORWOCHEN / KURSTAGE",typ:1,bgcolor:"#FFFFFF",children:[{id:916,name:"Sommersport",typ:1,bgcolor:"#FFFFFF",children:[{id:915,name:"Kurse",typ:1,bgcolor:"#FFFFFF",children:[]},{id:914,name:"USI-Bus",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:911,name:"Wintersport",typ:1,bgcolor:"#FFFFFF",children:[{id:907,name:"Ausrüstung",typ:1,bgcolor:"#FFFFFF",children:[]},{id:906,name:"Kurse",typ:1,bgcolor:"#FFFFFF",children:[]},{id:908,name:"USI-Bus",typ:1,bgcolor:"#FFFFFF",children:[]}]}]},{id:900,name:"TANZ",typ:1,bgcolor:"#FFFFFF",children:[]},{id:897,name:"WEITERES",typ:1,bgcolor:"#FFFFFF",children:[{id:905,name:"Yoga",typ:1,bgcolor:"#FFFFFF",children:[]},{id:881,name:"zu Sonstigem",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:921,name:"Xunde BEWEGUNG für JKU-MA",typ:1,bgcolor:"#FFFFFF",children:[]}]}]} function sphLevel(previousLevel,root) { this.previousLevel=previousLevel; this.root=root; var el=document.getElementById("uonSportarten"); var newEl=document.createElement("div"); el.appendChild(newEl); var select=document.createElement("select"); select.name="sp_id_in"; newEl.appendChild(select); for (var i=-1;i0) text=text+" >"; opt.text=text; opt.value=child.id; opt.style.backgroundColor=child.bgcolor; select.options.add(opt); } var that=this; var onchange=function() { that.expand(that.select.options[that.select.selectedIndex].value); } if (window.addEventListener) { select.addEventListener("change",onchange,false); } else { select.attachEvent("onchange",onchange); } this.select=select; this.newEl=newEl; } sphLevel.prototype={ expand:function(id) { if (this.nextLevel) this.collapse(); var next=null; for (var i=0;i0) { this.nextLevel=new sphLevel(this,next); } this.select.blur(); return this.nextLevel; }, collapse:function() { this.nextLevel.remove(); this.nextLevel=null; }, remove:function() { this.newEl.parentNode.removeChild(this.newEl); if (this.nextLevel) this.nextLevel.remove(); } }