<!--
/* SVN FILE: $Id: external.js 147 2008-10-27 07:20:51Z Chris $ */
/**
 * Support opening links in a new window with valid XHTML
 *
 * XHTML STRICT does not permit the target attribute in markup.
 * To allow markup to be valid, but open links in a new window
 * or tab links with "external" in the rel attribute have their
 * target attribute set to "_blank".
 *
 * @uses {@link http://prototypejs.org/ prototype JavaScript library}
 *
 * @copyright    Copyright 2008 PBM Web Development - All Rights Reserved
 * @package      app
 * @subpackage   app.webroot.js
 * @since        V1.0.0
 * @version      $Revision: 147 $
 * @modifiedby   $LastChangedBy: Chris $
 * @lastmodified $Date: 2008-10-27 07:20:51 +0000 (Mon, 27 Oct 2008) $
 */

Event.observe(window, 'load', function() {
  $$('a[rel=external]').each(function(anchor) {
    anchor.writeAttribute('target', '_blank');
  });
});
// -->

