// JavaScript Document
var arrValues = [["<h2>Euro 455,-</h2>"],  // Werte zur Option mit value=0
                 ["<h2>Euro 470,-</h2>"],  // Werte zur Option mit value=1
                 ["<h2>Euro 491,-</h2>"],  // Werte zur Option mit value=2
                 ["<h2>Euro 455,-</h2>"]]; // Werte zur Option mit value=3

function updateRadio(objSelect){
  // Element für die Radiobuttons leeren
  var objDiv = document.getElementById("pauschaldiv");
  objDiv.innerHTML = "";
  // Falls eine Option mit gültigem Wert gewählt wurde
  if(objSelect.options[objSelect.selectedIndex].value != "-1"){
    // Array mit den Werten für die Radio-Gruppe durchlaufen
    for(var i=0; i<arrValues[parseInt(objSelect.options[objSelect.selectedIndex].value)].length; i++){
      // Neues Radioelement erstellen (mit Weiche für IE wg. Problem mit name-Attribut)
      if(document.all && !window.opera){
        var objRadio = document.createElement("<input name=\"preis\">");
      }else{
        var objRadio = document.createElement("input");
        objRadio.name = "preis";
      }
      objRadio.type = "checkbox";
      objRadio.value = arrValues[parseInt(objSelect.options[objSelect.selectedIndex].value)][i];
      
      // Beschreibung zuweisen
      var objLabel = document.createElement("label");
      objLabel.innerHTML = arrValues[parseInt(objSelect.options[objSelect.selectedIndex].value)][i];
      objDiv.appendChild(objLabel);
    }
  }
}
