Etape 1 : Ajouter entre les balises <HEAD>...</HEAD>:
<script language="javascript"> <!-- var isNS = (navigator.appName == "Netscape"); var HIDDEN = (isNS) ? 'hide' : 'hidden'; var VISIBLE = (isNS) ? 'show' : 'visible'; function startme(){ //position de départ horizontale layer2.left = 680; //position de départ verticale layer2.top = 380; showObject(layer2); //position de départ horizontale, position d'arrivée horizontale, position de départ verticale, position d'arrivée verticale slidel2(680,10,380,10); } function slidel2(from,to,from1,to1) { if (from > to) { layer2.left = (from -= 7); } if (from1 > to1) { layer2.top = (from1 -= 4); } if ((from > to) || (from1 > to1)){ setTimeout('slidel2(' + from + ',' + to + ',' + from1 +',' + to1 + ')', 25); } } function showObject(object) { object.visibility = VISIBLE; } function hideObject(object) { object.visibility = HIDDEN; } //--> </script> <style type="text/css"> <!-- .image {position:absolute; z-index:1; visibility:hidden} --> </style>
Il faut modifier :
Etape 2 : Ajouter juste après la balise body.
C'est ici qu'il faut mettre le nom de l'image et la valeur des attributs width et height.
<div id="layer2" class="image"> <img src="image.html" width=xxx height=yyy> </div> <script language="javascript"> var layer2 = (isNS) ? document.layer2 : document.all.layer2.style; </script>
Etape 3 : Ajouter à la balise body.
<BODY onload ="startme()">