Subversion-Projekte lars-tiefland.shop_ns

Revision

Blame | Letzte Änderung | Log anzeigen | RSS feed

    
    var sliderwidth = 420;
    var sliderheight = 80;
    var slidespeed = 5;
    var slidebgcolor = "#fff";
    var leftrightslide = new Array();
    var copyspeed = slidespeed;
    var i = 0;


    leftrightslide[i++] = '<a href="0001.html"><img style="margin-top:10px;" src="/images/Bild_1/6_DE_464-42_MED.jpg" height="50"></a>';
    leftrightslide[i++] = '<a href="0002.html"><img style="margin-top:10px;" src="/images/Bild_1/11_DE_aeg+co+100.jpg" height="50"></a>';
    leftrightslide[i++] = '<a href="0003.html"><img style="margin-top:10px;" src="/images/Bild_1/96_DE_sharp+r-634+in.jpg" height="50"></a>';
    leftrightslide[i++] = '<a href="0004.html"><img style="margin-top:10px;" src="/images/Bild_1/146_DE_bosch+mum+4405.jpg" height="50"></a>';
    leftrightslide[i++] = '<a href="0005.html"><img style="margin-top:10px;" src="/images/Bild_1/146_DE_bosch+mum+4405.jpg" height="50"></a>';
    leftrightslide[i++] = '<a href="0006.html"><img style="margin-top:10px;" src="/images/Bild_1/146_DE_bosch+mum+4405.jpg" height="50"></a>';
    
    leftrightslide[i++] = '<a href="0001.html"><img style="margin-top:10px;" src="/images/Bild_1/278_DE_Braun+CCR+2.jpg" height="50"></a>';
    leftrightslide[i++] = '<a href="0002.html"><img style="margin-top:10px;" src="/images/Bild_1/520_DE_panasonic+sd+253.jpg" height="50"></a>';
    leftrightslide[i++] = '<a href="0003.html"><img style="margin-top:10px;" src="/images/Bild_1/557_NL_miele_S712.jpg" height="50"></a>';
    leftrightslide[i++] = '<a href="0004.html"><img style="margin-top:10px;" src="/images/Bild_1/616_DE_plusx.jpg" height="50"></a>';
    leftrightslide[i++] = '<a href="0005.html"><img style="margin-top:10px;" src="/images/Bild_1/713_DE_ACCDHM3.JPG" height="50"></a>';
    leftrightslide[i++] = '<a href="0006.html"><img style="margin-top:10px;" src="/images/Bild_1/1176_DE_1176_DE_can_cd10.jpg" height="50"></a>';


    leftrightslide = '<nobr>' + leftrightslide.join(" ") + '</nobr>';
    var iedom = document.all || document.getElementById;
    var actualwidth = '';
    var cross_slide, ns_slide;
    
    function fillup(action){
        if (iedom){
            document.getElementById('temp').style.display = "none";
            cross_slide=document.getElementById? document.getElementById("slide1") : document.all.slide1;
            cross_slide2=document.getElementById? document.getElementById("slide2") : document.all.slide2;
            cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide;
            actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth;
            cross_slide2.style.left=actualwidth+10;
            
            
        }
        else if (document.layers){
            ns_slide=document.ns_slidemenu.document.ns_slidemenu2;
            ns_slide2=document.ns_slidemenu.document.ns_slidemenu3;
            ns_slide.document.write(leftrightslide);
            ns_slide.document.close();
            actualwidth=ns_slide.document.width;
            ns_slide2.left=actualwidth+20;
            ns_slide2.document.write(leftrightslide);
            ns_slide2.document.close();
        }
        //action slideleft+(), slideright+()
        if(action=="slideleft"){
            lefttime = setInterval(action + "()",30);
        }
        if(action=="slideright"){
            righttime = setInterval(action + "()",30);    
        }
            

    }
//    window.onload=fillup();

    function slideleft() {
        if (iedom){
            if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8)){
                cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed;
            }else{
                 cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+30;
            }
            if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8)){
                cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed;
            }else{
                cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+30;
            }
        }
        else if (document.layers){
            if (ns_slide.left>(actualwidth*(-1)+8))
                ns_slide.left-=copyspeed;
            else
                ns_slide.left=ns_slide2.left+actualwidth+30;
    
            if (ns_slide2.left>(actualwidth*(-1)+8))
                ns_slide2.left-=copyspeed;
            else
                ns_slide2.left=ns_slide.left+actualwidth+30;
        }
    }

    function slideright() {
        if (iedom){
            if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8)){
                cross_slide.style.left=parseInt(cross_slide.style.left)+copyspeed;
            }else{
                 cross_slide.style.left=parseInt(cross_slide2.style.left)-actualwidth+30;
            }

            if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8)){
                cross_slide2.style.left=parseInt(cross_slide2.style.left)+copyspeed;
            }else{
                cross_slide2.style.left=parseInt(cross_slide.style.left)-actualwidth+30;
            }
        }
        else if (document.layers){
            if (ns_slide.left>(actualwidth*(-1)+8))
                ns_slide.left-=copyspeed;
            else
                ns_slide.left=ns_slide2.left+actualwidth+30;
    
            if (ns_slide2.left>(actualwidth*(-1)+8))
                ns_slide2.left-=copyspeed;
            else
                ns_slide2.left=ns_slide.left+actualwidth+30;
        }
    }
    
    if (iedom||document.layers){
        with (document){
            document.write('<table width=\"545\" cellspacing=\"0\" cellpadding=\"0\">');
            document.write('<tr><td class=\"item_oben\">H&auml;ufig angeklickt</td></tr>');
            document.write('<tr><td class=\"item_body\">');
            
            document.write('<div class=\"bildlauf\">');
            if (iedom){
                document.write('<div class=\"button_left\">');
                //der button zum LINKS scrollen
                document.write('<input onmousedown=\"fillup(\'slideleft\');copyspeed=slidespeed\"'); 
                document.write(' onmouseup=\"clearInterval(lefttime);copyspeed=0;\" type=\"submit\" value=\"<<\" />');
                document.write('</div>');

                document.write('<div class=\"slidebar\" style="width:' + sliderwidth + ';height:' + sliderheight + ';overflow:hidden">');
                document.write('<div style="padding-top:15px;width:' + sliderwidth + ';height:' + sliderheight + ';background-color:' + slidebgcolor + '" >');
                if (iedom)
                document.write('<div id="temp" style="text-align:left;margin-top:-15px;">' + leftrightslide + '</div>');

                document.write('<div id="slide1" style="position:absolute;left:0;top:0"></div>');
                document.write('<div id="slide2" style="position:absolute;left:0;top:0"></div>');
                document.write('</div></div>');
                
                document.write('<div class=\"button_right\">');
                
                //der button zum RECHTS scrollen
                document.write('<input onmousedown=\"fillup(\'slideright\');copyspeed=slidespeed\"');
                document.write(' onmouseup=\"clearInterval(righttime);copyspeed=0;\" type=\"submit\" value=\">>\" />');
                
                
                document.write('</div>');
                
            }
            else if (document.layers){
                document.write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>');
                document.write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>');
                document.write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>');
                document.write('</ilayer>');
            }
            document.write('</div>');
            
            document.write('</td></tr>');
            document.write('<tr><td class=\"basket_unten\"></td></tr></table>');
        }
    }