+// Waits until the window has been closed
+function closeSuccessLocked (prefix) {
+ // Has all been loaded?
+ if (!isElementVisible(prefix, 'success')) {
+ // Then release ready()
+ $.holdReady(false);
+ } else {
+ // Recursive call again
+ window.setTimeout('closeSuccessLocked("' + prefix + '")', 10);
+ }
+}
+
+// Closes an success window
+function closeSuccessWindow (prefix, waitClose, resetCurrentTabId) {
+ // Is the success displayed?
+ //* DEBUG: */ alert('closeSuccessWindow(): prefix=' + prefix + ',waitClose=' + waitClose + ',resetCurrentTabId=' + resetCurrentTabId + ' - ENTERED!');
+ if (isElementVisible(prefix, 'success')) {
+ // Shall we wait ("sync") until the animation has completed?
+ if (waitClose === true) {
+ // Hold the ready status
+ $.holdReady(true);
+ } // END - if
+
+ // Yes, then fade it out
+ $('#' + prefix + '_success').fadeOut('fast', function() {
+ // Set current tab id to default
+ if (resetCurrentTabId === true) {
+ setCurrentTabId(defaultTabId);
+ } // END - if
+ });
+
+ // Shall this animation be "synchronized"?
+ if (waitClose === true) {
+ // Wait for the window has been closed
+ closeSuccessLocked(prefix);
+ } // END - if
+ } // END - if
+ //* DEBUG: */ alert('closeSuccessWindow(): prefix=' + prefix + ',waitClose=' + waitClose + ',resetCurrentTabId=' + resetCurrentTabId + ' - EXIT!');
+}
+