%@ language="vbscript" %>
<%
Dim sImage,sCaption,sPreviousVisibiliy,sNextVisibiliy,nNextPosition,nPreviousPosition
Dim aPictures(8) 'An array containing the images to be used
aPictures(0) = ""
aPictures(1) = "
"
aPictures(2) = "
"
aPictures(3) = "
"
aPictures(4) = "
"
aPictures(5) = "
"
aPictures(6) = "
"
aPictures(7) = "
"
Dim aCaptions(8) 'An array containing a caption for each image
aCaptions(0) = "The fun starts as soon as you leave our dock. Whether arriving at or leaving Turtle Beach Lodge our private canal is one of the most exotic sights you'll see on your trip."
aCaptions(1) = "Our old sign reflects our concern for eco-tourism. The lodge meets all standards set down by the Costa Rican government to protect the environment and encourage its people to embrace and share the beauty of their precious resources."
aCaptions(2) = "The mirror-like reflections on the still waters add to the romance of the canal. Below the surface fish and other aquatic creatures are as abundant as the colorful birds that stop to drink at the water's edge."
aCaptions(3) = "Because the canal is narrow you feel enveloped by the jungle, and a part of it."
aCaptions(4) = "The canal provides you with an intimate, quiet look into a very different world where palm trees and a unique variety of wildlife provide an everchanging experience."
aCaptions(5) = "The point where our private canal meets the Canal of Palms has been described by some of Costa Rica's most knowledgable eco-tourism experts as a “million dollar view.”"
aCaptions(6) = "The colors of the canal change with the rainy and dry seasons."
aCaptions(7) = "As you return to the Turtle Beach Lodge Boat Dock you hear the faint roar of the Caribbean Sea in the distance."
' SetDefaults(): Sets the default image and caption.
' This function is called the first time the page is loaded
' if an invalid request is made.
Sub SetDefaults()
sImage = aPictures(0)
sCaption = aCaptions(0)
sPreviousVisibiliy = "hidden"
sNextVisibiliy = "visible"
nPreviousPosition = 0
nNextPosition = 1
End Sub
' MoveNext(IntPosition): Moves the image and corresponding caption forward or backward
Function MoveNext(IntPosition)
nNextPosition = IntPosition+1
nPreviousPosition = IntPosition-1
If (CInt(IntPosition)+1 = UBound(aCaptions)) Then
sNextVisibiliy = "hidden"
Else
sNextVisibiliy = "visible"
End If
If (CInt(IntPosition) = 0) Then
sPreviousVisibiliy = "hidden"
Else
sPreviousVisibiliy = "visible"
End If
sImage = aPictures(CInt(IntPosition))
sCaption = aCaptions(CStr(IntPosition))
End Function
' GetCommand(): Returns the name of the image button ("previous" or "next") clicked on by the user
Function GetCommand()
If (Request.Form.Count = 0) Then
GetCommand = ""
Else
GetCommand = Left(Request.Form.Key(3),Instr(Request.Form.Key(3), ".")-1)
End If
End Function
Select Case GetCommand()
Case "Next" MoveNext(Request("NextPosition"))
Case "Previous" MoveNext(Request("PreviousPosition"))
Case Else SetDefaults()
End Select
%>