Fixed error checking for success and error functions.
Merge branch 'master' of https://github.com/cwrc/CWRC-Dialogs

Conflicts:
	js/cD.js