// Edgar V. Poirier
// February 2000
// FINAL February 9, 2001
var wW, wH, picRatio, pL, pT, pH, pW, maxW, R, A, x, y, picPosition, shift, oldPos, tFlip, sb
w=document.body
// *** Set the font size here - This overrides the Style ***
baseFont=14
// *** Set position of image ***
// *** Enter "R" or "L" ***
picPosition="L"
// *** Shift the image to the opposite side after entry? ***
// *** Enter "Y" or "N" ***
shift="Y"
// Initialize stuff
function setUp() {
wW=w.clientWidth
wH=w.clientHeight
picPosition=oldPos
tFlip=0
if (shift=="Y") {tFlip=1}
// Set the final horizontal placement
if (picPosition=="L") {
x=0
}else{
x=wW
}
// Initialize a few things
y=0
A=0
// Start with a small image
pW=4
pH=pW*picRatio
R=maxW-pW
pT=0
pL=0
pic.style.width=pW
pic.style.height=pH
pic.style.left=pL
pic.style.top=pT
textbox.style.display="none"
textbox.style.left=0
textbox.style.top=0
textbox.style.height=wH
textbox.style.width=wW-maxW
// Let's go
growIt()
}
// Grow the image in a spiral
function growIt() {
// Adjust for text height if scrollbar needed
sb=0
textbox.style.display=""
if (textbox.scrollHeight>wH) {sb=15}
textbox.style.display="none"
textbox.style.width=wW
// Is the image full size?
if (pW<=maxW || pT>0) {
// No
if (picPosition=="R") {x=wW-(pW+sb)}
// Set the rotation speed here
A=A-.1
pT=Math.floor(R*Math.sin(A)+y)
pL=Math.floor(R*Math.cos(A)+x)
// Grow the image 1 pixel per step
pW=pW+8
R=maxW-pW
pH=Math.floor(pW*picRatio)
pic.style.width=pW
pic.style.height=pH
pic.style.left=pL
pic.style.top=pT
// Repeat until done.
setTimeout("growIt()",2)
}else{
if (shift=="Y") {
doShift()
}else{
fixText()
}
}
}
function doShift() {
if (tFlip==1) {
if (picPosition=="L" && pL
0) {
pL=pL-2
if (pL>0) {
pic.style.left=pL
setTimeout("doShift()",32)
}else{
pL=0
picPosition="L"
tFlip=0
fixText()
}
}
}
}
}
function fixText() {
// Yes so make sure the text is ready
if (picPosition=="L") {
textbox.style.paddingLeft=pW
}else{
textbox.style.paddingRight=pW+sb
}
// then display it.
textbox.filters[0].Apply()
textbox.style.display=""
textbox.filters[0].Play()
}
// Start here.
function strt() {
// Get users screen resolution
wx=window.screen.width
// and adjust font size to match. This will have the same size font
// appear no matter what the viewer's screen resolution is
Res=Math.floor(Math.sqrt(wx))-25
// Set the font size
w.style.fontSize = baseFont+Res
// Maximum initial distance
maxW=pic.style.pixelWidth
// Remember the image ratio so we can resize it later.
picRatio=pic.style.posHeight/pic.style.posWidth
w.scroll="YES"
numPics=(wx/bkg.style.posWidth+2)*(wx/bkg.style.posHeight+2)
data=""
data=data+"
"
for (i=1; i<=numPics; i++) {
data=data+"
"
}
data=data+" "
w.insertAdjacentHTML ("afterBegin", data)
oldPos=picPosition
setUp()
}
// If window is resized then this will run.
function doResize() {
textbox.filters[0].Stop()
textbox.style.display="none"
setUp()
}
%
25
3C/SCRIPT>
SWEET PRAYER!!!