  
<%Set RSAmenity = Server.CreateObject("ADODB.Recordset")
	SQLAmenity = "Select AP.[Amenity_ID], AP.[Group_ID], II.[Item_ID], AP.[Name], AP.[Description], ATT.[Att_Desc] "
	SQLAmenity = SQLAmenity & "from Entity E "
	SQLAmenity = SQLAmenity & "Inner Join (Group_Entity_Map GEM "
	SQLAmenity = SQLAmenity & "Inner Join ([Group] G "
	SQLAmenity = SQLAmenity & "Inner Join (Attribute_Type ATT "
	SQLAmenity = SQLAmenity & "Inner Join (Inventory_Item II "
	SQLAmenity = SQLAmenity & "Inner Join Amenity_Package AP "
	SQLAmenity = SQLAmenity & "On II.Amenity_ID = AP.Amenity_ID) "
	SQLAmenity = SQLAmenity & "On ATT.Att_ID = II.Att_ID) "
	SQLAmenity = SQLAmenity & "On AP.Group_ID = G.Group_ID) " 
	SQLAmenity = SQLAmenity & "On GEM.Group_ID = G.Group_ID) " 
	SQLAmenity = SQLAmenity & "On E.Entity_ID = GEM.Entity_ID "
	SQLAmenity = SQLAmenity & "Where E.Entity_ID='" & Session("Entity_ID") & "' "
	SQLAmenity = SQLAmenity & "Order By ATT.Att_Desc_Detail"
	RSAmenity.Open SQLAmenity, Conn
	
	Dim tmpArray1
                    tmpArray1 = Session("Itinerary_Items")%>
               

