if(typeof com == "undefined") var com = new Object();
if(typeof com.deconcept == "undefined") com.deconcept = new Object();
if(typeof com.deconcept.util == "undefined") com.deconcept.util = new Object();
if(typeof com.deconcept.FlashObjectUtil == "undefined") com.deconcept.FlashObjectUtil = new Object();
com.deconcept.FlashObjectUtil.getPlayerVersion = function(){
   var PlayerVersion = new com.deconcept.PlayerVersion(0,0,0);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new com.deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	} else {
		if (window.ActiveXObject){
		   try {
   			   var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
		   		PlayerVersion = new com.deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
		   } catch (e) {}}
	}
	return PlayerVersion;
};
com.deconcept.PlayerVersion = function(arrVersion) {
	this.major = parseInt(arrVersion[0]) || 0;
	this.minor = parseInt(arrVersion[1]) || 0;
	this.rev = parseInt(arrVersion[2]) || 0;
};
var getQueryParamValue = com.deconcept.util.getRequestParameter;

var flashtext_de = "<h1>Flash Player benötigt!<\/h1><p>Der benötigte Flash Player 8 wurde nicht gefunden.<br \/>Mögliche Ursachen: Javascript erkennt den Player nicht korrekt oder der Player ist nicht installiert.<br \/>Um die multimedialen Inhalte korrekt anzeigen zu können, ist der Flash Player unbedingt erforderlich.<br \/><br \/><a class='flash' href='http:\/\/www.macromedia.com\/go\/getflashplayer' target='_blank'>&raquo; Player jetzt installieren<\/a>";

function initLinks()
{
	if (!document.getElementsByTagName){return;}
	var anchors = document.getElementsByTagName("a");

	// loop through all anchor tags
	for (var i=0; i<anchors.length; i++){
		var anchor = anchors[i];

		if (anchor.getAttribute("href") && (anchor.getAttribute("rel") == "lightbox")){
			anchor.onclick = function () {showLightbox(this); return false;}
		} else {
            if (anchor.href.indexOf('.pdf') != -1) {
                anchor.setAttribute('target', '_blank');
                anchor.className = 'linkpdf';
            }
            if (anchor.href.indexOf('.doc') != -1) {
                anchor.setAttribute('target', '_blank');
                anchor.className = 'linkdoc';
            }
            if (anchor.href.indexOf('.rtf') != -1) {
                anchor.setAttribute('target', '_blank');
                anchor.className = 'linkdoc';
            }
            if (anchor.href.indexOf('.xls') != -1) {
                anchor.setAttribute('target', '_blank');
                anchor.className = 'linkexcel';
            }		
		}
	}
}

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

}

addLoadEvent(initLinks);