Bug 949896 - [Window Management]use template.js for modal dialog rendering