/** external.js
 * Modifies all anchor tags with the attribute rel="external"
 * to open in new windows. Requires Prototype (Hint: Include this script after prototype!)
 * @author John Hughes john@modernearth.net
 * @date 28/08/2007
 */ 

function externalAnchors() {
  $$("a").each(
    function(a) {
      if( a.getAttribute("href") &&
          a.getAttribute("rel") == "external" )
        a.target = "_blank";
    });
}

Event.observe(window, 'load', externalAnchors);