<!--#INCLUDE VIRTUAL="/onlinestore/_includes/functions.asp" -->
<%
Dim blnIsRemote
Dim strPostalCode
Dim curShippingCost
Dim strProvince
Dim intCouponBalance

META_DESCRIPTION=""
META_KEYWORDS=""
META_TITLE = ""
PAGE_TITLE = "Confirmation"

blnShowBreadCrumbs = True
strBreadCrumbs = "<span class=""txtPageHeader""><a href=""/onlinestore/mycart/"" class=""lnkPageHeader"">Shopping Cart</a>&nbsp;&bull;&nbsp;<a href=""/onlinestore/mycart/checkout.asp"" class=""lnkPageHeader"">Billing Info</a>&nbsp;&bull;&nbsp;<a href=""/onlinestore/mycart/shippinginfo.asp"" class=""lnkPageHeader"">Shipping Info</a>&nbsp;&bull;&nbsp;" & PAGE_TITLE & "</span>"

If Request.Form("comesfrom") = "confirmation" Then 
	'====================
	'
	'	Set up the msg
	'
	'====================
	strHTML = "<html>" & _
	"<head>" & _
	"	<style type=""text/css"">" & _
	"	SPAN.txtNormal{font-family:Arial,sans-serif;font-size:12px;color:#000000;margin-bottom:10px;}" & _
	"	SPAN.txtNormalWhite{font-family:Arial,sans-serif;font-size:12px;color:#FFFFFF;margin-bottom:10px;}" & _
	"	.lnkNormal:link, .lnkNormal:visited, { font-family:Arial,sans-serif; font-size:12px; color:#000000; text-decoration:underline;}" & _
	"	.lnkNormal:hover {font-family:Arial,sans-serif; font-size:12px; color:#000000; text-decoration:none;}" & _
	"</style>" & _
	"</head>" & _
	"<body>" & _
	"<table width=""619"" cellpadding=""0"" cellspacing=""0"" border=""0"">" & _
	"	<tr>" & _
	"		<td width=""619"" height=""5"" colspan=""10""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
	"	</tr>" & _
	"<tr>" & _
	"	<td width=""429"" height=""20"" align=""left"" bgcolor=""#126F90""><span class=""txtNormalWhite"">&nbsp;<b>Product</b></span></td>" & _
	"	<td width=""5"" height=""20""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
	"	<td width=""60"" height=""20"" align=""center"" bgcolor=""#126F90""><span class=""txtNormalWhite""><b>Price</b></span></td>" & _
	"	<td width=""5"" height=""20""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
	"	<td width=""50"" height=""20"" align=""center"" bgcolor=""#126F90""><span class=""txtNormalWhite""><b>Qty</b></span></td>" & _
	"	<td width=""5"" height=""20""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
	"	<td width=""60"" height=""20"" align=""right"" bgcolor=""#126F90""><span class=""txtNormalWhite""><b>Subtotal</b>&nbsp;</span></td>" & _
	"</tr>" & _
	"<tr><td width=""619"" height=""5"" colspan=""10""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td></tr>"
	
	total=0
	subtotal=0
	price_field=cProductPrice
	
	For x=0 To NUM_OF_ITEMS
		subtotal = formatCurrency(MY_CART(price_field,x)*MY_CART(cProductQuantity,x),2)
		total = total + subtotal
	
		strProductName = ""
		strProductName = MY_CART(cProductName,x)
		'If MY_CART(cProductFormat,x) <> "" Then strProductName = strProductName & "&nbsp;(" & MY_CART(cProductFormat,x) & ")"
		'If MY_CART(cProductLanguage,x) <> "" Then strProductName = strProductName & "&nbsp;-&nbsp;" & MY_CART(cProductLanguage,x)
		'If MY_CART(cProductSize,x) <> "" Then strProductName = strProductName & "&nbsp;-&nbsp;" & MY_CART(cProductSize,x)	
	
		strHTML = strHTML &  "" & _
		"<tr>" & _
		"	<td width=""429"" height=""15"" align=""left""><span class=""txtNormal"">&nbsp;" & strProductName & "</span></td>" & _
		"	<td width=""5"" height=""15""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
		"	<td width=""60"" height=""15"" align=""right""><span class=""txtNormal"">" & formatCurrency(MY_CART(price_field,x)) & "&nbsp;</span></td>" & _
		"	<td width=""5"" height=""15""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
		"	<td width=""50"" height=""15"" align=""center""><span class=""txtNormal"">" &  MY_CART(cProductQuantity,x) & "</span></td>" & _
		"	<td width=""5"" height=""15""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
		"	<td width=""60"" height=""15"" align=""right""><span class=""txtNormal"">" & subtotal & "&nbsp;</span></td>" & _
		"</tr>"
	Next
	
	strHTML = strHTML &  "" & _
	"<tr><td width=""619"" height=""5"" colspan=""10""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td></tr>" & _
	"<tr>" & _
	"	<td width=""619"" height=""15"" colspan=""10"" align=""right""><span class=""txtNormal""><b>Sub Total: </b>" & formatCurrency(total,2) & "&nbsp;</span></td>" & _
	"</tr>" & _
	"<tr>" & _
	"	<td width=""619"" height=""15"" colspan=""10"" align=""right""><span class=""txtNormal""><b>Shipping cost to be calculated upon confirmation of your order.</b>&nbsp;</span></td>" & _
	"</tr>" & _
	"<tr>" & _
	"	<td width=""619"" height=""15"" colspan=""10"" align=""right""><span class=""txtNormal""><b>GST: </b>" & formatCurrency(Request.Form("ordTax1Price"),2) & "&nbsp;</span></td>" & _
	"</tr>" & _
	"<tr>" & _
	"	<td width=""619"" height=""15"" colspan=""10"" align=""right""><span class=""txtNormal""><b>PST: </b>" & formatCurrency(Request.Form("ordTax2Price"),2) & "&nbsp;</span></td>" & _
	"</tr>" & _
	"<tr>" & _
	"	<td width=""619"" height=""15"" colspan=""10"" align=""right""><span class=""txtNormal""><b>Total: </b>" & formatCurrency(Request.Form("trnAmount"),2) & "&nbsp;</span></td>" & _
	"</tr>" & _
	"<tr><td width=""619"" height=""5"" colspan=""10""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td></tr>" & _
	"</table>" & _
	"<table width=""619"" cellpadding=""0"" cellspacing=""0"" border=""0"">" & _
	"	<tr>" & _
	"		<td width=""307"" height=""20"" valign=""middle"" align=""left"" bgcolor=""#126F90""><span class=""txtNormalWhite"">&nbsp;<strong>Billing Info</strong></span></td>" & _
	"		<td width=""5""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
	"		<td width=""307"" height=""20"" valign=""middle"" align=""left"" bgcolor=""#126F90""><span class=""txtNormalWhite"">&nbsp;<strong>Shipping Info</strong></span></td>" & _
	"	</tr>" & _
	"	<tr>" & _
	"		<td width=""619"" colspan=""3"" height=""5""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
	"	</tr>" & _
	"	<tr>" & _
	"		<td width=""307"" valign=""top"" align=""left"">" & _
	"			<span class=""txtNormal""><strong>&nbsp;First Name</strong><br>&nbsp;" & Request.Form("billing_first_name") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;Last Name</strong><br>&nbsp;" & Request.Form("billing_last_name") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;Company Name</strong><br>&nbsp;" & Request.Form("billing_company") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;Address</strong><br>&nbsp;" & Request.Form("billing_street") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;City</strong><br>&nbsp;" & Request.Form("billing_city") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;Province/State</strong><br>&nbsp;" & Request.Form("billing_province") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;Country</strong><br>&nbsp;" & Request.Form("billing_country") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;Postal Code</strong><br>&nbsp;" & Request.Form("billing_postal_code") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;Phone</strong><br>&nbsp;" & Request.Form("billing_phone") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;Email</strong><br>&nbsp;" & Request.Form("email") & "<br /></span>" & _
	"		</td>" & _
	"		<td width=""5""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
	"		<td width=""307"" valign=""top"" align=""left"">" & _
	"			<span class=""txtNormal""><strong>&nbsp;First Name</strong><br>&nbsp;" & Request.Form("shipping_first_name") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;Last Name</strong><br>&nbsp;" & Request.Form("shipping_last_name") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;Company Name</strong><br>&nbsp;" & Request.Form("shipping_company") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;Address</strong><br>&nbsp;" & Request.Form("shipping_street") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;City</strong><br>&nbsp;" & Request.Form("shipping_city") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;Province/State</strong><br>&nbsp;" & Request.Form("shipping_province") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;Country</strong><br>&nbsp;" & Request.Form("shipping_country") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;Postal Code</strong><br>&nbsp;" & Request.Form("shipping_postal_code") & "<br /></span>" & _
	"			<span class=""txtNormal""><strong>&nbsp;Phone</strong><br>&nbsp;" & Request.Form("shipping_phone") & "<br /></span>" & _
	"		</td>" & _
	"	</tr>" & _
	"	<tr>" & _
	"		<td width=""619"" colspan=""3"" height=""15""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
	"	</tr>" & _
	"	<tr>" & _
	"		<td width=""619"" colspan=""3"" height=""20"" bgcolor=""#126F90""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
	"	</tr>" & _
	"	<tr>" & _
	"		<td width=""619"" colspan=""3"" height=""15""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
	"	</tr>" & _
	"</table></body></html>"
	
	'====================
	'
	'	Send Sound Venture an Email
	'
	'====================

	Set myMail = CreateObject("CDONTS.NewMail")

	myMail.From = Request.Form("email") & "(" & Request.Form("billing_first_name") & " " & Request.Form("billing_last_name") & ")"
	myMail.To = SITE_EMAIL
  myMail.CC = SITE_CC_EMAIL & ";" & SITE_CC2_EMAIL

	myMail.Subject = "Order From Online Store" 
	myMail.BodyFormat = 0
	myMail.MailFormat = 0
	myMail.Body =  strHTML

	myMail.Send
	Set myMail = Nothing
	
	'====================
	'
	'	Send Customer an Email
	'
	'====================

	Set myMail = CreateObject("CDONTS.NewMail")
  	myMail.From = SITE_EMAIL & " (Sound Venture Online Store)"
  	myMail.To = Request.Form("email") & "(" & Request.Form("billing_first_name") & " " & Request.Form("billing_last_name") & ")"
  
  	myMail.Subject = "Order Receipt"
  	myMail.BodyFormat = 0
  	myMail.MailFormat = 0
  	myMail.Body =  strHTML & "<p style=""font-family:Arial,sans-serif;font-size:12px;color:#000000;margin:10px 6px;"">A Sound Venture sales representative will contact you to confirm your order, shipping costs and payment.</p><p style=""font-family:Arial,sans-serif;font-size:12px;color:#000000;margin:10px 6px;"">Thank you for shopping at " & SITE_NAME & ".</p>"
   
  	myMail.Send
	Set myMail = Nothing
	
	Response.Redirect "thankyou.asp"
