
var gallery=new Array()
var gallerylink=new Array()
var caption = new Array()
var norightbtn=new Array()
var noleftbtn=new Array()
var which=0
var imagelinks=0

gallery[0]="gallery/plan3/Plan3_Exterior.jpg"
gallery[1]="gallery/plan3/Plan3_Exterior2.jpg"
gallery[2]="gallery/plan3/Plan3_FrontStep.jpg"
gallery[3]="gallery/plan3/Plan3_Doorway.jpg"
gallery[4]="gallery/plan3/Plan3_LivingRoom.jpg"
gallery[5]="gallery/plan3/Plan3_DiningRoom.jpg"
gallery[6]="gallery/plan3/Plan3_DiningRoom2.jpg"
gallery[7]="gallery/plan3/Plan3_Hallway.jpg"
gallery[8]="gallery/plan3/Plan3_Kitchen.jpg"
gallery[9]="gallery/plan3/Plan3_MasterBedroom.jpg"
gallery[10]="gallery/plan3/Plan3_OutdoorPatio.jpg"

gallerylink[0]=""
gallerylink[1]=""
gallerylink[2]=""
gallerylink[3]=""
gallerylink[4]=""
gallerylink[5]=""
gallerylink[6]=""
gallerylink[7]=""
gallerylink[8]=""
gallerylink[9]=""
gallerylink[10]=""


norightbtn [0]="images/no-button.gif"
norightbtn [1]="images/right-button.gif"
norightbtn [2]="images/right-button.gif"
norightbtn [3]="images/right-button.gif"
norightbtn [4]="images/right-button.gif"
norightbtn [5]="images/right-button.gif"
norightbtn [6]="images/right-button.gif"
norightbtn [7]="images/right-button.gif"
norightbtn [8]="images/right-button.gif"
norightbtn [9]="images/right-button.gif"
norightbtn [10]="images/right-button.gif"

noleftbtn [0]="images/left-button.gif"
noleftbtn [1]="images/left-button.gif"
noleftbtn [2]="images/left-button.gif"
noleftbtn [3]="images/left-button.gif"
noleftbtn [4]="images/left-button.gif"
noleftbtn [5]="images/left-button.gif"
noleftbtn [6]="images/left-button.gif"
noleftbtn [7]="images/left-button.gif"
noleftbtn [8]="images/left-button.gif"
noleftbtn [9]="images/left-button.gif"
noleftbtn [10]="images/no-button.gif"

caption[0] = "The Valencia - Residence 3";
caption[1] = "The Valencia - Exterior View 2";
caption[2] = "The Valencia - Front Step";
caption[3] = "The Valencia - Entry";
caption[4] = "The Valencia - Great Room";
caption[5] = "The Valencia - Nook";
caption[6] = "The Valencia - Dining Room";
caption[7] = "The Valencia - Hallway";
caption[8] = "The Valencia - Kicthen";
caption[9] = "The Valencia - Main Bedroom";
caption[10] = "The Valencia - Courtyard";


var preloadedimages=new Array()
for (i=0;i<gallery.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=gallery[i]

}

function applyeffect(){
if (document.all && photoslider.filters){
photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*23)
photoslider.filters.revealTrans.stop()
photoslider.filters.revealTrans.apply()
}
}

function playeffect(){
if (document.all && photoslider.filters)
photoslider.filters.revealTrans.play()
}

function keeptrack(){
window.status="Image "+(which+1)+" of "+gallery.length
window.status="Image "+(which+1)+" of "+noleftbtn.length
window.status="Image "+(which+1)+" of "+norightbtn.length
}

function backward(){
if (which>0){
which--
applyeffect()
document.images.photoslider.src=gallery[which]
document.images.noleftbtn.src = noleftbtn[which]
document.images.norightbtn.src = norightbtn[which]
document.getElementById('imageCaption').innerHTML = caption[which];
playeffect()
keeptrack()
}
}

function forward(){
if (which<gallery.length-1){
which++
applyeffect()
document.images.photoslider.src=gallery[which]
document.images.noleftbtn.src = noleftbtn[which]
document.images.norightbtn.src = norightbtn[which]
document.getElementById('imageCaption').innerHTML = caption[which];
playeffect()
keeptrack()
}
}

function transport(){
window.location=gallerylink[which]
}

