    function convert_It(sString) 
	{
		var a = escape(sString); 
		var b = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ%@#$^&*()-_=+.:"; // letters to compare to 
		var c = "zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA +=_-)(*&^$#@:."; // letter to change string to
		var d;
		var h;
		var i;
		var j = "";

		var f = a.length; // get length of the textbox1 string 
		var e = 0; 
		var g = 1;

		while (e != f) 
		{ // while e is not equal to the string length loop  
			d = a.substring(e,g); // get each letter in the text box 
			h = b.indexOf(d); // find that letter in var b 
			i = c.charAt(h); // change it to the letter in var c 
			e++; // add one to var e 
			g++; // add one to var g 
			j += i; // write out each letter 
		}
		return j; // the final output put in textbox2 
	}


	function unconvert_It(sString) 
	{
		var aa = sString;
		var bb = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ @#$^&*()-_=+.:";
		var cc = "zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA +=_-)(*&^$#@:.";
		var dd;
		var hh;
		var ii;
		var jj = "";

		var ff = aa.length;
		var ee = 0; 
		var gg = 1;

		while (ee != ff) 
		{ 
			dd = aa.substring(ee,gg);
			hh = cc.indexOf(dd); // just switch var b with c to unencode ex(h = b.indexOf(d); now  ='s hh = cc.indexOf(dd);)
			ii = bb.charAt(hh); // just switch var c with b to unencode  
			ee++;
			gg++;
			jj += ii;
		}
		return jj;
	}
	
	function emailAddress(sName, sDomain, sSuffix, sDisplay)
	{
		var sReturn = "<a class=\"body_link\" href=\"#\" onclick=\"sendMail('" + convert_It(sName + "@" + sDomain + "." + sSuffix) +"')\">" +
				sDisplay + "</a>";
		return sReturn;
	}
	
	function sendMail(sAddress)
	{
		location.replace("mailto:" + unconvert_It(sAddress));
	}
	function allow_numeric(obj)
	{
  		if (/[^0-9]/i.test(obj.value))
  		{
			obj.value=obj.value.replace(/[^0-9]/g,'')
			obj.value+=''
			obj.focus()
		}
	}
	//Check the form before submitting
	function CheckForm () {

		//Check for a word to search
		if (document.frmSiteSearch.search.value==""){
			alert("Please enter at least one keyword to search");
			document.frmSiteSearch.search.focus();
			return false;
		}
																
		return true
	}
	
