Mobile control framework in javascript