function divClose(id) {
	document.getElementById(id).style.visibility = 'hidden';
	document.getElementById(id).innerHTML = '';
}

function divOpen(id, url) {
	document.getElementById(id).style.visibility = 'visible';
	ajaxpagefetcher.load(id, url, true);
}

function divHide(id) {
	document.getElementById(id).style.display = 'none';
	//document.getElementById(id).style.visibility = 'hidden';
	//document.getElementById(id).style.position = 'absolute';
}

function divUnhide(id) {
	document.getElementById(id).style.display = 'block';
	//document.getElementById(id).style.position = 'static';
	//document.getElementById(id).style.visibility = 'visible';
}

function divVisibleSwitch(id) {
	if(document.getElementById(id).style.display != 'none') {
		divHide(id);
	} else {
		divUnhide(id);
	}
}

function correctIE6Fixed(id) {
	if(getBrowser() == 'IE 6')
		document.getElementById(id).style.top = (document.documentElement.scrollTop + 100) + "px";
}

function getBrowser() {
	/*  Autor, Entwicklung 2003-2008 Kristof Lipfert Duesseldorf    */
	/*  Version 20080522                                            */
	
	check = [
		['window.postMessage', 'window.XMLHttpRequest&&(document.postMessage||window.external)', 'document.compatMode', '(document.detachEvent||document.contentType)'],
		['window.execScript','window.pkcs11','window.opera', 'window.navigator&&window.navigator.vendor'],
		[
			['IE 8', 'FF 3', 'Op 9.5', 'KDE?'],
			['IE 7', 'FF 2', 'Op 9', 'KDE?'],
			['IE 6', 'FF 1.5', 'Op 8', 'KDE/Safari 3'],
			['IE 5x', 'NN 7', 'Op 7', 'KDE/Konqu. 3']
		]
	];
	
	var j;
	var b;
	
	for(n = 0; n < check[1].length; n++) {
		if(!eval(check[1][n]) == 0)
			b = n;
	}
	
	for(n = check[0].length; n > -1; n--) {
		if(!eval(check[0][n]) == 0)
			j = n;
	}
	
	return (j > -1 && b >- 1) ? check[2][j][b] : '�lterer Browser o. unbekannt.';
}
