My own javascript for lottery.