Some functions which can be included in profiles_functions.js