//<![CDATA[

///////////////////////////////// FUNCTIONS ////////////////////////////////////

function getHTTPObject() { var xmlhttp; /*@cc_on @if (@_jscript_version >= 5) try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @else xmlhttp = false; @end @*/  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; } } return xmlhttp; 
} var http = getHTTPObject(); // We create the HTTP Object 

///////////////////////////////// editable /////////////////////////////////////

hs.graphicsDir = 'highslide/graphics/';
hs.outlineType = 'rounded-white';
hs.showCredits=false;


///////////////////////////////// onload ///////////////////////////////////////


function aMod_externalLink(){    
    var as,i,link;
    // grab all links, and loop over them
    as=document.getElementsByTagName('a');
    for(i=0;i<as.length;i++){
        var a =as[i];
        link=a.href; 
        var ext=link.split('.').pop();
        // and check if it contains the current location 
        var host = new String(window.location.hostname);
        rExp = /www./gi;
        domain = host.replace(rExp, "");

        if(link.indexOf(domain)==-1 && link.indexOf('javascript:')==-1){
            if(!a.getAttribute('title'))a.setAttribute('title',link);
            a.setAttribute("target","_blank"); 
            
            if(a.className!='')a.className+=' ext-link';
            else a.className='ext-link';                        
        } 
        if (ext=='pdf'){ 
        	a.className = 'pdf-link';
        	a.setAttribute("target","_blank"); 
        }else if (ext=='zip') a.className = 'zip-link';
        else if(ext=='mp3' ){
        	a.className = 'mp3-link ';        	
        	a.setAttribute("target","_blank"); 
        }
    }
}

function addEvent( obj, type, fn )
{
	if (obj.addEventListener)
		obj.addEventListener( type, fn, false );
	else if (obj.attachEvent)
	{
		obj["e"+type+fn] = fn;
		obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
		obj.attachEvent( "on"+type, obj[type+fn] );
	}
}


///////////////////////////////// SCRIPTS //////////////////////////////////////

if(document.getElementById && document.createTextNode){
    window.onload=function(){
    	aMod_externalLink(); 
    	hs.preloadImages(5);
    }	
    //addEvent( 'window', 'load', changeLinks )
}  
try {
  document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}


//]]>
