function ShowSendToFriend()
{
	$('SendToFriend').show();
	DoSifrReplacements();
	
	new Ajax.Request('/ajax/send-to-friend/show-form/', {
		method: 'get',
		onSuccess: function(transport) 
		{
			$('SendToFriendContent').update(transport.responseText);
			DoSifrReplacements();
		},
		onFailure: function(transport, jsonreponse)
		{
			('The request has taken longer than normal to load.\n\nPlease wait while we attempt again.'); 
			location.href = '/send-to-friend';
		},
		onException: function()
		{
			alert('An error has occured while processing your request.\n\nPlease wait while we attempt again.');
			location.href = '/send-to-friend';
		}
		
	});
	return false;
}

function SendPageToFriend()
{
	new Ajax.Request('/ajax/send-to-friend/send-page/', {
		method: 'post',
		parameters: $('frm_staf').serialize(true),
		onSuccess: function(transport) 
		{
			$('SendToFriendContent').update(transport.responseText);
			DoSifrReplacements();
		},
		onFailure: function(transport, jsonreponse)
		{
			alert('The request has taken longer than normal to load, please try again.\n\nIf the problem persists please contact the administrator.');
		},
		onException: function()
		{
			alert('An error has occured while processing your request, please try again.\n\nIf the problem persists please contact the administrator.');
		}
	});
	return false;
}