function externalLinks(){
	if(!document.getElementsByTagName) return;
	var anchors=document.getElementsByTagName("a");
	if(!anchors) return;
	for(var i=0;i<anchors.length;i++){
		var anchor = anchors[i];
		if(anchor.getAttribute("href") && anchor.getAttribute("rel")=="ext")
			anchor.target = "_blank";
	}
}

sfHover = function(){
	if(!document.getElementById || !document.getElementsByTagName) return;
	var thenav = document.getElementById("nav");
	if(!thenav) return;
	var sfEls = thenav.getElementsByTagName("li");
	if(!sfEls)return;
	for (var i=0; i<sfEls.length; i++){
		sfEls[i].onmouseover=function(){this.className+=" hover";}
		sfEls[i].onmouseout=function(){this.className=this.className.replace(new RegExp(" hover\\b"), "");}
	}

	var thenav = document.getElementById("leftmenu");
	if(!thenav) return;
	var sfEls = thenav.getElementsByTagName("li");
	if(!sfEls)return;
	for (var i=0; i<sfEls.length; i++){
		sfEls[i].onmouseover=function(){this.className+=" hover";}
		sfEls[i].onmouseout=function(){this.className=this.className.replace(new RegExp(" hover\\b"), "");}
	}
}

function dothings(){
	externalLinks();
}

window.onload = dothings;

if (window.attachEvent) window.attachEvent("onload", sfHover);//numai ie stie de attachEvent (si Opera)
