make the tooltips work correctly

add the JavaScripts to _LayoutPage