<!--
/*
$Source: /cvsroot/nfg/docroot/_script/nav.js,v $
$Revision: 1.11 $
$Author: rob $
$Date: 2003/03/04 22:19:28 $
*/

// Get host
var devHost = "http://nfg-app.4charity.com"
var liveHost = "http://www.networkforgood.org"
var protocol = location.protocol
var host = protocol + "//" + location.host

// Set partner environments
var aDevHost = new Array("stage.capwiz", "209.")
var aLiveHost = new Array("capwiz.com", "guidestar.org")

// Check for partner environments
for (counter in aDevHost) {
	if(host.indexOf(aDevHost[counter]) > -1) {
		host = devHost
	}
}
for (counter in aLiveHost) {
	if(host.indexOf(aLiveHost[counter]) > -1) {
		host = liveHost
	}
}

// Array of navigation images

//ClientBugOut("protocol == " + protocol);
//ClientBugOut("host == " + host);

var aImg = new Array("HOn", "H", "DOn", "D", "VOn", "V", "SOn", "S", "CROn", "CR", "MPOn", "MP")
var aImgSrc = new Array()
var dir = host + "/images/nav/"

for (counter in aImg)
{
    aImgSrc[counter] = new Image()
    aImgSrc[counter].src = dir + aImg[counter] + ".gif"
}

// Image Swapping - had to add "i" to image name because of NS4
function fSI(n) 
{	
	var i = eval("document.images.i" + n)
	var s = i.src
	if (s.indexOf("Down") == -1) 
	{
		if (s.indexOf("On") > -1) 
		{
			i.src = dir + n + ".gif"
		} 
		else 
		{
			i.src = dir + n + "On.gif"
		}
//		ClientBugOut(i.src);
	}
}

// Load correct down image
function fID(n) {
	var i = eval("document.images.i" + n)
	i.src = dir + n + "Down.gif"
	
	//Set default radio button for advanced Volunteer Search
	if (document.volunteerSearchForm) {
		if (document.volunteerSearchForm.location) {
			if (document.volunteerSearchForm.location.length > 1) {
				document.volunteerSearchForm.location[0].checked = true	
			}
		}
	}
}
//-->