Object oriented javascript demo application