#!/usr/bin/perl

$htmldir = "/home/httpd/html/";
$imgdir = "images/sponsor_imgs/";   
$countimgs = 0; 

opendir (SPONSORIMGS, "$htmldir$imgdir"); 

while (defined ($filename = readdir(SPONSORIMGS))) {  
  if ($filename =~m/\.gif$/) {
    $filename =~ s/\.gif//;
    push(@images, $filename); 
  }
} 

closedir(SPONSORIMGS); 

$num = int(rand($#images + 1)); 

print "<a href=\"sponsors.shtml\#$images[$num]\"><img src=\"$imgdir$images[$num].gif\"  border=0 alt=\"We\'d like to thank our sponsors for making this website possible\.\" width=110 height=65 vspace=5 hspace=10></a>
";   

