//	Javascript for Canterbury Tour Pages
var hasImage = false;
// Check on Browser type
bName = navigator.appName;
bVer = parseInt(navigator.appVersion);
if ((bName == "Netscape" && bVer >= 3) ||
    (bName == "Microsoft Internet Explorer" && bVer >= 4)) {
    hasImage = true;
    // Create an associative array of buttons
    // new Array doesn't work in Netscape 2, so declare it here
    Buttons = new Array();
    // create buttons
    crButton("bm", "title/bookmark.gif", "titlew/bookmark.gif");
    crButton("ma", "title/map.gif", "titlew/map.gif");
    crButton("se", "title/search.gif", "titlew/search.gif");
    crButton("cw", "title/cws.gif", "titlew/cws.gif");
    crButton("hi", "title/hillside.gif", "titlew/hillside.gif");
    crButton("lt", "arrows/left.gif", "arrowsw/left.gif");
    crButton("bk", "arrows/back.gif", "arrowsw/back.gif");
    crButton("rt", "arrows/right.gif", "arrowsw/right.gif");
    crButton("nx", "arrows/next.gif", "arrowsw/next.gif");
}
// Create a button object
function Button(off, on) {
    this.off = new Image();
    this.off.src = "/tour/"+off;
    this.on = new Image();
    this.on.src = "/tour/"+on;
}
function crButton(name, off, on) {
    Buttons[name] = new Button(off, on);
}

function imgAct(imgName) {
    if (hasImage == true) {
	document[imgName].src = Buttons[imgName].on.src;
    }
}
function imgInAct(imgName) {
    if (hasImage == true) {
	document[imgName].src = Buttons[imgName].off.src;
    }
}
