// JavaScript Document
function highlight(linkId) {
	linkIdOriginal = linkId;
	oDiv1 = document.getElementById("mainNav");
	oDiv2 = document.getElementById("leftNav");
	if (oDiv1) {
		/*alert("Inside Div 1");*/
		if (linkId == "about" || linkId == "services" || linkId == "programs" || linkId == "news" || linkId == "support" || linkId == "sitemap") {
		} else {
			linkId = linkId.substring(0,linkId.indexOf("_"));
		}
		/*alert(linkId);*/
		oAs = oDiv1.getElementsByTagName("a");
		for (i=0; i<=oAs.length-1; i++) {
			if (oAs[i].attributes.getNamedItem("href")) {
				sCurrentLink = oAs[i].attributes.getNamedItem("href").value;
				sCurrentLink = sCurrentLink.replace("PageServer?pagename=","");
				/*alert("scurrentlink = "+sCurrentLink);*/
				if (sCurrentLink.indexOf(linkId) >= 0) {
					/*alert("oas = "+oAs[i]);*/
					if (isIE) {
						oAs[i].attributes.getNamedItem("class").value = "activeMain";
					} else {
						oAs[i].setAttribute("class","activeMain");
					}
					break;
				}
			}    
		}
	}
	
	if (oDiv2) {
		oAs = oDiv2.getElementsByTagName("a");
		for (i=0; i<=oAs.length-1; i++) {
			if (oAs[i].attributes.getNamedItem("href")) {
				sCurrentLink = oAs[i].attributes.getNamedItem("href").value;
				if (isIE) {
					sCurrentLink = sCurrentLink.replace("http://ywcac.convio.net/site/PageServer?pagename=","");
				} else {
					sCurrentLink = sCurrentLink.replace("PageServer?pagename=","");
				}
				if (sCurrentLink == linkIdOriginal) {
					if (isIE) {
						oAs[i].attributes.getNamedItem("class").value = "active";
					} else {
						oAs[i].setAttribute("class","active");
					}
					break;
				}
			}    
		}
	}
}