//define the following 2 arrays locally
//pathArray = new Array("/about/","/museum/","/privateclub/","/hotel/","/about/","/recordings/index2.shtml","#","/newsletters/","/contact/")
//navIDArray = new Array("About","Museum","Club","Hotel","Creative","Cd","Guest","Newsletters","Contact")


var thePath= ""
var currentPath=location.pathname;
//var fileName = location.pathname.substring(location.pathname.lastIndexOf("/")+1);
//document.write(currentPath);

for (var i=0;i<(pathArray.length);i++) {
	if (currentPath==pathArray[i]){ 
		highlight(navIDArray[i]);
		}else{
		unHighlight(navIDArray[i]);
	}
}



function highlight(objectID){
	if (isAll || isID) {
		setClass(objectID,'selected');
		var arrowID = "arrow" + objectID;
		if (document.images) {
			document.getElementById(arrowID).src="images/bullet-over.gif";
		}
	}
	return;
}

function unHighlight(objectID){
	if (isAll || isID) {
		setClass(objectID,'unSelected');
		var arrowID = "arrow" + objectID;
		if (document.images) {
			document.getElementById(arrowID).src="images/bullet.gif";
		}
	}
	return;
}

function setClass(objectID,newClass) {
	if(findDOM(objectID,0)){
		var dom = findDOM(objectID,0);
		dom.className = newClass;
	}
}


function doRollover(objectID){
	//you need to determine whether the current URL is in the nav or not
	//if the current URL is not in the nav URL, go ahead and do the rollover
	navURL = false;
	//determine what URL you're at
	for (var i=0;i<(pathArray.length);i++) {
		if (currentPath==pathArray[i]){ 
		//since you're at a "nav URL", set knownURL to true
		navURL = true;
		//now that you know what URL  you're at, 
		//check to see if the URL you're at matches the ID being rolled over
		//only perform the rollover if the link you're rolling over is NOT where you are now
			if (objectID!=navIDArray[i]){ 
				highlight(objectID);
			}
		}
	}
	//if the current URL is not in the nav at all (i.e., the splash page) 
	//go ahead and do the rollover
	if (!navURL){highlight(objectID);}
}


	
function doRollOff(objectID){
	//you need to determine whether the current URL is in the nav or not
	//if the current URL is not in the nav URL, go ahead and do the rollover
	navURL = false;
	//determine what URL you're at
	for (var i=0;i<(pathArray.length);i++) {
		if (currentPath==pathArray[i]){ 
		//since you're at a "nav URL", set knownURL to true
		navURL = true;
		//now that you know what URL  you're at, 
		//check to see if the URL you're at matches the ID being rolled over
		//only perform the rollover if the link you're rolling over is NOT where you are now
			if (objectID!=navIDArray[i]){ 
				unHighlight(objectID);
			}
		}
	}
	//if the current URL is not in the nav at all (i.e., the splash page) 
	//go ahead and do the rollover
	if (!navURL){unHighlight(objectID);}
}


function displayWindow(url, width, height) {
        var Win = window.open(url,"openWindow",'width=' + width +
',height=' + height + ',resizable=0,scrollbars=yes');
}



