﻿function openExternal(){
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'){
var parent = thisAnchor.parentNode; //Referencia al contenedor del hipervínculo.
var a = document.createElement('a'); //Creamos un nuevo Hipervínculo.
var space = document.createTextNode(' ');
a.innerHTML = '(Ver características en ventana nueva)'; //Colocamos el texto que aparecerá
a.setAttribute('href', thisAnchor.href);
a.title = thisAnchor.title;
a.target = '_blank';
parent.appendChild(space);
parent.appendChild(a);
}
}
}
window.onload = openExternal;

/*
sacado de:

http://thefricky.wordpress.com/2007/10/19/abrir-nueva-ventana-en-xhtml-strict-ii-mantener-la-usabilidad/



intercambiado:

a.target = '_blank';

por:

onclick=”return ! window.open(this.href);”

*/

