// JavaScript Document
var ie4 = document.all;
var ns4 = document.layers;
var ns6 = document.getElementById && !document.all; 
var myrootDIR = "/greatestgood/"

userAgent = window.navigator.userAgent;
browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function findElement(n,ly) {
	if (browserVers < 4)		return document[n];
	var curDoc = ly ? ly.document : document;
	var elem = curDoc[n];
	if (!elem) {
		for (var i=0;i<curDoc.layers.length;i++) {
			elem = findElement(n,curDoc.layers[i]);
			if (elem) return elem;
		}
	}
	return elem;
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		var img;
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			img = null;
			if (document.layers) {
				img = findElement(changeImages.arguments[i],0);
			}
			else {
				img = document.images[changeImages.arguments[i]];
			}
			if (img) {
				img.src = changeImages.arguments[i+1];
			}
		}
	}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function init() {
	preloadImages();
//	WidthSizing();
//	window.onresize=WidthSizing;
	var menuOpen=window.location.search.substring(1); 
	if(menuOpen)
	{
		SwitchMenu(menuOpen);
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		onFS = newImage(myrootDIR + "images/fs-over.gif");
		onDA = newImage(myrootDIR + "images/da-over.gif");
		arrowON = newImage(myrootDIR + "images/arrowON.gif");
		preloadFlag = true;
	}
}

//function WidthSizing() {
//  var myWidth = 0, myHeight = 0;
//  if( typeof( window.innerWidth ) == 'number' ) {
//    //Non-IE
//    myWidth = window.innerWidth;
//    myHeight = window.innerHeight;
// 	} else if( document.documentElement &&
//      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
//    myWidth = document.documentElement.clientWidth;
//    myHeight = document.documentElement.clientHeight;
//    } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
//    myWidth = document.body.clientWidth;
//    myHeight = document.body.clientHeight;
//    }
//	if (myWidth > 760) {
		
		
//		document.getElementById("fsdiv").style.left = parseInt(myWidth-313)+"px";
//		document.getElementById("dadiv").style.left = parseInt(myWidth-271)+"px";
//		document.getElementById("toprightdiv").style.left = parseInt(myWidth-219)+"px";
//		document.getElementById("expanderdiv").style.width = parseInt(myWidth-759) + 'px';
//		document.images.expander.width = parseInt(myWidth-759);
//		document.getElementById("titlediv").style.width = parseInt(myWidth-415)+"px";
//		document.getElementById("maindiv").style.width = parseInt(myWidth-231)+"px";
//		document.getElementById("maindiv").style.right = myWidth+"px";
//		document.getElementById("footer1div").style.width = parseInt(myWidth-192)+"px";
//		document.getElementById("footer2div").style.width = parseInt(myWidth-192)+"px";
//		document.getElementById("rightdiv").style.width = parseInt(myWidth-192)+"px";
//	}
//}


if (document.getElementById){
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
		if(document.getElementById){
		var el = document.getElementById(obj);
		if(el == null) 
		{
			alert("couldn't find "+obj);
			return;
		}
		var ar = document.getElementById("masterMENUdiv").getElementsByTagName("span");
		if(el.style.display != "block"){ 
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu" || "tertmenu" || "quatmenu")
				{
					ar[i].style.display = "none";
				}
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}


<!-- HIGHLIGHT MENU ITEM -->
 if (document.images) { 
  onImage = new Image(11, 11); 
  onImage.src = myrootDIR + "images/arrowON.gif"; 
  offImage = new Image(11, 11); 
  offImage.src = myrootDIR + "images/arrowOFF.gif"; 
  onFS = new Image(42, 73);
  onFS.src = myrootDIR + "images/fs-over.gif";
  offFS = new Image(42, 73);
  offFS.src = myrootDIR + "images/fs.gif";
  onDA = new Image(52, 73);
  onDA.src = myrootDIR + "images/da-over.gif"
  offDA = new Image(52, 73);
  offDA.src = myrootDIR + "images/da.gif"
} 

function on_Link(linkName) {
if (document.images) { 
    document.images[linkName+"ARROW"].src = onImage.src;
	}
for(i=0; i<document.anchors.length; i++)
	{
		if(linkName == document.anchors[i].name)
		{
			document.anchors[i].className='onARROW';
			break;
		}
	}
}
function off_Link(linkName) {
if (document.images) { 
    document.images[linkName+"ARROW"].src = offImage.src;
	}
	for(i=0; i<document.anchors.length; i++)
	{
		if(linkName == document.anchors[i].name)
		{
			document.anchors[i].className='menutitle';
			break;
		}
	}
}
<!-- END HIGHLIGHT MENU ITEM -->



<!-- Begin Form Auto Tab
var isNN = (navigator.appName.indexOf("Netscape")!=-1);
function autoTab(input,len, e) {
var keyCode = (isNN) ? e.which : e.keyCode; 
var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
if(input.value.length >= len && !containsElement(filter,keyCode)) {
input.value = input.value.slice(0, len);
input.form[(getIndex(input)+1) % input.form.length].focus();
}
function containsElement(arr, ele) {
var found = false, index = 0;
while(!found && index < arr.length)
if(arr[index] == ele)
found = true;
else
index++;
return found;
}
function getIndex(input) {
var index = -1, i = 0, found = false;
while (i < input.form.length && index == -1)
if (input.form[i] == input)index = i;
else i++;
return index;
}
return true;
}
//  End Form Auto Tab-->
//-->

