sfHover = function() {
	var sfEls = document.getElementById("suckerfishmenu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
window.onload = function() {
	var arrMatch = null;
	var el = document.getElementById("suckerfishmenu");
	var path = window.location.pathname;
	
	var pattern = new RegExp("(pacientes|profesionales|tecnicas)","gi");
	
	arrMatch = pattern.exec(path);
	
	if(arrMatch!=null) {
		var area = arrMatch[1];
		
		var a = el.getElementsByTagName("a");
		
		if(a!=null) {
			var pattern2 = new RegExp(area,"gi");
			for(var i=0;i<a.length;i++) {
				var ele = a[i];
				
				var href = ele.getAttribute("href");
				if(pattern2.test(href)) {
					if(navigator.appName.match('Microsoft')) {
						
						ele.setAttribute("className","active");
						break;
					} else {
						ele.setAttribute("class","active");
						break;
					}
				}
			}
		}
	}
}
