You're supposed to *bring* the coffee when you come for a visit!
Okay, you're just starting out in the programming realm, so you need to
understand a few things in order to be successful.
1. Computers are *not* smart. People *are* smart. Computers are completely
stupid. They do one thing, and they do it perfectly. They obey instructions.
Exactly. To the letter. This is in contradiction to people, who are so smart
that they interpret everything, and end up following instructions rather
badly. Now, I'm not putting people down. On the contrary. We've been trying
for decades to give computers the ability to do this (except for the
following instuctions badly part). Our ability to think creatively, to
interpret, to fill in the blanks, is what gives us, for example, the ability
to stand in a crowded party with loud music blaring in the background, and
everyone talking, and by a combination of observing the person next to us,
their body language, their lip movement, and their voice, separate their
speech from the cacophony of background noise, and understand (perhaps
imperfectly) what they're saying. At least get the gist of it. And when we
have trouble, we just shout "WHAT?" And do it again. For a computer to
understand what you're saying, you have to be in a very quiet room, and
speak very clearly into the microphone. And even then they often get it
wrong.
2. Everything inside the computer is math. Everything. It thinks in numbers,
it takes instructions as numbers, and it performs mathematical computations
with those numbers, and responds with numbers. It takes a lot of software
and hardware to translate human to the user from the computer, and math to
the computer from the user. This is precisely why the computer does what it
does perfectly. 2 + 2 *always* equals 4. On the other hand, if you ask any
number of people what "two and two" is, you're likely to get a variety of
answers. Examples:
"Four."
"Too into what?"
"Twins do what?"
"Twenty-two."
"Tutu."
"What a ballerina wears."
"So, you're calling me stupid."
"Do I know you?"
"It's a lovely day."
So, the first pre-requisite to programming is to understand that writing a
program (or a script, which is interpreted and run as if it were a program),
is to start thinking like a computer. One jot or tittle off and you're
toast. 2 + 20 does *not* equal 4. If you want the computer to do something,
you have to tell it *exactly* what to do. No more, and no less. And *nothing
else* I'm repeating myself for emphasis. While this is not necessary with
computers, it has the effect on humans of re-inforcing a certain instruction
and making it more difficult for the instruction to be mis-interpreted,
particularly when it is phrased in slightly different ways for clarity. And
of course, you might observe that I didn't actually repeat myself, but
restated the same idea in different words each time. But you were able to
interpret those different combinations of words as repetition, when in a
purely literal sense, there was no repetition. But I'll bet that you had no
problem at all with my statement that I was repeating myself. Computers, of
course, interpret nothing, so once is always plenty to a computer.
;-)
Similarly, as a programmer, you might say that I'm writing a program "by
proxy." *You're* the proxy. This is what makes it so difficult. I knew, for
example, that, being a human, and one not experienced in programming, that
you were likely to apply some interpretation to my words. So, I revised the
original document, and sent you the entire text (the second time around).
All that was necessary for you to do was to (optionally) change the images
links from absolute to relative, and paste it over your existing web page. I
made it as simple as possible.
But perhaps I made a mistake. That would be where I attempted to explain it
to you. I love to share what I know with others, to enable them to improve
their skills. That's why I hang out in these newsgroups. So, I gave you all
the technical background, about how the "body onload" event handler of an
HTML document is not always reliable, and the reasons why. I explained how a
browser starts parsing the document as soon as it starts receiving TCP
packets from the server, and why the method call to "ImageBook()" should
appear at the end of the JavaScript, just before the </script> tag. I
explained that, by moving the method call, it would not make the document
any larger, as it was simply moving a small block of text from one place in
the document to another. And perhaps that muddied the water, as the original
instruction was probably by now obsured with all of the extra information.
However, for the purpose of establishing what it was, I duplicate it here:
Remove the call to "ImageBoook()" from the body
tag, so that it looks like this:
body background="bg.jpg; width:100%">
Then, add the call to the function at the very bottom of your script:
...
function Book_Next_Delay(){
if(B_CrImg==Book_Image_Sources.length)B_CrImg=0;
B_RI.src=B_Pre_Img[B_CrImg].src;
B_RI.lnk=Book_Image_Sources[B_CrImg+1];
B_MI.style.zIndex=2;
B_LI.style.zIndex=1;
B_Angle=0;
B_CrImg+=2;
setTimeout("BookImages()",50)}
function B_LdLnk(){if(this.lnk)window.location.href=this.lnk}
function
B_Stp(){B_Stppd=true;this.style.cursor=this.lnk?"pointer":"default"}
function B_Rstrt(){B_Stppd=false}
ImageBook();
</script>
<p><b>NATE'S PHOTO ALBUM</b></p>
Now, I hope you'll indulge me if I attempt to analyze what I originally
instructed, and how you may have misinterpreted it. First, I told you to
remove the call to the "ImageBook()" function from the body tag. I knew that
might be difficult to understand to a novice, so I posted how the tag should
look:
body background="bg.jpg; width:100%">
Well, I'm human too. I left out the opening angle bracket when I copied it.
It *should* have looked like this:
<body background="bg.jpg; width:100%">
So, a possible theory is that you attempted to use it and FrontPage
complained. So you decided to interpret it. That is, of course, only a
theory.
The I posted the place in the code where the function call should be. I
added some of the existing code that surrounded it to provide context.
Perhaps this was the cause of your question about adding all that code to
the page. In fact, only the line
ImageBook();
was new in the block. But it's not hard for me to imagine that you didn't
see it. In any case, it was a miscommunication, due to the humanit of both
of us.
So, that didn't do the trick. You came back unsuccessful. At this point,
realizing that "what we have here is a failure to communicate," it seemed
best to me to simply post the whole page in the new format, and let you
change the links again and use it as is. How could anything go wrong? But I
underestimated humans again. The HTML in the page you linked to this last
time bore little resemblance to the code I posted. Here are some glaring
examples:
My code:
***********************************************************
<body background="bg.jpg; width:100%">
<div id="Book" style="width: 100%; height: 235">
<img id="placeHolder" src="
http://www.natesnursery.com/placeholder.gif"
width="176" height="197">
</div>
***********************************************************
Your code:
***********************************************************
<body onload="ImageBook();Pop_Go()" background= "bg.jpg">
<center>
<h3>NATE'S PHOTO ALBUM </h3>
<table><tr><td width="404">
<div id="Book" style="position:relative">
<img src="pics/cell.gif" width="100%" height="238">
</div>
</td>
<td> </td></tr></table>
</center>
<dl>
<dt><b>
***********************************************************
Now, the first thing I'd like to call your attention to is the <body> tag. I
*did* distinctly tell you to remove that function call from the tag, did I
not?
Secondly, note that in my code, there is a simple <div> tag enclosing an
<img> tag. My <div> tag has a style that sets the width to 100% (used by the
JavaScript to get the conter of the page by computing the width of the div)
, and the height at 235 (pixels by default). My <img> tag has an "id"
attribute, with the name "placeholder" (which is used by the JavaScript I
modified), and a height and width attribute.
Your code has a table with a single table row, and a single table cell,
enclosing a <div> tag, enclosing an <img> tag. So, where did the table come
from? Perhaps you took my comments about moving furniture around too
literally? ;-)
But, worse than that, your <div> tag has no width style set (critical), and
your <img> tag has no id attribute (critical). The image is also set to have
a width of 100%, for reasons I cannot imagine!
So, on to the next comparison:
My code:
***********************************************************
/***************** DO NOT EDIT BELOW **********************************/
var B_LI,B_MI,B_RI,B_TI,B_Angle=0,B_CrImg=6,B_MaxW,B_Direction=1;
var B_MSz,B_Stppd=false;B_Pre_Img=new Array(Book_Image_Sources.length);
function ImageBook(){
if(document.getElementById){
Book_Div=document.getElementById("Book");
Book_Left = Book_Div.offsetWidth / 2 - Book_Image_Width;
for(i=0;i<Book_Image_Sources.length;i+=2){
B_Pre_Img
=new Image();B_Pre_Img.src=Book_Image_Sources}
B_LI=document.createElement("img");Book_Div.appendChild(B_LI);
B_RI=document.createElement("img");Book_Div.appendChild(B_RI);
B_MI=document.createElement("img");Book_Div.appendChild(B_MI);
B_LI.style.position=B_MI.style.position=B_RI.style.position="absolute";
B_LI.style.zIndex=B_RI.style.zIndex=0;B_MI.style.zIndex=1;
B_LI.style.top=(Book_Vertical_Turn?Book_Image_Height+1:0)+"px";
B_LI.style.left=Book_Left+"px";
B_MI.style.top=0+"px";
B_MI.style.left=(Book_Vertical_Turn?Book_Left:Book_Left+Book_Image_Width+1)+"px";
B_RI.style.top=0+"px";
B_RI.style.left=(Book_Vertical_Turn?Book_Left:Book_Left+Book_Image_Width+1)+"px";
B_LI.style.height=Book_Image_Height+"px";
B_MI.style.height=Book_Image_Height+"px";
B_RI.style.height=Book_Image_Height+"px";
B_LI.style.width=Book_Image_Width+"px";
B_MI.style.width=Book_Image_Width+"px";
B_RI.style.width=Book_Image_Width+"px";
if(Book_Border){
B_LI.style.borderStyle=B_MI.style.borderStyle=B_RI.style.borderStyle="solid";
B_LI.style.borderWidth=1+"px";
B_MI.style.borderWidth=1+"px";
B_RI.style.borderWidth=1+"px";
B_LI.style.borderColor=B_MI.style.borderColor=B_RI.style.borderColor=Book_Border_Color}
B_LI.src=B_Pre_Img[0].src;
B_LI.lnk=Book_Image_Sources[1];
B_MI.src=B_Pre_Img[2].src;
B_MI.lnk=Book_Image_Sources[3];
B_RI.src=B_Pre_Img[4].src;
B_RI.lnk=Book_Image_Sources[5];
B_LI.onclick=B_MI.onclick=B_RI.onclick=B_LdLnk;
B_LI.onmouseover=B_MI.onmouseover=B_RI.onmouseover=B_Stp;
B_LI.onmouseout=B_MI.onmouseout=B_RI.onmouseout=B_Rstrt;
BookImages()}}
function BookImages(){
if(!B_Stppd){
if(Book_Vertical_Turn){
B_MSz=Math.abs(Math.round(Math.cos(B_Angle)*Book_Image_Height));
MidOffset=!B_Direction?Book_Image_Height+1:Book_Image_Height-B_MSz;
B_MI.style.top=MidOffset+"px";
B_MI.style.height=B_MSz+"px"}
else{ B_MSz=Math.abs(Math.round(Math.cos(B_Angle)*Book_Image_Width));
MidOffset=B_Direction?Book_Image_Width+1:Book_Image_Width-B_MSz;
B_MI.style.left=Book_Left+MidOffset+"px";
B_MI.style.width=B_MSz+"px"}
B_Angle+=Book_Speed/720*Math.PI;
if(B_Angle>=Math.PI/2&&B_Direction){
B_Direction=0;
if(B_CrImg==Book_Image_Sources.length)B_CrImg=0;
B_MI.src=B_Pre_Img[B_CrImg].src;
B_MI.lnk=Book_Image_Sources[B_CrImg+1];
B_CrImg+=2}
if(B_Angle>=Math.PI){
B_Direction=1;
B_TI=B_LI;
B_LI=B_MI;
B_MI=B_TI;
if(Book_Vertical_Turn)B_MI.style.top=0+"px";
else B_MI.style.left=Book_Left+Book_Image_Width+1+"px";
B_MI.src=B_RI.src;
B_MI.lnk=B_RI.lnk;
setTimeout("Book_Next_Delay()",Book_NextPage_Delay)}
else setTimeout("BookImages()",50)}
else setTimeout("BookImages()",50)}
function Book_Next_Delay(){
if(B_CrImg==Book_Image_Sources.length)B_CrImg=0;
B_RI.src=B_Pre_Img[B_CrImg].src;
B_RI.lnk=Book_Image_Sources[B_CrImg+1];
B_MI.style.zIndex=2;
B_LI.style.zIndex=1;
B_Angle=0;
B_CrImg+=2;
setTimeout("BookImages()",50)}
function B_LdLnk(){if(this.lnk)window.location.href=this.lnk}
function
B_Stp(){B_Stppd=true;this.style.cursor=this.lnk?"pointer":"default"}
function B_Rstrt(){B_Stppd=false}
ImageBook();
</script>
<p><b>NATE'S PHOTO ALBUM</b></p>
<p><b><a href="Photos.htm">HOME</a></b></p>
</body>
***********************************************************
Your code:
***********************************************************
var B_LI,B_MI,B_RI,B_TI;
var B_Angle=0,B_CrMImg,B_CrSImg,B_MaxW,B_Drctn=true,B_DirChngd=false;
var B_Srcs=Book_Image_Sources,B_SrcL=B_Srcs.length,B_ChngDirFlg=false;
var B_MSz,B_Stppd=Book_Auto?false:true;B_Pre_Img=new Array(B_SrcL);
function ImageBook(){
if(document.getElementById){
for(var i=0;i<B_SrcL;i+=3){B_Pre_Img=new
Image();B_Pre_Img.src=B_Srcs}
Book_Div=document.getElementById("Book");
B_LI=document.createElement("img");Book_Div.appendChild(B_LI);
B_RI=document.createElement("img");Book_Div.appendChild(B_RI);
B_MI=document.createElement("img");Book_Div.appendChild(B_MI);
B_LI.style.position=B_MI.style.position=B_RI.style.position="absolute";
B_LI.style.zIndex=B_RI.style.zIndex=0;B_MI.style.zIndex=1;
B_LI.style.top=B_LI.style.left=B_MI.style.top=B_RI.style.top=0+"px";
B_MI.style.left=(Book_BackWard?0:Book_Image_Width+1)+"px";
B_RI.style.left=Book_Image_Width+1+"px";
B_LI.style.height=B_MI.style.height=B_RI.style.height=Book_Image_Height+"px";
B_LI.style.width=B_MI.style.width=B_RI.style.width=Book_Image_Width+"px";
if(Book_Border){
B_LI.style.borderStyle=B_MI.style.borderStyle=B_RI.style.borderStyle="solid";
B_LI.style.borderWidth=B_MI.style.borderWidth=B_RI.style.borderWidth=1+"px";
B_LI.style.borderColor=B_MI.style.borderColor=B_RI.style.borderColor=Book_Border_Color}
B_LI.src=Book_BackWard?B_Srcs[B_SrcL-12]:B_Srcs[0];
B_LI.lnk=Book_BackWard?B_Srcs[B_SrcL-11]:B_Srcs[1];
B_LI.trgt=Book_BackWard?B_Srcs[B_SrcL-10]:B_Srcs[2];
B_MI.src=Book_BackWard?B_Srcs[B_SrcL-6]:B_Srcs[3];
B_MI.lnk=Book_BackWard?B_Srcs[B_SrcL-5]:B_Srcs[4];
B_MI.trgt=Book_BackWard?B_Srcs[B_SrcL-4]:B_Srcs[5];
B_RI.src=Book_BackWard?B_Srcs[B_SrcL-3]:B_Srcs[9];
B_RI.lnk=Book_BackWard?B_Srcs[B_SrcL-2]:B_Srcs[10];
B_RI.trgt=Book_BackWard?B_Srcs[B_SrcL-1]:B_Srcs[11];
B_CrMImg=Book_BackWard?B_SrcL-9:6;
B_CrSImg=Book_BackWard?B_SrcL-18:15;
B_LI.onclick=B_MI.onclick=B_RI.onclick=B_LdLnk;
B_LI.onmouseover=B_MI.onmouseover=B_RI.onmouseover=B_Stp;
B_LI.onmouseout=B_MI.onmouseout=B_RI.onmouseout=B_Rstrt;
BookImages()}}
function BookImages(){
if(!B_Stppd){
if(B_ChngDirFlg)B_ChngDrctn();
B_MSz=Math.abs(Math.round(Math.cos(B_Angle)*Book_Image_Width));
MidOffset=!Book_BackWard?B_Drctn?Book_Image_Width+1:Book_Image_Width-B_MSz:
B_Drctn?Book_Image_Width-B_MSz:Book_Image_Width+1;
B_MI.style.left=MidOffset+"px";
B_MI.style.width=B_MSz+"px";
B_Angle+=Book_Speed/720*Math.PI;
if(B_Angle>=Math.PI/2&&B_Drctn){
B_Drctn=false;
B_MI.src=B_Srcs[B_CrMImg];B_MI.lnk=B_Srcs[B_CrMImg+1];B_MI.trgt=B_Srcs[B_CrMImg+2];
B_CrMImg+=(Book_BackWard?-6:6);
if(B_CrMImg>=B_SrcL)B_CrMImg-=B_SrcL;
if(B_CrMImg<0)B_CrMImg+=B_SrcL}
if(B_Angle>=Math.PI){
B_Drctn=true;
if(!Book_BackWard){
B_TI=B_LI;B_LI=B_MI;B_MI=B_TI;
B_MI.style.left=Book_Image_Width+1+"px";
B_MI.src=B_RI.src; B_MI.lnk=B_RI.lnk;B_MI.trgt=B_RI.trgt}
else{ B_TI=B_RI;B_RI=B_MI;B_MI=B_TI;
B_MI.style.left=0+"px";
B_MI.src=B_LI.src;B_MI.lnk=B_LI.lnk;B_MI.trgt=B_LI.trgt}
setTimeout("Book_Next_Delay()",Book_NextPage_Delay)}
else setTimeout("BookImages()",50)}
else setTimeout("BookImages()",50)}
function Book_Next_Delay(){
if(!Book_BackWard){
B_RI.src=B_Srcs[B_CrSImg];
B_RI.lnk=B_Srcs[B_CrSImg+1];B_RI.trgt=B_Srcs[B_CrSImg+2];
B_LI.style.zIndex=1}
else{ B_LI.src=B_Srcs[B_CrSImg];
B_LI.lnk=B_Srcs[B_CrSImg+1];B_LI.trgt=B_Srcs[B_CrSImg+2];
B_RI.style.zIndex=1}
B_MI.style.zIndex=2;B_Angle=0;
B_CrSImg+=(Book_BackWard?-6:6);
if(B_CrSImg>=B_SrcL&&!Book_BackWard)B_CrSImg-=B_SrcL;
if(B_CrSImg<0&&Book_BackWard)B_CrSImg+=B_SrcL;
if(!Book_Auto&&!B_DirChngd)B_Stppd=true;B_DirChngd=false;
setTimeout("BookImages()",50)}
function B_ChngDrctn(){
B_Stppd=true;
Book_BackWard=Book_BackWard?false:true;B_Drctn=B_Drctn?false:true;
B_Angle=Math.PI-B_Angle;
B_ChngDirFlg=B_Stppd=false;
B_CrMImg+=(Book_BackWard?-9:9);
if(B_CrMImg>=B_SrcL)B_CrMImg-=B_SrcL;
if(B_CrMImg<0)B_CrMImg+=B_SrcL;
B_CrSImg+=(Book_BackWard?-21:21);
if(B_CrSImg>=B_SrcL)B_CrSImg-=B_SrcL;
if(B_CrSImg<0)B_CrSImg+=B_SrcL;
B_DirChngd=true}
function Book_ChangeDirection(){B_Stppd=false;B_ChngDirFlg=true}
function
Book_GoBackWard(){B_Stppd=false;if(!Book_BackWard)Book_ChangeDirection()}
function
Book_GoForWard(){B_Stppd=false;if(Book_BackWard)Book_ChangeDirection()}
function Book_ChangeAuto(){B_Stppd=false;Book_Auto=Book_Auto?false:true}
function Book_Automated(){B_Stppd=false;Book_Auto=true}
function Book_Manual(){Book_Auto=false}
function
B_Stp(){if(Book_Auto)B_Stppd=true;this.style.cursor=this.lnk?"pointer":"default"}
function B_Rstrt(){if(Book_Auto)B_Stppd=false}
function B_LdLnk(){
var B_Frame;
if(this.lnk){
if(!this.trgt)location.href=this.lnk;
else if(this.trgt=="top")top.location.href=this.lnk;
else if(this.trgt=="new")window.open(this.lnk);
else if(B_Frame=parent.frames[this.trgt])B_Frame.location.href=this.lnk;
else location.href=this.lnk}}
</script>
<script type='text/javascript'>
function Pop_Go(){return}
function PopMenu(a,b){return}
function OutMenu(a){return}
if(document.getElementById){
document.write("<script type='text\/javascript'
src='scripts\/contextpop_var.js'><\/script>");
document.write("<script type='text\/javascript'
src='scripts\/popmenu_compact.js'><\/script>");
document.close()}
***********************************************************
HOKAY....., here's where all resemblance goes flying out de window. First, I
can' t help but notice that you have removed the line which the original
author put in, reading
/***************** DO NOT EDIT BELOW **********************************/
Perhaps your guilty conscience at work? ;-)
The rest of it is so different from what I gave you that it is pointless to
go into detail!
So, here's some more programming advice:
"First, do no harm." Yes, that's part of the Hyppocratic oath, but it
applies to programmers as well. What it means is, "if it ain't fixed, don't
broke it." Fortunately for programmers, we work with bits that can be copied
and stored, and easily replaced. The first thing a good programmer does
before messing with code is to make sure that one has a backup copy
available of the original, as it is easy enough to be taken down the garden
path, and find yourself lost in the woods before you know it. Rolling back
and starting fresh is quite useful to the developer.
In your case, I gave you code that I had personally tested, and guaranteed
as working straight out of the box. The last thing you want to do in a case
like that is to mangle it beyond all recognition. No doubt the experience
was educational, and you benefitted from it, but if the glove don't fit, you
must acquit!
I'm not going to make a second attempt to analze the brand-new software
you've created. Keep it somewhere safely off the Internet, and tinker with
it for your own edification. What I *will* is (for your convenience, as you
don't even seem to know where the original thread was) re-post the entire
code, *remove* the absolute paths and replace them with the original
relative paths, and give you this simple instruction:
***********************************************************
Copy the whole text and paste it over your existing HTML, all the way from
the <html> tag to the </html> tag. Make NO changes to any code in it until
and unless you safely back it up somewhere! I GUARANTEE IT WORKS!
Code follows:
***********************************************************
/******** DO NOT EDIT BELOW!!!! I REALLY MEAN IT THIS TIME!!! ***********/
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
</head>
<body background="bg.jpg; width:100%">
<div id="Book" style="width: 100%; height: 235">
<img id="placeHolder" src="placeholder.gif" width="176" height="197">
</div>
<script type="text/javascript">
/***********************************************
* Book Flip slideshow script- © Ger Versluis 2003
* Permission granted to DynamicDrive.com to feature script
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
/********************************************************
Create a div with transparent place holder in your html
<div id="Book" style="position:relative">
<img src="placeholder.gif" width="239" height="238">
</div>
width = 2*book image width +4 height = book image height+2
Insert onload in body tag
<body onload="ImageBook()">
*********************************************************/
// 7 variables to control behavior
var Book_Image_Width=239;
var Book_Image_Height=238;
var Book_Left;
var Book_Border=true;
var Book_Border_Color="gray";
var Book_Speed=15;
var Book_NextPage_Delay=1500; //1 second=1000
var Book_Vertical_Turn=0;
var ph;
if(document.getElementById){
Book_Div=document.getElementById("Book");
Book_Left = Book_Div.offsetWidth / 2 - Book_Image_Width;
ph = document.getElementById("placeholder");
ph.style.left = Book_Left;
}
// array to specify images and optional links. At least 4
// If Link is not needed keep it ""
Book_Image_Sources=new Array(
"small1.jpg","",
"small2.jpg","",
"small3.jpg","",
"small4.jpg","",
"small5.jpg","",
"small6.jpg","",
"small7.jpg","",
"small8.jpg","",
"small9.jpg","",
"small10.jpg","",
"small11.jpg","",
"small12.jpg","",
"small13.jpg","",
"small14.jpg","",
"small15.jpg","",
"small16.jpg","",
"small17.jpg","",
"small18.jpg","",
"small19.jpg","",
"small20.jpg","" // NOTE No comma after last line
);
/***************** DO NOT EDIT BELOW **********************************/
var B_LI,B_MI,B_RI,B_TI,B_Angle=0,B_CrImg=6,B_MaxW,B_Direction=1;
var B_MSz,B_Stppd=false;B_Pre_Img=new Array(Book_Image_Sources.length);
function ImageBook(){
if(document.getElementById){
Book_Div=document.getElementById("Book");
Book_Left = Book_Div.offsetWidth / 2 - Book_Image_Width;
for(i=0;i<Book_Image_Sources.length;i+=2){
B_Pre_Img=new Image();B_Pre_Img.src=Book_Image_Sources}
B_LI=document.createElement("img");Book_Div.appendChild(B_LI);
B_RI=document.createElement("img");Book_Div.appendChild(B_RI);
B_MI=document.createElement("img");Book_Div.appendChild(B_MI);
B_LI.style.position=B_MI.style.position=B_RI.style.position="absolute";
B_LI.style.zIndex=B_RI.style.zIndex=0;B_MI.style.zIndex=1;
B_LI.style.top=(Book_Vertical_Turn?Book_Image_Height+1:0)+"px";
B_LI.style.left=Book_Left+"px";
B_MI.style.top=0+"px";
B_MI.style.left=(Book_Vertical_Turn?Book_Left:Book_Left+Book_Image_Width+1)+"px";
B_RI.style.top=0+"px";
B_RI.style.left=(Book_Vertical_Turn?Book_Left:Book_Left+Book_Image_Width+1)+"px";
B_LI.style.height=Book_Image_Height+"px";
B_MI.style.height=Book_Image_Height+"px";
B_RI.style.height=Book_Image_Height+"px";
B_LI.style.width=Book_Image_Width+"px";
B_MI.style.width=Book_Image_Width+"px";
B_RI.style.width=Book_Image_Width+"px";
if(Book_Border){
B_LI.style.borderStyle=B_MI.style.borderStyle=B_RI.style.borderStyle="solid";
B_LI.style.borderWidth=1+"px";
B_MI.style.borderWidth=1+"px";
B_RI.style.borderWidth=1+"px";
B_LI.style.borderColor=B_MI.style.borderColor=B_RI.style.borderColor=Book_Border_Color}
B_LI.src=B_Pre_Img[0].src;
B_LI.lnk=Book_Image_Sources[1];
B_MI.src=B_Pre_Img[2].src;
B_MI.lnk=Book_Image_Sources[3];
B_RI.src=B_Pre_Img[4].src;
B_RI.lnk=Book_Image_Sources[5];
B_LI.onclick=B_MI.onclick=B_RI.onclick=B_LdLnk;
B_LI.onmouseover=B_MI.onmouseover=B_RI.onmouseover=B_Stp;
B_LI.onmouseout=B_MI.onmouseout=B_RI.onmouseout=B_Rstrt;
BookImages()}}
function BookImages(){
if(!B_Stppd){
if(Book_Vertical_Turn){
B_MSz=Math.abs(Math.round(Math.cos(B_Angle)*Book_Image_Height));
MidOffset=!B_Direction?Book_Image_Height+1:Book_Image_Height-B_MSz;
B_MI.style.top=MidOffset+"px";
B_MI.style.height=B_MSz+"px"}
else{ B_MSz=Math.abs(Math.round(Math.cos(B_Angle)*Book_Image_Width));
MidOffset=B_Direction?Book_Image_Width+1:Book_Image_Width-B_MSz;
B_MI.style.left=Book_Left+MidOffset+"px";
B_MI.style.width=B_MSz+"px"}
B_Angle+=Book_Speed/720*Math.PI;
if(B_Angle>=Math.PI/2&&B_Direction){
B_Direction=0;
if(B_CrImg==Book_Image_Sources.length)B_CrImg=0;
B_MI.src=B_Pre_Img[B_CrImg].src;
B_MI.lnk=Book_Image_Sources[B_CrImg+1];
B_CrImg+=2}
if(B_Angle>=Math.PI){
B_Direction=1;
B_TI=B_LI;
B_LI=B_MI;
B_MI=B_TI;
if(Book_Vertical_Turn)B_MI.style.top=0+"px";
else B_MI.style.left=Book_Left+Book_Image_Width+1+"px";
B_MI.src=B_RI.src;
B_MI.lnk=B_RI.lnk;
setTimeout("Book_Next_Delay()",Book_NextPage_Delay)}
else setTimeout("BookImages()",50)}
else setTimeout("BookImages()",50)}
function Book_Next_Delay(){
if(B_CrImg==Book_Image_Sources.length)B_CrImg=0;
B_RI.src=B_Pre_Img[B_CrImg].src;
B_RI.lnk=Book_Image_Sources[B_CrImg+1];
B_MI.style.zIndex=2;
B_LI.style.zIndex=1;
B_Angle=0;
B_CrImg+=2;
setTimeout("BookImages()",50)}
function B_LdLnk(){if(this.lnk)window.location.href=this.lnk}
function
B_Stp(){B_Stppd=true;this.style.cursor=this.lnk?"pointer":"default"}
function B_Rstrt(){B_Stppd=false}
ImageBook();
</script>
<p><b>NATE'S PHOTO ALBUM</b></p>
<p><b><a href="Photos.htm">HOME</a></b></p>
</body>
</html>
/******** DO NOT EDIT ABOVE!!!! I REALLY MEAN IT THIS TIME!!! ***********/
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
A watched clock never boils.