var op = 1.0;
var faktor = -0.05;
var countp = 0;
var countsl = 0;
addLoadEvent_Syn(function() {
    $("body.contentbody_1851 div.singleImage a").attr("class", "thickbox");
    $("body.contentbody_1851 div.singleImage a").each(function(i) {
        var h = $(this).attr("href");
        var o = $(this).attr("ondblclick");
        if (o != "" && o != null) {
            o = o.toString().split("'");
            o = o[1];
            h = o;
        }
        $(this).attr("href", "javascript:tb_show('title','" + h + "?TB_iframe=true&height=380&width=400',false);void(null)");
        $(this).attr("target", "");
    });
    if (document.getElementById("hp1")) {
        op = 1.0;
        faktor = -0.05;
        document.getElementById("hp1").src = "/images/cut/20/" + synapsis_menuimageids[countp] + "/280/197.png";
        countp++;
        if (countp > synapsis_menuimageids.length - 1) {
            countp = 0;
        }
        document.getElementById("hp2").src = "/images/cut/20/" + synapsis_menuimageids[countp] + "/280/197.png";
        countp++;
        if (countp > synapsis_menuimageids.length - 1) {
            countp = 0;
        }
        window.setTimeout("blend()", 5000);
    }
    if (document.getElementById("slider")) {
        var h = "";
        for (countsl = 0; countsl < synapsis_menuimageids.length; countsl++) {
            if (synapsis_menuimageids[countsl] != null && synapsis_menuimageids[countsl] != "undefined") {
                var i = document.createElement("img");
                i.src = "/images/cut/20/" + synapsis_menuimageids[countsl] + "/480/330.png";
                i.width = 480;
                i.height = 330;
                i.alt = "";
                i.border = 0;
                var d = document.createElement("li");
                d.appendChild(i);
                document.getElementById("msl").appendChild(d);
            }
        }
        if (synapsis_menuimageids.length > 1) {
            $("#slider").easySlider({
                auto: true,
                continuous: true,
                numeric: true,
                speed: 800,
                pause: 9000,
                nextId: "slider1next",
                prevId: "slider1prev"
            });
        }
    }
});
function blend() {
    if (op >= 0 && op <= 1) {
        op = op + faktor;
        document.getElementById("hp1").style.opacity = op;
        document.getElementById("hp1").style.filter = "Alpha(opacity=" + (op * 100) + ")";
        window.setTimeout("blend()", 100);
    }
    else {
        document.getElementById("hp1").src = document.getElementById("hp2").src;
        op = 1.0;
        document.getElementById("hp1").style.opacity = op;
        document.getElementById("hp1").style.filter = "Alpha(opacity=" + (op * 100) + ")";
        countp++;
        if (countp > synapsis_menuimageids.length-1) {
            countp = 0;
        }
        document.getElementById("hp2").src = "/images/cut/20/" + synapsis_menuimageids[countp] + "/280/197.png";
        window.setTimeout("blend()", 5000);
    }
}

