Rozklápěcí obrázek s odkazy - ukázka zdrojového kódu zdrojový kód

<HTML><HEAD><title>Java Script ze stránky - www.jaknaweb.com</title>
<SCRIPT LANGUAGE="JavaScript1.2">

<!-- Beginning of JavaScript -

var bildCounter = 13;

bild = new Image();
bild.src = "stretch232.gif";

function initiate() {   
    if (document.layers) {    
        ob = new Array(); 
        ob[0]=document.img1;
        ob[1]=document.img2;
        ob[2]=document.img3;
        ob[3]=document.img4;
        ob[4]=document.img5;
        ob[5]=document.img6;
        ob[6]=document.img7;
        ob[7]=document.img8;
        ob[8]=document.img9;
        ob[9]=document.img10;
        ob[10]=document.img11;
        ob[11]=document.img12;
        ob[12]=document.img13;
        ob[13]=document.img14;
        ob[14]=document.img15;
        ob[15]=document.img16;

        ob[16]=document.page1;
        ob[17]=document.page2;
        ob[18]=document.page3;
        ob[19]=document.page4;
        ob[20]=document.page5;
        ob[21]=document.page6;
        ob[14].visibility="visible"
    }
    else {
        ob = new Array(); 
        ob[0]=document.all.img1.style;
        ob[1]=document.all.img2.style;
        ob[2]=document.all.img3.style;
        ob[3]=document.all.img4.style;
        ob[4]=document.all.img5.style;
        ob[5]=document.all.img6.style;
        ob[6]=document.all.img7.style;
        ob[7]=document.all.img8.style;
        ob[8]=document.all.img9.style;
        ob[9]=document.all.img10.style;
        ob[10]=document.all.img11.style;
        ob[11]=document.all.img12.style;
        ob[12]=document.all.img13.style;
        ob[13]=document.all.img14.style;
        ob[14]=document.all.img15.style;
        ob[15]=document.all.img16.style;

        ob[16]=document.all.page1.style;
        ob[17]=document.all.page2.style;
        ob[18]=document.all.page3.style;
        ob[19]=document.all.page4.style;
        ob[20]=document.all.page5.style;
        ob[21]=document.all.page6.style;
        ob[14].visibility="visible"
    }
}



function expandNavigation() {   
        ob[bildCounter].visibility="hidden"
        bildCounter--
        ob[bildCounter].visibility="visible"

        if (bildCounter==1) {
                clearTimeout("setT")
                ob[14].visibility="hidden"
                ob[15].visibility="visible"
        }
        else {
                var setT = setTimeout("expandNavigation()",40);
        }       
}

function shrinkNavigation() {   
        ob[bildCounter].visibility="hidden"       
        bildCounter++
        ob[bildCounter].visibility="visible"

        if (bildCounter==13) {
                clearTimeout("setT")
                ob[14].visibility="visible"
                ob[15].visibility="hidden"
        }
        else {
                var setT = setTimeout("shrinkNavigation()",40);
        }       
}

function goPage(nr) {   
        ob[16].visibility="hidden"
        ob[17].visibility="hidden"
        ob[18].visibility="hidden"
        ob[19].visibility="hidden"
        ob[20].visibility="hidden"
        ob[21].visibility="hidden"
        ob[eval(nr)].visibility="visible"
        shrinkNavigation()
}


// - End of JavaScript - -->

</SCRIPT>

<style type="text/css">
#img1 {position: absolute; left: 10;  top: 30; visibility:hidden;}
#img2 {position: absolute; left: 10;  top: 30; visibility:hidden;}
#img3 {position: absolute; left: 10;  top: 30; visibility:hidden;}
#img4 {position: absolute; left: 10;  top: 30; visibility:hidden;}

#img5 {position: absolute; left: 10;  top: 30; visibility:hidden;}
#img6 {position: absolute; left: 10;  top: 30; visibility:hidden;}
#img7 {position: absolute; left: 10;  top: 30; visibility:hidden;}
#img8 {position: absolute; left: 10;  top: 30; visibility:hidden;}

#img9 {position: absolute; left: 10;  top: 30; visibility:hidden;}
#img10 {position: absolute; left: 10;  top: 30; visibility:hidden;}
#img11 {position: absolute; left: 10;  top: 30; visibility:hidden;}
#img12 {position: absolute; left: 10;  top: 30; visibility:hidden;}
#img13 {position: absolute; left: 10;  top: 30; visibility:hidden;}

#img14 {position: absolute; left: 10;  top: 30; visibility:hidden;}

#img15 {position: absolute; left: 10;  top:10; visibility:hidden;}
#img16 {position: absolute; left: 10;  top:10; visibility:hidden;}

#page1 {position: absolute; left: 0;  top: 0; visibility:hidden;}
#page2 {position: absolute; left: 0;  top: 0; visibility:hidden;}
#page3 {position: absolute; left: 0;  top: 0; visibility:hidden;}
#page4 {position: absolute; left: 0;  top: 0; visibility:hidden;}
#page5 {position: absolute; left: 0;  top: 0; visibility:hidden;}
#page6 {position: absolute; left: 0;  top: 0; visibility:hidden;}

