var loadPixFlag = 0;

function loadPix() {
	if (document.images) {
		homeon = new Image(58,25);
		homeon.src = "gizmos/navbar/home2.gif";

		tuon = new Image(86,25);
		tuon.src = "gizmos/navbar/trailusers2.gif";

		tbon = new Image(104,25);
		tbon.src = "gizmos/navbar/trailbuilders2.gif";

		nlon = new Image(93,25);
		nlon.src = "gizmos/navbar/newsletter2.gif";

		anon = new Image(92,25);
		anon.src = "gizmos/navbar/aboutnstf2.gif";

		cuon = new Image(93,25);
		cuon.src = "gizmos/navbar/contactus2.gif";

		loadPixFlag = 1;
	}
}

if (document.images) {
		homeoff = new Image(58,25);
		homeoff.src = "gizmos/navbar/home1.gif";

		tuoff = new Image(86,25);
		tuoff.src = "gizmos/navbar/trailusers1.gif";

		tboff = new Image(104,25);
		tboff.src = "gizmos/navbar/trailbuilders1.gif";

		nloff = new Image(93,25);
		nloff.src = "gizmos/navbar/newsletter1.gif";

		anoff = new Image(92,25);
		anoff.src = "gizmos/navbar/aboutnstf1.gif";

		cuoff = new Image(93,25);
		cuoff.src = "gizmos/navbar/contactus1.gif";
}

function flipOn(imgName) {
	if (document.images && loadPixFlag) {
		imgOn = eval(imgName + "on.src");
		document[imgName].src = imgOn;
	}
}

function flipOff(imgName) {
	if (document.images && loadPixFlag) {
		imgOff = eval(imgName + "off.src");
		document[imgName].src = imgOff;
	}
}

function framebuster() {
	if (self.parent.frames.length != 0) self.parent.location=document.location;
}

function startup() {
	framebuster();
	loadPix();
}

function PopupNews(NID) {
	if (document.images) {
		var NewsURL = "news.cfm?nid="+NID;
		nw=window.open(NewsURL,"nw","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=710,height=500,screenX=50,screenY=50,top=50,left=50");
	} else {
		alert( '\nSorry, this Feature requires Netscape Navigator, Version 3.0 or greater\n'+
				'or Microsoft Internet Explorer, Version 4.0+.\n\n' );
	}
}

function PopupPhoto(id) {
	var photourl = "galleryphoto.cfm?id="+id;
	if (document.images) {
		pw=window.open( photourl, "pw", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=500,height=450,screenX=50,screenY=50,top=50,left=50");
	} else {
		alert( '\nSorry, this Feature requires Netscape Navigator, Version 3.0 or greater\n'+
				'or Microsoft Internet Explorer, Version 4.0+.\n\n' );
	}
}