End If

%>
<!-- #INCLUDE VIRTUAL="/onlinestore/_includes/main_page_top.asp" -->
<%
If NUM_OF_ITEMS=-1 Then
	Response.Write "<center><span class=""txtNormal"">Your shopping cart is currently empty.</strong></span></center>"
Else
	'====================
	' Get the UPS shipping cost
	'====================
	curShippingCost = 0 
	'curShippingCost = GetUPSCost()

	'strProvince = Request.Form("shipping_province")
	'strPostalCode = UCase(Request.Form("shipping_postal_code"))
	'strPostalCode = Replace(strPostalCode, " ", "")

%>
<script type="text/javascript" language="javascript">
function disableProceedButton(){
	//document.frmCart.frmAction.disabled=true;
	document.frmCart.submit();
	return true;
}
</script>
<p class="txtNormal">Please review all the info to make sure everything is correct before proceeding to the secure payment.</p>
<div style="display: inline;"><form style="display: inline; margin: 0;" name="frmCart" action="confirm.asp" method="POST" onSubmit="return disableProceedButton();">
<input type="hidden" name="comesfrom" value="confirmation">
<center>
<table width="619" cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td width="619" height="5" colspan="7"><img src="/onlinestore/images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
	</tr>
<%
Response.Write "" & _
"<tr>" & _
"	<td width=""429"" height=""20"" align=""left"" bgcolor=""#126F90""><span class=""txtNormalWhite"">&nbsp;<b>Product</b></span></td>" & _
"	<td width=""5"" height=""20""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
"	<td width=""60"" height=""20"" align=""center"" bgcolor=""#126F90""><span class=""txtNormalWhite""><b>Price</b></span></td>" & _
"	<td width=""5"" height=""20""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
"	<td width=""50"" height=""20"" align=""center"" bgcolor=""#126F90""><span class=""txtNormalWhite""><b>Qty</b></span></td>" & _
"	<td width=""5"" height=""20""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
"	<td width=""60"" height=""20"" align=""right"" bgcolor=""#126F90""><span class=""txtNormalWhite""><b>Subtotal</b>&nbsp;</span></td>" & _
"</tr>" & _
"<tr><td width=""619"" height=""5"" colspan=""10""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td></tr>"

