function reloadGallery(rubrik, link, language)
{
	this.location.href  = "index.php?lang=" + language + "&opt=" + rubrik + "&sel_title=" + link;
}

function openGalleryWindow(remoteUrl)
{
	var options = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=470,height=432,dependent=yes';
	
	var imageWindow = window.open(remoteUrl, 'galleryWindow', options);
	imageWindow.moveTo(0,0);
	imageWindow.focus();
}

function chooseParticipantPicture()
{
	var url     = 'admin/participantpicture.php';
	var frame   = 'extern';
	var options = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=430,height=98';
	
	imageWindow = window.open(url, frame, options);
	imageWindow.moveTo(0,0);
	imageWindow.opener = self;
	imageWindow.focus();
}

function chooseTrophyPicture()
{
	var url     = 'admin/trophypicture.php';
	var frame   = 'extern';
	var options = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=430,height=98';
	
	imageWindow = window.open(url, frame, options);
	imageWindow.moveTo(0,0);
	imageWindow.opener = self;
	imageWindow.focus();
}

function openChat(lang)
{
	var language = 'english';
	if(lang == "de")
		language = 'german';
	var url     = 'chat/phpMyChat.php3';
	var frame   = 'extern';
	var options = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=950,height=620';
	
	imageWindow = window.open(url, frame, options);
	imageWindow.moveTo(0,0);
	imageWindow.opener = self;
	imageWindow.focus();
}

function setSmiley(smiley) 
{
	if(document.addentry.entry.createTextRange) 
	{
		document.addentry.entry.focus();
		document.selection.createRange().duplicate().text = smiley;
	}
	else
	{
		document.addentry.entry.value += smiley;
	}
}

function PrintDate() 
{
	var Today = new Date();
	var Day = Today.getDate();
	var CurrentMonth = Today.getMonth();
	var Month = new Array("Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
	var Year = Today.getYear();
	var BrowserName = navigator.appName;
	if (Year < 1900 ) 
	{
		Year = Year + 1900
	}
	document.write(Day + ". " + Month[CurrentMonth] + " "+Year);
}
