<font face="arial" size="2">
                                <br />   What about another global variable that flips before when you call setTimeout, and resets when the function actually runs?<br /><br /></font>
                <font face="Tahoma, Arial, Sans-Serif" size="2">
                                <b>From</b>: Guillaume <a href="mailto:javascript@webdesignofficina.com">javascript@webdesignofficina.com</a><br /></font>
                <br />I have two functions showing / hiding layer, each one with a different <br />delay.<br />Each function is fired with it's individual link: Show ( ShowDelayed() ) <br />// Hide ( HideDelayed() )<br />How do I avoid these function of running together, at the same time, if <br />a user clicks alternatively on the two links for example...<br />Each function should first end before the other one starts running...<br /><br />I have to achieve this inside the script and can't use a delayed onclick <br />for example...<br /><br />Don't know if this is clear... Have a rough example below...<br /><br />Regards,<br />Guillaume<br /><br />var HideChk = false;<br /><br />function Hide() {<br />if (HideChk) return;<br />HideChk = true;<br />var opts1 = document.getElementById("options");<br />opts1.style.display = "none";<br />}<br /><br />function HideDelayed() {<br />setTimeout('Hide()',6000)<br />}<br /><br />var ShowChk = false;<br /><br />function Show() {<br />if (ShowChk) return;<br />ShowChk = true;<br />var opts1 = document.getElementById("options");<br />opts1.style.display = "block";<br />}<br /><br />function ShowDelayed() {<br />setTimeout('Show()',3000)<br />}