total=0
subtotal=0

'======================
'	Add a new order to the database
'======================
Set DB = New clsDatabase
	DB.OpenDatabase DATABASE_NAME , DATABASE_USERNAME , DATABASE_PASSWORD
	DB.OpenRecord "tsv_orders", 0
		DB.SetField "status", "In Process"
		DB.SetField "date_ordered", Now()
		DB.SetField "email", Request.Form("email")

		DB.SetField "billing_first_name", Request.Form("billing_first_name")
		DB.SetField "billing_last_name", Request.Form("billing_last_name")
		DB.SetField "billing_phone", Request.Form("billing_phone")
		DB.SetField "billing_fax", Request.Form("billing_fax")
		DB.SetField "billing_company", Request.Form("billing_company") & " "
		DB.SetField "billing_street", Request.Form("billing_street")
		DB.SetField "billing_city", Request.Form("billing_city")
		DB.SetField "billing_province", Request.Form("billing_province")
		DB.SetField "billing_country", Request.Form("billing_country")
		DB.SetField "billing_postal_code", Request.Form("billing_postal_code")

		DB.SetField "shipping_first_name", Request.Form("shipping_first_name")
		DB.SetField "shipping_last_name", Request.Form("shipping_last_name")
		DB.SetField "shipping_phone", Request.Form("shipping_phone")
		DB.SetField "shipping_fax", Request.Form("shipping_fax")
		DB.SetField "shipping_company", Request.Form("shipping_company") & " "
		DB.SetField "shipping_street", Request.Form("shipping_street")
		DB.SetField "shipping_city", Request.Form("shipping_city")
		DB.SetField "shipping_province", Request.Form("shipping_province")
		DB.SetField "shipping_country", Request.Form("shipping_country")
		DB.SetField "shipping_postal_code", Request.Form("shipping_postal_code")

	DB.CloseRecord()
	ID = DB.GetLastID()

	For x=0 To NUM_OF_ITEMS
	
		price_field = cProductPrice
	
		subtotal = FormatCurrency(MY_CART(price_field,x)*MY_CART(cProductQuantity,x),2)
	
		total = total + subtotal
	
		'====================
		'	Format the name
		'====================
		strProductName = ""
		strProductName = MY_CART(cProductName,x)
		'If MY_CART(cProductFormat,x) <> "" Then strProductName = strProductName & "&nbsp;(" & MY_CART(cProductFormat,x) & ")"
		'If MY_CART(cProductLanguage,x) <> "" Then strProductName = strProductName & "&nbsp;-&nbsp;" & MY_CART(cProductLanguage,x)
		'If MY_CART(cProductSize,x) <> "" Then strProductName = strProductName & "&nbsp;-&nbsp;" & MY_CART(cProductSize,x)
	
		Response.Write "" & _
		"<tr>" & _
		"	<td width=""429"" height=""15"" align=""left""><span class=""txtNormal"">&nbsp;<strong>" & strProductName & "</strong></span></td>" & _
		"	<td width=""5"" height=""15""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
		"	<td width=""60"" height=""15"" align=""right""><span class=""txtNormal"">" & formatCurrency(MY_CART(price_field,x)) & "&nbsp;</span></td>" & _
		"	<td width=""5"" height=""15""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
		"	<td width=""50"" height=""15"" align=""center""><span class=""txtNormal"">" &  MY_CART(cProductQuantity,x) & "</span></td>" & _
		"	<td width=""5"" height=""15""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td>" & _
		"	<td width=""60"" height=""15"" align=""right""><span class=""txtNormal"">" & subtotal & "&nbsp;</span></td>" & _
		"</tr>"
		
		DB.OpenRecord "tsv_orders_items", 0
			DB.SetField "product_id", MY_CART(cProductId,x)
			DB.SetField "order_id", ID
			DB.SetField "quantity", MY_CART(cProductQuantity,x)
			DB.SetField "price", MY_CART(price_field,x)
		DB.CloseRecord()
	Next
	
	gst = 0
	pst = 0
	Select Case strProvince
		Case "NU","YT","NT","AB":
			gst=(total+curShippingCost) * cGSTAmount
		Case "NB","NL","NS":
			gst=(total+curShippingCost) * cGSTAmount
		Case "PE":
			gst=(total+curShippingCost) * cGSTAmount
		Case "QC":
			gst=(total+curShippingCost) * cGSTAmount
		Case "SK":
			gst=(total+curShippingCost) * cGSTAmount
		Case "ON":
			gst=(total+curShippingCost) * cGSTAmount
			pst=(total+curShippingCost) * cPSTAmount
		Case "BC","MB":
			gst=(total+curShippingCost) * cGSTAmount
	End Select
	
	curTotal1 = curShippingCost + total + gst + pst
	
	Response.Write "" & _
		"<tr><td width=""619"" height=""5"" colspan=""10""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td></tr>" & _
		"<tr>" & _
		"	<td width=""619"" height=""15"" colspan=""10"" align=""right""><span class=""txtNormal""><b>Sub Total: </b>" & formatCurrency(total,2) & "&nbsp;</span></td>" & _
		"</tr>" & _
		"<tr>" & _
		"	<td width=""619"" height=""15"" colspan=""10"" align=""right""><span class=""txtNormal""><b>Shipping cost to be calculated upon confirmation of your order.</b>&nbsp;</span></td>" & _
		"</tr>" & _
		"<tr>" & _
		"	<td width=""619"" height=""15"" colspan=""10"" align=""right""><span class=""txtNormal""><b>GST: </b>" & formatCurrency(gst,2) & "&nbsp;</span></td>" & _
		"</tr>" & _
		"<tr>" & _
		"	<td width=""619"" height=""15"" colspan=""10"" align=""right""><span class=""txtNormal""><b>PST: </b>" & formatCurrency(pst,2) & "&nbsp;</span></td>" & _
		"</tr>" & _
		"<tr>" & _
		"	<td width=""619"" height=""15"" colspan=""10"" align=""right""><span class=""txtNormal""><b>Total: </b>" & formatCurrency(curTotal1,2) & "&nbsp;</span></td>" & _
		"</tr>" & _
		"<tr><td width=""619"" height=""5"" colspan=""10""><img src=""/onlinestore/images/spacer.gif"" width=""1"" height=""1"" border=""0"" alt="""" /></td></tr>" & _
		"</table>"
		
	'====================
	'	Update the order amounts
	'====================

	DB.OpenRecord "tsv_orders" , ID

	DB.SetField "total", formatCurrency(curTotal1,2)
	DB.SetField "ship_cost", formatCurrency(curShippingCost,2)
	DB.SetField "gst", formatCurrency(gst,2)
	DB.SetField "pst", formatCurrency(pst,2)

	DB.CloseRecord()

Set DB = Nothing		
%>
<table width="619" cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td width="307" height="20" valign="middle" align="left" bgcolor="#126F90"><span class="txtNormalWhite">&nbsp;<strong>Billing Info</strong></span></td>
		<td width="5"><img src="/onlinestore/images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
		<td width="307" height="20" valign="middle" align="left" bgcolor="#126F90"><span class="txtNormalWhite">&nbsp;<strong>Shipping Info</strong></span></td>
	</tr>
	<tr>
		<td width="619" colspan="5" height="5"><img src="/onlinestore/images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
	</tr>
	<tr>
		<td width="307" valign="top" align="left">
				<span class="txtNormal"><strong>&nbsp;First Name</strong><br><input type="hidden" name="billing_first_name" value="<%=Server.HTMLEncode("" & Request.Form("billing_first_name")) & """>&nbsp;" & Request.Form("billing_first_name") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;Last Name</strong><br><input type="hidden" name="billing_last_name" value="<%=Server.HTMLEncode("" & Request.Form("billing_last_name")) & """>&nbsp;" & Request.Form("billing_last_name") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;Company Name</strong><br><input type="hidden" name="billing_company" value="<%=Server.HTMLEncode("" & Request.Form("billing_company")) & """>&nbsp;" & Request.Form("billing_company") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;Address</strong><br><input type="hidden" name="billing_street" value="<%=Server.HTMLEncode("" & Request.Form("billing_street")) & """>&nbsp;" & Request.Form("billing_street") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;City</strong><br><input type="hidden" name="billing_city" value="<%=Server.HTMLEncode("" & Request.Form("billing_city")) & """>&nbsp;" & Request.Form("billing_city") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;Province/State</strong><br><input type="hidden" name="billing_province" value="<%=Server.HTMLEncode("" & Request.Form("billing_province")) & """>&nbsp;" & Request.Form("billing_province") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;Country</strong><br><input type="hidden" name="billing_country" value="<%=Server.HTMLEncode("" & Request.Form("billing_country")) & """>&nbsp;" & Request.Form("billing_country") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;Postal Code</strong><br><input type="hidden" name="billing_postal_code" value="<%=Server.HTMLEncode("" & Request.Form("billing_postal_code")) & """>&nbsp;" & Request.Form("billing_postal_code") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;Phone</strong><br><input type="hidden" name="billing_phone" value="<%=Server.HTMLEncode("" & Request.Form("billing_phone")) & """>&nbsp;" & Request.Form("billing_phone") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;Email</strong><br><input type="hidden" name="email" value="<%=Server.HTMLEncode("" & Request.Form("email")) & """>&nbsp;" & Request.Form("email") & "<br />"%></span>
		</td>
		<td width="5"><img src="/onlinestore/images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
		<td width="307" valign="top" align="left">
				<span class="txtNormal"><strong>&nbsp;First Name</strong><br><input type="hidden" name="shipping_first_name" value="<%=Server.HTMLEncode("" & Request.Form("shipping_first_name")) & """>&nbsp;" & Request.Form("shipping_first_name") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;Last Name</strong><br><input type="hidden" name="shipping_last_name" value="<%=Server.HTMLEncode("" & Request.Form("shipping_last_name")) & """>&nbsp;" & Request.Form("shipping_last_name") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;Company Name</strong><br><input type="hidden" name="shipping_company" value="<%=Server.HTMLEncode("" & Request.Form("shipping_company")) & """>&nbsp;" & Request.Form("shipping_company") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;Address</strong><br><input type="hidden" name="shipping_street" value="<%=Server.HTMLEncode("" & Request.Form("shipping_street")) & """>&nbsp;" & Request.Form("shipping_street") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;City</strong><br><input type="hidden" name="shipping_city" value="<%=Server.HTMLEncode("" & Request.Form("shipping_city")) & """>&nbsp;" & Request.Form("shipping_city") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;Province/State</strong><br><input type="hidden" name="shipping_province" value="<%=Server.HTMLEncode("" & Request.Form("shipping_province")) & """>&nbsp;" & Request.Form("shipping_province") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;Country</strong><br><input type="hidden" name="shipping_country" value="<%=Server.HTMLEncode("" & Request.Form("shipping_country")) & """>&nbsp;" & Request.Form("shipping_country") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;Postal Code</strong><br><input type="hidden" name="shipping_postal_code" value="<%=Server.HTMLEncode("" & Request.Form("shipping_postal_code")) & """>&nbsp;" & Request.Form("shipping_postal_code") & "<br />"%></span>
				<span class="txtNormal"><strong>&nbsp;Phone</strong><br><input type="hidden" name="shipping_phone" value="<%=Server.HTMLEncode("" & Request.Form("shipping_phone")) & """>&nbsp;" & Request.Form("shipping_phone") & "<br />"%></span>
		</td>
	</tr>
	<tr>
		<td width="619" colspan="3" height="15"><img src="/onlinestore/images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
	</tr>
	<tr>
		<td width="619" colspan="3" height="20" bgcolor="#126F90"><img src="/onlinestore/images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
	</tr>
	<tr>
		<td width="619" colspan="3" height="15"><img src="/onlinestore/images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
	</tr>
