var sporthierarchie= { children:[ { id:0, name:"Sporthierarchie", typ:1, children:[ {id:1597,name:"AUSBILDUNG",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1556,name:"BALLSPIELE",typ:1,bgcolor:"#FFFFFF",children:[{id:1561,name:"Badminton",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1601,name:"Baseball",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1545,name:"Basketball",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1592,name:"Beachvolleyball",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1602,name:"Billard",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1621,name:"Boccia",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1582,name:"Faustball",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1572,name:"Flag-Football",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1544,name:"Floorball-Hallenhockey",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1562,name:"Fußball",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1596,name:"Golf",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1581,name:"Hallenhockey",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1579,name:"Squash",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1584,name:"Tennis",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1583,name:"Tischtennis",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1543,name:"Volleyball",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1551,name:"Weitere",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:1595,name:"FPH/FREIZEITSPORTVEREIN PH OÖ",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1542,name:"GERÄTTURNEN - AKROBATIK",typ:1,bgcolor:"#FFFFFF",children:[{id:1576,name:"AcroYoga- Partnerakrobatik",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1575,name:"Bodenturnen-Bodenakrobatik",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1574,name:"Gerätturnen",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1577,name:"Handstandtraining",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1541,name:"Partnerakrobatik",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:1559,name:"IM AM UNTER WASSER",typ:1,bgcolor:"#FFFFFF",children:[{id:1586,name:"Kanupolo",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1585,name:"Rudern",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1549,name:"Schwimmen",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1587,name:"Tauchen",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1550,name:"Weiteres",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:1588,name:"JKUsports Tryout",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1560,name:"KAMPFSPORT - KAMPFKUNST",typ:1,bgcolor:"#FFFFFF",children:[{id:1548,name:"Aikido",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1552,name:"Kampfsportfitness",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1547,name:"Taekwondo",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1546,name:"Weiteres",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:1554,name:"KLETTERN",typ:1,bgcolor:"#FFFFFF",children:[{id:1568,name:"Ausrüstung",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1570,name:"Kurse",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:1557,name:"KONDITION - FITNESS",typ:1,bgcolor:"#FFFFFF",children:[{id:1563,name:"Yoga",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:1578,name:"NEUER USI-Kurs",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1567,name:"OUTDOORWOCHEN / KURSTAGE",typ:1,bgcolor:"#FFFFFF",children:[{id:1593,name:"Sommer",typ:1,bgcolor:"#FFFFFF",children:[{id:1594,name:"Sommercamp",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:1569,name:"Wintersport",typ:1,bgcolor:"#FFFFFF",children:[{id:1565,name:"Ausrüstung",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1564,name:"Kurse",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1566,name:"USI-Bus",typ:1,bgcolor:"#FFFFFF",children:[]}]}]},{id:1589,name:"RADSPORT",typ:1,bgcolor:"#FFFFFF",children:[{id:1591,name:"Bikepolo",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1590,name:"Mountainbike",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:1558,name:"TANZ",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1580,name:"USI-Fitness-Studio",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1555,name:"WEITERES",typ:1,bgcolor:"#FFFFFF",children:[{id:1563,name:"Yoga",typ:1,bgcolor:"#FFFFFF",children:[]},{id:1571,name:"zu Sonstigem",typ:1,bgcolor:"#FFFFFF",children:[]}]},{id:1573,name:"XUNDES 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(); } }