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

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

<%
   HttpContext.Current.Response.Buffer = true;
%>

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

	<title>Shopping Cart</title>
	<script>
	var changed;
	function validate()
	{
		var x, s, i, a= document.all;
		if(!changed)
		{
			a("Change").focus();
			return false;
		}
		for(i= 0; x= a("Quantity" + i), x != null; i++)
		{
			s= x.value= x.value.replace(/\s+$/, "").replace(/^\s+/, "");
			if(s == "" || s.search(/\D/) >= 0)
			{
				alert("This is not a legal value.");
				x.focus();
				return false;
			}
			x.value= s;
		}
		return true;
	}
	</script>
</head>
<body>
<%
   if (!String.IsNullOrEmpty(HttpContext.Current.Request["Add"]))
   {
      AddToShoppingCart();
   }
   if (!String.IsNullOrEmpty(HttpContext.Current.Request["Change"]))
   {
      UpdateShoppingCart();
   }
%>
<% _t_begin_cart1.Author_Markup(); %>
<%
   EmitShoppingCart();
%>
<% _t_end1.Author_Markup(); %>

</body>
</html>

