We recently moved a client to CRM 2013 and upon doing so we are seeing that a modal dialog now causes an error.
The code used to launch the modal dialog is..
var serverUri = Mscrm.CrmUri.create('/cs/dialog/rundialog.aspx');
serverUri = serverUri + '?DialogId=' + dialogID + '&EntityName=' + typeName + '&ObjectId=' + recordId;
openStdDlg(serverUri ,"newWindow",615,480,true, false, "status=1,scrollbars=0,toolbar=0,menubar=0,location=0");
What we are seeing is that if a user either cancels or finishes the dialog a javascript error is always thrown. The dialog performs as it should do and code after the dialog is executed correctly but we always get the error. Error is below.

Now I am not sure if the code is now supported or unsupported, however it is causing a bit of head scratching!!
Any help would be appreciated.
Thanks
Mark