</table>
<table width="350" cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td width="175" height="20" align="left"><input type="button" value="Back" onClick="history.go(-1);"></td>
		<td width="175" height="20" align="right"><input type="submit" name="frmAction" onClick="this.disabled=true;disableProceedButton();" value="Submit Order"></td>
	</tr>
	<tr>
		<td width="350" colspan="2" height="15"><img src="/onlinestore/images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
	</tr>
</table>
</center>
<%
	'Get the billing address
	strBillAddress1 = "": strBillAddress2 = "" 
	If Len(Trim("" & Server.HTMLEncode("" & Request.Form("billing_street")))) <= 32 Then 
		strBillAddress1 = Server.HTMLEncode("" & Request.Form("billing_street"))
	Else
		strBillAddress1 = Left(Server.HTMLEncode("" & Request.Form("billing_street")), 32) 
		strBillAddress2 = Mid(Server.HTMLEncode("" & Request.Form("billing_street")), 33, 32) 
	End If

	'Get the shipping address
	strShipAddress1 = "": strShipAddress2 = "" 
	If Len(Trim("" & Server.HTMLEncode("" & Request.Form("shipping_street")))) <= 32 Then 
		strShipAddress1 = Server.HTMLEncode("" & Request.Form("shipping_street"))
	Else
		strShipAddress1 = Left(Server.HTMLEncode("" & Request.Form("shipping_street")), 32) 
		strShipAddress2 = Mid(Server.HTMLEncode("" & Request.Form("shipping_street")), 33, 32) 
	End If	
