<!--#include virtual="/includes/resifunctions.asp" -->
<!--#include virtual="/includes/datefunctions.asp" -->

<%
Session("Transacted") = ""
Session("Entity_ID") = "7476"
	Set Conn = Server.CreateObject("ADODB.Connection")
	Conn.Open "DRIVER={SQL Server};SERVER=WEBSRV01;UID=web;pwd=w3bs1t3;DATABASE=AVANTE"

Dim sqlAddItin, sqlAddItem, sqlAddDetail, SQLItem, j
Set RSItem = server.CreateObject("ADODB.Recordset")
Set RSAddItin = server.CreateObject("ADODB.Recordset")
sqlAddItin = "New_Itinerary '', '27', '" & Session.SessionID & "', ''"

RSAddItin.Open sqlAddItin, Conn
Session("Itinerary_ID") = RSAddItin("Itinerary_ID")
RSAddItin.Close()
Set RSAddItin = Nothing

j = 0

 For Each Item in Request.Form
 	If Left(Item, 4) = "AID_" Then
 		If Not Trim(Request(Item)) = "" Then
 		sqlAddDetail = "[Avante].[dbo].[ItineraryAddDetail] '" & Session("Itinerary_ID") & "', '" & j & "', '" & Session("ArrivalDate") & "', '"
 		sqlAddDetail = sqlAddDetail & Session("Stay") & "', '" & Session("AdultCount") & "', '" & Session("Guest_Count") & "', '', '', '', ''"
 		Conn.Execute(sqlAddDetail)
 		For i = 0 to Session("Stay") - 1
 		SQLItem = "[Avante].[dbo].[Get_Inventory_Details_SNGL] '" & Mid(Item, 5) & "', '" & Session("Entity_ID") & "', '" & DateAdd("d", Session("ArrivalDate"), i) & "'"
             RSItem.Open SQLItem, Conn          
             If Not RSItem.EOF Then 
 				sqlAddItem = "[Avante].[dbo].[ItineraryAddItem] '" & Session("Itinerary_ID") & "', '" & RSItem("Inventory_List_ID") & "', "
 				sqlAddItem = sqlAddItem & "'" & Request(Item) & "', '" & RSItem("Cost_Web_SNGL") & "', '1', '', '', '', '', '', '" & j & "'"
 				Conn.Execute(sqlAddItem)
             End If          
 			RSItem.Close()
 		Next
 		j = j + 1
 		End If
 	End If
 	
 Next 
 
 Dim sqlStates, sqlCountries, sqlTicket, Pickup_Date
 set rsStates = Server.CreateObject("ADODB.Recordset")
 set rsCountries = server.CreateObject("ADODB.Recordset")
 sqlStates = "Select * From States"
 sqlCountries = "Select * From Countries"
 rsStates.Open sqlStates, Conn
 rsCountries.Open sqlCountries, Conn
 
 %>
<html>
	
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <SCRIPT LANGUAGE="javascript" SRC="/includes/formchek.js"></SCRIPT>
<script language="javascript" src="/js/menu-script.js"></script>
 <script language="JavaScript">
<!--
 function formcheck(){
 var errmsg;
 errmsg='';
 
 if (form1.x_card_num.value=='') errmsg=errmsg+'Must Enter Credit Card Number.\n';
 if (form1.x_exp_date.value=='') errmsg=errmsg+'Must Enter Credit Card Expiration Date.\n';

 if (form1.x_first_name.value=='') errmsg=errmsg+'Must Enter First Name.\n';
 if (form1.x_last_name.value=='') errmsg=errmsg+'Must Enter Last Name.\n';
 if (form1.x_address.value=='') errmsg=errmsg+'Must Enter Address.\n';
 if (form1.x_city.value=='') errmsg=errmsg+'Must Enter City.\n';
 //if (!isStateCode(form1.x_state.value)) errmsg=errmsg+'Must Enter State.\n';
 if (form1.x_state.value=='') errmsg=errmsg+'Must Enter State.\n';
 if (form1.x_zip.value=='') errmsg=errmsg+'Must Enter Zip Code.\n';
 if (form1.Country2.value=='') errmsg=errmsg+'Must Enter Country.\n';
 if (form1.PhHomeArea2.value=='') errmsg=errmsg+'Must Enter Area Code.\n';
 if (form1.PhHome2.value=='') errmsg=errmsg+'Must Enter Phone Number.\n';
 if (!isEmail(form1.x_email.value)) errmsg=errmsg+'Must Enter Valid E-Mail Address.\n';
 
 if (errmsg) {
 	alert(errmsg);
 	return false;
 } else {
 	form1.submit();
  }
 }
 
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
		</script>
