Ho questo script che comando chiamando la funzione esce o la funzione rientra per mostrare/nascondere un layer.
Vorrei che l'azione fosse pilotata da un link solo che metterei su una immagine a forma di linguetta. Ma non so come fare !
Mi aiutate cambiando lo script !
<SCRIPT type=text/javascript>
<!--
function init(){
if(document.getElementById){
obj = document.getElementById("menuDiv");
obj.style.left = -595;
}
}
function esce(){
if(document.getElementById){
if(parseInt(obj.style.left) < 100){
obj.style.left = parseInt(obj.style.left) + 15 + "px";
setTimeout("esce()",1);
}
}
}
function rientra(){
if(document.getElementById){
if(parseInt(obj.style.left) > -595){
obj.style.left = parseInt(obj.style.left) - 15 + "px";
setTimeout("rientra()",1);
}
}
}
//-->
</SCRIPT>