// JavaScript Document
var preloadedimages=new Array()
for (a=0;a<pages;a++){
for (b=0;b<4;b++){
preloadedimages[a]=new Image()
preloadedimages[a].src=photos[a][b]
}
}

function backward(){
if (which>0){
which--
if (photos[which][0]==""){
document.images.s1.src="images/blank.gif"
document.images.s1.border="none"}
else{
document.images.s1.src=path+photos[which][0]
document.images.s1.border="2"}
if (photos[which][1]==""){
document.images.s2.src="images/blank.gif"
document.images.s2.border="none"}
else{
document.images.s2.src=path+photos[which][1]
document.images.s2.border="2"}
if (photos[which][2]==""){
document.images.s3.src="images/blank.gif"
document.images.s3.border="none"}
else{
document.images.s3.src=path+photos[which][2]
document.images.s3.border="2"}
if (photos[which][3]==""){
document.images.s4.src="images/blank.gif"
document.images.s4.border="none"}
else{
document.images.s4.src=path+photos[which][3]
document.images.s4.border="2"}


}
}

function forward(){
if (which<pages-1){
which++
if (photos[which][0]==""){
document.images.s1.src="images/blank.gif"
document.images.s1.border="none"}
else{
document.images.s1.src=path+photos[which][0]
document.images.s1.border="2"}
if (photos[which][1]==""){
document.images.s2.src="images/blank.gif"
document.images.s2.border="none"}
else{
document.images.s2.src=path+photos[which][1]
document.images.s2.border="2"}
if (photos[which][2]==""){
document.images.s3.src="images/blank.gif"
document.images.s3.border="none"}
else{
document.images.s3.src=path+photos[which][2]
document.images.s3.border="2"}
if (photos[which][3]==""){
document.images.s4.src="images/blank.gif"
document.images.s4.border="none"}
else{
document.images.s4.src=path+photos[which][3]
document.images.s4.border="2"}

}
}

function transport1(){
var dest="largerimage.html?picture="+path+"a_"+photos[which][0];
window.open (dest,"mywindow","location=0,status=1,scrollbars=0,width=640,height=480"); }
function transport2(){
var dest="largerimage.html?picture="+path+"a_"+photos[which][1];
window.open (dest,"mywindow","location=0,status=1,scrollbars=0,width=640,height=480"); }
function transport3(){
var dest="largerimage.html?picture="+path+"a_"+photos[which][2];
window.open (dest,"mywindow","location=0,status=1,scrollbars=0,width=640,height=480"); }
function transport4(){
var dest="largerimage.html?picture="+path+"a_"+photos[which][3];
window.open (dest,"mywindow","location=0,status=1,scrollbars=0,width=640,height=480"); }