numNavItems = 11; //The number of items in the main navigation bar

imgsrc = new Array();
numElements = numNavItems * 3;
for (i=0; i<numNavItems; i++) {
	imgsrc[((i+1)*3-3)] = ("images/nav" + i + "-n.gif");
	imgsrc[((i+1)*3-2)] = ("images/nav" + i + "-r.gif");
	imgsrc[((i+1)*3-1)] = ("images/nav" + i + "-s.gif");
}

img = new Array();
for (i=0; i<imgsrc.length; i++) {
	img[i] = new Image();
	img[i].src = imgsrc[i];
}



var isNav, isIE
var coll = ""
var styleObj = ""
var endStr = ""
if (parseInt(navigator.appVersion) >= 4) {
	if ((navigator.appName) == "Netscape") { 
		if (parseInt(navigator.appVersion) >= 5) { 
			isIE = true //it appears that most other parameters of Netscape 6 mirror IE
			coll = "getElementById('"
			endStr = "')"
			styleObj = "').style"
		}
		else { isNav = true }
	}
	else {
		isIE = true
		coll = "all."
		styleObj = ".style"
	}
}

function getObjHeight(obj) {
	if (isNav) { return obj.clip.height }
	else { return obj.clientHeight }
}

function getObjWidth(obj) {
	if (isNav) { return obj.clip.width }
	else { return obj.clientWidth }
}

function getInsideWindowWidth() {
	if (isNav) { return window.innerWidth }
	else { return document.body.clientWidth }
}

function getInsideWindowHeight() {
	if (isNav) { return window.innerHeight }
	else { return document.body.clientHeight }
}

function shiftTo(obj, x, y) {
	if (isNav) { obj.moveTo(x, y) }
	else {
		obj.pixelLeft = x
		obj.pixelTop = y
	}
}

function findX(obj){
	if (isNav) { return obj.left }
	else { return obj.pixelLeft }
}

function findY(obj){
	if (isNav) { return obj.top }
	else { return obj.pixelTop }
}

function NNCheck() {
	if (isNav) { location.reload() }
	else { begin() }
}
function blurry(obj) {
	if (isIE) { obj.blur() }
}

var lastNav = 0;
function swtchNav(num) {
	if ((num + '') == 's') { return; }
	
	if ((num + '') != 'n') {
		rollNumIndex = ((num+1)*3-2)
		imgname = "nav" + num
		obj = document.images[imgname]
		obj.src = img[rollNumIndex].src;
		lastNav = num;
	}
	else {
		rollNumIndex = ((lastNav+1)*3-3)
		imgname = "nav" + lastNav
		obj = document.images[imgname]
		obj.src = img[rollNumIndex].src;
		lastNav = 0;
	}
}
