%
option explicit
dim panel
dim newImage
dim lastImage
lastImage = session("lastImage")
newIMage = heroImageRandomizer
while newImage = lastImage
newImage = heroImageRandomizer
wend
panel = newImage
session("lastImage") = newImage
' to add more images, increase arrayImages number and assign it to the array
private function heroImageRandomizer()
dim arrayImages(6)
dim arraySize
dim chosenImage
Randomize
arrayImages(0) = "images/hp_image2.jpg"
arrayImages(1) = "images/vdc_hp_guy.jpg"
arrayImages(2) = "images/vdc_hp_couple.jpg"
arrayImages(3) = "images/vdc_hp_guy2.jpg"
arrayImages(4) = "images/vdc_hp_2guys.jpg"
arrayImages(5) = "images/vdc_hp_guy3.jpg"
arraySize = UBound( arrayImages )
chosenImage = INT( (arraySize)*RND() )
heroImageRandomizer = arrayImages( chosenImage )
end function
'dim num
'dim ad
'if len(request.cookies("visit")) = 0 then
' ad = 0
' response.cookies("visit") = 1
' response.cookies("visit").expires = #1/1/2010 00:00:00#
'else
' visitnum = cint(request.cookies("visit"))
' nextnum = 1 + visitnum
' visit = formatnumber((visitnum/6),1)
' ad = right(visit,1)
' response.cookies("visit") = nextnum
' response.cookies("visit").expires = #1/1/2010 00:00:00#
'end if
'if ad = 0 or ad = 1 or ad = 3 or ad = 5 or ad = 7 or ad = 9 then
' panel="images/hp_image2.jpg"
'elseif ad = 2 then
' panel="images/vdc_hp_guy.jpg"
'elseif ad = 4 then
' panel="images/vdc_hp_couple.jpg"
'elseif ad = 6 then
' panel="images/vdc_hp_guy2.jpg"
'elseif ad = 8 then
' panel="images/vdc_hp_2guys.jpg"
'else ad = 9
' panel="images/vdc_hp_guy3.jpg"
'end if
%>