<!--
// initialize variables
	var doc = document;
	var currentContainerImage = null;
/* ===============================================================================
	called by the body onload event
	=============================================================================== */
	function InitializePage() {
	}

// ============================================================
// returns a url we can use
// ============================================================
	function getSafeFormattedURL() {
		var theLocation = window.location + "";
		theLocation = theLocation.replace("?","||");
		do
		{
		   theLocation = theLocation.replace("&","|");
		}
		while(theLocation.indexOf("&")>-1);
		return theLocation;
	}

// ============================================================
// returns the parent object by the name
// ============================================================
	function getParentObject(obj, tName) {
		// get upper case of the tagName
			var tNameUC = tName.toUpperCase();
		// recurse until object is found
			if (obj) {
				while (obj) {
					if (obj.nodeName.toUpperCase() == tNameUC) {
						return obj;
					} else {
						obj = obj.parentNode;
					}
				}
			}
	}
/* ===============================================================================
	Returns the name of the element(s) before ASP "ASPized" it
	=============================================================================== */
	function getOriginalASPName(theName) {
		var arrName = theName.split("$")
		if (arrName.length > 0) {
			return arrName[arrName.length-1];
		} else {
			return theName;
		}
	}
/* ===============================================================================
	Returns element(s) that have the "original" id specified before ASP "ASPized" them
	=============================================================================== */
	function getASPElementById(theID,theNode) {
		// declare variables
			var origID = ""
		// if the node is null, use the documentElement
			if (theNode == null) {theNode=document.documentElement}
		// make sure the object isn't a text node
			if (theNode.nodeName != "#text") {
				// make sure the item has an id
					if (theNode.id != null && theNode.id.length > 0) {
						// split the id into an array
							var arrID = theNode.getAttribute("id").split("_");
						// get the last part of the id
							origID = arrID[arrID.length - 1];
					}
				// if it's the ID we're looking for, return it
					if (origID == theID) {
						return theNode;
					} else if (theNode.hasChildNodes) {
						with (theNode.childNodes) {
							for (var counter=0;counter<length;counter++) {
								if (theNode.nodeName != "SCRIPT" && theNode.nodeName != "STYLE" && item(counter).nodeName != "#text") {
									var retVal = getASPElementById(theID,item(counter));
									if (retVal != null) {
										return retVal;
									}
								}
							}
						}
					}
			}
	}

/* ===============================================================================
	Returns the text of a tag (Firefox doesn't support innerText())
	=============================================================================== */
	function getText(theString) {
		// get length
			var len = theString.length
			var retString = "";
		// exit if empty string
			if (len == 0) {return retString;}
		// create test strings
			var stringLeftWicket		= "<"
			var stringRightWicket	= ">"
			var stringSpace			= " "
			var stringTab				= "	"
		// get chars
			var charLeftWicket		= stringLeftWicket.charCodeAt(0);
			var charRightWicket		= stringRightWicket.charCodeAt(0);
			var charSpace				= stringLeftWicket.charCodeAt(0);
			var charTab					= stringLeftWicket.charCodeAt(0);
		// other variables
			var currentChar			= 0;
			var prevChar				= 0;
			var inTag					= false;
		// loop through the string
			for (var charCounter=0;charCounter<theString.length;charCounter++) {
				// get current character
					currentChar = theString.charCodeAt(charCounter);
					currentString = theString.substr(charCounter,1);
				// act depending upon the character
					switch (currentChar) {
						case charLeftWicket: if (inTag != true) { inTag = true; } break;
						case charRightWicket: inTag = false; break;
						case charSpace: if (inTag == false && prevChar != 32) { retString += currentString; } prevChar = 32; break;
						case charTab: if (inTag == false && prevChar != 32) { retString += stringSpace; } prevChar = 32; break;
						case 13: if (inTag == false && prevChar != 32) { retString += stringSpace; } prevChar = 32; break;
						case 10: break;
						default: if (inTag == false) { retString += currentString; } prevChar = currentChar; break;
					}
			}
		// return value
			return retString;
	}
/* ===============================================================================
	Returns the previous element (Firefox doesn't support previousSibling())
	=============================================================================== */
	function getPreviousElement(theElement) {
		// get the parentElement of the item being sought
			var parEl = theElement.parentNode;
		// initialize return value
			var retEl = null;
			var prevEl = null;
		// loop through until you get the previous sibling
			with (parEl.childNodes) {
				for (var elCounter=0;elCounter<length;elCounter++) {
					//alert(item(elCounter).nodeName);
					if (item(elCounter).nodeName != "#text") {
						if (item(elCounter) == theElement && prevEl != null) {
							retEl = prevEl;
							break;
						}
						// store item
							prevEl = item(elCounter);
					}
				}
			}
		// return the value
			return retEl;
	}
