// Generic function to register functions to be executed when onload event is triggered
function addLoadEvent(func) {
	var onloadFunc = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			if (onloadFunc) {
				onloadFunc();
			}
			func();
		}
	}
}

function trim(str) {   
	var retval;
	if ((str != null) && (str.charAt(0) == ' ')) {
		retval = str.substring(1,str.length);
	} else {
		retval = str;
	}
	return retval;
}
						
	
function blcfenster(theURL, winName, features) { //v2.0
	window.open(theURL, winName, features);
}

function fenstersite() {
	helpFenster=open("/de/div/sitemap.html","","width=800,height=700,left=0,top=0,menubar=no,scrollbars=yes");
	helpFenster.focus();
}

function neuesfenster(url, name) {
	if(name == 'Drucken') {
		window.print();
		return;
	}
	fenster = open(url, name);
	fenster.focus();
}

// Twitter Parameter Übergabe
	function createTweetLink(url, via, text, hashtags)
	{
		var tweetUrl = "https://twitter.com/intent/tweet?";
		return tweetUrl += "url=" + encodeURI(url) + "&text=" + encodeURI(text) + "&via=" + encodeURI(via) + "&hashtags=" + encodeURI(hashtags);
	}

// Sprachumschaltung	
	function changeUrl() {
			var redirect;
			redirect = document.getElementById('choose_language').value;
			document.location.href = redirect;
	}
	
//<!-- Begin
var refer=true;
function combobox() {
if (refer) {
  document.all.contents.style.visibility="visible";
  refer=false;
  document.arrow.src='/images/layout/arrow2.gif';
}
else {
  document.all.contents.style.visibility="hidden";
  refer=true;
  document.arrow.src='/images/layout/arrow.gif';
}
}
//  End -->



