function unlinkelements(SelectName) { MySelect = document.getElementById(SelectName); MySelect.options.length = 0; } function countelements(arrValid,arrModules) { // js method does no work with array.lenght = 1, use Dummy instead count = 0; for (i in arrValid) { if (arrValid[i] != "Dummy") { count++; } // end if (arrValid[i] != "Dummy") { } // end for (i in arrValid) { return count; } function updateelements(Selectname,blank,arrValues,arrValid,choices,arrSelected) { unlinkelements(Selectname); // js function lenght does not work with a single element arrays, use dummy an function total = countelements(arrValid,arrValues); is_selected = false; if (total == choices) is_selected = true; MySelect = document.getElementById(Selectname); if (total == 1) { myitem = new Option(arrValues[arrValid[0]]["Name"],arrValid[0],false,true); MySelect.options[MySelect.length] = myitem; } else { for (i in arrValid) { myitem = new Option(arrValues[arrValid[i]]["Name"],arrValid[i],false,is_selected); MySelect.options[MySelect.length] = myitem; } // end for (i in arrValid) { } // end if (total == 1) } function checkDependecies(Modulename) { for (i in Wahlmodul1) { if (Wahlmodul1[i] == Modulename) return true; } for (i in Wahlmodul2) { if (Wahlmodul2[i] == Modulename) return true; } return false; } function setOpacity(myelement,value) { myelement.style.opacity = value/10; myelement.style.filter = 'alpha(opacity=' + value*10 + ')'; } function init() { if (!document.getElementById) { alert("Dieser Browser ist leider inkompatibel. Bitte verwenden Sie eine neuere Version."); } checkStep("WM1"); checkStep("WM3"); checkStep("WM2"); }