//the number of images you have - VERY IMPORTANT!
function maxPicNum(){return 8}

//you'll need to change this line to be your website
//the 850 and 700 are widths i use for an 800x600 picture
function specificOpen(){window.open('viewer.html?'+arguments[0], 'NewWindow', 'width=800, height=600')}

//this generates the thumbnailed index, 5 thumbs per line in a table
function thumb(){
	var i
	var begNum = arguments[0]
	var endNum = arguments[1]
	var zero
	var html = '<div id="galleryTable">'

	for(i = begNum; i <= endNum; i++){
		zero = ''
		if(!((i-begNum)%6))
			html += ''
		if(i<100)
			zero += '0'
		if(i<10)
			zero += '0'
		html += '<a href="javascript:specificOpen('+i+')"><img src="thumbs/'+zero+i+'.jpg" align=top border=0 alt="Picture #'+i+'"></a>'
		if(!((i-begNum+1)%6) && i != endNum)
			html += ''
	}

	var j = i+6-(i%6)
	for(i; i<j; i++){
		html += ''
	}
	html += '</div>'

	return html
}