javascript and layout