' Best for preview window. ' Lowest image distortion occurs when image is nearly square in shape. ' Cover Letter 2 Script and HTML follow. Option Explicit Dim screenx, screeny Dim Image1aHTML Dim mousex Dim percentOpen Dim letterWidth, letterHeight Dim flip Dim resizeFlag Dim startFlag resizeFlag=false startFlag=0 ' The padding values in the letterStyle area above are the margins for the text in the letter. Adjust for your background. ' Set letter width here. Width is proportionate to window width. letterWidth=.7 ' Set letter height here. Height is proportionate to window height. letterHeight=.94 ' Decide whether right image is to be flipped horizontally. "yes" or "no" flip="yes" Sub Window_OnLoad() startFlag=1 percentOpen=0 document.body.scroll="no" window.scrollTo 0,0 screenx=document.body.clientWidth screeny=document.body.clientHeight Image1.style.posHeight=screeny Image1.style.posWidth=(screenx/2) Image1.style.posTop=0 Image1.style.posLeft=0 Image1aHTML=Image1.outerHTML Image1aHTML=Replace(Image1aHTML,"id=Image1","id=Image1a") Image1.insertAdjacentHTML "BeforeBegin",Image1aHTML if Lcase(flip)="yes" then Image1a.style.filter="fliph()" Image1a.style.posWidth=screenx-Image1.style.posWidth Image1a.style.posLeft=Image1.style.posWidth letter2.style.posWidth=screenx*letterwidth letter2.style.posHeight=screeny*letterHeight letter2.style.posLeft=(screenx-letter2.style.posWidth)/2 letter2.style.posTop=(screeny-letter2.style.posHeight)/2 letter2.innerHTML=letter.innerHTML letter2.style.visibility="visible" tip.style.posTop=5 tip.style.posLeft=5 tip.style.visibility="visible" Image1.style.visibility="visible" Image1a.style.visibility="visible" SetTimeOut"removeTip",4000 End Sub Sub Window_OnResize() if resizeFlag then window.scrollTo 0,0 image1a.outerHTML="" Window_OnLoad resizeFlag=false Exit Sub else resizeFlag=true end if End Sub Sub removeTip() tip.filters(0).Apply() tip.style.visibility="hidden" tip.filters(0).Play(2.000) End Sub Sub mouseMove() if startFlag=0 then Exit Sub mousex=window.event.x percentOpen=mousex/((screenx*letterWidth)+letter2.style.posLeft-10) if percentOpen>(screenx*letterWidth) then percentOpen=1 if percentOpen<.05 then percentOpen=0 Image1.style.posLeft=-(percentOpen*Image1.style.posWidth) Image1a.style.posLeft=(screenx-Image1a.style.posWidth)+(percentOpen*Image1a.style.posWidth) End Sub Sub shutterTest() if percentOpen<.5 then percentOpen=0 Image1.style.posLeft=-(percentOpen*Image1.style.posWidth) Image1a.style.posLeft=(screenx-Image1a.style.posWidth)+(percentOpen*Image1a.style.posWidth) end if End Sub