//<![CDATA[

//////////////////// FUNCTIONS


function openWin(path,winW,winH) {
	var iMyWidth;
	var iMyHeight;
    iMyWidth = (window.screen.width/2) - ((winW/2)+ 10); 
	iMyHeight = (window.screen.height/2) - ((winH/2) + 50); 
	var win2 = window.open(path,'',"status,toolbar=0,height="+winH+",width="+winW+",resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes");
    win2.opener=window;
    win2.focus();
    //return false;
}
function $(strId){
	return document.getElementById(strId);
}

sfHover = function() {  
	var sfEls = document.getElementById("nav").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className="sfhover"; 
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className='';//.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
/* http://www.htmldog.com/articles/suckerfish/dropdowns/ */

////////////////// EDITABLE


hs.graphicsDir='inc/highslide/graphics/'; 
hs.dragByHeading=true;
hs.outlineType='drop-shadow';
hs.showCredits=false;
hs.allowMultipleInstances = false;
hs.skin.contentWrapper =
	'<div class="highslide-move">'+
		'<a href="#" title="{hs.lang.closeTitle}" '+
				'onclick="return hs.close(this)" class="highslide-close">'+
			'<img width="16" height="16" alt="x" src="img/close.gif" /'+'></a>&nbsp;'+
	'</div>'+
	'<div class="highslide-body"></div>';

 
//////////////////// 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 && link){
            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.href='inc/mp3player.swf?barColor=#0972bd&playonload=true&file='+link;
        	a.onclick=function (){
        		return hs.htmlExpand(this, { objectType:'swf',
        objectWidth: 370, objectHeight: 37, allowSizeReduction: false} )
        	};

        }
    }
}
aMod_externalLink();


////////////////////// SCRIPTS

try {
  document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}


//]]>

