// Fenster öffnen °NEW°
function popUp(strURL,strType,strHeight,strWidth) {
			var strOptions="";
				if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
				if (strType=="showall") strOptions="toolbar,menubar,scrollbars,resizable,location,status,height="+strHeight+",width="+strWidth;
				if (strType=="elastic") strOptions="menubar,scrollbars,resizable,height="+strHeight+",width="+strWidth;
				
				// Position berechnen
				var cool = (!document.all && document.getElementById);
				var ie = (document.all);

				if(cool) {
				sbreite = innerWidth;
				shoehe = innerHeight;
				}
				else if(ie) {
				sbreite = document.body.clientWidth;
				shoehe = document.body.clientHeight;
				}
				b = strWidth;                    
				h = strHeight; 
				x = (sbreite-b)/2;
				y = (shoehe-h)/2;
				
				// Fenster öffnen	
				fenster = window.open(strURL, 'newWin', strOptions);
				// Fenster zentrieren
				fenster.moveTo(x, y);
}

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);


function fileLinks() {
    var fileLink;
    if (document.getElementsByTagName('a')) {
        for (var i = 0; (fileLink = document.getElementsByTagName('a')[i]);
i++) {
            if (fileLink.href.indexOf('.pdf') != -1) {
                fileLink.setAttribute('target', '_blank');
                fileLink.className = 'pdfLink';
            }
            if (fileLink.href.indexOf('.doc') != -1) {
                fileLink.setAttribute('target', '_blank');
                fileLink.className = 'docLink';
            }
            if (fileLink.href.indexOf('.zip') != -1) {
                fileLink.setAttribute('target', '_blank');
                fileLink.className = 'zipLink';
            }
        }
    }
}


function randomFX() {
		var classes = new Array("01", "02", "03","04", "05");
		var date = new Date();
		var seconds;
		var classid;
		seconds = date.getSeconds();
		classid = seconds % classes.length;
		document.getElementById('inner-container').className = 'fx-' + classes[classid];
}

window.onload = function() {
	fileLinks();
}
