function externalLinks() {  
 if (!document.getElementsByTagName) return;  
 var anchors = document.getElementsByTagName("a");  
 for (var i=0; i<anchors.length; i++) {  
   var anchor = anchors[i];  
   if (anchor.getAttribute("href") &&  
       anchor.getAttribute("rel") == "external") { 
       anchor.target = "_blank";  
   }
 }  
}
  
function niceTitles() {  
 if (!document.getElementsByTagName) return;  
 var anchors = document.getElementsByTagName("a");  
 for (var i=0; i<anchors.length; i++) {  
   var anchor = anchors[i];  
   if (anchor.getAttribute("title") && anchor.getAttribute("rel") == "tooltip") { 
       //add an onclick that returns false
       anchor.onclick="return true;";
       //add the tooltip container
       var TT = document.createElement("div");
       TT.appendChild(document.createTextNode(anchor.getAttribute("title")));
       TT.className = "tooltip";
       anchor.appendChild(TT);
       //get rid of the native tooltip
       anchor.removeAttribute("title");
 }  
} 
}

function makeFunctional() {
	niceTitles();
	externalLinks();
}



