javascripts for layout