//pre-cache all off images
var offArray = new Array()

offArray[0] = new Image(19,62)
offArray[1] = new Image(19,62)
offArray[2] = new Image(19,62) 
offArray[3] = new Image(19,62)
offArray[4] = new Image(19,62)
offArray[5] = new Image(19,62) 
offArray[6] = new Image(19,62)
offArray[7] = new Image(19,62)
offArray[8] = new Image(19,62) 
offArray[9] = new Image(19,62)
offArray[10] = new Image(19,62)    
//set image path for each off image

offArray[0].src = "images/topleft.gif"
offArray[1].src = "images/topline.gif"
offArray[2].src = "images/topright.gif"
offArray[3].src = "images/pix.gif"
offArray[4].src = "images/logo.gif"
offArray[5].src = "buttons/home.gif"
offArray[6].src = "buttons/tour.gif"
offArray[7].src = "buttons/location.gif"
offArray[8].src = "buttons/rates.gif"
offArray[10].src = "buttons/contact.gif"
offArray[9].src = "buttons/links.gif"

//pre-cache all on images
var onArray = new Array()
onArray[0] = new Image(19,62)
onArray[1] = new Image(19,62)
onArray[2] = new Image(19,62)
onArray[3] = new Image(19,62)
onArray[4] = new Image(19,62)
onArray[5] = new Image(19,62)
onArray[6] = new Image(19,62)
onArray[7] = new Image(19,62)
onArray[8] = new Image(19,62)
onArray[9] = new Image(19,62)
onArray[10] = new Image(19,62)

//set image path for each on image

onArray[0].src = "images/topleft.gif"
onArray[1].src = "images/topleft.gif"
onArray[2].src = "images/topright.gif"
onArray[3].src = "images/pix.gif"
onArray[4].src = "images/logo.gif"
onArray[5].src = "buttons/homedn.gif"
onArray[6].src = "buttons/tourdn.gif"
onArray[7].src = "buttons/locationdn.gif"
onArray[8].src = "buttons/ratesdn.gif"
onArray[10].src = "buttons/contactdn.gif"
onArray[9].src = "buttons/linksdn.gif"


//define SwapOut function

function onImage(i) {
    document.images[i].src = onArray[i].src 
}

//define SwapBack function

function offImage(i) {
    document.images[i].src = offArray[i].src
}

  