Problem with javascript solved