<%--
   asp code Generated by Basic Processor
   Original Page Name: C:\gmTestBed\FMStocks\src\FMSWeb\ASP\SellStock.asp
--%>

<%@ Page language="C#" explicit="true" CodeBehind="SellStock.aspx.cs" Inherits="FMSWeb._SellStock" %>

<%
   HttpContext.Current.Response.Buffer = true;
   // Set default prompt for users coming to the page for the first time.
   MainPrompt = FMSWeb._strings.SELLSTOCK_DEFAULT_PROMPT;
%>

<html>
<head>
<% _t_head1.Author_Markup(); %>

	<title>Sell</title>
	<script language="javascript">
	<!--
	// Synchronize the sell text with the chosen ticker symbol
	function ticker_click()
	{
		sharesspan.innerText = event.srcElement.value;
	}
	function form_onsubmit()
	{
		if(document.all.sharesspan.innerText == "(choose a stock)")
		{
			alert("Please select a stock.");
			return event.returnValue= false;
		}
		var x= document.all.shares.value;
		if(x == "" || x.search(/\D/) >= 0 || Number(x) < 1)
		{
			alert("Invalid number of shares.");
			return event.returnValue= false;
		}
	}
	//-->
	</script>
</head>
<body>
<% _t_begin1.Author_Markup(); %>

<p class="section">Sell Stocks from your Portfolio</p>
<%=MainPrompt%><br>
<form method="post" action="SellStockAction.aspx" onsubmit="form_onsubmit()">
<%
   EmitSellList();
%>
<p>
Sell <input type="text" id="shares" name="shares" maxlength="5" size="5">
shares of <span id="sharesspan">(choose a stock)</span>.
</p>
<input type="submit" value="Submit Order" id="submit1" name="submit1">
</form>
<% _t_end1.Author_Markup(); %>

</body>
</html>