<link rel="stylesheet" href="/Style-sheets/page-formatting.css" type="text/css">
<script language="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<body onLoad="MM_preloadImages('/images/planner/planner-temp-2_r2_c1.gif','/images/planner/planner-temp-2_r2_c2.gif','/images/planner/planner-temp-2_r2_c3.gif','/images/planner/planner-temp-2_r1_c1.gif')">
<table width="200" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
  <tr>
    <td>
      <table border="0" cellpadding="0" cellspacing="0" width="200">
        <!-- fwtable fwsrc="Untitled" fwbase="planner-temp.gif" -->
        <tr> 
        <tr valign="top"> 
          <!-- row 1 -->
          <td colspan="3"><img name="plannertemp_r1_c1" src="images/planner/planner-temp_r1_c1.gif" width="200" height="21" border="0" usemap="#m_planner-temp_r1_c1"></td>
          <td><img src="images/planner/shim.gif" width="1" height="21" border="0"></td>
        </tr>
        <tr valign="top"> 
          <!-- row 2 -->
          <td rowspan="2"><img name="account" src="images/planner/planner-temp_r2_c1.gif" width="65" height="24" border="0" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('account','','/images/planner/planner-temp-2_r2_c1.gif',1)"></td>
          <td><img name="reservation" src="images/planner/planner-temp_r2_c2.gif" width="73" height="23" border="0" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('reservation','','/images/planner/planner-temp-2_r2_c2.gif',1)"></td>
          <td><img name="saved" src="images/planner/planner-temp_r2_c3.gif" width="62" height="23" border="0" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('saved','','/images/planner/planner-temp-2_r2_c3.gif',1)"></td>
          <td><img src="images/planner/shim.gif" width="1" height="23" border="0"></td>
        </tr>
        <tr valign="top"> 
          <!-- row 3 -->
          <td rowspan="2" colspan="2"><img name="plannertemp_r3_c2" src="images/planner/planner-temp_r3_c2.gif" width="135" height="6" border="0"></td>
          <td><img src="images/planner/shim.gif" width="1" height="1" border="0"></td>
        </tr>
        <tr valign="top"> 
          <!-- row 4 -->
          <td><img name="plannertemp_r4_c1" src="images/planner/planner-temp_r4_c1.gif" width="65" height="5" border="0"></td>
          <td><img src="images/planner/shim.gif" width="1" height="5" border="0"></td>
        </tr>
        <map name="m_planner-temp_r1_c1"> 
          <area shape="poly" coords="184,12,185,8,189,7,192,8,193,12,192,15,189,16,185,15,184,12,184,12" href="#" onClick="MM_showHideLayers('destinations','','show','menu','','hide')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('plannertemp_r1_c1','','/images/planner/planner-temp-2_r1_c1.gif',1)" >
        </map>
      </table>
    </td>
  </tr>
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td colspan="2" class="planner-hotel-name" >
            <%If Not RS1.Eof Then%>
            <%=RS1("Name")%>
            <%End If%>
          </td>
        </tr>
        <tr> 
          <td class="headline-ffffff-small" width="85%" align="center" bgcolor="#000099">Lodging 
            Items</td>
          <td class="headline-ffffff-small" width="15%" align="center" bgcolor="#000099">Qty</td>
        </tr>
      </table>
      <%
                    Set RSItem = Server.CreateObject("ADODB.Recordset")
                    For i = LBound(tmpArray1, 2) to UBound(tmpArray1, 2)
									If tmpArray1(4, i) = "1" Then
									SQLItem = "Get_Inventory_by_ID '" & tmpArray1(1, i) & "'"
									RSItem.Open SQLItem, Conn
                               %>
      <table width="197" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="88%" class="planner-hotel-name"><%=RSItem("Date")%><br>
            <%=RSItem("Name")%></td>
          <td width="12%" class="planner-hotel-name" align="right"><%=tmpArray1(2, i)%> 
            <br>
          </td>
        </tr>
      </table>
      <hr width="95%" color="#FFA218" size="1" noshade align="center">
      <%RSItem.Close()
                                End If
                                Next%>
      <%If Not RSAmenity.EOF Then %>
      <%
                    RSAmenity.MoveFirst()
                    Do While Not RSAmenity.EOF
                    %>
      <div id=INV_<%=RSAmenity("Item_ID")%> style="{display:none}"> 
        <table width="197" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td width="88%" class="planner-hotel-name"><%=ArrivalDate & " - " & DateAdd("d", dayCount, ArrivalDate)%><br>
              <%=RSAmenity("Att_Desc") & " - " & RSAmenity("Name")%></td>
            <td width="12%" class="baseline" align="right"> 
              <input size=1 align=center type="text" id=Qty_<%=RSAmenity("Item_ID")%> name=Qty_<%=RSAmenity("Item_ID")%> readonly style="border-style:none;background-color:transparent;font-family: Verdana, Arial, Helvetica; vertical-align:baseline; font-size: 10px; font-style: normal; line-height: normal; font-weight: bold; color: #000099; text-decoration: none">
              <br>
            </td>
          </tr>
        </table>
        <hr width="95%" color="#FFA218" size="1" noshade align="center">
      </div>
      <%RSAmenity.MoveNext()
                    Loop
                    RSAmenity.MoveFirst()
                    End If%>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td class="headline-ffffff-small" width="85%" align="center" bgcolor="#000099">Additional 
            Items</td>
          <td class="headline-ffffff-small" width="15%" align="center" bgcolor="#000099">Qty</td>
        </tr>
      </table>
      <%
                    For i = LBound(tmpArray1, 2) to UBound(tmpArray1, 2)
							If tmpArray1(4, i) = "2" Then
									Set RSItem = Server.CreateObject("ADODB.Recordset")
									SQLItem = "[Avante].[dbo].[Get_Merc_Detail_Single] '" & tmpArray1(1, i) & "'"
									RSItem.Open SQLItem, Conn
									If Not RSItem.EOF Then
                    %>
      <table width="197" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="88%" class="planner-hotel-name"><%=RSItem("Name")%></td>
          <td width="12%" class="planner-hotel-name" align="right"><%=tmpArray1(2, i)%></td>
          <br>
        </tr>
      </table>
      <hr width="95%" color="#FFA218" size="1" noshade align="center">
      <%End If
                    RSItem.Close()
                    End If
                    Next
                    %>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td class="manage-menu-bold-orange" align="center" height="10"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="80%" class="standard-input-formorange" height="23">Click 
                  to Reserve Your Selection.</td>
                <td align="center" width="20%" height="23"><img src="/icons/icon-go-dot.gif" width="22" height="22" onClick="form2.submit()" style="{cursor:hand}"></td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td class="manage-menu-bold-orange" height="30"><span class="manage-menu-bold-orange"><b class="planner-instructions-bold">*</b></span> 
            <span class="planner-instructions">ADD: Enter Quantity</span><span class="input-box"><br>
            </span><span class="manage-menu-bold-orange"><b class="planner-instructions-bold">*</b></span> 
            <span class="planner-instructions"> REMOVE: Delete Quantity </span></td>
        </tr>
        <tr> 
          <td class="manage-menu-bold-orange" height="9"> 
            <hr width="95%" color="#FFA218" size="1" noshade align="center">
          </td>
        </tr>
        <tr> 
          <td class="manage-menu-bold-orange" align="center" height="30"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="80%" class="standard-input-formorange" height="23">Click 
                  to Save in Your Travel Planner. </td>
                <td align="center" width="20%" height="23"><img src="/icons/icon-go-dot.gif" width="22" height="22"></td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td align="center"><img src="/images/signup-today.gif" width="200" height="63"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
