Dynamically adding new object controls with JavaScript