Added in some inline and on-page javascript functions.