diff --git a/resources/webkit-transitions.css b/resources/webkit-transitions.css index 15b0f10d35..0b1df1ee5c 100644 --- a/resources/webkit-transitions.css +++ b/resources/webkit-transitions.css @@ -108,7 +108,7 @@ @-webkit-keyframes slideinfromtop { - from { -webkit-transform: translate3d(0,-100%,); } + from { -webkit-transform: translate3d(0,-100%,0); } to { -webkit-transform: translate3d(0,0,0); } } diff --git a/src/Wt/Http/Request b/src/Wt/Http/Request index d770774f06..35b03335f5 100644 --- a/src/Wt/Http/Request +++ b/src/Wt/Http/Request @@ -13,6 +13,7 @@ #include #include #include +#include #include @@ -388,7 +389,7 @@ public: * \note Use headerValue() if you need to know the value of certain known headers. * This method is not written to be efficient, but can be useful for debugging. */ - HeaderMap headers() const; + std::vector headers() const; #endif /*! \brief Returns the request method. diff --git a/src/Wt/Http/Request.C b/src/Wt/Http/Request.C index 8c07cd37dd..83d79e9f5e 100644 --- a/src/Wt/Http/Request.C +++ b/src/Wt/Http/Request.C @@ -15,6 +15,7 @@ #include "Wt/WSslInfo" #include "WebUtils.h" #include "WebRequest.h" +#include "Message" #include #include @@ -171,7 +172,7 @@ std::string Request::headerValue(const std::string& field) const } #ifndef WT_TARGET_JAVA -HeaderMap Request::headers() const +std::vector Request::headers() const { return request_->headers(); } diff --git a/src/Wt/WAbstractProxyModel.C b/src/Wt/WAbstractProxyModel.C index adc1a18dea..8974cf82dc 100644 --- a/src/Wt/WAbstractProxyModel.C +++ b/src/Wt/WAbstractProxyModel.C @@ -125,6 +125,9 @@ void WAbstractProxyModel::shiftModelIndexes(const WModelIndex& sourceParent, /* * We must shift all indexes within sourceParent >= start with count * and delete items when count < 0. + * + * If count > 0 : rows inserted, after insertion + * If count < 0 : rows to be removed, before removal */ std::vector shifted; std::vector erased; @@ -159,14 +162,19 @@ void WAbstractProxyModel::shiftModelIndexes(const WModelIndex& sourceParent, break; if (p == sourceParent) { - shifted.push_back(it->second); + if (count < 0 && + i.row() >= start && + i.row() < start + (-count)) + erased.push_back(it->second); + else + shifted.push_back(it->second); } else if (count < 0) { // delete indexes that are about to be deleted, if they are within // the range of deleted indexes do { if (p.parent() == sourceParent && p.row() >= start - && p.row() < start - count) { + && p.row() < start + (-count)) { erased.push_back(it->second); break; } else @@ -188,6 +196,7 @@ void WAbstractProxyModel::shiftModelIndexes(const WModelIndex& sourceParent, for (unsigned i = 0; i < shifted.size(); ++i) { BaseItem *item = shifted[i]; items.erase(item->sourceIndex_); + if (item->sourceIndex_.row() + count >= start) { item->sourceIndex_ = sourceModel()->index (item->sourceIndex_.row() + count, diff --git a/src/Wt/WBatchEditProxyModel.C b/src/Wt/WBatchEditProxyModel.C index d861a6225d..a3839381a2 100644 --- a/src/Wt/WBatchEditProxyModel.C +++ b/src/Wt/WBatchEditProxyModel.C @@ -549,6 +549,8 @@ void WBatchEditProxyModel::sourceRowsAboutToBeRemoved item->removedRows_.erase(item->removedRows_.begin() + remi); } } + + shiftModelIndexes(parent, start, -(end - start + 1), mappedIndexes_); } void WBatchEditProxyModel::deleteItemsUnder(Item *item, int row) @@ -570,8 +572,6 @@ void WBatchEditProxyModel::sourceRowsRemoved(const WModelIndex& parent, { if (isRemoved(parent)) return; - - shiftModelIndexes(parent, start, -(end - start + 1), mappedIndexes_); } void WBatchEditProxyModel::sourceRowsAboutToBeInserted diff --git a/src/Wt/WModelIndex b/src/Wt/WModelIndex index 53020d9633..d10dd91dbf 100644 --- a/src/Wt/WModelIndex +++ b/src/Wt/WModelIndex @@ -25,6 +25,8 @@ class WModelIndex; } #ifndef WT_TARGET_JAVA + /*! \brief A set of WModelIndexes + */ typedef std::set WModelIndexSet; extern std::size_t hash_value(const Wt::WModelIndex& index); diff --git a/src/Wt/WSortFilterProxyModel.C b/src/Wt/WSortFilterProxyModel.C index abd2cd0627..45760eda36 100644 --- a/src/Wt/WSortFilterProxyModel.C +++ b/src/Wt/WSortFilterProxyModel.C @@ -530,6 +530,9 @@ void WSortFilterProxyModel::sourceRowsAboutToBeRemoved endRemoveRows(); } } + + int count = end - start + 1; + shiftModelIndexes(parent, start, -count, mappedIndexes_); } void WSortFilterProxyModel::sourceRowsRemoved(const WModelIndex& parent, @@ -537,8 +540,6 @@ void WSortFilterProxyModel::sourceRowsRemoved(const WModelIndex& parent, { int count = end - start + 1; - shiftModelIndexes(parent, start, -count, mappedIndexes_); - WModelIndex pparent = mapFromSource(parent); // distinguish between invalid parent being root item or being filtered out if (parent.isValid() && !pparent.isValid()) diff --git a/src/Wt/WStackedWidget b/src/Wt/WStackedWidget index 4b7da56240..f537023134 100644 --- a/src/Wt/WStackedWidget +++ b/src/Wt/WStackedWidget @@ -101,6 +101,16 @@ public: * WAnimation::SlideInFromRight, WAnimation::SlideInFromUp or * WAnimation::SlideInFromDown transition effects. * + * \note If you intend to use a transition animation with a WStackedWidget + * you should set it before it is first rendered. Otherwise, transition + * animations caused by setCurrentIndex() may not be correctly performed. + * If you do want to force this change you can use WApplication::processEvents + * before calling setCurrentIndex(). + * + * \note It is also not supported to use a WAnimation::Pop animation on a WStackedWidget. + * + * + * * \sa setCurrentIndex() */ void setTransitionAnimation(const WAnimation& animation, diff --git a/src/Wt/WTreeView.C b/src/Wt/WTreeView.C index 7544917a3a..ad36b28525 100644 --- a/src/Wt/WTreeView.C +++ b/src/Wt/WTreeView.C @@ -2217,7 +2217,7 @@ void WTreeView::modelRowsRemoved(const WModelIndex& parent, // at the back. This is not affected by widgetForModelRow() returning // accurate information of rows just deleted and indexes not yet // shifted - if (end == model()->rowCount(parent) - 1 && start >= 1) { + if (end >= model()->rowCount(parent) && start >= 1) { WTreeViewNode *n = dynamic_cast (parentNode->widgetForModelRow(start - 1)); diff --git a/src/fcgi/FCGIStream.C b/src/fcgi/FCGIStream.C index 5b9ed2de25..fa4aef1fbc 100644 --- a/src/fcgi/FCGIStream.C +++ b/src/fcgi/FCGIStream.C @@ -133,8 +133,8 @@ namespace { return envValue(cgiEnvName(name).c_str()); } - Http::HeaderMap headers() const { - Http::HeaderMap headerMap; + std::vector headers() const { + std::vector headerVector; std::string header_prefix("HTTP_"); int prefix_length = header_prefix.length(); @@ -143,19 +143,18 @@ namespace { if (env_string.compare(0,prefix_length, header_prefix) == 0){ std::string name = env_string.substr(prefix_length, env_string.find("=") - prefix_length); std::string value = env_string.substr(env_string.find("=") + 1); - headerMap.insert(std::pair(name,value)); - } - const char *contentLength = envValue("CONTENT_LENGTH"); - if (contentLength) { - headerMap.insert(std::pair("CONTENT_LENGTH", contentLength)); - } - const char *contentType = envValue("CONTENT_TYPE"); - if (contentType){ - headerMap.insert(std::pair("CONTENT_TYPE",contentType)); - } + headerVector.push_back(Wt::Http::Message::Header(name, value)); + } } - - return headerMap; + const char *contentLength = envValue("CONTENT_LENGTH"); + if (contentLength) { + headerVector.push_back(Wt::Http::Message::Header("CONTENT_LENGTH", contentLength)); + } + const char *contentType = envValue("CONTENT_TYPE"); + if (contentType){ + headerVector.push_back(Wt::Http::Message::Header("CONTENT_TYPE", contentType)); + } + return headerVector; } diff --git a/src/http/HTTPRequest.C b/src/http/HTTPRequest.C index c70b4ae8c6..82c2646fbe 100644 --- a/src/http/HTTPRequest.C +++ b/src/http/HTTPRequest.C @@ -9,6 +9,7 @@ #include "HTTPRequest.h" #include "Configuration.h" #include "WtReply.h" +#include "Wt/Http/Message" namespace http { namespace server { @@ -101,20 +102,22 @@ const char *HTTPRequest::headerValue(const char *name) const return 0; } -Wt::Http::HeaderMap HTTPRequest::headers() const +std::vector HTTPRequest::headers() const { - Wt::Http::HeaderMap headerMap; + std::vector headerVector; WtReplyPtr p = reply_; if (!p.get()) - return headerMap; + return headerVector; - std::list headers = p->request().headers; + const std::list &headers = p->request().headers; for (std::list::const_iterator it=headers.begin(); it != headers.end(); ++it){ - headerMap.insert(std::pair(cstr(it->name),cstr(it->value))); + if (cstr(it->name)) { + headerVector.push_back(Wt::Http::Message::Header(it->name.str(), it->value.str())); + } } - return headerMap; + return headerVector; } const char *HTTPRequest::cstr(const buffer_string& bs) const { diff --git a/src/http/HTTPRequest.h b/src/http/HTTPRequest.h index 000cc718c0..877b385585 100644 --- a/src/http/HTTPRequest.h +++ b/src/http/HTTPRequest.h @@ -11,6 +11,7 @@ #include "WebRequest.h" #include "WtReply.h" +#include "Wt/Http/Message" namespace http { namespace server { @@ -43,7 +44,7 @@ class HTTPRequest : public Wt::WebRequest virtual const char *envValue(const char *name) const; virtual const char *headerValue(const char *name) const; - virtual Wt::Http::HeaderMap headers() const; + virtual std::vector headers() const; virtual const std::string& serverName() const; virtual const std::string& serverPort() const; virtual const std::string& scriptName() const; diff --git a/src/isapi/IsapiRequest.C b/src/isapi/IsapiRequest.C index 7cabd6c037..d1076abcb8 100644 --- a/src/isapi/IsapiRequest.C +++ b/src/isapi/IsapiRequest.C @@ -467,12 +467,12 @@ const char *IsapiRequest::headerValue(const char *name) const return retval ? retval->c_str() : 0; } -Wt::Http::HeaderMap IsapiRequest::headers() const +std::vector IsapiRequest::headers() const { - Wt::Http::HeaderMap headerMap; + std::vector headerVec; std::string *pAllRaw = persistentEnvValue("ALL_RAW"); if (!pAllRaw) - return headerMap; + return headerVec; std::string all_raw = *pAllRaw; std::size_t headerStart = 0; @@ -481,13 +481,13 @@ Wt::Http::HeaderMap IsapiRequest::headers() const std::size_t colonPos = all_raw.find(':', headerStart); std::string name = all_raw.substr(headerStart, colonPos - headerStart); std::string value = all_raw.substr(colonPos + 2, headerEnd - (colonPos + 2)); - headerMap[name] = value; + headerVec.push_back(Wt::Http::Message::Header(name, value)); headerStart = headerEnd + 2; headerEnd = all_raw.find("\r\n", headerEnd + 2); } - return headerMap; + return headerVec; } std::string *IsapiRequest::persistentEnvValue(const char *hdr) const diff --git a/src/isapi/IsapiRequest.h b/src/isapi/IsapiRequest.h index cd1a1471f7..1dc64d5429 100644 --- a/src/isapi/IsapiRequest.h +++ b/src/isapi/IsapiRequest.h @@ -47,7 +47,7 @@ class IsapiRequest : public WebRequest virtual const char *headerValue(const char *name) const; - virtual Wt::Http::HeaderMap headers() const; + virtual std::vector headers() const; virtual const char *envValue(const char *name) const; diff --git a/src/js/WStackedWidget.js b/src/js/WStackedWidget.js index f7c5a4d6a5..3a6a31b733 100644 --- a/src/js/WStackedWidget.js +++ b/src/js/WStackedWidget.js @@ -226,8 +226,14 @@ WT_DECLARE_WT_MEMBER to.style.left = ''; to.style.width = ''; to.style.top = ''; - to.style.height = to.nativeHeight; + + /* If fade-only animation within a layout, retain set height */ + if (!effects + || typeof jQuery.data(stack.parentNode, 'layout') === 'undefined') + to.style.height = to.nativeHeight; + to.nativeHeight = null; + if (WT.isGecko && (effects & Fade)) to.style.opacity = '1'; to.style[WT.styleAttribute('animation-duration')] = ''; diff --git a/src/js/WStackedWidget.min.js b/src/js/WStackedWidget.min.js index cde08bde51..d786eead9f 100644 --- a/src/js/WStackedWidget.min.js +++ b/src/js/WStackedWidget.min.js @@ -2,8 +2,9 @@ WT_DECLARE_WT_MEMBER(1,JavaScriptConstructor,"WStackedWidget",function(D,h){func f-=e.px(c,"borderTopWidth");f-=e.px(c,"borderBottomWidth");f-=e.px(c,"paddingTop");f-=e.px(c,"paddingBottom");a-=e.px(c,"marginLeft");a-=e.px(c,"marginRight");a-=e.px(c,"borderLeftWidth");a-=e.px(c,"borderRightWidth");a-=e.px(c,"paddingLeft");a-=e.px(c,"paddingRight")}var m,C,g;m=0;for(C=c.childNodes.length;m0){if(g.offsetTop>0){var u=e.css(g,"overflow");if(u==="visible"||u==="")g.style.overflow="auto"}if(g.wtResize)g.wtResize(g, a,r,d);else{r=r+"px";if(g.style.height!=r){g.style.height=r;g.lh=d}}}}else if(g.wtResize)g.wtResize(g,a,-1,d);else{g.style.height="";g.lh=false}}};this.wtGetPs=function(c,a,f,d){return d};this.adjustScroll=function(c){var a,f,d,p=h.scrollLeft,q=h.scrollTop;a=0;for(f=h.childNodes.length;a we assume last AJAX request got * delivered ? */ + LOG_DEBUG("ackUpdate: expecting " << expectedAckId_ << ", received " << updateId); if (updateId == expectedAckId_) { LOG_DEBUG("jsSynced(false) after ackUpdate okay"); setJSSynced(false); @@ -730,8 +731,12 @@ void WebRenderer::addResponseAckPuzzle(WStringStream& out) * client-side: only when libraries have been loaded, the application can * continue. TO BE DONE. */ + + ++expectedAckId_; + LOG_DEBUG("addResponseAckPuzzle: incremented expectedAckId to " << expectedAckId_); + out << session_.app()->javaScriptClass() - << "._p_.response(" << ++expectedAckId_; + << "._p_.response(" << expectedAckId_; if (!puzzle.empty()) out << "," << puzzle; out << ");"; diff --git a/src/web/WebRequest.h b/src/web/WebRequest.h index ffda74d3fd..42c5e66dd0 100644 --- a/src/web/WebRequest.h +++ b/src/web/WebRequest.h @@ -162,7 +162,7 @@ class WT_API WebRequest const char *referer() const; #ifndef WT_TARGET_JAVA - virtual Http::HeaderMap headers() const = 0; + virtual std::vector headers() const = 0; #endif virtual const char *contentType() const; diff --git a/src/web/WebSocketMessage.C b/src/web/WebSocketMessage.C index c6d5891950..c84d80bbff 100644 --- a/src/web/WebSocketMessage.C +++ b/src/web/WebSocketMessage.C @@ -154,7 +154,7 @@ const char *WebSocketMessage::headerValue(const char *name) const return webSocket()->headerValue(name); } -Http::HeaderMap WebSocketMessage::headers() const +std::vector WebSocketMessage::headers() const { return webSocket()->headers(); } diff --git a/src/web/WebSocketMessage.h b/src/web/WebSocketMessage.h index e62eb94687..6293406cfe 100644 --- a/src/web/WebSocketMessage.h +++ b/src/web/WebSocketMessage.h @@ -52,7 +52,7 @@ class WT_API WebSocketMessage : public WebRequest virtual const char * headerValue(const char *name) const; #ifndef WT_TARGET_JAVA - virtual Http::HeaderMap headers() const; + virtual std::vector headers() const; #endif virtual bool isWebSocketMessage() const { return true; } diff --git a/src/web/skeleton/Wt.js b/src/web/skeleton/Wt.js index bffc517c08..56b2a15b8b 100644 --- a/src/web/skeleton/Wt.js +++ b/src/web/skeleton/Wt.js @@ -3389,7 +3389,11 @@ function sendUpdate() { data.result += '&ackPuzzle=' + encodeURIComponent(solution); } - var params = "_$_PARAMS_$_"; + function getParams() { + // Prevent minifier from optimizing away the length check. + return "_$_PARAMS_$_"; + } + var params = getParams(); if (params.length > 0) data.result += '&Wt-params=' + encodeURIComponent(params); diff --git a/src/web/skeleton/Wt.min.js b/src/web/skeleton/Wt.min.js index b88ff0ef7f..f10dc87476 100644 --- a/src/web/skeleton/Wt.min.js +++ b/src/web/skeleton/Wt.min.js @@ -16,95 +16,95 @@ */ _$_$if_DYNAMIC_JS_$_();window.JavaScriptFunction=1;window.JavaScriptConstructor=2;window.JavaScriptObject=3;window.JavaScriptPrototype=4;window.WT_DECLARE_WT_MEMBER=function(P,Q,I,S){if(Q==JavaScriptPrototype){P=I.indexOf(".prototype");_$_WT_CLASS_$_[I.substr(0,P)].prototype[I.substr(P+11)]=S}else _$_WT_CLASS_$_[I]=Q==JavaScriptFunction?function(){return S.apply(_$_WT_CLASS_$_,arguments)}:S}; window.WT_DECLARE_APP_MEMBER=function(P,Q,I,S){var Z=window.currentApp;if(Q==JavaScriptPrototype){P=I.indexOf(".prototype");Z[I.substr(0,P)].prototype[I.substr(P+11)]=S}else Z[I]=Q==JavaScriptFunction?function(){return S.apply(Z,arguments)}:S};_$_$endif_$_(); -if(!window._$_WT_CLASS_$_)window._$_WT_CLASS_$_=new (function(){function P(a){return a.split("/")[2]}function Q(a){return 55296<=a&&a<=56319}function I(a){return 56320<=a&&a<=57343}function S(a,b){var e,g=a.start,k=a.end;for(e=0;e=a.start&&e>=a.end)return{start:g,end:k};if(Q(b.charCodeAt(e))&&e+1=a.start&&d>=a.end)return{start:g,end:k};if(Q(b.charCodeAt(d))&&d+1 -2};this.drag=function(){++ra};this.arrayRemove=function(a,b,e){e=a.slice((e||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,e)};this.addAll=function(a,b){for(var e=0,g=b.length;e",g[0];);return b>4?b:a}(),ba=navigator.userAgent.toLowerCase();this.isIE=ha!==undefined;this.isIE6=ha===6;this.isIE8=ha===8;this.isIElt9= +oa);a.attachEvent("ontouchend",pa)}}function ya(){if(!qa){qa=true;var a=document.body;xa(a);Ka(a)}}function La(){if(!aa){var a,b,d=document.styleSheets;a=0;for(b=d.length;a +2};this.drag=function(){++ra};this.arrayRemove=function(a,b,d){d=a.slice((d||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,d)};this.addAll=function(a,b){for(var d=0,g=b.length;d",g[0];);return b>4?b:a}(),ba=navigator.userAgent.toLowerCase();this.isIE=ha!==undefined;this.isIE6=ha===6;this.isIE8=ha===8;this.isIElt9= ha<9;this.isIEMobile=ba.indexOf("msie 4")!=-1||ba.indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.isAndroid=ba.indexOf("safari")!=-1&&ba.indexOf("android")!=-1;this.isWebKit=ba.indexOf("applewebkit")!=-1;this.isGecko=ba.indexOf("gecko")!=-1&&!this.isWebKit;this.updateDelay=this.isIE?10:51;if(this.isAndroid){console.error("init console.error");console.info("init console.info");console.log("init console.log");console.warn("init console.warn")}var ia=new Date;this.trace=function(a, -b){if(b)ia=new Date;b=new Date;b=(b.getMinutes()-ia.getMinutes())*6E4+(b.getSeconds()-ia.getSeconds())*1E3+(b.getMilliseconds()-ia.getMilliseconds());window.console&&console.log("["+b+"]: "+a)};this.initAjaxComm=function(a,b){function e(k,m){var o=null,q=true;if(window.XMLHttpRequest){o=new XMLHttpRequest;if(g)if("withCredentials"in o){if(m){o.open(k,m,true);o.withCredentials="true"}}else if(typeof XDomainRequest!="undefined"){o=new XDomainRequest;if(m){q=false;try{o.open(k,m+"&contentType=x-www-form-urlencoded")}catch(u){o= -null}}}else o=null;else m&&o.open(k,m,true)}else if(!g&&window.ActiveXObject){try{o=new ActiveXObject("Msxml2.XMLHTTP")}catch(v){try{o=new ActiveXObject("Microsoft.XMLHTTP")}catch(w){}}m&&o&&o.open(k,m,true)}o&&m&&q&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded");return o}var g=(a.indexOf("://")!=-1||a.indexOf("//")==0)&&P(a)!=window.location.host;return e("POST",a)!=null?new (function(){function k(o,q,u,v){function w(G){if(!H){clearTimeout(M);if(m){if(G){H=true;b(0,t.responseText, -q)}else b(1,null,q);if(t){t.onreadystatechange=new Function;try{t.onload=t.onreadystatechange}catch(ja){}t=null}H=true}}}function B(){if(t.readyState==4){var G=t.status==200&&t.getResponseHeader("Content-Type")&&t.getResponseHeader("Content-Type").indexOf("text/javascript")==0;w(G)}}function A(){if(m){t.onreadystatechange=new Function;t=null;H=true;b(2,null,q)}}var t=e("POST",m),M=null,H=false;this.abort=function(){if(t!=null){t.onreadystatechange=new Function;H=true;t.abort();t=null}};_$_CLOSE_CONNECTION_$_&& -t.setRequestHeader("Connection","close");if(v>0)M=setTimeout(A,v);t.onreadystatechange=B;try{t.onload=function(){w(true)};t.onerror=function(){w(false)}}catch(J){}t.send(o)}var m=a;this.responseReceived=function(){};this.sendUpdate=function(o,q,u,v){if(!m)return null;return new k(o,q,u,v)};this.cancel=function(){m=null};this.setUrl=function(o){m=o}}):new (function(){function k(q,u,v){function w(){b(1,null,u);B.parentNode.removeChild(B)}this.userData=u;var B=this.script=document.createElement("script"); -B.id="script"+v;B.setAttribute("src",m+"&"+q);B.onerror=w;document.getElementsByTagName("head")[0].appendChild(B);this.abort=function(){B.parentNode.removeChild(B)}}var m=a,o=null;this.responseReceived=function(){if(o!=null){var q=o;o.script.parentNode.removeChild(o.script);o=null;b(0,"",q.userData)}};this.sendUpdate=function(q,u,v,w){if(!m)return null;return o=new k(q,u,v,w)};this.cancel=function(){m=null};this.setUrl=function(q){m=q}})};this.setHtml=function(a,b,e){function g(m,o){var q,u,v;switch(m.nodeType){case 1:q= -m.namespaceURI===null?document.createElement(m.nodeName):document.createElementNS(m.namespaceURI,m.nodeName);if(m.attributes&&m.attributes.length>0){u=0;for(v=m.attributes.length;u0){u=0;for(v=m.childNodes.length;u"+b+"","application/xhtml+xml").documentElement;if(k.nodeType!=1)k=k.nextSibling;if(!e){h.saveReparented(a);a.innerHTML=""}b=0;for(e=k.childNodes.length;b0){var g;b=0;for(g=a.attributes.length;b=8)b.className=a.className.substring(8);var e=a.getAttribute("style");if(e)h.isIE?b.style.setAttribute("cssText",e):b.setAttribute("style",e);a.parentNode.replaceChild(b,a)}};this.navigateInternalPath=function(a,b){a=a||window.event;if(!a.ctrlKey&&!a.metaKey&&h.button(a)<=1){h.history.navigate(b,true);h.cancelEvent(a, -h.CancelDefaultAction)}};this.ajaxInternalPaths=function(a){$(".Wt-ip").each(function(){var b=this.getAttribute("href"),e=b.lastIndexOf("?wtd");if(e===-1)e=b.lastIndexOf("&wtd");if(e!==-1)b=b.substr(0,e);var g;if(b.indexOf("://")!=-1){e=document.createElement("div");e.innerHTML='x';g=b.substr(e.firstChild.href.length-1)}else{for(;b.substr(0,3)=="../";)b=b.substr(3);if(b.charAt(0)!="/")b="/"+b;g=b.substr(a.length);if(g.substr(0,2)=="_="&&a.charAt(a.length-1)=="?")g="?"+g}if(g.length== +b){if(b)ia=new Date;b=new Date;b=(b.getMinutes()-ia.getMinutes())*6E4+(b.getSeconds()-ia.getSeconds())*1E3+(b.getMilliseconds()-ia.getMilliseconds());window.console&&console.log("["+b+"]: "+a)};this.initAjaxComm=function(a,b){function d(k,m){var o=null,q=true;if(window.XMLHttpRequest){o=new XMLHttpRequest;if(g)if("withCredentials"in o){if(m){o.open(k,m,true);o.withCredentials="true"}}else if(typeof XDomainRequest!="undefined"){o=new XDomainRequest;if(m){q=false;try{o.open(k,m+"&contentType=x-www-form-urlencoded")}catch(u){o= +null}}}else o=null;else m&&o.open(k,m,true)}else if(!g&&window.ActiveXObject){try{o=new ActiveXObject("Msxml2.XMLHTTP")}catch(w){try{o=new ActiveXObject("Microsoft.XMLHTTP")}catch(x){}}m&&o&&o.open(k,m,true)}o&&m&&q&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded");return o}var g=(a.indexOf("://")!=-1||a.indexOf("//")==0)&&P(a)!=window.location.host;return d("POST",a)!=null?new (function(){function k(o,q,u,w){function x(G){if(!H){clearTimeout(M);if(m){if(G){H=true;b(0,t.responseText, +q)}else b(1,null,q);if(t){t.onreadystatechange=new Function;try{t.onload=t.onreadystatechange}catch(ja){}t=null}H=true}}}function B(){if(t.readyState==4){var G=t.status==200&&t.getResponseHeader("Content-Type")&&t.getResponseHeader("Content-Type").indexOf("text/javascript")==0;x(G)}}function A(){if(m){t.onreadystatechange=new Function;t=null;H=true;b(2,null,q)}}var t=d("POST",m),M=null,H=false;this.abort=function(){if(t!=null){t.onreadystatechange=new Function;H=true;t.abort();t=null}};_$_CLOSE_CONNECTION_$_&& +t.setRequestHeader("Connection","close");if(w>0)M=setTimeout(A,w);t.onreadystatechange=B;try{t.onload=function(){x(true)};t.onerror=function(){x(false)}}catch(J){}t.send(o)}var m=a;this.responseReceived=function(){};this.sendUpdate=function(o,q,u,w){if(!m)return null;return new k(o,q,u,w)};this.cancel=function(){m=null};this.setUrl=function(o){m=o}}):new (function(){function k(q,u,w){function x(){b(1,null,u);B.parentNode.removeChild(B)}this.userData=u;var B=this.script=document.createElement("script"); +B.id="script"+w;B.setAttribute("src",m+"&"+q);B.onerror=x;document.getElementsByTagName("head")[0].appendChild(B);this.abort=function(){B.parentNode.removeChild(B)}}var m=a,o=null;this.responseReceived=function(){if(o!=null){var q=o;o.script.parentNode.removeChild(o.script);o=null;b(0,"",q.userData)}};this.sendUpdate=function(q,u,w,x){if(!m)return null;return o=new k(q,u,w,x)};this.cancel=function(){m=null};this.setUrl=function(q){m=q}})};this.setHtml=function(a,b,d){function g(m,o){var q,u,w;switch(m.nodeType){case 1:q= +m.namespaceURI===null?document.createElement(m.nodeName):document.createElementNS(m.namespaceURI,m.nodeName);if(m.attributes&&m.attributes.length>0){u=0;for(w=m.attributes.length;u0){u=0;for(w=m.childNodes.length;u"+b+"","application/xhtml+xml").documentElement;if(k.nodeType!=1)k=k.nextSibling;if(!d){h.saveReparented(a);a.innerHTML=""}b=0;for(d=k.childNodes.length;b0){var g;b=0;for(g=a.attributes.length;b=8)b.className=a.className.substring(8);var d=a.getAttribute("style");if(d)h.isIE?b.style.setAttribute("cssText",d):b.setAttribute("style",d);a.parentNode.replaceChild(b,a)}};this.navigateInternalPath=function(a,b){a=a||window.event;if(!a.ctrlKey&&!a.metaKey&&h.button(a)<=1){h.history.navigate(b,true);h.cancelEvent(a, +h.CancelDefaultAction)}};this.ajaxInternalPaths=function(a){$(".Wt-ip").each(function(){var b=this.getAttribute("href"),d=b.lastIndexOf("?wtd");if(d===-1)d=b.lastIndexOf("&wtd");if(d!==-1)b=b.substr(0,d);var g;if(b.indexOf("://")!=-1){d=document.createElement("div");d.innerHTML='x';g=b.substr(d.firstChild.href.length-1)}else{for(;b.substr(0,3)=="../";)b=b.substr(3);if(b.charAt(0)!="/")b="/"+b;g=b.substr(a.length);if(g.substr(0,2)=="_="&&a.charAt(a.length-1)=="?")g="?"+g}if(g.length== 0||g.charAt(0)!="/")g="/"+g;if(g.substr(0,4)=="/?_=")g=g.substr(4);this.setAttribute("href",b);this.setAttribute("href",this.href);this.onclick=function(k){h.navigateInternalPath(k,g)};$(this).removeClass("Wt-ip")})};this.resolveRelativeAnchors=function(){window.$&&$(".Wt-rr").each(function(){this.href&&this.setAttribute("href",this.href);this.src&&this.setAttribute("src",this.src);$(this).removeClass("Wt-rr")})};var V=false;this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent= -function(a,b){if(!V){b=b===undefined?h.CancelAll:b;if(b&h.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&h.CancelPropagate)if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true}};this.$=this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var e=0;ea.parentNode.scrollWidth)e-=a.scrollLeft+a.parentNode.scrollWidth-a.scrollWidth}else e-=a.scrollLeft;g-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:e,y:g}};this.widgetCoordinates=function(a,b){b=h.pageCoordinates(b);a=h.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0,g=a.target||a.srcElement;if(g&&g.ownerDocument!=document)for(var k=0;k0?-1:1;else if(a.wheelDelta)b=a.wheelDelta>0?1:-1;else if(a.detail)b=a.detail<0?1:-1;return b};this.scrollIntoView=function(a){setTimeout(function(){var b=a.indexOf("#");if(b!=-1)a=a.substr(b+1);var e=document.getElementById(a); -if(e){for(b=e.parentNode;b!=document.body;b=b.parentNode)if(b.scrollHeight>b.clientHeight&&h.css(b,"overflow-y")=="auto"){e=h.widgetPageCoordinates(e,b);b.scrollTop+=e.y;return}e.scrollIntoView(true)}},100)};this.getUnicodeSelectionRange=function(a){return S(h.getSelectionRange(a),$(a).val())};this.getSelectionRange=function(a){if(document.selection)if(h.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),e=b.duplicate();e.moveToElementText(a);var g=0;if(b.text.length>1){g-=b.text.length; -if(g<0)g=0}a=-1+g;for(e.moveStart("character",g);e.inRange(b);){e.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{e=b=-1;if(a=$(a).val()){e=document.selection.createRange().duplicate();e.moveEnd("character",a.length);b=e.text==""?a.length:a.lastIndexOf(e.text);e=document.selection.createRange().duplicate();e.moveStart("character",-a.length);e=e.text.length}return{start:b,end:e}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}: -{start:-1,end:-1}};this.setUnicodeSelectionRange=function(a,b,e){return h.setSelectionRange(a,b,e,true)};this.setSelectionRange=function(a,b,e,g){var k=$(a).val();if(typeof b!="number")b=-1;if(typeof e!="number")e=-1;if(b<0)b=0;if(e>k.length)e=k.length;if(ee)b=e;a.focus();if(g)for(g=0;g=b&&g>=e)break;if(Q(k.charCodeAt(g))&&g+10||h.isIE?true:h.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var ca=null,da=null;this.isDblClick=function(a,b){if(a.wtClickTimeout&&Math.abs(a.wtE1.clientX- -b.clientX)<3&&Math.abs(a.wtE1.clientY-b.clientY)<3){clearTimeout(a.wtClickTimeout);a.wtClickTimeout=null;a.wtE1=null;return true}else return false};this.eventRepeat=function(a,b,e){h.stopRepeat();b=b||500;e=e||50;a();ca=setTimeout(function(){ca=null;a();da=setInterval(a,e)},b)};this.stopRepeat=function(){if(ca){clearTimeout(ca);ca=null}if(da){clearInterval(da);da=null}};var Aa=null,Ba=null;this.css=function(a,b){if(a.style[b])return a.style[b];else{if(a!==Aa){Aa=a;Ba=window.getComputedStyle?window.getComputedStyle(a, +function(a,b){if(!V){b=b===undefined?h.CancelAll:b;if(b&h.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&h.CancelPropagate)if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true}};this.$=this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var d=0;da.parentNode.scrollWidth)d-=a.scrollLeft+a.parentNode.scrollWidth-a.scrollWidth}else d-=a.scrollLeft;g-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:d,y:g}};this.widgetCoordinates=function(a,b){b=h.pageCoordinates(b);a=h.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,d=0,g=a.target||a.srcElement;if(g&&g.ownerDocument!=document)for(var k=0;k0?-1:1;else if(a.wheelDelta)b=a.wheelDelta>0?1:-1;else if(a.detail)b=a.detail<0?1:-1;return b};this.scrollIntoView=function(a){setTimeout(function(){var b=a.indexOf("#");if(b!=-1)a=a.substr(b+1);var d=document.getElementById(a); +if(d){for(b=d.parentNode;b!=document.body;b=b.parentNode)if(b.scrollHeight>b.clientHeight&&h.css(b,"overflow-y")=="auto"){d=h.widgetPageCoordinates(d,b);b.scrollTop+=d.y;return}d.scrollIntoView(true)}},100)};this.getUnicodeSelectionRange=function(a){return S(h.getSelectionRange(a),$(a).val())};this.getSelectionRange=function(a){if(document.selection)if(h.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),d=b.duplicate();d.moveToElementText(a);var g=0;if(b.text.length>1){g-=b.text.length; +if(g<0)g=0}a=-1+g;for(d.moveStart("character",g);d.inRange(b);){d.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{d=b=-1;if(a=$(a).val()){d=document.selection.createRange().duplicate();d.moveEnd("character",a.length);b=d.text==""?a.length:a.lastIndexOf(d.text);d=document.selection.createRange().duplicate();d.moveStart("character",-a.length);d=d.text.length}return{start:b,end:d}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}: +{start:-1,end:-1}};this.setUnicodeSelectionRange=function(a,b,d){return h.setSelectionRange(a,b,d,true)};this.setSelectionRange=function(a,b,d,g){var k=$(a).val();if(typeof b!="number")b=-1;if(typeof d!="number")d=-1;if(b<0)b=0;if(d>k.length)d=k.length;if(dd)b=d;a.focus();if(g)for(g=0;g=b&&g>=d)break;if(Q(k.charCodeAt(g))&&g+10||h.isIE?true:h.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var ca=null,da=null;this.isDblClick=function(a,b){if(a.wtClickTimeout&&Math.abs(a.wtE1.clientX- +b.clientX)<3&&Math.abs(a.wtE1.clientY-b.clientY)<3){clearTimeout(a.wtClickTimeout);a.wtClickTimeout=null;a.wtE1=null;return true}else return false};this.eventRepeat=function(a,b,d){h.stopRepeat();b=b||500;d=d||50;a();ca=setTimeout(function(){ca=null;a();da=setInterval(a,d)},b)};this.stopRepeat=function(){if(ca){clearTimeout(ca);ca=null}if(da){clearInterval(da);da=null}};var Aa=null,Ba=null;this.css=function(a,b){if(a.style[b])return a.style[b];else{if(a!==Aa){Aa=a;Ba=window.getComputedStyle?window.getComputedStyle(a, null):a.currentStyle?a.currentStyle:null}return Ba?Ba[b]:null}};this.parsePx=function(a){return Z(a,/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/i,0)};this.parsePct=function(a,b){return Z(a,/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/i,b)};this.px=function(a,b){return h.parsePx(h.css(a,b))};this.pxself=function(a,b){return h.parsePx(a.style[b])};this.pctself=function(a,b){return h.parsePct(a.style[b],0)};this.styleAttribute=function(a){function b(q){for(var u=q.search(/-./);u!=-1;){u=q.charAt(u+1).toUpperCase();q=q.replace(/-./, -u);u=q.search(/-./)}return q}var e=["","-moz-","-webkit-","-o-","-ms-"],g=document.createElement("div"),k,m;k=0;for(m=e.length;ke?e+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){h.getElement(a).style.display="none"};this.inline=function(a){h.getElement(a).style.display="inline"};this.block=function(a){h.getElement(a).style.display="block"};this.show=function(a){h.getElement(a).style.display= -""};var T=null;this.firedTarget=null;this.target=function(a){try{return h.firedTarget||a.target||a.srcElement}catch(b){return null}};var qa=false;this.capture=function(a){ya();if(!(T&&a)){for(var b=0;b32768){e=document.createElement("style");b.parentNode.insertBefore(e,b);e.styleSheet.cssText=a}else e.styleSheet.cssText+= -a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var e=0;e0){b=b[b.length-1];b.parentNode.insertBefore(e,b.nextSibling)}else document.body.appendChild(e)}};this.removeStyleSheet=function(a){$('link[rel=stylesheet][href~="'+ -a+'"]')&&$('link[rel=stylesheet][href~="'+a+'"]').remove();for(var b=document.styleSheets,e=0;ev.x){b=w;g=0}else if(b+ -q>w+v.x){q=A.scrollLeft;if(A==document.body)q=A.clientWidth-v.x;g=g-t.x+q;b=A.clientWidth-(g+h.px(a,"marginRight"));g=1}else{q=A.scrollLeft;if(A==document.body)q=0;b=b-t.x+q;b-=h.px(a,"marginLeft");g=0}if(u>v.y){e=B;k=0}else if(e+u>B+v.y){if(k>B+v.y)k=B+v.y;u=A.scrollTop;if(A==document.body)u=A.clientHeight-v.y;k=k-t.y+u;e=A.clientHeight-(k+h.px(a,"marginBottom")+h.px(a,"borderBottomWidth"));k=1}else{u=A.scrollTop;if(A==document.body)u=0;e=e-t.y+u;e=e-h.px(a,"marginTop")+h.px(a,"borderTopWidth"); -k=0}a.style[m[g]]=b+"px";a.style[o[k]]=e+"px"}};this.positionXY=function(a,b,e){a=h.getElement(a);if(!h.isHidden(a)){a.style.display="block";h.fitToWindow(a,b,e,b,e)}};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,e,g){a=h.getElement(a);var k=h.getElement(b);g||(g=0);if(k&&a){var m=h.widgetPageCoordinates(k),o;a.style.position="absolute";if(h.css(a,"display")=="none")a.style.display="block";if(e===h.Horizontal){e=m.x+k.offsetWidth;b=m.y+g;o=m.x;g=m.y+k.offsetHeight-g}else{e= +u);u=q.search(/-./)}return q}var d=["","-moz-","-webkit-","-o-","-ms-"],g=document.createElement("div"),k,m;k=0;for(m=d.length;kd?d+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){h.getElement(a).style.display="none"};this.inline=function(a){h.getElement(a).style.display="inline"};this.block=function(a){h.getElement(a).style.display="block"};this.show=function(a){h.getElement(a).style.display= +""};var T=null;this.firedTarget=null;this.target=function(a){try{return h.firedTarget||a.target||a.srcElement}catch(b){return null}};var qa=false;this.capture=function(a){ya();if(!(T&&a)){for(var b=0;b32768){d=document.createElement("style");b.parentNode.insertBefore(d,b);d.styleSheet.cssText=a}else d.styleSheet.cssText+= +a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var d=0;d0){b=b[b.length-1];b.parentNode.insertBefore(d,b.nextSibling)}else document.body.appendChild(d)}};this.removeStyleSheet=function(a){$('link[rel=stylesheet][href~="'+ +a+'"]')&&$('link[rel=stylesheet][href~="'+a+'"]').remove();for(var b=document.styleSheets,d=0;dw.x){b=x;g=0}else if(b+ +q>x+w.x){q=A.scrollLeft;if(A==document.body)q=A.clientWidth-w.x;g=g-t.x+q;b=A.clientWidth-(g+h.px(a,"marginRight"));g=1}else{q=A.scrollLeft;if(A==document.body)q=0;b=b-t.x+q;b-=h.px(a,"marginLeft");g=0}if(u>w.y){d=B;k=0}else if(d+u>B+w.y){if(k>B+w.y)k=B+w.y;u=A.scrollTop;if(A==document.body)u=A.clientHeight-w.y;k=k-t.y+u;d=A.clientHeight-(k+h.px(a,"marginBottom")+h.px(a,"borderBottomWidth"));k=1}else{u=A.scrollTop;if(A==document.body)u=0;d=d-t.y+u;d=d-h.px(a,"marginTop")+h.px(a,"borderTopWidth"); +k=0}a.style[m[g]]=b+"px";a.style[o[k]]=d+"px"}};this.positionXY=function(a,b,d){a=h.getElement(a);if(!h.isHidden(a)){a.style.display="block";h.fitToWindow(a,b,d,b,d)}};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,d,g){a=h.getElement(a);var k=h.getElement(b);g||(g=0);if(k&&a){var m=h.widgetPageCoordinates(k),o;a.style.position="absolute";if(h.css(a,"display")=="none")a.style.display="block";if(d===h.Horizontal){d=m.x+k.offsetWidth;b=m.y+g;o=m.x;g=m.y+k.offsetHeight-g}else{d= m.x;b=m.y+k.offsetHeight;o=m.x+k.offsetWidth;g=m.y}if(!a.wtNoReparent&&!$(a).hasClass("wt-no-reparent")){m=k;var q=$(".Wt-domRoot").get(0);a.parentNode.removeChild(a);for(k=m.parentNode;k!=q;k=k.parentNode){if(k.wtResize){k=m;break}if(h.css(k,"display")!="inline"&&k.clientHeight>100&&(k.scrollHeight>k.clientHeight||k.scrollWidth>k.clientWidth))break;m=k}m=h.css(k,"position");if(m!="absolute"&&m!="relative")k.style.position="relative";k.appendChild(a);$(a).addClass("wt-reparented")}h.fitToWindow(a, -e,b,o,g);a.style.visibility=""}};this.hasFocus=function(a){try{return a===document.activeElement}catch(b){return false}};this.progressed=function(a){var b=document,e=b.body,g=this.getElement("Wt-form");a.style.display=g.style.display;g.parentNode.replaceChild(a,g);e.removeEventListener?e.removeEventListener("click",delayClick,true):e.detachEvent("click",delayClick);setTimeout(function(){var k,m;k=0;for(m=delayedClicks.length;k=1&&e[e.length-1]=="/"){_$_$if_UGLY_INTERNAL_PATHS_$_(); -g=true;_$_$endif_$_();_$_$ifnot_UGLY_INTERNAL_PATHS_$_();e=e.substr(0,e.length-1);_$_$endif_$_()}},navigate:function(q,u){h.resolveRelativeAnchors();b=q;var v=Ga(q),w=e;if(v.length!=0)w+=(g?"?_=":"")+v;if(g){function B(t){if(t.length>1)t=t.substr(1);var M=t.split("&"),H,J;t="";H=0;for(J=M.length;H1){if(v.length>2&&v[0]=="?"&&v[1]=="&")v=v.substr(1);w+=w.indexOf("?")==-1?"?"+v.substr(1):"&"+ -v.substr(1)}}else w+=window.location.search;try{window.history.pushState(q?q:"",document.title,w)}catch(A){console.log(A.toString())}h.scrollIntoView(q);u&&k(q)},getCurrentState:function(){return b}}}():h.isIE8?function(){var a=null,b=null,e=window;return{_initialize:function(){},_initTimeout:function(){},register:function(g,k){function m(){if(a!=e.location.hash){a=e.location.hash.substring(1);b(a)}}a=g;b=k;e.onhashchange=m},initialize:function(){},navigate:function(g,k){a=g;e.location.hash=g;h.scrollIntoView(g); -k&&b(g)},getCurrentState:function(){return a}}}():function(){function a(){var s,z;z=location.href;s=z.indexOf("#");return s>=0?z.substr(s+1):null}function b(){A.value=J+"|"+G}function e(){var s,z;s=0;for(z=ja.length;s";try{z=B.contentWindow.document;z.open();z.write(s);z.close();return true}catch(E){return false}}function m(){var s,z,E,r; -if(!B.contentWindow||!B.contentWindow.document)setTimeout(m,10);else{s=B.contentWindow.document;E=(z=s.getElementById("state"))?z.innerText:null;r=a();setInterval(function(){var sa,N;s=B.contentWindow.document;sa=(z=s.getElementById("state"))?z.innerText:null;N=a();if(sa!==E){E=sa;g(E);N=E?E:J;if(location.hash!=N&&location.hash.substring(1)!=N)location.hash=N;r=N;b()}else if(N!==r){r=N;k(N)}},50);t=true;w!=null&&w()}}function o(){if(!u){var s=a(),z=history.length;M&&clearInterval(M);M=setInterval(function(){var E, -r;E=a();r=history.length;if(E!==s){s=E;z=r;g(s);b()}},50)}}function q(){var s;s=A.value.split("|");if(s.length>1){J=s[0];G=s[1]}else J=G="";if(s.length>2)H=s[2].split(",");if(u)m();else{o();t=true;w!=null&&w()}}var u=h.isIElt9,v=false,w=null,B=null,A=null,t=false,M=null,H=[],J,G,ja=[];return{_initialize:function(){A!=null&&q()},_initTimeout:function(){o()},register:function(s,z){if(!t)G=J=escape(s);ja.push(z)},initialize:function(s,z){if(!t){if((navigator.vendor||"")!=="KDE")if(typeof window.opera!== -"undefined")v=true;if(typeof s==="string")s=document.getElementById(s);if(!(!s||s.tagName.toUpperCase()!=="TEXTAREA"&&(s.tagName.toUpperCase()!=="INPUT"||s.type!=="hidden"&&s.type!=="text"))){A=s;if(u){if(typeof z==="string")z=document.getElementById(z);!z||z.tagName.toUpperCase()!=="IFRAME"||(B=z)}}}},navigate:function(s,z){s=Ga(s);if(t){s=s;if(u)k(s);else if(s.length>0)location.hash=s;z&&e()}},getCurrentState:function(){if(!t)return"";return unescape(G)}}}()});if(window._$_APP_CLASS_$_&&window._$_APP_CLASS_$_._p_)try{window._$_APP_CLASS_$_._p_.quit(null)}catch(e$$35){} -window._$_APP_CLASS_$_=new (function(){function P(d){d=r.pageCoordinates(d);sa=d.x;N=d.y}function Q(){var d=_$_WT_CLASS_$_.history.getCurrentState();if(!(d!=null&&d.length>0&&d.substr(0,1)!="/"))if(ea!=d){ea=d;setTimeout(function(){qa(null,"hash",null,true)},1)}}function I(d,c){if(!(ea==d||!ea&&d=="/")){c||(ea=d);r.history.navigate(d,c)}}function S(){document.body.ondragstart=function(){return false}}function Z(d,c){Ca=setTimeout(function(){wa(d,c)},Xa)}function na(){Ca&&clearTimeout(Ca)}function wa(d, -c){if(c.touches)if("vibrate"in navigator){navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate;navigator.vibrate&&navigator.vibrate(100)}if((c.ctrlKey||r.button(c)>1)&&!c.touches)return true;var f=r.target(c);if(f)if(r.css(f,"display")!=="inline"&&(f.offsetWidth>f.clientWidth||f.offsetHeight>f.clientHeight)){var l=r.widgetPageCoordinates(f),p=r.pageCoordinates(c),n=p.y-l.y;if(p.x-l.x>f.clientWidth||n>f.clientHeight)return true}f=Ha;f.object=r.getElement(d.getAttribute("dwid")); -if(f.object==null)return true;f.sourceId=d.getAttribute("dsid");f.objectPrevStyle={position:f.object.style.position,display:f.object.style.display,left:f.object.style.left,top:f.object.style.top,className:f.object.className,parent:f.object.parentNode,zIndex:f.object.zIndex};f.object.parentNode.removeChild(f.object);f.object.style.position="absolute";f.object.className=f.objectPrevStyle.className+"";f.object.style.zIndex="1000";document.body.appendChild(f.object);r.capture(null);r.capture(f.object); -f.object.onmousemove=ga;f.object.onmouseup=oa;f.object.ontouchmove=ga;f.object.ontouchend=oa;f.offsetX=-4;f.offsetY=-4;f.dropTarget=null;f.mimeType=d.getAttribute("dmt");f.xy=r.pageCoordinates(c);r.cancelEvent(c,r.CancelPropagate);return false}function ga(d){d=d||window.event;if(Ha.object!==null){var c=Ha,f=r.pageCoordinates(d);if(c.object.style.display!==""&&c.xy.x!==f.x&&c.xy.y!==f.y)c.object.style.display="";c.object.style.left=f.x-c.offsetX+"px";c.object.style.top=f.y-c.offsetY+"px";f=c.dropTarget; -var l;if(d.changedTouches){c.object.style.display="none";l=document.elementFromPoint(d.changedTouches[0].clientX,d.changedTouches[0].clientY);c.object.style.display=""}else{l=r.target(d);if(l==c.object)if(document.elementFromPoint){c.object.style.display="none";l=document.elementFromPoint(d.clientX,d.clientY);c.object.style.display=""}}var p="{"+c.mimeType+":",n=null;for(c.dropTarget=null;l;){n=l.getAttribute("amts");if(n!=null&&n.indexOf(p)!=-1){c.dropTarget=l;break}l=l.parentNode;if(!l.tagName|| -r.hasTag(l,"HTML"))break}if(c.dropTarget!=f){if(c.dropTarget){l=n.indexOf(p)+p.length;var x=n.indexOf("}",l);n=n.substring(l,x);if(n.length!=0){c.dropTarget.setAttribute("dos",c.dropTarget.className);c.dropTarget.className=c.dropTarget.className+" "+n}}else c.object.styleClass="";if(f!=null){f.handleDragDrop&&f.handleDragDrop("end",c.object,d,"",p);n=f.getAttribute("dos");if(n!=null)f.className=n}}if(c.dropTarget)if(c.dropTarget.handleDragDrop)c.dropTarget.handleDragDrop("drag",c.object,d,"",p);else c.object.className= -c.objectPrevStyle.className+" Wt-valid-drop";else c.object.className=c.objectPrevStyle.className+"";return false}return true}function oa(d){d=d||window.event;r.capture(null);var c=Ha;if(c.object){if(c.dropTarget){var f=c.dropTarget.getAttribute("dos");if(f!=null)c.dropTarget.className=f;if(c.dropTarget.handleDragDrop)c.dropTarget.handleDragDrop("drop",c.object,d,c.sourceId,c.mimeType);else d.touches?q(c.dropTarget,{name:"_drop2",eventObject:c.dropTarget,event:d},c.sourceId,c.mimeType):q(c.dropTarget, -{name:"_drop",eventObject:c.dropTarget,event:d},c.sourceId,c.mimeType)}document.body.removeChild(c.object);c.objectPrevStyle.parent.appendChild(c.object);c.object.style.zIndex=c.objectPrevStyle.zIndex;c.object.style.position=c.objectPrevStyle.position;c.object.style.display=c.objectPrevStyle.display;c.object.style.left=c.objectPrevStyle.left;c.object.style.top=c.objectPrevStyle.top;c.object.className=c.objectPrevStyle.className;c.object=null;Ca&&clearTimeout(Ca)}}function pa(d,c,f){var l,p;p=d+"="; -d=0;for(l=c.length;d0?"&e"+c:"&";f=c+"signal="+d.signal;if(d.id){f+=c+"id="+d.id+c+"name="+encodeURIComponent(d.name)+c+"an="+d.args.length;for(var p=0;p=1&&d[d.length-1]=="/"){_$_$if_UGLY_INTERNAL_PATHS_$_(); +g=true;_$_$endif_$_();_$_$ifnot_UGLY_INTERNAL_PATHS_$_();d=d.substr(0,d.length-1);_$_$endif_$_()}},navigate:function(q,u){h.resolveRelativeAnchors();b=q;var w=Ga(q),x=d;if(w.length!=0)x+=(g?"?_=":"")+w;if(g){function B(t){if(t.length>1)t=t.substr(1);var M=t.split("&"),H,J;t="";H=0;for(J=M.length;H1){if(w.length>2&&w[0]=="?"&&w[1]=="&")w=w.substr(1);x+=x.indexOf("?")==-1?"?"+w.substr(1):"&"+ +w.substr(1)}}else x+=window.location.search;try{window.history.pushState(q?q:"",document.title,x)}catch(A){console.log(A.toString())}h.scrollIntoView(q);u&&k(q)},getCurrentState:function(){return b}}}():h.isIE8?function(){var a=null,b=null,d=window;return{_initialize:function(){},_initTimeout:function(){},register:function(g,k){function m(){if(a!=d.location.hash){a=d.location.hash.substring(1);b(a)}}a=g;b=k;d.onhashchange=m},initialize:function(){},navigate:function(g,k){a=g;d.location.hash=g;h.scrollIntoView(g); +k&&b(g)},getCurrentState:function(){return a}}}():function(){function a(){var s,z;z=location.href;s=z.indexOf("#");return s>=0?z.substr(s+1):null}function b(){A.value=J+"|"+G}function d(){var s,z;s=0;for(z=ja.length;s";try{z=B.contentWindow.document;z.open();z.write(s);z.close();return true}catch(E){return false}}function m(){var s,z,E,r; +if(!B.contentWindow||!B.contentWindow.document)setTimeout(m,10);else{s=B.contentWindow.document;E=(z=s.getElementById("state"))?z.innerText:null;r=a();setInterval(function(){var sa,N;s=B.contentWindow.document;sa=(z=s.getElementById("state"))?z.innerText:null;N=a();if(sa!==E){E=sa;g(E);N=E?E:J;if(location.hash!=N&&location.hash.substring(1)!=N)location.hash=N;r=N;b()}else if(N!==r){r=N;k(N)}},50);t=true;x!=null&&x()}}function o(){if(!u){var s=a(),z=history.length;M&&clearInterval(M);M=setInterval(function(){var E, +r;E=a();r=history.length;if(E!==s){s=E;z=r;g(s);b()}},50)}}function q(){var s;s=A.value.split("|");if(s.length>1){J=s[0];G=s[1]}else J=G="";if(s.length>2)H=s[2].split(",");if(u)m();else{o();t=true;x!=null&&x()}}var u=h.isIElt9,w=false,x=null,B=null,A=null,t=false,M=null,H=[],J,G,ja=[];return{_initialize:function(){A!=null&&q()},_initTimeout:function(){o()},register:function(s,z){if(!t)G=J=escape(s);ja.push(z)},initialize:function(s,z){if(!t){if((navigator.vendor||"")!=="KDE")if(typeof window.opera!== +"undefined")w=true;if(typeof s==="string")s=document.getElementById(s);if(!(!s||s.tagName.toUpperCase()!=="TEXTAREA"&&(s.tagName.toUpperCase()!=="INPUT"||s.type!=="hidden"&&s.type!=="text"))){A=s;if(u){if(typeof z==="string")z=document.getElementById(z);!z||z.tagName.toUpperCase()!=="IFRAME"||(B=z)}}}},navigate:function(s,z){s=Ga(s);if(t){s=s;if(u)k(s);else if(s.length>0)location.hash=s;z&&d()}},getCurrentState:function(){if(!t)return"";return unescape(G)}}}()});if(window._$_APP_CLASS_$_&&window._$_APP_CLASS_$_._p_)try{window._$_APP_CLASS_$_._p_.quit(null)}catch(e$$35){} +window._$_APP_CLASS_$_=new (function(){function P(e){e=r.pageCoordinates(e);sa=e.x;N=e.y}function Q(){var e=_$_WT_CLASS_$_.history.getCurrentState();if(!(e!=null&&e.length>0&&e.substr(0,1)!="/"))if(ea!=e){ea=e;setTimeout(function(){qa(null,"hash",null,true)},1)}}function I(e,c){if(!(ea==e||!ea&&e=="/")){c||(ea=e);r.history.navigate(e,c)}}function S(){document.body.ondragstart=function(){return false}}function Z(e,c){Ca=setTimeout(function(){wa(e,c)},Xa)}function na(){Ca&&clearTimeout(Ca)}function wa(e, +c){if(c.touches)if("vibrate"in navigator){navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate;navigator.vibrate&&navigator.vibrate(100)}if((c.ctrlKey||r.button(c)>1)&&!c.touches)return true;var f=r.target(c);if(f)if(r.css(f,"display")!=="inline"&&(f.offsetWidth>f.clientWidth||f.offsetHeight>f.clientHeight)){var l=r.widgetPageCoordinates(f),p=r.pageCoordinates(c),n=p.y-l.y;if(p.x-l.x>f.clientWidth||n>f.clientHeight)return true}f=Ha;f.object=r.getElement(e.getAttribute("dwid")); +if(f.object==null)return true;f.sourceId=e.getAttribute("dsid");f.objectPrevStyle={position:f.object.style.position,display:f.object.style.display,left:f.object.style.left,top:f.object.style.top,className:f.object.className,parent:f.object.parentNode,zIndex:f.object.zIndex};f.object.parentNode.removeChild(f.object);f.object.style.position="absolute";f.object.className=f.objectPrevStyle.className+"";f.object.style.zIndex="1000";document.body.appendChild(f.object);r.capture(null);r.capture(f.object); +f.object.onmousemove=ga;f.object.onmouseup=oa;f.object.ontouchmove=ga;f.object.ontouchend=oa;f.offsetX=-4;f.offsetY=-4;f.dropTarget=null;f.mimeType=e.getAttribute("dmt");f.xy=r.pageCoordinates(c);r.cancelEvent(c,r.CancelPropagate);return false}function ga(e){e=e||window.event;if(Ha.object!==null){var c=Ha,f=r.pageCoordinates(e);if(c.object.style.display!==""&&c.xy.x!==f.x&&c.xy.y!==f.y)c.object.style.display="";c.object.style.left=f.x-c.offsetX+"px";c.object.style.top=f.y-c.offsetY+"px";f=c.dropTarget; +var l;if(e.changedTouches){c.object.style.display="none";l=document.elementFromPoint(e.changedTouches[0].clientX,e.changedTouches[0].clientY);c.object.style.display=""}else{l=r.target(e);if(l==c.object)if(document.elementFromPoint){c.object.style.display="none";l=document.elementFromPoint(e.clientX,e.clientY);c.object.style.display=""}}var p="{"+c.mimeType+":",n=null;for(c.dropTarget=null;l;){n=l.getAttribute("amts");if(n!=null&&n.indexOf(p)!=-1){c.dropTarget=l;break}l=l.parentNode;if(!l.tagName|| +r.hasTag(l,"HTML"))break}if(c.dropTarget!=f){if(c.dropTarget){l=n.indexOf(p)+p.length;var v=n.indexOf("}",l);n=n.substring(l,v);if(n.length!=0){c.dropTarget.setAttribute("dos",c.dropTarget.className);c.dropTarget.className=c.dropTarget.className+" "+n}}else c.object.styleClass="";if(f!=null){f.handleDragDrop&&f.handleDragDrop("end",c.object,e,"",p);n=f.getAttribute("dos");if(n!=null)f.className=n}}if(c.dropTarget)if(c.dropTarget.handleDragDrop)c.dropTarget.handleDragDrop("drag",c.object,e,"",p);else c.object.className= +c.objectPrevStyle.className+" Wt-valid-drop";else c.object.className=c.objectPrevStyle.className+"";return false}return true}function oa(e){e=e||window.event;r.capture(null);var c=Ha;if(c.object){if(c.dropTarget){var f=c.dropTarget.getAttribute("dos");if(f!=null)c.dropTarget.className=f;if(c.dropTarget.handleDragDrop)c.dropTarget.handleDragDrop("drop",c.object,e,c.sourceId,c.mimeType);else e.touches?q(c.dropTarget,{name:"_drop2",eventObject:c.dropTarget,event:e},c.sourceId,c.mimeType):q(c.dropTarget, +{name:"_drop",eventObject:c.dropTarget,event:e},c.sourceId,c.mimeType)}document.body.removeChild(c.object);c.objectPrevStyle.parent.appendChild(c.object);c.object.style.zIndex=c.objectPrevStyle.zIndex;c.object.style.position=c.objectPrevStyle.position;c.object.style.display=c.objectPrevStyle.display;c.object.style.left=c.objectPrevStyle.left;c.object.style.top=c.objectPrevStyle.top;c.object.className=c.objectPrevStyle.className;c.object=null;Ca&&clearTimeout(Ca)}}function pa(e,c,f){var l,p;p=e+"="; +e=0;for(l=c.length;e0?"&e"+c:"&";f=c+"signal="+e.signal;if(e.id){f+=c+"id="+e.id+c+"name="+encodeURIComponent(e.name)+c+"an="+e.args.length;for(var p=0;p0&&r.setHtml(d.get(0),"",false)}function La(){r.history._initTimeout();Fa==0&&qa(null,"keepAlive",null,false)}function Ga(d){if(!r.isIEMobile)document.title=d}function h(d){if(!Ra){if(d){if(!window._$_APP_CLASS_$_LoadWidgetTree)return;r.history.initialize("Wt-history-field","Wt-history-iframe",Sa)}if(!("activeElement"in -document)){function c(l){if(l&&l.target)document.activeElement=l.target==document?null:l.target}function f(){document.activeElement=null}document.addEventListener("focus",c,true);document.addEventListener("blur",f,true)}$(document).mousedown(r.mouseDown).mouseup(r.mouseUp);r.history._initialize();S();Ra=true;d&&window._$_APP_CLASS_$_LoadWidgetTree();Y||Ea||(Ea=setInterval(La,_$_KEEP_ALIVE_$_000))}}function za(d){clearTimeout(d);document.body.style.cursor="auto";if(fa!=null){try{fa()}catch(c){}fa= -null}}function ra(){document.body.style.cursor="wait";fa=hideLoadingIndicator;showLoadingIndicator()}function ha(){var d=Date.now(),c=-1;for(var f in la)if(la.hasOwnProperty(f)){if(d-la[f].time>=_$_INDICATOR_TIMEOUT_$_){fa==null&&ra();return}var l=parseInt(f,10);if(l>c)c=l}Na=c+1;document.body.style.cursor="auto";if(fa!=null){try{fa()}catch(p){}fa=null}}function ba(d){Ta=d}function ia(){E._p_.autoJavaScript()}function V(d){if(d){d="(function() {"+d+"})();";window.execScript?window.execScript(d):window.eval(d)}E== -window._$_APP_CLASS_$_&&ia()}function ca(){y.socket.send("&signal=none&connected="+ma);y.state=3}function da(d,c,f){if(D)D.onStatusChange("connectionStatus",d==0?1:0);if(!Y)if(Ja)setTimeout(function(){da(d,c,f)},50);else{if(d==0){r.resolveRelativeAnchors();_$_$if_CATCH_ERROR_$_();try{_$_$endif_$_();V(c);_$_$if_CATCH_ERROR_$_()}catch(l){var p=l.description||l.message,n={exception_code:l.code,exception_description:p,exception_js:c};n.stack=l.stack||l.stacktrace;k(n,"Wt internal error; code: "+l.code+ -", description: "+p);throw l;}_$_$endif_$_();f&&za(f)}else K=Ma.concat(K);Ma=[];if(O){clearTimeout(O);O=null}F=null;if(d>0)++Fa;else Fa=0;if(!Y){y.state==2&&ca();if(Ta||K.length>0)if(d==1){p=Math.min(12E4,Math.exp(Fa)*500);ta=setTimeout(function(){m()},p)}else m()}}}function Aa(d){ua=d.indexOf("://")!=-1||d[0]=="/"?d:Sa+d;ka&&ka.setUrl(d)}function Ba(){F.abort();O=F=null;Y||m()}function T(d){D=d;D.status={};D.status.connectionStatus=0;D.status.websocket=false;D.onStatusChange=function(c,f){var l= -D.status[c];if(l!=f){D.status[c]=f;D.onChange(c,l,f)}}}function qa(d,c,f,l){if(!Oa){Oa=true;r.checkReleaseCapture(d,f);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_();if(!F){_$_$endif_$_();var p={},n=K.length;p.object=d;p.signal=c;p.event=window.fakeEvent||f;p.feedback=l;K[n]=xa(p,n);a();V();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_();Oa=false}}function aa(){y.keepAlive&&clearInterval(y.keepAlive);y.keepAlive=setInterval(function(){var d=y.socket;if(d.readyState==1)d.send("&signal=ping");else{clearInterval(y.keepAlive); -y.keepAlive=null}},_$_SERVER_PUSH_TIMEOUT_$_)}function a(){if(Y){if(Ia){if(confirm(Ia))document.location=document.location;Ia=null}}else{_$_$if_WEB_SOCKETS_$_();if(y.state!=4)if(typeof window.WebSocket==="undefined"&&typeof window.MozWebSocket==="undefined")y.state=4;else{var d=y.socket;if(d==null||d.readyState>1)if(d!=null&&y.state==0)y.state=4;else{function c(){if(!Y){++y.reconnectTries;var p=Math.min(12E4,Math.exp(y.reconnectTries)*500);setTimeout(function(){a()},p)}}var f;if(ua.indexOf("://")!= --1)f="ws"+ua.substr(4);else{f=ua.substr(ua.indexOf("?"));f="ws"+location.protocol.substr(4)+"//"+location.host+_$_WS_PATH_$_+f}f+="&request=ws";var l=_$_WS_ID_$_;if(l.length>0)f+="&wsid="+l;y.socket=typeof window.WebSocket!=="undefined"?(d=new WebSocket(f)):(d=new MozWebSocket(f));y.state=1;y.keepAlive&&clearInterval(y.keepAlive);y.keepAlive=null;d.onmessage=function(p){var n=null;if(y.state==1)if(p.data=="connect"){if(F!=null&&O!=null){clearTimeout(O);F.abort();F=null}if(F)y.state=2;else ca()}else{console.log("WebSocket: was expecting a connect?"); -console.log(p.data);return}else{if(D){D.onStatusChange("websocket",true);D.onStatusChange("connectionStatus",1)}y.state=3;n=p.data}y.reconnectTries=0;n!=null&&da(0,n,null)};d.onerror=function(){D&&D.onStatusChange("websocket",false);if(y.reconnectTries==3&&y.state==0)y.state=4;c()};d.onclose=function(){D&&D.onStatusChange("websocket",false);if(y.reconnectTries==3&&y.state==0)y.state=4;c()};d.onopen=function(){if(D){D.onStatusChange("websocket",true);D.onStatusChange("connectionStatus",1)}aa()}}if(d.readyState== -1&&d.state==3){aa();m();return}}_$_$endif_$_();if(F!=null&&O!=null){clearTimeout(O);F.abort();F=null}if(F==null)if(ta==null){ta=setTimeout(function(){m()},r.updateDelay);Ua=(new Date).getTime()}else if(Fa){clearTimeout(ta);m()}else if((new Date).getTime()-Ua>r.updateDelay){clearTimeout(ta);m()}}}function b(d,c){Pa=c;ma=d;ka.responseReceived(d)}function e(){for(var d=0;d0){d=Ka();c=d.feedback?setTimeout(l?ha:ra,_$_INDICATOR_TIMEOUT_$_):null;f=false}else{d={result:"&signal=poll"};c=null;f=true}l||(d.result+="&ackId="+ma);d.result+="&pageId="+Va;if(Pa){var p="",n=$("#"+Pa).get(0); -if(n)for(n=n.parentNode;!r.hasTag(n,"BODY");n=n.parentNode)if(n.id){if(p!="")p+=",";p+=n.id}d.result+="&ackPuzzle="+encodeURIComponent(p)}d.result+="&Wt-params="+encodeURIComponent("_$_PARAMS_$_");if(l){F=null;if(!f){if(c){f=Na;la[f]={time:Date.now(),tm:c};++Na;d.result+="&wsRqId="+f}y.socket.send(d.result)}}else{F=ka.sendUpdate("request=jsupdate"+d.result,c,ma,-1);O=f?setTimeout(Ba,_$_SERVER_PUSH_TIMEOUT_$_):null}}}}function o(d,c,f){if(c==-1)c=d.offsetWidth;if(f==-1)f=d.offsetHeight;if(typeof d.wtWidth=== -"undefined"||d.wtWidth!=c||typeof d.wtHeight==="undefined"||d.wtHeight!=f){d.wtWidth=c;d.wtHeight=f;c>=0&&f>=0&&q(d,"resized",Math.round(c),Math.round(f))}}function q(d,c){var f={},l=K.length;f.signal="user";f.id=typeof d==="string"?d:d==E?"app":d.id;if(typeof c==="object"){f.name=c.name;f.object=c.eventObject;f.event=c.event}else{f.name=c;f.object=f.event=null}f.args=[];for(var p=2;p1)B(d,c,X-1);else{X={"error-description":"Fatal error: failed loading "+d};k(X,X["error-description"]);ya(null)}}}function p(){if(!n&&!x){n=true;w(d)}}var n=false,x=false;if(c!="")try{n=!eval("typeof "+c+" === 'undefined'")}catch(C){n=false}if(n)w(d);else{var U=document.createElement("script");U.setAttribute("src",d);U.onload=p;U.onerror=l;U.onreadystatechange=function(){var X=U.readyState;if(X=="loaded")r.isOpera||r.isIE?p():l();else X=="complete"&&p()};document.getElementsByTagName("head")[0].appendChild(U)}} -function A(d,c){this.callback=c;this.work=d.length;this.images=[];if(d.length==0)c(this.images);else for(c=0;c0&&r.setHtml(e.get(0),"",false)}function La(){r.history._initTimeout();Fa==0&&qa(null,"keepAlive",null,false)}function Ga(e){if(!r.isIEMobile)document.title=e}function h(e){if(!Ra){if(e){if(!window._$_APP_CLASS_$_LoadWidgetTree)return;r.history.initialize("Wt-history-field","Wt-history-iframe",Sa)}if(!("activeElement"in +document)){function c(l){if(l&&l.target)document.activeElement=l.target==document?null:l.target}function f(){document.activeElement=null}document.addEventListener("focus",c,true);document.addEventListener("blur",f,true)}$(document).mousedown(r.mouseDown).mouseup(r.mouseUp);r.history._initialize();S();Ra=true;e&&window._$_APP_CLASS_$_LoadWidgetTree();Y||Ea||(Ea=setInterval(La,_$_KEEP_ALIVE_$_000))}}function za(e){clearTimeout(e);document.body.style.cursor="auto";if(fa!=null){try{fa()}catch(c){}fa= +null}}function ra(){document.body.style.cursor="wait";fa=hideLoadingIndicator;showLoadingIndicator()}function ha(){var e=Date.now(),c=-1;for(var f in la)if(la.hasOwnProperty(f)){if(e-la[f].time>=_$_INDICATOR_TIMEOUT_$_){fa==null&&ra();return}var l=parseInt(f,10);if(l>c)c=l}Na=c+1;document.body.style.cursor="auto";if(fa!=null){try{fa()}catch(p){}fa=null}}function ba(e){Ta=e}function ia(){E._p_.autoJavaScript()}function V(e){if(e){e="(function() {"+e+"})();";window.execScript?window.execScript(e):window.eval(e)}E== +window._$_APP_CLASS_$_&&ia()}function ca(){y.socket.send("&signal=none&connected="+ma);y.state=3}function da(e,c,f){if(D)D.onStatusChange("connectionStatus",e==0?1:0);if(!Y)if(Ja)setTimeout(function(){da(e,c,f)},50);else{if(e==0){r.resolveRelativeAnchors();_$_$if_CATCH_ERROR_$_();try{_$_$endif_$_();V(c);_$_$if_CATCH_ERROR_$_()}catch(l){var p=l.description||l.message,n={exception_code:l.code,exception_description:p,exception_js:c};n.stack=l.stack||l.stacktrace;k(n,"Wt internal error; code: "+l.code+ +", description: "+p);throw l;}_$_$endif_$_();f&&za(f)}else K=Ma.concat(K);Ma=[];if(O){clearTimeout(O);O=null}F=null;if(e>0)++Fa;else Fa=0;if(!Y){y.state==2&&ca();if(Ta||K.length>0)if(e==1){p=Math.min(12E4,Math.exp(Fa)*500);ta=setTimeout(function(){m()},p)}else m()}}}function Aa(e){ua=e.indexOf("://")!=-1||e[0]=="/"?e:Sa+e;ka&&ka.setUrl(e)}function Ba(){F.abort();O=F=null;Y||m()}function T(e){D=e;D.status={};D.status.connectionStatus=0;D.status.websocket=false;D.onStatusChange=function(c,f){var l= +D.status[c];if(l!=f){D.status[c]=f;D.onChange(c,l,f)}}}function qa(e,c,f,l){if(!Oa){Oa=true;r.checkReleaseCapture(e,f);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_();if(!F){_$_$endif_$_();var p={},n=K.length;p.object=e;p.signal=c;p.event=window.fakeEvent||f;p.feedback=l;K[n]=xa(p,n);a();V();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_();Oa=false}}function aa(){y.keepAlive&&clearInterval(y.keepAlive);y.keepAlive=setInterval(function(){var e=y.socket;if(e.readyState==1)e.send("&signal=ping");else{clearInterval(y.keepAlive); +y.keepAlive=null}},_$_SERVER_PUSH_TIMEOUT_$_)}function a(){if(Y){if(Ia){if(confirm(Ia))document.location=document.location;Ia=null}}else{_$_$if_WEB_SOCKETS_$_();if(y.state!=4)if(typeof window.WebSocket==="undefined"&&typeof window.MozWebSocket==="undefined")y.state=4;else{var e=y.socket;if(e==null||e.readyState>1)if(e!=null&&y.state==0)y.state=4;else{function c(){if(!Y){++y.reconnectTries;var p=Math.min(12E4,Math.exp(y.reconnectTries)*500);setTimeout(function(){a()},p)}}var f;if(ua.indexOf("://")!= +-1)f="ws"+ua.substr(4);else{f=ua.substr(ua.indexOf("?"));f="ws"+location.protocol.substr(4)+"//"+location.host+_$_WS_PATH_$_+f}f+="&request=ws";var l=_$_WS_ID_$_;if(l.length>0)f+="&wsid="+l;y.socket=typeof window.WebSocket!=="undefined"?(e=new WebSocket(f)):(e=new MozWebSocket(f));y.state=1;y.keepAlive&&clearInterval(y.keepAlive);y.keepAlive=null;e.onmessage=function(p){var n=null;if(y.state==1)if(p.data=="connect"){if(F!=null&&O!=null){clearTimeout(O);F.abort();F=null}if(F)y.state=2;else ca()}else{console.log("WebSocket: was expecting a connect?"); +console.log(p.data);return}else{if(D){D.onStatusChange("websocket",true);D.onStatusChange("connectionStatus",1)}y.state=3;n=p.data}y.reconnectTries=0;n!=null&&da(0,n,null)};e.onerror=function(){D&&D.onStatusChange("websocket",false);if(y.reconnectTries==3&&y.state==0)y.state=4;c()};e.onclose=function(){D&&D.onStatusChange("websocket",false);if(y.reconnectTries==3&&y.state==0)y.state=4;c()};e.onopen=function(){if(D){D.onStatusChange("websocket",true);D.onStatusChange("connectionStatus",1)}aa()}}if(e.readyState== +1&&e.state==3){aa();m();return}}_$_$endif_$_();if(F!=null&&O!=null){clearTimeout(O);F.abort();F=null}if(F==null)if(ta==null){ta=setTimeout(function(){m()},r.updateDelay);Ua=(new Date).getTime()}else if(Fa){clearTimeout(ta);m()}else if((new Date).getTime()-Ua>r.updateDelay){clearTimeout(ta);m()}}}function b(e,c){Pa=c;ma=e;ka.responseReceived(e)}function d(){for(var e=0;e0){c=Ka();f=c.feedback?setTimeout(p?ha:ra,_$_INDICATOR_TIMEOUT_$_):null;l=false}else{c={result:"&signal=poll"};f=null;l=true}p||(c.result+="&ackId="+ma);c.result+="&pageId="+Va; +if(Pa){var n="",v=$("#"+Pa).get(0);if(v)for(v=v.parentNode;!r.hasTag(v,"BODY");v=v.parentNode)if(v.id){if(n!="")n+=",";n+=v.id}c.result+="&ackPuzzle="+encodeURIComponent(n)}n=e();if(n.length>0)c.result+="&Wt-params="+encodeURIComponent(n);if(p){F=null;if(!l){if(f){l=Na;la[l]={time:Date.now(),tm:f};++Na;c.result+="&wsRqId="+l}y.socket.send(c.result)}}else{F=ka.sendUpdate("request=jsupdate"+c.result,f,ma,-1);O=l?setTimeout(Ba,_$_SERVER_PUSH_TIMEOUT_$_):null}}}}function o(e,c,f){if(c==-1)c=e.offsetWidth; +if(f==-1)f=e.offsetHeight;if(typeof e.wtWidth==="undefined"||e.wtWidth!=c||typeof e.wtHeight==="undefined"||e.wtHeight!=f){e.wtWidth=c;e.wtHeight=f;c>=0&&f>=0&&q(e,"resized",Math.round(c),Math.round(f))}}function q(e,c){var f={},l=K.length;f.signal="user";f.id=typeof e==="string"?e:e==E?"app":e.id;if(typeof c==="object"){f.name=c.name;f.object=c.eventObject;f.event=c.event}else{f.name=c;f.object=f.event=null}f.args=[];for(var p=2;p1)B(e,c,X-1);else{X={"error-description":"Fatal error: failed loading "+e};k(X,X["error-description"]);ya(null)}}}function p(){if(!n&&!v){n=true;x(e)}}var n=false,v=false;if(c!="")try{n=!eval("typeof "+c+" === 'undefined'")}catch(C){n=false}if(n)x(e);else{var U=document.createElement("script");U.setAttribute("src",e);U.onload=p;U.onerror=l;U.onreadystatechange=function(){var X=U.readyState;if(X=="loaded")r.isOpera||r.isIE?p(): +l();else X=="complete"&&p()};document.getElementsByTagName("head")[0].appendChild(U)}}function A(e,c){this.callback=c;this.work=e.length;this.images=[];if(e.length==0)c(this.images);else for(c=0;c