
function ShowHideComment (objectID)
{
	if (ShowHide (objectID))
	{
		var obj = document.forms['form_comment'].comment;
		obj.focus ();
	}
}

function ShowHide (objectID)
{
	var obj = document.getElementById (objectID);
	if (obj.style.display != 'none')
		obj.style.display = 'none';
	else
		obj.style.display = 'block';
	return (obj.style.display != 'none');
}

function CheckCommentForm (oForm)
{
	var rating = oForm.rating.options[oForm.rating.selectedIndex];
	var comment_title = oForm.comment_title;
	var comment = oForm.comment;

	if (trim (rating.value) == '')
	{
		alert ('Bitte tragen Sie die Bewertung ein!');
		rating.focus ();
		return false;
	}
	else if (trim (comment_title.value) == '')
	{
		alert ('Bitte tragen Sie den Titel der Rezension ein!');
		comment_title.focus ();
		return false;
	}
	else if (trim (comment.value) == '')
	{
		alert ('Bitte tragen Sie den Kommentar ein!');
		comment.focus ();
		return false;
	}
	else if (trim(comment.value).length > 2000)
	{
		alert ('Der Kommentar darf nicht länger als 2000 Zeichen sein! Die Länge beträgt momentan ' + trim(comment.value).length + ' Zeichen!');
		comment.focus ();
		return false;
	}
	return true;
}

function EpisodeOnChange (oSelect)
{
	window.location = 'episode.php?content_id=' + oSelect.options[oSelect.selectedIndex].value;
}

function OpenUserProfile (url, name)
{
	window.open ('' + url + '','' + name + '','fullscreen=no,titlebar=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,directories=no,location=no,width=500,height=300');
}

function OpenOrder (url, name)
{
	window.open ('' + url + '','' + name + '','fullscreen=no,titlebar=yes,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no,location=no,width=800,height=600');
}

function OpenTrailer (url, name)
{
	window.open ('' + url + '','' + name + '','fullscreen=no,titlebar=yes,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no,location=no,width=659,height=523');
}


function add_smily (smiley)
{
	document.getElementById('f_message').value += ' ' + smiley;
}

function SubmitAboProlong (oForm)
{
	if (oForm.time.options[oForm.time.selectedIndex].value == '')
	{
		alert ('Bitte wählen Sie die Verlängerunszeit!');
		return;
	}
	oForm.submit ();
}