function webpageload() {	changeMailtoLinks();}function searchFindItWA()  {	var searchURL = "/webimage.nsf/frmFindItSearch?OpenForm=1&q=" +		encodeURIComponent(document.getElementById("search_term").value);			//If the page is being accessed through Fortress, need to add our real domain to URL	if (window.location.href.toLowerCase().indexOf("https://fortress.wa.gov") == 0)		searchURL = "http://www.wutc.wa.gov" + searchURL;			window.location.href = searchURL;}function changeMailtoLinks() {	//Loop through all links on page	for (i=0; i<document.links.length; i++)  {		//Get target URL for this link		var curLinkAddr = document.links[i].href;		//Some users mistakenly add a space in mailto links.		//Notes then replaces it with a "%20", so we have to remove those.		curLinkAddr = curLinkAddr.replace(/%20/, ""); //remove white spaces		var curLinkAddrUpper = curLinkAddr.toUpperCase();		//Only look at mailto links that do not have the domain (we can check for the "@" symbol)		if (0 == curLinkAddrUpper.indexOf("MAILTO:") &&			curLinkAddr.indexOf("@") < 0 )		{	//This is a mailto link that doesn't have a full address,			//Add domain to address			//curLinkAddr = curLinkAddr + "@wutc.wa.gov";            MAK 12/20/07			curLinkAddr = curLinkAddr + "@utc.wa.gov";                //MAK 12/20/07			document.links[i].href = curLinkAddr;			//If the link text itself starts with mailto, replace with e-mail address			//IE and Opera support innerText			if (document.links[i].innerText) {				if (document.links[i].innerText.toUpperCase().indexOf("MAILTO") == 0)					document.links[i].innerText = curLinkAddr.substring("mailto:".length,						curLinkAddr.length);			}			//Firefox requires DOM-compliant childNotes			//See http://www.mozilla.org/docs/web-developer/upgrade_2.html			else if (document.links[i].childNodes) {				var innerTextNode = document.links[i].childNodes[0];				//alert(document.links[i].childNodes.length);				while (innerTextNode && !innerTextNode.nodeValue && innerTextNode.childNodes) {					innerTextNode = innerTextNode.childNodes[0];				}				//if (document.links[i].childNodes && document.links[i].childNodes[0] &&				//document.links[i].childNodes[0].nodeValue &&				if (innerTextNode.nodeValue != null &&					innerTextNode.nodeValue.toUpperCase().indexOf("MAILTO") == 0)						innerTextNode.nodeValue = curLinkAddr.substring("mailto:".length,							curLinkAddr.length);			}		}	}}