How to dynamically create and attach content to dhrmlxwin

Hi everybody,
I need some help on dynamic win creation I want to create one function which has dialogId parameter so you can create window, attach form, and resize window to the newly created interface. Is this possible? I mean.

function open_form_dialog(id) {
win = create window here (“win_id”) autosize dimensions

  form = win.attachForm ("forms/id.xml");


Something similar is possible?

Here is a good simple sample for you … _init.html
Do your form adding by analogy