//collapsable menu
	
	if (!document.getElementById) {
		document.getElementById = function() { return null; }
	}

	var menuCookie = "menusToExpand";
	var itemCookie = "itemToHighlight";

	function initializeMenu(menuId, actuatorId) {
		var menu = document.getElementById(menuId);
		var actuator = document.getElementById(actuatorId);

		if (menu == null || actuator == null) return;

		//if (window.opera) return; // I'm too tired
		
		actuator.parentNode.style.backgroundImage = "url(images/plus.gif)";
		actuator.onclick = function() {
			var display = menu.style.display;
			this.parentNode.style.backgroundImage =
				(display == "block") ? "url(images/plus.gif)" : "url(images/minus.gif)";
			menu.style.display = (display == "block") ? "none" : "block";
			
			// Begin custom code for remembering expanded menus with cookies
			var menusToExpand = getCookie(menuCookie);
			if (menu.style.display == "block") {
				// set a cookie to keep the menu expanded
				if (menusToExpand == null) {
					setCookie(menuCookie,menuId);
				} else if (menusToExpand.indexOf(menuId) == -1) {
					setCookie(menuCookie,menusToExpand+","+menuId);
				}
			} else {
				// remove it from the expanded cookie list
				if (menusToExpand.indexOf(menuId) != -1) {
					// check for comma after menu
					if (menusToExpand.indexOf(menuId+",") != -1) {
						menusToExpand = menusToExpand.replace(menuId+",","");
					} else {
						menusToExpand = menusToExpand.replace(menuId,"");
					}
					if (menusToExpand == "") {
						deleteCookie(menuCookie);
					} else {
						setCookie(menuCookie,menusToExpand);
					}
				}
			}
			// End custom code
			
			return false;
		}
	}

	// This function loops through all the <ul>'s in the document and
	// initializes the menus for them if they have menu classes
	function initializeMenus() {
		var uls = document.getElementsByTagName("ul");
		for (i = 0; i < uls.length; i++) {
			if (uls[i].className == "menuList1") {
				decorateMenu(uls[i]);
			}
		}

		// user must have cookies enabled for this to work
		expandMenus();
	}

	function decorateMenu(menu) {
		var links = menu.getElementsByTagName("a");
		var lists = document.getElementsByTagName("ul");

		var actuators = new Array();
		var nonActuators = new Array();
		// build an array of actuators
		for (i=0; i < links.length; i++) {
			if (links[i].className == "actuator") {
				actuators[actuators.length] = links[i];
			} else {
				nonActuators[nonActuators.length] = links[i];
			}
		}

		var menus = new Array();
		// build an array of menus
		for (i=0; i < lists.length; i++) {
			if (lists[i].className == "menu1" || lists[i].className == "submenu1") {
				menus[menus.length] = lists[i];
			}
		}

		// initialize actuators and menus (number should be the same)
		for (i=0; i < actuators.length; i++) {
			initializeMenu(menus[i].id, actuators[i].id);
		}
		
		// Begin custom code to remember last item clicked (with cookies)
		// add an onclick event to set a cookie on the non-actuators
		for (i=0; i < nonActuators.length; i++) {
			// retain any existing onclick handlers from menu-config.xml
			if (nonActuators[i].onclick) {
				nonActuators[i].onclick=function() {
					setCookie(itemCookie,this.href);
					if (eval(this.getAttribute("onclick")) == false) {
						return false;
					}
				};
			} else {
				nonActuators[i].onclick=function() {
					setCookie(itemCookie,this.href);
				};
			}
		}
	}


	function openMenu(menuId) {
		var menu = document.getElementById(menuId);
		var actuatorId = menuId.substring(0, menuId.indexOf("Menu1")) + "Actuator";
		var actuator = document.getElementById(actuatorId);
		if (menu != null) {
			var display = menu.style.display;
			menu.parentNode.style.backgroundImage = "url(images/minus.gif)";
			menu.style.display = (display == "block") ? "none" : "block";
		}
	}

	function expandMenus() {
		var menusToExpand = getCookie(menuCookie);
		if (menusToExpand != null) {
			// if more than one menu has been menusToExpanded,
			// create an array of menusToExpanded menus
			if (menusToExpand.indexOf(",") != -1) {
				menuArray = menusToExpand.split(",");
				for (var i=0; i < menuArray.length; i++) {
					openMenu(menuArray[i]);
				}
			 } else {
				openMenu(menusToExpand);
			 }
		}
		var itemToHighlight = getCookie(itemCookie);
		var links = document.getElementsByTagName("a");
		// add an onclick event to set a cookie on the non-actuators
		for (i=0; i < links.length; i++) {
			if (links[i].href == itemToHighlight) {
				links[i].className += " highlight";
			}
		}
	}

	// =========================================================================
	//                          Cookie functions 
	// =========================================================================
	/* This function is used to set cookies */
	function setCookie(name,value,expires,path,domain,secure) {
	  document.cookie = name + "=" + escape (value) +
		((expires) ? "; expires=" + expires.toGMTString() : "") +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");
	}

	/* This function is used to get cookies */
	function getCookie(name) {
		var prefix = name + "=" 
		var start = document.cookie.indexOf(prefix) 

		if (start==-1) {
			return null;
		}
		
		var end = document.cookie.indexOf(";", start+prefix.length) 
		if (end==-1) {
			end=document.cookie.length;
		}

		var value=document.cookie.substring(start+prefix.length, end) 
		return unescape(value);
	}

	/* This function is used to delete cookies */
	function deleteCookie(name,path,domain) {
	  if (getCookie(name)) {
		document.cookie = name + "=" +
		  ((path) ? "; path=" + path : "") +
		  ((domain) ? "; domain=" + domain : "") +
		  "; expires=Thu, 01-Jan-70 00:00:01 GMT";
	  }
	}

	/* You can call initializeMenus() manually from your JSP if this doesn't work.
	 * Just put the following code after the last menu tag.
	 * <script type="text/javascript">
	 *     initializeMenus();
	 * </script>
	 */
	window.onload = initializeMenus;	