<!--
/**
 * initiates the marks for accesskeys
 *
 * @return	void
 */
function initAccesskeys () {
	var accessKeys = new Array();
	var obj = document.getElementsByTagName("span");
	var count = obj.length;
	var j = 0;
	for (var i=0; i<count; i++) {
		if (obj[i].className === "accessKey") {
			accessKeys[j] = obj[i];
			j++;
		}
	}
	count = accessKeys.length;
	if (count > 0) {
		dkAccessKeys = accessKeys;
		document.onkeydown = keyDown;
		document.onkeyup = keyUp;
	}
}

/**
 * check if alt key is pressed onkeydown
 *
 * @return	void
 */
function keyDown (keyEvent) {
	var keyCharCode;
	if (!keyEvent) keyEvent = window.event;
	if (keyEvent.which) {
		keyCharCode = keyEvent.which;
	} else if (keyEvent.keyCode) {
		keyCharCode = keyEvent.keyCode;
	}
	if (keyCharCode === 18) showAccessKeys(true);
}

/**
 * check if alt key is pressed onkeyup
 *
 * @return	void
 */
function keyUp (keyEvent) {
	var keyCharCode;
	if (!keyEvent) keyEvent = window.event;
	if (keyEvent.which) {
		keyCharCode = keyEvent.which;
	} else if (keyEvent.keyCode) {
		keyCharCode = keyEvent.keyCode;
	}
	if (keyCharCode === 18) showAccessKeys(false);
}

/**
 * change the style of the access keys
 *
 * @param	boolean		state: indicates if the elements should be displayed or not
 * @return	void
 */
function showAccessKeys (state) {
	var class2set;
	if (state) {
		class2set = "accessKeyActive";
	} else {
		class2set = "accessKey";
	}
	var count = dkAccessKeys.length;
	for (var i=0; i<count; i++) {
		dkAccessKeys[i].className = class2set;
	}
}

/**
 * generate the print link
 *
 * @return	void
 */
function makePrintLink () {
	return true;
}

/**
 * hides and displays elements
 *
 * @return	void
 */
function chgToLong(toShow,toHide){
	document.getElementById(toShow).style.display="block";
	document.getElementById(toHide).style.display="none";
}

/**
 * hides and displays elements
 *
 * @return	void
 */	
function chkToLong(toShow){
	if (document.getElementById('desc' + toShow + 'long').style.display == "block") {
		document.getElementById('desc' + toShow + 'long').style.display = "none";
		document.getElementById('desc' + toShow + 'short').style.display = "block";
	} else {
		document.getElementById('desc' + toShow + 'long').style.display = "block";
		document.getElementById('desc' + toShow + 'short').style.display = "none";
	}
}

/**
 * operns a new window
 *
 * @return	void
 */
function openWindow(url, name, width, height) {
	ocEventWindow = window.open(url,name, "width="+width+",height="+height+",scrollbars=no,location=no");
}

/**
 * opens a new window configurable
 *
 * @return	void
 */
function openWindowC(url, name, width, height, configstr) {
	ocEventWindow = window.open(url,name, "width="+width+",height="+height+","+configstr);
}


/**
 * operns a new window
 *
 * @return	void
 */
function openLink(url) {
	window.location.href = url;
}

/**
 * activates sound off for flash teasers
 *
 * @return	void
 */
function activateSoundOffForFlashTeasers() {
	var flashTeaser = document.getElementById("teaserFlash");
	if (flashTeaser) {
		window.onblur = function () {
			document.getElementById("teaserFlash").setMute();
		};
		window.onfocus = function () {
			document.getElementById("teaserFlash").setUnMute();
		};
	}
}

function switchbg(eid) {
    var iecheck = navigator.appVersion.search(/MSIE 6.0/);
    if (navigator.appName == 'Microsoft Internet Explorer' && iecheck!='-1') {
    
    } else {
        document.getElementById('inev_' + eid).style.backgroundImage='url(/fileadmin/template/img/teaser_full_bg.png)';
    }
}
/**
 * do onLoad
 *
 * @return	void
 */
oldOnload = window.onload;
window.onload = function() {
	if (typeof(oldOnload) === "function") {
		oldOnload();
	}
	if (document.getElementById && document.createTextNode) {
		makePrintLink();
		initAccesskeys();
		activateSoundOffForFlashTeasers();
	}
};

//-->
