I need to create a case from a popup on the Documents module.

This case must have a recorded subject and description and when saving assign it to a another previous defined user.
The user only will have the posibility to save or cancel the action retuning to the documents module.
I have inserted this code ont the documents page, bt I have a couple of problems:
1.- When the case is saved is created with my user (not the user_id I'm passing)
2.- When the cancel or saved button are pressed IŽd like to close the window.

Any help with this...

This is the code I have inserted:

<input type="button" name="btn1" class="button"
title="Crear Incidencia"
accesskey="{APP.LBL_SELECT_BUTTON_KEY}"
value='Crear Incidencia'
onClick="javascript: window.open('index.php?module=Cases&action=EditVie w&description=xxxx xxxx&name=xxxxxxx&assigned_user_id=d807fc4b-1fa4-e5e8-8e3b-45c2df50e8d5&cmd=displayserverarray', 'name','height=600,width=600,toolbar=no,location=n o,directories=yes,status=no,menubar=no, scrollbars=yes,copyhistory=yes,resizable=yes'); if (window.focus) {newwindow.focus()}"

IŽd like to create with a button, but I can do that with a link.
Any help with this...

Thanks alot in advance