UNKNOWN '************************************** ' Name: Simple image rotator ' Description:to randomly display differ ' ent images ' By: moppy ' ' ' Inputs:intNumberOfImages ' ' Returns:None ' 'Assumes:None ' 'Side Effects:None 'This code is copyrighted and has limite ' d warranties. 'Please see http://www.Planet-Source-Cod ' e.com/xq/ASP/txtCodeId.8619/lngWId.4/qx/ ' vb/scripts/ShowCode.htm 'for details. '************************************** <% ' RANDOM IMAGE ROTATOR ' '--------------------------------------- ' ---------------------------------------- ' ---------> ' Author Date History Version ' Richard Slade 09/11/2003 Created ' V1.0 '- - - - - - - - - - - - - - - - - - - - ' - - - - - - - - - - - - - - - - - - - - ' - - - - > 'INSTRUCTIONS FOR USE '-------------------- '1: At the bottom of your HTML, add the ' function. '2: Call the function where you want the ' image to appear. e.g. - response.write " ' ../images/" & fnRandomImage(5) '3: Make sure that the path to your imag ' es folder is correct e.g. - ../images/ '4: Make sure your images are all the sa ' me format. e.g. .gif files '4: Change the number that appears in th ' e (), to reflect how many images you hav ' e. e.g fnRandomImage(5) for 5 images '5: Rename your images starting at 0 up ' to the number of images you have Public Function fnRandomImage(intNumberOfImages) Randomize() intRandom = ABS(RND * 1000000) Mod intNumberOfImages fnRandomImage = intRandom End Function %> <% response.write chr(60) & "img src='../images/" & fnRandomImage(3) & ".gif' border=0 alt=''" & chr(62) %>