function init() {
	InitTreeLinks();
}
function GetObjRef (objId) {
	var returnObj = null;
	if (document.getElementById) {
		returnObj = document.getElementById(objId);
	}
	else if (document.all) {
		returnObj = document.all[objId];
	}
	return returnObj;
}
function ToggleSecondaryNav () {
		var objSecondaryNavBg = null;
		var objSecondaryNavContainer = null;
		var objSecondaryShowToggle = null;
		var objSecondaryNavToggleContainer = null;
		var objBodyContainer = null;
		var objPageBody = null;
		var objMainNavContainer = null;
		if (document.getElementById) {
			objSecondaryNavBg = document.getElementById ("SecondaryNavBg");
			objSecondaryShowToggle = document.getElementById ("SecondaryShowToggle");
			objSecondaryNavContainer = document.getElementById ("SecondaryNavContainer");
			objBodyContainer = document.getElementById ("Body");
			objPageBody = document.getElementById ("PageBody");
			objMainNavContainer = document.getElementById ("MainNav");
		}
		else if (document.all) {
			objSecondaryNavBg = document.all["SecondaryNavBg"];
			objSecondaryShowToggle = document.all["SecondaryShowToggle"];
			objSecondaryNavContainer = document.all["SecondaryNavContainer"];
			objBodyContainer = document.all["Body"];
			objPageBody = document.all["PageBody"];
			objMainNavContainer = document.all["MainNav"];
		}
		if (objSecondaryNavBg != null && objSecondaryNavContainer != null && objBodyContainer != null) {
			if (objSecondaryNavBg.style.display == "none" || objSecondaryNavContainer.style.display == "none" || objSecondaryShowToggle.style.display == "block") {
				objSecondaryShowToggle.style.display = "none";
				objSecondaryNavBg.style.display = "block";
				objSecondaryNavContainer.style.display = "block";
				objBodyContainer.style.left = "180px";
				objPageBody.className = "BodyState1";
				objMainNavContainer.style.left = "176px";
			}
			else {
				objSecondaryShowToggle.style.display = "block";
				objSecondaryNavBg.style.display = "none";
				objSecondaryNavContainer.style.display = "none";
				objBodyContainer.style.left = "32px";
				objPageBody.className = "BodyState2";
				objMainNavContainer.style.left = "30px";
			}
		}
		return false;
	}
	
	

function SetIFrame (iframeId, thisAnchor) {
	var iframeObj = GetObjRef (iframeId);
	if (iframeObj) {
		iframeObj.style.display = "block";
		iframeObj.src = thisAnchor.href;
	}
	return false;
}
function InitTreeLinks () {
	var lis = [];
	if (document.all) {
		var uls = document.all.tags("ul");
		var lis = document.all.tags("li");
		for (var i=0; i<uls.length; i++) {
			if (uls[i].className == "Tree") {
				uls[i].onclick = CancelBubble;
			}
		}
	}
	else if (document.getElementsByTagName) {
		var lis = document.getElementsByTagName ("li");
	}
}
function GetChildren (obj) {
	if (obj.children) {
		return obj.children;
	}
	else if (obj.childNodes) {
		return obj.childNodes;
	}
	return null;
}
function GetParent (obj) {
	if (obj.parentElement) {
		return obj.parentElement;
	}
	else if (obj.parentNode) {
		return obj.parentNode;
	}
	return null;
}
function OpenNewWindow (url, target) {
	window.open (url, target);
}
/*
function ToggleSubNodes (aObj, e) {
	var thisObj = GetParent (aObj);
	if (thisObj.id) {
		var bulletImg = GetChildren (aObj);
		for (var i=0; i<bulletImg.length; i++) {
			if (bulletImg[i].tagName.toLowerCase() == "img") {
				bulletImg = bulletImg[i];
				break;
			}
		}
		var childrenObj = document.getElementById (thisObj.id + "-Children");
		if (childrenObj) {
			var newListStyleImage;
			if (childrenObj.style.display == "none") {
				childrenObj.style.display = "block";
				if (bulletImg) {
					bulletImg.src = bulletImg.src.replace ("plus.gif", "minus.gif");
				}
			}
			else {
				childrenObj.style.display = "none";
				if (bulletImg) {
					bulletImg.src = bulletImg.src.replace ("minus.gif", "plus.gif");
				}
			}
		}
	}
	if (!e) {
		e = window.event;
	}
	if (e) {
		if (e.preventDefault) {
			e.preventDefault();
		}
		else {
			e.returnValue = false;
		}
	}
	return false;
}
*/
function ToggleSubNodes (aObj, e) {
	var thisObj = GetParent (aObj);
	if (thisObj.id) {
		/*
		var children = GetChildren (aObj);
		for (var i=0; i<children.length; i++) {
			if (children[i].className == "Bullet") {
				children = children[i];
				break;
			}
		}
		*/
		var childrenObj = document.getElementById (thisObj.id + "-Children");
		if (childrenObj) {
			var newListStyleImage;
			if (childrenObj.style.display == "none") {
				childrenObj.style.display = "block";
				if (aObj.innerHTML) {
					aObj.innerHTML = "&#x2013;"
				}
			}
			else {
				childrenObj.style.display = "none";
				if (aObj.innerHTML) {
					aObj.innerHTML = "+"
				}
			}
		}
	}
	if (!e) {
		e = window.event;
	}
	if (e) {
		if (e.preventDefault) {
			e.preventDefault();
		}
		else {
			e.returnValue = false;
		}
	}
	return false;
}
function CancelBubble (e) {
	if (!e) {
		e = window.event;
	}
	if (e) {
		e.cancelBubble = true;
	}
}

/* --- Anne's Scripts --- */
		
		function CommandButtonClick (thisButton, commandValue) {
			if (thisButton.form.command) {
				thisButton.form.command.value = commandValue;
				var validateResult = ValidateForm (thisButton.form);
				if (validateResult == true) {
					thisButton.form.submit ();
				}
				return true;
			}
			return false;
		}
		function SubmitButtonClick (thisButton, commandValue) {
			if (thisButton.form.command) {
				thisButton.form.command.value = commandValue;
			}
		}

		
		
		var popUpHelpWin = null;
		function PopUpHelp (message, e) {
			if (popUpHelpWin && popUpHelpWin.closed == false) {
				popUpHelpWin.close ();
			}
			var coordString = "";
			if (e.clientX) {
				coordString = ",left=" + e.screenX + ",top=" + e.screenY;
			}
			else if (e.screenX) {
				coordString = ",screenX=" + e.screenX + ",screenY=" + e.screenY;
			}
			popUpHelpWin = window.open ("",'popUpHelpWin','status=yes,scrollbars=yes,resizable=yes,width=200,height=200' + coordString);
			popUpHelpWin.document.close ();
			popUpHelpWin.document.open ();
			popUpHelpWin.document.write ("<html><head><title>Help</title><link type=\"text/css\" rel=\"stylesheet\" href=\"/admin/css/itemhelp.css\"></head><body>");
			popUpHelpWin.document.write (message);
			popUpHelpWin.document.write ("</body></html>");
			popUpHelpWin.document.close ();
			popUpHelpWin.focus();
			return false;
		}
		
		
		var sharedPopUpWin = null;
		function PopUpLink_OnClick (e, target) {
				sharedPopUpWin = window.open (e, target, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,Width=400,height=200');
				sharedPopUpWin.focus ();
		}