<%@ Control Language="C#" %>
<%@ Register TagPrefix="CS" Namespace="CommunityServer.Controls" Assembly="CommunityServer.Controls" %>
<%@ Import Namespace="CommunityServer.Components" %>
<script language="JavaScript" type="text/javascript">
	function SubmitSendToFriend(fromID, toID)
	{
		fromField = document.getElementById(fromID);
		toField = document.getElementById(toID);
		fromReq = document.getElementById('fromReqSpan');
		toReq = document.getElementById('toReqSpan');
		allowSubmit = true;

		if(fromField.value == "" )
		{
			fromReq.style.visibility = 'visible';
			fromReq.style.display = 'inline';
			allowSubmit = false;
		}
		else
		{
			fromReq.style.visibility = 'hidden';
			fromReq.style.display = 'none';
		}

		if(toField.value == "")
		{
			toReq.style.visibility = 'visible';
			toReq.style.display = 'inline';
			allowSubmit = false;
		}
		else
		{
			toReq.style.visibility = 'hidden';
			toReq.style.display = 'none';
		}

		if(allowSubmit == false)
			alert("Please specify both a from and to email address.");

		return allowSubmit;
	}
</script>
<div id="SendToFriendForm">
	<h3><CS:ResourceControl runat="server" ResourceName="Gallery_SendToFriend_SendPictureToAFriend" id="Resourcecontrol1" NAME="Resourcecontrol1"/></h3>

	<fieldset>
		<dl>
			<dt><label for="<%=SendToFriendFrom.ClientID %>"><span id="fromReqSpan" style="color: red; display:none;visibility:hidden;">*</span><CS:ResourceLabel runat="server" ResourceName="Gallery_SendToFriend_YourEmail" id="Resourcelabel1" NAME="Resourcelabel1"/></label></dt>
			<dd><asp:TextBox id="SendToFriendFrom" runat="server" Columns="30" MaxLength="256" CssClass="formEntry" /></dd>
			<dt><label for="<%=SendToFriendTo.ClientID %>"><span id="toReqSpan" style="color: red; display:none;visibility:hidden;">*</span><CS:ResourceLabel runat="server" ResourceName="Gallery_SendToFriend_To" id="Resourcelabel2" NAME="Resourcelabel2"/></label></dt>
			<dd><asp:TextBox id="SendToFriendTo" runat="server" Columns="30" MaxLength="256" CssClass="formEntry" /></dd>
			<dt><label for="<%=SendToFriendSubject.ClientID %>"><CS:ResourceLabel runat="server" ResourceName="Gallery_SendToFriend_Subject" id="Resourcelabel3" NAME="Resourcelabel3"/></label></dt>
			<dd><asp:TextBox id="SendToFriendSubject" runat="server" Columns="30" MaxLength="256" CssClass="formEntry" /></dd>
			
			<dt><label for="<%=SendToFriendBody.ClientID %>"><CS:ResourceLabel runat="server" ResourceName="Gallery_SendToFriend_Body" id="Resourcelabel4" NAME="Resourcelabel4"/></label></dt>
			<dd><asp:TextBox id="SendToFriendBody" runat="server" Columns="30" Rows="3" MaxLength="3000" TextMode="MultiLine" CssClass="formEntry" /></dd>
			
			<dt><label for=""></label>
				<asp:LinkButton CssClass="CommonTextButton" id="SendToFriendSubmit" runat="server" />
				<a href="#" class="CommonTextButton" onclick="ToggleSendToFriend(); return false;"><%=ResourceManager.GetString("Close")%></a>
			</dt>

		</dl>
	</fieldset>

</div>