//******************************************
//FUNCIÓN POPUP
function popup(target, name, features){
window.open(target, name, features); 
}
//  Se Usa
//  <a href="archivo.html" onclick="popUp(this.href, 'Popup1', 'width=100,height=200'); return false;">Abrir popup</a>

//******************************************
// FUNCIÓN TARGET BLANK, para xhtml
function openExternal(){
if(!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName('a');
for(var i = 0; i < anchors.length; i++){        
var thisAnchor = anchors[i];        
if(thisAnchor.getAttribute('href') && thisAnchor.getAttribute('rel') == 'external'){
thisAnchor.target = '_blank';        
}    
}
}
window.onload = openExternal;
// Se usa
// <a href="http://www.google.cl" rel="external">Google</a>
