singleton page whith javascript