// JavaScript Document



//First get your list of files in the order you want them:

database=new Array("architectural_01.php", //THIS MUST REMAIN AS THE FIRST FILE
				   "architectural_02.php",
				   "architectural_03.php",
				   "architectural_04.php",
				   "architectural_05.php",
				   "architectural_06.php",
				   "architectural_07.php",
				   "architectural_08.php",
				   "architectural_09.php",
				   "architectural_10.php"
				   );

//The above is all you need to change!



NumberOfFiles=database.length;
StringA=location.href;
LengthA=StringA.length
A=StringA.lastIndexOf("/")+1;
ThisFilename=StringA.substring(A,LengthA);


n=NumberOfFiles-1;


for (var i = 0; i <= n; i++) {
	if (database[i]==ThisFilename)
{

ThisPageNumber=i;

}

}


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){

alert("You are at the end of the series")

}

else

{top.location=database[ThisPageNumber+1]}}


