window.onload = function() {
    var links = document.getElementsByTagName('a');
    for (var i=0;i < links.length;i++) {
      if (links[i].rel == 'external') {
          links[i].onclick = function() {
              window.open(this.href);
              return false;
          };
      }
      else if (links[i].rel == 'externa') 
			{	
				// add an onclick event on the fly to pass the href attribute				
				// of the link to our second function, openPopUp 				
				links[i].onclick = function() 
				{				
					openPopUp(this.getAttribute("href"));				
					return false; 				
				} 			
			}	
    }
};

function openPopUp(linkURL) 
{	
	window.open(linkURL,'popup','width=600,height=450')
}