// We need to know the path because of the base-tag
var baseHref = "";
function getBase(){
	var baseTag = document.getElementsByTagName("base");
	for(var i = 0; i < baseTag.length; i++){
    	baseId = baseTag[i].id;
    	baseHref = baseTag[i].href;
	}
}

function downloadFile(file){
//	var path = baseHref+"pdf/";
//	window.open(path+file,"download","");
	window.open(baseHref+'download.php?file=pdf/'+file);
}

// Onload functions
Event.observe(window, 'load', function() {
	if(!Prototype.Browser.IE) return; /* IE only fix */
	var nav = document.getElementById("nav");
	if(!nav) return;
	var sfEls = 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"), "");
		}
	}	

	getBase();
});