<link rel="stylesheet" href="/Style-sheets/tropical-1.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/tropical-1.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/headline.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/atrraction-set.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/arrivares.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/arrivares.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/atrraction-set.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/headline-large.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/atrraction-set.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/headline.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/arrivares.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/standard-input-form.css" type="text/css">
</head>
<body bgcolor="#000000" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('images/menu/resort-amentites-dim.gif','images/menu/cottages-dim.gif','images/menu/attractions-dim.gif','images/menu/events-dim.gif','images/menu/contact-us-dim.gif','images/menu/reservations-dim.gif','images/menu/home-dim.gif','/images/menu/resort-amentites-dim.gif','/images/menu/cottages-dim.gif','/images/menu/attractions-dim.gif','/images/menu/events-dim.gif','/images/menu/contact-us-dim.gif','/images/menu/reservations-dim.gif','/images/menu/home-dim.gif','/images/booking-button-dim.gif')">
<table width="650" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#7BB8B9" class="transTable" height="70%">
  <tr> 
    <td colspan="2"><img src="/images/header-composite.jpg" width="650" height="76"></td>
  </tr>
  <tr> 
    <td width="120" valign="top"> 
      <table height="100%" width="120" border="0" cellspacing="0" cellpadding="0" >
        <tr> 
          <td background="/images/menu-121.gif" valign="top" width="120"> 
            <!--#include virtual="/includes/menu.asp" -->
          </td>
        </tr>
        <tr> 
          <td background="/images/menu/menu-121-palm.gif" height="120" width="120">&nbsp; 
          </td>
        </tr>
      </table>
    </td>
    <td width="545" align="center" valign="top"> 
      <table width="475" border="0" cellspacing="0" cellpadding="0" bgcolor="#DCECED">
        <tr> 
          <td width="351" align="left" valign="top" class="tableSpace"><img src="/images/conerUL.gif" width="14" height="15"></td>
          <td width="113" class="tableSpace">&nbsp;</td>
          <td width="15" valign="top" align="right" class="tableSpace"><img src="/images/conerUR.gif" width="15" height="14"></td>
        </tr>
        <tr align="center" valign="top"> 
          <td colspan="3"> 
            <table width="425" border="0" cellspacing="0" cellpadding="0" class="transTableTop">
              <tr align="center"> 
                <td colspan="3" class="Event-bar" height="17">Itinerary Summary</td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td colspan="3" class="statement-subhds">&nbsp;Itinerary #:&nbsp;&nbsp;<%=Session("Itinerary_ID")%></td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td colspan="2" class="Event-bar">&nbsp;Lodging Reservation:</td>
                <td width="94" class="Event-bar">&nbsp;</td>
              </tr>
              <%
                     			Dim SQLEntity, Entity_Name, Itinerary_ID

								Set RSEntity = Server.CreateObject("ADODB.Recordset")
								SQLEntity = "Select E.Name, ED.Address_1, ED.City, ED.State, ED.Zip From Entity E Inner Join Entity_Detail ED on E.Entity_ID = ED.Entity_ID "
								SQLEntity = SQLEntity & "Where E.Entity_ID = '7413'"
								RSEntity.Open SQLEntity, Conn	
								Entity_Name = RSEntity("Name") & "<br>" & RSEntity("Address_1") & "<br>" & RSEntity("City") & " " & RSEntity("State") & " " & RSEntity("Zip")
								RSEntity.Close()
								Set RSEntity = Nothing	
								Itinerary_ID = Session("Itinerary_ID")			
 							Dim FirstDate, LastDate
 							FirstDate = CDate(Session("ArrivalDate"))
 							LastDate = CDate(DateAdd("d", Session("Stay"), Session("ArrivalDate")))
                                
                                 %>
              <tr> 
                <td class="statement-detail" colspan=3 bgcolor="#FFFFFF"><strong><u>&nbsp;<%=Entity_Name%></u></strong></td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td colspan="2" class="statement-detail">&nbsp;<%=WeekDayName(WeekDay(FirstDate), True, 1) & " " & FormatDateTime(FirstDate, 2)%> 
                  - <%=WeekDayName(WeekDay(LastDate), True, 1) & " " & FormatDateTime(LastDate, 2)%></td>
                <td width="94" class="statement-detail"></td>
              </tr>
              <%
 								For q = 0 to (GetTransCount(Itinerary_ID))%>
              <tr bgcolor="#FFFFFF"> 
                <td colspan="2" class="statement-detail"><%=RoomType(Itinerary_ID, q, 7476)%></td>
                <td width="94" class="statement-detail"><%=FormatCurrency(GetCostByTrans(Itinerary_ID, q))%></td>
              </tr>
              <%Next%>
              <tr bgcolor="#FFFFFF"> 
                <td colspan="2" class="statement-detail" height="9">&nbsp;Sales 
                  &amp; Room Tax</td>
                <td width="94" class="statement-detail" height="9"><%=FormatCurrency(CCur(LodgingTax(Itinerary_ID)))%></td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td width="164">&nbsp;</td>
                <td width="211">&nbsp;</td>
                <td width="94">&nbsp;</td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td class="statement-subhds" width="164">&nbsp;</td>
                <td class="statement-subhds" width="211">Itinerary Total:</td>
                <td width="94" class="statement-subhds"><%=FormatCurrency(CCur(CartTotalwTax(Itinerary_ID)))%></td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td class="2p-rule" width="164" bgcolor="#CCCCCC">&nbsp;</td>
                <td class="2p-rule" width="211" bgcolor="#CCCCCC">&nbsp;</td>
                <td width="94" class="2p-rule" bgcolor="#CCCCCC">&nbsp;</td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td colspan="3" class="statement-subhds">To Confirm your Itinerary 
                  a Reservation Deposit of:<br>
                  $50.00 will be charged for Lodging Reservations<br>
                  $25.00 will be charged for Campsite Reservations<br>
                  The balance of your Itinerary will be due at checkin.</td>
              </tr>
            </table>
            <FORM action="verifytx.asp" method=POST id=form1 name=form1>
            <table width="427" cellpadding="0" cellspacing="0" align="center" bgcolor="#FFFFFF" class="transTable" border="0">
              <tr> 
                <td class="standard-input-sm-bold" colspan="3" align="center"></td>
              </tr>
              <tr> 
                <td class="Event-bar" colspan="3">&nbsp;Payment Information</td>
              </tr>
              <tr align="center"> 
                <td class="standard-input-sm-bold" colspan="3" height="44"><img src="/icons/cards_4c_small.jpg" width="236" height="43"></td>
              </tr>
              <tr align="center">
                <td class="standard-input-sm-bold" colspan="3" height="10"><font face="Verdana, Arial, Helvetica" size="2"><b><span class="standard-input-form"><font color=#ff0000 size="4">*</font><font face="Verdana, Arial, Helvetica" size="2"><b><font color=#ff0000 size="4"><span class="standard-input-sm-bold">Required 
                  Information </span></font></b></font></span></b></font></td>
              </tr>
              <tr> 
                <td class="standard-input-sm-bold" align="right" width="101">Card 
                  Number:&nbsp;</td>
                <td colspan="2" width="324"> 
                  <input maxlength=16 size=18 name=x_card_num>
                </td>
              </tr>
              <tr> 
                <td class="standard-input-sm-bold" align="right" width="101">Exp. 
                  Date:&nbsp;</td>
                <td colspan="2" width="324"> 
                  <input maxlength=4 size=7 name=x_exp_date>
                  <span class="sub-head-blue">&nbsp;</span><span class="standard-input-form">(mmyy)</span></td>
              </tr>
              <tr> 
                <td class="standard-input-sm-bold" align="right" width="101">First 
                  Name:&nbsp;</td>
                <td colspan="2" width="324"> 
                  <input name="x_first_name"  size="20" class="input-box-blue">
                  <font face="Verdana, Arial, Helvetica" size="2"><b><span class="standard-input-form"><font color=#ff0000 size="4">*</font></span><font color=#ff0000 size="4"><span class="standard-input-sm-bold">(name 
                  on credit card)</span></font></b></font></td>
              </tr>
              <tr> 
                <td class="standard-input-sm-bold" align="right" width="101">Last 
                  Name:&nbsp;</td>
                <td colspan="2" width="324"> 
                  <input name="x_last_name" style="font-family:  Helvetica, sans-serif; font-size: 12px; font-style: normal; line-height: 10px; font-weight: 500; color: #000099; text-decoration: none " size="30">
                  <font face="Verdana, Arial, Helvetica" size="2"><b><span class="standard-input-form"><font color=#ff0000 size="4">*</font></span></b></font></td>
              </tr>
              <tr> 
                <td class="standard-input-sm-bold" align="right" width="101">Company:&nbsp;</td>
                <td colspan="2" width="324"> 
                  <input  name=x_company style="font-family: Helvetica, sans-serif; font-size: 12px; font-style: normal; line-height: 10px; font-weight: 500; color: #000099; text-decoration: none " size="30">
                </td>
              </tr>
              <tr> 
                <td class="standard-input-sm-bold" align="right" width="101">Address:&nbsp;</td>
                <td colspan="2" width="324"> 
                  <input name="x_address"  style="font-family: Helvetica, sans-serif; font-size: 12px; font-style: normal; line-height:10px; font-weight: 500; color: #000099; text-decoration: none " size="30">
                  <font face="Verdana, Arial, Helvetica" size="2"><b><span class="standard-input-form"><font color=#ff0000 size="4">*</font></span></b></font></td>
              </tr>
              <tr> 
                <td class="standard-input-sm-bold" align="right" width="101">City:&nbsp;</td>
                <td colspan="2" width="324"> 
                  <input name="x_city" style="font-family: Helvetica, sans-serif; font-size: 12px; font-style: normal; line-height: 10px; font-weight: 500; color: #000099; text-decoration: none " size="30">
                  <font face="Verdana, Arial, Helvetica" size="2"><b><span class="standard-input-form"><font color=#ff0000 size="4">*</font></span></b></font></td>
              </tr>
              <tr> 
                <td class="standard-input-sm-bold" align="right" width="101">State/Province:&nbsp;</td>
                <td colspan="2" width="324"> <font face="Verdana, Arial, Helvetica" size="2"> 
                  <select id=x_state name=x_state style="font-family: Helvetica, sans-serif; font-size: 12px; font-style: normal; line-height: 10px; font-weight: 500; color: #000099; text-decoration: none ">
                    <%Do While Not rsStates.EOF%>
                    <option value="<%=rsStates("state_abbr")%>"><%=rsStates("state_abbr")%></option>
                    <%rsStates.MoveNext()
 							loop%>
                  </select>
                  <b><span class="standard-input-form"><font color=#ff0000 size="4">*</font></span></b></font></td>
              </tr>
              <tr> 
                <td class="standard-input-sm-bold" align="right" width="101">Zip 
                  Code:&nbsp;</td>
                <td colspan="2" width="324"><font face="Verdana, Arial, Helvetica" size="2"> 
                  <input name="x_zip" style="font-family:  Helvetica, sans-serif; font-size: 12px; font-style: normal; line-height: 10px; font-weight: 500; color: #000099; text-decoration: none " size="10">
                  <b><span class="standard-input-form"><font color=#ff0000 size="4">*</font></span></b></font> 
                </td>
              </tr>
              <tr> 
                <td class="standard-input-sm-bold" align="right" width="101">Country:&nbsp;</td>
                <td colspan="2" width="324"> <font face="Verdana, Arial, Helvetica" size="2"> 
                  <select id=Country2 name=Country2 style="font-family: Helvetica, sans-serif; font-size: 12px; font-style: normal; line-height: 10px; font-weight: 500; color: #000099; text-decoration: none ">
                    <%Do While Not rsCountries.EOF%>
                    <option value="<%=rsCountries("country_abbr")%>"><%=rsCountries("country_abbr")%></option>
                    <%rsCountries.MoveNext()
 							loop%>
                  </select>
                  <b><span class="standard-input-form"><font color=#ff0000 size="4">*</font></span></b></font></td>
              </tr>
              <tr> 
                <td class="standard-input-sm-bold" align="right" width="101">Phone:&nbsp;</td>
                <td colspan="2" width="324"> 
                  <input type="text" name="PhHomeArea2" style=";font-family: Helvetica, sans-serif; font-size: 12px; font-style: normal; line-height: 10px; font-weight: 500; color: #000099; text-decoration: none " size="4">
                  - 
                  <input type="text" name="PhHome2" style=";font-family: Helvetica, sans-serif; font-size: 12px; font-style: normal; line-height: 10px; font-weight: 500; color: #000099; text-decoration: none " size="10">
                  <font face="Verdana, Arial, Helvetica" size="2"><b><span class="standard-input-form"><font color=#ff0000 size="4">*</font></span></b></font></td>
              </tr>
              <tr> 
                <td class="standard-input-sm-bold" align="right" width="101">Fax:&nbsp;</td>
                <td colspan="2" width="324"> 
                  <input type="text" name="faxHomeArea22" size="4" class="standard-input-form-small">
                  - 
                  <input type="text" name="fax"  class="standard-input-sm-bold" align="right" size="10">
                </td>
              </tr>
              <tr> 
                <td class="standard-input-sm-bold" align="right" width="101">E-Mail:&nbsp;</td>
                <td colspan="2" width="324"> 
                  <input  name="x_email" style=";font-family: Helvetica, sans-serif; font-size: 12px; font-style: normal; line-height: 10px; font-weight: 500; color: #000099; text-decoration: none " size="30">
                  <font face="Verdana, Arial, Helvetica" size="2"><b><span class="standard-input-form"><font color=#ff0000 size="4">*</font></span></b></font><font face="Verdana, Arial, Helvetica" size="4" color="#ff0000"><b></b></font> 
                </td>
              </tr>
              <tr> 
                <td class="standard-input-sm-bold" align="right" width="101">Special 
                  Requests:&nbsp;</td>
                <td colspan="2" width="324"> 
                  <textarea name="Special_Request" cols="35" rows="2" class="input-box-blue"></textarea>
                </td>
              </tr>
              <tr> 
                <td colspan=3>&nbsp;</td>
              </tr>
            </table>
            <img src="/images/booking-button.gif" width="125" height="50" name="Image1" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','/images/booking-button-dim.gif',1)" onclick="formcheck();" style="{cursor:hand}"> 
          </td>
        </tr>
        <tr> 
          <td width="15" align="left" valign="bottom" class="tableSpace"><img src="/images/conerLL.gif" width="15" height="14"></td>
          <td width="300" class="tableSpace">&nbsp;</td>
          <td width="15" align="right" valign="bottom" class="tableSpace"><img src="/images/conerLR.gif" width="15" height="15"></td>
        </tr>
      </table>
      </FORM>
    </td>
  </tr>
  <tr> 
    <td colspan="2"> <img src="/images/footer-650.jpg" width="650" height="33"></td></tr></table>
<!--#include virtual="/includes/footer.asp" -->
</body>
</html>
