<%@ Control Language="VB" AutoEventWireup="false" CodeFile="ShoppingCart.ascx.vb" Inherits="Controls_ShoppingCart" %>
<script type="text/javascript" language="javascript">
	function removeItem(itemID)
	{
		document.forms[0].elements["txtRemoveItem"].value = itemID;
		document.forms[0].submit();
	}
	
	function removeSubitem(subitemID)
	{
		document.forms[0].elements["txtRemoveSubitem"].value = subitemID;
		document.forms[0].submit();
	}
	
	function ClientValidateHSDTerms(source,arguments)
	{
	    chkHSDTerms = document.getElementById["chkHSDTerms"];
	    //chkHSDTerms = document.forms[1].elements["chkHSDTerms"];
	    //alert(chkHSDTerms);
	   if (chkHSDTerms.visible == "true")
	   {
          if (chkHSDTerms.selected != "true")
          {
          args.IsValid = False;
          
          }
       }
    }
</script>

<input type="hidden" id="txtRemoveItem" name="txtRemoveItem" />
<input type="hidden" id="txtRemoveSubitem" name="txtRemoveSubitem" />
<div class="roundedFlexible">
    <div class="roundedTopLeft">
        <div class="roundedTopRight">
            <div class="roundedBotRight">
                <div class="roundedBotLeft">
                    <!--  start header with colored background  -->
                    <h2>Shopping Cart</h2>
                    
                    <asp:Panel  ID="pnlMessage" runat="server" Visible="false">
                        <!-- start alert  -->
                        <div class="solidRoundedLtOrange">
                            <div class="solidRoundedTop"></div>
                            <div id="solidRoundedContent" class="darkOrange">
                                <asp:Label ID="lblMessage" runat="server"></asp:Label>                            
                            </div>
                            <div class="solidRoundedBot"></div>
                        </div>
                        <!-- start div that creates point under the alert bubble  -->
                        <div id="point"></div>
                        <!-- end div that creates point under the alert bubble  -->
                        <!-- end alert  -->
                    </asp:Panel>
                    <div></div>
                    <div>
                        <asp:LinkButton ID="btnUndoRemove" runat="server" Text="undo remove" />
                    </div>
                    <asp:Panel ID="pnlEmpty" runat="server">
                        <p class="squished">
                            Your shopping cart is empty.</p>
                        <div class="solidRounded">
                            <div class="solidRoundedTop">
                                <div></div>
                            </div>
                            <div class="solidRoundedContent Green">
                                Add items by clicking the "Add to Cart" button for the products you want to order.
                            </div>
                            <div class="solidRoundedBot">
                                <div></div>
                            </div>
                        </div>
                        <asp:Panel ID="pnlEmptyLinks" runat="server"><div style="background-color:White"><br /></div>
                            <div class="solidRounded">
                                <div class="solidRoundedTop">
                                    <div></div>
                                </div>
                                <div class="solidRoundedContent green">
                                    <h2 class="medGray">
                                        Shop for:</h2>
                                    <ul>
                                        <li ><a href='../Visitors/Localize.aspx?<%=QueryStringName.TargetPage%>=<%=Server.UrlEncode("../Visitors/AllOffers.aspx")%>'>
                                            Special Bundle Offers</a></li>
                                        <li><a href='../Visitors/Localize.aspx?<%=QueryStringName.TargetPage%>=<%=Server.UrlEncode("../Visitors/BuildYourOwn.aspx")%>'>Build Your Own Package</a></li>
                                        <li><a href='../Visitors/Localize.aspx?<%=QueryStringName.TargetPage%>=<%=Server.UrlEncode("../Visitors/Offers.aspx?" & QueryStringName.ProductItem & "=" & ProductItem.CableTV.GetHashCode())%>'>
                                            Cable TV</a></li>
                                        <li><a   href='../Visitors/Localize.aspx?<%=QueryStringName.TargetPage%>=<%=Server.UrlEncode("../Visitors/Offers.aspx?" & QueryStringName.ProductItem & "=" & ProductItem.Internet.GetHashCode())%>'>
                                            High-Speed Internet</a></li>
                                        <li><a href='../Visitors/Localize.aspx?<%=QueryStringName.TargetPage%>=<%=Server.UrlEncode("../Visitors/Offers.aspx?" & QueryStringName.ProductItem & "=" & ProductItem.Telephone.GetHashCode())%>'>
                                            Charter Telephone</a></li>
                                    </ul>
                                </div>
                                <div class="solidRoundedBot">
                                    <div></div>
                                </div>
                            </div>
                        </asp:Panel>
                    </asp:Panel>
                    <asp:Panel ID="pnlFilled" runat="server" DefaultButton="btnCheckout">
                        <!-- begin bundle -->
                        <asp:Literal ID="ltrBundle" runat="server"></asp:Literal>
                        <div class="shoppingCart">
                            <table id="cart" cellpadding="0" cellspacing="0">
                                <asp:Literal ID="ltrBundleCustomizations" runat="server"></asp:Literal>
                            </table>
                        </div>
                        <!-- end bundle -->
                        <!-- begin cable -->
                        <asp:Literal ID="ltrCableTV" runat="server"></asp:Literal>
                        <div class="shoppingCart">
                            <table id="cart" cellpadding="0" cellspacing="0">
                                <asp:Literal ID="ltrCableCustomizations" runat="server"></asp:Literal>
                            </table>
                        </div>
                        <!-- end cable -->
                        <!-- begin internet -->
                        <asp:Literal ID="ltrInternet" runat="server"></asp:Literal>
                        <div class="shoppingCart">
                            <table id="cart" cellpadding="0" cellspacing="0">
                                <asp:Literal ID="ltrInternetCustomizations" runat="server"></asp:Literal>
                            </table>
                        </div>
                        <!-- end internet -->
                        <!-- begin telephone -->
                        <asp:Literal ID="ltrTelephone" runat="server"></asp:Literal>
                         <div class="shoppingCart">
                            <table id="cart" cellpadding="0" cellspacing="0">
                                <asp:Literal ID="ltrTelephoneCustomizations" runat="server"></asp:Literal>
                            </table>
                        </div>
                        <!-- end telephone -->
                        <!-- begin monthly total and one-time charges -->
                        <div class="shoppingCart">
                            <table id="cart" cellpadding="0" cellspacing="0">
                               <!-- begin monthly total -->
                               <tr class="total">
                                    <td class="item">
                                        Total Per Month
                                    </td>
                                    <td class="price">
                                        <asp:Label ID="lblMonthlyCharge" runat="server" />&nbsp;&nbsp;&nbsp;
                                    </td>
                                </tr>
                                <!-- end monthly total -->
                                <!-- begin one-time charges -->
                                <asp:Literal ID="ltrOneTimeCharges" runat="server"></asp:Literal>
                                <!-- end one-time charges --></table>
                        </div>
                        <!-- end monthly total and one-time charges -->
                        <!-- begin first month -->
                        <div class="solidRoundedGray">
                            <div class="solidRoundedTop">
                        		<div></div>
                            </div>
                            <div id="solidRoundedContent">
                                <table id="cartTotal" cellpadding="0" cellspacing="0">
                                    <tr class="subHead">
                                        <td colspan="2">
                                            Total for the First Month:
                                            <p>
                                                (including installation fees)
                                            </p>
                                        </td>
                                    </tr>
                                    <tr class="total">
                                        <td class="item">
                                            Total
                                        </td>
                                        <td class="price">
                                            <asp:Label ID="lblTotalCharge" runat="server" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div class="solidRoundedBot">
                        		<div></div>
                            </div>
                        </div>
                        <!-- end first month -->
                        <div><br /></div>
                        <asp:Panel ID="pnlCheckoutButton" runat="server" Visible="true">
                            <table style="width: 100%;">
                                <tr>
                                    <td style="text-align: center">
                                        <asp:Button ID="btnCheckout" runat="server" Text="Checkout" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <asp:Panel ID="pnlHSDTerms" runat="server" Visible="false">
                            <table style="width:100%;" >
                                <tr>
                                    <td>
										<asp:CustomValidator ID="vldHSDTermsRequired" runat="server"  Text="<img src='../Images/error-icon_small.gif'>"  ErrorMessage="" ValidationGroup="SubmitOrderGroup" Enabled="False" Display="Dynamic" OnServerValidate="ValidateHSDTerms" ></asp:CustomValidator>
                                        <asp:CheckBox ID="chkHSDTerms" runat="server" /><br />
                                        
                                   </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </asp:Panel>
                </div>
            </div>
        </div>
    </div>
</div>
  
