<%
function f_rnd_img (str_path)
randomize()
If right(str_path,1) <> chr(47) then str_path = str_path & chr(47)
str_physical = server.MapPath(str_path)
Set obj_fso = server.CreateObject("Scripting.FileSystemObject")
Set obj_folder = obj_fso.GetFolder(str_physical)
Set obj_files = obj_folder.Files
for each obj_filename in obj_files
str_filename = lcase(obj_filename.name)
str_filenames = str_filenames & str_filename & vbtab
next
str_imagen = Split(str_filenames, vbTab)
if ubound(str_imagen) > 1 then
f_rnd_img = str_path & str_imagen(int(rnd(1) * ubound(str_imagen)))
end if
end function
%>