7 segment JavaScript implmentation