startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
	
	if (document.getElementById) {
		page = document.location.href;	
		var ul=document.getElementById('subnav');
		var ul2=document.getElementById('subnav2');
		if(ul){
			var alink=ul.getElementsByTagName('a');
			for (var i=0;i<alink.length;i++)	{
				linkpath = alink[i].href;
				if (page == linkpath) {
					alink[i].className="on";	
				}
			}	
		}
		//for offices pages where there are two uls
		if(ul2){
			var alink2=ul2.getElementsByTagName('a');
			for (var i=0;i<alink2.length;i++)	{
				linkpath2 = alink2[i].href;
				if (page == linkpath2) {
					alink2[i].className="on";	
				}
			}	
		}
	}
}
window.onload=startList;

//this looks for en or es in the url string and swaps it
function languageSwap(href,from,to){
	url = new String(href);
	newurl = url.replace("/"+from+"/", "/"+to+"/");
	//alert(newurl);
	document.location = newurl;
}

function navigateForm(obj)
  {
    if(obj.selectedIndex != -1 && obj.options[obj.selectedIndex].value)
      top.location.href = obj.options[obj.selectedIndex].value;
    return false;
  }
