emtark, instead of:

if hour = 0 then hs = 0
if hour = 3 then hs = 1
if hour = 6 then hs = 2
if hour = 9 then hs = 3
if hour = 12 then hs = 4
if hour = 15 then hs = 5
if hour = 18 then hs = 6
if hour = 21 then hs = 7

why not:
hs = hour / 3

Dave Purola,
N8NTA