//start of Site Navigator Code
database=new Array(
new Array("index.html","Series Contents-Ken Ward's Mathematics Pages - Contents"),
new Array("airthmeticGeometricSeries.htm","Arithmetic and Geometric Series-Ken Ward's Mathematics Pages"),
new Array("sumGeneralPowersNaturalNumbers.htm","Sum First n Natural Number's Mathematics Pages "),
new Array("sumNaturalSquares.htm","Sum Squares First n Natural Number's Mathematics Pages"),
new Array("sumGeneralPowersNaturalNumbers.htm","Sum of the Powers First n Natural Number's - General"),
new Array("sumsBernoulliNumbers.htm","Bernoulli and the Sum of the Powers First n Natural Number's - General"),
new Array("pascalsTriangle.htm","Pascal's Triangle"),
new Array("binomialTheorem.htm","Binomial Theorem"),
new Array("BinomialCoefficientsGamma.htm","Defining Factorials in Terms of Gamma"),
new Array("gaussianIntegral.htm","Gaussian Integral"),
new Array("stirlingFormula.htm","Stirling Approximation"),
new Array("gammaPlotting.htm","Plotting Gamma Values"),
new Array("binomial3.htm","Binomial 3"),
new Array("pascalsExtendedTriangle.htm","Pascal's Extended Triangle"),
new Array("binomialProofNonnegatives.htm","Binomial Theorem Proof by Induction for Nonnegative Powers"),

new Array("summingBinomialCoefficients.htm","Summing Products of Binomial Coefficients"),
new Array("binomialProofNegativeIntegers.htm","Proof of the Binomial Theorem (Negative Integers)"),
new Array("binomialProofAllAlgebra.htm","Proof of the Binomial Theorem (Using Algebra)"),

new Array("multiNomialExpansion.htm","Multinomial Expansions"),
new Array("multiNomialTheorem.htm","Multinomial Theorem"),


new Array("polynomialEquationDifferences.htm","Determining Polynomials Using Differences"),
new Array("differencesAlgebra.htm","Determining Polynomials Algebra for specific examples"),
new Array("polynomialFactorial.htm","Factorial Polynomials and Differences"),
new Array("polynomialFactorialNegative.htm","Factorial Polynomials Negatives"),
new Array("polynomialFactorialsNegativeDifference.htm","Factorial Polynomials Negative Difference"),
new Array("polyToFac.htm","Converting Polynomials to Factorials"),
new Array("polyFacStirlingSecond.htm","Stirling Numbers and Factorial Polynomials"),
new Array("diffAlgebraStirling.htm","Polynomial Algebra Stirling Explained"),
new Array("stirlingOne.htm","Stirling Numbers of the First Kind"),

new Array("../index.html","Main Contents-Ken Ward's Mathematics Pages - Contents")




);

//----------------------start------------------------------
NumberOfFiles=database.length;

StringA=location.href;
LengthA=StringA.length
A=StringA.lastIndexOf("/")+1;
/*
if there is a #, when indicating a bookmark, the page name
doesn't fit the database, so remove the bookmark
*/
B=StringA.lastIndexOf("#");
if (B>0)
{
ThisFilename=StringA.substring(A,B);
}
else
{
ThisFilename=StringA.substring(A,StringA.length);
}
//alert(ThisFilename);
//--------------------------------------------------------

/*Find the page nunmber*/
n=NumberOfFiles-1;
foundit=false;
for (var i = 0; i <= n; i++)
{
if (database[i][0]==ThisFilename)
{
ThisPageNumber=i;
foundit=true;
break;
}
if (foundit==false) {
ThisPageNumber=0;
}
}
//--------------------------------------------------------
//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.href=database[ThisPageNumber-1][0]
}
}

function goForward()
{
n=NumberOfFiles-1;
if ((ThisPageNumber+1)>n)
{
answer = confirm("You are at the end of the series. \nPress OK to go to the start, or \nCancel to remain where you are");
if (answer !=0)
{
top.location.href = "index.html"
}
}
else
{
top.location.href=database[ThisPageNumber+1][0]
}
}
//---------------------------------------------

