
{
null;
null;
dojo.getObject('wui', true);
dojo.getObject('wui.io', true);
dojo.getObject('wui.i18n', true);
dojo.getObject('wui.field', true);
dojo.getObject('wui.help', true);

wui.connect = function (objects, event, function4912)
{
if (objects)
null;
else
throw(['wui.connect called with nil object']);
if (function4912)
null;
else
throw(['wui.connect called with nil function']);
if (dojo.config.isDebug)
null;
else
{
var originalFunction = function4912;
function4912 = function ()
{

try
{
originalFunction.apply(this, arguments);
}
catch (e)
{
wui.informUserAboutError('error.generic-javascript-error');
}
};
}

var lookup = function (id)
{

{
var result = dojo.byId(id);
if (result)
null;
else
throw(['lookup of the dom node ', id, ' in wui.connect failed']);
return result;
};
};
if (dojo.isArray(object))
{
var LIST4497 = objects;
var IDX4496 = 0;
for (; !(IDX4496 >= LIST4497.length); IDX4496 = 1 + IDX4496)
{

{
var object = LIST4497[IDX4496];
dojo.connect(lookup(object), event, function4912);
};
};
}
else
return dojo.connect(lookup(objects), event, function4912);;
};;

wui.disconnect = function (connection)
{
if (connection)
null;
else
throw(['wui.disconnect called with nil connection']);
dojo.disconnect(connection);
};;

wui.maybeInvokeDebugger = function ()
{
if (dojo.config.isDebug)
debugger;
};;

wui.map = function (fn, array)
{
var i = 0;
for (; !(i >= array.length); i = 1 + i)
{
array[i] = fn(array[i]);
};
return array;
};;

wui.mapChildNodes = function (node, visitor)
{

{
var children = [];
var child = node.firstChild;
while (child)
{
children.push(child);
child = child.nextSibling;
};

{
var LIST4499 = children;
var IDX4498 = 0;
for (; !(IDX4498 >= LIST4499.length); IDX4498 = 1 + IDX4498)
{

{
var child = LIST4499[IDX4498];
visitor(child);
};
};
};
return children;
};
};;

wui.shallowCopy = function (object)
{
return dojo.mixin({ }, object);
};;

wui.appendQueryParameter = function (url, name, value)
{
url = url + (url.indexOf('?') < 0 ? '?' : '&') + encodeURIComponent(name) + '=' + encodeURIComponent(value);
return url;
};;

wui.decorateUrlWithModifierKeys = function (url, event)
{
if (event.shiftKey)
url = wui.appendQueryParameter(url, '_sk', 't');
if (event.ctrlKey)
url = wui.appendQueryParameter(url, '_ck', 't');
if (event.altKey || event.metaKey)
url = wui.appendQueryParameter(url, '_ak', 't');
return url;
};;

wui.absoluteUrlFrom = function (url)
{
return url.indexOf(':') > 0 ? url : window.location.protocol + '//' + window.location.hostname + ':' + window.location.port + url;
};;

wui.communicationError = function (message)
{
this.type = 'wui.communication-error';
this.message = message;
};;

wui.informUserAboutJsError = function ()
{
wui.informUserAboutError('error.generic-javascript-error', {title: 'error.generic-javascript-error.title'});
};;

wui.informUserAboutError = function (message, _kArgs)
{if (!_kArgs) _kArgs = new Object;
 var title=_kArgs["title"];
if (title === undefined)
title = 'error.generic-javascript-error.title';
null;
dojo.require('dijit.Dialog');
message = wui.i18n.localize(message);
title = wui.i18n.localize(title);

{
var dialog = new dijit.Dialog({ title: title});
var reloadButton = new dijit.form.Button({ label: (wui.i18n.localize('action.reload-page'))});
var cancelButton = new dijit.form.Button({ label: (wui.i18n.localize('action.cancel'))});
(new dijit.layout.ContentPane({ content: message})).placeAt(dialog.containerNode);
reloadButton.placeAt(dialog.containerNode);
cancelButton.placeAt(dialog.containerNode);
wui.connect(reloadButton, 'onClick', function ()
{
window.location.reload();
});
wui.connect(cancelButton, 'onClick', function ()
{
dialog.hide();
dialog.destroyRecursive();
});
dialog.show();
};
};;
wui.io.syncAjaxActionInProgress = false;

wui.io.action = function (url, _kArgs)
{if (!_kArgs) _kArgs = new Object;
 var onSuccess=_kArgs["onSuccess"]; var onError=_kArgs["onError"]; var event=_kArgs["event"]; var ajax=_kArgs["ajax"]; var subjectDomNode=_kArgs["subjectDomNode"]; var sync=_kArgs["sync"]; var xhrSync=_kArgs["xhrSync"]; var sendClientState=_kArgs["sendClientState"];
if (ajax === undefined)
ajax = true;
if (sync === undefined)
sync = true;
if (xhrSync === undefined)
xhrSync = false;
if (sendClientState === undefined)
sendClientState = true;
if (event)
url = wui.decorateUrlWithModifierKeys(url, event);

{
var decoratedUrl = wui.appendQueryParameter(url, '_j', ajax ? 't' : '');
var form = document.forms[0];
wui.saveScrollPosition('content');
if (ajax)
{
var ajaxTarget = dojo.byId(subjectDomNode);
var ajaxIndicatorTeardown = null;
if (wui.io.syncAjaxActionInProgress)
{
window.console.warn('Ignoring a (wui.io.action :sync true :ajax true ...) call because there\'s already a pending sync action');
return;
}
null;
if (sync)
wui.io.syncAjaxActionInProgress = true;

var xhrFinished = function ()
{
if (ajaxIndicatorTeardown)
ajaxIndicatorTeardown();
if (sync)
wui.io.syncAjaxActionInProgress = false;
};
if (ajaxTarget)
ajaxIndicatorTeardown = wui.io.installAjaxProgressIndicator(ajaxTarget);
wui.io.xhrPost({url: decoratedUrl, sync: xhrSync, form: sendClientState ? form : undefined, onError: function (response, ioArgs)
{
xhrFinished();
wui.io.processAjaxNetworkError(response, ioArgs);
if (onError)
onError();
}, onSuccess: function (response, ioArgs)
{
xhrFinished();
wui.io.clearAjaxReplacementMarkers();
wui.io.processAjaxAnswer(response, ioArgs);
if (onSuccess)
onSuccess();
}});;
}
else
if (sendClientState && form && 0 < form.elements.length)
{
form.action = decoratedUrl;
form.submit();
}
else
window.location.href = decoratedUrl;
};
};;

wui.io.installAjaxProgressIndicator = function (targetNode)
{

{
var animation = null;
var progressNode = document.createElement('div');
dojo.style(progressNode, 'opacity', 0);
dojo.addClass(targetNode, 'ajax-target');
dojo.addClass(progressNode, 'ajax-request-in-progress');
dojo.contentBox(progressNode, dojo.contentBox(targetNode));
dojo.place(progressNode, targetNode, 'before');
null;
animation = (dojo.fx.combine([dojo.animateProperty({ node: targetNode,
duration: 1000,
rate: 50,
properties: { opacity: { start: 1,
end: 0.3}}}), dojo.animateProperty({ node: progressNode,
duration: 500,
rate: 50,
properties: { opacity: { start: 0.3,
end: 1}}})])).play();
return function ()
{
animation.stop();
dojo.destroy(progressNode);
dojo.removeClass(targetNode, 'ajax-target');
(wui.io.makeAjaxReplacementFadeIn(targetNode)).play();
};
};
};;

wui.io.makeAjaxReplacementFadeIn = function (node, startOpacity)
{
return dojo.animateProperty({ node: node,
duration: 500,
rate: 50,
properties: { opacity: { start: startOpacity || dojo.style(node, 'opacity'),
end: 1}}});
};;

wui.io.makeActionEventHandler = function (href, _kArgs)
{if (!_kArgs) _kArgs = new Object;
 var onSuccess=_kArgs["onSuccess"]; var onError=_kArgs["onError"]; var subjectDomNode=_kArgs["subjectDomNode"]; var ajax=_kArgs["ajax"]; var sendClientState=_kArgs["sendClientState"]; var sync=_kArgs["sync"]; var xhrSync=_kArgs["xhrSync"];
if (ajax === undefined)
ajax = true;
if (sendClientState === undefined)
sendClientState = true;
if (sync === undefined)
sync = true;
if (xhrSync === undefined)
xhrSync = false;
return function (event, connection)
{
null;
if (event)
null;
else
throw(['Assertion failed: event']);
if (connection)
null;
else
throw(['Assertion failed: connection']);
wui.io.action(href, {event: event, ajax: ajax, sync: sync, xhrSync: xhrSync, onError: onError ? function ()
{
onError(event, connection);
} : undefined, onSuccess: onSuccess ? function ()
{
onSuccess(event, connection);
} : undefined, subjectDomNode: subjectDomNode, sendClientState: sendClientState});
};
};;

wui.io.connectActionEventHandler = function (id, eventName, handler, _kArgs)
{if (!_kArgs) _kArgs = new Object;
 var oneShot=_kArgs["oneShot"]; var stopEvent=_kArgs["stopEvent"];
if (stopEvent === undefined)
stopEvent = true;

var connectOne = function (id)
{
if (dojo.byId(id))
{
var connection = null;
connection = wui.connect(id, eventName, function (event)
{
if (stopEvent)
{
null;
dojo.stopEvent(event);
}
if (oneShot)
{
null;
wui.disconnect(connection);
}
handler(event, connection);
});
return connection;
}
else
{
window.console.error('Node not found when trying to connect event handler. Id is ', id);
wui.maybeInvokeDebugger();
}
};
if (dojo.isArray(id))
{
var LIST4501 = id;
var IDX4500 = 0;
for (; !(IDX4500 >= LIST4501.length); IDX4500 = 1 + IDX4500)
{

{
var one = LIST4501[IDX4500];
connectOne(one);
};
};
}
else
return connectOne(id);;
};;

wui.io.connectActionEventHandlers = function (handlers)
{

var toBoolean = function (x, defaultValue)
{
if (x == 1)
return true;
else
if (x == 0)
return false;
else
if (defaultValue === undefined)
if (false)
null;
else
throw(['?! we are expecting either 1 or 0 instead of ', x]);
else
return defaultValue;
};
var connectOne = function (handler)
{

{
var id = handler.shift();
var href = handler.shift();
var subjectDomNode = handler.shift();
var oneShot = toBoolean(handler.shift(), false);
var eventName = handler.shift() || 'onclick';
var ajax = toBoolean(handler.shift(), true);
var stopEvent = toBoolean(handler.shift(), true);
var sendClientState = toBoolean(handler.shift(), true);
var sync = toBoolean(handler.shift(), true);
wui.io.connectActionEventHandler(id, eventName, wui.io.makeActionEventHandler(href, {subjectDomNode: subjectDomNode, ajax: ajax, sendClientState: sendClientState, sync: sync}), {oneShot: oneShot, stopEvent: stopEvent});
};
};

{
var LIST4504 = handlers;
var IDX4503 = 0;
for (; !(IDX4503 >= LIST4504.length); IDX4503 = 1 + IDX4503)
{

{
var EL4502 = LIST4504[IDX4503];
connectOne(EL4502);
};
};
};;
};;

wui.io.instantiateDojoWidgets = function (widgetIds)
{
null;

{
var LIST4506 = widgetIds;
var IDX4505 = 0;
for (; !(IDX4505 >= LIST4506.length); IDX4505 = 1 + IDX4505)
{

{
var widgetId = LIST4506[IDX4505];

{
var it = dijit.byId(widgetId);
if (it)
it.destroyRecursive();
};
};
};
};
dojo.parser.instantiate(wui.map(dojo.byId, widgetIds));
};;

wui.io.lazyContextMenuHandler = function (event, connection, href, id, parentId)
{
(wui.io.makeActionEventHandler(href, {ajax: true, subjectDomNode: parentId, sendClientState: false, sync: true, onSuccess: function (event, connection)
{

{
var it = dijit.byId(id);
if (it)
it._scheduleOpen(event.target, null, { x: event.pageX,
y: event.pageY});
else
window.console.error('Context menu was not found after processing the ajax answer (empty ajax answer?). The id we looked for is ', id);
};
}}))(event, connection);
};;

wui.io.postprocessInsertedNode = function (originalNode, importedNode)
{
};;

wui.io.evalScriptTag = function (node)
{

{
var type = node.getAttribute('type');
if (type == 'text/javascript')
{
var script = node.text;
if (dojo.string.isBlank(script))
null;
else
{
null;
eval(script);
}
}
else
throw('Script tag with unexpected type: \'' + type + '\'');
};
};;

wui.io.xhrPost = function (_kArgs)
{if (!_kArgs) _kArgs = new Object;
 var url=_kArgs["url"]; var form=_kArgs["form"]; var sync=_kArgs["sync"]; var onError=_kArgs["onError"]; var onSuccess=_kArgs["onSuccess"]; var handleAs=_kArgs["handleAs"];
if (sync === undefined)
sync = false;
if (onError === undefined)
onError = wui.io.processAjaxNetworkError;
if (onSuccess === undefined)
onSuccess = wui.io.processAjaxAnswer;
if (handleAs === undefined)
handleAs = 'xml';
if (url)
url = wui.absoluteUrlFrom(url);

{
var params = { url: url,
form: form,
sync: sync,
handleAs: handleAs,
error: onError,
load: onSuccess};
return dojo.xhrPost(params);
};
};;

wui.io.processAjaxNetworkError = function (response, ioArgs)
{
window.console.error('wui.io.process-ajax-network-error called with response ', response, ', ioArgs ', ioArgs);

{
var networkError_ = ioArgs.error;
if (networkError_)
wui.informUserAboutError('error.network-error', {title: 'error.network-error.title'});
else
if (!dojo.config.isDebug)
wui.informUserAboutError('error.generic-javascript-error', {title: 'error.generic-javascript-error.title'});
};
};;

wui.io.importAjaxReceivedXhtmlNode = function (node)
{
null;
if (dojo.isMozilla)
return node;
else
if (dojo.isChrome || dojo.isOpera || dojo.isSafari)
return document.importNode(node, true);
else
if (dojo.isIE)
{
var result = null;
var copyAttributes = function (from, to)
{

{
var LIST4508 = from.attributes;
var IDX4507 = 0;
for (; !(IDX4507 >= LIST4508.length); IDX4507 = 1 + IDX4507)
{

{
var attribute = LIST4508[IDX4507];

{
var value = attribute.nodeValue;
to[attribute.nodeName] = value;
};
};
};
};
};
if (node.tagName == 'script')
{
result = document.createElement('script');
copyAttributes(node, result);
result.text = node.text;
}
else
if (node.tagName == 'tr')
{
result = document.createElement('tr');
copyAttributes(node, result);

{
var LIST4510 = node.childNodes;
var IDX4509 = 0;
for (; !(IDX4509 >= LIST4510.length); IDX4509 = 1 + IDX4509)
{

{
var td = LIST4510[IDX4509];
if (td.tagName == 'td')
{
var body = td.xml;
var start = 1 + body.indexOf('>');
var end = body.length - 5;
var importedTd = document.createElement('td');
body = body.substring(start, end);
importedTd.innerHTML = body;
copyAttributes(td, importedTd);
result.appendChild(importedTd);
}
else
result.appendChild(wui.io.importAjaxReceivedXhtmlNode(td));
};
};
};
}
else
{
result = document.createElement('div');
null;
result.innerHTML = node.xml;
null;
if (1 == result.childNodes.length)
null;
else
throw(['Assertion failed: (= 1 result.childNodes.length)']);
result = result.firstChild;
}
null;
return result;
}
window.console.warn('Unknown browser in import-ajax-received-xhtml-node, this will probably cause some troubles later. Browser is ', navigator.userAgent);
return document.importNode(node, true);
};;

wui.io.makeDomNodeWalker = function (tagName, visitor, importNodeP, toplevelP)
{
if (importNodeP === undefined)
importNodeP = true;
if (toplevelP === undefined)
toplevelP = false;
return function (root)
{
wui.mapChildNodes(root, function (toplevelNode)
{
null;
if (toplevelNode.tagName == tagName)
if (toplevelP)
{
var node = toplevelNode;
var originalNode = node;
var id = node.getAttribute('id');
null;
if (importNodeP)
node = wui.io.importAjaxReceivedXhtmlNode(node);
visitor(node, originalNode);
}
else
{
null;
wui.mapChildNodes(toplevelNode, function (node)
{
if (dojo.isIE ? node.getAttribute('id') : node.getAttribute)
{
var originalNode = node;
var id = node.getAttribute('id');
null;
if (importNodeP)
node = wui.io.importAjaxReceivedXhtmlNode(node);
visitor(node, originalNode);
}
});
}
});
};
};;

wui.io.makeAjaxAnswerProcessor = function (tagName, visitor, importNodeP, toplevelP)
{
if (importNodeP === undefined)
importNodeP = true;
if (toplevelP === undefined)
toplevelP = false;

{
var nodeWalker = wui.io.makeDomNodeWalker(tagName, function (node, originalNode)
{
if (visitor(node, originalNode))
{
null;
wui.io.postprocessInsertedNode(originalNode, node);
}
}, importNodeP, toplevelP);
return function (response, args)
{
null;

{
null;
response = (response.getElementsByTagName('ajax-response'))[0];
if (response)
null;
else
{
window.console.warn('AJAX ajax-response node is nil, probably a malformed response, maybe a full page load due to an unregistered action id?');
throw(new wui.communicationError('AJAX answer is empty'));
}
null;

{
var RESULTNODE2 = (response.getElementsByTagName('result'))[0];
if (!RESULTNODE2 || !(dojo.string.trim(dojox.xml.parser.textContent(RESULTNODE2)) == 'success'))
{
var errorMessage = wui.i18n.localize('unknown-server-error');

{
var errorNode = (response.getElementsByTagName('error-message'))[0];
if (errorNode)
errorMessage = dojox.xml.parser.textContent(errorNode);
};
if (errorMessage)
alert(errorMessage);
}
else
nodeWalker(response);
};
};
};
};
};;
wui.io.markedAjaxReplacements = [];

wui.io.markAjaxReplacement = function (node)
{
if (dojo.config.isDebug)
{
dojo.addClass(node, 'ajax-replacement');
wui.io.markedAjaxReplacements.push(node);
}
};;

wui.io.clearAjaxReplacementMarkers = function ()
{
if (dojo.config.isDebug)
{

{
var LIST4512 = wui.io.markedAjaxReplacements;
var IDX4511 = 0;
for (; !(IDX4511 >= LIST4512.length); IDX4511 = 1 + IDX4511)
{

{
var node = LIST4512[IDX4511];
dojo.removeClass(node, 'ajax-replacement');
};
};
};
wui.io.markedAjaxReplacements = [];
}
};;

{
var domReplacer = wui.io.makeAjaxAnswerProcessor('dom-replacements', function (replacementNode)
{

{
var id = replacementNode.getAttribute('id');
var oldNode = dojo.byId(id);
if (oldNode)
{
var parentNode = oldNode.parentNode;
var oldOpacity = Math.min(dojo.style(oldNode, 'opacity'), 0.5);
null;
if (dojo.hasClass(replacementNode, 'context-menu'))
oldOpacity = 1;
dojo.style(replacementNode, 'opacity', oldOpacity);
parentNode.replaceChild(replacementNode, oldNode);
wui.io.markAjaxReplacement(replacementNode);
null;

{
var animation = wui.io.makeAjaxReplacementFadeIn(replacementNode, oldOpacity);
wui.connect(animation, 'onEnd', function ()
{
if (replacementNode === dojo.byId(id))
null;
else
{
window.console.warn('Setting opacity to 1 of orphaned replacement-node with id ', id);
dojo.style(dojo.byId(id), 'opacity', 1);
}
});
animation.play();
};
null;
}
else
{
window.console.error('Old version of replacement node ', replacementNode, ' with id \'', id, '\' was not found on the client side');
wui.maybeInvokeDebugger();
}
};
});
wui.io.processAjaxAnswer = function (response, args)
{
null;
null;
domReplacer(response, args);
null;

{
var scriptEvaluator = wui.io.makeAjaxAnswerProcessor('script', function (scriptNode)
{

{
var script = dojox.xml.parser.textContent(scriptNode);
null;
(function (_script, currentAjaxAnswer)
{
eval(_script);
})(script, response);
null;
};
}, false, true);
null;
scriptEvaluator(response, args);
null;
};
};
};

wui.reloadCss = function ()
{

{
var LIST4514 = document.getElementsByTagName('link');
var IDX4513 = 0;
for (; !(IDX4513 >= LIST4514.length); IDX4513 = 1 + IDX4513)
{

{
var link = LIST4514[IDX4513];
if ((link.rel.toLowerCase()).indexOf('stylesheet') >= 0 && link.href)
{
var href = link.href.replace(/(&|\?)forceReload=\d+/, '');
link.href = wui.appendQueryParameter(href, 'forceReload', (new Date()).valueOf());
}
};
};
};
};;

wui.resetScrollPosition = function (content)
{
content = dojo.byId(content);
if (content)
{
var form = document.forms[0];
var sx = form['_sx'];
var sy = form['_sy'];
null;
content.scrollLeft = sx.value;
content.scrollTop = sy.value;
}
};;

wui.saveScrollPosition = function (content)
{
content = dojo.byId(content);
if (content)
{
var form = document.forms[0];
var sx = form['_sx'];
var sy = form['_sy'];
null;
sx.value = content.scrollLeft;
sy.value = content.scrollTop;
}
};;

wui.highlightMouseEnterHandler = function (event, element)
{
element = dojo.byId(element);
dojo.addClass(element, 'highlighted');

{
var parent = element.parentNode;
while (!(parent == document))
{
dojo.removeClass(parent, 'highlighted');
parent = parent.parentNode;
};
};
dojo.stopEvent(event);
};;

wui.highlightMouseLeaveHandler = function (event, element)
{
element = dojo.byId(element);
dojo.removeClass(element, 'highlighted');
};;

wui.field.setupSimpleCheckbox = function (checkboxId, checkedTooltip, uncheckedTooltip)
{

{
var checkbox = dojo.byId(checkboxId);
var hidden = dojo.byId(checkboxId + '_hidden');
null;
wui.connect(checkbox, 'onchange', function (event)
{

{
var enabled = checkbox.checked;
null;
hidden.value = (enabled ? 'true' : 'false');
checkbox.title = (enabled ? checkedTooltip : uncheckedTooltip);
};
});
checkbox.wuiSetChecked = function (enabled)
{
if (checkbox.checked == enabled)
return false;
else
{
checkbox.checked = enabled;
checkbox.onchange();
return true;
}
};
checkbox.wuiIsChecked = function ()
{
return checkbox.checked;
};
};
};;

wui.field.setupCustomCheckbox = function (linkId, checkedImage, uncheckedImage, checkedTooltip, uncheckedTooltip, checkedClass, uncheckedClass)
{

{
var link = dojo.byId(linkId);
var hidden = dojo.byId(linkId + '_hidden');
null;

{
var image = (link.getElementsByTagName('img'))[0];
var enabled = !(hidden.value == 'false');
if (checkedImage && uncheckedImage)
image.src = (enabled ? checkedImage : uncheckedImage);
link.className = (enabled ? checkedClass : uncheckedClass);
link.title = (enabled ? checkedTooltip : uncheckedTooltip);
};
link.wuiSetChecked = function (enabled)
{
hidden.value = (enabled ? 'true' : 'false');
if (checkedImage && uncheckedImage)
image.src = (enabled ? checkedImage : uncheckedImage);
link.className = (enabled ? checkedClass : uncheckedClass);
link.title = (enabled ? checkedTooltip : uncheckedTooltip);
};
link.wuiIsChecked = function ()
{
return !(hidden.value == 'false');
};
link.name = hidden.name;
link.onclick = function (event)
{
link.wuiSetChecked(!link.wuiIsChecked());
};
};
};;

wui.field.updatePopupMenuSelectField = function (node, field, value, class4125)
{
node = dojo.byId(node);
field = dojo.byId(field);
if (class4125)
node.className = class4125;
else
node.innerHTML = value;
field.value = value;
};;

wui.field.updateUseInFilter = function (field, value)
{
field = dojo.byId(field);
field.wuiSetChecked(value);
};;

wui.field._setupFilterField = function (widgetId, useInFilterId)
{
dojo.addOnLoad(function ()
{

{
var widget = dijit.byId(widgetId);
var listener = function ()
{
wui.field.updateUseInFilter(useInFilterId, '' != this.getValue());
};
if (widget)
null;
else
throw(['Assertion failed: widget']);
widget.connect(widget, 'onKeyUp', listener);
widget.connect(widget, 'onChange', listener);
};
});
};;

wui.field.setupStringFilter = function (widgetId, useInFilterId)
{
wui.field._setupFilterField(widgetId, useInFilterId);
};;

wui.field.setupNumberFilter = function (widgetId, useInFilterId)
{
wui.field._setupFilterField(widgetId, useInFilterId);
};;

wui.createGenericFunction = function (name)
{

{
var genericFunction = { };
genericFunction.name = name;
return genericFunction;
};
};;

wui.registerGenericFunctionMethod = function (genericFunction, dispatchType, fn)
{
genericFunction[dispatchType] = fn;
};;

wui.applyGenericFunction = function (genericFunction, dispatchType, args)
{

{
var classPrecedenceList = wui.componentClassPrecedenceLists[dispatchType];
if (classPrecedenceList)
null;
else
throw(['Assertion failed: class-precedence-list']);

{
var LIST4516 = classPrecedenceList;
var IDX4515 = 0;
for (; !(IDX4515 >= LIST4516.length); IDX4515 = 1 + IDX4515)
{

{
var class4125 = LIST4516[IDX4515];

{
var fn = genericFunction[class4125];
if (fn)
return fn.apply(undefined, args);
};
};
};
};
};
};;
wui.setupComponentGenericFunction = wui.createGenericFunction();

wui.registerComponentSetup = function (type, fn)
{
wui.registerGenericFunctionMethod(wui.setupComponentGenericFunction, type, fn);
};;

wui.setupComponent = function (id, type, args)
{
wui.applyGenericFunction(wui.setupComponentGenericFunction, type, [id, args]);
};;
wui.i18n.resources = { };

wui.i18n.localize = function (name)
{

{
var value = wui.i18n.resources[name];
if (value)
null;
else
{
window.console.warn('Resource not found for key \'', name, '\'');
value = name;
}
return value;
};
};;

wui.i18n.processResources = function (resources)
{
null;
var idx = 0;
for (; !(idx >= resources.length); idx = idx + 2)
{

{
var name = resources[idx];
var value = resources[(1 + idx)];
wui.i18n.resources[name] = value;
};
};
};;
wui.help.popupTimeout = 400;
wui.help.timer = null;

wui.help.decorateUrl = function (url, id)
{
if (id == '' || id == undefined)
return url;
else
return wui.appendQueryParameter(url, '_hlp', id);
};;

wui.help.makeMouseoverHandler = function (url)
{
return function (event)
{
clearTimeout(wui.help.timer);
wui.help.timer = setTimeout(function ()
{

{
var decoratedUrl = url;
var node = event.target;
var help = wui.help.tooltip;
while (!(node == document))
{
decoratedUrl = wui.help.decorateUrl(decoratedUrl, node.id);
node = node.parentNode;
};
if (help == null || help.hasLoaded && !(help.href == decoratedUrl))
{
wui.help.teardown();
help = new dojox.widget.DynamicTooltip({ connectId: [event.target],
position: ['below', 'right'],
href: decoratedUrl});
wui.help.tooltip = help;
help.open(event.target);
}
};
}, wui.help.popupTimeout);
dojo.stopEvent(event);
};
};;

wui.help.setup = function (event, url)
{

{
var handles = [];
var aborter = function (event)
{
dojo.style(document.body, 'cursor', 'default');

{
var LIST4519 = handles;
var IDX4518 = 0;
for (; !(IDX4518 >= LIST4519.length); IDX4518 = 1 + IDX4518)
{

{
var EL4517 = LIST4519[IDX4518];
dojo.disconnect(EL4517);
};
};
};
wui.help.teardown();
dojo.stopEvent(event);
};
handles.push(wui.connect(document, 'mouseover', wui.help.makeMouseoverHandler(url)));
handles.push(wui.connect(document, 'click', aborter));
handles.push(wui.connect(document, 'keypress', function (event)
{
if (event.charOrCode == dojo.keys.ESCAPE)
aborter(event);
}));
dojo.style(document.body, 'cursor', 'help');
dojo.stopEvent(event);
};
};;

wui.help.teardown = function ()
{
if (wui.help.tooltip)
{
wui.help.tooltip.destroy();
wui.help.tooltip = null;
if (wui.help.timer)
{
clearTimeout(wui.help.timer);
wui.help.timer = null;
}
}
};;

wui.attachBorder = function (element, styleClass, elementName)
{
element = dojo.byId(element);
if (element)
{
var parentElement = element.parentNode;
var nextSibling = element.nextSibling;
var tableElement = document.createElement('table');
if (!styleClass || !elementName || !(elementName == true) && !(elementName == element.tagName))
return element;
if (dojo.isArray(styleClass))
{
var LIST4521 = styleClass;
var IDX4520 = 0;
for (; !(IDX4520 >= LIST4521.length); IDX4520 = 1 + IDX4520)
{

{
var oneClass = LIST4521[IDX4520];
dojo.addClass(tableElement, oneClass);
};
};
}
else
dojo.addClass(tableElement, styleClass);

{
tableElement.id = element.id;
element.id = '';
};

var createDummyDiv = function ()
{

{
var result = document.createElement('div');
dojo.addClass(result, 'decoration');
return result;
};
};
var createRow = function (rowKind)
{

{
var rowKindElement = document.createElement('t' + rowKind);
var rowElement = document.createElement('tr');
var leftCellElement = document.createElement('td');
var cellElement = document.createElement('td');
var rightCellElement = document.createElement('td');
dojo.addClass(leftCellElement, 'border-left');
dojo.addClass(cellElement, 'border-center');
dojo.addClass(rightCellElement, 'border-right');
if (rowKind == 'head')
{
dojo.place(createDummyDiv(), leftCellElement, 'only');
dojo.place(createDummyDiv(), rightCellElement, 'only');
}
if (rowKind == 'body')
{
dojo.place(createDummyDiv(), leftCellElement, 'only');
dojo.place(createDummyDiv(), rightCellElement, 'only');
}
dojo.place(rowKindElement, tableElement);
dojo.place(rowElement, rowKindElement);
dojo.place(leftCellElement, rowElement);
dojo.place(cellElement, rowElement);
dojo.place(rightCellElement, rowElement);
return cellElement;
};
};
createRow('head');

{
var cellElement = createRow('body');
createRow('foot');
dojo.place(element, cellElement);
if (nextSibling)
dojo.place(tableElement, nextSibling, 'before');
else
dojo.place(tableElement, parentElement);
};;
}
else
window.console.warn('Cannot attach border to element');
};;
null;
};
