/* Copyright (c) by Andrew DiFiore Jr. All rights reserved. */
defaultStatus = "The Great Central Park Treasure Hunt";

self.onerror = function() { return true; }

if (document.images) { 
	imageOn = new Array(); imageOff = new Array();
	for (i=1; i < 10; i++) {
		imageOn[i] = new Image(); imageOn[i].src = "images/nav_0" + i + "_over.jpg";
		imageOff[i] = new Image(); imageOff[i].src = "images/nav_0" + i + ".jpg"; 
	}
}

function changeImg(imageName,imageNum,on) {
	if (document.images) {
		if (on) { document[imageName].src = imageOn[imageNum].src; }
		else { document[imageName].src = imageOff[imageNum].src; }
	}
}

function hiliteButton(cssclass) { // function for button rollover (IE only)
	if (event.srcElement.tagName == "INPUT") event.srcElement.className=cssclass;
}

function openWindow(url, name, rs, sc, mn, tb, w, h, cent) { 
	popupWin = null;
	if (rs) resize = "resizable,"; else resize = "";
	if (sc) scrolls = "scrollbars,"; else scrolls = "";
	if (mn) menu = "menubar,"; else menu = "";
	if (tb) tool = "toolbar,"; else tool = "";
	if (cent) { // center popup
		chasm = screen.availWidth;
		mount = screen.availHeight;	  
		popupWin = window.open(url, name, resize + scrolls + menu + tool + 'width=' + w + ',height=' + h + ',left=' + ((chasm - w - 10) * .5) + ',top=' + ((mount - h - 30) * .5));
	} 
	else popupWin = window.open(url, name, resize + scrolls + menu + tool + 'width=' + w + ',height=' + h + ',left=20, top=20');
}