/* ===============================================================================
	Returns the next element (Firefox doesn't support nextSibling())
	=============================================================================== */
	function getNextElement(theElement) {
		// get the parentElement of the item being sought
			var parEl = theElement.parentNode;
			//alert("parEl=" + parEl.outerHTML);
		// initialize return value
			var retEl = null;
			var thisEl = null;
		// loop through until you get the previous sibling
			with (parEl.childNodes) {
				for (var elCounter=0;elCounter<length;elCounter++) {
					if (item(elCounter).nodeName != "#text") {
						if (item(elCounter) == theElement) {
							thisEl = item(elCounter);
						} else if (thisEl != null) {
							retEl = item(elCounter);
							break;
						}
					}
				}
			}
		// return the value
			return retEl;
	}
/* ===============================================================================
	Returns the next element (Firefox doesn't support nextSibling())
	=============================================================================== */
	function getChildIndex(theElement) {
		// get the parentElement of the item being sought
			var parEl = theElement.parentNode;
			//alert("parEl=" + parEl.outerHTML);
			var indexCounter = 0;
		// loop through until you get the previous sibling
			with (parEl.childNodes) {
				for (var elCounter=0;elCounter<length;elCounter++) {
					// if this is not a text node
						if (item(elCounter).nodeName != "#text") {
					// return the index if we've found the element
						if (item(elCounter) == theElement) { return indexCounter; }
					//increment the counter
						indexCounter+= 1
					}
				}
			}
	}
	/* ===============================================================================
		Changes the down image for the container button
		=============================================================================== */
		function downContainerButton(theImage) {
			theImage.src = theImage.src.replace(".gif","_down.gif");
		}
	/* ===============================================================================
		Changes the down image for the container button
		=============================================================================== */
		function upContainerButton(theImage) {
			theImage.src = theImage.src.replace("_down","");
		}
	/* ===============================================================================
		Shows or hides the content of the module
		=============================================================================== */
		function showOrHideModule(theImage,theEvent) {
			// initialize variables
				var aryButtons = new Array();
				with (theImage) {
					var newAlt = alt;
					var newSrc = src.replace("_down","");
					var newDisplay = "";
					var theIDUC = id.toUpperCase();
				}
			// figure toggle
				if (newAlt=="contract") {
					newAlt = "expand";
					newSrc = newSrc.replace("contract","expand");
					newDisplay = "none";
				} else {
					newAlt = "contract";
					newSrc = newSrc.replace("expand","contract");
					// NOTE: Firefox doesn't like "block" -- blank reverts to the object's display default
					newDisplay = "";
				}
			// if shift key isn't pressed, just put this image into an array
				if (theEvent.ctrlKey != true) {
					//aryButtons.push(theImage);
					var nextRow = getNextElement(theImage.parentNode.parentNode);
					theImage.alt = newAlt;
					theImage.src = newSrc;
					if (nextRow != null) {
						nextRow.style.display = newDisplay;
					}
			// else, toggle all items
				} else {
				// get collection
					var theCollection = document.getElementsByTagName(theImage.tagName);
				// loop through them and put them into the array
					with (theCollection) {
						for (var c=0;c<length;c++) {
							if (item(c).id.toUpperCase() == theIDUC) {
								with (item(c)) {
									var nextRow = getNextElement(parentNode.parentNode);
									alt = newAlt;
									src = newSrc;
									if (nextRow != null) { nextRow.style.display = newDisplay; }
								}
							}
						}
					}
				}
		}

/* ===============================================================================
	Gets a cookie
	=============================================================================== */
	function Get_Cookie(name) {
		var start = doc.cookie.indexOf( name + '=' );
		var len = start + name.length + 1;
		if ((!start) && (name != doc.cookie.substring( 0, name.length))) {
			return null;
		}
		if (start == -1) return null;
		var end = doc.cookie.indexOf(';',len);
		if ( end == -1 ) end = doc.cookie.length;
		return unescape( doc.cookie.substring(len,end));
	}
