database=new Array("http://www.gibbons-realty.com/","alerts.htm","alertsText.htm","alertsImages.htm","jumpfunction.htm","alertConfirm.htm","alertConfirm2Locs.htm","alertConfirm3.htm","alertOnLoad.htm","HoverButtons.htm","alertPrompts.htm","alertPromptEx.htm","documentWrite.htm","documentWrite2.htm","WindowNew.htm","WindowNew2.htm","WindowNewHyperlinks.htm","menu1.htm","menuSelectOnChange.htm","ArrayText.htm","ArrayTextImage.htm","MenuDescriptions.htm","jsFrames.htm","frameHyperlinks.htm","FramesHyperlinks2.htm","frames_onLoad.htm","history.htm","BackForwardSimple.htm","BackForward.htm","BackForwardNew.htm","ArrayToContents.htm","searchEngine.htm");
database2=new Array("Contents of JavaScript","Message Boxes","Alerts from Text","Alerts from Images","Hyperlink Function","Choice Boxes","More about Confirm","Yet More Confirm","Onload Alerts","Hover Buttons","User input","Example","JavaScript Writing","More Writing","Windows 1","Windows2","Windows with Hyperlinks","Drop-down Menu","Automatic Menu","Menus with Descriptions","Menus with Descriptions2","Menus with Descriptions3","Frame Busting","Hyperlinks in Frames","Hyperlinks in Frames2","Loading orphan frames","History for Navigation","Back/Forward2","Back/Forward3","Back/Forward4","Writing a table of contents","A JavaScript Search Engine");
NumberOfFiles=database.length;

StringA=location.href;
LengthA=StringA.length
A=StringA.lastIndexOf("/")+1;
ThisFilename=StringA.substring(A,LengthA);
//--------------------------------------------------------


/*Find the page nunmber*/
n=NumberOfFiles-1;


for (var i = 0; i <= n; i++)
{
if (database[i]==ThisFilename)
{
ThisPageNumber=i;

}

}
//--------------------------------------------------------
//determine the numbers of the previous and the next pages//

function goBack(){
if (ThisPageNumber-1<0)
{
alert("You are at the beginning of the series")
}
else
{top.location=database[ThisPageNumber-1]
}
}

function goForward()
{
if (ThisPageNumber+1>n)
{
answer = confirm("You are at the end of the series. Press OK to go to the start, or cancel to remain where you are");

if (answer !=0)
{
top.location = "http://www.gibbons-realty.com/"
}




}
else
{
top.location=database[ThisPageNumber+1]
}
}
//---------------------------------------------

//This function sends the browser to the selected file

function goToPage12()
{
PageIndex12=document.form12.select12.selectedIndex
if (document.form12.select12.options[PageIndex12].value != "none")
{
location = document.form12.select12.options[PageIndex12].value
}
}
//End of function
//------------------------------------------------------

//The following function writes the select box

function MenuWriter()
{
document.write("<form name=form12>");
document.write("<select name=\"select12\" size=\"1\" onChange=\"goToPage12()\">");
document.write("<option value=\"none\" selected=\"Yes\">Choose a lesson </option>");
for (var i = 0; i <= n; i++)
{
document.write("<option value="+database[i]+">"+database2[i]+"</option>")

}

document.write("</select></form>")

}
//End of function writing select
//-------------------------------------------------------
//Start of function NextPreviousWriter
//This function writes the previous and next pages
function NextPreviousWriter()
{
if(database[ThisPageNumber-1])
{
document.write("[Back to: <a href="+database[ThisPageNumber-1]+">"+database2[ThisPageNumber-1]+"]</a>");
}
if(database[ThisPageNumber])
{
document.write("<br>Location: http://www.123ward.com/JavaScript/"+database[ThisPageNumber-1]);
}
if(database[ThisPageNumber+1])
{
document.write("<br>[On to: <a href="+database[ThisPageNumber+1]+">"+database2[ThisPageNumber+1]+"]</a><br>");
document.write("Most Recent Revision: 6-Oct-99.<br>Copyright © 1998,1999 "+
"<a href=\"mailto:kenjward@123ward.com?subject=Re: Java Script Tutorial\"></a>");
}
}

//end of NextPreviousWriter
//---------------------------------------------------------




