function addEvent(a,b,c){if(a.addEventListener)a.addEventListener(b,c,false);else if(a.attachEvent){a["e"+b+c]=c;a[b+c]=function(){a["e"+b+c](window.event)};a.attachEvent("on"+b,a[b+c])}}function removeEvent(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,false);else if(a.detachEvent){a.detachEvent("on"+b,a[b+c]);a[b+c]=null;a["e"+b+c]=null}}
function openInNewWindow(a){a=a?a:window.event;if(!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey))if(a=window.open(this.getAttribute("href"),"_blank")){a.focus&&a.focus();return false}return true}
function getNewWindowLinks(){if(document.getElementById&&document.createElement&&document.appendChild)for(var a=document.getElementsByTagName("a"),b,c,d=0;d<a.length;d++){c=a[d];if(/\bext\-link\b/.test(c.className)){b=document.createElement("em");b.appendChild(document.createTextNode(""));c.appendChild(b);c.onclick=openInNewWindow}}}addEvent(window,"load",getNewWindowLinks);
