/***********************************************
* DHTML slideshow script-  © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice must stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var photos=new Array();
var photoslink=new Array();
var which=0;

//define images. You can have as many as you want:
photos[0]="images/gallery/gallery_1.jpg";
photos[1]="images/gallery/gallery_2.jpg";
photos[2]="images/gallery/gallery_3.jpg";
photos[3]="images/gallery/gallery_4.jpg";
photos[4]="images/gallery/gallery_5.jpg";
photos[5]="images/gallery/gallery_6.jpg";
photos[6]="images/gallery/gallery_7.jpg";
photos[7]="images/gallery/gallery_8.jpg";
photos[8]="images/gallery/gallery_9.jpg";
photos[9]="images/gallery/gallery_10.jpg";
photos[10]="images/gallery/gallery_11.jpg";
photos[11]="images/gallery/gallery_12.jpg";
photos[12]="images/gallery/gallery_13.jpg";
photos[13]="images/gallery/gallery_14.jpg";
photos[14]="images/gallery/gallery_15.jpg";
photos[15]="images/gallery/gallery_16.jpg";
photos[16]="images/gallery/gallery_17.jpg";
photos[17]="images/gallery/gallery_18.jpg";
photos[18]="images/gallery/gallery_19.jpg";
photos[19]="images/gallery/gallery_20.jpg";
photos[20]="images/gallery/gallery_21.jpg";
photos[21]="images/gallery/gallery_22.jpg";
photos[22]="images/gallery/gallery_23.jpg";
photos[23]="images/gallery/gallery_24.jpg";
photos[24]="images/gallery/gallery_25.jpg";
photos[25]="images/gallery/gallery_26.jpg";
photos[26]="images/gallery/gallery_27.jpg";
photos[27]="images/gallery/gallery_28.jpg";
photos[28]="images/gallery/gallery_29.jpg";
photos[29]="images/gallery/gallery_30.jpg";
photos[30]="images/gallery/gallery_31.jpg";
photos[31]="images/gallery/gallery_32.jpg";
photos[32]="images/gallery/gallery_33.jpg";
photos[33]="images/gallery/gallery_34.jpg";
photos[34]="images/gallery/gallery_35.jpg";
photos[35]="images/gallery/gallery_36.jpg";
photos[36]="images/gallery/gallery_37.jpg";
photos[37]="images/gallery/gallery_38.jpg";
photos[38]="images/gallery/gallery_39.jpg";
photos[39]="images/gallery/gallery_40.jpg";
photos[40]="images/gallery/gallery_41.jpg";
photos[41]="images/gallery/gallery_42.jpg";
photos[42]="images/gallery/gallery_43.jpg";
photos[43]="images/gallery/gallery_44.jpg";


//Specify whether images should be linked or not (1=linked)
var linkornot=0;

//Set corresponding URLs for above images. Define ONLY if variable linkornot equals "1"
photoslink[0]="";
photoslink[1]="";
photoslink[2]="";

//do NOT edit pass this line

var preloadedimages=new Array();
for (i=0;i<photos.length;i++)
{
    preloadedimages[i]=new Image();
    preloadedimages[i].src=photos[i];
}


function keeptrack()
{
    document.getElementById("btnViewPrev").style.display = (which == 0? "none":"inline");
    document.getElementById("btnViewNext").style.display = (which == photos.length-1? "none":"inline");
    window.status="Image "+(which+1)+" of "+photos.length;
    document.getElementById("txtImgNum").innerHTML = "Photo "+(which+1)+" of "+photos.length;
}


function backward(){
    if (which>0)
    {
        which--;
        document.images.photoslider.src=photos[which];
        keeptrack();
    }
}

function forward()
{
    if (which<photos.length-1)
    {
        which++;
        document.images.photoslider.src=photos[which];
        keeptrack();
    }
}

function transport()
{
    window.location=photoslink[which];
}
