<!--#include virtual="/includes/resifunctions.asp" -->
<!--#include virtual="/includes/datefunctions.asp" -->
 <!--#include virtual="/includes/images.asp" -->
  <!--#include virtual="/includes/images.inc" -->
<%
Session("Entity_ID") = "7476"
	Set Conn = Server.CreateObject("ADODB.Connection")
	Conn.Open "DRIVER={SQL Server};SERVER=WEBSRV01;UID=web;pwd=w3bs1t3;DATABASE=AVANTE"
	
 	SQLPark = "Select * from Event_Detail ED inner join (Event E Inner Join Event_Realm_Map ERM on E.Event_ID = ERM.Event_ID) "
	SQLPark = SQLPark & "on E.Event_ID = ED.Event_ID where E.Begin_Date >= '" & Date() & "' And ERM.Realm_ID = '26' Order By E.Begin_Date"
 	Set RS1 = Server.CreateObject("ADODB.Recordset")
 	rs1.CursorLocation = 2 
 	RS1.CursorType = 3
 	RS1.Open SQLPark, Conn
 	RS1.PageSize = 4
 	intPageCount = RS1.PageCount
 
 	Select Case Request("Action")
 	case "<<"
 		intpage = 1
 	case "<"
 		intpage = Request("intpage")-1
 		if intpage < 1 then intpage = 1
 	case "<2"
 		intpage = Request("intpage")-2
 		if intpage < 1 then intpage = 1
 	case ">"
 		intpage = Request("intpage")+1
 		if intpage > intPageCount then intpage = IntPageCount
 	case ">2"
 		intpage = Request("intpage")+2
 		if intpage > intPageCount then intpage = IntPageCount
 	Case ">>"
 		intpage = intPageCount
 	case else
 		intpage = 1
 end select

%>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript" src="/js/menu-script.js">
<!--