</style>
</HEAD>
<BODY BGCOLOR="#FFFFFF" onLoad="initiate()">
<div ID="page1"><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=840 HEIGHT=430><TR ALIGN=middle><TD bgcolor="#FFAAAA"><FONT SIZE=5 face="Arial, Helvetica">HAIR</FONT><br><br><FONT SIZE=2 face="Arial, Helvetica">One of the fine filaments<br>growing esp. from female legs<br>in order to be shaved.</FONT></TD></TR></TABLE></div>

<div ID="page2"><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=840 HEIGHT=430><TR ALIGN=Center><TD bgcolor="#AAFFAA"><FONT SIZE=5 face="Arial, Helvetica">FACE</FONT><br><br><FONT SIZE=2 face="Arial, Helvetica">Foremost part of head<br>containing mouth and sense-organs.<br>Used to hide that nothing is behind.</FONT></TD></TR></TABLE></div>

<div ID="page3"><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=840 HEIGHT=430><TR ALIGN=Center><TD bgcolor="#AAAAFF"><FONT SIZE=5 face="Arial, Helvetica">HAND</FONT><br><br><FONT SIZE=2 face="Arial, Helvetica">Terminal part of human arm beyond wrist.<br>Similar member of all four limbs of monkey.</FONT></TD></TR></TABLE></div>

<div ID="page4"><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=840 HEIGHT=430><TR ALIGN=Center><TD bgcolor="#AA00AA"><FONT SIZE=5 face="Arial, Helvetica">LEG</FONT><br><br><FONT SIZE=2 face="Arial, Helvetica">Organ of support and locomotion in animal<br>esp. lover limb of human body.<br>The smaller the brain the longer the legs.</FONT></TD></TR></TABLE></div>

<div ID="page5"><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=840 HEIGHT=430><TR ALIGN=Center><TD bgcolor="#AAFF00"><FONT SIZE=5 face="Arial, Helvetica">KNEE</FONT><br><br><FONT SIZE=2 face="Arial, Helvetica">Joint between thigh and lower leg in man.<br>Mostly used to bend in reference to the boss.</FONT></TD></TR></TABLE></div>

<div ID="page6"><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=840 HEIGHT=430><TR ALIGN=Center><TD bgcolor="#00AAFF"><FONT SIZE=5 face="Arial, Helvetica">FOOT</FONT><br><br><FONT SIZE=2 face="Arial, Helvetica">Terminal part of leg<br>beyond knee and ankle and<br>beyond reach of brain.</FONT></TD></TR></TABLE></div>

<div ID="img1"><img SRC="stretch232.gif" border=0 width=159 height=395></div>
<div ID="img2"><MAP Name="nav.map">
        <AREA shape="rect" Coords="65,11 133,31" onClick="goPage(16)" href="#">
        <AREA shape="rect" Coords="81,35 149,57" onClick="goPage(17)" href="#">
        <AREA shape="rect" Coords="47,173 115,196" onClick="goPage(18)" href="#">
        <AREA shape="rect" Coords="11,225 77,246" onClick="goPage(19)" href="#">
        <AREA shape="rect" Coords="45,274 110,294" onClick="goPage(20)" href="#">
        <AREA shape="rect" Coords="78,369 145,389" onClick="goPage(21)" href="#">
        </MAP><img SRC="stretch232.gif" border=0 width=159 height=395 usemap="#nav.map"></div>
<div ID="img3"><img SRC="stretch232.gif" border=0 width=159 height=360></div>
<div ID="img4"><img SRC="stretch232.gif" border=0 width=159 height=320></div>
<div ID="img5"><img SRC="stretch232.gif" border=0 width=159 height=280></div>
<div ID="img6"><img SRC="stretch232.gif" border=0 width=159 height=240></div>
<div ID="img7"><img SRC="stretch232.gif" border=0 width=159 height=200></div>
<div ID="img8"><img SRC="stretch232.gif" border=0 width=159 height=160></div>
<div ID="img9"><img SRC="stretch232.gif" border=0 width=159 height=120></div>
<div ID="img10"><img SRC="stretch232.gif" border=0 width=159 height=90></div>
<div ID="img11"><img SRC="stretch232.gif" border=0 width=159 height=60></div>
<div ID="img12"><img SRC="stretch232.gif" border=0 width=159 height=30></div>
<div ID="img13"><img SRC="stretch232.gif" border=0 width=159 height=1></div>
<div ID="img14">&nbsp;</div>
<div ID="img15"><A HREF="javascript:expandNavigation()"><IMG SRC="open232.gif" BORDER=0 width="159" height="20"></A></div>
<div ID="img16"><IMG SRC="choose232.gif" BORDER=0 width="159" height="20"></div>


</BODY>
</HTML>

Vložil/Poslal/Autor: Admin
Funkčnost: správná funkčnost testována v IE 6 a Firefoxu
zavřít okno | jít na hlavní stránku JakNaWeb.com