Yeah you can move this to util.js.  Make the width and height optional and use standard defaults, e.g. 300x250.