<!--
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/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">
</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/campsites-dim.gif','/images/menu/packages-dim.gif','/images/menu/attractions-dim.gif','/images/menu/events-dim.gif','/images/menu/contact-us-dim.gif','/images/menu/reservations-dim.gif','file:///G|/A/backup/web-sites/tropical_palms/images/menu/resort-amentites-dim.gif','file:///G|/A/backup/web-sites/tropical_palms/images/menu/cottages-dim.gif','file:///G|/A/backup/web-sites/tropical_palms/images/menu/attractions-dim.gif','file:///G|/A/backup/web-sites/tropical_palms/images/menu/events-dim.gif','file:///G|/A/backup/web-sites/tropical_palms/images/menu/contact-us-dim.gif','file:///G|/A/backup/web-sites/tropical_palms/images/menu/reservations-dim.gif','file:///G|/A/backup/web-sites/tropical_palms/images/menu/home-dim.gif')">
<table width="650" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#7BB8B9" class="main-table-space" height="70%">
  <tr> 
    <td colspan="2"><img src="/images/header-composite.jpg" width="650" height="76"></td>
  </tr>
  <tr> 
    <td width="117" height="228" valign="top"> 
      <table width="120" border="0" cellspacing="0" cellpadding="0" height="100%">
        <tr> 
          <td background="/images/menu-121.gif" height="266" valign="top"> 
            <!--#include virtual="/includes/menu.asp" -->
          </td>
        </tr>
        <td background="/images/menu/menu-121-palm.gif" height="122">&nbsp;</td>
        </tr>
      </table>
    </td>
    <td width="533" height="336" valign="top"> 
      <table border="0" cellspacing="0" cellpadding="0" width="530">
        <tr> 
          <td align="center" valign="top" width="531"> 
            <%If Not RS1.EOF Then
                    RS1.AbsolutePage = intPage 
 		For intRecord = 1 To RS1.PageSize
 			Event_Image = Get_Image_By_Event_No_Str(RS1("Event_ID"), 45)
 			Sponsor_Image = Get_Image_Sponsor_By_Event_No_Str(RS1("Event_ID"), 43)
 				
 		%>
            <span class="event-list-hdln"><font color="#FFFF99">Upcoming Events</font></span><br>
            <table width="530" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="530" align="center"> 
              <tr> 
                <td width="530" valign="top" align="center" class="galley-text-event" height="153">
                  <table width="515" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
                    <tr align="center" bgcolor="#557B72"> 
                      <td colspan="4" class="Event-bar"> 
                        <table width="82%" border="0" cellspacing="0" cellpadding="0" height="15">
                          <tr> 
                            <td class="Event-bar"> 
                              <%
                 Dim SQLCal1, SQLCal2, RSCal, BeginMonth, EndMonth
                 Response.Write (MonthName(Month(RS1("Begin_Date"))) & " " & day(RS1("Begin_Date")) & " - ")
                 Response.Write (MonthName(Month(RS1("End_Date"))) & " " & day(RS1("End_Date")) & " " & Year(RS1("End_Date")))
                 %>
                            </td>
                            <td class="Event-bar" align="right"> 
                              <%
                 Dim RSType, SQLType
                 Set RSType = Server.CreateObject("ADODB.Recordset")
                 SQLType = "Select * From Event_Type Where Event_Type_ID = '" & RS1("Event_Type_ID") & "'"
                 RSType.Open SQLType, Conn
                 Response.Write(RSType("Type_Name"))
                 RSType.Close()
                 Set RSType = Nothing
                 %>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                    <tr> 
                      <td width="202" valign="top" class="indent"><span class="headline-event-bolder"><%=PCase(RS1("Name"))%><br>
                        </span><span class="galley-text-event-sm"><%=RS1("Venue_Name")%><br>
                        <%=RS1("Address_1")%><br>
                        <%=RS1("City")%>, <%=RS1("state")%></span></td>
                      <% If Not Sponsor_Image = "" Then %>
                      <td rowspan="2" align="center" width="42" class="row-space-sm" valign="middle"> 
                        <br>
                        <table border="0" cellspacing="0" cellpadding="1">
                          <tr> 
                            <td bgcolor="#007AC2" valign="middle"> 
                              <table border="0" cellspacing="0" cellpadding="1" bgcolor="#FFFFFF"  height="2" width="2">
                                <tr> 
                                  <td height="2" width="2"><%= Sponsor_Image %></td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                      <% End IF %>
                      <td rowspan="2"  valign="top" align="center" class="row-space-sm" width="138"> 
                        <table width="90%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td height="13" class="event-list-sub-hdln"><%=Month(RS1("Begin_Date")) & "/" & day(RS1("Begin_Date"))%> 
                              - <%=Month(RS1("End_Date")) & "/" & day(RS1("End_Date")) & "/" & Year(RS1("End_Date"))%> 
                            </td>
                          </tr>
                          <tr> 
                            <td height="12" class="galley-text-event-sm" > 
                              <% If RS1("Recurrence") = "1" Then Response.Write("Daily")
                       If RS1("Recurrence") = "2" Then Response.Write("Weekly")
                       If RS1("Recurrence") = "3" Then Response.Write("Monthly")
                       If RS1("Recurrence") = "4" Then  Response.Write("Annually")
                       %>
                              <br>
                              <%
                         If Not (Hour(RS1("Begin_Date")) = "0" And Minute(RS1("Begin_Date")) = "0") Then
                          Dim Hour1, Hour2, minute1, minute2
                          Hour1 = Hour(RS1("Begin_Date"))
                          Hour2 = Hour(RS1("End_Date"))
                          
                          If Minute(RS1("Begin_Date")) = "0" Then
                          minute1 = "00"
                          Else
                          minute1 = Minute(RS1("Begin_Date"))
                          End IF
                          
                          If Hour(RS1("Begin_Date")) > 12 Then
                          Hour1 = Hour(RS1("Begin_Date")) - 12
                          Response.Write(Hour1 & ":" & minute1 & " pm")
                          Else
                          Response.Write(Hour1 & ":" & minute1 & " am")
                          End If
                          If Not (Hour(RS1("End_Date")) = "0" And Minute(RS1("End_Date")) = "0") Then
                         %>
                              to 
                              <%
                          If Minute(RS1("End_Date")) = "0" Then
                          minute2 = "00"
                          Else
                          minute2 = Minute(RS1("End_Date"))
                          End IF
                          
                          If Hour(RS1("End_Date")) > 12 Then
                          Hour2 = Hour(RS1("End_Date")) - 12
                          Response.Write(Hour2 & ":" & minute2 & " pm")
                          Else
                          Response.Write(Hour2 & ":" & minute2 & " am")
                          End If
                          End If
                          End If
                          %>
                            </td>
                          </tr>
                        </table>
                        <br>
                        <table width="90%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td width="53%" class="galley-text-bold" align="center" height="37" valign="top"> 
                              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr> 
                                  <td class="event-list-sub-hdln" height="11"> 
                                    <%If (RS1("Paid_Admission") = "True") Then %>
                                    <% If Not CStr(RS1("Pay_Adult")) = "0" Then %>
                                    Adults: 
                                    <% Response.Write("$" & RS1("Pay_Adult"))%>
                                    <% End If %>
                                    <% End If %>
                                    <%If (RS1("Free_Admission") = "True") Then %>
                                    Adults: 
                                    <% Response.Write("Free")%>
                                    <% End If %>
                                  </td>
                                </tr>
                                <tr> 
                                  <td class="galley-text-event-sm" height="13"><%=RS1("Adult_Desc")%></td>
                                </tr>
                              </table>
                              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr> 
                                  <td height="11" class="event-list-sub-hdln"> 
                                    <%If (RS1("Paid_Admission") = "True") Then %>
                                    <% If Not CStr(RS1("Pay_Child")) = "0" Then %>
                                    Kids: 
                                    <% Response.Write("$" & RS1("Pay_Child"))%>
                                    <% End If %>
                                    <% End If %>
                                    <%If (RS1("Free_Admission") = "True") Then %>
                                    Kids: 
                                    <% Response.Write("Free")%>
                                    <% End If %>
                                  </td>
                                </tr>
                                <tr> 
                                  <td class="galley-text-event-sm"><%=RS1("Child_Desc")%></td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                      <% If Not Event_Image = "" Then %>
                      <td rowspan="2" valign="middle" class="row-space-sm" align="center" width="89"><span class="imageclip"><%=Event_Image%></span></td>
                      <% End If %>
                    </tr>
                    <tr> 
                      <td width="202"  valign="top" class="indent"><span class="galley-text-event-sm"><%=RS1("Description")%></span> 
                      </td>
                    </tr>
                    <tr align="center" bgcolor="#007AC2"> 
                      <td colspan="4" valign="top" bgcolor="#557B72" class="2p-rule"></td>
                    </tr>
                    <tr align="center"> 
                      <td colspan="4" valign="top" height="2"> 
                        <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center" class="galley-text-tiny">
                          <%
 					Dim i, j, RSAtt, SQLAtt
 					Set RSAtt = Server.CreateObject("ADODB.Recordset")
 					SQLAtt = "Select * From Event_Att_Map EAM inner join Attribute_Type AT on EAM.Att_ID = AT.Att_ID Where EAM.Dest_ID = '" & RS1("Event_ID") & "'"
 					RSAtt.Open SQLAtt, Conn
 					i = 0
 					Do While i < 11%>
                          <tr> 
                            <%
 					If RSAtt.EOF Then Exit Do
 						j = 0     
 						Do While j < 4 And Not RSAtt.EOF
 						%>
                            <td width="25%" class="galley-text-tiny" height="22" ><%=RSAtt("Att_Desc")%></td>
                            <%
                         j = j + 1
                         RSAtt.MoveNext()
                         Loop
                         %>
                          </tr>
                          <%
                     i = i + 1
                     Loop%>
                        </table>
                      </td>
                    </tr>
                    <tr bgcolor="#557B72"> 
                      <td colspan="4" valign="middle" align="center" class="5pspace" height="9">&nbsp;</td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            <%RS1.MoveNext()
                   If rs1.EOF Then Exit For 
 				
 				Next
 				rs1.Close
 				set rs1 = Nothing
 				Else
 %>
            No Events Available 
            <%End If%>
          </td>
        </tr>
      </table>
  <tr> 
    <td colspan="2"><img src="/images/footer-650.jpg" width="650" height="33"></td>
  </tr>
</table>
<!--#include virtual="/includes/footer.asp" -->
</body>
</html>
