common functions used in apache flex applications