Delete Button in Form

My Form has two buttons "Save" and "Delete".

For the Save button I have a method for onClick  = "top.onSaveCommand()" which works.

For the Delete button I have a method for onClick  = "top.onDeleteCommand()" which I get the following error "Event handler failed with message: TypeError: aWindow.showModalDialog is not a function"