Initial javascript work for prototype 1