Simple javascript routing system