TITLE>curtain open to the sides code</TITLE><script language="JavaScript">xLeft = 0;xRight = 0;function openCurtain(){ xLeft -= 5 xRight += 5 if (navigator.appName == "Netscape"){ document.curtainLeft.left = xLeft document.curtainRight.left = xRight aLeft = document.curtainLeft.left } else{ document.all.curtainLeft.style.left = xLeft; document.all.curtainRight.style.left = xRight; a = document.all.curtainLeft.style.left; aLen = a.length; a = a.split(""); aLeft = "" for (k = 0; k < aLen - 2; k++){ aLeft += a[k] } aLeft = new Number(aLeft) } if(aLeft > stopPos){ var timer=setTimeout("openCurtain()",10) } else{ if (navigator.appName == "Netscape"){ document.curtainLeft.visibility = document.curtainRight.visibility = "hide" } else{ document.all.curtainLeft.style.visibility = document.all.curtainRight.style.visibility = "hidden" } }}// --></script></HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#000080" ALINK="#000080" onLoad="openCurtain();"><CENTER><H3>Curtain Effect - Centre Open</H3></CENTER><script language="JavaScript"><!-- Hide from old browsersif (navigator.appName == "Netscape"){ document.write('<layer name="curtainLeft" left="0" top="0" bgcolor="#0000FF" width="100" height="100" visibility="show"></layer>'); document.write('<layer name="curtainRight" left="0" top="0" bgcolor="#0000FF" width="100" height="100" visibility="show"></layer>'); document.curtainLeft.clip.height = document.curtainRight.clip.height = window.innerHeight; document.curtainLeft.clip.width = document.curtainRight.clip.width = document.curtainRight.clip.left = (window.innerWidth/2) - 10 stopPos = "-" + window.innerWidth/2}else{ document.write("<span id='curtainLeft' style='position:absolute;visibility:visible;top:0;left:0;background-color:#0000FF;'></span>"); document.write("<span id='curtainRight' style='position:absolute;visibility:visible;top:0;left:0;background-color:#0000FF;'></span>"); xRight = document.all.curtainRight.style.left = document.all.curtainLeft.style.width = document.all.curtainRight.style.width = document.all.curtainRight.style.left = (document.body.clientWidth/2) - 10 document.all.curtainLeft.style.height = document.all.curtainRight.style.height = document.body.clientHeight; stopPos = document.body.clientHeight * (-1);}// --></SCRIPT><HR></BODY></HTML>Please, READ the code and UNDERSTAND the questionhope someone got an idea, thanks in advanceCarmenEDITED for readability, in case someone else needs to read this jazz
Edited by dsenette, 08 August 2006 - 08:48 AM.