I've overridden de default javascript alert() using modal dialog from Jquery UI plugin.
But I'm not able to show it in a page which contains frames. If the alert is called in a frame the dialog will be shown here, not in the parent window as the default alert.