' Window Shutters ' Script by Bill Scott, January, 2000 ' billscott@redrivernet.com Option Explicit Dim screenx, screeny Dim proportion Sub Window_OnLoad() ' Resize main photo. screenx=document.body.clientWidth screeny=document.body.clientHeight proportion=photo.style.posHeight/photo.style.posWidth ' Resize photo to fill screen, but keep proportions intact. if proportion*screenx>=screeny then photo.style.posHeight=proportion*screenx photo.style.posWidth=screenx else photo.style.posHeight=screeny photo.style.posWidth=screeny/proportion end if ' Resize the left and right shutters. screenx=document.body.clientWidth/2 leftcover.style.posWidth=screenx leftcover.style.posHeight=photo.style.posHeight screeny=document.body.clientHeight/2 rightcover.style.posWidth=screenx rightcover.style.posLeft=screenx rightcover.style.posHeight=photo.style.posHeight graphic3.style.posLeft=screenx-(graphic3.style.posWidth/2) introtext.style.posLeft=screenx-480 ' Turn it all on. leftcover.style.display="" rightcover.style.display="" graphic3.style.display="" introtext.style.display="" photo.style.display="" SetTimeOut"hideLogo",2400 End Sub Sub hideLogo() ' Hide small photo logo. graphic3.filters(0).Apply() graphic3.style.visibility="hidden" graphic3.filters(0).Transition=12 graphic3.filters(0).Play(4.000) SetTimeOut"openShutters",3200 End Sub Sub openShutters() ' Open the left shutter. leftcover.filters(0).Apply() leftcover.style.visibility="hidden" leftcover.filters(0).Transition=7 leftcover.filters(0).Play(3.300) ' Open the right shutter. rightcover.filters(0).Apply() rightcover.style.visibility="hidden" rightcover.filters(0).Transition=6 rightcover.filters(0).Play(3.300) ' Hide the introtext. introtext.filters(0).Apply() introtext.style.visibility="hidden" introtext.filters(0).Transition=12 introtext.filters(0).Play(4.000) SetTimeOut"showLogo",4000 End Sub Sub showLogo() ' Reposition and show the photo logo again. graphic3.style.posLeft=20 graphic3.style.posTop=170 graphic3.filters(0).Apply() graphic3.style.visibility="visible" graphic3.filters(0).Transition=12 graphic3.filters(0).Play(4.000) End Sub