initial layout and javascript functions completed