add functions to the main.aspx page