function afterLoaded() {

   // alert("GELADEN!")

    // var bla = document.getElementsByName()

    var ard = document.getElementById("P1")
    var zdf = document.getElementById("P2")
    var rtl = document.getElementById("P3")

   // ard.onclick = function() {alert("Erstes Programm");}

    ard.addEventListener("click", function() {alert("Erstes Programm");} )
    zdf.addEventListener("click", function() {alert("Zweites Programm");} )
    rtl.addEventListener("click", function() {alert("Drittes Programm");} )
}

window.addEventListener('load', afterLoaded);