focus()
dirc = document.location.toString().split('/')
filename=dirc[dirc.length-1]

fileno=filename.split('.')

filenamearr=new Array("photo1.html","photo2.html","photo3.html","photo4.html","photo5.html","photo6.html","photo7.html","photo8.html","photo9.html","photo10.html","photo11.html","photo12.html","photo13.html","photo14.html","photo15.html","photo16.html","photo17.html","photo18.html","photo19.html","photo20.html","photo21.html","photo22.html","photo23.html","photo24.html");

i=0;


for(i;i<filenamearr.length;i++)if(filenamearr[i]==filename)break;

document.write("<table border=0 width='60%' cellpadding='0' cellspacing='0' align='center'><tr>")
if(i>0)
{
	document.write("<td width='50%'><table border=0 cellpadding='4' cellspacing='2'><tr><td><a href='"+filenamearr[0]+"'><img src='../images/picture-gallery/first.gif' border=0 alt='First'></a></td>")
	document.write("<td><a href="+filenamearr[i-1]+"><img src='../images/picture-gallery/back.gif' border=0 alt='Back'></a></td></tr></table></td><td width='40%'></td>")
}

 if(i<filenamearr.length-1)
{
	document.write("<td width='50%'></td><td align='right' width='50%'><table border=0 cellpadding='4' cellspacing='2'><tr><td><a href="+filenamearr[i+1]+"><img src='../images/picture-gallery/next.gif' border=0 alt='Next'></a></td>")
	document.write("<td><a href='"+filenamearr[filenamearr.length-1]+"'><img src='../images/picture-gallery/last.gif' border=0 alt='Last'></a></td></tr></table></td>")
}

document.write("</tr></table>")
