<%@ 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" class="sectionContainer" style="position:absolute;display:none;visibility:hidden;width:350px;background-color:white">
	<div class="sectionHeader"><CS:ResourceControl runat="server" ResourceName="Gallery_SendToFriend_SendPictureToAFriend" /></div>

	<div class="sectionBody">

			<div class="formRow">
				<label for="<%=SendToFriendFrom.ClientID %>"><span id="fromReqSpan" style="color: red; display:none;visibility:hidden;">*</span><CS:ResourceLabel runat="server" ResourceName="Gallery_SendToFriend_YourEmail" /></label><asp:TextBox id="SendToFriendFrom" runat="server" Columns="30" MaxLength="256" CssClass="formEntry" /><br />
			</div>
			<div class="formRow">
				<label for="<%=SendToFriendTo.ClientID %>"><span id="toReqSpan" style="color: red; display:none;visibility:hidden;">*</span><CS:ResourceLabel runat="server" ResourceName="Gallery_SendToFriend_To" /></label><asp:TextBox id="SendToFriendTo" runat="server" Columns="30" MaxLength="256" CssClass="formEntry" /><br />
			</div>
			<div class="formRow">
				<label for="<%=SendToFriendSubject.ClientID %>"><CS:ResourceLabel runat="server" ResourceName="Gallery_SendToFriend_Subject" /></label><asp:TextBox id="SendToFriendSubject" runat="server" Columns="30" MaxLength="256" CssClass="formEntry" /><br />
			</div>
			<div class="formRow">
				<label for="<%=SendToFriendBody.ClientID %>"><CS:ResourceLabel runat="server" ResourceName="Gallery_SendToFriend_Body"/></label><asp:TextBox id="SendToFriendBody" runat="server" Columns="30" Rows="3" MaxLength="3000" TextMode="MultiLine" CssClass="formEntry" /><br />
			</div>
			<div class="formRow">
				<label for=""></label>
				<asp:Button id="SendToFriendSubmit" runat="server" />
				<input type="button" name="Close" value="<%=ResourceManager.GetString("Close")%>" onclick="ToggleSendToFriend();" />
			</div>

	</div>

</div>