if(typeof Array.prototype.push != 'function') {
  Array.prototype.push = ArrayPush;
  function ArrayPush(value) {
    this[this.length] = value;
  }
} // IE 5 fix


function $(element) {
  if (typeof element == 'string')
    return document.getElementById(element);
}


function addEvent(obj, evType, fn) { 
  if (obj.addEventListener){ 
    obj.addEventListener(evType, fn, false); 
    return true; 
  }
  else if (obj.attachEvent){ 
    var r = obj.attachEvent("on"+evType, fn); 
    return r; 
  }
  else { 
    return false; 
  } 
}


var NewWindow = {
  init: function(att,val) {
    if (!document.getElementById || !document.createElement || !document.appendChild) { return; }
    var strAtt   = ((typeof att == 'undefined') || (att == null)) ? 'class' : att;
    var strVal   = ((typeof val == 'undefined') || (val == null)) ? 'non-html' : val;
    var arrLinks = document.getElementsByTagName('a');
    var oRegExp  = new RegExp("(^|\\s)" + strVal + "(\\s|$)");
    var oLink;
    for (var i = 0; i < arrLinks.length; i++) {
      oLink = arrLinks[i];
      if ((strAtt == 'class') && (oRegExp.test(oLink.className)) || (oRegExp.test(oLink.getAttribute(strAtt)))) {
		oLink.onclick = NewWindow.openWin;
      }
    }
    oWarning = null;
  },
  openWin: function(e) {
    var event = (!e) ? window.event : e;
    if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey)
	  return true;
    else {
      var oWin = window.open(this.getAttribute('href'), '_blank');
      if (oWin) {
        if (oWin.focus) { oWin.focus(); return false; }
      }
      oWin = null;
      return true;
    }
  }
};  // end NewWindow


addEvent(window, 'load', function(){NewWindow.init("rel", "external");});