<% Randomize Dim fso, f, fl, fc, NumberOfFiles Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder("D:\Websites\mhsc\images\rotating\") Set fc = f.Files NumberOfFiles = 0 For each fl in fc NumberOfFiles = NumberOfFiles + 1 Next Session("imagenumber") = Cstr(Int(NumberofFiles * Rnd + 1)) %> MHSC: who we are <% filename = "D:\Websites\mhsc\images\rotating\image" + (Session("imagenumber")) + ".html" 'response.write filename Dim fso2, f2 Set fso2 = CreateObject("Scripting.FileSystemObject") set f2 = fso2.OpenTextFile(filename) do while not f2.atendofstream response.write f2.readline loop f2.close 'response.write(Session("imagenumber")) %>