#-*-Perl-*-

$hof{'spaz'} = 0;

#Spaz Labs http://www.stonebrokestudios.com/spaz/

sub spaz {
    my @ltime = gmtime(shift);
    my $date = strftime ("%Y%m%d",@ltime);
    
    my $baseurl = "http://www.stonebrokestudios.com/archives";
    
    my $rec = {
        'title' => 'Spaz Labs',
        'author' => 'C.G. Muggridge',
        'type' => 'gif',
        'main' => $baseurl,
        'archives' => "$baseurl/spazold/index.htm",
    };
    
    # Old Spaz Labs: 1/5/98 - 11/16/98
    if (($date >= 19980105) and ($date <= 19981116)) {
        return undef if $ltime[6] != 1; # Mondays only
        $rec->{'base'} = "$baseurl/spazold";
        $rec->{'page'} = strftime("/%y%m%dspazold.gif", @ltime);
        $rec->{'size'} = [600, 185];
    } elsif ($date <= 20000709) { # No Spaz Labs from 11/16/98 to 7/9/00
        return undef;
    } elsif ($date <= 20010118) { # 
        return undef if (($date < 20000914) and ($ltime[6] != 1)); # monday only
        return undef if $ltime[6] !~ m/[14]/; # monday/thursday only
        $rec->{'base'} = "$baseurl/spaz";
        $rec->{'page'} = strftime("/%y%m%dspaz.gif", @ltime);
        $rec->{'size'} = [438, 560];
    } else { # 
        return undef if $ltime[6] !~ m/[135]/; # m/w/f only
        $rec->{'base'} = "$baseurl/spaz";
        $rec->{'page'} = strftime("/%y%m%dspaz.gif", @ltime);
        $rec->{'size'} = [438, 560];
    };
    return $rec;

}

1;

