

   /*
      fix some non-xhtml 1.1 element attributes for compatibility with older browsers
   */
   function initialize() {

      if (document.getElementsByTagName) {

         // target attribute isn't available in XHTML 1.1 - use "rel" to add targets
         // for external links so they open in a new window
         anchors = document.getElementsByTagName("a");
         for (i = 0; i < anchors.length; i++) {
            anchor = anchors[i];
            if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
               anchor.target = "_blank";
         }

         // the align attribute isn't available for images in XHTML 1.1 - use
         // predefined classes to add this attribute for compatibility with older
         // browsers, and for visitors that have disabled stylesheets
         images = document.getElementsByTagName("img");
         for (i = 0; i < images.length; i++) {
            image = images[i];
            if (image.className == "imgRight")
               image.align = "right";
            if (image.className == "imgLeft")
               image.align = "left";
            image.border = 0;
         }

      }
   }

   window.onload = initialize;

