onerror = handle_err
function handle_err (msg,url,line) {
	alert ("There was an error on this page.\n\n" +
		"Error: " + msg + "\n" +
		"URL: " + url + "\n" +
		"Line: " + line + "\n\n" +
		"Click OK to continue.\n\n")
	return true
}

//	NEW VISIONS website
//	Last revision: 2010-02-25

// This script selects an interior photo at random from those in the array.

var i = 0
var intpic = new Array()
var alttxt = new Array()


// Text

intpic[i] = "kitchen1"
alttxt[i++] = "Light, airy kitchen"

intpic[i] = "kitchen2"
alttxt[i++] = "Kitchen with bold, rich colors"

intpic[i] = "kitchen3"
alttxt[i++] = "Beautiful new kitchen"

intpic[i] = "basement"
alttxt[i++] = "Finished basement featuring small, indoor swimming pool"

intpic[i] = "living1"
alttxt[i++] = "Living room, looking out into backyard"

intpic[i] = "living2"
alttxt[i++] = "Beautiful, homey living room"

intpic[i] = "living3"
alttxt[i++] = "Cozy living room"

intpic[i] = "foyer"
alttxt[i++] = "Looking into living room from foyer"

intpic[i] = "bathroom"
alttxt[i++] = "Bathroom"


// Grab a random number within the array bounds, then write the HTML to display the photo.

var num = Math.floor(Math.random() * intpic.length)

document.write (
	'<img class="lpic" src="image/content/' + intpic[num] + '.jpg" alt="' + alttxt[num] + '" id="pic_interior" />'
)
