/**
 * Div mittels style.display sichtbar oder unsichtbar schalten
 *
 * @param string divID
 * @param boolean vis: sichtbar oder unsichtbar
 *
 */
function showHideDiv(divID, vis) {
	theDiv = document.getElementById(divID);
	if (typeof(theDiv) != 'undefined') {
		if (vis) {
			theDiv.style.display = 'block';
		}
		else {
			theDiv.style.display = 'none';
		}
	}
}
/**
 * Div mittels style.display sichtbar/unsichtbar umschalten
 *
 * @param string divID
 * @param boolean vis: sichtbar oder unsichtbar
 *
 */
function toggleDivVisibility(divID, vis) {
	theDiv = document.getElementById(divID);
	if (typeof(theDiv) != 'undefined') {
		if (typeof(vis) != 'undefined' && vis != null) {
			theDiv.style.display = vis ? 'block' : 'none';
			return;
		}
		theDiv.style.display = /none/i.test(theDiv.style.display) ? 'block' : 'none';
		return theDiv.style.display;
	}
	void(0);
}

function ucm(s,v) {
	//alert(s);
	var n=0;
	var r="";
	var l = s.length;
	s = s.substring(7,l-8);
	for(var i=0; i < s.length; i++) {
		n=s.charCodeAt(i);
		if (n>=8364) {n = 128;}
		r += String.fromCharCode(n-v);
	}
	//alert(r);
	return r;
}

function b65dec(s) {
	location.href='mailto:' + ucm(s,3);
}





/**
 * Idee aus pma, um dem IE das hover beizubringen
 */
function IEBugHover(tagName, className) {
    if ( navigator.appName == 'Microsoft Internet Explorer' ) {
        // but only for IE, other browsers are handled by :hover in css
        elements[i].onmouseover = function() {
            this.className += ' hover';
        }
        elements[i].onmouseout = function() {
            this.className = this.className.replace( ' hover', '' );
        }
    }
}
