<!--#include virtual="/includes/sessionvariables.asp" -->
<!--#include virtual="/includes/pagefunctions.asp" -->
<link rel="stylesheet" href="/Style-sheets/Profile-layout.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/Profile-layout.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/page-formatting.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/headline-large.css" type="text/css">
<link rel="stylesheet" href="/includes/image-margins.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">

<table width="212" border="0" cellspacing="0" cellpadding="0" valign="top">
  <tr> 
    <td align="center" valign="bottom">&nbsp;</td>
  </tr>
  <tr> 
    <%
  		'Response.Write ArrivalDate & "<BR>"
		'Response.Write DepartDate & "<BR>"
	%>
    <td class="headline-destination-name" align="center" valign="bottom"><% If Not Session("City") = "" Then %>
    <%=Session("City")%>,
      <br>
      <span class="headline-destination-name14p"> <%=Get_State_Full(Session("State"))%> USA</span><% End If %> &nbsp;</td>
  </tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="212" valign="top">
  <tr align="center" valign="top"> 
    <td colspan="4" width="212"> 
      <table width="208" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
              <%' Attractions based on City and State, and parent lookup             	
				SQLDest = SQLDest & "Select GEM.Entity_ID, G.Group_ID, AGM.[Variable], G.[Name] "
				SQLDest = SQLDest & "from Att_Group_Map AGM "
				SQLDest = SQLDest & "	Inner Join [Group] G On AGM.Group_ID = G.Group_ID "
				SQLDest = SQLDest & "	Inner Join Lookup_Lookup_Map LLM on LLM.Lookup_ID_2 = G.Lookup_ID"
				SQLDest = SQLDest & "	Inner Join Group_Entity_Map GEM on G.Group_ID = GEM.Group_ID"
				SQLDest = SQLDest & "	Inner Join Group_Realm_Map GRM On G.Group_ID = GRM.Group_ID "
				SQLDest = SQLDest & "	Inner Join Entity_Detail ED on GEM.Entity_ID = ED.Entity_ID "
				SQLDest = SQLDest & "   Where GRM.Realm_ID='" & Session("Site_Realm") & "' And AGM.Att_ID = '542' And LLM.Lookup_ID_1 = '3' And State Like '" & Session("State")  & "' and (City Like '" & Session("City") & "' "

				SQL4 = "Get_Combo_City @State_Abbr = '" & Session("State") & "', @Child_City= '" & Session("City") & "', @Realm_ID='" & Session("Site_Realm") & "'"
				Set RS4=Conn.Execute(SQL4)
				While Not RS4.EOF
					SQLDest = SQLDest & "Or City like '" & RS4("Parent_City") & "' "
					RS4.MoveNext
				Wend
				Set RS4 = Nothing
				SQLDest = SQLDest & ")"

				Set RSDest = Server.CreateObject("ADODB.Recordset")
				RSDest.CursorType = 1
				RSDest.Open SQLDest, Conn
				If RSDest.EOF Then Dont_Show = True
%>

          <td width="208" valign="bottom"><% If Not Dont_Show = True Then %> <img src="/images/nearby-attractions.gif" width="208" height="18"><% End If %>
            <table width="212" border="0" cellspacing="2" cellpadding="2" background="/images/destination-table-new.gif" height="38" valign="top">
