    var bgimages=new Array();
    var pathToImg=new Array();
    var link=new Array();
    var inc=-0;
    bgimages[0] = "images/top_01.jpg"
    bgimages[1] = "images/top_02.jpg"
    bgimages[2] = "images/top_03.jpg"
    bgimages[3] = "images/top_04.jpg"
    bgimages[4] = "images/top_05.jpg"
    //bgimages[5] = "images/top-06.jpg"
    //bgimages[6] = "images/top-07.jpg"
    //bgimages[7] = "images/top-08.jpg"
    //bgimages[8] = "images/top-09.jpg"
    //bgimages[9] = "images/top-10.jpg"
    //bgimages[9] = "images/top-11.jpg"
    
    link[0] = "#.php"
    link[1] = "#.php"
    link[2] = "#.php"
    link[3] = "#.php"
    link[4] = "#.php"
    //link[5] = "#.php"
    //link[6] = "#.php"
    //link[7] = "#.php"
    //link[8] = "#.php"
    //link[9] = "#.php"
    //link[9] = "#.php"
    //Images vorladen
    for (i=0; i < bgimages.length; i++) {
            pathToImg[i]=new Image();
            pathToImg[i].src=bgimages[i];
    }
    
    function bgfade() {
            if (inc < bgimages.length-1) {
                    
                    inc++
            } else {
                    inc=0
                   
            }
            document.getElementById("topbild").style.backgroundImage = "url("+pathToImg[inc].src+")";
			document.getElementById("topbild").onclick=new Function("window.location='"+link[inc]+"';");
            fade();
    }
    
    function fade(step) {
            step = step || 60;
            document.getElementById("topbild").style.opacity = step/100;
            document.getElementById("topbild").style.filter = "alpha(opacity=" + step + ")";
            step = step + 1;
            if (step <= 100) {
                    window.setTimeout(function () { fade(step); }, 1);
            } else {
                    step = 60;
            }
    }
    
    if (document.all||document.getElementById) window.onload=new Function('setInterval("bgfade()",5000)')

