	hdir="RLIR05"
	ixI=0
	ixP=0
	sld=0
if (location.href.indexOf("?") != -1)
 {	urlQ= location.href.split("?") 
	if (urlQ[1].indexOf(",") == -1)
	{ 	hdir=urlQ[1]
	}
	else{
	urlQ= location.href.split("?")
	urlT = urlQ[1].split(",")
	ixI = parseInt(urlT[2])
	ixP = parseInt(urlT[3])
	sld = parseInt(urlT[4])
	hdir=(urlT[0])
	}
}
if (hdir.indexOf("=") != -1)
 {ieq=hdir.split("=")
 hdir=(ieq[0])
 } 

       document.write(" <SCR")
	document.write("IPT language='JavaScript1.1' src='"+hdir+"/data.js'></SCRIPT>")
var hrw,hcl,him
function ldImg() {

hrw=4 //rows
hcl=columns
him=hrw*hcl
ttI=thumbDB.length
document.write('<div align="center">')
document.write(' <font color="#FF0000" size="4" face="Arial">'+title+'</font><br>')
document.write(' <font color="#FF0000" size="3" face="Arial">'+subTitle+'</font><br>')
if (sld== 1){
btsl='stop-button.gif'
}
else{
btsl='play-button.gif'
}
if(ixP>0){
if(ixI<0)
{ixI=ttI-1;
}
if(ixI>=ttI)
{ixI=0;}


document.write('<A hREF="photo.htm?'+hdir+',,'+[ixI-1]+',1,0"><IMG src="previous-button.gif" alt="Previous Photo"></A>&nbsp; &nbsp;&nbsp; &nbsp;')
document.write('<A hREF="photo.htm?'+hdir+',,'+ixI+',0,0"><IMG src="home-button.gif" alt="Thumbnails Page"></A>&nbsp; &nbsp;&nbsp; &nbsp;')
document.write('photo '+[ixI+1]+' of '+ttI+'&nbsp; &nbsp;&nbsp; &nbsp;<A onclick=ssSS(1) ref="javascript:void(0)">')
document.write('<IMG name="bts2" src="'+btsl+'" alt="Loading ...."></A>&nbsp; &nbsp;&nbsp; &nbsp;')	
document.write('<A hREF="photo.htm?'+hdir+',,'+[ixI+1]+',1,0"><IMG src="next-button.gif" alt="Next Photo">  </A><br>')
document.write('<hr><IMG src="'+hdir+'/hh/'+imageDB[ixI]+'"><br> ')
document.write(imageDB[ixI].substring(7,30)+'<br>')
document.write('<A hREF="photo.htm?'+hdir+',,'+[ixI-1]+',1,0"><IMG src="previous-button.gif" alt="Previous Photo"></A>&nbsp; &nbsp;&nbsp; &nbsp;')
document.write('<A hREF="photo.htm?'+hdir+',,'+ixI+',0,0"><IMG src="home-button.gif" alt="Thumbnails Page"></A>&nbsp; &nbsp;&nbsp; &nbsp;')	
document.write('<A onclick=ssSS(1) ref="javascript:void(0)">')
document.write('<IMG name="bts3" src="'+btsl+'" alt="Loading ...."></A>&nbsp; &nbsp;&nbsp; &nbsp;')

document.write('&nbsp;&nbsp;&nbsp; &nbsp;')
document.write('<A hREF="photo.htm?'+hdir+',,'+[ixI+1]+',1,0"><IMG src="next-button.gif" alt="Next Photo">  </A>')

	}
else{
Tpg=parseInt(ttI/him)
ixI=parseInt(ixI/him)*him
if(ixI<0)
ixI=Tpg*him
if(ixI>Tpg*him)
ixI=0
Cpg=parseInt(ixI/him)
		dpT=ixI
document.write('<A hREF="photo.htm?'+hdir+',,'+[ixI-him]+',0,0"><IMG src="previous-button.gif" alt="Previous Page"></A>&nbsp; &nbsp;&nbsp; &nbsp;')
document.write('<A hREF="default.htm"><IMG src="home-button.gif" alt="Photo Library"></A>&nbsp; &nbsp;&nbsp; &nbsp;')
document.write('page '+(Cpg+1)+' of '+[Tpg+1]+'&nbsp;<A onclick=ssSS(1) ref="javascript:void(0)">&nbsp; &nbsp;&nbsp;&nbsp;')
document.write('<IMG name="bts1" src="'+btsl+'" alt="Loading ...."></A>&nbsp; &nbsp;&nbsp; &nbsp;')
document.write('<A hREF="photo.htm?'+hdir+',,'+[ixI+him]+',0,0"><IMG src="next-button.gif" alt="Next Photo"></A><hr>')

document.write('<TABLE>')
	for (var i = 0; i < hrw && dpT< ttI; i++) 
	{document.write('<TR align="center" valign="bottom">')
		for (var j = 0; j < hcl; j++) 
		{document.write('<TD width="110" height="110">')
			if (dpT< ttI)
			{document.write('<A hREF="photo.htm?'+hdir+',,'+dpT+',1,0"> <IMG src="'+hdir+'/hh/'+thumbDB[dpT]+'" alt="'+dpT+'# '+imageDB[dpT].substring(7,30)+'"></A>')
document.write('<br><font size=2>'+[dpT+1]+'</font>')
			dpT++
			}
 		document.write('</TD>')
		}
	document.write('</TR>')
	}
document.write('</Table><hr>')

document.write('<A hREF="photo.htm?'+hdir+',,'+[ixI-him]+',0,0"><IMG src="previous-button.gif" alt="Previous Page"></A>&nbsp; &nbsp;&nbsp; &nbsp;')
document.write('<A hREF="default.htm"><IMG src="home-button.gif" alt="Photo Library"></A>&nbsp; &nbsp;&nbsp; &nbsp;')
document.write('page '+(Cpg+1)+' of '+[Tpg+1]+'&nbsp; &nbsp;&nbsp; &nbsp;<A onclick=ssSS(1) ref="javascript:void(0)">')
document.write('<IMG name="bts0" src="'+btsl+'" alt="Loading ...."></A>')

document.write('&nbsp;&nbsp;&nbsp; &nbsp;')
document.write('<A hREF="photo.htm?'+hdir+',,'+[ixI+him]+',0,0"><IMG src="next-button.gif" alt="Next Photo"></A><br>')
}	
document.title+=" "+title+" "+subTitle
}
var timeout
function ssSS(aaaa) {

if (aaaa== 1){
	if (sld== 1) {
	sld = 0
	clearTimeout(timeoutID)
	}
	else {
	sld = 1
	ggSS()
	}
   }else{
if (sld== 1)
	{timeoutID = setInterval("ggSS()", 3000)}
   }		

for (var j = ixP*2; j < ixP*2+2; j++) {
cc="bts"+j
if (sld== 1){
document[cc].src='stop-button.gif'
document[cc].alt='Stop SlideShow'}
else{
document[cc].src='play-button.gif'
document[cc].alt='Play SlideShow'}

	}




}

function ggSS() {
ixP==1?ixI++:ixI+=him

	window.location.href = 'photo.htm?'+hdir+',,'+ixI+','+ixP+','+sld

}
