//Created on 02-11-2008
// by RL (rclerch@gmail.com)
//
function getElementIE(txt_id)
{//Because IE likes to be 'special,' this function accounts for the fact that even though only one element with
 //  id=txt_id can exist in a document, IE returns the first element with the name equal to the id using the method
 //  getElementById(id). In order to get the correct element, we have to iterate through the document.all-IE specific
 //  array of things in the document.
     if(document.all && document.all[txt_id] != undefined && document.all[txt_id].nodeName == undefined)
     {//shouldn't get here if isn't IE, but meh *shrug* doesn't hurt
         for(aaa=0;aaa<document.all[txt_id].length;aaa++)
        {
            if(document.all[txt_id][aaa].id == txt_id)
            {
                return (document.all[txt_id][aaa]);
            }
        }
     }
     else
     {
         return (document.getElementById(txt_id));//in this case, either this isn't IE or there's only one element with a name tag=txt_id,
         										  // so doesn't really matter
     }
}//end getElementIE

function setExternalLinks() {
  var el_list = document.getElementsByTagName('A');
  for (i=0; i<el_list.length; i++) {
    if (el_list[i].getAttribute('rel') == 'external') {
      el_list[i].setAttribute('target', '_blank');
    }
  }
}