<%				
				If Not RSDest.EOF Then
					count = RSDest.RecordCount
					Randomize()
					record1 = Int((count) * Rnd + 1)
					RSDest.AbsolutePosition = record1
					Att_Image = Get_Image_By_Group(RSDest("Group_ID"), 44, True)
			  %>
              <tr> 
                <td width="10">&nbsp;</td>
                <td width="182" class="headline-destination-layer" ><a href="main-attractions-profile.asp?Name=<%=RSDest("Entity_ID")%>"class="headline-tab"><%=RSDest("Name")%></a></td>
                <td colspan="2" width="21" valign="top" align="right">&nbsp;</td>
              </tr>
              <tr> 
                <td colspan="4" valign="top"> 
                  <table width="99%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <% If Not Att_Image = "" Then %>
                      <td width="11" align="center"> 
                        <table border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td bgcolor="#000099" width="8"><a href="main-attractions-profile.asp?Name=<%=RSDest("Entity_ID")%>"><%= Att_Image %></a></td>
                          </tr>
                        </table>
                      </td>
                      <% End If %>
                      <td class="tab-text-destination" width="199"><span class="tab-text-destination"><%= TextLimit(RemoveHTML(RSDest("Variable")), 95, False)%>&nbsp;</span></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            <table width="212" border="0" cellspacing="2" cellpadding="2" background="/images/destination-table-intersection.gif" valign="top">
              <%
            	record2 = Int((count) * Rnd + 1)
            	Idd = 0
            	Do While Idd < 1000 And record1 = record2 
            	record2 = Int((count) * Rnd + 1)
            	Idd = Idd + 1
            	Loop
				RSDest.AbsolutePosition = record2
				
		Att_Image = Get_Image_By_Group(RSDest("Group_ID"), 44, True)
	     %>
              <tr> 
                <td width="10">&nbsp;</td>
                <td width="181" class="headline-destination-layer" ><span class="headline-tab"><a href="main-attractions-profile.asp?Name=<%=RSDest("Entity_ID")%>" class="headline-tab"><%=RSDest("Name")%></a></span></td>
                <td colspan="2" width="19" valign="top" align="right">&nbsp;</td>
              </tr>
              <tr> 
                <td colspan="4"> 
                  <table width="99%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <% If Not Att_Image = "" Then %>
                      <td width="1" align="center"> 
                        <table width="5" border="0" cellspacing="0" cellpadding="0" height="5">
                          <tr> 
                            <td bgcolor="#000099" width="52"><a href="main-attractions-profile.asp?Name=<%=RSDest("Entity_ID")%>"><%= Att_Image%></a></td>
                          </tr>
                        </table>
                      </td>
                      <% End If %>
                      <td class="tab-text-destination"><%= TextLimit(RemoveHTML(RSDest("Variable")), 95, False)%>&nbsp;
                      </td>
                    </tr>
                  </table>
              </tr>
              <% End If %>
            </table>
            <table width="210" border="0" cellspacing="0" cellpadding="0" valign="top">
              <tr align="center" valign="top"> 
                <td width="210" align="left" height="2"><% If Not Dont_Show = True Then %><img src="/images/bottom-snapshots.gif" width="210"><% End If %></td>
              </tr>
            </table>
              <%'	Dim SQLEvent, RSEvent
            	SQLEvent = "Select * from Event E inner join Event_Detail ED on E.Event_ID = ED.Event_ID where (ED.City Like '" & Session("City") & "' "

	SQL4 = "Get_Combo_City @State_Abbr = '" & Session("State") & "', @Child_City= '" & Session("City") & "', @Realm_ID='" & Session("Site_Realm") & "'"
	Set RS4=Conn.Execute(SQL4)
	While Not RS4.EOF
		SQLEvent = SQLEvent & "Or ED.City like '" & RS4("Parent_City") & "' "
		RS4.MoveNext
	Wend
	Set RS4 = Nothing

				'Setting date to arrival date if avaialbe, else setting date to current date
				If ArrivalDate = "" Then ArrivalDate=Date()

				SQLEvent = SQLEvent & ") And ED.State = 'FL' And E.Begin_Date >= '" & ArrivalDate & "' Order By E.Begin_Date"

				Set RSEvent = Server.CreateObject("ADODB.Recordset")
				RSEvent.CursorType = 1
				RSEvent.Open SQLEvent, Conn
				Dont_Show = False
				If RSEvent.EOF Then Dont_Show = True
