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 exterior photo at random from those in the array.

var i = 0
var extpic = new Array()
var alttxt = new Array()


// Text

extpic[i] = "patio"
alttxt[i++] = "Screened-in patio"

extpic[i] = "deck1"
alttxt[i++] = "Back of house with elevated deck and screened-in patio"

extpic[i] = "deck2"
alttxt[i++] = "Sunroom"

extpic[i] = "addition1"
alttxt[i++] = "Large in-law suite addition"

extpic[i] = "addition2"
alttxt[i++] = "Beautiful house"

extpic[i] = "house1"
alttxt[i++] = "Back of house, with large, wooden deck"

extpic[i] = "house2"
alttxt[i++] = "Restored house with wrap-around porch"


// Grab a random number within the array bounds, then write the HTML to display the photo.

var num = Math.floor(Math.random() * extpic.length)

document.write (
	'<img class="rpic" src="image/content/' + extpic[num] + '.jpg" alt="' + alttxt[num] + '" id="pic_exterior" />'
)