%>
<input type="hidden" name="merchant_id" value="158600000">
<input type="hidden" name="trnOrderNumber" value="<%=ID%>">
<input type="hidden" name="trnType" value="P">
<input type="hidden" name="trnLanguage" value="ENG">
<input type="hidden" name="errorPage" value="<%=SITE_URL%>mycart/error.asp">
<input type="hidden" name="approvedPage" value="<%=SITE_URL%>mycart/thankyou.asp">
<input type="hidden" name="declinedPage" value="<%=SITE_URL%>mycart/declined.asp">
<input type="hidden" name="ordName" value="<%=Server.HTMLEncode("" & Request.Form("billing_first_name")) & " " & Server.HTMLEncode("" & Request.Form("billing_last_name"))%>">
<input type="hidden" name="ordEmailAddress" value="<%=Server.HTMLEncode("" & Request.Form("email"))%>">
<input type="hidden" name="ordPhoneNumber" value="<%=Server.HTMLEncode("" & Request.Form("billing_phone"))%>">
<input type="hidden" name="ordAddress1" value="<%=strBillAddress1%>">
<% If Trim("" & strBillAddress2) <> "" Then %>
	<input type="hidden" name="ordAddress2" value="<%=strBillAddress2%>">
<% End If %>
<input type="hidden" name="ordCity" value="<%=Server.HTMLEncode("" & Request.Form("billing_city"))%>">
<input type="hidden" name="ordProvince" value="<%=Server.HTMLEncode("" & Request.Form("billing_province"))%>">
<input type="hidden" name="ordPostalCode" value="<%=Server.HTMLEncode("" & Request.Form("billing_postal_code"))%>">
<input type="hidden" name="ordCountry" value="<%=Server.HTMLEncode("" & Request.Form("billing_country"))%>">
<!--<input type="hidden" name="ordPhoneNumber" value="<%=Server.HTMLEncode("" & Request.Form("billing_phone"))%>">-->
<input type="hidden" name="shipName" value="<%=Server.HTMLEncode("" & Request.Form("shipping_first_name")) & " " & Server.HTMLEncode("" & Request.Form("shipping_last_name"))%>">
<input type="hidden" name="shipEmailAddress" value="<%=Server.HTMLEncode("" & Request.Form("email"))%>">
<input type="hidden" name="shipPhoneNumber" value="<%=Server.HTMLEncode("" & Request.Form("shipping_phone"))%>">
<input type="hidden" name="shipAddress1" value="<%=strShipAddress1%>">
<% If Trim("" & strShipAddress2) <> "" Then %>
	<input type="hidden" name="shipAddress2" value="<%=strShipAddress2%>">