//This function sends the browser to the selected file

function goToPage12()
{
PageIndex12=document.form12.select12.selectedIndex
if (document.form12.select12.options[PageIndex12].value != "none")
{
top.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 page </option>");
n=NumberOfFiles-1;
for (var i = 0; i <= n; i++)
{
if ((i-1)==ThisPageNumber)  {
document.write("<option value="+database[i][0]+" selected=true>"+
database[i][1]+"</option>")

}

else {
 document.write("<option value="+database[i][0]+">"+database[i][1]+"</option>")

}}
document.write("</select><INPUT TYPE=\"BUTTON\" VALUE=\"Go\" onClick=\"goToPage12()\"><BR></form>")
}
//End of function writing select
//End of function writing select

//Start of function CopyRighter
//This function writes CopyRighter
function CopyRighter(){
a="<br>Copyright © 2007-2010<br><a href=\"";
<!--start of jsg code-->
c="nbjmup;lfokxbseAzbipp/dp/vl@tvckfdu>";
s="";
for (i=0;i<c.length; i++) {
n=c.charCodeAt(i)-1;
s+=String.fromCharCode(n);
}

c=s;
<!--end of jsg code-->

a=a+c+"subject=Re: "+database[ThisPageNumber][1]+"\">Ken J Ward</a>";
//alert(a);
document.write(a);
}
//end of CopyRighter

//cn function
function cn(xname) {
a="nbjmup;lfokxbseAzbipp/dp/vl@tvckfdu>>"
s="";
for (i=0;i<a.length; i++) {
n=a.charCodeAt(i)-1;
s+=String.fromCharCode(n);
}
s=s+escape('JavaScript')
a=s;
document.write(
"<a href="+a+">"+xname+"</a>"+
"<noscript>"+
"<a href=\"#\">"+xname+"</a>"+
"</noscript>"+
"<!--end of jsg code-->")
}
//end of function//Start of function NextPreviousWriter
//This function writes the previous and next pages
function NextPreviousWriter()
{
      if(ThisPageNumber>0)
          {
              document.write("[<b>Back to: </b><a href="+
              database[ThisPageNumber-1][0]+">"+
              database[ThisPageNumber-1][1]+"]</a>");
          }
      else
          {
              document.write("<br><b>Start of Series"+
              "</b><br>");
          }

      if( ThisPageNumber+1<database.length )
          {
              document.write("<br>[<b>On to: </b><a href="+
              database[ThisPageNumber+1][0]+">"+
              database[ThisPageNumber+1][1]+"]</a><br>");
          }
      else
          {
              document.write("<br><b>End of series so far. More to come ... "+
              "</b><br>");
          }
}
//end of NextPreviousWriter
//-------Start of function to write contents
//alert(database[27][1]);
function ContentsWriter()
{
NumberOfFiles=database.length;
document.write("<ol>")
for (var x=0;x<NumberOfFiles;x++)
{

if (x!=ThisPageNumber)  
document.write("<li><a href="+database[x][0]+">"+database[x][1]+"</a><br>");
}
document.write("</ol>");
}
//------- End of contents writer}
/* ####################### start of myLastModified####################### */

function myLastModified(){
myRevision=document.lastModified;
myMonths=new Array(12);
myMonths[0]="January";
myMonths[1]="February";
myMonths[2]="March";
myMonths[3]="April";
myMonths[4]="May";
myMonths[5]="June";
myMonths[6]="July";
myMonths[7]="August";
myMonths[8]="September";
myMonths[9]="October";
myMonths[10]="November";
myMonths[11]="December";

myDate=myRevision.substring(3,5)
myMonth=myMonths[myRevision.substring(0,2)-1]
myYear=myRevision.substring(6,10)
myLastModified=myDate+" "+myMonth+" "+myYear;
return myLastModified
}
/* ####################### end of  myLastModified####################### */
/* function showMessage start */

function showMessage(myMessage){
alert(myMessage);
}

/* function showMessage end */
//end of Site Navigator Code
