<%@ language="vbscript" %> <% Dim sImage,sCaption,sPreviousVisibiliy,sNextVisibiliy,nNextPosition,nPreviousPosition Dim aPictures(7) 'An array containing the images to be used aPictures(0) = "" aPictures(1) = "" aPictures(2) = "" aPictures(3) = "" aPictures(4) = "" aPictures(5) = "" aPictures(6) = "" Dim aCaptions(7) aCaptions(0) = "Brilliant flowers in the yard attract many insects including this very hungry grasshopper." aCaptions(1) = "Photo opportunities abound right on the lodge grounds. Here, one of our owners is captured in the act of photographing a butterfly as it drinks at one of the many flowering plants at Turtle Beach Lodge." aCaptions(2) = "If butterflies are your thing, Turtle Beach is your place as this shot shows (yes it is the one our owner Beverly took in the previous photo)." aCaptions(3) = "This little flower looks like a pineapple, but it isn't. There are many pineapples plants at Turtle Beach Lodge to provide juicy fruit for the table." aCaptions(4) = "This little flower has an edible outgrowth that has a delicious citrus flavor." aCaptions(5) = "Vivid Colors abound in every nook and cranny of Turtle Beach Lodge." aCaptions(6) = "Shadows of the palm trees form playful patterns on the lawn as the blue waters of the Carribean are seen in the background." ' 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 %> Landscaped Grounds
 Landscaped Grounds
<%= sImage %>
<%= sCaption %>