%>            
	<% If Not Dont_Show = True Then %> <img src="/images/upcoming-events.gif" width="208" height="18"><% End If %>
	<table width="212" border="0" cellspacing="0" cellpadding="0" background="/images/destination-table-new.gif" valign="top">
			<%
				IF Not RSEvent.EOF Then
				count = RSEvent.RecordCount
				Randomize()
				record1 = Int((count) * Rnd + 1)
				RSEvent.AbsolutePosition = record1
				Event_Image = Get_Image_By_Event(RSEvent("Event_ID"), 44, True)
				%>
              <tr> 
                <td width="10" height="20">&nbsp;</td>
                <td width="182" height="20" class="headline-destination-layer" ><span class="headline-tab"><a href="Main-Events-List.asp?Event_ID=<%=RSEvent("Event_ID")%>" class="headline-tab"><%=RSEvent("Name")%></a></span></td>
                <td colspan="2" width="18" valign="top" align="right" height="20">&nbsp;</td>
              </tr>
              <tr> 
                <td colspan="4" valign="top"> 
                  <table width="99%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <% If Not Event_Image = "" Then %>
                      <td width="10" align="center" class="2p-padding"> 
                        <table border="0" cellspacing="0" cellpadding="1">
                          <tr> 
                            <td bgcolor="#000099"> <%= Event_Image 
				%></td>
                          </tr>
                        </table>
                      </td>
                      <% Else %>
                      <td width="10">&nbsp;</td>
                      <% End If %>
                      <td valign="top" width="190"><span class="headline-event-tiny"><%=Month(RSEvent("Begin_Date")) & "/" & day(RSEvent("Begin_Date"))%> 
                        - <%=Month(RSEvent("End_Date")) & "/" & day(RSEvent("End_Date")) & "/" & Year(RSEvent("End_Date"))%><br>
                        </span> <span class="profile-text-tab"><%=RSEvent("Description")%></span> 
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <%End If%>
            </table>
            <table width="212" border="0" cellspacing="0" cellpadding="0" background="/images/destination-table-intersection.gif" valign="top">
              <%
		'Dim Idd
            	record2 = Int((count) * Rnd + 1)
		Idd = 0
            	Do While Idd < 1000 And record1 = record2
		Idd = Idd + 1
            	record2 = Int((count) * Rnd + 1)
            	Loop
            	If Not RSEvent.EOF Then
				RSEvent.AbsolutePosition = record2
				Event_Image = Get_Image_By_Event(RSEvent("Event_ID"), 44, True)
				%>
              <tr> 
                <td width="10">&nbsp;</td>
                <td width="182" class="headline-destination-layer" ><span class="headline-tab"><a href="Main-Events-List.asp?Event_ID=<%=RSEvent("Event_ID")%>" class="headline-tab"><%=RSEvent("Name")%></a></span></td>
                <td colspan="2" width="18" valign="top" align="right">&nbsp;</td>
              </tr>
              <tr> 
                <td colspan="4"> 
                  <table width="99%" border="0" cellspacing="0" cellpadding="0" valign="top">
                    <tr> 
                      <% If Not Event_Image = "" Then %>
                      <td width="10" align="center" class="2p-padding"> 
                        <table border="0" cellspacing="0" cellpadding="1">
                          <tr> 
                            <td bgcolor="#000099"> <%= Event_Image 
				%></td>
                          </tr>
                        </table>
                      </td>
                      <% Else %>
                      <td width="10">&nbsp;</td>
                      <% End If %>
                      <td  valign="top" width="190"><span class="headline-event-tiny"><%=Month(RSEvent("Begin_Date")) & "/" & day(RSEvent("Begin_Date"))%> 
                        - <%=Month(RSEvent("End_Date")) & "/" & day(RSEvent("End_Date")) & "/" & Year(RSEvent("End_Date"))%><br>
                        </span><span class="profile-text-tab"><%=RSEvent("Description")%>&nbsp;</span> 
                      </td>
                    </tr>
                  </table>
              </tr>
              <%End If%>
            </table>
            <%
            RSDest.Close()
            Set RSDest = Nothing
            RSEvent.Close()
            Set RSEvent = Nothing
            
            %>
          </td>
        </tr>
      </table>
    </td>
  </tr>
 </table>
<% If Not Dont_Show = True Then %> 
<img src="/images/bottom-snapshots.gif" width="212" align="top"> 
<% End If %>
<table width="212" border="0" cellspacing="0" cellpadding="0" valign="top">
  <tr> 
    <td class="rule-tiny" height="11">&nbsp;</td>
  </tr>
</table>