function openChat(login_name) {
	window.open('chat_window.php?name='+login_name, 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=yno,menubar=no,resizable=yes,width=900,height=700,directories=no,location=no,top=30,left=300');
}

function openPlayer(id) {
	if(id == 1)
	window.open('player/real.html', 'win2', 'status=no,toolbar=no,scrollbars=no,titlebar=yes,menubar=no,resizable=yes,width=305,height=190,directories=no,location=no,top=30,left=300');
	else if(id == 2)
	window.open('player/wmp.html', 'win2', 'status=no,toolbar=no,scrollbars=no,titlebar=yes,menubar=no,resizable=yes,width=305,height=190,directories=no,location=no,top=30,left=300');
	else
	return false;
}
function openPlayerViaAdmin(id) {
	if(id == 1)
	window.open('../player/real.html', 'win2', 'status=no,toolbar=no,scrollbars=no,titlebar=yes,menubar=no,resizable=yes,width=305,height=190,directories=no,location=no,top=30,left=300');
	else if(id == 2)
	window.open('../player/wmp.html', 'win2', 'status=no,toolbar=no,scrollbars=no,titlebar=yes,menubar=no,resizable=yes,width=305,height=190,directories=no,location=no,top=30,left=300');
	else
	return false;
}

function openBBCode() {
	window.open('scripts/bbcode.php', 'win3', 'status=no,toolbar=no,scrollbars=no,titlebar=yes,menubar=no,resizable=yes,width=305,height=190,directories=no,location=no,top=30,left=300');
}
function openBBCodeViaAdmin() {
	window.open('../scripts/bbcode.php', 'win3', 'status=no,toolbar=no,scrollbars=no,titlebar=yes,menubar=no,resizable=yes,width=305,height=190,directories=no,location=no,top=30,left=300');
}

function toggleMenu(id)
{
	var GECKO = document.getElementById? 1:0 ;
	var NS = document.layers? 1:0 ;
	var IE = document.all? 1:0 ;
	
	if(GECKO)
	{
		document.getElementById(id).style.display = (document.getElementById(id).style.display == 'block') ? 'none' : 'block';
	}
	else if(NS)
	{
		document.layers[id].display = (document.layers[id].display == 'block') ? 'none' : 'block';
	}
	else if(IE)
	{
		document.all[id].style.display = (document.all[id].style.display == 'block') ? 'none' : 'block';
	}
}

function toggleContactForm(id,placeInTag)
{
	var GECKO = document.getElementById? 1:0 ;
	var NS = document.layers? 1:0 ;
	var IE = document.all? 1:0 ;
	
	if(GECKO){
		if(document.contact_form.empfaenger.selectedIndex == placeInTag){
			document.getElementById(id).style.display = 'block';
		} else {
			document.getElementById(id).style.display = 'none';
		}
	}
	else if(NS){
		if(document.contact_form.empfaenger.selectedIndex == placeInTag){
			document.layers[id].display = 'block';
		} else {
			document.layers[id].display = 'none';
		}
	}
	else if(IE){
		if(document.contact_form.empfaenger.selectedIndex == placeInTag){
			document.all[id].style.display = 'block';
		} else {
			document.all[id].style.display = 'none';
		}
	}
}

function toggleInfo(id)
{
	var GECKO = document.getElementById? 1:0 ;
	
	if(GECKO){
		if(document.contact_form.empfaenger.selectedIndex == 1){
			document.getElementById(id).innerHTML = 'Die Gildenleitung der Gilde Gothic ist für alles rund um die Gilde zuständig!';
		} 
		else if(document.contact_form.empfaenger.selectedIndex == 2) {
			document.getElementById(id).innerHTML = 'Wenn Du Dich bewerben willst, oder Du eine Frage zum Radio hast, hilft Dir die Radioleitung!';
		}
		else if(document.contact_form.empfaenger.selectedIndex == 3) {
			document.getElementById(id).innerHTML = 'Ein Problem mit der Website? Dann schreib dem Webmaster, er wird Dir helfen!';
		}
		else if(document.contact_form.empfaenger.selectedIndex == 4) {
			document.getElementById(id).innerHTML = 'Wenn Du einen speziellen Mod des Radios anschreiben willst...';
		}
		else document.getElementById(id).innerHTML = '';
	}
}