function setExternalLinks() {
    if ( !document.getElementsByTagName ) {
         return null;
       }
     var anchors = document.getElementsByTagName( "a" );
     for ( var i = 0; i < anchors.length; i++ ) {
         var anchor = anchors[i];
        if ( anchor.getAttribute( "href" ) &&
             anchor.className == "external" ) {
          anchor.setAttribute( "target", "_blank" );
          }
        if ( anchor.getAttribute( "href" ) &&
             anchor.className == "external pdf" ) {
          anchor.setAttribute( "target", "_blank" );
          }
       }
    }

function addLoadEvent(func)
{	
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
		oldonload();
		func();
		}}}


addLoadEvent(setExternalLinks);	