<% End If %>
<input type="hidden" name="shipCity" value="<%=Server.HTMLEncode("" & Request.Form("shipping_city"))%>">
<input type="hidden" name="shipProvince" value="<%=Server.HTMLEncode("" & Request.Form("shipping_province"))%>">
<input type="hidden" name="shipPostalCode" value="<%=Server.HTMLEncode("" & Request.Form("shipping_postal_code"))%>">
<input type="hidden" name="shipCountry" value="<%=Server.HTMLEncode("" & Request.Form("shipping_country"))%>">
<input type="hidden" name="shipMethod" value="UPS Delivery">
<input type="hidden" name="deliveryEstimate" value="1">
<%
	'Get all items in cart in the order process
	For x = 0 To NUM_OF_ITEMS
		strCartValues = strCartValues & "" _
			& "<input type=""hidden"" name=""prod_id_" & (x + 1) & """ value=""" & Server.HTMLEncode("" & MY_CART(cProductId, x)) & """>" _
			& "<input type=""hidden"" name=""prod_name_" & (x + 1) & """ value=""" & Server.HTMLEncode("" & MY_CART(cProductName, x)) & """>" _
			& "<input type=""hidden"" name=""prod_quantity_" & (x + 1) & """ value=""" & Server.HTMLEncode("" & MY_CART(cProductQuantity, x)) & """>" _
			& "<input type=""hidden"" name=""prod_cost_" & (x + 1) & """ value=""" & Server.HTMLEncode("" & MY_CART(cProductPrice, x)) & """>" 
	Next 
	
	Response.Write strCartValues
%>
<input type="hidden" name="ordItemPrice" value="<%=total%>">
<input type="hidden" name="ordShippingPrice" value="<%=curShippingCost%>">
<input type="hidden" name="ordTax1Price" value="<%=gst%>">
<input type="hidden" name="ordTax2Price" value="<%=pst%>">
<input type="hidden" name="trnAmount" value="<%=curTotal1%>">
</form></div>
<%End If%>
<!-- #INCLUDE VIRTUAL="/onlinestore/_includes/main_page_bottom.asp" -->