>>176
元質問者のコードから document.write 消しただけだが?
わたしゃ知らんがな