Rollover effect with JavaScript for left2.htm

  • Code for the HEAD section
  • Code for the BODY-section


    Code for the HEAD section

     

    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    <!--//
    if (document.images) {
    img1on = new Image(); // Active images
    img1on.src = "buttons/00w.png";
    img7on = new Image();
    img7on.src = "buttons/auw.png";
    img2on = new Image();
    img2on.src = "buttons/fiw.png";
    img4on = new Image();
    img4on.src = "buttons/gow.png";

    img3on = new Image();
    img3on.src = "buttons/hiw.png";

    img5on = new Image();
    img5on.src = "buttons/lew.png";
    img6on = new Image();
    img6on.src = "buttons/srw.png";
    img8on = new Image();
    img8on.src = "buttons/vew.png";

    img1off = new Image(); // Inactive images
    img1off.src = "buttons/00b.png";
    img7off = new Image();
    img7off.src = "buttons/aub.png";
    img2off = new Image();
    img2off.src = "buttons/fib.png";
    img4off = new Image();
    img4off.src = "buttons/gob.png";
    img3off = new Image();
    img3off.src = "buttons/hib.png";
    img5off = new Image();
    img5off.src = "buttons/leb.png";
    img6off = new Image();
    img6off.src = "buttons/srb.png";

    img8off = new Image();
    img8off.src = "buttons/veb.png";

    }
    function imgOn(imgName) {
    if (document.images) {
    document[imgName].src = eval(imgName + "on.src");
    }
    }
    function imgOff(imgName) {
    if (document.images) {
    document[imgName].src = eval(imgName + "off.src");
    }
    }
    //-->
    </SCRIPT>


     


    Code for the BODY section

    <A HREF="start.htm" onMouseOver="imgOn('img1')" onMouseOut="imgOff('img1')"><IMG NAME="img1" SRC="buttons/00b.png" border="0" ALT=""></A>
    <P>

    <A HREF="animals/animals.htm#austrich" onMouseOver="imgOn('img7')" onMouseOut="imgOff('img7')"><IMG NAME="img7" SRC="buttons/aub.png" border="0" ALT=""></A>

    <A HREF="site1/fishisgood.htm" onMouseOver="imgOn('img2')" onMouseOut="imgOff('img2')">
    <IMG NAME="img2" SRC="buttons/fib.png" border="0" ALT=""></A>

    <A HREF="animals/animals.htm#goose" onMouseOver="imgOn('img4')" onMouseOut="imgOff('img4')"><IMG NAME="img4" SRC="buttons/gob.png" border="0" ALT=""></A>

    <A HREF="animals/animals.htm#hippo" onMouseOver="imgOn('img3')" onMouseOut="imgOff('img3')"><IMG NAME="img3" SRC="buttons/hib.png" border="0" ALT=""></A>

    <A HREF="animals/animals.htm#leopard" onMouseOver="imgOn('img5')" onMouseOut="imgOff('img5')"><IMG NAME="img5" SRC="buttons/leb.png" border="0" ALT=""></A>

    <A HREF="site1/raphael_css.htm" onMouseOver="imgOn('img6')" onMouseOut="imgOff('img6')"><IMG NAME="img6" SRC="buttons/srb.png" border="0" ALT=""></A>

    <A HREF="site1/venezia.htm" onMouseOver="imgOn('img8')" onMouseOut="imgOff('img8')"><IMG NAME="img8" SRC="buttons/veb.png" border="0" ALT=""></A>

     


    Copyright Michael Karbo 2002