/* ===============================================================================
	Deletes a cookie
	=============================================================================== */
	function Delete_Cookie(name,path,domain) {
	//use -- Delete_Cookie("js","/","");
		if (Get_Cookie(name)) doc.cookie=name+"="+((path)?";path="+path:"")+((domain)?";domain="+domain:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT";
	}
/* ===============================================================================
	Sets a cookie
	=============================================================================== */
	function Set_Cookie(name,value,expires,path,domain,secure) {
		//use -- Set_Cookie("js","true","1","/","","");
		// set time, it's in milliseconds
			var today = new Date();
			today.setTime(today.getTime());
		// if the expires variable is set, make the correct expires time, the current script below will set it for x number of days, to make it for hours, delete * 24, for minutes, delete * 60 * 24
			if (expires) { expires = expires * 1000 * 60 * 60 * 24;}
			var expires_date = new Date(today.getTime()+(expires));
		// set the cookie
			doc.cookie = name+"="+escape(value)+((expires)?";expires="+expires_date.toGMTString():"")+((path)?";path="+path:"")+((domain )?";domain="+domain:"")+((secure)?";secure":"");
	}
	// =======================================================================
	// returns the actual left of the item
	// =======================================================================
		function getOffsetLeft(obj,theX) {
			// if the object has absolute positioning, just return its position
				if (obj.style.position == "absolute") {
					return parseInt(obj.style.left) + theX;
				}
			// only add the offset left for certain objects (some have duplicate values)
				if (obj.tagName != "TBODY" && obj.tagName != "TR" && obj.tagName != "CENTER" && obj.tagName != "FORM") {
					theX += obj.offsetLeft
				}
			// if we're anywhere less than the document element, recurse upwards in the DOM
				if (obj.tagName != "HTML") {
					return getOffsetLeft(obj.parentNode,theX);
			// else, just return the value
				} else {
					return theX;
				}
		}
	// =======================================================================
	// returns the actual left of the item
	// =======================================================================
		function getOffsetTop(obj,theY) {
			// if the object has absolute positioning, just return its position
				if (obj.style.position == "absolute") {
					return parseInt(obj.style.top) + theY;
				}
			// only add the offset left for certain objects (some have duplicate values)
				if (obj.tagName != "TBODY" && obj.tagName != "TR" && obj.tagName != "CENTER" && obj.tagName != "FORM") {
					theY += obj.offsetTop;
				}
			// if we're anywhere less than the top menu, recurse upwards in the DOM
				if (obj.tagName != "HTML") {
					return getOffsetTop(obj.parentNode,theY);
			// else, just return the value
				} else {
					return theY;
				}
		}
// ===========================================================================
// Createst an iframe shim behind the menu item
// ===========================================================================
	function InsertIFrameShim(theMenuItem,ElementToInsertInto) {
		var iFrameDiv = null;
		var theMenuID = theMenuItem.getAttribute("id")
		if (!document.getElementById("iframeSHIM_" + theMenuID)) {
			iFrameDiv = document.createElement("iframe");
			with (iFrameDiv) {
				setAttribute("id","iframeSHIM_" + theMenuID);
				setAttribute("src", "javascript:false;");
				setAttribute("scrolling", "no");
				setAttribute ("frameborder", "0");
			}
			if (ElementToInsertInto == undefined) {
				document.body.appendChild(iFrameDiv);
			} else {
				ElementToInsertInto.appendChild(iFrameDiv);
			}
		} else {
			iFrameDiv = document.getElementById("iframeSHIM_" + theMenuID);
		}
		with (iFrameDiv) {
			style.position = "absolute";
			style.width = theMenuItem.offsetWidth;
			style.height = theMenuItem.offsetHeight ;
			style.top = getOffsetTop(theMenuItem,0) + "px";
			style.left = getOffsetLeft(theMenuItem,0) + "px";
			style.zIndex = theMenuItem.style.zIndex - 1;
			style.visibility = theMenuItem.style.visibility;
			style.display = theMenuItem.style.display;
		}
	}
// ===========================================================================
// Hides an iframe shim from behind the menu item
// ===========================================================================
	function HideIFrameShim(theID) {
		if (document.getElementById("iframeSHIM_" + theID)) {
			document.getElementById("iframeSHIM_" + theID).style.display = "none";
		}
	}
// ================================================================================
// sets the window status
// ================================================================================
	function setStatus(theValue) {
		try {
			window.status = theValue;
	//		//alert("done!");
		} catch(er) {}
	}

	// ================================================================================
	// sets document location
	// ================================================================================
		function goHere(theURL) {
			window.location=theURL;
		}


-->