New Revised CSS Library Forums Web Tools
FAQs Awards Usage Terms Contact

<html>
<head>
<style>
<!--
.intro{
position:fixed;
left:0;
top:0;
layer-background-color:red;
background-color:red;
border:0.1px solid red;
z-index:9;
}
-->
</style>
</head>

<body>
<div id="i1" class="intro"></div><div id="i2" class="intro"></div>
<script language="JavaScript1.2">

/*
Left-Right Curtain Script- Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more free DHTML scripts, and TOS,
visit http://dynamicdrive.com
*/


var speed=20
var temp=new Array()
var temp2=new Array()

var clipright=(window.innerWidth)?window.innerWidth/2:document.body.clientWidth/2,clipleft=0
for (i=1;i<=2;i++){
temp[i]=document.getElementById("i"+i).style
temp[i].width=(window.innerWidth)?window.innerWidth/2 + 'px' :document.body.clientWidth/2 + 'px'
temp[i].height=(window.innerHeight)?window.innerHeight + 'px': document.body.offsetHeight + 'px'
temp[i].left=(i-1)*parseInt(temp[i].width) + 'px'
}


function openit(){

clipright-=speed
temp[1].clip="rect(0 "+clipright+"px auto 0)"
clipleft+=speed
temp[2].clip="rect(0 auto auto "+clipleft+"px)"
if (clipright<=0){
clearInterval(stopit)
temp[1].display="none"
temp[2].display="none"

}
}

function gogo(){
stopit=setInterval("openit()",100)
}
gogo()

</script>
</body>
</html>