<%-----------------------------------------------------------
   Copyright (c) 1999-2000, Oracle Corporation. All rights reserved.
------------------------------------------------------------%>
<jsp:useBean id="currSS" scope ="session" class="oracle.jsp.jml.JmlString" />
<jsp:useBean id="currTS" scope ="session" class="oracle.jsp.jml.JmlString" />

<HTML>

<HEAD>
        <TITLE>Java Store</TITLE>
</HEAD>

<BODY BACKGROUND=images/bg.gif BGCOLOR=#FFFFFF>

<jsp:useBean id="sweatShirtSize" scope="page" class="oracle.jsp.jml.JmlString" >
	<jsp:setProperty name="sweatShirtSize" property="value" param="SS" />
</jsp:useBean>
<jsp:useBean id="tshirtSize" scope="page" class="oracle.jsp.jml.JmlString" >
	<jsp:setProperty name="tshirtSize" property="value" param="TS" />
</jsp:useBean>

<jsp:useBean id="orderedSweatshirt" scope="page" class="oracle.jsp.jml.JmlBoolean" >
	<jsp:setProperty name="orderedSweatshirt" property="value" 
		value= '<%= !(sweatShirtSize.isEmpty() || sweatShirtSize.getValue().equals("none")) %>'  />
</jsp:useBean>

<jsp:useBean id="orderedTShirt" scope="page" class="oracle.jsp.jml.JmlBoolean" >
	<jsp:setProperty name="orderedTShirt" property="value"
		value='<%= !(tshirtSize.isEmpty() || tshirtSize.getValue().equals("none")) %>'  />
</jsp:useBean>


<P>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100% HEIGHT=553>
        <TR>
                <TD WIDTH=33% HEIGHT=61>&nbsp;</TD>
                <TD WIDTH=67% HEIGHT=61>&nbsp;</TD>
        </TR>
        <TR>
                <TD WIDTH=33% HEIGHT=246>&nbsp;</TD>
                <TD WIDTH=67% HEIGHT=246 VALIGN=TOP BGCOLOR=#FFFFFF>

	<% if (orderedSweatshirt.getValue() || orderedTShirt.getValue()) { %>
		Thank you for selecting our fine JSP Wearables!<P>
		
		<% if (!currSS.isEmpty() || !currTS.isEmpty()) { %>
		You have changed your order:
            <UL>
			<% if (orderedSweatshirt.getValue()) { %>
				<LI>1 Sweatshirt
				<% if (!currSS.isEmpty()) { %> 
					<S>(size: <%= currSS.getValue().toUpperCase() %>)</S>&nbsp
				<% } %>
				(size: <%= sweatShirtSize.getValue().toUpperCase() %> )
			<% } else if (!currSS.isEmpty()) { %>
		      	<LI><S>1 Sweatshirt (size: <%= currSS.getValue().toUpperCase() %>)</S>
			<% } %>

	      	<% if (orderedTShirt.getValue()) { %>
				<LI>1 Tshirt 
				<% if (!currTS.isEmpty()) { %> 
					<S>(size: <%= currTS.getValue().toUpperCase() %>)</S>&nbsp
				<% } %>
				(size: <%= tshirtSize.getValue().toUpperCase() %>)
			<% } else if (!currTS.isEmpty()) { %>
		      	<LI><S>1 Tshirt (size: <%= currTS.getValue().toUpperCase() %>)</S>
	      	<% } %>
		</UL>
		<% } else { %>
		You have selected: 
		<UL>
			<% if (orderedSweatshirt.getValue()) { %>
				<LI>1 Sweatshirt (size: <%= sweatShirtSize.getValue().toUpperCase() %>)
			<% } %>

			<% if (orderedTShirt.getValue()) { %>
				<LI>1 Tshirt (size: <%= tshirtSize.getValue().toUpperCase() %>)
			<% } %>

		</UL>
		<% } %>
	<% } else { %>
		Are you sure we can't interest you in something?
	<% } %>


	<CENTER>
      <FORM ACTION="index.jsp" METHOD="GET" ENCTYPE="application/x-www-form-urlencoded">
	<INPUT TYPE="IMAGE" SRC="images/shop_again.gif" WIDTH="91" HEIGHT="30" BORDER="0">
      </FORM>
      </CENTER>
	</TD></TR>
</TABLE>

</BODY>

</HTML>

<% 
if (orderedSweatshirt.getValue()) { 
	currSS.setValue(sweatShirtSize.getValue());
} else {
	currSS.setValue("");
}
session.setAttribute("currSS", currSS);

if (orderedTShirt.getValue()) { 
	currTS.setValue(tshirtSize.getValue());

} else {
	currTS.setValue("");
}
session.setAttribute("currTS", currTS);
%>
