
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/plan1/Plan1_FrontExterior.gif"
gallery[1]="gallery/plan1/Plan1_LivingRoom.gif"
gallery[2]="gallery/plan1/Plan1_DiningRoom.gif"
gallery[3]="gallery/plan1/Plan1_Kitchen.gif"
gallery[4]="gallery/plan1/Plan1_LivingRoom2.gif"
gallery[5]="gallery/plan1/Plan1_MasterBedroom.gif"
gallery[6]="gallery/plan1/Plan1_Bedroom2.gif"

gallerylink[0]=""
gallerylink[1]=""
gallerylink[2]=""
gallerylink[3]=""
gallerylink[4]=""
gallerylink[5]=""
gallerylink[6]=""
gallerylink[7]=""

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"

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/no-button.gif"

caption[0] = "The Cordoba - Residence One";
caption[1] = "The Cordoba - Great Room";
caption[2] = "The Cordoba - Dining Room";
caption[3] = "The Cordoba - Kitchen";
caption[4] = "The Cordoba - Optional Study";
caption[5] = "The Cordoba - Main Bedroom";
caption[6] = "The Cordoba - Bedroom";

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]
}
