added javascript functions to parse interaction queries for web apps.