function CheckSendArticle()
{
	if($('infopanel')) { $('infopanel').remove(); };

	var Error = '<div id="infopanel" class="infopanel error"><p>Nesprávně vyplněná položka.</p></div>';

	var FilterEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

	if (!FilterEmail.test(Form.Element.getValue('recipient')))
	{
		Form.Element.focus('recipient');
		new Insertion.After('recipient', Error);
		return false;
	}
	else
	if (!FilterEmail.test(Form.Element.getValue('sender')))
	{
		Form.Element.focus('sender');
		new Insertion.After('sender', Error);
		return false;
	}
	else
	return true;
}

function SendArticle(clanek_id)
{
	var content = '';
	content += '<span class="form-legend">Poslat článek na email</span>';
	content += '<div class="form bg">';
	content += '<form action="/form/form-clanek-detail.php" method="post" onsubmit="return CheckSendArticle();">';
	content += '<input type="hidden" name="clanek_id" value="' + clanek_id + '" />';
	content += '<label for="name">Vaše jméno: </label>';
	content += '<input type="text" name="name" id="name" class="text" />';
	content += '<br />';
	content += '<div class="hr"></div>';
	content += '<label for="sender" class="bold">Váš email: </label>';
	content += '<input type="text" name="sender" id="sender" class="text" />';
	content += '<br />';
	content += '<div class="hr"></div>';
	content += '<label for="recipient" class="bold">Email přijemce: </label>';
	content += '<input type="text" name="recipient" id="recipient" class="text" />';
	content += '<br />';
	content += '<div class="hr"></div>';
	content += '<label for="comment">Komentář: </label>';
	content += '<textarea name="comment" id="comment" class="text"></textarea>';
	content += '<br />';
	content += '<div class="hr"></div>';
	content += '<label for="pdf">Připojit PDF: </label>';
	content += '<input type="checkbox" name="pdf" id="pdf" class="check" />';
	content += '<br />';
	content += '<div class="hr"></div>';
	content += '<label for="odeslat">&nbsp;</label>';
	content += '<input type="submit" name="odeslat" id="odeslat" value="Odeslat" class="button" />';
	content += '<br />';
	content += '<p><strong>Tučné</strong> položky jsou povinné.</p>';
	content += '</form>';
	content += '</div>';

	$('artsend').update(content);
	return false;
}