Edit C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports\crystalreportviewers\allInOne.js
/*** MochiKit.Base 1.4 See <http://mochikit.com/> for documentation, downloads, license, etc. (c) 2005 Bob Ippolito. All rights Reserved. ***/ if(typeof(dojo)!="undefined"){dojo.provide("MochiKit.Base")}if(typeof(MochiKit)=="undefined"){MochiKit={}}if(typeof(MochiKit.Base)=="undefined"){MochiKit.Base={}}MochiKit.Base.VERSION="1.4";MochiKit.Base.NAME="MochiKit.Base";MochiKit.Base.update=function(b,f){if(b===null){b={}}for(var c=1;c<arguments.length;c++){var g=arguments[c];if(typeof(g)!="undefined"&&g!==null){for(var a in g){b[a]=g[a]}}}return b};MochiKit.Base.update(MochiKit.Base,{__repr__:function(){return"["+this.NAME+" "+this.VERSION+"]"},toString:function(){return this.__repr__()},camelize:function(b){var a=b.split("-");var f=a[0];for(var c=1;c<a.length;c++){f+=a[c].charAt(0).toUpperCase()+a[c].substring(1)}return f},counter:function(a){if(arguments.length===0){a=1}return function(){return a++}},clone:function(b){var a=arguments.callee;if(arguments.length==1){a.prototype=b;return new a()}},extend:function(b,g,f){if(!f){f=0}if(g){var a=g.length;if(typeof(a)!="number"){if(typeof(MochiKit.Iter)!="undefined"){g=MochiKit.Iter.list(g);a=g.length}else{throw new TypeError("Argument not an array-like and MochiKit.Iter not present")}}if(!b){b=[]}for(var c=f;c<a;c++){b.push(g[c])}}return b},updatetree:function(c,g){if(c===null){c={}}for(var f=1;f<arguments.length;f++){var h=arguments[f];if(typeof(h)!="undefined"&&h!==null){for(var b in h){var a=h[b];if(typeof(c[b])=="object"&&typeof(a)=="object"){arguments.callee(c[b],a)}else{c[b]=a}}}}return c},setdefault:function(b,f){if(b===null){b={}}for(var c=1;c<arguments.length;c++){var g=arguments[c];for(var a in g){if(!(a in b)){b[a]=g[a]}}}return b},_newNamedError:function(b,a,c){c.prototype=new MochiKit.Base.NamedError(b.NAME+"."+a);b[a]=c},operator:{identity:function(b){return b}},forwardCall:function(a){return function(){return this[a].apply(this,arguments)}},typeMatcher:function(){var b={};for(var a=0;a<arguments.length;a++){var c=arguments[a];b[c]=c}return function(){for(var f=0;f<arguments.length;f++){if(!(typeof(arguments[f]) in b)){return false}}return true}},isNull:function(){for(var a=0;a<arguments.length;a++){if(arguments[a]!==null){return false}}return true},isUndefinedOrNull:function(){for(var a=0;a<arguments.length;a++){var b=arguments[a];if(!(typeof(b)=="undefined"||b===null)){return false}}return true},isEmpty:function(a){return !MochiKit.Base.isNotEmpty.apply(this,arguments)},isNotEmpty:function(b){for(var a=0;a<arguments.length;a++){var c=arguments[a];if(!(c&&c.length)){return false}}return true},isArrayLike:function(){for(var a=0;a<arguments.length;a++){var c=arguments[a];var b=typeof(c);if((b!="object"&&!(b=="function"&&typeof(c.item)=="function"))||c===null||typeof(c.length)!="number"||c.nodeType===3){return false}}return true},isDateLike:function(){for(var a=0;a<arguments.length;a++){var b=arguments[a];if(typeof(b)!="object"||b===null||typeof(b.getTime)!="function"){return false}}return true},xmap:function(b){if(b===null){return MochiKit.Base.extend(null,arguments,1)}var c=[];for(var a=1;a<arguments.length;a++){c.push(b(arguments[a]))}return c},map:function(q,h){var b=MochiKit.Base;var n=MochiKit.Iter;var r=b.isArrayLike;if(arguments.length<=2){if(!r(h)){if(n){h=n.list(h);if(q===null){return h}}else{throw new TypeError("Argument not an array-like and MochiKit.Iter not present")}}if(q===null){return b.extend(null,h)}var k=[];for(var g=0;g<h.length;g++){k.push(q(h[g]))}return k}else{if(q===null){q=Array}var a=null;for(g=1;g<arguments.length;g++){if(!r(arguments[g])){if(n){return n.list(n.imap.apply(null,arguments))}else{throw new TypeError("Argument not an array-like and MochiKit.Iter not present")}}var c=arguments[g].length;if(a===null||a>c){a=c}}k=[];for(g=0;g<a;g++){var o=[];for(var f=1;f<arguments.length;f++){o.push(arguments[f][g])}k.push(q.apply(this,o))}return k}},xfilter:function(b){var c=[];if(b===null){b=MochiKit.Base.operator.truth}for(var a=1;a<arguments.length;a++){var f=arguments[a];if(b(f)){c.push(f)}}return c},filter:function(g,b,c){var h=[];var a=MochiKit.Base;if(!a.isArrayLike(b)){if(MochiKit.Iter){b=MochiKit.Iter.list(b)}else{throw new TypeError("Argument not an array-like and MochiKit.Iter not present")}}if(g===null){g=a.operator.truth}if(typeof(Array.prototype.filter)=="function"){return Array.prototype.filter.call(b,g,c)}else{if(typeof(c)=="undefined"||c===null){for(var f=0;f<b.length;f++){var j=b[f];if(g(j)){h.push(j)}}}else{for(f=0;f<b.length;f++){j=b[f];if(g.call(c,j)){h.push(j)}}}}return h},_wrapDumbFunction:function(func){return function(){switch(arguments.length){case 0:return func();case 1:return func(arguments[0]);case 2:return func(arguments[0],arguments[1]);case 3:return func(arguments[0],arguments[1],arguments[2])}var args=[];for(var i=0;i<arguments.length;i++){args.push("arguments["+i+"]")}return eval("(func("+args.join(",")+"))")}},methodcaller:function(b){var a=MochiKit.Base.extend(null,arguments,1);if(typeof(b)=="function"){return function(c){return b.apply(c,a)}}else{return function(c){return c[b].apply(c,a)}}},method:function(b,c){var a=MochiKit.Base;return a.bind.apply(this,a.extend([c,b],arguments,2))},compose:function(b,h){var g=[];var a=MochiKit.Base;if(arguments.length===0){throw new TypeError("compose() requires at least one argument")}for(var c=0;c<arguments.length;c++){var f=arguments[c];if(typeof(f)!="function"){throw new TypeError(repr(f)+" is not a function")}g.push(f)}return function(){var j=arguments;for(var k=g.length-1;k>=0;k--){j=[g[k].apply(this,j)]}return j[0]}},bind:function(g,c){if(typeof(g)=="string"){g=c[g]}var f=g.im_func;var j=g.im_preargs;var b=g.im_self;var a=MochiKit.Base;if(typeof(g)=="function"&&typeof(g.apply)=="undefined"){g=a._wrapDumbFunction(g)}if(typeof(f)!="function"){f=g}if(typeof(c)!="undefined"){b=c}if(typeof(j)=="undefined"){j=[]}else{j=j.slice()}a.extend(j,arguments,2);var h=function(){var l=arguments;var m=arguments.callee;if(m.im_preargs.length>0){l=a.concat(m.im_preargs,l)}var k=m.im_self;if(!k){k=this}return m.im_func.apply(k,l)};h.im_self=b;h.im_func=f;h.im_preargs=j;return h},bindMethods:function(b){var f=MochiKit.Base.bind;for(var a in b){var c=b[a];if(typeof(c)=="function"){b[a]=f(c,b)}}},registerComparator:function(c,b,a,f){MochiKit.Base.comparatorRegistry.register(c,b,a,f)},_primitives:{"boolean":true,string:true,number:true},compare:function(k,f){if(k==f){return 0}var j=(typeof(k)=="undefined"||k===null);var l=(typeof(f)=="undefined"||f===null);if(j&&l){return 0}else{if(j){return -1}else{if(l){return 1}}}var c=MochiKit.Base;var h=c._primitives;if(!(typeof(k) in h&&typeof(f) in h)){try{return c.comparatorRegistry.match(k,f)}catch(n){if(n!=c.NotFound){throw n}}}if(k<f){return -1}else{if(k>f){return 1}}var g=c.repr;throw new TypeError(g(k)+" and "+g(f)+" can not be compared")},compareDateLike:function(f,c){return MochiKit.Base.compare(f.getTime(),c.getTime())},compareArrayLike:function(f,c){var k=MochiKit.Base.compare;var j=f.length;var l=0;if(j>c.length){l=1;j=c.length}else{if(j<c.length){l=-1}}for(var g=0;g<j;g++){var h=k(f[g],c[g]);if(h){return h}}return l},registerRepr:function(b,a,f,c){MochiKit.Base.reprRegistry.register(b,a,f,c)},repr:function(f){if(typeof(f)=="undefined"){return"undefined"}else{if(f===null){return"null"}}try{if(typeof(f.__repr__)=="function"){return f.__repr__()}else{if(typeof(f.repr)=="function"&&f.repr!=arguments.callee){return f.repr()}}return MochiKit.Base.reprRegistry.match(f)}catch(b){if(typeof(f.NAME)=="string"&&(f.toString==Function.prototype.toString||f.toString==Object.prototype.toString)){return f.NAME}}try{var c=(f+"")}catch(b){return"["+typeof(f)+"]"}if(typeof(f)=="function"){f=c.replace(/^\s+/,"");var a=f.indexOf("{");if(a!=-1){f=f.substr(0,a)+"{...}"}}return c},reprArrayLike:function(b){var a=MochiKit.Base;return"["+a.map(a.repr,b).join(", ")+"]"},reprString:function(a){return('"'+a.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")},reprNumber:function(a){return a+""},registerJSON:function(b,a,f,c){MochiKit.Base.jsonRegistry.register(b,a,f,c)},evalJSON:function(){return eval("("+arguments[0]+")")},serializeJSON:function(a){var r=typeof(a);if(r=="undefined"){return"undefined"}else{if(r=="number"||r=="boolean"){return a+""}else{if(a===null){return"null"}}}var c=MochiKit.Base;var s=c.reprString;if(r=="string"){return s(a)}var q=arguments.callee;var g;if(typeof(a.__json__)=="function"){g=a.__json__();if(a!==g){return q(g)}}if(typeof(a.json)=="function"){g=a.json();if(a!==g){return q(g)}}if(r!="function"&&typeof(a.length)=="number"){var n=[];for(var j=0;j<a.length;j++){var b=q(a[j]);if(typeof(b)!="string"){b="undefined"}n.push(b)}return"["+n.join(", ")+"]"}try{g=c.jsonRegistry.match(a);if(a!==g){return q(g)}}catch(l){if(l!=c.NotFound){throw l}}if(r=="function"){return null}n=[];for(var f in a){var h;if(typeof(f)=="number"){h='"'+f+'"'}else{if(typeof(f)=="string"){h=s(f)}else{continue}}b=q(a[f]);if(typeof(b)!="string"){continue}n.push(h+":"+b)}return"{"+n.join(", ")+"}"},objEqual:function(f,c){return(MochiKit.Base.compare(f,c)===0)},arrayEqual:function(b,a){if(b.length!=a.length){return false}return(MochiKit.Base.compare(b,a)===0)},concat:function(){var b=[];var c=MochiKit.Base.extend;for(var a=0;a<arguments.length;a++){c(b,arguments[a])}return b},keyComparator:function(b){var a=MochiKit.Base;var f=a.compare;if(arguments.length==1){return function(h,g){return f(h[b],g[b])}}var c=a.extend(null,arguments);return function(h,g){var l=0;for(var k=0;(l===0)&&(k<c.length);k++){var j=c[k];l=f(h[j],g[j])}return l}},reverseKeyComparator:function(b){var a=MochiKit.Base.keyComparator.apply(this,arguments);return function(f,c){return a(c,f)}},partial:function(b){var a=MochiKit.Base;return a.bind.apply(this,a.extend([b,undefined],arguments,1))},listMinMax:function(h,a){if(a.length===0){return null}var g=a[0];var c=MochiKit.Base.compare;for(var b=1;b<a.length;b++){var f=a[b];if(c(f,g)==h){g=f}}return g},objMax:function(){return MochiKit.Base.listMinMax(1,arguments)},objMin:function(){return MochiKit.Base.listMinMax(-1,arguments)},findIdentical:function(a,f,g,b){if(typeof(b)=="undefined"||b===null){b=a.length}if(typeof(g)=="undefined"||g===null){g=0}for(var c=g;c<b;c++){if(a[c]===f){return c}}return -1},mean:function(){var f=0;var a=MochiKit.Base;var b=a.extend(null,arguments);var g=b.length;while(b.length){var h=b.shift();if(h&&typeof(h)=="object"&&typeof(h.length)=="number"){g+=h.length-1;for(var c=h.length-1;c>=0;c--){f+=h[c]}}else{f+=h}}if(g<=0){throw new TypeError("mean() requires at least one argument")}return f/g},median:function(){var b=MochiKit.Base.flattenArguments(arguments);if(b.length===0){throw new TypeError("median() requires at least one argument")}b.sort(compare);if(b.length%2==0){var a=b.length/2;return(b[a]+b[a-1])/2}else{return b[(b.length-1)/2]}},findValue:function(a,g,h,b){if(typeof(b)=="undefined"||b===null){b=a.length}if(typeof(h)=="undefined"||h===null){h=0}var f=MochiKit.Base.compare;for(var c=h;c<b;c++){if(f(a[c],g)===0){return c}}return -1},nodeWalk:function(c,f){var a=[c];var g=MochiKit.Base.extend;while(a.length){var b=f(a.shift());if(b){g(a,b)}}},nameFunctions:function(b){var c=b.NAME;if(typeof(c)=="undefined"){c=""}else{c=c+"."}for(var a in b){var g=b[a];if(typeof(g)=="function"&&typeof(g.NAME)=="undefined"){try{g.NAME=c+a}catch(f){}}}},queryString:function(l,m){if(typeof(MochiKit.DOM)!="undefined"&&arguments.length==1&&(typeof(l)=="string"||(typeof(l.nodeType)!="undefined"&&l.nodeType>0))){var j=MochiKit.DOM.formContents(l);l=j[0];m=j[1]}else{if(arguments.length==1){var a=l;l=[];m=[];for(var b in a){var n=a[b];if(typeof(n)!="function"){l.push(b);m.push(n)}}}}var g=[];var h=Math.min(l.length,m.length);var c=MochiKit.Base.urlEncode;for(var f=0;f<h;f++){n=m[f];if(typeof(n)!="undefined"&&n!==null){g.push(c(l[f])+"="+c(n))}}return g.join("&")},parseQueryString:function(k,l){var c=k.replace(/\+/g,"%20").split("&");var f={};var a;if(typeof(decodeURIComponent)!="undefined"){a=decodeURIComponent}else{a=unescape}if(l){for(var h=0;h<c.length;h++){var g=c[h].split("=");var b=a(g[0]);var j=f[b];if(!(j instanceof Array)){j=[];f[b]=j}j.push(a(g[1]))}}else{for(h=0;h<c.length;h++){g=c[h].split("=");f[a(g[0])]=a(g[1])}}return f}});MochiKit.Base.AdapterRegistry=function(){this.pairs=[]};MochiKit.Base.AdapterRegistry.prototype={register:function(b,a,f,c){if(c){this.pairs.unshift([b,a,f])}else{this.pairs.push([b,a,f])}},match:function(){for(var a=0;a<this.pairs.length;a++){var b=this.pairs[a];if(b[1].apply(this,arguments)){return b[2].apply(this,arguments)}}throw MochiKit.Base.NotFound},unregister:function(a){for(var b=0;b<this.pairs.length;b++){var c=this.pairs[b];if(c[0]==a){this.pairs.splice(b,1);return true}}return false}};MochiKit.Base.EXPORT=["flattenArray","noop","camelize","counter","clone","extend","update","updatetree","setdefault","keys","items","NamedError","operator","forwardCall","itemgetter","typeMatcher","isCallable","isUndefined","isUndefinedOrNull","isNull","isEmpty","isNotEmpty","isArrayLike","isDateLike","xmap","map","xfilter","filter","methodcaller","compose","bind","bindMethods","NotFound","AdapterRegistry","registerComparator","compare","registerRepr","repr","objEqual","arrayEqual","concat","keyComparator","reverseKeyComparator","partial","merge","listMinMax","listMax","listMin","objMax","objMin","nodeWalk","zip","urlEncode","queryString","serializeJSON","registerJSON","evalJSON","parseQueryString","findValue","findIdentical","flattenArguments","method","average","mean","median"];MochiKit.Base.EXPORT_OK=["nameFunctions","comparatorRegistry","reprRegistry","jsonRegistry","compareDateLike","compareArrayLike","reprArrayLike","reprString","reprNumber"];MochiKit.Base._exportSymbols=function(f,b){if(typeof(MochiKit.__export__)=="undefined"){MochiKit.__export__=(MochiKit.__compat__||(typeof(JSAN)=="undefined"&&typeof(dojo)=="undefined"))}if(!MochiKit.__export__){return}var c=b.EXPORT_TAGS[":all"];for(var a=0;a<c.length;a++){f[c[a]]=b[c[a]]}};MochiKit.Base.__new__=function(){var a=this;a.noop=a.operator.identity;a.forward=a.forwardCall;a.find=a.findValue;if(typeof(encodeURIComponent)!="undefined"){a.urlEncode=function(c){return encodeURIComponent(c).replace(/\'/g,"%27")}}else{a.urlEncode=function(c){return escape(c).replace(/\+/g,"%2B").replace(/\"/g,"%22").rval.replace(/\'/g,"%27")}}a.NamedError=function(c){this.message=c;this.name=c};a.NamedError.prototype=new Error();a.update(a.NamedError.prototype,{repr:function(){if(this.message&&this.message!=this.name){return this.name+"("+a.repr(this.message)+")"}else{return this.name+"()"}},toString:a.forwardCall("repr")});a.NotFound=new a.NamedError("MochiKit.Base.NotFound");a.listMax=a.partial(a.listMinMax,1);a.listMin=a.partial(a.listMinMax,-1);a.isCallable=a.typeMatcher("function");a.isUndefined=a.typeMatcher("undefined");a.merge=a.partial(a.update,null);a.zip=a.partial(a.map,null);a.average=a.mean;a.comparatorRegistry=new a.AdapterRegistry();a.registerComparator("dateLike",a.isDateLike,a.compareDateLike);a.registerComparator("arrayLike",a.isArrayLike,a.compareArrayLike);a.reprRegistry=new a.AdapterRegistry();a.registerRepr("arrayLike",a.isArrayLike,a.reprArrayLike);a.registerRepr("string",a.typeMatcher("string"),a.reprString);a.registerRepr("numbers",a.typeMatcher("number","boolean"),a.reprNumber);a.jsonRegistry=new a.AdapterRegistry();var b=a.concat(a.EXPORT,a.EXPORT_OK);a.EXPORT_TAGS={":common":a.concat(a.EXPORT_OK),":all":b};a.nameFunctions(this)};MochiKit.Base.__new__();if(MochiKit.__export__){compare=MochiKit.Base.compare}MochiKit.Base._exportSymbols(this,MochiKit.Base);if(typeof(dojo)!="undefined"){dojo.provide("MochiKit.Async");dojo.require("MochiKit.Base")}if(typeof(JSAN)!="undefined"){JSAN.use("MochiKit.Base",[])}try{if(typeof(MochiKit.Base)=="undefined"){throw""}}catch(e){throw"MochiKit.Async depends on MochiKit.Base!"}if(typeof(MochiKit.Async)=="undefined"){MochiKit.Async={}}MochiKit.Async.NAME="MochiKit.Async";MochiKit.Async.VERSION="1.4";MochiKit.Async.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"};MochiKit.Async.toString=function(){return this.__repr__()};MochiKit.Async.Deferred=function(a){this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=a;this.silentlyCancelled=false;this.chained=false};MochiKit.Async.Deferred.prototype={repr:function(){var a;if(this.fired==-1){a="unfired"}else{if(this.fired===0){a="success"}else{a="error"}}return"Deferred("+this.id+", "+a+")"},toString:MochiKit.Base.forwardCall("repr"),_nextId:MochiKit.Base.counter(),cancel:function(){var a=MochiKit.Async;if(this.fired==-1){if(this.canceller){this.canceller(this)}else{this.silentlyCancelled=true}if(this.fired==-1){this.errback(new a.CancelledError(this))}}else{if((this.fired===0)&&(this.results[0] instanceof a.Deferred)){this.results[0].cancel()}}},_resback:function(a){this.fired=((a instanceof Error)?1:0);this.results[this.fired]=a;this._fire()},_check:function(){if(this.fired!=-1){if(!this.silentlyCancelled){throw new MochiKit.Async.AlreadyCalledError(this)}this.silentlyCancelled=false;return}},callback:function(a){this._check();if(a instanceof MochiKit.Async.Deferred){throw new Error("Deferred instances can only be chained if they are the result of a callback")}this._resback(a)},errback:function(b){this._check();var a=MochiKit.Async;if(b instanceof a.Deferred){throw new Error("Deferred instances can only be chained if they are the result of a callback")}if(!(b instanceof Error)){b=new a.GenericError(b)}this._resback(b)},addBoth:function(a){if(arguments.length>1){a=MochiKit.Base.partial.apply(null,arguments)}return this.addCallbacks(a,a)},addCallback:function(a){if(arguments.length>1){a=MochiKit.Base.partial.apply(null,arguments)}return this.addCallbacks(a,null)},addErrback:function(a){if(arguments.length>1){a=MochiKit.Base.partial.apply(null,arguments)}return this.addCallbacks(null,a)},addCallbacks:function(a,b){if(this.chained){throw new Error("Chained Deferreds can not be re-used")}this.chain.push([a,b]);if(this.fired>=0){this._fire()}return this},_fire:function(){var g=this.chain;var k=this.fired;var c=this.results[k];var b=this;var a=null;while(g.length>0&&this.paused===0){var l=g.shift();var j=l[k];if(j===null){continue}try{c=j(c);k=((c instanceof Error)?1:0);if(c instanceof MochiKit.Async.Deferred){a=function(f){b._resback(f);b.paused--;if((b.paused===0)&&(b.fired>=0)){b._fire()}};this.paused++}}catch(h){k=1;if(!(h instanceof Error)){h=new MochiKit.Async.GenericError(h)}c=h}}this.fired=k;this.results[k]=c;if(a&&this.paused){c.addBoth(a);c.chained=true}}};MochiKit.Base.update(MochiKit.Async,{evalJSONRequest:function(){return eval("("+arguments[0].responseText+")")},succeed:function(a){var b=new MochiKit.Async.Deferred();b.callback.apply(b,arguments);return b},fail:function(a){var b=new MochiKit.Async.Deferred();b.errback.apply(b,arguments);return b},getXMLHttpRequest:function(){var a=arguments.callee;if(!a.XMLHttpRequest){var g=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP.4.0")},function(){throw new MochiKit.Async.BrowserComplianceError("Browser does not support XMLHttpRequest")}];for(var b=0;b<g.length;b++){var c=g[b];try{a.XMLHttpRequest=c;return c()}catch(f){}}}return a.XMLHttpRequest()},_xhr_onreadystatechange:function(g){var a=MochiKit.Base;if(this.readyState==4){try{this.onreadystatechange=null}catch(f){try{this.onreadystatechange=a.noop}catch(f){}}var b=null;try{b=this.status;if(!b&&a.isNotEmpty(this.responseText)){b=304}}catch(f){}if(b==200||b==304){g.callback(this)}else{var c=new MochiKit.Async.XMLHttpRequestError(this,"Request failed");if(c.number){g.errback(c)}else{g.errback(c)}}}},_xhr_canceller:function(a){try{a.onreadystatechange=null}catch(b){try{a.onreadystatechange=MochiKit.Base.noop}catch(b){}}a.abort()},sendXMLHttpRequest:function(f,c){if(typeof(c)=="undefined"||c===null){c=""}var a=MochiKit.Base;var b=MochiKit.Async;var h=new b.Deferred(a.partial(b._xhr_canceller,f));try{f.onreadystatechange=a.bind(b._xhr_onreadystatechange,f,h);f.send(c)}catch(g){try{f.onreadystatechange=null}catch(j){}h.errback(g)}return h},doSimpleXMLHttpRequest:function(f){var c=MochiKit.Async;var g=c.getXMLHttpRequest();if(arguments.length>1){var b=MochiKit.Base;var a=b.queryString.apply(null,b.extend(null,arguments,1));if(a){f+="?"+a}}g.open("GET",f,true);return c.sendXMLHttpRequest(g)},loadJSONDoc:function(b){var a=MochiKit.Async;var c=a.doSimpleXMLHttpRequest.apply(a,arguments);c=c.addCallback(a.evalJSONRequest);return c},wait:function(g,c){var f=new MochiKit.Async.Deferred();var a=MochiKit.Base;if(typeof(c)!="undefined"){f.addCallback(function(){return c})}var b=setTimeout(a.bind("callback",f),Math.floor(g*1000));f.canceller=function(){try{clearTimeout(b)}catch(h){}};return f},callLater:function(f,b){var a=MochiKit.Base;var c=a.partial.apply(a,a.extend(null,arguments,1));return MochiKit.Async.wait(f).addCallback(function(g){return c()})}});MochiKit.Async.DeferredLock=function(){this.waiting=[];this.locked=false;this.id=this._nextId()};MochiKit.Async.DeferredLock.prototype={__class__:MochiKit.Async.DeferredLock,acquire:function(){d=new MochiKit.Async.Deferred();if(this.locked){this.waiting.push(d)}else{this.locked=true;d.callback(this)}return d},release:function(){if(!this.locked){throw TypeError("Tried to release an unlocked DeferredLock")}this.locked=false;if(this.waiting.length>0){this.locked=true;this.waiting.shift().callback(this)}},_nextId:MochiKit.Base.counter(),repr:function(){var a;if(this.locked){a="locked, "+this.waiting.length+" waiting"}else{a="unlocked"}return"DeferredLock("+this.id+", "+a+")"},toString:MochiKit.Base.forwardCall("repr")};MochiKit.Async.DeferredList=function(j,h,b,f,l){MochiKit.Async.Deferred.apply(this,[l]);this.list=j;var a=[];this.resultList=a;this.finishedCount=0;this.fireOnOneCallback=h;this.fireOnOneErrback=b;this.consumeErrors=f;var c=MochiKit.Base.bind(this._cbDeferred,this);for(var g=0;g<j.length;g++){var k=j[g];a.push(undefined);k.addCallback(c,g,true);k.addErrback(c,g,false)}if(j.length===0&&!h){this.callback(this.resultList)}};MochiKit.Async.DeferredList.prototype=new MochiKit.Async.Deferred();MochiKit.Async.DeferredList.prototype._cbDeferred=function(b,c,a){this.resultList[b]=[c,a];this.finishedCount+=1;if(this.fired!==0){if(c&&this.fireOnOneCallback){this.callback([b,a])}else{if(!c&&this.fireOnOneErrback){this.errback(a)}else{if(this.finishedCount==this.list.length){this.callback(this.resultList)}}}}if(!c&&this.consumeErrors){a=null}return a};MochiKit.Async.gatherResults=function(a){var b=new MochiKit.Async.DeferredList(a,false,true,false);b.addCallback(function(g){var c=[];for(var f=0;f<g.length;f++){c.push(g[f][1])}return c});return b};MochiKit.Async.maybeDeferred=function(f){var b=MochiKit.Async;var a;try{var c=f.apply(null,MochiKit.Base.extend([],arguments,1));if(c instanceof b.Deferred){a=c}else{if(c instanceof Error){a=b.fail(c)}else{a=b.succeed(c)}}}catch(g){a=b.fail(g)}return a};MochiKit.Async.EXPORT=["AlreadyCalledError","CancelledError","BrowserComplianceError","GenericError","XMLHttpRequestError","Deferred","succeed","fail","getXMLHttpRequest","doSimpleXMLHttpRequest","loadJSONDoc","wait","callLater","sendXMLHttpRequest","DeferredLock","DeferredList","gatherResults","maybeDeferred"];MochiKit.Async.EXPORT_OK=["evalJSONRequest"];MochiKit.Async.__new__=function(){var a=MochiKit.Base;var b=a.partial(a._newNamedError,this);b("AlreadyCalledError",function(c){this.deferred=c});b("CancelledError",function(c){this.deferred=c});b("BrowserComplianceError",function(c){this.message=c});b("GenericError",function(c){this.message=c});b("XMLHttpRequestError",function(c,g){this.req=c;this.message=g;try{this.number=c.status}catch(f){}});this.EXPORT_TAGS={":common":this.EXPORT,":all":a.concat(this.EXPORT,this.EXPORT_OK)};a.nameFunctions(this)};MochiKit.Async.__new__();MochiKit.Base._exportSymbols(this,MochiKit.Async);if(typeof(dojo)!="undefined"){dojo.provide("MochiKit.DOM");dojo.require("MochiKit.Base")}if(typeof(JSAN)!="undefined"){JSAN.use("MochiKit.Base",[])}try{if(typeof(MochiKit.Base)=="undefined"){throw""}}catch(e){throw"MochiKit.DOM depends on MochiKit.Base!"}if(typeof(MochiKit.DOM)=="undefined"){MochiKit.DOM={}}MochiKit.DOM.NAME="MochiKit.DOM";MochiKit.DOM.VERSION="1.4";MochiKit.DOM.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"};MochiKit.DOM.toString=function(){return this.__repr__()};MochiKit.DOM.EXPORT=["removeEmptyTextNodes","formContents","currentWindow","currentDocument","withWindow","withDocument","registerDOMConverter","coerceToDOM","createDOM","createDOMFunc","getNodeAttribute","setNodeAttribute","updateNodeAttributes","appendChildNodes","replaceChildNodes","removeElement","swapDOM","BUTTON","TT","PRE","H1","H2","H3","BR","CANVAS","HR","LABEL","TEXTAREA","FORM","STRONG","SELECT","OPTION","OPTGROUP","LEGEND","FIELDSET","P","UL","OL","LI","TD","TR","THEAD","TBODY","TFOOT","TABLE","TH","INPUT","SPAN","A","DIV","IMG","getElement","$","getElementsByTagAndClassName","addToCallStack","addLoadEvent","focusOnLoad","setElementClass","toggleElementClass","addElementClass","removeElementClass","swapElementClass","hasElementClass","escapeHTML","toHTML","emitHTML","scrapeText"];MochiKit.DOM.EXPORT_OK=["domConverters"];MochiKit.DOM.DEPRECATED=[["computedStyle","MochiKit.Style.computedStyle","1.4"],["elementDimensions","MochiKit.Style.getElementDimensions","1.4"],["elementPosition","MochiKit.Style.getElementPosition","1.4"],["hideElement","MochiKit.Style.hideElement","1.4"],["setElementDimensions","MochiKit.Style.setElementDimensions","1.4"],["setElementPosition","MochiKit.Style.setElementPosition","1.4"],["setDisplayForElement","MochiKit.Style.setDisplayForElement","1.4"],["setOpacity","MochiKit.Style.setOpacity","1.4"],["showElement","MochiKit.Style.showElement","1.4"],["Coordinates","MochiKit.Style.Coordinates","1.4"],["Dimensions","MochiKit.Style.Dimensions","1.4"]];MochiKit.DOM.getViewportDimensions=new Function('if (!MochiKit["Style"]) { throw new Error("This function has been deprecated and depends on MochiKit.Style.");}return MochiKit.Style.getViewportDimensions.apply(this, arguments);');MochiKit.Base.update(MochiKit.DOM,{currentWindow:function(){return MochiKit.DOM._window},currentDocument:function(){return MochiKit.DOM._document},withWindow:function(j,f){var c=MochiKit.DOM;var b=c._document;var a=c._win;var h;try{c._window=j;c._document=j.document;h=f()}catch(g){c._window=a;c._document=b;throw g}c._window=a;c._document=b;return h},formContents:function(f){var g=[];var c=[];var a=MochiKit.Base;var b=MochiKit.DOM;if(typeof(f)=="undefined"||f===null){f=b._document}else{f=b.getElement(f)}a.nodeWalk(f,function(n){var h=n.name;if(a.isNotEmpty(h)){var l=n.nodeName;if(l=="INPUT"&&(n.type=="radio"||n.type=="checkbox")&&!n.checked){return null}if(l=="SELECT"){if(n.type=="select-one"){if(n.selectedIndex>=0){var k=n.options[n.selectedIndex];g.push(h);c.push((k.value)?k.value:k.text);return null}g.push(h);c.push("");return null}else{var m=n.options;if(!m.length){g.push(h);c.push("");return null}for(var j=0;j<m.length;j++){var k=m[j];if(!k.selected){continue}g.push(h);c.push((k.value)?k.value:k.text)}return null}}if(l=="FORM"||l=="P"||l=="SPAN"||l=="DIV"){return n.childNodes}g.push(h);c.push(n.value||"");return null}return n.childNodes});return[g,c]},withDocument:function(h,c){var b=MochiKit.DOM;var a=b._document;var g;try{b._document=h;g=c()}catch(f){b._document=a;throw f}b._document=a;return g},registerDOMConverter:function(b,a,f,c){MochiKit.DOM.domConverters.register(b,a,f,c)},coerceToDOM:function(f,r){var g=MochiKit.Base;var l=MochiKit.Iter;var q=MochiKit.DOM;if(l){var n=l.iter;var b=l.repeat;var a=g.map}var o=q.domConverters;var c=arguments.callee;var j=g.NotFound;while(true){if(typeof(f)=="undefined"||f===null){return null}if(typeof(f.nodeType)!="undefined"&&f.nodeType>0){return f}if(typeof(f)=="number"||typeof(f)=="boolean"){f=f.toString()}if(typeof(f)=="string"){return q._document.createTextNode(f)}if(typeof(f.__dom__)=="function"){f=f.__dom__(r);continue}if(typeof(f.dom)=="function"){f=f.dom(r);continue}if(typeof(f)=="function"){f=f.apply(r,[r]);continue}if(l){var h=null;try{h=n(f)}catch(k){}if(h){return a(c,h,b(r))}}try{f=o.match(f,r);continue}catch(k){if(k!=j){throw k}}return q._document.createTextNode(f.toString())}return undefined},setNodeAttribute:function(b,a,c){var g={};g[a]=c;try{return MochiKit.DOM.updateNodeAttributes(b,g)}catch(f){}return null},getNodeAttribute:function(f,a){var c=MochiKit.DOM;var b=c.attributeArray.renames[a];f=c.getElement(f);try{if(b){return f[b]}return f.getAttribute(a)}catch(g){}return null},updateNodeAttributes:function(b,h){var c=b;var m=MochiKit.DOM;if(typeof(b)=="string"){c=m.getElement(b)}if(h){var l=MochiKit.Base.updatetree;if(m.attributeArray.compliant){for(var f in h){var j=h[f];if(typeof(j)=="object"&&typeof(c[f])=="object"){l(c[f],j)}else{if(f.substring(0,2)=="on"){if(typeof(j)=="string"){j=new Function(j)}c[f]=j}else{c.setAttribute(f,j)}}}}else{var g=m.attributeArray.renames;for(f in h){j=h[f];var a=g[f];if(f=="style"&&typeof(j)=="string"){c.style.cssText=j}else{if(typeof(a)=="string"){c[a]=j}else{if(typeof(c[f])=="object"&&typeof(j)=="object"){l(c[f],j)}else{if(f.substring(0,2)=="on"){if(typeof(j)=="string"){j=new Function(j)}c[f]=j}else{c.setAttribute(f,j)}}}}}}}return c},appendChildNodes:function(c){var b=c;var a=MochiKit.DOM;if(typeof(c)=="string"){b=a.getElement(c)}var f=[a.coerceToDOM(MochiKit.Base.extend(null,arguments,1),b)];var g=MochiKit.Base.concat;while(f.length){var h=f.shift();if(typeof(h)=="undefined"||h===null){}else{if(typeof(h.nodeType)=="number"){b.appendChild(h)}else{f=g(h,f)}}}return b},replaceChildNodes:function(c){var b=c;var a=MochiKit.DOM;if(typeof(c)=="string"){b=a.getElement(c);arguments[0]=b}var f;while((f=b.firstChild)){b.removeChild(f)}if(arguments.length<2){return b}else{return a.appendChildNodes.apply(this,arguments)}},createDOM:function(g,f){var j;var b=MochiKit.DOM;var a=MochiKit.Base;if(typeof(f)=="string"||typeof(f)=="number"){var c=a.extend([g,null],arguments,1);return arguments.callee.apply(this,c)}if(typeof(g)=="string"){if(f&&!b.attributeArray.compliant){var h="";if("name" in f){h+=' name="'+b.escapeHTML(f.name)+'"'}if(g=="input"&&"type" in f){h+=' type="'+b.escapeHTML(f.type)+'"'}if(h){g="<"+g+h+">"}}j=b._document.createElement(g)}else{j=g}if(f){b.updateNodeAttributes(j,f)}if(arguments.length<=2){return j}else{var c=a.extend([j],arguments,2);return b.appendChildNodes.apply(this,c)}},createDOMFunc:function(){var a=MochiKit.Base;return a.partial.apply(this,a.extend([MochiKit.DOM.createDOM],arguments))},removeElement:function(a){var b=MochiKit.DOM.getElement(a);if(b&&b.parentNode){b.parentNode.removeChild(b)}return b},swapDOM:function(b,f){var a=MochiKit.DOM;b=a.getElement(b);var c=b.parentNode;if(f){f=a.getElement(f);c.replaceChild(f,b)}else{c.removeChild(b)}return f},getElement:function(b){var a=MochiKit.DOM;if(arguments.length==1){return((typeof(b)=="string")?a._document.getElementById(b):b)}else{return MochiKit.Base.map(a.getElement,arguments)}},getElementsByTagAndClassName:function(g,l,m){var n=MochiKit.DOM;if(typeof(g)=="undefined"||g===null){g="*"}if(typeof(m)=="undefined"||m===null){m=n._document}m=n.getElement(m);var f=(m.getElementsByTagName(g)||n._document.all);if(typeof(l)=="undefined"||l===null){return MochiKit.Base.extend(null,f)}var b=[];for(var k=0;k<f.length;k++){var c=f[k];var a=c.className.split(" ");for(var h=0;h<a.length;h++){if(a[h]==l){b.push(c);break}}}return b},_newCallStack:function(c,a){var b=function(){var f=arguments.callee.callStack;for(var g=0;g<f.length;g++){if(f[g].apply(this,arguments)===false){break}}if(a){try{this[c]=null}catch(h){}}};b.callStack=[];return b},addToCallStack:function(j,h,g,c){var b=MochiKit.DOM;var f=j[h];var a=f;if(!(typeof(f)=="function"&&typeof(f.callStack)=="object"&&f.callStack!==null)){a=b._newCallStack(h,c);if(typeof(f)=="function"){a.callStack.push(f)}j[h]=a}a.callStack.push(g)},addLoadEvent:function(b){var a=MochiKit.DOM;a.addToCallStack(a._window,"onload",b,true)},focusOnLoad:function(b){var a=MochiKit.DOM;a.addLoadEvent(function(){b=a.getElement(b);if(b){b.focus()}})},setElementClass:function(b,c){var a=MochiKit.DOM;var f=a.getElement(b);if(a.attributeArray.compliant){f.setAttribute("class",c)}else{f.setAttribute("className",c)}},toggleElementClass:function(c){var a=MochiKit.DOM;for(var b=1;b<arguments.length;b++){var f=a.getElement(arguments[b]);if(!a.addElementClass(f,c)){a.removeElementClass(f,c)}}},addElementClass:function(g,h){var b=MochiKit.DOM;var j=b.getElement(g);var a=j.className;if(a.length===0){b.setElementClass(j,h);return true}if(a==h){return false}var f=j.className.split(" ");for(var c=0;c<f.length;c++){if(f[c]==h){return false}}b.setElementClass(j,a+" "+h);return true},removeElementClass:function(g,h){var b=MochiKit.DOM;var j=b.getElement(g);var a=j.className;if(a.length===0){return false}if(a==h){b.setElementClass(j,"");return true}var f=j.className.split(" ");for(var c=0;c<f.length;c++){if(f[c]==h){f.splice(c,1);b.setElementClass(j,f.join(" "));return true}}return false},swapElementClass:function(c,g,a){var f=MochiKit.DOM.getElement(c);var b=MochiKit.DOM.removeElementClass(f,g);if(b){MochiKit.DOM.addElementClass(f,a)}return b},hasElementClass:function(f,g){var k=MochiKit.DOM.getElement(f);var c=k.className.split(" ");for(var b=1;b<arguments.length;b++){var h=false;for(var a=0;a<c.length;a++){if(c[a]==arguments[b]){h=true;break}}if(!h){return false}}return true},escapeHTML:function(a){return a.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},toHTML:function(a){return MochiKit.DOM.emitHTML(a).join("")},emitHTML:function(f,k){if(typeof(k)=="undefined"||k===null){k=[]}var m=[f];var s=MochiKit.DOM;var r=s.escapeHTML;var b=s.attributeArray;while(m.length){f=m.pop();if(typeof(f)=="string"){k.push(f)}else{if(f.nodeType==1){k.push("<"+f.nodeName.toLowerCase());var g=[];var n=b(f);for(var h=0;h<n.length;h++){var o=n[h];g.push([" ",o.name,'="',r(o.value),'"'])}g.sort();for(h=0;h<g.length;h++){var q=g[h];for(var c=0;c<q.length;c++){k.push(q[c])}}if(f.hasChildNodes()){k.push(">");m.push("</"+f.nodeName.toLowerCase()+">");var l=f.childNodes;for(h=l.length-1;h>=0;h--){m.push(l[h])}}else{k.push("/>")}}else{if(f.nodeType==3){k.push(r(f.nodeValue))}}}}return k},scrapeText:function(b,a){var c=[];(function(h){var j=h.childNodes;if(j){for(var g=0;g<j.length;g++){arguments.callee.call(this,j[g])}}var f=h.nodeValue;if(typeof(f)=="string"){c.push(f)}})(MochiKit.DOM.getElement(b));if(a){return c}else{return c.join("")}},removeEmptyTextNodes:function(b){b=MochiKit.DOM.getElement(b);for(var a=0;a<b.childNodes.length;a++){var c=b.childNodes[a];if(c.nodeType==3&&!/\S/.test(c.nodeValue)){c.parentNode.removeChild(c)}}},__new__:function(l){var g=MochiKit.Base;if(typeof(document)!="undefined"){this._document=document}else{if(MochiKit.MockDOM){this._document=MochiKit.MockDOM.document}}this._window=l;this.domConverters=new g.AdapterRegistry();var o=this._document.createElement("span");var b;if(o&&o.attributes&&o.attributes.length>0){var c=g.filter;b=function(a){return c(b.ignoreAttrFilter,a.attributes)};b.ignoreAttr={};var q=o.attributes;var h=b.ignoreAttr;for(var k=0;k<q.length;k++){var n=q[k];h[n.name]=n.value}b.ignoreAttrFilter=function(m){return(b.ignoreAttr[m.name]!=m.value)};b.compliant=false;b.renames={"class":"className",checked:"defaultChecked",usemap:"useMap","for":"htmlFor",readonly:"readOnly"}}else{b=function(a){return a.attributes};b.compliant=true;b.renames={}}this.attributeArray=b;var j=function(t,a){var m=a[1].split(".");var s="";var r={};s+="if (!MochiKit."+m[1]+') { throw new Error("';s+="This function has been deprecated and depends on MochiKit.";s+=m[1]+'.");}';s+="return MochiKit."+m[1]+"."+a[0];s+=".apply(this, arguments);";r[m[2]]=new Function(s);MochiKit.Base.update(MochiKit[t],r)};for(var k;k<MochiKit.DOM.DEPRECATED.length;k++){j("DOM",MochiKit.DOM.DEPRECATED[k])}var f=this.createDOMFunc;this.UL=f("ul");this.OL=f("ol");this.LI=f("li");this.TD=f("td");this.TR=f("tr");this.TBODY=f("tbody");this.THEAD=f("thead");this.TFOOT=f("tfoot");this.TABLE=f("table");this.TH=f("th");this.INPUT=f("input");this.SPAN=f("span");this.A=f("a");this.DIV=f("div");this.IMG=f("img");this.BUTTON=f("button");this.TT=f("tt");this.PRE=f("pre");this.H1=f("h1");this.H2=f("h2");this.H3=f("h3");this.BR=f("br");this.HR=f("hr");this.LABEL=f("label");this.TEXTAREA=f("textarea");this.FORM=f("form");this.P=f("p");this.SELECT=f("select");this.OPTION=f("option");this.OPTGROUP=f("optgroup");this.LEGEND=f("legend");this.FIELDSET=f("fieldset");this.STRONG=f("strong");this.CANVAS=f("canvas");this.$=this.getElement;this.EXPORT_TAGS={":common":this.EXPORT,":all":g.concat(this.EXPORT,this.EXPORT_OK)};g.nameFunctions(this)}});MochiKit.DOM.__new__(((typeof(window)=="undefined")?this:window));if(MochiKit.__export__){withWindow=MochiKit.DOM.withWindow;withDocument=MochiKit.DOM.withDocument}MochiKit.Base._exportSymbols(this,MochiKit.DOM);if(typeof(dojo)!="undefined"){dojo.provide("MochiKit.Style");dojo.require("MochiKit.Base");dojo.require("MochiKit.DOM")}if(typeof(JSAN)!="undefined"){JSAN.use("MochiKit.Base",[])}try{if(typeof(MochiKit.Base)=="undefined"){throw""}}catch(e){throw"MochiKit.Style depends on MochiKit.Base!"}try{if(typeof(MochiKit.DOM)=="undefined"){throw""}}catch(e){throw"MochiKit.Style depends on MochiKit.DOM!"}if(typeof(MochiKit.Style)=="undefined"){MochiKit.Style={}}MochiKit.Style.NAME="MochiKit.Style";MochiKit.Style.VERSION="1.4";MochiKit.Style.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"};MochiKit.Style.toString=function(){return this.__repr__()};MochiKit.Style.EXPORT_OK=[];MochiKit.Style.EXPORT=["setOpacity","computedStyle","getElementDimensions","elementDimensions","setElementDimensions","getElementPosition","elementPosition","setElementPosition","setDisplayForElement","hideElement","showElement","getViewportDimensions","Dimensions","Coordinates"];MochiKit.Style.Dimensions=function(a,b){this.w=a;this.h=b};MochiKit.Style.Dimensions.prototype.__repr__=function(){var a=MochiKit.Base.repr;return"{w: "+a(this.w)+", h: "+a(this.h)+"}"};MochiKit.Style.Dimensions.prototype.toString=function(){return this.__repr__()};MochiKit.Style.Coordinates=function(a,b){this.x=a;this.y=b};MochiKit.Style.Coordinates.prototype.__repr__=function(){var a=MochiKit.Base.repr;return"{x: "+a(this.x)+", y: "+a(this.y)+"}"};MochiKit.Style.Coordinates.prototype.toString=function(){return this.__repr__()};MochiKit.Base.update(MochiKit.Style,{computedStyle:function(f,a){var j=MochiKit.DOM;var h=j._document;f=j.getElement(f);a=MochiKit.Base.camelize(a);if(!f||f==h){return undefined}if(a=="opacity"&&f.filters){try{return f.filters.item("DXImageTransform.Microsoft.Alpha").opacity/100}catch(g){try{return f.filters.item("alpha").opacity/100}catch(g){}}}if(f.currentStyle){return f.currentStyle[a]}if(typeof(h.defaultView)=="undefined"){return undefined}if(h.defaultView===null){return undefined}var c=h.defaultView.getComputedStyle(f,null);if(typeof(c)=="undefined"||c===null){return undefined}var b=a.replace(/([A-Z])/g,"-$1").toLowerCase();return c.getPropertyValue(b)},setOpacity:function(a,b){a=MochiKit.DOM.getElement(a);MochiKit.DOM.updateNodeAttributes(a,{style:{opacity:b,"-moz-opacity":b,"-khtml-opacity":b,filter:" alpha(opacity="+(b*100)+")"}})},getElementPosition:function(f,g,o){var r=MochiKit.Style;var h=MochiKit.DOM;f=h.getElement(f);if(!f||(!(f.x&&f.y)&&(!f.parentNode==null||r.computedStyle(f,"display")=="none"))){return undefined}var l=new r.Coordinates(0,0);var j=null;var q=null;var k=o?o:MochiKit.DOM._document;var n=k.documentElement;var m=k.body;if(!f.parentNode&&f.x&&f.y){l.x+=f.x||0;l.y+=f.y||0}else{if(f.getBoundingClientRect){j=f.getBoundingClientRect();l.x+=j.left+(n.scrollLeft||m.scrollLeft)-(n.clientLeft||0);l.y+=j.top+(n.scrollTop||m.scrollTop)-(n.clientTop||0)}else{if(f.offsetParent){l.x+=f.offsetLeft;l.y+=f.offsetTop;q=f.offsetParent;if(q!=f){while(q){l.x+=q.offsetLeft;l.y+=q.offsetTop;q=q.offsetParent}}var a=navigator.userAgent.toLowerCase();if((typeof(opera)!="undefined"&&parseFloat(opera.version())<9)||(a.indexOf("safari")!=-1&&r.computedStyle(f,"position")=="absolute")){l.x-=m.offsetLeft;l.y-=m.offsetTop}}}}if(typeof(g)!="undefined"){g=arguments.callee(g);if(g){l.x-=(g.x||0);l.y-=(g.y||0)}}if(f.parentNode){q=f.parentNode}else{q=null}while(q&&q.tagName!="BODY"&&q.tagName!="HTML"){l.x-=q.scrollLeft;l.y-=q.scrollTop;if(q.parentNode){q=q.parentNode}else{q=null}}return l},setElementPosition:function(c,b,a){c=MochiKit.DOM.getElement(c);if(typeof(a)=="undefined"){a="px"}MochiKit.DOM.updateNodeAttributes(c,{style:{left:b.x+a,top:b.y+a}})},getElementDimensions:function(f){var a=MochiKit.Style;var j=MochiKit.DOM;if(typeof(f.w)=="number"||typeof(f.h)=="number"){return new a.Dimensions(f.w||0,f.h||0)}f=j.getElement(f);if(!f){return undefined}if(a.computedStyle(f,"display")!="none"){return new a.Dimensions(f.offsetWidth||0,f.offsetHeight||0)}var c=f.style;var h=c.visibility;var b=c.position;c.visibility="hidden";c.position="absolute";c.display="";var k=f.offsetWidth;var g=f.offsetHeight;c.display="none";c.position=b;c.visibility=h;return new a.Dimensions(k,g)},setElementDimensions:function(c,b,a){c=MochiKit.DOM.getElement(c);if(typeof(a)=="undefined"){a="px"}MochiKit.DOM.updateNodeAttributes(c,{style:{width:b.w+a,height:b.h+a}})},setDisplayForElement:function(g,b){var f=MochiKit.Base.extend(null,arguments,1);var c=MochiKit.DOM.getElement;for(var a=0;a<f.length;a++){var b=c(f[a]);if(b){b.style.display=g}}},getViewportDimensions:function(){var f=new MochiKit.Style.Dimensions();var c=MochiKit.DOM._window;var a=MochiKit.DOM._document.body;if(c.innerWidth){f.w=c.innerWidth;f.h=c.innerHeight}else{if(a.parentElement.clientWidth){f.w=a.parentElement.clientWidth;f.h=a.parentElement.clientHeight}else{if(a&&a.clientWidth){f.w=a.clientWidth;f.h=a.clientHeight}}}return f},__new__:function(){var a=MochiKit.Base;this.elementPosition=this.getElementPosition;this.elementDimensions=this.getElementDimensions;this.hideElement=a.partial(this.setDisplayForElement,"none");this.showElement=a.partial(this.setDisplayForElement,"block");this.EXPORT_TAGS={":common":this.EXPORT,":all":a.concat(this.EXPORT,this.EXPORT_OK)};a.nameFunctions(this)}});MochiKit.Style.__new__();MochiKit.Base._exportSymbols(this,MochiKit.Style);if(typeof(dojo)!="undefined"){dojo.provide("MochiKit.Signal");dojo.require("MochiKit.Base");dojo.require("MochiKit.DOM");dojo.require("MochiKit.Style")}if(typeof(JSAN)!="undefined"){JSAN.use("MochiKit.Base",[]);JSAN.use("MochiKit.DOM",[])}try{if(typeof(MochiKit.Base)=="undefined"){throw""}}catch(e){throw"MochiKit.Signal depends on MochiKit.Base!"}try{if(typeof(MochiKit.DOM)=="undefined"){throw""}}catch(e){throw"MochiKit.Signal depends on MochiKit.DOM!"}try{if(typeof(MochiKit.Style)=="undefined"){throw""}}catch(e){throw"MochiKit.Signal depends on MochiKit.Style!"}if(typeof(MochiKit.Signal)=="undefined"){MochiKit.Signal={}}MochiKit.Signal.NAME="MochiKit.Signal";MochiKit.Signal.VERSION="1.4";MochiKit.Signal._observers=[];MochiKit.Signal.Event=function(b,a){this._event=a||window.event;this._src=b};MochiKit.Base.update(MochiKit.Signal.Event.prototype,{__repr__:function(){var a=MochiKit.Base.repr;var b="{event(): "+a(this.event())+", src(): "+a(this.src())+", type(): "+a(this.type())+", target(): "+a(this.target())+", modifier(): {alt: "+a(this.modifier().alt)+", ctrl: "+a(this.modifier().ctrl)+", meta: "+a(this.modifier().meta)+", shift: "+a(this.modifier().shift)+", any: "+a(this.modifier().any)+"}";if(this.type()&&this.type().indexOf("key")===0){b+=", key(): {code: "+a(this.key().code)+", string: "+a(this.key().string)+"}"}if(this.type()&&(this.type().indexOf("mouse")===0||this.type().indexOf("click")!=-1||this.type()=="contextmenu")){b+=", mouse(): {page: "+a(this.mouse().page)+", client: "+a(this.mouse().client);if(this.type()!="mousemove"){b+=", button: {left: "+a(this.mouse().button.left)+", middle: "+a(this.mouse().button.middle)+", right: "+a(this.mouse().button.right)+"}}"}else{b+="}"}}if(this.type()=="mouseover"||this.type()=="mouseout"){b+=", relatedTarget(): "+a(this.relatedTarget())}b+="}";return b},toString:function(){return this.__repr__()},src:function(){return this._src},event:function(){return this._event},type:function(){return this._event.type||undefined},target:function(){return this._event.target||this._event.srcElement},_relatedTarget:null,relatedTarget:function(){if(this._relatedTarget!==null){return this._relatedTarget}var a=null;if(this.type()=="mouseover"){a=(this._event.relatedTarget||this._event.fromElement)}else{if(this.type()=="mouseout"){a=(this._event.relatedTarget||this._event.toElement)}}if(a!==null){this._relatedTarget=a;return a}return undefined},_modifier:null,modifier:function(){if(this._modifier!==null){return this._modifier}var a={};a.alt=this._event.altKey;a.ctrl=this._event.ctrlKey;a.meta=this._event.metaKey||false;a.shift=this._event.shiftKey;a.any=a.alt||a.ctrl||a.shift||a.meta;this._modifier=a;return a},_key:null,key:function(){if(this._key!==null){return this._key}var a={};if(this.type()&&this.type().indexOf("key")===0){if(this.type()=="keydown"||this.type()=="keyup"){a.code=this._event.keyCode;a.string=(MochiKit.Signal._specialKeys[a.code]||"KEY_UNKNOWN");this._key=a;return a}else{if(this.type()=="keypress"){a.code=0;a.string="";if(typeof(this._event.charCode)!="undefined"&&this._event.charCode!==0&&!MochiKit.Signal._specialMacKeys[this._event.charCode]){a.code=this._event.charCode;a.string=String.fromCharCode(a.code)}else{if(this._event.keyCode&&typeof(this._event.charCode)=="undefined"){a.code=this._event.keyCode;a.string=String.fromCharCode(a.code)}}this._key=a;return a}}}return undefined},_mouse:null,mouse:function(){if(this._mouse!==null){return this._mouse}var c={};var f=this._event;if(this.type()&&(this.type().indexOf("mouse")===0||this.type().indexOf("click")!=-1||this.type()=="contextmenu")){c.client=new MochiKit.Style.Coordinates(0,0);if(f.clientX||f.clientY){c.client.x=(!f.clientX||f.clientX<0)?0:f.clientX;c.client.y=(!f.clientY||f.clientY<0)?0:f.clientY}c.page=new MochiKit.Style.Coordinates(0,0);if(f.pageX||f.pageY){c.page.x=(!f.pageX||f.pageX<0)?0:f.pageX;c.page.y=(!f.pageY||f.pageY<0)?0:f.pageY}else{var g=MochiKit.DOM._document.documentElement;var a=MochiKit.DOM._document.body;c.page.x=f.clientX+(g.scrollLeft||a.scrollLeft)-(g.clientLeft||0);c.page.y=f.clientY+(g.scrollTop||a.scrollTop)-(g.clientTop||0)}if(this.type()!="mousemove"){c.button={};c.button.left=false;c.button.right=false;c.button.middle=false;if(f.which){c.button.left=(f.which==1);c.button.middle=(f.which==2);c.button.right=(f.which==3)}else{c.button.left=!!(f.button&1);c.button.right=!!(f.button&2);c.button.middle=!!(f.button&4)}}this._mouse=c;return c}return undefined},stop:function(){this.stopPropagation();this.preventDefault()},stopPropagation:function(){if(this._event.stopPropagation){this._event.stopPropagation()}else{this._event.cancelBubble=true}},preventDefault:function(){if(this._event.preventDefault){this._event.preventDefault()}else{if(this._confirmUnload===null){this._event.returnValue=false}}},_confirmUnload:null,confirmUnload:function(a){if(this.type()=="beforeunload"){this._confirmUnload=a;this._event.returnValue=a}}});MochiKit.Signal._specialMacKeys={3:"KEY_ENTER",63289:"KEY_NUM_PAD_CLEAR",63276:"KEY_PAGE_UP",63277:"KEY_PAGE_DOWN",63275:"KEY_END",63273:"KEY_HOME",63234:"KEY_ARROW_LEFT",63232:"KEY_ARROW_UP",63235:"KEY_ARROW_RIGHT",63233:"KEY_ARROW_DOWN",63302:"KEY_INSERT",63272:"KEY_DELETE"};for(i=63236;i<=63242;i++){MochiKit.Signal._specialMacKeys[i]="KEY_F"+(i-63236+1)}MochiKit.Signal._specialKeys={8:"KEY_BACKSPACE",9:"KEY_TAB",12:"KEY_NUM_PAD_CLEAR",13:"KEY_ENTER",16:"KEY_SHIFT",17:"KEY_CTRL",18:"KEY_ALT",19:"KEY_PAUSE",20:"KEY_CAPS_LOCK",27:"KEY_ESCAPE",32:"KEY_SPACEBAR",33:"KEY_PAGE_UP",34:"KEY_PAGE_DOWN",35:"KEY_END",36:"KEY_HOME",37:"KEY_ARROW_LEFT",38:"KEY_ARROW_UP",39:"KEY_ARROW_RIGHT",40:"KEY_ARROW_DOWN",44:"KEY_PRINT_SCREEN",45:"KEY_INSERT",46:"KEY_DELETE",59:"KEY_SEMICOLON",91:"KEY_WINDOWS_LEFT",92:"KEY_WINDOWS_RIGHT",93:"KEY_SELECT",106:"KEY_NUM_PAD_ASTERISK",107:"KEY_NUM_PAD_PLUS_SIGN",109:"KEY_NUM_PAD_HYPHEN-MINUS",110:"KEY_NUM_PAD_FULL_STOP",111:"KEY_NUM_PAD_SOLIDUS",144:"KEY_NUM_LOCK",145:"KEY_SCROLL_LOCK",186:"KEY_SEMICOLON",187:"KEY_EQUALS_SIGN",188:"KEY_COMMA",189:"KEY_HYPHEN-MINUS",190:"KEY_FULL_STOP",191:"KEY_SOLIDUS",192:"KEY_GRAVE_ACCENT",219:"KEY_LEFT_SQUARE_BRACKET",220:"KEY_REVERSE_SOLIDUS",221:"KEY_RIGHT_SQUARE_BRACKET",222:"KEY_APOSTROPHE"};for(var i=48;i<=57;i++){MochiKit.Signal._specialKeys[i]="KEY_"+(i-48)}for(i=65;i<=90;i++){MochiKit.Signal._specialKeys[i]="KEY_"+String.fromCharCode(i)}for(i=96;i<=105;i++){MochiKit.Signal._specialKeys[i]="KEY_NUM_PAD_"+(i-96)}for(i=112;i<=123;i++){MochiKit.Signal._specialKeys[i]="KEY_F"+(i-112+1)}MochiKit.Base.update(MochiKit.Signal,{__repr__:function(){return"["+this.NAME+" "+this.VERSION+"]"},toString:function(){return this.__repr__()},_unloadCache:function(){var a=MochiKit.Signal;var f=a._observers;for(var b=0;b<f.length;b++){a._disconnect(f[b])}delete a._observers;try{window.onload=undefined}catch(c){}try{window.onunload=undefined}catch(c){}},_listener:function(g,b,f,a){var c=MochiKit.Signal.Event;if(!a){return MochiKit.Base.bind(b,f)}f=f||g;if(typeof(b)=="string"){return function(h){f[b].apply(f,[new c(g,h)])}}else{return function(h){b.apply(f,[new c(g,h)])}}},connect:function(a,m,k,b){a=MochiKit.DOM.getElement(a);var l=MochiKit.Signal;if(typeof(m)!="string"){throw new Error("'sig' must be a string")}var h=null;var f=null;if(typeof(b)!="undefined"){h=k;f=b;if(typeof(b)=="string"){if(typeof(k[b])!="function"){throw new Error("'funcOrStr' must be a function on 'objOrFunc'")}}else{if(typeof(b)!="function"){throw new Error("'funcOrStr' must be a function or string")}}}else{if(typeof(k)!="function"){throw new Error("'objOrFunc' must be a function if 'funcOrStr' is not given")}else{f=k}}if(typeof(h)=="undefined"||h===null){h=a}var j=!!(a.addEventListener||a.attachEvent);var c=l._listener(a,f,h,j);if(a.addEventListener){a.addEventListener(m.substr(2),c,false)}else{if(a.attachEvent){a.attachEvent(m,c)}}var g=[a,m,c,j,k,b];l._observers.push(g);return g},_disconnect:function(b){if(!b[3]){return}var f=b[0];var c=b[1];var a=b[2];if(f.removeEventListener){f.removeEventListener(c.substr(2),a,false)}else{if(f.detachEvent){f.detachEvent(c,a)}else{throw new Error("'src' must be a DOM element")}}},disconnect:function(j){var n=MochiKit.Signal;var k=n._observers;var f=MochiKit.Base;if(arguments.length>1){var a=MochiKit.DOM.getElement(arguments[0]);var q=arguments[1];var h=arguments[2];var c=arguments[3];for(var g=k.length-1;g>=0;g--){var b=k[g];if(b[0]===a&&b[1]===q&&b[4]===h&&b[5]===c){n._disconnect(b);k.splice(g,1);return true}}}else{var l=f.findIdentical(k,j);if(l>=0){n._disconnect(j);k.splice(l,1);return true}}return false},disconnectAll:function(a,n){a=MochiKit.DOM.getElement(a);var b=MochiKit.Base;var c=b.flattenArguments(b.extend(null,arguments,1));var k=MochiKit.Signal;var j=k._disconnect;var h=k._observers;if(c.length===0){for(var g=h.length-1;g>=0;g--){var f=h[g];if(f[0]===a){j(f);h.splice(g,1)}}}else{var l={};for(var g=0;g<c.length;g++){l[c[g]]=true}for(var g=h.length-1;g>=0;g--){var f=h[g];if(f[0]===a&&f[1] in l){j(f);h.splice(g,1)}}}},signal:function(j,h){var g=MochiKit.Signal._observers;j=MochiKit.DOM.getElement(j);var a=MochiKit.Base.extend(null,arguments,2);var k=[];for(var b=0;b<g.length;b++){var c=g[b];if(c[0]===j&&c[1]===h){try{c[2].apply(j,a)}catch(f){k.push(f)}}}if(k.length==1){throw k[0]}else{if(k.length>1){var f=new Error("Multiple errors thrown in handling 'sig', see errors property");f.errors=k;throw f}}}});MochiKit.Signal.EXPORT_OK=[];MochiKit.Signal.EXPORT=["connect","disconnect","signal","disconnectAll"];MochiKit.Signal.__new__=function(c){var a=MochiKit.Base;this._document=document;this._window=c;try{this.connect(window,"onunload",this._unloadCache)}catch(b){}this.EXPORT_TAGS={":common":this.EXPORT,":all":a.concat(this.EXPORT,this.EXPORT_OK)};a.nameFunctions(this)};MochiKit.Signal.__new__(this);if(MochiKit.__export__){connect=MochiKit.Signal.connect;disconnect=MochiKit.Signal.disconnect;disconnectAll=MochiKit.Signal.disconnectAll;signal=MochiKit.Signal.signal}MochiKit.Base._exportSymbols(this,MochiKit.Signal);MochiKit.Base.update(MochiKit.Base,{isIE:function(){return/MSIE/.test(navigator.userAgent)},isGecko:function(){return/Gecko/.test(navigator.userAgent)},isKHTML:function(){return/Konqueror|Safari|KHTML/.test(navigator.userAgent)},isSafari:function(){return/AppleWebKit'/.test(navigator.appVersion)},isOpera:function(){return/Opera/.test(navigator.userAgent)}});MochiKit.Base.update(MochiKit.DOM,{getStyle:function(b,c){b=MochiKit.DOM.getElement(b);var f=b.style[MochiKit.Base.camelize(c)];if(!f){if(document.defaultView&&document.defaultView.getComputedStyle){var a=document.defaultView.getComputedStyle(b,null);f=a?a.getPropertyValue(c):null}else{if(b.currentStyle){f=b.currentStyle[MochiKit.Base.camelize(c)]}}}if(MochiKit.Base.isOpera()&&(MochiKit.Base.find(["left","top","right","bottom"],c))){if(MochiKit.DOM.getStyle(b,"position")=="static"){f="auto"}}return f=="auto"?null:f},setStyle:function(b,c){b=MochiKit.DOM.getElement(b);for(var a in c){b.style[MochiKit.Base.camelize(a)]=c[a]}},getOpacity:function(b){var a;if(a=MochiKit.DOM.getStyle(b,"opacity")){return parseFloat(a)}if(a=(MochiKit.DOM.getStyle(b,"filter")||"").match(/alpha\(opacity=(.*)\)/)){if(a[1]){return parseFloat(a[1])/100}}return 1},getInlineOpacity:function(a){return MochiKit.DOM.getElement(a).style.opacity||""},setOpacity:function(a,c){a=MochiKit.DOM.getElement(a);if(c==1){var b=a.style.cssText;if(MochiKit.Base.isIE()){b=b.replace(/filter: ?alpha\([^\)]*\);?/gi,"")}a.style.cssText=b.replace(/opacity: ?\d\.?\d*/gi,"")}else{if(c<0.00001){c=0}MochiKit.DOM.setStyle(a,{opacity:c});if(MochiKit.Base.isIE()){MochiKit.DOM.setStyle(a,{filter:MochiKit.DOM.getStyle(a,"filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+c*100+")"})}}},isVisible:function(a){return MochiKit.DOM.getElement(a).style.display!="none"},makeClipping:function(a){a=MochiKit.DOM.getElement(a);if(a._overflow){return}a._overflow=a.style.overflow;if((MochiKit.DOM.getStyle(a,"overflow")||"visible")!="hidden"){a.style.overflow="hidden"}},undoClipping:function(a){a=MochiKit.DOM.getElement(a);if(!a._overflow){return}a.style.overflow=a._overflow;a._overflow=undefined},makePositioned:function(a){a=MochiKit.DOM.getElement(a);var b=MochiKit.DOM.getStyle(a,"position");if((b=="static"||!b)&&!a._madePositioned){a._madePositioned=true;a.style.position="relative";if(MochiKit.Base.isOpera()){a.style.top=0;a.style.left=0}}},undoPositioned:function(a){a=MochiKit.DOM.getElement(a);if(a._madePositioned){a._madePositioned=undefined;a.style.position=a.style.top=a.style.left=a.style.bottom=a.style.right=""}},getFirstElementByTagAndClassName:function(f,k,l){var m=MochiKit.DOM;if(typeof(f)=="undefined"||f===null){f="*"}if(typeof(l)=="undefined"||l===null){l=m._document}l=m.getElement(l);var c=(l.getElementsByTagName(f)||m._document.all);if(typeof(k)=="undefined"||k===null){return MochiKit.Base.extend(null,c)}for(var h=0;h<c.length;h++){var b=c[h];var a=b.className.split(" ");for(var g=0;g<a.length;g++){if(a[g]==k){return b}}}},isParent:function(b,a){if(!b.parentNode||b==a){return false}if(b.parentNode==a){return true}return MochiKit.DOM.isParent(b.parentNode,a)}});MochiKit.Position={includeScrollOffsets:false,prepare:function(){var b=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;var a=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;this.windowOffset=new MochiKit.Style.Coordinates(b,a)},cumulativeOffset:function(b){var a=0;var c=0;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;b=b.offsetParent}while(b);return new MochiKit.Style.Coordinates(c,a)},realOffset:function(b){var a=0;var c=0;do{a+=b.scrollTop||0;c+=b.scrollLeft||0;b=b.parentNode}while(b);return new MochiKit.Style.Coordinates(c,a)},within:function(b,a,c){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(b,a,c)}this.xcomp=a;this.ycomp=c;this.offset=this.cumulativeOffset(b);if(b.style.position=="fixed"){this.offset.x+=this.windowOffset.x;this.offset.y+=this.windowOffset.y}return(c>=this.offset.y&&c<this.offset.y+b.offsetHeight&&a>=this.offset.x&&a<this.offset.x+b.offsetWidth)},withinIncludingScrolloffsets:function(b,a,f){var c=this.realOffset(b);this.xcomp=a+c.x-this.windowOffset.x;this.ycomp=f+c.y-this.windowOffset.y;this.offset=this.cumulativeOffset(b);return(this.ycomp>=this.offset.y&&this.ycomp<this.offset.y+b.offsetHeight&&this.xcomp>=this.offset.x&&this.xcomp<this.offset.x+b.offsetWidth)},overlap:function(b,a){if(!b){return 0}if(b=="vertical"){return((this.offset.y+a.offsetHeight)-this.ycomp)/a.offsetHeight}if(b=="horizontal"){return((this.offset.x+a.offsetWidth)-this.xcomp)/a.offsetWidth}},absolutize:function(c){c=MochiKit.DOM.getElement(c);if(c.style.position=="absolute"){return}MochiKit.Position.prepare();var g=MochiKit.Position.positionedOffset(c);var f=c.clientWidth;var a=c.clientHeight;var b={position:c.style.position,left:g.x-parseFloat(c.style.left||0),top:g.y-parseFloat(c.style.top||0),width:c.style.width,height:c.style.height};c.style.position="absolute";c.style.top=g.y+"px";c.style.left=g.x+"px";c.style.width=f+"px";c.style.height=a+"px";return b},positionedOffset:function(b){var a=0,c=0;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;b=b.offsetParent;if(b){p=MochiKit.DOM.getStyle(b,"position");if(p=="relative"||p=="absolute"){break}}}while(b);return new MochiKit.Style.Coordinates(c,a)},relativize:function(b,a){b=MochiKit.DOM.getElement(b);if(b.style.position=="relative"){return}MochiKit.Position.prepare();var f=parseFloat(b.style.top||0)-(a.top||0);var c=parseFloat(b.style.left||0)-(a.left||0);b.style.position=a.position;b.style.top=f+"px";b.style.left=c+"px";b.style.width=a.width;b.style.height=a.height},clone:function(b,c){b=MochiKit.DOM.getElement(b);c=MochiKit.DOM.getElement(c);c.style.position="absolute";var a=this.cumulativeOffset(b);c.style.top=a.y+"px";c.style.left=a.x+"px";c.style.width=b.offsetWidth+"px";c.style.height=b.offsetHeight+"px"},page:function(f){var a=0;var c=0;var b=f;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;if(b.offsetParent==document.body&&MochiKit.DOM.getStyle(b,"position")=="absolute"){break}}while(b=b.offsetParent);b=f;do{a-=b.scrollTop||0;c-=b.scrollLeft||0}while(b=b.parentNode);return new MochiKit.Style.Coordinates(c,a)}};if(typeof(dojo)!="undefined"){dojo.provide("MochiKit.Color");dojo.require("MochiKit.Base");dojo.require("MochiKit.DOM");dojo.require("MochiKit.Style")}if(typeof(JSAN)!="undefined"){JSAN.use("MochiKit.Base",[]);JSAN.use("MochiKit.DOM",[]);JSAN.use("MochiKit.Style",[])}try{if(typeof(MochiKit.Base)=="undefined"){throw""}}catch(e){throw"MochiKit.Color depends on MochiKit.Base"}try{if(typeof(MochiKit.Base)=="undefined"){throw""}}catch(e){throw"MochiKit.Color depends on MochiKit.DOM"}try{if(typeof(MochiKit.Base)=="undefined"){throw""}}catch(e){throw"MochiKit.Color depends on MochiKit.Style"}if(typeof(MochiKit.Color)=="undefined"){MochiKit.Color={}}MochiKit.Color.NAME="MochiKit.Color";MochiKit.Color.VERSION="1.4";MochiKit.Color.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"};MochiKit.Color.toString=function(){return this.__repr__()};MochiKit.Color.Color=function(f,b,a,c){if(typeof(c)=="undefined"||c===null){c=1}this.rgb={r:f,g:b,b:a,a:c}};MochiKit.Color.Color.prototype={__class__:MochiKit.Color.Color,toString:function(){return this.toRGBString()},repr:function(){var b=this.rgb;var a=[b.r,b.g,b.b,b.a];return this.__class__.NAME+"("+a.join(", ")+")"}};MochiKit.Base.update(MochiKit.Color.Color,{fromComputedStyle:function(g,f){var h=MochiKit.DOM;var a=MochiKit.Color.Color;for(g=h.getElement(g);g;g=g.parentNode){var c=MochiKit.Style.computedStyle.apply(h,arguments);if(!c){continue}var b=a.fromString(c);if(!b){break}if(b.asRGB().a>0){return b}}return null},fromBackground:function(b){var a=MochiKit.Color.Color;return a.fromComputedStyle(b,"backgroundColor","background-color")||a.whiteColor()},fromText:function(b){var a=MochiKit.Color.Color;return a.fromComputedStyle(b,"color","color")||a.blackColor()},namedColors:function(){return MochiKit.Base.clone(MochiKit.Color.Color._namedColors)}});MochiKit.Base.update(MochiKit.Color,{__new__:function(){var a=MochiKit.Base;a.nameFunctions(this);this.EXPORT_TAGS={":common":this.EXPORT,":all":a.concat(this.EXPORT,this.EXPORT_OK)}}});MochiKit.Color.EXPORT=["Color"];MochiKit.Color.EXPORT_OK=["clampColorComponent","rgbToHSL","hslToRGB","rgbToHSV","hsvToRGB","toColorPart"];MochiKit.Color.__new__();MochiKit.Base._exportSymbols(this,MochiKit.Color);if(typeof(dojo)!="undefined"){dojo.provide("MochiKit.Iter");dojo.require("MochiKit.Base")}if(typeof(JSAN)!="undefined"){JSAN.use("MochiKit.Base",[])}try{if(typeof(MochiKit.Base)=="undefined"){throw""}}catch(e){throw"MochiKit.Iter depends on MochiKit.Base!"}if(typeof(MochiKit.Iter)=="undefined"){MochiKit.Iter={}}MochiKit.Iter.NAME="MochiKit.Iter";MochiKit.Iter.VERSION="1.4";MochiKit.Base.update(MochiKit.Iter,{__repr__:function(){return"["+this.NAME+" "+this.VERSION+"]"},toString:function(){return this.__repr__()},registerIteratorFactory:function(b,a,f,c){MochiKit.Iter.iteratorRegistry.register(b,a,f,c)},iter:function(f,c){var b=MochiKit.Iter;if(arguments.length==2){return b.takewhile(function(h){return h!=c},f)}if(typeof(f.next)=="function"){return f}else{if(typeof(f.iter)=="function"){return f.iter()}}try{return b.iteratorRegistry.match(f)}catch(g){var a=MochiKit.Base;if(g==a.NotFound){g=new TypeError(typeof(f)+": "+a.repr(f)+" is not iterable")}throw g}},repeat:function(b,c){var a=MochiKit.Base;if(typeof(c)=="undefined"){return{repr:function(){return"repeat("+a.repr(b)+")"},toString:a.forwardCall("repr"),next:function(){return b}}}return{repr:function(){return"repeat("+a.repr(b)+", "+c+")"},toString:a.forwardCall("repr"),next:function(){if(c<=0){throw MochiKit.Iter.StopIteration}c-=1;return b}}},next:function(a){return a.next()},ifilter:function(c,b){var a=MochiKit.Base;b=MochiKit.Iter.iter(b);if(c===null){c=a.operator.truth}return{repr:function(){return"ifilter(...)"},toString:a.forwardCall("repr"),next:function(){while(true){var f=b.next();if(c(f)){return f}}return undefined}}},ifilterfalse:function(c,b){var a=MochiKit.Base;b=MochiKit.Iter.iter(b);if(c===null){c=a.operator.truth}return{repr:function(){return"ifilterfalse(...)"},toString:a.forwardCall("repr"),next:function(){while(true){var f=b.next();if(!c(f)){return f}}return undefined}}},imap:function(c,k,h){var a=MochiKit.Base;var f=MochiKit.Iter;var b=a.map(f.iter,a.extend(null,arguments,1));var j=a.map;var g=f.next;return{repr:function(){return"imap(...)"},toString:a.forwardCall("repr"),next:function(){return c.apply(this,j(g,b))}}},list:function(c){var a=MochiKit.Base;if(typeof(c.slice)=="function"){return c.slice()}else{if(a.isArrayLike(c)){return a.concat(c)}}var b=MochiKit.Iter;c=b.iter(c);var g=[];try{while(true){g.push(c.next())}}catch(f){if(f!=b.StopIteration){throw f}return g}return undefined},forEach:function(g,f,b){var a=MochiKit.Base;if(arguments.length>2){f=a.bind(f,b)}if(a.isArrayLike(g)){try{for(var c=0;c<g.length;c++){f(g[c])}}catch(h){if(h!=MochiKit.Iter.StopIteration){throw h}}}else{b=MochiKit.Iter;b.exhaust(b.imap(f,g))}},every:function(c,b){var a=MochiKit.Iter;try{a.ifilterfalse(b,c).next();return false}catch(f){if(f!=a.StopIteration){throw f}return true}},arrayLikeIter:function(b){var a=0;return{repr:function(){return"arrayLikeIter(...)"},toString:MochiKit.Base.forwardCall("repr"),next:function(){if(a>=b.length){throw MochiKit.Iter.StopIteration}return b[a++]}}},hasIterateNext:function(a){return(a&&typeof(a.iterateNext)=="function")},iterateNextIter:function(a){return{repr:function(){return"iterateNextIter(...)"},toString:MochiKit.Base.forwardCall("repr"),next:function(){var b=a.iterateNext();if(b===null||b===undefined){throw MochiKit.Iter.StopIteration}return b}}}});MochiKit.Iter.EXPORT_OK=["iteratorRegistry","arrayLikeIter","hasIterateNext","iterateNextIter",];MochiKit.Iter.EXPORT=["StopIteration","registerIteratorFactory","iter","count","cycle","repeat","next","izip","ifilter","ifilterfalse","islice","imap","applymap","chain","takewhile","dropwhile","tee","list","reduce","range","sum","exhaust","forEach","every","sorted","reversed","some","iextend","groupby","groupby_as_array"];MochiKit.Iter.__new__=function(){var a=MochiKit.Base;if(typeof(StopIteration)!="undefined"){this.StopIteration=StopIteration}else{this.StopIteration=new a.NamedError("StopIteration")}this.iteratorRegistry=new a.AdapterRegistry();this.registerIteratorFactory("arrayLike",a.isArrayLike,this.arrayLikeIter);this.registerIteratorFactory("iterateNext",this.hasIterateNext,this.iterateNextIter);this.EXPORT_TAGS={":common":this.EXPORT,":all":a.concat(this.EXPORT,this.EXPORT_OK)};a.nameFunctions(this)};MochiKit.Iter.__new__();if(MochiKit.__export__){reduce=MochiKit.Iter.reduce}MochiKit.Base._exportSymbols(this,MochiKit.Iter);if(typeof(dojo)!="undefined"){dojo.provide("MochiKit.Visual");dojo.require("MochiKit.Base");dojo.require("MochiKit.DOM");dojo.require("MochiKit.Style");dojo.require("MochiKit.Color");dojo.require("MochiKit.Iter")}if(typeof(JSAN)!="undefined"){JSAN.use("MochiKit.Base",[]);JSAN.use("MochiKit.DOM",[]);JSAN.use("MochiKit.Style",[]);JSAN.use("MochiKit.Color",[]);JSAN.use("MochiKit.Iter",[])}try{if(typeof(MochiKit.Base)==="undefined"||typeof(MochiKit.DOM)==="undefined"||typeof(MochiKit.Style)==="undefined"||typeof(MochiKit.Color)==="undefined"||typeof(MochiKit.Iter)==="undefined"){throw""}}catch(e){throw"MochiKit.Visual depends on MochiKit.Base, MochiKit.DOM, MochiKit.Style, MochiKit.Color and MochiKit.Iter!"}if(typeof(MochiKit.Visual)=="undefined"){MochiKit.Visual={}}MochiKit.Visual.NAME="MochiKit.Visual";MochiKit.Visual.VERSION="1.4";MochiKit.Visual.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"};MochiKit.Visual.toString=function(){return this.__repr__()};MochiKit.Visual.forceRerendering=function(a){try{a=MochiKit.DOM.getElement(a);var c=document.createTextNode(" ");a.appendChild(c);a.removeChild(c)}catch(b){}};MochiKit.Visual.PAIRS={slide:["slideDown","slideUp"],blind:["blindDown","blindUp"],appear:["appear","fade"],size:["grow","shrink"]};MochiKit.Visual.Transitions={};MochiKit.Visual.Transitions.linear=function(a){return a};MochiKit.Visual.Transitions.sinoidal=function(a){return(-Math.cos(a*Math.PI)/2)+0.5};MochiKit.Visual.Transitions.reverse=function(a){return 1-a};MochiKit.Visual.Transitions.flicker=function(a){return((-Math.cos(a*Math.PI)/4)+0.75)+Math.random()/4};MochiKit.Visual.Transitions.wobble=function(a){return(-Math.cos(a*Math.PI*(9*a))/2)+0.5};MochiKit.Visual.Transitions.pulse=function(a){return(Math.floor(a*10)%2==0?(a*10-Math.floor(a*10)):1-(a*10-Math.floor(a*10)))};MochiKit.Visual.Transitions.none=function(a){return 0};MochiKit.Visual.Transitions.full=function(a){return 1};MochiKit.Visual.ScopedQueue=function(){this.__init__()};MochiKit.Base.update(MochiKit.Visual.ScopedQueue.prototype,{__init__:function(){this.effects=[];this.interval=null},add:function(f){var g=new Date().getTime();var a=(typeof(f.options.queue)=="string")?f.options.queue:f.options.queue.position;var b=MochiKit.Iter.forEach;switch(a){case"front":b(this.effects,function(h){if(h.state=="idle"){h.startOn+=f.finishOn;h.finishOn+=f.finishOn}});break;case"end":var c;b(this.effects,function(j){var h=j.finishOn;if(h>=(c||h)){c=h}});g=c||g;break}f.startOn+=g;f.finishOn+=g;if(!f.options.queue.limit||this.effects.length<f.options.queue.limit){this.effects.push(f)}if(!this.interval){this.interval=setInterval(MochiKit.Base.bind(this.loop,this),40)}},remove:function(a){this.effects=MochiKit.Base.filter(function(b){return b!=a},this.effects);if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var a=new Date().getTime();MochiKit.Iter.forEach(this.effects,function(b){b.loop(a)})}});MochiKit.Visual.Queues={instances:{},get:function(a){if(typeof(a)!="string"){return a}if(!this.instances[a]){this.instances[a]=new MochiKit.Visual.ScopedQueue()}return this.instances[a]}};MochiKit.Visual.Queue=MochiKit.Visual.Queues.get("global");MochiKit.Visual.DefaultOptions={transition:MochiKit.Visual.Transitions.sinoidal,duration:1,fps:25,sync:false,from:0,to:1,delay:0,queue:"parallel"};MochiKit.Visual.Base=function(){};MochiKit.Visual.Base.prototype={__class__:MochiKit.Visual.Base,start:function(b){var a=MochiKit.Visual;this.options=MochiKit.Base.setdefault(b||{},a.DefaultOptions);this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.event("beforeStart");if(!this.options.sync){a.Queues.get(typeof(this.options.queue)=="string"?"global":this.options.queue.scope).add(this)}},loop:function(c){if(c>=this.startOn){if(c>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");this.finish();this.event("afterFinish");return}var b=(c-this.startOn)/(this.finishOn-this.startOn);var a=Math.round(b*this.options.fps*this.options.duration);if(a>this.currentFrame){this.render(b);this.currentFrame=a}}},render:function(a){if(this.state=="idle"){this.state="running";this.event("beforeSetup");this.setup();this.event("afterSetup")}if(this.state=="running"){if(this.options.transition){a=this.options.transition(a)}a*=(this.options.to-this.options.from);a+=this.options.from;this.event("beforeUpdate");this.update(a);this.event("afterUpdate")}},cancel:function(){if(!this.options.sync){MochiKit.Visual.Queues.get(typeof(this.options.queue)=="string"?"global":this.options.queue.scope).remove(this)}this.state="finished"},setup:function(){},finish:function(){},update:function(a){},event:function(a){if(this.options[a+"Internal"]){this.options[a+"Internal"](this)}if(this.options[a]){this.options[a](this)}},repr:function(){return"["+this.__class__.NAME+", options:"+MochiKit.Base.repr(this.options)+"]"}};MochiKit.Visual.Opacity=function(b,a){this.__init__(b,a)};MochiKit.Visual.Opacity.prototype=new MochiKit.Visual.Base();MochiKit.Base.update(MochiKit.Visual.Opacity.prototype,{__init__:function(f,c){var a=MochiKit.Base;var g=MochiKit.DOM;this.element=g.getElement(f);if(a.isIE()&&(!this.element.currentStyle.hasLayout)){g.setStyle(this.element,{zoom:1})}c=a.update({from:g.getOpacity(this.element)||0,to:1},c||{});this.start(c)},update:function(a){MochiKit.DOM.setOpacity(this.element,a)}});MochiKit.Visual.Move=function(b,a){this.__init__(b,a)};MochiKit.Visual.Move.prototype=new MochiKit.Visual.Base();MochiKit.Base.update(MochiKit.Visual.Move.prototype,{__init__:function(b,a){this.element=MochiKit.DOM.getElement(b);a=MochiKit.Base.update({x:0,y:0,mode:"relative"},a||{});this.start(a)},setup:function(){var f=MochiKit.DOM;f.makePositioned(this.element);var b=this.element.style;var c=b.visibility;var a=b.display;if(a=="none"){b.visibility="hidden";b.display=""}this.originalLeft=parseFloat(f.getStyle(this.element,"left")||"0");this.originalTop=parseFloat(f.getStyle(this.element,"top")||"0");if(this.options.mode=="absolute"){this.options.x-=this.originalLeft;this.options.y-=this.originalTop}if(a=="none"){b.visibility=c;b.display=a}},update:function(a){MochiKit.DOM.setStyle(this.element,{left:Math.round(this.options.x*a+this.originalLeft)+"px",top:Math.round(this.options.y*a+this.originalTop)+"px"})}});MochiKit.Visual.Scale=function(b,c,a){this.__init__(b,c,a)};MochiKit.Visual.Scale.prototype=new MochiKit.Visual.Base();MochiKit.Base.update(MochiKit.Visual.Scale.prototype,{__init__:function(b,c,a){this.element=MochiKit.DOM.getElement(b);a=MochiKit.Base.update({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:c},a||{});this.start(a)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=MochiKit.DOM.getStyle(this.element,"position");var c=MochiKit.Iter.forEach;var a=MochiKit.Base.bind;this.originalStyle={};c(["top","left","width","height","fontSize"],a(function(b){this.originalStyle[b]=this.element.style[b]},this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var f=MochiKit.DOM.getStyle(this.element,"font-size")||"100%";c(["em","px","%"],a(function(b){if(f.indexOf(b)>0){this.fontSize=parseFloat(f);this.fontSizeType=b}},this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}else{if(this.options.scaleMode=="box"){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}else{this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}}},update:function(a){var b=(this.options.scaleFrom/100)+(this.factor*a);if(this.options.scaleContent&&this.fontSize){MochiKit.DOM.setStyle(this.element,{fontSize:this.fontSize*b+this.fontSizeType})}this.setDimensions(this.dims[0]*b,this.dims[1]*b)},finish:function(){if(this.restoreAfterFinish){MochiKit.DOM.setStyle(this.element,this.originalStyle)}},setDimensions:function(a,f){var g={};if(this.options.scaleX){g.width=Math.round(f)+"px"}if(this.options.scaleY){g.height=Math.round(a)+"px"}if(this.options.scaleFromCenter){var c=(a-this.dims[0])/2;var b=(f-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){g.top=this.originalTop-c+"px"}if(this.options.scaleX){g.left=this.originalLeft-b+"px"}}else{if(this.options.scaleY){g.top=-c+"px"}if(this.options.scaleX){g.left=-b+"px"}}}MochiKit.DOM.setStyle(this.element,g)}});MochiKit.Visual.fade=function(c,b){var f=MochiKit.DOM;var a=f.getInlineOpacity(c);b=MochiKit.Base.update({from:f.getOpacity(c)||1,to:0,afterFinishInternal:function(g){if(g.options.to!==0){return}MochiKit.Style.hideElement(g.element);f.setStyle(g.element,{opacity:a})}},b||{});return new MochiKit.Visual.Opacity(c,b)};MochiKit.Visual.appear=function(c,b){var f=MochiKit.DOM;var a=MochiKit.Visual;b=MochiKit.Base.update({from:(f.getStyle(c,"display")=="none"?0:f.getOpacity(c)||0),to:1,afterFinishInternal:function(g){a.forceRerendering(g.element)},beforeSetupInternal:function(g){f.setOpacity(g.element,g.options.from);MochiKit.Style.showElement(g.element)}},b||{});return new a.Opacity(c,b)};MochiKit.Visual.blindUp=function(b,a){var c=MochiKit.DOM;b=c.getElement(b);c.makeClipping(b);a=MochiKit.Base.update({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(f){MochiKit.Style.hideElement(f.element);c.undoClipping(f.element)}},a||{});return new MochiKit.Visual.Scale(b,0,a)};MochiKit.Visual.blindDown=function(c,b){var f=MochiKit.DOM;c=f.getElement(c);var a=MochiKit.Style.getElementDimensions(c);b=MochiKit.Base.update({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:a.h,originalWidth:a.w},restoreAfterFinish:true,afterSetupInternal:function(g){f.makeClipping(g.element);f.setStyle(g.element,{height:"0px"});MochiKit.Style.showElement(g.element)},afterFinishInternal:function(g){f.undoClipping(g.element)}},b||{});return new MochiKit.Visual.Scale(c,100,b)};MochiKit.Visual.Color=MochiKit.Color.Color;MochiKit.Visual.getElementsComputedStyle=MochiKit.DOM.computedStyle;MochiKit.Visual.__new__=function(){var a=MochiKit.Base;a.nameFunctions(this);this.EXPORT_TAGS={":common":this.EXPORT,":all":a.concat(this.EXPORT,this.EXPORT_OK)}};MochiKit.Visual.EXPORT=["roundElement","roundClass","tagifyText","multiple","toggle","Base","Parallel","Opacity","Move","Scale","Highlight","ScrollTo","fade","appear","puff","blindUp","blindDown","switchOff","dropOut","shake","slideDown","slideUp","squish","grow","shrink","pulsate","fold"];MochiKit.Visual.EXPORT_OK=["PAIRS"];MochiKit.Visual.__new__();MochiKit.Base._exportSymbols(this,MochiKit.Visual);/** * Copyright 2009 Tim Down. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ var log4javascript_stub=(function(){var log4javascript;function ff(){return function(){};} function copy(obj,props){for(var i in props){obj[i]=props[i];}} var f=ff();var Logger=ff();copy(Logger.prototype,{addChild:f,getEffectiveAppenders:f,invalidateAppenderCache:f,getAdditivity:f,setAdditivity:f,addAppender:f,removeAppender:f,removeAllAppenders:f,log:f,setLevel:f,getLevel:f,getEffectiveLevel:f,trace:f,debug:f,info:f,warn:f,error:f,fatal:f,isEnabledFor:f,isTraceEnabled:f,isDebugEnabled:f,isInfoEnabled:f,isWarnEnabled:f,isErrorEnabled:f,isFatalEnabled:f,callAppenders:f,group:f,groupEnd:f,time:f,timeEnd:f,assert:f,parent:new Logger()});var getLogger=function(){return new Logger();};function EventSupport(){} copy(EventSupport.prototype,{setEventTypes:f,addEventListener:f,removeEventListener:f,dispatchEvent:f,eventTypes:[],eventListeners:{}});function Log4JavaScript(){} Log4JavaScript.prototype=new EventSupport();log4javascript=new Log4JavaScript();log4javascript={isStub:true,version:"1.4.2",edition:"log4javascript",setDocumentReady:f,setEventTypes:f,addEventListener:f,removeEventListener:f,dispatchEvent:f,eventTypes:[],eventListeners:{},logLog:{setQuietMode:f,setAlertAllErrors:f,debug:f,displayDebug:f,warn:f,error:f},handleError:f,setEnabled:f,isEnabled:f,setTimeStampsInMilliseconds:f,isTimeStampsInMilliseconds:f,evalInScope:f,setShowStackTraces:f,getLogger:getLogger,getDefaultLogger:getLogger,getNullLogger:getLogger,getRootLogger:getLogger,resetConfiguration:f,Level:ff(),LoggingEvent:ff(),Layout:ff(),Appender:ff()};log4javascript.LoggingEvent.prototype={getThrowableStrRep:f,getCombinedMessages:f};log4javascript.Level.prototype={toString:f,equals:f,isGreaterOrEqual:f};var level=new log4javascript.Level();copy(log4javascript.Level,{ALL:level,TRACE:level,DEBUG:level,INFO:level,WARN:level,ERROR:level,FATAL:level,OFF:level});log4javascript.Layout.prototype={defaults:{},format:f,ignoresThrowable:f,getContentType:f,allowBatching:f,getDataValues:f,setKeys:f,setCustomField:f,hasCustomFields:f,setTimeStampsInMilliseconds:f,isTimeStampsInMilliseconds:f,getTimeStampValue:f,toString:f};log4javascript.SimpleDateFormat=ff();log4javascript.SimpleDateFormat.prototype={setMinimalDaysInFirstWeek:f,getMinimalDaysInFirstWeek:f,format:f};log4javascript.PatternLayout=ff();log4javascript.PatternLayout.prototype=new log4javascript.Layout();log4javascript.Appender=ff();log4javascript.Appender.prototype=new EventSupport();copy(log4javascript.Appender.prototype,{layout:new log4javascript.PatternLayout(),threshold:log4javascript.Level.ALL,loggers:[],doAppend:f,append:f,setLayout:f,getLayout:f,setThreshold:f,getThreshold:f,setAddedToLogger:f,setRemovedFromLogger:f,group:f,groupEnd:f,toString:f});log4javascript.SimpleLayout=ff();log4javascript.SimpleLayout.prototype=new log4javascript.Layout();log4javascript.NullLayout=ff();log4javascript.NullLayout.prototype=new log4javascript.Layout();log4javascript.XmlLayout=ff();log4javascript.XmlLayout.prototype=new log4javascript.Layout();copy(log4javascript.XmlLayout.prototype,{escapeCdata:f,isCombinedMessages:f});log4javascript.JsonLayout=ff();log4javascript.JsonLayout.prototype=new log4javascript.Layout();copy(log4javascript.JsonLayout.prototype,{isReadable:f,isCombinedMessages:f});log4javascript.HttpPostDataLayout=ff();log4javascript.HttpPostDataLayout.prototype=new log4javascript.Layout();log4javascript.PatternLayout=ff();log4javascript.PatternLayout.prototype=new log4javascript.Layout();log4javascript.AlertAppender=ff();log4javascript.AlertAppender.prototype=new log4javascript.Appender();log4javascript.BrowserConsoleAppender=ff();log4javascript.BrowserConsoleAppender.prototype=new log4javascript.Appender();log4javascript.AjaxAppender=ff();log4javascript.AjaxAppender.prototype=new log4javascript.Appender();copy(log4javascript.AjaxAppender.prototype,{getSessionId:f,setSessionId:f,isTimed:f,setTimed:f,getTimerInterval:f,setTimerInterval:f,isWaitForResponse:f,setWaitForResponse:f,getBatchSize:f,setBatchSize:f,isSendAllOnUnload:f,setSendAllOnUnload:f,setRequestSuccessCallback:f,setFailCallback:f,getPostVarName:f,setPostVarName:f,sendAll:f,defaults:{requestSuccessCallback:null,failCallback:null}});function ConsoleAppender(){} ConsoleAppender.prototype=new log4javascript.Appender();copy(ConsoleAppender.prototype,{create:f,isNewestMessageAtTop:f,setNewestMessageAtTop:f,isScrollToLatestMessage:f,setScrollToLatestMessage:f,getWidth:f,setWidth:f,getHeight:f,setHeight:f,getMaxMessages:f,setMaxMessages:f,isShowCommandLine:f,setShowCommandLine:f,isShowHideButton:f,setShowHideButton:f,isShowCloseButton:f,setShowCloseButton:f,getCommandLineObjectExpansionDepth:f,setCommandLineObjectExpansionDepth:f,isInitiallyMinimized:f,setInitiallyMinimized:f,isUseDocumentWrite:f,setUseDocumentWrite:f,group:f,groupEnd:f,clear:f,focus:f,focusCommandLine:f,focusSearch:f,getCommandWindow:f,setCommandWindow:f,executeLastCommand:f,getCommandLayout:f,setCommandLayout:f,evalCommandAndAppend:f,addCommandLineFunction:f,storeCommandHistory:f,unload:f});ConsoleAppender.addGlobalCommandLineFunction=f;log4javascript.InPageAppender=ff();log4javascript.InPageAppender.prototype=new ConsoleAppender();copy(log4javascript.InPageAppender.prototype,{addCssProperty:f,hide:f,show:f,isVisible:f,close:f,defaults:{layout:new log4javascript.PatternLayout(),maxMessages:null}});log4javascript.InlineAppender=log4javascript.InPageAppender;log4javascript.PopUpAppender=ff();log4javascript.PopUpAppender.prototype=new ConsoleAppender();copy(log4javascript.PopUpAppender.prototype,{isUseOldPopUp:f,setUseOldPopUp:f,isComplainAboutPopUpBlocking:f,setComplainAboutPopUpBlocking:f,isFocusPopUp:f,setFocusPopUp:f,isReopenWhenClosed:f,setReopenWhenClosed:f,close:f,hide:f,show:f,defaults:{layout:new log4javascript.PatternLayout(),maxMessages:null}});return log4javascript;})();if(typeof window.log4javascript=="undefined"){var log4javascript=log4javascript_stub;}var bobj;var DHTMLLIB;(function(){if(typeof bobj=="undefined"){bobj={}}if(typeof bobj.external=="undefined"){bobj.external={}}if(typeof bobj.external.date=="undefined"){bobj.external.date={}}bobj.external.date.MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");bobj.external.date.DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");bobj.external.date.LZ=function(x){return(x<0||x>9?"":"0")+x};bobj.external.date.isDate=function(val,format){var date=bobj.external.date.getDateFromFormat(val,format);if(!date){return false}return true};bobj.external.date.compareDates=function(date1,dateformat1,date2,dateformat2){var d1=bobj.external.date.getDateFromFormat(date1,dateformat1);var d2=bobj.external.date.getDateFromFormat(date2,dateformat2);if(!d1||!d2){return -1}else{if(d1.getTime()>d2.getTime()){return 1}}return 0};bobj.external.date.formatDate=function(date,format){format=format+"";var result="";var i_format=0;var c="";var token="";var y=date.getFullYear()+"";var M=date.getMonth()+1;var d=date.getDate();var E=date.getDay();var H=date.getHours();var m=date.getMinutes();var s=date.getSeconds();var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;var value=new Object();while(y.length<4){y="0"+y}value.y=""+y;value.yyyy=y;value.yy=y.substring(2,4);value.Y=value.y;value.YY=value.yy;value.YYYY=value.yyyy;value.M=M;value.MM=bobj.external.date.LZ(M);value.MMM=bobj.external.date.MONTH_NAMES[M-1];value.NNN=bobj.external.date.MONTH_NAMES[M+11];value.d=d;value.dd=bobj.external.date.LZ(d);value.D=value.d;value.DD=value.dd;value.E=bobj.external.date.DAY_NAMES[E+7];value.EE=bobj.external.date.DAY_NAMES[E];value.H=H;value.HH=bobj.external.date.LZ(H);if(H==0){value.h=12}else{if(H>12){value.h=H-12}else{value.h=H}}value.hh=bobj.external.date.LZ(value.h);if(H>11){value.K=H-12}else{value.K=H}value.k=H+1;value.KK=bobj.external.date.LZ(value.K);value.kk=bobj.external.date.LZ(value.k);if(H>11){value.a="PM"}else{value.a="AM"}value.m=m;value.mm=bobj.external.date.LZ(m);value.s=s;value.ss=bobj.external.date.LZ(s);while(i_format<format.length){c=format.charAt(i_format);token="";while((format.charAt(i_format)==c)&&(i_format<format.length)){token+=format.charAt(i_format++)}if(value[token]!=null){result=result+value[token]}else{result=result+token}}return result};bobj.external.date._isInteger=function(val){var digits="1234567890";for(var i=0;i<val.length;i++){if(digits.indexOf(val.charAt(i))==-1){return false}}return true};bobj.external.date._getInt=function(str,i,minlength,maxlength){for(var x=maxlength;x>=minlength;x--){var token=str.substring(i,i+x);if(token.length<minlength){return null}if(bobj.external.date._isInteger(token)){return token}}return null};bobj.external.date.getDateFromFormat=function(val,format){val=val+"";format=format+"";var i_val=0;var i_format=0;var c="";var token="";var token2="";var x,y;var year=null;var month=null;var date=null;var hh=null;var mm=null;var ss=null;var ampm="";while(i_format<format.length){c=format.charAt(i_format);token="";while((format.charAt(i_format)==c)&&(i_format<format.length)){token+=format.charAt(i_format++)}if(token=="yyyy"||token=="YYYY"||token=="yy"||token=="YY"||token=="y"||token=="Y"){if(token=="yyyy"||token=="YYYY"){x=4;y=4}if(token=="yy"||token=="YY"){x=2;y=2}if(token=="y"||token=="Y"){x=2;y=4}year=bobj.external.date._getInt(val,i_val,x,y);if(year==null){return null}i_val+=year.length;if(year.length==2){if(year>70){year=1900+(year-0)}else{year=2000+(year-0)}}}else{if(token=="MMM"||token=="NNN"){month=0;for(var i=0;i<bobj.external.date.MONTH_NAMES.length;i++){var month_name=bobj.external.date.MONTH_NAMES[i];if(val.substring(i_val,i_val+month_name.length).toLowerCase()==month_name.toLowerCase()){if(token=="MMM"||(token=="NNN"&&i>11)){month=i+1;if(month>12){month-=12}i_val+=month_name.length;break}}}if((month<1)||(month>12)){return null}}else{if(token=="EE"||token=="E"){for(var i=0;i<bobj.external.date.DAY_NAMES.length;i++){var day_name=bobj.external.date.DAY_NAMES[i];if(val.substring(i_val,i_val+day_name.length).toLowerCase()==day_name.toLowerCase()){i_val+=day_name.length;break}}}else{if(token=="MM"||token=="M"){month=bobj.external.date._getInt(val,i_val,token.length,2);if(month==null||(month<1)||(month>12)){return null}i_val+=month.length}else{if(token=="dd"||token=="DD"||token=="d"||token=="D"){date=bobj.external.date._getInt(val,i_val,token.length,2);if(date==null||(date<1)||(date>31)){return null}i_val+=date.length}else{if(token=="hh"||token=="h"){hh=bobj.external.date._getInt(val,i_val,token.length,2);if(hh==null||(hh<1)||(hh>12)){return null}i_val+=hh.length}else{if(token=="HH"||token=="H"){hh=bobj.external.date._getInt(val,i_val,token.length,2);if(hh==null||(hh<0)||(hh>23)){return null}i_val+=hh.length}else{if(token=="KK"||token=="K"){hh=bobj.external.date._getInt(val,i_val,token.length,2);if(hh==null||(hh<0)||(hh>11)){return null}i_val+=hh.length}else{if(token=="kk"||token=="k"){hh=bobj.external.date._getInt(val,i_val,token.length,2);if(hh==null||(hh<1)||(hh>24)){return null}i_val+=hh.length;hh--}else{if(token=="mm"||token=="m"){mm=bobj.external.date._getInt(val,i_val,token.length,2);if(mm==null||(mm<0)||(mm>59)){return null}i_val+=mm.length}else{if(token=="ss"||token=="s"){ss=bobj.external.date._getInt(val,i_val,token.length,2);if(ss==null||(ss<0)||(ss>59)){return null}i_val+=ss.length}else{if(token=="a"){if(val.substring(i_val,i_val+2).toLowerCase()=="am"){ampm="AM"}else{if(val.substring(i_val,i_val+2).toLowerCase()=="pm"){ampm="PM"}else{return null}}i_val+=2}else{if(val.substring(i_val,i_val+token.length)!=token){return null}else{i_val+=token.length}}}}}}}}}}}}}}if(i_val!=val.length){return null}if(month==2){if(((year%4==0)&&(year%100!=0))||(year%400==0)){if(date>29){return null}}else{if(date>28){return null}}}if((month==4)||(month==6)||(month==9)||(month==11)){if(date>30){return null}}if(hh!==null){if(hh<12&&m=="PM"){hh=hh-0+12}else{if(hh>11&&m=="AM"){hh-=12}}}var newDate=new Date(year,month-1,date,hh,mm,ss);newDate.setFullYear(year);return newDate};DHTMLLIB=new function(){this.add=function(fn){var args=arguments;for(var i=0;i<args.length;i++){var fn=args[i];var name=fn.toString().split(/[\s\(]/g)[1];this[name]=fn}}};var _dhtmlLib="DHTMLLIB";var _userAgent=navigator.userAgent?navigator.userAgent.toLowerCase():null;var _ie=(document.all!=null)?true:false;var _dom=(document.getElementById!=null)?true:false;var _isQuirksMode=(document.compatMode!="CSS1Compat");var _dtd4=!_ie||(document.compatMode!="BackCompat");var _moz=_dom&&!_ie;var _show="visible";var _hide="hidden";var _hand=_ie?"hand":"pointer";var _appVer=navigator.appVersion.toLowerCase();var _webKit=(_userAgent.indexOf("safari")>=0)||(_userAgent.indexOf("applewebkit")>=0);var _firefox=(_userAgent.indexOf("firefox")>=0);var _mac=(_appVer.indexOf("macintosh")>=0)||(_appVer.indexOf("macos")>=0);var _opera=(_userAgent.indexOf("opera")!=-1);var _userAgent=navigator.userAgent?navigator.userAgent.toLowerCase():null;var _saf=_moz&&(_userAgent.indexOf("safari")>=0);var _ctrl=0;var _shift=1;var _alt=2;var _ie6=_ie&&(_appVer.indexOf("msie 5")<0);var _small=(screen.height<=600);var _curDoc=document;var _curWin=self;var _tooltipWin=self;var _tooltipDx=0;var _tooltipDy=0;var _codeWinName="_CW";var _leftBtn=(_ie||_saf)?1:0;var _preloadArr=new Array();var _widgets=new Array();var _resizeW=_ie6?"col-resize":"E-resize";var _resizeH=_ie6?"row-resize":"S-resize";var _ddData=new Array;var _dontNeedEncoding=null;var _thex=null;var _allGrabbers=new Array();var _defaultButtonWidth=60;var BGIFramePool=null;var id=0;var _rtl=false;var KEY_ENTER=13;var KEY_SPACE=32;var KEY_PAGEUP=33;var KEY_PAGEDOWN=34;var KEY_END=35;var KEY_HOME=36;var KEY_LEFT=37;var KEY_UP=38;var KEY_RIGHT=39;var KEY_DOWN=40;function initDom(skin,style,lang,rtl,curWin,codeUniqueName){_skin=skin;_lang=lang;_rtl=rtl;_style=style;if(curWin){_curWin=curWin;_curDoc=curWin.document}_tooltipWin=_curWin;if(codeUniqueName){_codeWinName="_CW"+codeUniqueName}_dhtmlLib=_codeWinName+".DHTMLLIB";_curWin[_codeWinName]=self}function styleSheet(){includeCSS("style")}function isLayerDisplayed(lyr){var css=lyr?lyr.style:null;if(css){if(css.display=="none"||css.visibility=="hidden"){return false}else{var par=lyr.parentNode;if(par!=null){return isLayerDisplayed(par)}else{return true}}}else{return true}}function safeSetFocus(lyr){if(lyr&&lyr.focus&&isLayerDisplayed(lyr)){lyr.focus()}}function newWidget(id){var o=new Object;o.id=id;o.layer=null;o.css=null;o.getHTML=Widget_getHTML;o.beginHTML=Widget_getHTML;o.endHTML=Widget_getHTML;o.write=Widget_write;o.begin=Widget_begin;o.end=Widget_end;o.init=Widget_init;o.move=Widget_move;o.resize=Widget_resize;o.setBgColor=Widget_setBgColor;o.show=Widget_show;o.getWidth=Widget_getWidth;o.getHeight=Widget_getHeight;o.setHTML=Widget_setHTML;o.setDisabled=Widget_setDisabled;o.focus=Widget_focus;o.setDisplay=Widget_setDisplay;o.isDisplayed=Widget_isDisplayed;o.appendHTML=Widget_appendHTML;o.setTooltip=Widget_setTooltip;o.initialized=Widget_initialized;o.respectPageDirection=true;o.widx=_widgets.length;_widgets[o.widx]=o;return o}function new_Widget(prm){return newWidget(prm.id)}function getEvent(e,w){if(_ie&&(e==null)){e=w?w.event:_curWin.event}return e}function Widget_param(paramsObj,paramName,paramDefaultValue){var val=paramsObj?paramsObj[paramName]:null;return val==null?paramDefaultValue:val}function Widget_appendHTML(){append(_curDoc.body,this.getHTML())}function Widget_getHTML(){return""}function Widget_write(i){_curDoc.write(this.getHTML(i))}function Widget_begin(){_curDoc.write(this.beginHTML())}function Widget_end(){_curDoc.write(this.endHTML())}function Widget_init(){var o=this;o.layer=getLayer(o.id);o.css=o.layer.style;o.layer._widget=o.widx;if(o.initialHTML){o.setHTML(o.initialHTML)}}function Widget_move(x,y){var c=this.css;if(x!=null){if(_rtl&&this.respectPageDirection){if(_moz){c.right=""+x+"px"}else{c.pixelRight=x}}else{if(_moz){c.left=""+x+"px"}else{c.pixelLeft=x}}}if(y!=null){if(_moz){c.top=""+y+"px"}else{c.pixelTop=y}}}function Widget_focus(){safeSetFocus(this.layer)}function Widget_setBgColor(c){this.css.backgroundColor=c}function Widget_show(show){this.css.visibility=show?_show:_hide}function Widget_getWidth(){return this.layer.offsetWidth}function Widget_getHeight(){return this.layer.offsetHeight}function Widget_setHTML(s){var o=this;if(o.layer){o.layer.innerHTML=s}else{o.initialHTML=s}}function Widget_setDisplay(d){if(this.css){this.css.display=d?"":"none"}}function Widget_isDisplayed(){if(this.css.display=="none"){return false}else{return true}}function Widget_setDisabled(d){if(this.layer){this.layer.disabled=d}}function Widget_resize(w,h){if(w!=null){this.css.width=""+(Math.max(0,w))+"px"}if(h!=null){this.css.height=""+(Math.max(0,h))+"px"}}function Widget_setTooltip(tooltip){this.layer.title=tooltip}function Widget_initialized(){return this.layer!=null}function newGrabberWidget(id,resizeCB,x,y,w,h,isHori,buttonCB,tooltip){o=newWidget(id);o.resizeCB=resizeCB;o.x=x;o.y=y;o.w=w;o.h=h;o.dx=0;o.dy=0;o.min=null;o.max=null;o.isHori=isHori;o.preloaded=new Image;o.preloaded.src=_skin+"../resizepattern.gif";o.buttonCB=buttonCB;o.allowGrab=true;o.collapsed=false;o.isFromButton=false;o.showGrab=GrabberWidget_showGrab;o.setCollapsed=GrabberWidget_setCollapsed;o.tooltipButton=tooltip;o.getHTML=GrabberWidget_getHTML;o.enableGrab=GrabberWidget_enableGrab;o.setMinMax=GrabberWidget_setMinMax;o.index=_allGrabbers.length;_allGrabbers[o.index]=o;o.buttonLyr=null;o.setButtonImage=GrabberWidget_setButtonImage;o.getImgOffset=GrabberWidget_getImgOffset;return o}function GrabberWidget_setCollapsed(collapsed,tooltip){this.collapsed=collapsed;this.setButtonImage(false,tooltip)}function GrabberWidget_getImgOffset(isRollover){var o=this;if(o.isHori){o.dx=(o.collapsed?12:0)+(isRollover?6:0);o.dy=0}else{o.dy=(o.collapsed?12:0)+(isRollover?6:0);o.dx=0}}function GrabberWidget_setButtonImage(isRollover,tooltip){var o=this;o.getImgOffset(isRollover);o.tooltipButton=tooltip;if(o.layer){if(o.buttonLyr==null){o.buttonLyr=getLayer("grabImg_"+o.id)}if(o.buttonLyr){changeSimpleOffset(o.buttonLyr,o.dx,o.dy,null,tooltip)}}}function GrabberWidget_enableGrab(bEnable){var o=this;o.allowGrab=bEnable;if(o.css){o.css.cursor=o.allowGrab?(o.isHori?_resizeW:_resizeH):"default"}}function GrabberWidget_getHTML(){var o=this;var cr=o.isHori?_resizeW:_resizeH;var moveableCb='onselectstart="return false" ondragstart="return false" onmousedown="'+_dhtmlLib+".GrabberWidget_down(event,'"+o.index+"',this);return false;\"";var imgG=_ie?('<img onselectstart="return false" ondragstart="return false" onmousedown="'+_dhtmlLib+'.eventCancelBubble(event)" border="0" hspace="0" vspace="0" src="'+_skin+'../transp.gif" id="modal_'+o.id+'" style="z-index:10000;display:none;position:absolute;top:0px;left:0px;width:1px;height:1px;cursor:'+cr+'">'):('<div onselectstart="return false" ondragstart="return false" onmousedown="'+_dhtmlLib+'.eventCancelBubble(event)" border="0" hspace="0" vspace="0" id="modal_'+o.id+'" style="z-index:10000;display:none;position:absolute;top:0px;left:0px;width:1px;height:1px;cursor:'+cr+'"></div>');return getBGIframe("grabIframe_"+o.id)+imgG+'<table cellpadding="0" cellspacing="0" border="0" '+moveableCb+' id="'+o.id+'" style="overflow:hidden;position:absolute;left:'+o.x+"px;top:"+o.y+"px;width:"+o.w+"px;height:"+o.h+"px;cursor:"+cr+'"><tr><td></td></tr></table>'}function GrabberWidget_setMinMax(min,max){this.min=min;this.max=max}function GrabberWidget_button(e,index,lyr){var o=_allGrabbers[index];o.isFromButton=true;lyr.onmouseup=eval("_curWin."+_dhtmlLib+".GrabberWidget_buttonup")}function GrabberWidget_buttonover(e,index,lyr){var o=_allGrabbers[index];o.setButtonImage(true)}function GrabberWidget_buttonout(e,index,lyr){var o=_allGrabbers[index];o.setButtonImage(false)}function GrabberWidget_buttonup(e){GrabberWidget_up(e)}function GrabberWidget_showGrab(){var o=this,mod=o.mod,ifr=o.iframe,stl=o.layer.style,st=mod.style;ifr.setDisplay(true)}function GrabberWidget_down(e,index,lyr){var o=_allGrabbers[index];window._theGrabber=o;if(o.mod==null){o.mod=getLayer("modal_"+o.id);o.iframe=newWidget("grabIframe_"+o.id);o.iframe.init()}o.mod.onmousemove=eval("_curWin."+_dhtmlLib+".GrabberWidget_move");o.mod.onmouseup=eval("_curWin."+_dhtmlLib+".GrabberWidget_up");o.grabStartPosx=parseInt(_rtl?lyr.style.right:lyr.style.left);o.grabStartPosy=parseInt(lyr.style.top);o.grabStartx=eventGetX(e);o.grabStarty=eventGetY(e);var mod=o.mod,ifr=o.iframe,stl=o.layer.style,st=mod.style;stl.backgroundImage="url('"+_skin+"../resizepattern.gif')";o.prevZ=stl.zIndex;stl.zIndex=9999;ifr.css.zIndex=9998;st.width="100%";st.height="100%";mod.style.display="block";var x=o.grabStartPosx;var y=o.grabStartPosy;ifr.move(x,y);ifr.resize(o.getWidth(),o.getHeight());if(!o.isFromButton){o.showGrab()}return false}function GrabberWidget_move(e){var o=_theGrabber,lyr=o.layer,mod=o.mod;if(o.isFromButton){if(o.isHori){var x=eventGetX(e),ox=o.grabStartx;if((x<ox-3)||(x>ox+3)){o.isFromButton=false}}else{var Y=eventGetY(e),oy=o.grabStarty;if((y<oy-3)||(y>oy+3)){o.isFromButton=false}}if(!o.isFromButton){o.showGrab()}}if(!o.isFromButton){if(o.allowGrab){var x=o.isHori?Math.max(0,_rtl?o.grabStartPosx-(eventGetX(e)-o.grabStartx):o.grabStartPosx-o.grabStartx+eventGetX(e)):null;var y=o.isHori?null:Math.max(0,o.grabStartPosy-o.grabStarty+eventGetY(e));if(o.isHori){if(o.min!=null){x=Math.max(x,o.min)}if(o.max!=null){x=Math.min(x,o.max)}}else{if(o.min!=null){y=Math.max(y,o.min)}if(o.max!=null){y=Math.min(y,o.max)}}eventCancelBubble(e);o.move(x,y);getPos(o.layer);if(o.buttonCB){var bCss=o.buttonLyr.style;if(bCss.display!="none"){bCss.display="none"}}o.iframe.move(x,y)}}}function GrabberWidget_up(e){var o=_theGrabber,lyr=o.layer,mod=o.mod,stl=lyr.style;stl.backgroundImage="";stl.zIndex=o.prevZ;var ifr=o.iframe;ifr.move(_rtl?100:-100,-100);ifr.resize(1,1);ifr.setDisplay(false);eventCancelBubble(e);var st=mod.style;st.display="none";st.width="0px";st.height="0px";if(o.buttonCB){o.buttonLyr.style.display=""}if(o&&(o.isFromButton)){if(o.buttonCB){o.buttonCB()}o.isFromButton=false}if(o.allowGrab&&(!o.isFromButton)){if(o.resizeCB){o.resizeCB(parseInt(_rtl?lyr.style.right:lyr.style.left),parseInt(lyr.style.top))}}}function newButtonWidget(id,label,cb,width,hlp,tooltip,tabIndex,margin,url,w,h,dx,dy,imgRight,disDx,disDy){var o=newWidget(id);o.label=label;o.cb=cb;o.width=width;o.hlp=hlp;o.tooltip=tooltip;o.tabIndex=tabIndex;o.isGray=false;o.isDefault=false;o.txt=null;o.icn=null;o.margin=margin?margin:0;o.extraStyle="";o.isDelayCallback=true;if(url){o.url=url;o.w=w;o.h=h;o.dx=dx;o.dy=dy;o.disDx=(disDx!=null)?disDx:dx;o.disDy=(disDy!=null)?disDy:dy;o.imgRight=imgRight?true:false}o.getHTML=ButtonWidget_getHTML;o.setDisabled=ButtonWidget_setDisabled;o.setText=ButtonWidget_setText;o.changeImg=ButtonWidget_changeImg;o.oldInit=o.init;o.init=ButtonWidget_init;o.isDisabled=ButtonWidget_isDisabled;o.setDefaultButton=ButtonWidget_setDefaultButton;o.executeCB=ButtonWidget_executeCB;o.setTooltip=ButtonWidget_setTooltip;o.setDelayCallback=ButtonWidget_setDelayCallback;o.instIndex=ButtonWidget_currInst;ButtonWidget_inst[ButtonWidget_currInst++]=o;return o}var ButtonWidget_inst=new Array;var ButtonWidget_currInst=0;function ButtonWidget_getHTML(){with(this){var clk=_dhtmlLib+".ButtonWidget_clickCB("+this.instIndex+');return false;"';var clcbs='onclick="'+clk+'" ';if(_ie){clcbs+='ondblclick="'+clk+'" '}var isDefaultSty=(this.isDefault&&!this.isGray);clcbs+='onkeydown=" return '+_dhtmlLib+".ButtonWidget_keydownCB(event,"+this.instIndex+');" ';var addPar=' style="'+extraStyle+"cursor:"+_hand+";margin-left:"+margin+"px; margin-right:"+margin+'px; "'+clcbs+" ",tip=attr("title",tooltip),idText="theBttn"+id,idIcon="theBttnIcon"+id;var lnkB="<a "+attr("id",idText)+" "+tip+" "+attr("tabindex",tabIndex)+' href="javascript:void(0)" class="wizbutton" role="button">';var l=(label!=null);var im=(this.url?('<td align="'+(l?(this.imgRight?"right":"left"):"center")+'" width="'+(!l&&(width!=null)?width+6:w+6)+'">'+(l?"":lnkB)+simpleImgOffset(url,w,h,this.isGray?disDs:dx,this.isGray?disDy:dy,idIcon,null,(l?"":tooltip),"cursor:"+_hand)+(l?"":"</a>")+"</td>"):"");return'<table class="wizbuttonBorder" onmouseover="return true" '+attr("id",id)+" "+addPar+' border="0" cellspacing="1" cellpadding="0"><tr valign="middle">'+(this.imgRight?"":im)+(l?('<td height="19" '+attr("width",width)+attr("id","theBttnCenterImg"+id)+' align="center" class="wizbuttonBG '+(this.isGray?"wizbuttongray":"wizbutton")+'" style="padding-left:8px;padding-right:8px;"><nobr>'+lnkB+label+"</a></nobr></td>"):"")+(this.imgRight?im:"")+"</tr></table>"}}function ButtonWidget_setDelayCallback(value){this.isDelayCallback=(value==true)}function ButtonWidget_setDisabled(d){var o=this,newCur=d?"default":_hand;o.isGray=d;if(o.layer){var newClassName=d?"wizbuttongray":"wizbutton";if(o.txt.className!=newClassName){o.txt.className=newClassName;o.txt.style.cursor=newCur;o.css.cursor=newCur;if(o.icn){changeSimpleOffset(o.icn,o.isGray?o.disDx:o.dx,o.isGray?o.disDy:o.dy);o.icn.style.cursor=newCur}if(o.isDefault){var isDefaultSty=!d,url=_skin+"button.gif";changeSimpleOffset(o.leftImg,0,isDefaultSty?63:0,url);changeOffset(o.centerImg,0,isDefaultSty?105:42,url);changeSimpleOffset(o.rightImg,0,isDefaultSty?84:21,url)}}}}function ButtonWidget_setDefaultButton(){var o=this;if(o.layer){var isDefaultSty=!o.isGray,url=_skin+"button.gif";changeSimpleOffset(o.leftImg,0,isDefaultSty?63:0,url);changeOffset(o.centerImg,0,isDefaultSty?105:42,url);changeSimpleOffset(o.rightImg,0,isDefaultSty?84:21,url)}o.isDefault=true}function ButtonWidget_isDisabled(){return this.isGray}function ButtonWidget_setText(str){this.txt.innerHTML=convStr(str)}function ButtonWidget_setTooltip(tooltip){var o=this;o.tooltip=tooltip;o.layer.title=tooltip;if(o.txt){o.txt.title=tooltip}if(o.icn){o.icn.title=tooltip}}function ButtonWidget_init(){var o=this;o.oldInit();o.txt=getLayer("theBttn"+this.id);o.icn=getLayer("theBttnIcon"+this.id);o.leftImg=getLayer("theBttnLeftImg"+this.id);o.centerImg=getLayer("theBttnCenterImg"+this.id);o.rightImg=getLayer("theBttnRightImg"+this.id);var newClassName=o.isGray?"wizbuttongray":"wizbutton";if(o.txt.className!=newClassName){o.setDisabled(o.isGray)}}function ButtonWidget_changeImg(dx,dy,disDx,disDy,url,tooltip){var o=this;if(url){o.url=url}if(dx!=null){o.dx=dx}if(dy!=null){o.dy=dy}if(disDx!=null){o.disDx=disDx}if(disDy!=null){o.disDy=disDy}if(tooltip!=null){o.tooltip=tooltip}if(o.icn){changeSimpleOffset(o.icn,o.isGray?o.disDx:o.dx,o.isGray?o.disDy:o.dy,o.url,o.tooltip)}}function ButtonWidget_clickCB(index){var btn=ButtonWidget_inst[index];if(btn&&!btn.isGray){if(btn.isDelayCallback){setTimeout(_dhtmlLib+".ButtonWidget_delayClickCB("+index+")",1)}else{ButtonWidget_delayClickCB(index)}}}function ButtonWidget_delayClickCB(index){var btn=ButtonWidget_inst[index];btn.executeCB()}function ButtonWidget_executeCB(){var o=this;if(o.cb){if(typeof o.cb!="string"){o.cb()}else{eval(o.cb)}}}function ButtonWidget_keydownCB(e,index){var k=eventGetKey(e);var btn=ButtonWidget_inst[index];if(k==13&&btn.cb){eventCancelBubble(e)}return true}function newScrolledZoneWidget(id,borderW,padding,w,h,bgClass){var o=newWidget(id);o.borderW=borderW;o.padding=padding;o.w=w;o.h=h;o.oldResize=o.resize;o.beginHTML=ScrolledZoneWidget_beginHTML;o.endHTML=ScrolledZoneWidget_endHTML;o.resize=ScrolledZoneWidget_resize;o.bgClass=(bgClass)?bgClass:"insetBorder";return o}function ScrolledZoneWidget_beginHTML(){var w=this.w,h=this.h;var ofs=_moz?2*(this.borderW+this.padding):0;if(typeof(w)=="number"){if(_moz){w=Math.max(0,w-ofs)}w=""+w+"px"}if(typeof(h)=="number"){if(_moz){h=Math.max(0,h-ofs)}h=""+h+"px"}return'<div tabindex=-1 align="left" class="'+this.bgClass+'" id="'+this.id+'" style="border-width:'+this.borderW+"px;padding:"+this.padding+"px;"+sty("width",w)+sty("height",h)+'overflow:auto">'}function ScrolledZoneWidget_endHTML(){return"</div>"}function ScrolledZoneWidget_resize(w,h){if(_moz){var ofs=2*(this.borderW+this.padding);if(w!=null){w=Math.max(0,w-ofs)}if(h!=null){h=Math.max(0,h-ofs)}}this.oldResize(w,h)}function newComboWidget(id,changeCB,noMargin,width,tooltip){var o=newWidget(id);o.tooltip=tooltip;o.size=1;o.getHTML=ComboWidget_getHTML;o.beginHTML=ComboWidget_beginHTML;o.endHTML=ComboWidget_endHTML;o.changeCB=changeCB;o.noMargin=noMargin;o.width=width==null?null:""+width+"px";o.add=ComboWidget_add;o.del=ComboWidget_del;o.getSelection=ComboWidget_getSelection;o.select=ComboWidget_select;o.valueSelect=ComboWidget_valueSelect;o.getCount=ComboWidget_getCount;o.oldSetDisabled=o.setDisabled;o.setDisabled=ComboWidget_setDisabled;o.setUndefined=ComboWidget_setUndefined;o.delByID=ComboWidget_delByID;o.findByValue=ComboWidget_findByValue;o.findByText=ComboWidget_findByText;o.getValue=ComboWidget_getValue;o.isGrayed=ComboWidget_isGrayed;o.clearSelection=ComboWidget_clearSelection;o.isDisabled=false;o.multi=false;o.undef=false;o.isCombo=true;o.undefId=o.id+"__undef";o.disabledId=o.id+"__disabled";return o}function ComboWidget_beginHTML(){var o=this,_extrCmbS=((_moz&&!o.isCombo)?"font-size:12px;":"");return"<select "+(o.multi?"multiple":"")+" "+(o.noMargin?'style="'+sty("width",o.width)+_extrCmbS+'"':'style="'+sty("width",o.width)+"margin-left:10px;"+_extrCmbS+'"')+' class="listinputs" '+attr("onchange",_dhtmlLib+".ComboWidget_changeCB(event,this)")+attr("onclick",_dhtmlLib+".ComboWidget_clickCB(event,this)")+attr("ondblclick",_dhtmlLib+".ComboWidget_dblClickCB(event,this)")+attr("onkeyup",_dhtmlLib+".ComboWidget_keyUpCB(event,this)")+attr("onkeydown",_dhtmlLib+".ComboWidget_keyDownCB(event,this)")+attr("id",o.id)+attr("name",o.id)+attr("title",o.tooltip)+'size="'+o.size+'">'}function ComboWidget_clearSelection(){var o=this;if(o.layer){o.layer.selectedIndex=-1}}function ComboWidget_endHTML(){return"</select>"}function ComboWidget_getHTML(inner){return this.beginHTML()+(inner?inner:"")+this.endHTML()}function ComboWidget_add(s,val,sel,id,grayed){var e=this.layer,opt=_curDoc.createElement("option");if(_ie){e.options.add(opt)}else{e.appendChild(opt)}if(opt.innerText!=null){opt.innerText=s}else{opt.innerHTML=convStr(s)}opt.value=val;if(id!=null){opt.id=id}if(sel){opt.selected=true}if(grayed){opt.style.color="gray"}return opt}function ComboWidget_getSelection(){var e=this.layer,i=e.selectedIndex;if(i<0){return null}var ret=new Object;ret.index=i;ret.value=e.options[i].value;ret.text=e.options[i].text;return ret}function ComboWidget_select(i){var o=this,e=o.layer,len=e.options.length;if(i==null){e.selectedIndex=-1}if((i<0)||(i>=len)){i=len-1}if(i>=0){e.selectedIndex=i}o.setUndefined(false)}function ComboWidget_valueSelect(v){var o=this,e=o.layer,opts=e.options,len=opts.length;for(var i=0;i<len;i++){if(opts[i].value==v){opts[i].selected=true;o.setUndefined(false);break}}}function ComboWidget_del(i){var e=this.layer;if(i==null){e.options.length=0}else{if(_ie){e.remove(i)}else{e.options[i]=null}this.select(i)}}function ComboWidget_changeCB(e,l){var o=getWidget(l);if(o.changeCB){o.changeCB(e)}}function ComboWidget_clickCB(e,l){var o=getWidget(l);if(o.clickCB){o.clickCB(e)}}function ComboWidget_dblClickCB(e,l){var o=getWidget(l);if(o.dblClickCB){o.dblClickCB(e)}}function ComboWidget_keyUpCB(e,l){var o=getWidget(l);if(o.keyUpCB){o.keyUpCB(e)}}function ComboWidget_keyDownCB(e,l){var k=eventGetKey(e);var o=getWidget(l);if(o.isCombo&&(k==27||k==13)){eventCancelBubble(e)}else{if(k==13&&o.keyUpCB){eventCancelBubble(e)}}}function ComboWidget_getCount(){return this.layer.options.length}function ComboWidget_delByID(id){var opt=getLayer(id);if(opt!=null){this.del(opt.index)}opt=null}function ComboWidget_setDisabled(d,addEmptyElt){var o=this;o.oldSetDisabled(d);o.isDisabled=d;if(d==true){var old=getLayer(o.disabledId);if(old==null){o.add("","",true,o.disabledId)}else{o.layer.selectedIndex=old.index}}else{o.delByID(o.disabledId)}}function ComboWidget_setUndefined(u){var o=this;o.undef=u;if(u==true){var old=getLayer(o.undefId);if(old==null){o.add("","",true,o.undefId)}else{o.layer.selectedIndex=old.index}}else{o.delByID(o.undefId)}}function ComboWidget_findByValue(val){var o=this,e=o.layer,opts=e.options,len=opts.length;for(var i=0;i<len;i++){if(opts[i].value==val){var ret=new Object;ret.index=i;ret.value=e.options[i].value;ret.text=e.options[i].text;return ret}}return null}function ComboWidget_findByText(txt){var o=this,e=o.layer,opts=e.options,len=opts.length;for(var i=0;i<len;i++){if(opts[i].text==txt){var ret=new Object;ret.index=i;ret.value=e.options[i].value;ret.text=e.options[i].text;return ret}}return null}function ComboWidget_getValue(i){var o=this,e=o.layer,opts=e.options,len=opts.length;if(i==null||i<0||i>len){return null}var ret=new Object;ret.index=i;ret.value=e.options[i].value;return ret}function ComboWidget_isGrayed(i){var o=this,e=o.layer,opts=e.options,len=opts.length;if(i==null||i<0||i>len){return false}return(e.options[i].style.color=="gray")}function newListWidget(id,changeCB,multi,width,lines,tooltip,dblClickCB,keyUpCB,clickCB){var o=newComboWidget(id,changeCB,true,width,tooltip);o.clickCB=clickCB;o.dblClickCB=dblClickCB;o.keyUpCB=keyUpCB;o.size=lines;o.multi=multi;o.getMultiSelection=ListWidget_getMultiSelection;o.setUndefined=ListWidget_setUndefined;o.isUndefined=ListWidget_isUndefined;o.change=ListWidget_change;o.isCombo=false;return o}function ListWidget_setUndefined(u){var o=this;o.undef=u;if(u==true){o.layer.selectedIndex=-1}}function ListWidget_isUndefined(){return(this.layer.selectedIndex==-1)}function ListWidget_getMultiSelection(){var e=this.layer,rets=new Array,len=e.options.length;for(var i=0;i<len;i++){var opt=e.options[i];if(opt.selected){var ret=new Object;ret.index=i;ret.value=opt.value;ret.text=opt.text;rets[rets.length]=ret}}return rets}function ListWidget_change(multi,lines){var o=this;if(multi!=null){o.multi=multi;o.layer.multiple=multi}if(lines!=null){o.size=lines;o.layer.size=lines}}function newInfoWidget(id,title,boldTitle,text,height){var o=newWidget(id);o.title=title?title:"";o.boldTitle=boldTitle?boldTitle:"";o.text=text?text:"";o.height=(height!=null)?height:55;o.getHTML=InfoWidget_getHTML;o.setText=InfoWidget_setText;o.setTitle=InfoWidget_setTitle;o.setTitleBold=InfoWidget_setTitleBold;o.oldResize=o.resize;o.resize=InfoWidget_resize;o.textLayer=null;return o}function InfoWidget_setText(text,isHTML){var o=this;text=text?text:"";o.text=text;if(o.layer){var l=o.textLayer;if(l==null){l=o.textLayer=getLayer("infozone_"+o.id)}if(l){l.innerHTML=isHTML?text:convStr(text,false,true)}}}function InfoWidget_setTitle(text){var o=this;text=text?text:"";o.title=text;if(o.layer){var l=o.titleLayer;if(l==null){l=o.titleLayer=getLayer("infotitle_"+o.id)}if(l){l.innerHTML=convStr(text)}}}function InfoWidget_setTitleBold(text){var o=this;text=text?text:"";o.boldTitle=text;if(o.layer){var l=o.titleLayerBold;if(l==null){l=o.titleLayerBold=getLayer("infotitlebold_"+o.id)}if(l){l.innerHTML=convStr(text)}}}function InfoWidget_getHTML(){var o=this;return'<div class="dialogzone" align="left" style="overflow:hidden;'+sty("width",o.width)+sty("height",""+o.height+"px")+'" id="'+o.id+'"><nobr>'+img(_skin+"../help.gif",16,16,"top",null,L_DHTMLLIB_helpLab)+'<span class="dialogzone" style="padding-left:5px" id="infotitle_'+o.id+'">'+convStr(o.title)+'</span><span style="padding-left:5px" class="dialogzonebold" id="infotitlebold_'+o.id+'">'+convStr(o.boldTitle)+"</span></nobr><br>"+getSpace(1,2)+'<div class="infozone" align="left" id="infozone_'+o.id+'" style="height:'+(o.height-18-(_moz?10:0))+"px;overflow"+(_ie?"-y":"")+':auto">'+convStr(o.text,false,true)+"</div></div>"}function InfoWidget_resize(w,h){var o=this;if(w!=null){o.w=w}if(h!=null){o.h=h}o.oldResize(w,h);if(o.layer){var l=o.textLayer;if(l==null){l=o.textLayer=getLayer("infozone_"+o.id)}if(l){if(o.h!=null){l.style.height=""+Math.max(0,o.h-(_ie?18:28))+"px"}}}}function newCheckWidget(id,text,changeCB,bold,imgUrl,imgW,imgH,bconvtext){var o=newWidget(id);o.text=text;o.convText=bconvtext;o.changeCB=changeCB;o.idCheckbox="check_"+id;o.checkbox=null;o.kind="checkbox";o.name=o.idCheckbox;o.bold=bold;o.imgUrl=imgUrl;o.imgW=imgW;o.imgH=imgH;o.getHTML=CheckWidget_getHTML;o.setText=CheckWidget_setText;o.parentInit=Widget_init;o.init=CheckWidget_init;o.check=CheckWidget_check;o.isChecked=CheckWidget_isChecked;o.setDisabled=CheckWidget_setDisabled;o.isDisabled=CheckWidget_isDisabled;o.uncheckOthers=CheckWidget_uncheckOthers;o.isIndeterminate=CheckWidget_isIndeterminate;o.setIndeterminate=CheckWidget_setIndeterminate;o.layerClass=("dialogzone"+(o.bold?"bold":""));o.nobr=true;return o}function CheckWidget_getHTML(){var o=this,cls=o.layerClass;return'<table border="0" onselectstart="return false" cellspacing="0" cellpadding="0" class="'+cls+'"'+attr("id",o.id)+'><tr valign="middle"><td style="height:20px;width:21px"><input style="margin:'+(_moz?3:0)+'px" onclick="'+_dhtmlLib+'.CheckWidget_changeCB(event,this)" type="'+o.kind+'"'+attr("id",o.idCheckbox)+attr("name",o.name)+"></td>"+(o.imgUrl?'<td><label style="padding-left:2px" for="'+o.idCheckbox+'">'+img(o.imgUrl,o.imgW,o.imgH)+"</label></td>":"")+"<td>"+(o.nobr?"<nobr>":"")+'<label style="padding-left:'+(o.imgUrl?4:2)+'px" id="label_'+o.id+'" for="'+o.idCheckbox+'">'+(o.convText?convStr(o.text):o.text)+"</label>"+(o.nobr?"</nobr>":"")+"</td></tr></table>"}function CheckWidget_setText(s){var o=this;o.text=s;if(o.layer){if(o.labelLyr==null){o.labelLyr=getLayer("label_"+o.id)}o.labelLyr.innerHTML=o.convText?convStr(s):s}}function CheckWidget_init(){this.parentInit();this.checkbox=getLayer(this.idCheckbox)}function CheckWidget_check(c){this.checkbox.checked=c;if(c){this.uncheckOthers()}}function CheckWidget_isChecked(){return this.checkbox.checked}function CheckWidget_changeCB(e,l){var o=getWidget(l);o.uncheckOthers();if(o.changeCB){o.changeCB(e)}}function CheckWidget_setDisabled(d){this.checkbox.disabled=d;if(_moz){this.checkbox.className=(d?"dialogzone":"")}}function CheckWidget_isDisabled(){return this.checkbox.disabled}function CheckWidget_uncheckOthers(){}function CheckWidget_isIndeterminate(){return this.checkbox.indeterminate}function CheckWidget_setIndeterminate(b){this.checkbox.indeterminate=b}function newRadioWidget(id,group,text,changeCB,bold,imgUrl,imgW,imgH,bconvtext){var o=newCheckWidget(id,text,changeCB,bold,imgUrl,imgW,imgH,bconvtext);o.kind="radio";o.name=group;if(_RadioWidget_groups[group]==null){_RadioWidget_groups[group]=new Array}o.groupInstance=_RadioWidget_groups[group];var g=o.groupInstance;o.groupIdx=g.length;g[g.length]=o;o.uncheckOthers=RadioWidget_uncheckOthers;return o}var _RadioWidget_groups=new Array;function RadioWidget_uncheckOthers(){var g=this.groupInstance,idx=this.groupIdx,len=g.length;for(var i=0;i<len;i++){if(i!=idx){var c=g[i].checkbox;if(c){c.checked=false}}}}function newTextFieldWidget(id,changeCB,maxChar,keyUpCB,enterCB,noMargin,tooltip,width,focusCB,blurCB,clickCB){var o=newWidget(id);o.tooltip=tooltip;o.changeCB=changeCB;o.maxChar=maxChar;o.keyUpCB=keyUpCB;o.enterCB=enterCB;o.noMargin=noMargin;o.width=width==null?null:""+width+"px";o.focusCB=focusCB;o.blurCB=blurCB;o.clickCB=clickCB;o.disabled=false;o.getHTML=TextFieldWidget_getHTML;o.getValue=TextFieldWidget_getValue;o.setValue=TextFieldWidget_setValue;o.intValue=TextFieldWidget_intValue;o.intPosValue=TextFieldWidget_intPosValue;o.select=TextFieldWidget_select;o.setDisabled=TextFieldWidget_setDisabled;o.beforeChange=null;o.wInit=o.init;o.init=TextFieldWidget_init;o.oldValue="";o.helpTxt="";o.isHelpTxt=false;o.setHelpTxt=TextFieldWidget_setHelpTxt;o.eraseHelpTxt=TextFieldWidget_eraseHelpTxt;o.enterCancelBubble=true;o.inputNode=null;return o}function TextFieldWidget_setDisabled(d){var o=this;o.disabled=d;if(o.inputNode){o.inputNode.disabled=d}}function TextFieldWidget_init(){var o=this;o.wInit();o.inputNode=getLayer(this.id+"_input");if(o.inputNode){o.inputNode.value=""+(o.oldValue!="")?o.oldValue:""}if(o.helpTxt&&!o.oldValue){o.setHelpTxt(o.helpTxt)}}function TextFieldWidget_getHTML(){var o=this;return'<div id="'+this.id+'" style="position:relative;background-color:#ffffff;'+sty("width",this.width)+';"><div class="textinputsBG" style="width:100%"></div><div class="textinputsBorder"><input id="'+this.id+'_input"'+(o.disabled?" disabled":"")+' oncontextmenu="event.cancelBubble=true;return true" style="width:100%;'+(_ie?"height:16px;":"height:18px;")+"margin-left:"+(this.noMargin?0:10)+'px" onfocus="'+_dhtmlLib+'.TextFieldWidget_focus(this)" onblur="'+_dhtmlLib+'.TextFieldWidget_blur(this)" onchange="'+_dhtmlLib+'.TextFieldWidget_changeCB(event,this)" onkeydown=" return '+_dhtmlLib+'.TextFieldWidget_keyDownCB(event,this);" onkeyup=" return '+_dhtmlLib+'.TextFieldWidget_keyUpCB(event,this);" onkeypress=" return '+_dhtmlLib+'.TextFieldWidget_keyPressCB(event,this);" type="text" '+attr("maxLength",this.maxChar)+' ondragstart="event.cancelBubble=true;return true" onselectstart="event.cancelBubble=true;return true" class="crtextinputs" name="'+this.id+'"'+attr("title",this.tooltip)+' value=""></div></div>'}function TextFieldWidget_getValue(){var o=this;if(o.isHelpTxt){return""}else{return o.inputNode?o.inputNode.value:o.oldValue}}function TextFieldWidget_setValue(s){var o=this;if(o.inputNode){o.eraseHelpTxt();o.inputNode.value=""+s}else{o.oldValue=s}}function TextFieldWidget_changeCB(e,l){var o=getWidget(l);o.eraseHelpTxt();if(o.beforeChange){o.beforeChange()}if(o.changeCB){o.changeCB(e)}}function TextFieldWidget_keyPressCB(e,l){var o=getWidget(l);if(eventGetKey(e)==13){o.enterKeyPressed=true;return false}else{o.enterKeyPressed=false}return true}function TextFieldWidget_keyUpCB(e,l){var o=getWidget(l);o.eraseHelpTxt();if(eventGetKey(e)==13&&o.enterKeyPressed){if(o.beforeChange){o.beforeChange()}if(o.enterCB){if(o.enterCancelBubble){eventCancelBubble(e)}o.enterCB(e)}return false}else{if(o.keyUpCB){o.keyUpCB(e)}}o.enterKeyPressed=false;return true}function TextFieldWidget_keyDownCB(e,l){var o=getWidget(l);o.eraseHelpTxt();o.enterKeyPressed=false;if(eventGetKey(e)==13){return true}else{if(eventGetKey(e)==8){eventCancelBubble(e)}}return true}function TextFieldWidget_eraseHelpTxt(){var o=this;if(o.isHelpTxt&&o.inputNode){o.inputNode.value=""}o.isHelpTxt=false;if(o.inputNode){o.inputNode.style.color="black"}}function TextFieldWidget_focus(l){var o=getWidget(l);o.eraseHelpTxt();if(o.focusCB){o.focusCB()}}function TextFieldWidget_blur(l){var o=getWidget(l);if(o.beforeChange){o.beforeChange()}if(o.blurCB){o.blurCB()}}function TextFieldWidget_click(l){var o=getWidget(l);if(o.clickCB){o.clickCB()}}function TextFieldWidget_intValue(nanValue){var n=parseInt(this.getValue());return isNaN(n)?nanValue:n}function TextFieldWidget_intPosValue(nanValue){var n=this.intValue(nanValue);return(n<0)?nanValue:n}function TextFieldWidget_select(){if(this.inputNode){this.inputNode.select()}}function TextFieldWidget_setHelpTxt(h){var o=this;o.helpTxt=h;if(o.inputNode&&(o.inputNode.value=="")){o.isHelpTxt=true;o.inputNode.value=h;o.inputNode.style.color="#808080"}}function newIntFieldWidget(id,changeCB,maxChar,keyUpCB,enterCB,noMargin,tooltip,width,customCheckCB){var o=newTextFieldWidget(id,changeCB,maxChar,keyUpCB,enterCB,noMargin,tooltip,width);o.min=-Number.MAX_VALUE;o.max=Number.MAX_VALUE;o.customCheckCB=customCheckCB;o.setMin=IntFieldWidget_setMin;o.setMax=IntFieldWidget_setMax;o.setValue=IntFieldWidget_setValue;o.beforeChange=IntFieldWidget_checkChangeCB;o.value="";return o}function IntFieldWidget_setMin(min){if(!isNaN(min)){this.min=min}}function IntFieldWidget_setMax(max){if(!isNaN(max)){this.max=max}}function IntFieldWidget_setValue(s){var o=this,l=o.layer;s=""+s;if(s==""){if(l){l.value=""}o.oldValue="";return}var n=parseInt(s);value="";if(!isNaN(n)&&(n>=o.min)&&(n<=o.max)&&((o.customCheckCB==null)||o.customCheckCB(n))){value=n;o.oldValue=value}else{if(o.oldValue){value=o.oldValue}}if(l){l.value=""+value}}function IntFieldWidget_checkChangeCB(){var o=this;o.setValue(o.layer.value)}function newFrameZoneWidget(id,w,h,reverse){var o=newWidget(id);o.w=(w!=null)?""+Math.max(0,w-10)+"px":null;o.h=(h!=null)?""+Math.max(0,h-10)+"px":null;o.reverse=(reverse!=null)?reverse:false;o.cont=null;o.beginHTML=FrameZoneWidget_beginHTML;o.endHTML=FrameZoneWidget_endHTML;o.oldResize=o.resize;o.resize=FrameZoneWidget_resize;return o}function FrameZoneWidget_resize(w,h){var o=this;var d=o.layer.display!="none";if(d&_moz&&!_saf){o.setDisplay(false)}o.oldResize(w,h);if(d&_moz&&!_saf){o.setDisplay(true)}}function FrameZoneWidget_beginHTML(){var o=this;return'<table width="100%" style="'+sty("width",o.w)+sty("height",o.h)+'" id="'+o.id+'" cellspacing="0" cellpadding="4" border="0"><tbody><tr><td valign="top" class="dlgFrame" id="frame_cont_'+o.id+'" style="padding:5px">'}function FrameZoneWidget_endHTML(){var o=this;return"</td></tr></tbody></table>"}function arrayAdd(obj,fieldName,item,idx){var array=obj[fieldName],len=array.length;if((idx==null)||(typeof idx!="number")){idx=-1}if((idx<0)||(idx>len)){idx=len}if(idx!=len){var end=array.slice(idx);array.length=idx+1;array[idx]=item;array=array.concat(end)}else{array[idx]=item}obj[fieldName]=array;return idx}function arrayRemove(obj,fieldName,idx){var array=obj[fieldName],last=array.length-1;if(idx==null){array.length=0;obj[fieldName]=array;return -1}if((idx<0)||(idx>last)){return -1}if(idx==last){array.length=last}else{var end=array.slice(idx+1);array.length=idx;array=array.concat(end)}obj[fieldName]=array;return idx}function getFrame(name,par){if(par==null){par=self}var frames=par.frames,w=eval("frames."+name);if(w==null){return w}var l=frames.length;for(var i=0;i<l;i++){w=frames[i];try{if(w.name==name){return w}}catch(exc){}}return null}function frameGetUrl(win){return win.location.href}function frameReload(win){var loc=win.location;loc.replace(loc.href)}function setTopFrameset(){_curWin._topfs="topfs"}function getTopFrameset(f){if(f==null){f=self}if(f._topfs=="topfs"){return f}else{if(f!=top){return getTopFrameset(f.parent)}else{return null}}}function convStr(s,nbsp,br){s=""+s;var ret=s.replace(/&(?!rlm;|lrm;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");if(nbsp){ret=ret.replace(/ /g," ")}if(br){ret=ret.replace(/\n/g,"<br>")}return ret}function escapeCR(s){s=""+s;var ret=s.replace(/\r/g,"").replace(/\n/g,"\\n");return ret}function hasNoRTLCharacters(s){return(-1==s.search(/[\u0590-\u074F\u0780-\u07BF\u08A0-\u08FA]/))}function addDblClickCB(l,cb){if(l.addEventListener&&!_saf){l.addEventListener("dblclick",cb,false)}else{l.ondblclick=cb}}function img(src,w,h,align,att,alt){att=(att?att:"");if(alt==null){alt=""}return"<img"+attr("width",w)+attr("height",h)+attr("src",src)+attr("alt",alt)+attr("align",align)+' border="0" hspace="0" vspace="0" '+(att?att:"")+">"}function imgOffset(url,w,h,dx,dy,id,att,alt,st,align){return img(_skin+"../transp.gif",w,h,align,(att?att:"")+" "+attr("id",id)+' style="float:left;'+backImgOffset(url,dx,dy)+(st?st:"")+'"',alt)}function simpleImgOffset(url,w,h,dx,dy,id,att,alt,st,align){if(_ie){if(dx==null){dx=0}if(dy==null){dy=0}return"<div "+(att?att:"")+" "+attr("id",id)+" "+(_rtl?'dir="ltr"':"")+' style="position:relative;padding:0px;width:'+w+"px;height:"+h+"px;overflow:hidden;"+(st?st:"")+'">'+img(url,null,null,(align?align:"top"),'style="margin:0px;position:relative;top:'+(-dy)+"px;left:"+(-dx)+'px" tabIndex="-1"',alt)+"</div>"}else{return imgOffset(url,w,h,dx,dy,id,att,alt,st,align)}}function changeSimpleOffset(lyr,dx,dy,url,alt){if(_ie){lyr=lyr.childNodes[0];var st=lyr.style;if((url!=null)&&(url!=lyr.src)){lyr.src=url}if(dx!=null){st.left=""+(-dx)+"px"}if(dy!=null){st.top=""+(-dy)+"px"}if(alt!=null){lyr.title=alt;lyr.alt=alt}}else{changeOffset(lyr,dx,dy,url,alt)}}function backImgOffset(url,dx,dy){return"background-image:url('"+url+"');background-position:"+(-dx)+"px "+(-dy)+"px;"}function changeOffset(lyr,dx,dy,url,alt){var st=lyr.style;if(st){if((dx!=null)&&(dy!=null)){st.backgroundPosition=""+(-dx)+"px "+(-dy)+"px"}if(url){st.backgroundImage="url('"+url+"')"}}if(alt){lyr.title=alt}}function includeCSS(css,noskin){if(typeof(_skin)=="string"&&_skin!=""){var url="";if(noskin){url=_skin+"../"+css}else{url=_skin+css}url+=".css";_curDoc.write('<link rel="stylesheet" type="text/css" href="'+url+'">')}}function getLayer(id){return _curDoc.getElementById(id)}function setLayerTransp(lyr,percent){if(_ie){lyr.style.filter=(percent==null)?"":"progid:DXImageTransform.Microsoft.Alpha( style=0,opacity="+percent+")"}else{lyr.style.MozOpacity=(percent==null)?1:percent/100}}function getPos(el,relTo){relTo=relTo?relTo:null;for(var lx=0,ly=0;(el!=null)&&(el!=relTo);lx+=el.offsetLeft,ly+=el.offsetTop,el=el.offsetParent){}return{x:lx,y:ly}}function getPos2(el,relTo){var relTo=relTo?relTo:null;var posX=0;var posY=0;while(el.parentNode||el.offsetParent){if(el.offsetParent){posX+=el.offsetLeft;posY+=el.offsetTop;el=el.offsetParent}else{if(el.parentNode){if(el.style){if(el.style.left){posX+=el.style.left}if(el.style.top){posY+=el.style.top}}el=el.parentNode}else{break}}}if(relTo){relToCord=getPos2(relTo);posX-=relToCord.x;posY-=relToCord.y}return{x:posX,y:posY}}function getPosScrolled(el,relTo){relTo=relTo?relTo:null;if(_ie){for(var lx=0,ly=0;(el!=null)&&(el!=relTo);lx+=el.offsetLeft-el.scrollLeft,ly+=el.offsetTop-el.scrollTop,el=el.offsetParent){}}else{var oldEl=el;for(var lx=0,ly=0;(el!=null)&&(el!=relTo);lx+=el.offsetLeft,ly+=el.offsetTop,el=el.offsetParent){}for(el=oldEl;(el!=null)&&(el!=relTo);el=el.parentNode){if(el.scrollLeft!=null){lx-=el.scrollLeft;ly-=el.scrollTop}}}lx+=getScrollX();ly+=getScrollY();return{x:lx,y:ly}}function getWidget(layer){if(layer==null){return null}var w=layer._widget;if(w!=null){return _widgets[w]}else{return getWidget(layer.parentNode)}}function getWidgetFromID(id){if(id==null){return null}var l=getLayer(id);return getWidget(l)}function attr(key,val){return(val!=null?" "+key+'="'+val+'" ':"")}function sty(key,val){return(val!=null?key+":"+val+";":"")}function getSep(marg,solid){if(marg==null){marg=0}var spc=marg>0?'<td width="'+marg+'">'+getSpace(marg,1)+"</td>":"";return'<table style="margin-top:5px;margin-bottom:5px;" width="100%" cellspacing="0" cellpadding="0"><tr>'+spc+'<td background="'+_skin+"sep"+(solid?"_solid":"")+'.gif" class="smalltxt"><img alt="" src="'+_skin+'../transp.gif" width="10" height="2"></td>'+spc+"</tr></table>"}function writeSep(marg,solid){_curDoc.write(getSep(marg,solid))}function getSpace(w,h){return'<table height="'+h+'" border="0" cellspacing="0" cellpadding="0"><tr><td>'+img(_skin+"../transp.gif",w,h)+"</td></tr></table>"}function writeSpace(w,h){_curDoc.write(getSpace(w,h))}function documentWidth(win){var win=win?win:_curWin;var width=Math.max(document.body.clientWidth,document.documentElement.clientWidth);width=Math.max(width,document.body.scrollWidth);return width}function documentHeight(win){var win=win?win:_curWin;var height=Math.max(document.body.clientHeight,document.documentElement.clientHeight);height=Math.max(height,document.body.scrollHeight);return height}function winWidth(win){var width;var win=win?win:_curWin;if(_ie){if(_isQuirksMode){width=win.document.body.clientWidth}else{width=win.document.documentElement.clientWidth}}else{width=win.innerWidth}return width}function winHeight(win){var win=win?win:_curWin;var height;if(_ie){if(_isQuirksMode){height=document.body.clientHeight}else{height=document.documentElement.clientHeight}}else{height=win.innerHeight}return height}function getScrollX(win){var scrollLeft=0;var win=win?win:_curWin;if(typeof(win.scrollX)=="number"){scrollLeft=win.scrollX}else{scrollLeft=Math.max(win.document.body.scrollLeft,win.document.documentElement.scrollLeft)}return scrollLeft}function getScrollY(win){var scrollTop=0;var win=win?win:_curWin;if(typeof(win.scrollY)=="number"){scrollTop=window.scrollY}else{scrollTop=Math.max(win.document.body.scrollTop,win.document.documentElement.scrollTop)}return scrollTop}function winScrollTo(x,y,win){win=win?win:_curWin;win.scrollTo(x,y)}function eventGetKey(e,win){win=win?win:_curWin;return _ie?win.event.keyCode:e.keyCode}function eventGetX(e){return _ie?_curWin.event.clientX:e.clientX?e.clientX:e.pageX}function eventGetY(e){return _ie?_curWin.event.clientY:e.clientY?e.clientY:e.pageY}function xpos(o,e,doc,zoom){if((zoom==null)||(!_ie)){zoom=1}return((e.clientX/zoom)-getPos(o).x)+getScrollX()}function ypos(o,e,doc,zoom){if((zoom==null)||(!_ie)){zoom=1}return((e.clientY/zoom)-getPos(o).y)+(_ie?doc.body.scrollTop:0)}function absxpos(e,zoom){if((zoom==null)||(!_ie)){return e.clientX}else{return e.clientX/zoom}}function absypos(e,zoom){if((zoom==null)||(!_ie)){return e.clientY}else{return e.clientY/zoom}}function eventCancelBubble(e,win){win=win?win:_curWin;var ev=_ie?win.event:e;if(ev){ev.cancelBubble=true;if(ev.stopPropagation){ev.stopPropagation()}}}function eventPreventDefault(e,win){win=win?win:_curWin;var ev=_ie?win.event:e;if(ev){if(ev.preventDefault){ev.preventDefault()}else{ev.returnValue=false}}}function isHidden(lyr){if((lyr==null)||(lyr.tagName=="BODY")){return false}var sty=lyr.style;if((sty==null)||(sty.visibility==_hide)||(sty.display=="none")){return true}return isHidden(lyr.parentNode)}function opt(val,txt,sel){return'<option value="'+val+'" '+(sel?"selected":"")+">"+convStr(""+txt)+"</option>"}function lnk(inner,clickCB,cls,id,att,dblClickCB){if(clickCB==null){clickCB="return false"}att=att?att:"";return"<a"+attr("class",cls)+attr("id",id)+attr("href","javascript:void(0)")+attr("onclick",clickCB)+attr("ondblclick",dblClickCB)+att+">"+inner+"</a>"}_oldErrHandler=null;function localErrHandler(){return true}function canScanFrames(w){var ex=true;var d=null;if(_moz){_oldErrHandler=window.onerror;window.onerror=localErrHandler}try{var d=w.document;ex=false}catch(expt){}if(_moz){window.onerror=_oldErrHandler}return(!ex&&(d!=null))}function getBGIframe(id){return'<iframe id="'+id+'" name="'+id+'" style="display:none;left:0px;position:absolute;top:0px" src="'+_skin+'../../empty.html" frameBorder="0" scrolling="no"></iframe>'}function getDynamicBGIFrameLayer(){var recycle=false;var BGIFrames=null;var id=0;if(BGIFramePool){BGIFrames=BGIFramePool.split(",");var BGIFCount=BGIFrames.length;for(var id=0;id<BGIFCount;id++){if(BGIFrames[id]!="1"){recycle=true;break}}}else{id=0;BGIFrames=new Array()}BGIFrames[id]="1";BGIFramePool=BGIFrames.join(",");if(!recycle){targetApp(getBGIframe("BGIFramePool_"+id))}return getLayer("BGIFramePool_"+id)}function holdBGIFrame(layerId){var l=getLayer(layerId);if(l){l.style.display=""}var id=parseInt(layerId.split("_")[1]);var BGIFrames=BGIFramePool.split(",");BGIFrames[id]=1;BGIFramePool=BGIFrames.join(",")}function releaseBGIFrame(layerId){var l=getLayer(layerId);if(l){l.style.display="none"}var id=parseInt(layerId.split("_")[1]);var BGIFrames=BGIFramePool.split(",");BGIFrames[id]=0;BGIFramePool=BGIFrames.join(",")}function append(e,s,c){if(_ie){e.insertAdjacentHTML("BeforeEnd",s)}else{var curDoc=c?c:_curDoc;var r=curDoc.createRange();r.setStartBefore(e);var frag=r.createContextualFragment(s);e.appendChild(frag)}}function append2(e,s,c){if(_ie){e.insertAdjacentHTML("afterBegin",s)}else{var curDoc=c?c:_curDoc;var r=curDoc.createRange();r.setStartBefore(e);var frag=r.createContextualFragment(s);e.appendChild(frag)}}function insBefore(e,s,c){if(_ie){e.insertAdjacentHTML("BeforeBegin",s)}else{var curDoc=c?c:_curDoc;var r=_curDoc.createRange();r.setEndBefore(e);var frag=r.createContextualFragment(s);e.parentNode.insertBefore(frag,e)}}function insBefore2(e,s,c){if(_ie){e.insertAdjacentHTML("BeforeBegin",s)}else{var curDoc=c?c:_curDoc;var r=_curDoc.createRange();r.setStartBefore(e);var frag=r.createContextualFragment(s);e.parentNode.insertBefore(frag,e)}}function targetApp(s){append(_curDoc.body,s)}function preloadImg(url){var img=_preloadArr[_preloadArr.length]=new Image;img.src=url}var _staticUnicBlockWhileWaitWidgetID="staticUnicBlockWhileWaitWidgetID";function hideBlockWhileWaitWidget(){var lyr=getLayer(_staticUnicBlockWhileWaitWidgetID);if(lyr){lyr.style.display="none"}}function newBlockWhileWaitWidget(urlImg){if(window._BlockWhileWaitWidget!=null){return window._BlockWhileWaitWidget}var o=newWidget(_staticUnicBlockWhileWaitWidgetID);o.getPrivateHTML=BlockWhileWaitWidget_getPrivateHTML;o.init=BlockWhileWaitWidget_init;o.show=BlockWhileWaitWidget_show;window._BlockWhileWaitWidget=o;return o}function BlockWhileWaitWidget_init(){}function BlockWhileWaitWidget_getPrivateHTML(){return'<div id="'+this.id+'" onselectstart="return false" ondragstart="return false" onmousedown="'+_dhtmlLib+'.eventCancelBubble(event)" border="0" hspace="0" vspace="0" style="background-image:url('+_skin+'../transp.gif);z-index:5000;cursor:wait;position:absolute;top:0px;left:0px;width:100%;height:100%"></div>'}function BlockWhileWaitWidget_show(show){var o=this;if(o.layer==null){o.layer=getLayer(o.id);if(o.layer==null){targetApp(o.getPrivateHTML());o.layer=getLayer(o.id);o.css=o.layer.style}else{o.css=o.layer.style}}o.setDisplay(show)}function isTextInput(ev){var source=_ie?ev.srcElement:ev.target;var isText=false;if(source.tagName=="TEXTAREA"){isText=true}if((source.tagName=="INPUT")&&((source.type.toLowerCase()=="text")||(source.type.toLowerCase()=="password"))){isText=true}return isText}function isTextArea(ev){var source=_ie?ev.srcElement:ev.target;if(source.tagName=="TEXTAREA"){return true}else{return false}}function LZ(x){return(x<0||x>9?"":"0")+x}DHTMLLIB.add(eventCancelBubble,ButtonWidget_delayClickCB,ButtonWidget_clickCB,ButtonWidget_keydownCB,ComboWidget_changeCB,ComboWidget_clickCB,ComboWidget_dblClickCB,ComboWidget_keyUpCB,ComboWidget_keyDownCB,TextFieldWidget_focus,TextFieldWidget_blur,TextFieldWidget_click,TextFieldWidget_changeCB,TextFieldWidget_keyDownCB,TextFieldWidget_keyUpCB,TextFieldWidget_keyPressCB,GrabberWidget_down,GrabberWidget_buttonup,GrabberWidget_move,GrabberWidget_up,CheckWidget_changeCB,append2,getLayer,getWidgetFromID,targetApp,hasNoRTLCharacters);DHTMLLIB._widgets=_widgets;if(bobj.crv.config.isDebug){localErrHandler=null}initDom(bobj.crvUri("../dhtmllib/images/")+bobj.crv.config.skin+"/","",bobj.crv.config.lang,bobj.crv.config.isRTL);styleSheet();var _allBOIcons=new Array;var _allBOIconsMenus=new Array;var _menuType_simple=0;var _menuType_color=1;var _menuType_border=2;function NewLabelWidget(id,text,convBlanks){var o=newWidget(id);o.text=text;o.convBlanks=convBlanks;o.getHTML=LabelWidget_getHTML;o.setDisabled=LabelWidget_setDisabled;o.dis=false;return o}function LabelWidget_setDisabled(dis){var o=this;if(o.dis!=dis){o.dis=dis;if(o.layer){o.layer.className="iconText"+(dis?"Dis":"")}}}function LabelWidget_getHTML(){var o=this;return'<div id="'+o.id+'" class="iconText'+(o.dis?"Dis":"")+'" style="white-space:nowrap;margin-right:4px;margin-left:4px;cursor:default">'+convStr(o.text,o.convBlanks)+"</div>"}function newIconWidget(id,src,clickCB,text,alt,w,h,dx,dy,disDx,disDy,isTabEnabled,ariaHasPopUp,isHandleUpDownKey){var o=newWidget(id);o.src=src;o.clickCB=clickCB;o.text=text;o.alt=alt;o.isTabEnabled=isTabEnabled;o.ariaHasPopUp=ariaHasPopUp;o.width=null;o.txtAlign=(_rtl?"right":"left");o.border=4;o.txtNoPadding=false;o.allowDblClick=false;if(src){o.w=(w!=null)?w:16;o.h=(h!=null)?h:16;o.dx=(dx!=null)?dx:0;o.dy=(dy!=null)?dy:0;o.disDx=(disDx!=null)?disDx:0;o.disDy=(disDy!=null)?disDy:0}else{o.w=1;o.h=16}o.dis=false;o.disp=true;o.margin=1;o.extraHTML="";o.imgLayer=null;o.txtLayer=null;o.overCB="IconWidget_overCB";o.outCB="IconWidget_outCB";o.isDisplayed=IconWidget_isDisplayed;o.setDisplay=IconWidget_setDisplay;o.getHTML=IconWidget_getHTML;o.getTxtWidth=IconWidget_getTxtWidth;o.index=_allBOIcons.length++;o.nocheckClass="iconnocheck";o.hoverClass="iconhover";o.checkClass="iconcheck";o.checkhoverClass="iconcheckhover";o.currentClass=o.nocheckClass;o.currentHoverClass=o.hoverClass;o.setClasses=IconWidget_setClasses;o.internalUpCB=null;o.internalDownCB=IconWidget_internalDownCB;o.internalUpCB=IconWidget_internalUpCB;o.isHover=false;o.changeTooltip=IconWidget_changeTooltip;o.changeText=IconWidget_changeText;o.changeImg=IconWidget_changeImg;o.setDisabled=IconWidget_setDisabled;o.isDisabled=IconWidget_isDisabled;o.acceptClick=IconWidget_acceptClick;_allBOIcons[o.index]=o;o.outEnable=true;o.setCrs=IconWidget_setCrs;o.isHandleUpDownKey=isHandleUpDownKey;o.oldRes=o.resize;o.resize=IconWidget_resize;o.iconOldInit=o.init;o.init=IconWidget_init;return o}function newIconMenuWidget(id,src,clickCB,text,alt,w,h,dx,dy,disDx,disDy,isColor,beforeShowCB,menuType){var o=newWidget(id);if(typeof(menuType)=="undefined"){menuType=isColor?_menuType_color:_menuType_simple}o.menuItemType=isColor?_isColor:_isNotColor;var tooltip=L_DHTMLLIB_openMenu.replace("{0}",(text?text:(alt?alt:"")));o.icon=newIconWidget("iconMenu_icon_"+id,src,IconMenuWidget_iconClickCB,text,alt,w,h,dx,dy,disDx,disDy,false,false,true);o.arrow=newIconWidget("iconMenu_arrow_"+id,_skin+"menus.gif",IconMenuWidget_arrowClickCB,null,tooltip,8,16,0,81,0,97,true,true);switch(menuType){case _menuType_color:o.menu=newMenuColorWidget("iconMenu_menu_"+id,IconMenuWidget_hideCB);break;case _menuType_border:o.menu=newMenuBordersWidget("iconMenu_menu_"+id,IconMenuWidget_hideCB,beforeShowCB,IconBordersMenuWidget_internalClickCB);break;default:case _menuType_simple:o.menu=newMenuWidget("iconMenu_menu_"+id,IconMenuWidget_hideCB,beforeShowCB);break}o.icon.par=o;o.arrow.par=o;o.menu.parIcon=o;o.icon.margin=0;o.arrow.margin=0;o.icon.overCB="IconWidget_none";o.icon.outCB="IconWidget_none";o.arrow.overCB="IconWidget_none";o.arrow.outCB="IconWidget_none";o.margin=1;o.spc=0;o.getHTML=IconMenuWidget_getHTML;o.clickCB=clickCB;o.getMenu=IconMenuWidget_getMenu;o.menIcnOldInit=o.init;o.init=IconMenuWidget_init;o.removeAllMenuItems=IconMenuWidget_removeAllMenuItems;o.index=_allBOIconsMenus.length++;_allBOIconsMenus[o.index]=o;o.setDisabled=IconMenuWidget_setDisabled;o.isDisabled=IconMenuWidget_isDisabled;o.disableMenu=IconMenuWidget_disableMenu;o.changeText=IconMenuWidget_changeText;o.imwpResize=o.resize;o.resize=IconMenuWidget_resize;o.focus=IconMenuWidget_focus;o.changeArrowTooltip=IconMenuWidget_changeArrowTooltip;o.disp=true;o.isDisplayed=IconWidget_isDisplayed;o.setDisplay=IconWidget_setDisplay;return o}function IconMenuWidget_removeAllMenuItems(){this.menu.removeAll();this.menu.resetItemCount()}function IconMenuWidget_changeText(s){this.icon.changeText(s)}function IconMenuWidget_changeArrowTooltip(tooltip){this.arrow.changeTooltip(tooltip,false)}function IconMenuWidget_resize(w,h){var o=this;if(w!=null){w=Math.max(0,w-2*o.margin)}var d=o.layer.display!="none";if(d&_moz&&!_saf){o.setDisplay(false)}o.imwpResize(w,h);if(w!=null){o.icon.resize(Math.max(0,w-13-o.spc))}if(d&_moz&&!_saf){o.setDisplay(true)}}function IconMenuWidget_setDisabled(dis){var o=this;if(dis){if(o.menu.isShown()){o.menu.show(false)}IconMenuWidgetOutCB(o.index)}o.icon.setDisabled(dis);o.arrow.setDisabled(dis)}function IconMenuWidget_isDisabled(){return(this.icon.dis==true)}function IconMenuWidget_internalCB(){var o=this,col=null;if(o.id!=null){col=(o.menuItemType!=_isLastUsedColor)?o.id.slice(6):o.color}var icon=o.par.parIcon;icon.oldColor=icon.curColor;icon.curColor=col;if(icon.curColor!=null){icon.showSample()}if(icon.clickColor){icon.clickColor()}}function IconMenuWidget_focus(){var o=this;o.arrow.focus()}function IconMenuWidget_disableMenu(b){var o=this;o.arrow.setDisabled(b);o.menu.setDisabled(b)}function IconMenuWidget_getMenu(){return this.menu}function IconWidget_none(){}function IconMenuWidget_init(){var o=this;o.menIcnOldInit();o.icon.init();o.arrow.init();o.menu.init();var l=o.layer;l.onmouseover=IconMenuWidget_OverCB;l.onmouseout=IconMenuWidget_OutCB}function IconMenuWidget_getHTML(){var o=this,d=o.disp?"":"display:none;";return'<table id="'+o.id+'" cellspacing="0" cellpadding="0" border="0" style="'+d+"margin:"+o.margin+'px"><tr><td>'+o.icon.getHTML()+'</td><td style="padding-left:'+o.spc+'px" width="'+(13+o.spc)+'">'+o.arrow.getHTML()+"</td></table>"}function IconMenuWidget_OverCB(){IconMenuWidgetOverCB(getWidget(this).index);return true}function IconMenuWidget_OutCB(){IconMenuWidgetOutCB(getWidget(this).index)}function IconMenuWidgetOverCB(i){o=_allBOIconsMenus[i];IconWidget_overCB(o.icon.index);IconWidget_overCB(o.arrow.index)}function IconMenuWidgetOutCB(i){o=_allBOIconsMenus[i];if(!o.menu.isShown()){IconWidget_outCB(o.icon.index);IconWidget_outCB(o.arrow.index)}else{IconWidget_overCB(o.icon.index);IconWidget_overCB(o.arrow.index)}}function IconMenuWidget_iconClickCB(){var o=this.par;if(o.clickCB==null){var l=o.layer;var position=getPos2(l);o.menu.show(!o.menu.isShown(),position.x,position.y+o.getHeight()+1,null,null,o);IconMenuWidgetOverCB(o.index)}else{o.clickCB()}}function IconMenuWidget_arrowClickCB(){var o=this.par,l=o.layer;var position=getPos2(l);o.menu.show(!o.menu.isShown(),position.x,position.y+o.getHeight()+1,null,null,o);IconMenuWidgetOverCB(o.index)}function IconMenuWidget_hideCB(){var o=this.parIcon;if(o.arrow){o.arrow.focus()}IconMenuWidgetOutCB(o.index)}function newSingleIconMenuWidget(id,src,clickCB,text,alt,w,h,dx,dy,disDx,disDy,isColor,beforeShowCB){var tooltip=L_DHTMLLIB_openMenu.replace("{0}",(text?text:(alt?alt:"")));var o=newIconWidget(id,src,SingleIconMenuWidget_clickCB,null,tooltip,w,h,dx,dy,disDx,disDy,true);o.icon=newIconWidget("singleIconMenu_icon_"+id,src,null,text,null,w,h,dx,dy,disDx,disDy,false);o.arrow=newIconWidget("singleIcon_arrow_"+id,_skin+"menus.gif",SingleIconMenuWidget_iconClickCB,null,tooltip,7,16,0,81,0,97,false);o.menu=newMenuWidget("singleIconMenu_menu_"+id,SingleIconMenuWidget_hideCB,beforeShowCB);o.icon.par=o;o.arrow.par=o;o.menu.parIcon=o;o.icon.margin=0;o.arrow.margin=0;o.icon.overCB="IconWidget_none";o.icon.outCB="IconWidget_none";o.arrow.overCB="IconWidget_none";o.arrow.outCB="IconWidget_none";o.margin=1;o.spc=0;o.getHTML=SingleIconMenuWidget_getHTML;o.getMenu=IconMenuWidget_getMenu;o.menIcnOldInit=o.init;o.init=SingleIconMenuWidget_init;o.removeAllMenuItems=IconMenuWidget_removeAllMenuItems;o.index=_allBOIcons.length++;_allBOIcons[o.index]=o;o.setDisabled=IconMenuWidget_setDisabled;o.isDisabled=IconMenuWidget_isDisabled;o.disableMenu=IconMenuWidget_disableMenu;o.changeText=IconMenuWidget_changeText;o.imwpResize=o.resize;o.resize=IconMenuWidget_resize;o.changeArrowTooltip=IconMenuWidget_changeArrowTooltip;o.disp=true;o.isDisplayed=IconWidget_isDisplayed;o.setDisplay=IconWidget_setDisplay;return o}function SingleIconMenuWidget_init(){var o=this;o.menIcnOldInit();o.menu.init();var l=o.layer;l.onmouseover=SingleIconMenuWidget_OverCB;l.onmouseout=SingleIconMenuWidget_OutCB}function SingleIconMenuWidget_getHTML(){var o=this,d=o.disp?"":"display:none;";return'<table id="'+o.id+'" cellspacing="0" cellpadding="0" border="0" style="'+d+'" role="button" class="'+o.nocheckClass+'"><tr><td>'+o.icon.getHTML()+'</td><td style="padding-left:'+o.spc+'px" width="'+(13+o.spc)+'">'+o.arrow.getHTML()+"</td></tr></table>"}function SingleIconMenuWidget_OverCB(){SingleIconMenuWidgetOverCB(getWidget(this).index);return true}function SingleIconMenuWidget_OutCB(){SingleIconMenuWidgetOutCB(getWidget(this).index)}function SingleIconMenuWidgetOverCB(i){o=_allBOIcons[i];IconWidget_overCB(o.index)}function SingleIconMenuWidgetOutCB(i){o=_allBOIcons[i];if(!o.menu.isShown()){IconWidget_outCB(o.index)}else{IconWidget_overCB(o.index)}}function SingleIconMenuWidget_clickCB(){var o=this,l=o.layer;var position=getPos2(l);o.menu.show(!o.menu.isShown(),position.x,position.y+o.getHeight()+1,null,null,o);SingleIconMenuWidgetOverCB(o.index)}function SingleIconMenuWidget_iconClickCB(){}function SingleIconMenuWidget_hideCB(){var o=this.parIcon;o.focus();SingleIconMenuWidgetOutCB(o.index)}function newIconCheckWidget(id,src,clickCB,text,alt,w,h,dx,dy,disDx,disDy){var o=newIconWidget(id,src,clickCB,text,alt,w,h,dx,dy,disDx,disDy);o.checked=false;o.internalUpCB=IconCheckWidget_internalUpCB;o.internalDownCB=IconCheckWidget_internalDownCB;o.check=IconCheckWidget_check;o.isChecked=IconCheckWidget_isChecked;o.oldInit=o.init;o.init=IconCheckWidget_init;o.isRadio=false;return o}function newPaletteContainerWidget(id,contextMenu,margin){var o=newWidget(id);o.beginHTML=PaletteContainerWidget_beginHTML;o.endHTML=PaletteContainerWidget_endHTML;o.add=PaletteContainerWidget_add;o.palettes=new Array;o.contextMenu=contextMenu;o.margin=(margin!=null)?margin:4;return o}function newPaletteWidget(id,height){var o=newWidget(id);o.getHTML=PaletteWidget_getHTML;o.add=PaletteWidget_add;o.disableChildren=PaletteWidget_disableChildren;o.items=new Array;o.oldInit=o.init;o.init=PaletteWidget_init;o.beginRightZone=PaletteWidget_beginRightZone;o.delayedAddChild=PaletteWidget_delayedAddChild;o.height=height;o.rightZoneIndex=-1;o.sepCount=0;o.vertPadding=4;o.isLeftTableFixed=false;return o}function newPaletteVerticalSepWidget(id,height){var o=newSeparatorWidget(id,height,0,2,0,2);o.height=height;o.isSeparator=true;return o}function IconRadioWidget_uncheckOthers(){var g=this.groupInstance,idx=this.groupIdx,len=g.length;for(var i=0;i<len;i++){if(i!=idx){var c=g[i];if(c){c.check(false)}}}}function PaletteWidget_beginRightZone(){this.rightZoneIndex=this.items.length}function PaletteSepWidget_getHTML(){return'<div style="background-image:url('+_skin+'sep.gif);height:2px;padding:0px;margin-top:0px;margin-bottom:0px;margin-left:4px;margin-right:4px">'+getSpace(1,2)+"</div>"}function PaletteContainerWidget_beginHTML(){var o=this;var cm=o.contextMenu?('oncontextmenu="'+_dhtmlLib+'.PaletteContainerWidget_contextMenu(this,event);return false"'):"";return"<div "+cm+'class="palette" style="overflow:hidden;margin:'+o.margin+'px;" id="'+o.id+'">'}function PaletteContainerWidget_contextMenu(o,e){if(_ie){e=_curWin.event}var delayedMenu=getWidget(o).contextMenu;setTimeout(function(){delayedMenu.par=null;delayedMenu.show(true,absxpos(e),absypos(e))},1)}function PaletteContainerWidget_endHTML(){return"</div>"}function PaletteContainerWidget_add(palette){this.palettes[this.palettes.length]=palette;return palette}function PaletteWidget_getHTML(){var o=this,items=o.items,len=items.length,fields=new Array,j=0;var alignLeft=_rtl?"right":"left";var alignRight=_rtl?"left":"right";fields[j++]='<table style="position:relative;overflow:hidden" id="'+o.id+'" '+attr("height",o.height)+' cellspacing="0" cellpadding="0" width="100%"><tbody><tr valign="middle">';fields[j++]='<td width="100%" align="'+alignLeft+'" style="padding-left:'+o.vertPadding+'px;padding-right:4px">';fields[j++]='<table id="'+o.id+'_left" cellspacing="0" cellpadding="0"'+(o.isLeftTableFixed?'style="table-layout:fixed;width:100%"':"")+">";fields[j++]='<tbody><tr valign="middle">';var haveRightZone=false;for(var i=0;i<len;i++){if(i==o.rightZoneIndex){fields[j++]='</tr></tbody></table></td><td align="'+alignRight+'" style="padding-right:'+o.vertPadding+'px"><table cellspacing="0" cellpadding="0"><tbody><tr valign="middle">';haveRightZone=true}var it=items[i];fields[j++]="<td>"+it.getHTML()+"</td>"}fields[j++]="</tr></tbody></table></td></tr></tbody></table>";return fields.join("")}function PaletteWidget_add(item){if(item==null){item=newPaletteVerticalSepWidget(this.id+"_palettesep_"+(this.sepCount++))}this.items[this.items.length]=item;return item}function PaletteWidget_delayedAddChild(item,index){if(item==null){item=newPaletteVerticalSepWidget(this.id+"_palettesep_"+(this.sepCount++))}var itemHTML=item.getHTML();var tr=this.leftLayer.firstChild.firstChild;var td=tr.insertCell(index);td.innerHTML=itemHTML;item.init();return item}function PaletteWidget_disableChildren(dis){var items=this.items;for(var i=0;i<items.length;i++){var item=items[i];if(item&&(item.isSep!=true)){item.setDisabled(dis)}}}function PaletteWidget_init(){this.oldInit();this.leftLayer=getLayer(this.id+"_left");var items=this.items;for(var i=0;i<items.length;i++){var item=items[i];if(item){item.init()}}}function IconWidget_isDisplayed(){return this.disp}function IconWidget_setDisplay(d){var o=this;if(o.css){var ds=d?"block":"none";if(o.css.display!=ds){o.css.display=ds}}o.disp=d}function IconWidget_getTxtWidth(){var o=this,w=o.width;if(w!=null){w=w-(o.margin*2);w=w-(o.src?o.w+o.border:1);w=w-(o.txtNoPadding?0:((o.src?4:2)+2));if(_ie){w-=2}else{w-=2}return Math.max(0,w)}else{return -1}}function IconWidget_init(){var o=this,dblClick=false;o.iconOldInit();var l=o.layer;l.tabIndex=o.dis?-1:0;l.title=(o.alt?o.alt:(o.text?o.text:""));if(o.clickCB){l.onclick=IconWidget_upCB;l.onmousedown=IconWidget_downCB;if(o.allowDblClick&&(_ie||_saf)){dblClick=true;addDblClickCB(l,IconWidget_upCB)}l.onkeydown=IconWidget_keydownCB;l.onmouseover=IconWidget_realOverCB;l.onmouseout=IconWidget_realOutCB}if(!dblClick){addDblClickCB(l,IconWidget_retFalse)}l.onselectstart=IconWidget_retFalse;var d=o.disp?"block":"none";if(o.css.display!=d){o.css.display=d}}function IconWidget_getHTML(){var o=this,imgCode=o.src?'<div style="position:relative;overflow:hidden;height:'+(o.h+o.border)+"px;width:"+(o.w+o.border)+"px;cursor:"+(o.clickCB?(!o.acceptClick()?"default":_hand):"default")+'">'+simpleImgOffset(o.src,o.w,o.h,o.dis?o.disDx:o.dx,o.dis?o.disDy:o.dy,"IconImg_"+o.id,null,o.alt,"margin:2px; background-repeat:no-repeat;")+o.extraHTML+"</div>":'<div class="iconText" style="width:1px;height:'+(o.h+o.border)+'px"></div>';var txtAtt='style="white-space:nowrap;',txtW=o.getTxtWidth();if(txtW>=0){txtAtt+="text-overflow:ellipsis;overflow:hidden;width:"+txtW+"px"}txtAtt+='"';var d=o.disp?"":"display:none;";var buttonW=_ie&&_isQuirksMode?o.w+o.border:o.w+o.border-2;var buttonH=_ie&&_isQuirksMode?o.h+o.border:o.h+o.border-2;return"<table dir="+(_rtl?"RTL":"LTR")+' style="'+d+(o.width!=null?"width:"+o.width+"px;":"")+"margin:"+o.margin+'px" id="'+o.id+'" class="'+o.nocheckClass+'" cellspacing="0" cellpadding="0"border="0" role="button" '+(o.ariaHasPopUp?'aria-haspopup="true"':"")+'><tr valign="middle"><td><div style="position: relative"><div class="button_image" style="width: '+buttonW+"px;height: "+buttonH+'px;"></div><div style="position:relative">'+((o.clickCB&&_ie)?lnk(imgCode,null,null,null,' tabIndex="-1"'):imgCode)+"</div></div></td>"+(o.text?'<td align="'+o.txtAlign+'" style="padding-left:'+(o.txtNoPadding?0:(o.src?4:2))+"px;padding-right:"+(o.txtNoPadding?0:2)+'px"><div id="IconImg_Txt_'+o.id+'" class="iconText'+(o.dis?"Dis":"")+'" '+txtAtt+">"+convStr(o.text)+"</div></td>":"")+"</tr></table>"}function IconWidget_realOutCB(){var o=getWidget(this);eval(o.outCB+"("+o.index+")")}function IconWidget_realOverCB(){var o=getWidget(this);eval(o.overCB+"("+o.index+")");return true}function IconWidget_retFalse(){return false}function IconWidget_resize(w,h){var o=this;if(o.layer){o.oldRes(w,h)}if(o.txtLayer==null){o.txtLayer=getLayer("IconImg_Txt_"+o.id)}if(w!=null){o.width=w;var txtW=o.getTxtWidth();if(o.txtLayer&&(txtW>=0)){o.txtLayer.style.width=""+txtW+"px"}}if(h!=null){o.h=h?(h-o.border):o.h;if(o.txtLayer&&(o.h>=0)){o.txtLayer.style.height=""+o.h+"px"}}}function IconWidget_changeTooltip(s,isTemporary){var o=this;if(s==null){return}if(!isTemporary){o.alt=s}if(o.layer){o.layer.title=s}if(o.imgLayer==null){o.imgLayer=getLayer("IconImg_"+this.id)}if(o.imgLayer){changeSimpleOffset(o.imgLayer,null,null,null,s)}}function IconWidget_changeText(s){var o=this;o.text=s;if(o.layer){if(o.txtLayer==null){o.txtLayer=getLayer("IconImg_Txt_"+o.id)}o.txtLayer.innerHTML=convStr(s)}}function IconWidget_changeImg(dx,dy,src){var o=this;if(src){o.src=src}if(dx!=null){o.dx=dx}if(dy!=null){o.dy=dy}if(o.layer&&(o.imgLayer==null)){o.imgLayer=getLayer("IconImg_"+this.id)}if(o.imgLayer){changeSimpleOffset(o.imgLayer,dx,dy,o.src)}}function IconWidget_internalDownCB(){if(!this.dis){this.currentHoverClass=this.checkhoverClass}}function IconWidget_internalUpCB(){if(!this.dis){this.currentHoverClass=this.hoverClass}}function IconWidget_setCrs(){var o=this,crs=(o.clickCB?(!o.acceptClick()?"default":_hand):"default");o.css.cursor=crs;if(o.src){if(o.imgLayer==null){o.imgLayer=getLayer("IconImg_"+o.id)}if(o.imgLayer){o.imgLayer.style.cursor=crs}}}function IconWidget_downCB(){var o=getWidget(this);if((o.layer)&&(o.acceptClick())){o.internalDownCB();o.layer.className=o.currentHoverClass;if((o.par!=null&&o.par.menu==_globMenuCaptured)||(o!=null&&o.menu&&o.menu==_globMenuCaptured)){MenuWidget_releaseGlobMenuCaptured()}}if(_ie||_saf){return false}}function IconWidget_upCB(){var o=getWidget(this);if((o.layer)&&(o.acceptClick())){o.internalUpCB();o.layer.className=o.isHover?o.currentHoverClass:o.currentClass;o.setCrs();delayedClickCB(o.index)}}function IconWidget_keydownCB(e){var o=getWidget(this);var key=eventGetKey(e);if(key==KEY_ENTER||key==KEY_SPACE||(o.isHandleUpDownKey&&(key==KEY_UP||key==KEY_DOWN))){if((o.layer)&&(o.acceptClick())){o.internalUpCB();o.layer.className=o.isHover?o.currentHoverClass:o.currentClass;o.setCrs();setTimeout(function(){delayedClickCB(o.index)},1)}eventCancelBubble(e);eventPreventDefault(e)}}function delayedClickCB(index){var o=_allBOIcons[index];if(o.beforeClickCB){o.beforeClickCB()}if(o.clickCB){o.clickCB()}}function IconWidget_overCB(index){var o=_allBOIcons[index];o.setCrs();if((o.layer)&&(!o.dis)&&!(o.par&&o.par.checked)){o.isHover=true;o.layer.className=o.currentHoverClass}}function IconWidget_outCB(index){var o=_allBOIcons[index];if((o.layer)&&(o.outEnable)&&!(o.par&&o.par.checked)){o.isHover=false;o.layer.className=o.currentClass}}function IconCheckWidget_init(){var o=this;o.oldInit();o.check(o.checked,true)}function IconCheckWidget_internalDownCB(){var o=this;if(o.acceptClick()){o.currentHoverClass=o.checked?o.hoverClass:o.checkhoverClass}}function IconCheckWidget_internalUpCB(){var o=this;if(o.acceptClick()){o.checked=o.isRadio?true:!o.checked;o.currentClass=o.checked?this.checkClass:this.nocheckClass;o.currentHoverClass=o.checked?this.checkhoverClass:this.hoverClass}}function IconCheckWidget_check(checked,force){var o=this;if((o.checked!=checked)||force){o.checked=checked;if(o.layer){o.layer.className=o.currentClass=o.checked?this.checkClass:this.nocheckClass;o.currentHoverClass=o.checked?this.checkhoverClass:this.hoverClass}}if(o.checked&&o.beforeClickCB){if(o.layer){o.beforeClickCB()}}}function IconCheckWidget_isChecked(){return this.checked}function IconWidget_setClasses(nocheck,check,hover,checkhover){var o=this;o.nocheckClass=nocheck;o.checkClass=check;o.hoverClass=hover;o.checkhoverClass=checkhover;o.currentClass=o.nocheckClass;o.currentHoverClass=o.hoverClass}function IconWidget_setDisabled(dis){var o=this;if(o.dis!=dis){o.dis=dis;if(o.layer){o.setCrs();if(o.src){if(o.imgLayer==null){o.imgLayer=getLayer("IconImg_"+this.id)}changeSimpleOffset(o.imgLayer,dis?o.disDx:o.dx,dis?o.disDy:o.dy)}if(o.text){if(o.txtLayer==null){o.txtLayer=getLayer("IconImg_Txt_"+o.id)}o.txtLayer.className="iconText"+(dis?"Dis":"");if(dis){o.layer.className=o.currentClass}}o.layer.setAttribute("aria-disabled",dis);if(o.isTabEnabled){o.layer.tabIndex=o.dis?-1:0}}}}function IconWidget_isDisabled(){return this.dis?this.dis:false}function IconWidget_acceptClick(){var o=this;if(o.isDisabled()){return false}if(o.isRadio&&o.checked){return false}return true}function newCustomCombo(id,changeCB,noMargin,width,tooltip,url,w,h,dx,dy,disDx,disDy){var o=newIconMenuWidget(id,url,null," ",tooltip,w,h,dx,dy,disDx,disDy);o.icon.width=width!=null?Math.max(0,width-13):50-(2*o.margin);o.icon.setClasses("combonocheck","combocheck","combohover","combocheck");o.icon.clip;o.arrow.setClasses("iconnocheck","combobtnhover","combobtnhover","combobtnhover");o.spc=0;o.margin=2;if(url==null){o.icon.h=12;o.arrow.h=12;o.arrow.dy+=2;o.arrow.disDy+=2}o.counter=0;o.changeCB=changeCB;o.selectedItem=null;o.setOldDid=o.setDisabled;o.disabled=false;o.ccomboOldInit=o.init;o.init=CustomCombo_init;o.add=CustomCombo_add;o.addSeparator=CustomCombo_addSeparator;o.addMenuItem=CustomCombo_addMenuItem;o.select=CustomCombo_select;o.getSelection=CustomCombo_getSelection;o.valueShow=CustomCombo_valueShow;o.valueSelect=CustomCombo_valueSelect;o.setUndefined=CustomCombo_setUndefined;o.setDisabled=CustomCombo_setDisabled;o.getVisibleItemsCount=CustomCombo_getVisibleItemsCount;o.selectItem=CustomCombo_selectItem;o.getItemByIndex=CustomCombo_getItemByIndex;o.getItemIndex=CustomCombo_getItemIndex;o.setItemDisabled=CustomCombo_setItemDisabled;return o}function CustomCombo_init(){var o=this;o.ccomboOldInit();if(o.disabled){o.icon.changeTooltip(o.icon.alt?o.icon.alt:"",true)}var arrowToolTip=L_DHTMLLIB_openMenu.replace("{0}",(o.icon.alt?o.icon.alt:""));o.arrow.changeTooltip(arrowToolTip)}function CustomCombo_add(s,val,selected){var o=this;var item=o.menu.addCheck(o.id+"_it_"+(o.counter++),s,CustomCombo_internalCB);item.val=""+val;item.parCombo=o;item.isComboVal=true;if((o.selectedItem==null)||selected){o.selectItem(item)}}function CustomCombo_addSeparator(){this.menu.addSeparator()}function CustomCombo_addMenuItem(id,text,cb,icon,dx,dy,disabled,disDx,disDy){this.menu.add(id,text,cb,icon,dx,dy,disabled,disDx,disDy)}function CustomCombo_internalCB(){var o=this,c=o.parCombo;c.selectItem(o);if(c.changeCB){c.changeCB()}}function CustomCombo_getItemByIndex(idx){var items=this.menu.items;return((idx>=0)&&(idx<items.length))?items[idx]:null}function CustomCombo_getItemIndex(item){var items=this.menu.items,len=items.length,j=0;for(var i=0;i<len;i++){var it=items[i];if(it.isComboVal){if(it.id==item.id){return j}j++}}return -1}function CustomCombo_selectItem(item){var o=this;if(o.selectedItem){o.selectedItem.check(false)}if(item){o.val=item.val;o.icon.changeText(o.disabled?"":item.text);o.selectedItem=item;item.check(true);if(o.disabled){o.icon.changeTooltip(o.icon.alt?o.icon.alt:"",true)}else{o.icon.changeTooltip(o.icon.alt?(o.icon.alt+" ("+item.text)+")":(item.text),true)}}else{o.val=null;o.icon.changeText("");o.icon.changeTooltip(o.icon.alt?o.icon.alt:"",true);o.selectedItem=null}}function CustomCombo_setDisabled(d){var o=this;if(o.selectedItem){o.icon.changeText(d?"":o.selectedItem.text)}o.disabled=d;o.setOldDid(d);if(d){o.icon.changeTooltip(o.icon.alt?o.icon.alt:"",true)}}function CustomCombo_select(idx){var o=this,item=o.getItemByIndex(idx);if(item){o.selectItem(item)}}function CustomCombo_setItemDisabled(idx,disabled){var o=this,item=o.getItemByIndex(idx);if(item){item.setDisabled(disabled)}}function CustomCombo_getSelection(){var o=this,it=o.selectedItem;if(it){return{index:o.getItemIndex(it),value:it.val}}else{return null}}function CustomCombo_valueSelect(v){v=""+v;var o=this,items=o.menu.items,len=items.length;for(var i=0;i<len;i++){var it=items[i];if((it.isComboVal)&&(it.val==v)&&(it.isShown)){o.selectItem(it);return true}}return false}function CustomCombo_valueShow(v,show){v=""+v;var o=this,items=o.menu.items,len=items.length;for(var i=0;i<len;i++){var it=items[i];if((it.isComboVal)&&(it.val==v)){it.show(show);return}}}function CustomCombo_setUndefined(u){var o=this;if(u){o.selectItem(null)}}function CustomCombo_getVisibleItemsCount(){var o=this,items=o.menu.items,len=items.length,n=0;for(var i=0;i<len;i++){var it=items[i];if((it.isComboVal)&&(it.isShown)){n++}}return n}function newComboTextFieldWidget(id,changeCB,maxChar,keyUpCB,enterCB,noMargin,tooltip,width,focusCB,blurCB){var o=newTextFieldWidget(id,changeCB,maxChar,keyUpCB,enterCB,noMargin,tooltip,width,focusCB,blurCB);o.par=null;o.oldInit=o.init;o.init=ComboTextFieldWidget_init;o.setContentEditable=ComboTextFieldWidget_setContentEditable;o.isContentEditable=ComboTextFieldWidget_isContentEditable;o.getHTML=ComboTextFieldWidget_getHTML;o.oldSetDisabled=o.setDisabled;o.setDisabled=ComboTextFieldWidget_setDisabled;o.focus=ComboTextFieldWidget_focus;o.inputNode=null;return o}function ComboTextFieldWidget_focus(){var o=this;safeSetFocus(o.inputNode)}function ComboTextFieldWidget_init(){var o=this;o.oldInit();o.inputNode=getLayer(o.id+"_input");if(o.inputNode!=null){o.setContentEditable(true);o.inputNode.onclick=ComboTextFieldWidget_onClick}}function ComboTextFieldWidget_setContentEditable(d){var o=this,l=o.inputNode;o.contentEditable=d;if(l){if(_moz){l.readOnly=!d}else{l.contentEditable=d}l.style.cursor=d?"text":_hand;l.className="crtextinputs"}}function ComboTextFieldWidget_isContentEditable(){var o=this;return o.contentEditable}function ComboTextFieldWidget_onClick(){var o=getWidget(this);if(o.contentEditable){return}if(o.par!=null){o.par.clickCB()}}function ComboTextFieldWidget_getHTML(){var o=this;return'<div id="'+this.id+'" style="position:relative;background-color:#ffffff;'+sty("width",this.width)+';"><div class="textinputsBG" style="width:100%"></div><div class="textinputsBorder"><input id="'+this.id+'_input"'+(o.disabled?" disabled":"")+' oncontextmenu="event.cancelBubble=true;return true" style="width:100%;'+(_ie?"height:16px;":"height:18px;")+"margin-left:"+(this.noMargin?0:10)+'px" onfocus="'+_dhtmlLib+'.TextFieldWidget_focus(this)" onblur="'+_dhtmlLib+'.TextFieldWidget_blur(this)" onchange="'+_dhtmlLib+'.TextFieldWidget_changeCB(event,this)" onkeydown=" return '+_dhtmlLib+'.TextFieldWidget_keyDownCB(event,this);" onkeyup=" return '+_dhtmlLib+'.TextFieldWidget_keyUpCB(event,this);" onkeypress=" return '+_dhtmlLib+'.TextFieldWidget_keyPressCB(event,this);" type="text" '+attr("maxLength",this.maxChar)+' ondragstart="event.cancelBubble=true;return true" onselectstart="event.cancelBubble=true;return true" class="combo" name="'+this.id+'"'+attr("title",this.tooltip)+' value=""></div></div>'}function ComboTextFieldWidget_setDisabled(d){var o=this;o.oldSetDisabled(d)}function newTextComboWidget(id,maxChar,tooltip,w,changeCB,checkCB,beforeShowCB,formName,role,ariaLabel){var o=newWidget(id);o.role=role;o.ariaLabel=ariaLabel;o.text=newComboTextFieldWidget((formName?formName:"text_"+id),TextComboWidget_checkCB,maxChar,TextComboWidget_keyUpCB,TextComboWidget_enterCB,true,tooltip,w-13);o.isMenuDisabled=false;var tooltipText=L_DHTMLLIB_openMenu.replace("{0}",(tooltip?tooltip:""));o.arrow=newIconWidget("arrow_"+id,_skin+"menus.gif",TextComboWidget_arrowClickCB,null,tooltipText,8,16,0,81,0,97,true,true);o.menu=newMenuWidget("menu_"+id,TextComboWidget_hideCB,beforeShowCB);o.arrow.setClasses("iconnocheck","combobtnhover","combobtnhover","combobtnhover");o.text.par=o;o.arrow.par=o;o.menu.parIcon=o;o.arrow.margin=0;o.arrow.overCB="IconWidget_none";o.arrow.outCB="IconWidget_none";o.margin=0;o.spc=0;o.counter=0;o.arrow.h=12;o.arrow.dy+=2;o.arrow.disDy+=2;o.index=_allBOIconsMenus.length++;_allBOIconsMenus[o.index]=o;o.menIcnOldInit=o.init;o.init=TextComboWidget_init;o.imwpResize=o.resize;o.resize=TextComboWidget_resize;o.getHTML=TextComboWidget_getHTML;o.setDisabled=TextComboWidget_setDisabled;o.isDisabled=TextComboWidget_isDisabled;o.add=TextComboWidget_add;o.addSeparator=TextComboWidget_addSeparator;o.addMenuItem=TextComboWidget_addMenuItem;o.select=TextComboWidget_select;o.getSelection=TextComboWidget_getSelection;o.valueShow=TextComboWidget_valueShow;o.valueSelect=TextComboWidget_valueSelect;o.setUndefined=TextComboWidget_setUndefined;o.setContentEditable=TextComboWidget_setContentEditable;o.isContentEditable=TextComboWidget_isContentEditable;o.changeCB=changeCB;o.checkCB=checkCB;o.clickCB=TextComboWidget_clickCB;o.selectItem=TextComboWidget_selectItem;o.getItemByIndex=TextComboWidget_getItemByIndex;o.getItemIndex=TextComboWidget_getItemIndex;o.setItemDisabled=TextComboWidget_setItemDisabled;o.setMenuDisabled=TextComboWidget_setMenuDisabled;o.text.enterCancelBubble=false;return o}function TextComboWidget_setMenuDisabled(disable){var o=this;o.isMenuDisabled=disable;o.arrow.setDisplay(!disable)}function TextComboWidget_init(){var o=this;o.menIcnOldInit();o.text.init();o.arrow.init();o.menu.init();var l=o.layer;l.onmouseover=TextCombo_OverCB;l.onmouseout=TextCombo_OutCB}function TextComboWidget_getHTML(){var o=this,s="";if(o.ariaLabel){s+="<label style='display:none' id='"+o.id+"_label'>"+o.ariaLabel+"</label>"}s+='<table id="'+o.id+'" '+(o.role?('role="'+o.role+'" '):"")+(o.ariaLabel?('aria-labelledby="'+o.id+'_label" '):"")+' cellspacing="0" cellpadding="0" border="0" style="cursor:default;margin:'+o.margin+'px"><tbody><tr>';s+="<td>"+o.text.getHTML()+"</td>";s+='<td style="padding-left:'+o.spc+'px" width="'+(13+o.spc)+'">'+o.arrow.getHTML()+"</td>";s+="</tr></tbody></table>";return s}function TextComboWidget_resize(w,h){var o=this;if(w!=null){w=Math.max(0,w-2*o.margin)}var d=o.layer.display!="none";if(d&_moz&&!_saf){o.setDisplay(false)}o.imwpResize(w,h);if(d&_moz&&!_saf){o.setDisplay(true)}}function TextComboWidget_add(s,val,selected){var o=this;var item=o.menu.addCheck(o.id+"_it_"+(o.counter++),s,TextComboWidget_internalCB);item.val=""+val;item.parCombo=o;item.isComboVal=true;if((o.selectedItem==null)||selected){o.selectItem(item)}}function TextComboWidget_addSeparator(){this.menu.addSeparator()}function TextComboWidget_addMenuItem(id,text,cb,icon,dx,dy,disabled,disDx,disDy){this.menu.add(id,text,cb,icon,dx,dy,disabled,disDx,disDy)}function TextComboWidget_setDisabled(d){var o=this;o.text.setDisabled(d);o.arrow.setDisabled(d);o.menu.setDisabled(d);o.disabled=d}function TextComboWidget_isDisabled(){var o=this;return o.disabled}function TextComboWidget_select(idx){var o=this,item=o.getItemByIndex(idx);if(item){o.selectItem(item)}}function TextComboWidget_setItemDisabled(idx,disabled){var o=this,item=o.getItemByIndex(idx);if(item){item.setDisabled(disabled)}}function TextComboWidget_getSelection(){var o=this,it=o.selectedItem;var txt=o.text.getValue();if(it){return{index:o.getItemIndex(it),value:it.val}}else{return{index:-1,value:txt}}}function TextComboWidget_valueSelect(v){v=""+v;var o=this,items=o.menu.items,len=items.length;for(var i=0;i<len;i++){var it=items[i];if((it.isComboVal)&&(it.val==v)){o.selectItem(it);return}}o.text.setValue(v)}function TextComboWidget_valueShow(v,show){v=""+v;var o=this,items=o.menu.items,len=items.length;for(var i=0;i<len;i++){var it=items[i];if((it.isComboVal)&&(it.val==v)){it.show(show);return}}o.text.setValue(v);o.text.show(show)}function TextComboWidget_setUndefined(u){var o=this;if(u){o.selectItem(null)}}function TextComboWidget_setContentEditable(d){var o=this;o.text.setContentEditable(d)}function TextComboWidget_isContentEditable(){var o=this;return o.text.isContentEditable()}function TextComboWidget_selectItem(item){var o=this;if(o.selectedItem){o.selectedItem.check(false)}if(item){o.val=item.val;o.text.setValue(item.text);o.selectedItem=item;item.check(true)}else{o.val=null;o.text.setValue("");o.selectedItem=null}}function TextComboWidget_getItemByIndex(idx){var items=this.menu.items;return((idx>=0)&&(idx<items.length))?items[idx]:null}function TextComboWidget_getItemIndex(item){var items=this.menu.items,len=items.length,j=0;for(var i=0;i<len;i++){var it=items[i];if(it.isComboVal){if(it.id==item.id){return j}j++}}return -1}function TextComboWidget_changeCB(){var p=this.par;var b=true;if(p.checkCB){b=p.checkCB()}if(!b){return}if(p.changeCB){p.changeCB()}}function TextComboWidget_enterCB(){var p=this.par;if(p.selectedItem){p.selectedItem.check(false);p.selectedItem=null}var b=true;if(p.checkCB){b=p.checkCB()}if(!b){return}if(p.changeCB){p.changeCB()}}function TextComboWidget_checkCB(){var p=this.par;if(p.checkCB){p.checkCB()}}function TextComboWidget_hideCB(){var o=this.parIcon;if(o.text){o.text.focus()}TextComboOutCB(o.index)}function TextComboWidget_arrowClickCB(){this.par.clickCB()}function TextComboWidget_clickCB(){var o=this,l=o.layer;if(o.isMenuDisabled){return}o.menu.show(!o.menu.isShown(),getPosScrolled(l).x,getPosScrolled(l).y+o.getHeight()+1,null,null,o);TextComboOverCB(o.index)}function TextCombo_OverCB(){TextComboOverCB(getWidget(this).index);return true}function TextComboOverCB(i){var o=_allBOIconsMenus[i];IconWidget_overCB(o.arrow.index)}function TextCombo_OutCB(i){TextComboOutCB(getWidget(this).index)}function TextComboOutCB(i){var o=_allBOIconsMenus[i];if(!o.menu.isShown()){IconWidget_outCB(o.arrow.index)}else{IconWidget_overCB(o.arrow.index)}}function TextComboWidget_internalCB(){var o=this,c=o.parCombo;c.selectItem(o);if(c.changeCB){c.changeCB()}}function TextComboWidget_keyUpCB(e){var p=this.par;if(eventGetKey(e)==KEY_DOWN||eventGetKey(e)==KEY_UP){p.clickCB()}}DHTMLLIB.add(PaletteContainerWidget_contextMenu,IconWidget_realOverCB,IconWidget_realOutCB);var _menusZIndex=2000;var _menusItems=new Array;var _globMenuCaptured=null;var _isColor=0;var _isLastUsedColor=1;var _isNotColor=2;var _currentFocus=null;var _mitemH=22;function newMenuWidget(id,hideCB,beforeShowCB){var o=newWidget(id);o.items=new Array;o.par=null;o.container=null;o.currentSub=-1;o.nextSub=-1;o.zIndex=_menusZIndex;o.hideCB=hideCB;o.beforeShowCB=beforeShowCB;o.overflowCB=null;o.accelEnabled=false;o.isCentered=false;o.init=MenuWidget_init;o.justInTimeInit=MenuWidget_justInTimeInit;o.beginHTML=MenuWidget_beginHTML;o.getHTML=MenuWidget_getHTML;o.endHTML=MenuWidget_endHTML;o.show=MenuWidget_show;o.setAccelEnabled=MenuWidget_setAccelEnabled;o.isAccelEnabled=MenuWidget_isAccelEnabled;o.internalAdd=o.add=MenuWidget_add;o.addCheck=MenuWidget_addCheck;o.addSeparator=MenuWidget_addSeparator;o.insert=MenuWidget_insert;o.insertCheck=MenuWidget_insertCheck;o.insertSeparator=MenuWidget_insertSeparator;o.getItem=MenuWidget_getItem;o.getItemByID=MenuWidget_getItemByID;o.isShown=MenuWidget_isShown;o.remove=MenuWidget_remove;o.removeAll=MenuWidget_removeAll;o.removeByID=MenuWidget_removeByID;o.resetItemCount=MenuWidget_resetItemCount;o.resetTooltips=MenuWidget_resetTooltips;o.resetSepCount=MenuWidget_resetSepCount;o.showSub=MenuWidget_showSub;o.captureClicks=MenuWidget_captureClicks;o.releaseClicks=MenuWidget_releaseClicks;o.focus=MenuWidget_focus;o.restoreFocus=MenuWidget_restoreFocus;o.hasVisibleItem=MenuWidget_hasVisibleItem;o.updateIndex=MenuWidget_updateIndex;o.getTotalNumItems=MenuWidget_getTotalNumItems;o.clickCB=new Array;o.clickCBDocs=new Array;o.write=MenuWidget_write;o.alignLeft=false;o.sepCount=0;o.itemCount=0;return o}function MenuWidget_captureClicks(w){var o=this;if(o.par==null){if(w==null){_globMenuCaptured=o;o.clickCB.length=0;o.clickCBDocs.length=0;w=_curWin}if(canScanFrames(w)){if(_moz){_oldErrHandler=window.onerror;window.onerror=localErrHandler}try{d=w.document;o.clickCB[o.clickCB.length]=d.onmousedown;o.clickCBDocs[o.clickCBDocs.length]=d;d.onmousedown=MenuWidget_globalClick;var fr=w.frames,len=fr.length;for(var i=0;i<len;i++){o.captureClicks(fr[i])}}catch(expt){}if(_moz){window.onerror=_oldErrHandler}}}}function MenuWidget_releaseClicks(){var o=this;if(o.par==null){var len=o.clickCB.length;for(var i=0;i<len;i++){try{o.clickCBDocs[i].onmousedown=o.clickCB[i]}catch(expt){}o.clickCB[i]=null;o.clickCBDocs[i]=null}o.clickCB.length=0;o.clickCBDocs.length=0}}function MenuWidget_focus(isFocusLastChild){var o=this,items=o.items,len=items.length;var start=(isFocusLastChild==true)?(len-1):0;var end=(isFocusLastChild==true)?0:(len-1);while((isFocusLastChild==true)?start>=end:start<=end){var i=start;if(items[i].isShown&&!items[i].isSeparator){var menuItem=items[i];setTimeout(function(){menuItem.focus()},1);if(o.endLink){o.endLink.show(true)}if(o.startLink){o.startLink.show(true)}break}start+=(isFocusLastChild==true)?-1:1}}function MenuWidget_keepFocus(id,isFocusLastChild){var o=getWidget(getLayer(id));if(o){o.focus(isFocusLastChild)}}function MenuWidget_restoreFocus(){var o=this;if(o.endLink){o.endLink.show(false)}if(o.startLink){o.startLink.show(false)}if(o.parIcon){o.parIcon.focus()}else{if(o.par){o.par.focus()}else{if(o.parCalendar){o.parCalendar.focus()}}}}function MenuWidget_keyDown(id,e){var o=getWidget(getLayer(id));var key=eventGetKey(e);if(key==27&&o){o.restoreFocus();o.show(false,null,null,null,null,null,e);if(o.par&&o.par.par){o.par.par.currentSub=-1}o.currentSub=-1;eventCancelBubble(e)}else{if(o&&(key==109||key==37)){if(o.par&&o.par.par){o.restoreFocus();o.show(false);o.par.par.currentSub=-1;o.currentSub=-1}}else{if(key==13){eventCancelBubble(e)}}}}function MenuWidget_releaseGlobMenuCaptured(){var o=_globMenuCaptured;if(o!=null){o.releaseClicks();_globMenuCaptured=null}}function MenuWidget_globalClick(){var o=_globMenuCaptured;if(o!=null){MenuWidget_releaseGlobMenuCaptured();o.show(false)}}function MenuWidget_add(id,text,cb,icon,dx,dy,disabled,disDx,disDy,alt){var o=this,i=o.items.length,itemNo=null;if(id.substr(0,9)!="_menusep_"){o.itemCount++;itemNo=o.itemCount}var ret=o.items[i]=newMenuItem(o,id,text,cb,itemNo,icon,dx,dy,disabled,disDx,disDy,false,alt);ret.menuIndex=i;ret.dynHTML();return ret}function MenuWidget_addCheck(id,text,cb,icon,dx,dy,disabled,disDx,disDy,alt){var o=this,i=o.items.length,itemNo=null;if(id.substr(0,9)!="_menusep_"){o.itemCount++;itemNo=o.itemCount}var ret=o.items[i]=newMenuItem(o,id,text,cb,itemNo,icon,dx,dy,disabled,disDx,disDy,true,alt);ret.menuIndex=i;ret.dynHTML();return ret}function MenuWidget_addSeparator(){var s=this.internalAdd("_menusep_"+(this.sepCount++));s.isSeparator=true;return s}function MenuWidget_insert(index,id,text,cb,icon,dx,dy,disabled,disDx,disDy,alt){var o=this,i=o.items.length,itemNo=null;if(id.substr(0,9)!="_menusep_"){o.itemCount++;itemNo=o.itemCount}var item=newMenuItem(o,id,text,cb,itemNo,icon,dx,dy,disabled,disDx,disDy,false,alt);arrayAdd(o,"items",item,index);o.updateIndex();item.dynHTML();return item}function MenuWidget_insertCheck(index,id,text,cb,icon,dx,dy,disabled,disDx,disDy,alt){var o=this,i=o.items.length,itemNo=null;if(id.substr(0,9)!="_menusep_"){o.itemCount++;itemNo=o.itemCount}var item=newMenuItem(o,id,text,cb,itemNo,icon,dx,dy,disabled,disDx,disDy,true,alt);arrayAdd(o,"items",item,index);o.updateIndex();item.dynHTML();return item}function MenuWidget_insertSeparator(index){var item=newMenuItem(this,"_menusep_"+(this.sepCount++));item.isSeparator=true;arrayAdd(this,"items",item,index);this.updateIndex();item.dynHTML();return item}function MenuWidget_init(){}function MenuWidget_getItem(index){var o=this,items=o.items;if((index>=0)&&(index<items.length)){return items[index]}return null}function MenuWidget_getItemByID(id){var o=this,items=o.items;for(var i=0;i<items.length;i++){if(items[i].id==id){return items[i]}}return null}function MenuWidget_removeByID(id){var o=this;var item=o.getItemByID(id);if(item){arrayRemove(o,"items",item.menuIndex);o.updateIndex();if(o.tableLayer==null){return}var tbody=o.tableLayer.childNodes[0];tbody.deleteRow(item.menuIndex)}}function MenuWidget_removeAll(){this.remove();this.resetItemCount();this.resetSepCount()}function MenuWidget_remove(index){var o=this,item=null,i=0,idx=0;if(index!=null){item=o.items[index];if(item){idx=item.index;_menusItems.splice(idx,1);for(i=idx;i<_menusItems.length;i++){item=_menusItems[i];item.index=i;if(item.layer){item.layer._boIndex=i}}}arrayRemove(o,"items",index);o.updateIndex()}else{item=o.items[0];if(item){idx=item.index;_menusItems.splice(idx,o.items.length);for(i=idx;i<_menusItems.length;i++){item=_menusItems[i];item.index=i;if(item.layer){item.layer._boIndex=i}}}o.items.length=0}if(o.tableLayer==null){return}var tbody=o.tableLayer.childNodes[0];if(index!=null){tbody.deleteRow(index)}else{while(tbody.firstChild){tbody.removeChild(tbody.firstChild)}}}function MenuWidget_updateIndex(){var items=this.items,len=items.length;for(var i=0;i<len;i++){items[i].menuIndex=i}}function MenuWidget_showSub(){var o=this;if(o.nextSub!=-1){if(o.nextSub!=o.currentSub){var currentItem=o.items[o.currentSub];if(currentItem&¤tItem.sub){currentItem.sub.show(false);o.currentSub=-1}var nextItem=o.items[o.nextSub];if(nextItem&&nextItem.sub){var lyr=nextItem.layer;var x=parseInt((_rtl&&!o.isCentered)?o.css.right:o.css.left);var y=parseInt(o.css.top);for(var i=0;i<o.nextSub;i++){var item=o.items[i];if(item.isShown){if((item.icon!=null)||(item.text!=null)){y+=_mitemH}else{y+=3}}}var w=o.getWidth();if(_rtl&&!o.isCentered){x=this.layer.parentNode.clientWidth-x-w+3}else{x=x+w-4}nextItem.attachSubMenu(nextItem.sub);nextItem.sub.show(true,x,y,false,w);o.currentSub=o.nextSub}}}else{if(o.currentSub!=-1){var currentItem=o.items[o.currentSub];if(currentItem&¤tItem.sub){currentItem.sub.show(false);o.currentSub=-1}}}}function MenuWidget_write(){}function MenuWidget_justInTimeInit(){var o=this;o.layer=getLayer(o.id);if(o.layer==null){targetApp(o.getHTML());o.layer=getLayer(o.id)}o.tableLayer=getLayer(o.id+"_innerTable");o.layer._widget=o.widx;o.css=o.layer.style;o.endLink=newWidget("endLink_"+o.id);o.endLink.init();o.startLink=newWidget("startLink_"+o.id);o.startLink.init();var items=o.items;for(var i=0;i<items.length;i++){items[i].init()}}function MenuWidget_beginHTML(){return""}function MenuWidget_getHTML(){var o=this,items=o.items;var keysCbs=' onkeydown="'+_dhtmlLib+".MenuWidget_keyDown('"+o.id+"',event);return true\" ";var s='<a style="position:absolute;left:-30px;top:-30px; visibility:hidden" id="startLink_'+o.id+'" href="javascript:void(0)" onfocus="'+_dhtmlLib+".MenuWidget_keepFocus('"+o.id+"', true);return false;\" ></a>";s+='<table style="display:none;" class="menuFrame" id="'+o.id+'" cellspacing="0" cellpadding="0" border="0" '+keysCbs+' dir="'+(_rtl?"rtl":"ltr")+'" role="menu"><tbody><tr><td>';s+=o.beginHTML();s+='<table cellspacing="0" cellpadding="0" border="0" id="'+o.id+'_innerTable" style="position:relative;"><tbody>';for(var i=0,l=items.length;i<l;i++){items[i].needsRightPart=o.accelEnabled||items[i].sub;s+="<tr><td>"+items[i].getHTML()+"</td></tr>"}s+="</tbody></table>";s+=o.endHTML();s+="</td></tr></tbody></table>";s+='<a style="position:absolute;left:-30px;top:-30px; visibility:hidden" id="endLink_'+o.id+'" href="javascript:void(0)" onfocus="'+_dhtmlLib+".MenuWidget_keepFocus('"+o.id+"', false);return false;\" ></a>";return s}function MenuWidget_endHTML(){return""}function MenuWidget_show(show,x,y,parentPropagate,parentMenuW,buttonFrom,event,adjustedBoundsOffset){var o=this;if(o.layer==null){o.justInTimeInit()}var css=o.css;if(_rtl&&!o.isCentered){x=(o.parIcon?-o.parIcon.layer.offsetWidth:0)+this.layer.parentNode.clientWidth-x-1}if(show){o.iframeLyr=getDynamicBGIFrameLayer();o.iframeCss=o.iframeLyr.style;if(o.beforeShowCB){o.beforeShowCB()}if(!o.hasVisibleItem()){return}o.captureClicks();css.display="block";css.zIndex=(o.zIndex+1);css.visibility="hidden";if(!_rtl||o.isCentered){css.left="-1000px"}else{css.right="-1000px"}css.top="-1000px";var w=o.getWidth();var h=o.getHeight();if(o.alignLeft){x-=w}if(buttonFrom){var buttonW=buttonFrom.getWidth();if(buttonW>w){x=x+buttonW-w}}var x2=x+w+4,y2=y+h+4;if(x2-getScrollX()>winWidth()){if(buttonFrom){x=Math.max(0,winWidth()-w)}else{x=Math.max(0,x-4-(w+((parentMenuW!=null)?parentMenuW-12:0)))}}if(y2-getScrollY()>winHeight()){var adjustedOutOfBoundsOffsetTop=4;if(adjustedBoundsOffset){adjustedOutOfBoundsOffsetTop=adjustedBoundsOffset}y=Math.max(0,y-adjustedOutOfBoundsOffsetTop-h+(parentMenuW!=null?30:0))}if(_rtl&&!o.isCentered){css.right=""+x+"px"}else{css.left=""+x+"px"}css.top=""+y+"px";if(o.overflowCB){o.overflowCB()}w=o.getWidth();h=o.getHeight();css.visibility="visible";var iCss=o.iframeCss;if(_rtl&&!o.isCentered){iCss.right=""+x+"px";iCss.left=null}else{iCss.left=""+x+"px"}iCss.top=""+y+"px";iCss.width=""+w+"px";iCss.height=""+h+"px";iCss.zIndex=o.zIndex-1;iCss.display="block";if(_ie){y-=2;x-=2}o.nextSub=-1;o.showSub();o.focus()}else{if(parentPropagate&&o.par&&o.par.par){o.par.par.show(show,x,y,parentPropagate)}if(o.iframeLyr){releaseBGIFrame(o.iframeLyr.id)}css.display="none";if(o.iframeCss){o.iframeCss.display="none"}o.nextSub=-1;o.showSub();if(o.hideCB){o.hideCB(event)}o.releaseClicks()}}function MenuWidget_setAccelEnabled(newValue){var o=this;o.accelEnabled=newValue}function MenuWidget_isAccelEnabled(newValue){var o=this;return o.accelEnabled}function MenuWidget_isShown(){var o=this;if(o.layer==null){return false}else{return(o.css.display=="block")}}function MenuWidget_hasVisibleItem(){var o=this;if(o.isMenuColor||o.isCalendar){return true}var items=o.items;for(var i=0;i<items.length;i++){var item=items[i];if(item&&!(item.isSeparator==true)&&item.isShown){return true}}return false}function MenuWidget_getTotalNumItems(){var o=this,items=o.items;return items.length-o.sepCount}function MenuWidget_resetItemCount(){var o=this;o.itemCount=0}function MenuWidget_resetSepCount(){var o=this;o.sepCount=0}function MenuWidget_resetTooltips(){var o=this;o.resetItemCount();len=o.items.length;for(i=0;i<len;i++){o.items[i].updateTooltip()}}function newMenuItem(par,id,text,cb,itemNo,icon,dx,dy,disabled,disDx,disDy,isCheck,alt){var o=new Object;o.par=par;o.id=id;o.text=text;o.cb=cb;o.itemNo=itemNo;o.icon=icon;o.dx=(dx==null)?0:dx;o.dy=(dy==null)?0:dy;o.disDx=(disDx==null)?o.dx:disDx;o.disDy=(disDy==null)?o.dy:disDy;o.sub=null;o.layer=null;o.iconTDLayer=null;o.iconLayer=null;o.textLayer=null;o.textOnlyLayer=null;o.accel=null;o.accelLayer=null;o.hasNoLayer=false;o.isSeparator=false;o.disabled=(disabled!=null)?disabled:false;o.isShown=true;o.alt=alt;o.needsRightPart=false;o.index=_menusItems.length;_menusItems[o.index]=o;o.menuIndex=-1;o.isCheck=isCheck;o.checked=false;o.menuItemType=_isNotColor;o.init=MenuItem_init;o.leftZoneClass="menuLeftPart"+(_rtl?" menuLeftPartBorderRTL":" menuLeftPartBorderLTR");o.leftZoneSelClass="menuLeftPartSel"+(_rtl?" menuLeftPartSelBorderRTL":" menuLeftPartSelBorderLTR");o.rightZoneClass="menuRightPart"+(_rtl?" menuRightPartBorderRTL":" menuRightPartBorderLTR");o.rightZoneSelClass="menuRightPartSel"+(_rtl?" menuRightPartSelBorderRTL":" menuRightPartSelBorderLTR");o.menuIconCheckClass="menuIconCheck"+(_rtl?" menuIconCheckMarginRTL":" menuIconCheckMarginLTR");o.menuIconClass="menuIcon";o.totalNumItems=null;o.attachSubMenu=MenuItem_attachSubMenu;o.getHTML=MenuItem_getHTML;o.getHTMLPart=MenuItem_getHTMLPart;o.dynHTML=MenuItem_dynHTML;o.setDisabled=MenuItem_setDisabled;o.check=MenuItem_check;o.isChecked=MenuItem_isChecked;o.show=MenuItem_show;o.setText=MenuItem_setText;o.setIcon=MenuItem_setIcon;o.setAccelerator=MenuItem_setAccelerator;o.focus=MenuItem_focus;o.setTextClass=MenuItem_setTextClass;o.updateTooltip=MenuItem_updateTooltip;return o}function MenuItem_setTextClass(cls){var o=this;if(o.textOnlyLayer){o.textOnlyLayer.className=cls}}function MenuItem_init(){if(!this.hasNoLayer){var o=this,id=o.par.id;o.layer=getLayer(id+"_item_"+o.id);o.layer._boIndex=o.index;if(!o.isSeparator){if((o.icon!=null)||(o.isCheck)){o.iconLayer=getLayer(id+"_item_icon_"+o.id);o.iconTDLayer=getLayer(id+"_item_td_"+o.id)}o.textLayer=getLayer(id+"_text_"+o.id);o.textOnlyLayer=getLayer(id+"_span_text_"+o.id);o.hiddenLabelLayer=getLayer(id+"_hiddenLabel_"+o.id);o.accelLayer=getLayer(id+"_accel_"+o.id);if(!o.isCheck){o.updateTooltip()}}if(o.isCheck){o.check(o.checked,true)}}}function MenuItem_attachSubMenu(menu){var o=this;o.sub=menu;menu.par=o;menu.zIndex=o.par.zIndex+2;if(o.layer){if(o.arrowLayer==null){o.arrowLayer=getLayer(o.par.id+"_item_arrow_"+o.id)}var dis=o.disabled;changeSimpleOffset(o.arrowLayer,dis?7:0,dis?81:64)}return menu}function MenuItem_check(check,force){var o=this;if((o.checked!=check)||force){o.checked=check;if(o.textOnlyLayer){o.textOnlyLayer.setAttribute("aria-checked",check)}if(o.par.layer){var lyr=o.layer;if(lyr){if(o.icon==null){changeSimpleOffset(o.iconLayer,0,(o.checked?48:0),null,(o.checked?L_DHTMLLIB_menuCheckLab:""))}changeOffset(o.iconTDLayer,0,(o.checked?0:0));if(o.checkFrame==null){o.checkFrame=getLayer(o.par.id+"_item_check_"+o.id)}o.checkFrame.className=(o.checked?o.menuIconCheckClass:o.menuIconClass)}}}}function MenuItem_setDisabled(dis){var o=this;if(o.disabled!=dis){o.disabled=dis;if(o.textOnlyLayer){o.textOnlyLayer.setAttribute("aria-disabled",dis)}if(o.par.layer){var lyr=o.layer;if(lyr){lyr.style.cursor=dis?"default":_hand;if(o.icon){changeSimpleOffset(o.iconLayer,dis?o.disDx:o.dx,dis?o.disDy:o.dy)}var cn="menuTextPart"+(o.disabled?"Disabled":"");if(cn!=o.textLayer.className){o.textLayer.className=cn}if(o.accel&&(cn!=o.accelLayer.className)){o.accelLayer.className=cn}if(o.sub){if(o.arrowLayer==null){o.arrowLayer=getLayer(o.par.id+"_item_arrow_"+o.id)}changeSimpleOffset(o.arrowLayer,dis?7:0,dis?81:64)}}}}}function _mii(lyr,inv){var c=lyr.childNodes,y=0,len=c.length,idx=lyr._boIndex;var o=_menusItems[idx];if(o.disabled){inv=0}else{if(inv){o.par.nextSub=o.menuIndex;MenuItem_callShowSub(idx,true);if(o.par.par){if(o.par.par.par){o.par.par.par.nextSub=o.par.par.menuIndex}}}}var realPart=0;for(var i=0;i<len;i++){var ce=c[i];if(ce.tagName!=null){if(realPart==0){ce.className=(inv?o.leftZoneSelClass:o.leftZoneClass)}else{if(realPart==1){ce.className="menuTextPart"+(inv?"Sel":"")+(o.disabled?"Disabled":"")}else{if(o.accel&&(realPart==2)){ce.className="menuTextPart"+(inv?"Sel":"")+(o.disabled?"Disabled":"");break}else{ce.className=(inv?o.rightZoneSelClass:o.rightZoneClass)}}}realPart++}}}function MenuItem_getHTMLPart(part){var o=this;switch(part){case 0:var im=null,className=' class="'+(o.checked?o.menuIconCheckClass:o.menuIconClass)+'"';if(o.isCheck&&(o.icon==null)){im=simpleImgOffset(_skin+"menus.gif",16,16,0,o.checked?48:0,(o.par.id+"_item_icon_"+o.id),null,(o.checked?L_DHTMLLIB_menuCheckLab:""))}else{im=o.icon?simpleImgOffset(o.icon,16,16,o.disabled?o.disDx:o.dx,o.disabled?o.disDy:o.dy,(o.par.id+"_item_icon_"+o.id),null,o.alt?o.alt:"","margin-left: 3px;"):(getSpace(16,16))}if(o.isCheck){var size=_ie&&_isQuirksMode?18:16;im='<div id="'+o.par.id+"_item_check_"+o.id+'" '+className+' style="width:'+size+"px;height:"+size+'px;position:static;">'+im+"</div>"}return im;case 1:var spanID=(o.par.id+"_span_text_"+o.id);var keysCbs=' onkeydown="'+_dhtmlLib+'._mikd(this, event);return true" ';var hiddenLabel='<label for="'+spanID+'" id="'+(o.par.id+"_hiddenLabel_"+o.id)+'" style="display:none;" ></label>';return'<span id="'+spanID+'" '+keysCbs+' tabIndex="0" role="menuitem'+(o.isCheck?"checkbox":"")+'"'+(o.isCheck?' aria-checked="'+o.checked+'"':"")+' aria-disabled="'+o.disabled+'">'+convStr(o.text)+"</span>"+hiddenLabel;case 2:return simpleImgOffset(_skin+(_rtl?"menus_rtl.gif":"menus.gif"),16,16,o.sub?(o.disabled?7:0):0,o.sub?(o.disabled?81:64):0,o.par.id+"_item_arrow_"+o.id,null,null,null,"right");case 3:var sep=newSeparatorWidget(o.par.id+"_separator"+o.id,null,2,0,_ie&&_isQuirksMode?0:2,0);return sep?sep.getHTML():"";case 4:return convStr(o.accel)}}function MenuItem_getHTML(){var o=this;var ar=new Array(),i=0;ar[i++]='<table class="menuItemBG" cellpadding="0" cellspacing="0" style="width:100%" ><tbody>';if((o.icon!=null)||(o.text!=null)){var ieBG="background-image:url("+_skin+"../transp.gif);";var invertCbs=' onclick="'+_dhtmlLib+'._micl(this,event);return true" oncontextmenu="'+_dhtmlLib+'._micl(this,event);return false" onmouseover="'+_dhtmlLib+'._mii(this,1)" onmouseout="'+_dhtmlLib+'._mii(this,0);" ';var keysCbs=' onkeydown="'+_dhtmlLib+'._mikd(this,event);return true" ';ar[i++]='<tr onmousedown="'+_dhtmlLib+'._minb(event)" onmouseup="'+_dhtmlLib+'._minb(event)" id="'+(o.par.id+"_item_"+o.id)+'" style="'+(!o.isShown?"display:none;":"")+"height:"+_mitemH+"px;width:24px;cursor:"+(o.disabled?"default":_hand)+';" '+invertCbs+keysCbs+' valign="middle">';ar[i++]='<td id="'+(o.par.id+"_item_td_"+o.id)+'" style="width:23px;height:'+_mitemH+"px;"+(_ie?ieBG:"")+'" class="'+o.leftZoneClass+'">';ar[i++]=o.getHTMLPart(0);ar[i++]="</td>";ar[i++]="<td "+(o.centered?' align="center" ':"")+' style="height:'+_mitemH+"px;"+(_ie?ieBG:"")+'" id="'+(o.par.id+"_text_"+o.id)+'" class="menuTextPart'+(o.disabled?"Disabled":"")+'">';ar[i++]=o.getHTMLPart(1);ar[i++]="</td>";if(o.needsRightPart){if(o.accel!=null){ar[i++]='<td class="menuTextPart'+(o.disabled?"Disabled":"")+'" id="'+(o.par.id+"_accel_"+o.id)+'" align="right" style="height:'+_mitemH+"px;"+(_ie?ieBG:"")+'" tabIndex="-1">';ar[i++]=o.getHTMLPart(4);ar[i++]="</td>"}else{ar[i++]='<td class="'+o.rightZoneClass+'" align="right" style="width:20px;height:'+_mitemH+"px;"+(_ie?ieBG:"")+'" >';ar[i++]=o.getHTMLPart(2);ar[i++]="</td>"}}else{ar[i++]='<td class="'+o.rightZoneClass+'" align="right" style="width:2px;height:'+_mitemH+"px;"+(_ie?ieBG:"")+'" >';ar[i++]=img(_skin+"../transp.gif",1,1,null,null,null);ar[i++]="</td>"}ar[i++]="</tr>"}else{ar[i++]='<tr onmousedown="'+_dhtmlLib+'._minb(event)" onclick="'+_dhtmlLib+'._minb(event)" id="'+(o.par.id+"_item_"+o.id)+'" onmouseup="'+_dhtmlLib+'._minb(event)" style="height:3px">';ar[i++]='<td class="'+o.leftZoneClass+'" style="width:24px;height:3px;border:0px"></td>';ar[i++]='<td class="menuTextPart" colspan="2" style="height:3px;border:0px">'+o.getHTMLPart(3)+"</td></tr>"}ar[i++]="</tbody></table>";return ar.join("")}function MenuItem_dynHTML(){var o=this;if(o.par.tableLayer==null){return}var tbody=o.par.tableLayer.childNodes[0],tr=tbody.insertRow(o.menuIndex),td=tr.insertCell(0);td.innerHTML=o.getHTML();o.init()}function MenuItem_isChecked(){return this.checked}function MenuItem_setText(s){var o=this,id=o.par.id;o.text=s;if(o.textLayer){o.textLayer.innerHTML=o.getHTMLPart(1);o.textOnlyLayer=getLayer(id+"_span_text_"+o.id)}}function MenuItem_setAccelerator(keystroke,modifier){var o=this,id=o.par.id;o.accel=((modifier!=null)?L_DHTMLLIB__modifiers[modifier]:"")+keystroke;if(o.accelLayer){o.accelLayer.innerHTML=o.getHTMLPart(4)}}function MenuItem_setIcon(dx,dy,disDx,disDy,url){var o=this;o.url=url?url:o.url;o.dx=(dx!=null)?dx:o.dx;o.dy=(dy!=null)?dy:o.dy;o.disDx=(disDx!=null)?disDx:o.disDx;o.disDy=(disDy!=null)?disDy:o.disDy;if(o.icon&&o.iconLayer){changeSimpleOffset(o.iconLayer,o.disabled?o.disDx:o.dx,o.disabled?o.disDy:o.dy,o.url)}}function MenuItem_show(sh){var o=this;o.isShown=sh;if(o.layer!=null){o.layer.style.display=sh?"":"none"}}function _micl(lyr,e){eventCancelBubble(e);var idx=lyr._boIndex,o=_menusItems[idx];o.layer=lyr;if(!o.disabled){if(o.sub){o.par.nextSub=o.menuIndex;MenuItem_callShowSub(idx)}else{o.par.show(false,0,0,true,null,null,e);if(o.isCheck){if(o.par.uncheckAll){o.par.uncheckAll()}o.check(!o.checked)}if(o.par.container&&o.par.container.updateButton){o.par.container.updateButton(idx)}_mii(lyr,0,idx);o.par.nextSub=-1;if(o.cb){setTimeout(function(){MenuItem_delayedClick(idx)},1)}}}}function _mikd(lyr,e){while(lyr&&(lyr._boIndex==null||lyr._boIndex==undefined)){lyr=lyr.parentNode}if(!lyr||lyr._boIndex==null||lyr._boIndex==undefined){return}var idx=lyr._boIndex,o=_menusItems[idx];o.layer=lyr;var stopPropagation=false;var k=eventGetKey(e);switch(k){case KEY_SPACE:case KEY_ENTER:_micl(lyr,e);break;case 107:case KEY_RIGHT:stopPropagation=true;if(!o.disabled&&o.sub){_micl(lyr,e)}break;case 109:case KEY_DOWN:stopPropagation=true;var items=o.par.items,len=items.length;for(var i=o.menuIndex+1;i<len;i++){if(items[i].isShown&&!items[i].isSeparator){items[i].focus();break}}break;case KEY_UP:stopPropagation=true;var items=o.par.items,len=items.length;for(var i=o.menuIndex-1;i>=0;i--){if(items[i].isShown&&!items[i].isSeparator){items[i].focus();break}}break;case KEY_HOME:stopPropagation=true;var items=o.par.items,len=items.length;for(var i=0;i<len;i++){var item=items[i];if(item.isShown&&!item.isSeparator){item.focus();break}}break;case KEY_END:stopPropagation=true;var items=o.par.items,len=items.length;for(var i=len-1;i>=0;i--){var item=items[i];if(item.isShown&&!item.isSeparator){item.focus();break}}break;case KEY_LEFT:case KEY_RIGHT:case KEY_PAGEUP:case KEY_PAGEDOWN:stopPropagation=true;break;default:break}if(stopPropagation){eventCancelBubble(e);eventPreventDefault(e)}}function MenuItem_callShowSub(idx,delayed){if(delayed){setTimeout(function(){MenuItem_delayedShowSub(idx)},500)}else{MenuItem_delayedShowSub(idx)}}function MenuItem_delayedShowSub(idx){var o=_menusItems[idx];if(o){o.par.showSub()}}function _minb(e){eventCancelBubble(e)}function MenuItem_delayedClick(idx){var item=_menusItems[idx];if(item.cb){item.cb()}}function MenuItem_clickCallTrue(event){_micl(this,event);return true}function MenuItem_clickCallFalse(event){_micl(this,event);return false}function MenuItem_invertCall0(event){_mii(this,0)}function MenuItem_invertCall1(event){_mii(this,1)}function MenuItem_focus(){var o=this;if(isLayerDisplayed(o.layer)&&o.textOnlyLayer&&o.textOnlyLayer.focus){o.textOnlyLayer.focus()}}function MenuItem_updateTooltip(){var o=this;if(o.textOnlyLayer&&!o.isSeparator){if(o.textOnlyLayer.innerHTML){o.textOnlyLayer.title=o.textOnlyLayer.innerHTML}if(o.hiddenLabelLayer){var tooltip=(o.textOnlyLayer.title?o.textOnlyLayer.title:"")+o.itemNo+L_DHTMLLIB_of+o.par.getTotalNumItems();o.hiddenLabelLayer.innerHTML=tooltip}}}function newScrollMenuWidget(id,changeCB,multi,width,lines,tooltip,dblClickCB,keyUpCB,showLabel,label,convBlanks,beforeShowCB,menuClickCB){var o=newWidget(id);o.list=newListWidget("list_"+id,ScrollMenuWidget_changeCB,multi,width,lines,tooltip,ScrollMenuWidget_dblClickCB,ScrollMenuWidget_keyUpCB,ScrollMenuWidget_clickCB);o.list.par=o;o.label=NewLabelWidget("label_"+id,label,convBlanks);o.showLabel=showLabel;o.changeCB=changeCB;o.menuClickCB=menuClickCB;o.dblClickCB=dblClickCB;o.keyUpCB=keyUpCB;o.beforeShowCB=beforeShowCB;o.zIndex=_menusZIndex;o.init=ScrollMenuWidget_init;o.justInTimeInit=ScrollMenuWidget_justInTimeInit;o.setDisabled=ScrollMenuWidget_setDisabled;o.write=ScrollMenuWidget_write;o.getHTML=ScrollMenuWidget_getHTML;o.show=ScrollMenuWidget_show;o.add=ScrollMenuWidget_add;o.del=ScrollMenuWidget_del;o.getSelection=ScrollMenuWidget_getSelection;o.select=ScrollMenuWidget_select;o.clearSelection=ScrollMenuWidget_clearSelection;o.valueSelect=ScrollMenuWidget_valueSelect;o.getCount=ScrollMenuWidget_getCount;o.isShown=MenuWidget_isShown;o.captureClicks=MenuWidget_captureClicks;o.releaseClicks=MenuWidget_releaseClicks;o.clickCB=new Array;o.clickCBDocs=new Array;return o}function ScrollMenuWidget_init(){}function ScrollMenuWidget_clearSelection(){var o=this;if(o.list){o.list.clearSelection()}}function ScrollMenuWidget_justInTimeInit(){var o=this;o.layer=getLayer(o.id);if(o.layer==null){append2(_curDoc.body,o.getHTML());o.layer=getLayer(o.id)}o.layer._widget=o.widx;o.css=o.layer.style;o.css.visibility="hidden";o.list.init();o.label.init()}function ScrollMenuWidget_setDisabled(){}function ScrollMenuWidget_write(){}function ScrollMenuWidget_getHTML(){var o=this;var s="";s+='<table dir="'+(_rtl?"rtl":"ltr")+'" onmousedown="event.cancelBubble=true" id="'+o.id+'" style="display:none;" class="menuFrame" cellspacing="0" cellpadding="0" border="0"><tbody>';s+='<tr><td align="center">'+o.list.getHTML()+"</td></tr>";s+='<tr><td align="center">'+o.label.getHTML()+"</td></tr>";s+="</tbody></table>";return s}function ScrollMenuWidget_show(show,x,y){var o=this;if(o.layer==null){o.justInTimeInit()}var css=o.css;var iCss=o.iframeCss;if(show){if(o.beforeShowCB){o.beforeShowCB()}o.captureClicks();css.display="block";css.zIndex=(o.zIndex+1);css.visibility="hidden";css.left="-1000px";css.top="-1000px";var w=o.getWidth();var h=o.getHeight();if(o.alignLeft){x-=w}var x2=x+w+4,y2=y+h+4;if(x2>winWidth()){x=Math.max(0,x-4-w)}if(y2>winHeight()){y=Math.max(0,y-4-h)}css.left=""+x+"px";css.top=""+y+"px";css.visibility="visible";o.iframeLyr=getDynamicBGIFrameLayer();o.iframeCss=o.iframeLyr.style;var iCss=o.iframeCss;iCss.left=""+x+"px";iCss.top=""+y+"px";iCss.width=""+w+"px";iCss.height=""+h+"px";iCss.zIndex=o.zIndex-1;iCss.display="block";if(_ie){y-=2;x-=2}}else{releaseBGIFrame(o.iframeLyr.id);css.display="none";iCss.display="none";o.releaseClicks()}}function ScrollMenuWidget_add(s,val,sel,id){var o=this;if(o.layer==null){o.justInTimeInit()}o.list.add(s,val,sel,id)}function ScrollMenuWidget_del(i){var o=this;if(o.layer==null){o.justInTimeInit()}o.list.del(i)}function ScrollMenuWidget_getSelection(){var o=this;if(o.layer==null){o.justInTimeInit()}return o.list.getSelection()}function ScrollMenuWidget_select(i){var o=this;if(o.layer==null){o.justInTimeInit()}o.list.select(i)}function ScrollMenuWidget_valueSelect(v){var o=this;if(o.layer==null){o.justInTimeInit()}o.list.valueSelect(v)}function ScrollMenuWidget_getCount(){var o=this;if(o.layer==null){o.justInTimeInit()}return o.list.getCount()}function ScrollMenuWidget_changeCB(){var o=this;if(o.par.changeCB){o.par.changeCB()}}function ScrollMenuWidget_clickCB(){var o=this;o.par.show(false);if(o.par.menuClickCB){o.par.menuClickCB()}}function ScrollMenuWidget_dblClickCB(){var o=this;o.par.show(false);if(o.par.dblClickCB){o.par.dblClickCB()}}function ScrollMenuWidget_keyUpCB(e){var ENTER=13,ESCAPE=27;var o=this;var k=eventGetKey(e);if(k==ENTER||k==ESCAPE||k==KEY_SPACE){o.par.show(false)}if(o.par.keyUpCB){o.par.keyUpCB()}}DHTMLLIB.add(_micl,_mii,_mikd,_minb,MenuWidget_keyDown,MenuWidget_keepFocus);var _boAllTabs=new Array();var _vertTabImgW=3;var _vertTabLBorderToTxt=20-_vertTabImgW-1;var _vertTabLBorderToIcon=12-_vertTabImgW-1;var _vertTabIconToTxt=8;var _vertTabIconSize=16;var _tabImgLeft=0;var _tabImgMid=1;var _tabImgRight=2;var _tabTxt=3;var _tabScrollBar=4;var _tabList=5;var _VertTab=2;var _VertTabWithIcon=3;var _HorizTabTop=4;var _HorizTabBottom=5;var _HorizTabTopWithClose=6;var _menuBarTab=7;var _vertTabHover=0;var _vertTabSelected=1;var _vertTabPressed=2;var _vertTabNormal=3;var _vertTabCSS=[["menuLeftMostSel","naviVTabLSelected","naviVTabLPressed","naviVTabNormal"],["menuLeftPartSel","naviVTabMSelected","naviVTabMPressed","naviVTabNormal"],["menuRightMostSel","naviVTabRSelected","naviVTabRPressed","naviVTabNormal"]];var _vertNaviPanelMinW=120;var _vertNaviPanelMaxW=180;var _vertNaviPanelWithIconW=150;var _vertNaviPanelH=23*8;var _naviHorzTabH=24;var _horizTabSelected=0;var _horizTabNormal=1;var _horizTabHover=2;var _horizTabSelHover=3;var _horizTabPressed=4;var _tabListNormal=0;var _tabListHover=1;var _tabListPressed=2;var _horizTabCSS=[["naviHTabLSelected","naviHTabLNormal","naviHTabLHover","naviHTabLSelHover","naviHTabLNormal"],["naviHTabMSelected","naviHTabMNormal","naviHTabMHover","naviHTabMSelHover","naviHTabMNormal"],["naviHTabRSelected","naviHTabRNormal","naviHTabRHover","naviHTabRSelHover","naviHTabRNormal"],["naviHTabTextSel","naviHTabText","naviHTabTextHover","naviHTabTextSelHover","naviHTabText"],["naviHScrollBarL","naviHScrollBarM","naviHScrollBarR","naviHScrlBarFirstArrow naviHScrlBarArrowPos","naviHScrlBarPrevArrow naviHScrlBarArrowPos","naviHScrlBarNextArrow naviHScrlBarArrowPos","naviHScrlBarLastArrow naviHScrlBarArrowPos","naviHScrlBarHover","naviHScrlBarPressed","naviHScrlBarDisabled","naviHScrlBarFirstDis naviHScrlBarArrowPos","naviHScrlBarPrevDis naviHScrlBarArrowPos","naviHScrlBarNextDis naviHScrlBarArrowPos","naviHScrlBarLastDis naviHScrlBarArrowPos"],["tabListTop","tabListTopHover","tabListTopPressed"]];var _horizTabWithCloseCSS=[["naviHTabLSelected","naviHTabLNormal","naviHTabLHover","naviHTabLSelHover","naviHTabLNormal"],["naviHTabMSelected","naviHTabMNormal","naviHTabMHover","naviHTabMSelHover","naviHTabMNormal"],["naviHTabWithCloseRSel","naviHTabRWithCloseNormal","naviHTabWithCloseRHover","naviHTabWithCloseRSelHover","naviHTabRWithCloseNormal"],["naviHTabTextSel","naviHTabText","naviHTabTextHover","naviHTabTextSelHover","naviHTabText"],["naviHScrollBarL","naviHScrollBarM","naviHScrollBarR","naviHScrlBarFirstArrow naviHScrlBarArrowPos","naviHScrlBarPrevArrow naviHScrlBarArrowPos","naviHScrlBarNextArrow naviHScrlBarArrowPos","naviHScrlBarLastArrow naviHScrlBarArrowPos","naviHScrlBarHover","naviHScrlBarPressed","naviHScrlBarDisabled","naviHScrlBarFirstDis naviHScrlBarArrowPos","naviHScrlBarPrevDis naviHScrlBarArrowPos","naviHScrlBarNextDis naviHScrlBarArrowPos","naviHScrlBarLastDis naviHScrlBarArrowPos"]];var _horizTabImgL=4;var _horizTabImgR=23;var _horizTabTxtPaddingL=15;var _horizTabTxtPaddingR=3;var _horizTabTxtPaddingB=5;var _horizTabImgPadL=8;var _horizTabImgToTxt=6;var _horizBottomTabTxtPadB=7;var _horizTabTxtToClose=5;var _horizTabClosePadR=1;var _noScrollBar=0;var _ScrollBarAtBegin=1;var _ScrollBarAtEnd=2;var _horizBarWidth=100;var _defaultMenuBarWidth=200;var _menuBarTabHeight=22;var _tabListIconWidth=19;function newTabbedZone(id,tabs,cb,w,h){var o=newFrameZoneWidget(id,w,h);o.w=w;o.h=h;o.cb=cb;o.oldIndex=-1;o.tzOldInit=o.init;o.add=TabbedZoneWidget_add;o.select=TabbedZoneWidget_select;o.getTabCSS=TabbedZoneWidget_getTabCSS;o.init=TabbedZoneWidget_init;o.beginHTML=TabbedZoneWidget_beginHTML;o.oldFrameZoneEndHTML=o.endHTML;o.endHTML=TabbedZoneWidget_endHTML;if(!tabs){o.tabs=newTabBarWidget("tzone_tabs_"+id,true,TabbedZone_itemClick);o.tabs.parentTabbedZone=o}else{o.tabs=tabs}o.beginTabHTML=TabbedZoneWidget_beginTabHTML;o.endTabHTML=TabbedZoneWidget_endTabHTML;o.beginTab=TabbedZoneWidget_beginTab;o.endTab=TabbedZoneWidget_endTab;o.showTab=TabbedZoneWidget_showTab;o.tzOldResize=o.resize;o.resize=TabbedZoneWidget_resize;o.getNewRowBelowTabBar=TabbedZoneWidget_getNewRowBelowTabBar;return o}function TabbedZone_itemClick(){var o=this.parentTabbedZone,i=this.getSelection().index;o.select(i);if(o.cb){o.cb(i)}}function TabbedZoneWidget_add(name,value,icon,iconW,iconH,iconOffX,iconOffY){var o=this;o.tabs.add(name,value,-1,icon,iconW,iconH,iconOffX,iconOffY)}function TabbedZoneWidget_init(){var o=this;o.tzOldInit();o.tabs.init();o.select(0)}function TabbedZoneWidget_getTabCSS(tab){if(tab!=null){if(!tab.zoneLayer){tab.zoneLayer=getLayer(tab.zoneId)}if(tab.zoneLayer){return tab.zoneLayer.style}}return null}function TabbedZoneWidget_showTab(index,show){var tab=this.tabs.items[index];if(tab){tab.setDisplay(show)}}function TabbedZoneWidget_resize(w,h){var o=this;if(w!=null){o.w=w}if(h!=null){o.h=h}o.tzOldResize(w,h);var container=getLayer(o.id+"_container");if(container){if(o.w){container.style.width=o.w+"px"}if(o.h){container.style.height=o.h+"px"}}var oldTab=o.tabs.items[o.oldIndex];if(oldTab){var tab=getLayer(oldTab.zoneId);if(tab){if(o.w){tab.style.width=o.w+"px"}if(o.h){tab.style.height=o.h+"px"}}}var rightFrame=getLayer(o.id+"_rightFrame");if(rightFrame){if(o.h){rightFrame.style.height=o.h+"px"}}var leftFrame=getLayer(o.id+"_leftFrame");if(leftFrame){if(o.h){leftFrame.style.height=o.h+"px"}}}function TabbedZoneWidget_select(index){var o=this,tabs=o.tabs,sel=tabs.getSelection(),oldIndex=o.oldIndex,c;var oldTab=tabs.items[o.oldIndex];o.tabs.select(index);if(oldTab){c=o.getTabCSS(oldTab);if(c){c.display="none"}}else{var len=tabs.items.length;for(var i=0;i<len;i++){c=o.getTabCSS(tabs.items[i]);if(c){c.display="none"}}}o.oldIndex=index;c=o.getTabCSS(tabs.items[index]);if(c){c.display="";o.resize(o.w,o.h)}}function TabbedZoneWidget_getNewRowBelowTabBar(){return""}function TabbedZoneWidget_beginHTML(){var o=this;var frameSize=_ie&&_isQuirksMode?"5px":"4px";return'<table id="'+this.id+'" cellspacing="0" cellpadding="0" border="0" style="position:absolute;"><tbody><tr class="hideableFrame" valign="bottom" height="23"><td> </td><td valign="top" align="left">'+o.tabs.getHTML()+"</td><td> </td></tr>"+this.getNewRowBelowTabBar()+'<tr><td><div class="tabbedFrame tabbedFrameCorner '+(_rtl?"tabbedFrameTopRight":"tabbedFrameTopLeft")+'" style="'+sty("width",frameSize)+sty("height",frameSize)+'"/></td><td><div class="tabbedFrame tabbedFrameTop" style="'+sty("height",frameSize)+'"/></td><td><div class="tabbedFrame tabbedFrameCorner '+(_rtl?"tabbedFrameTopLeft":"tabbedFrameTopRight")+'" style="'+sty("width",frameSize)+sty("height",frameSize)+'"/></td></tr><tr><td class="hideableFrame"><div id="'+o.id+'_leftFrame" class="tabbedFrame '+(_rtl?"tabbedFrameRight":"tabbedFrameLeft")+'" style="'+sty("width",frameSize)+'"/></td><td class="dialogzone"><div id="'+o.id+'_container" style="'+sty("width",o.w)+sty("height",o.h)+'">'}function TabbedZoneWidget_endHTML(){var o=this;var frameSize=_ie&&_isQuirksMode?"5px":"4px";return'</div><td class="hideableFrame"><div id="'+o.id+'_rightFrame" class="tabbedFrame '+(_rtl?"tabbedFrameLeft":"tabbedFrameRight")+'" style="'+sty("width",frameSize)+'"/></td></tr><tr class="hideableFrame"><td><div class="tabbedFrame tabbedFrameCorner '+(_rtl?"tabbedFrameBottomRight":"tabbedFrameBottomLeft")+'" style="'+sty("width",frameSize)+sty("height",frameSize)+'"/></td><td><div class="tabbedFrame tabbedFrameBottom" style="'+sty("height",frameSize)+'"/></td><td><div class="tabbedFrame tabbedFrameCorner '+(_rtl?"tabbedFrameBottomLeft":"tabbedFrameBottomRight")+'" style="'+sty("width",frameSize)+sty("height",frameSize)+'"/></td></tr></tr></tbody></table>'}function TabbedZoneWidget_beginTabHTML(index){var o=this;return'<div id="'+o.zoneId+'" style="display:none;'+sty("width",o.w)+sty("height",o.h)+'">'}function TabbedZoneWidget_endTabHTML(){return"</div>"}function TabbedZoneWidget_beginTab(index){_curDoc.write(this.beginTabHTML(index))}function TabbedZoneWidget_endTab(){_curDoc.write(this.endTabHTML())}function newNaviTabWidget(id,name,value,tabType,cb,dblClick,tooltip,icon,iconW,iconH,iconOffX,iconOffY,closeTabCB){return new_NaviTabWidget({id:id,name:name,value:value,tabType:tabType,clickCB:cb,dblclickCB:dblClick,tooltip:tooltip,icon:icon,iconW:iconW,iconH:iconH,iconOffX:iconOffX,iconOffY:iconOffY,closeTabCB:closeTabCB})}function new_NaviTabWidget(prms){var o=new_Widget(prms);o.superInit=o.init;o.init=NaviTabWidget_init;o.getHTML=NaviTabWidget_getHTML;o.hasCloseButton=NaviTabWidget_hasCloseButton;o.select=NaviTabWidget_select;o.setUserData=NaviTabWidget_setUserData;o.getUserData=NaviTabWidget_getUserData;o.setMenu=NaviTabWidget_setMenu;o.getMenu=NaviTabWidget_getMenu;o.setHtml=NaviTabWidget_setHtml;o.getHtml=NaviTabWidget_getHtml;o.zoneId="tzone_tab_"+Math.round(Math.random()*12345)+new Date().getTime();o.tabType=Widget_param(prms,"tabType",_HorizTabTop);o.name=Widget_param(prms,"name","Tab");o.value=Widget_param(prms,"value",0);o.cb=Widget_param(prms,"clickCB",null);o.dblClick=Widget_param(prms,"dblclickCB",null);o.icon=Widget_param(prms,"icon",null);o.iconW=Widget_param(prms,"iconW",(o.icon?_vertTabIconSize:1));o.iconH=Widget_param(prms,"iconH",(o.icon?_vertTabIconSize:1));o.iconOffX=Widget_param(prms,"iconOffX",0);o.iconOffY=Widget_param(prms,"iconOffY",0);o.tooltip=Widget_param(prms,"tooltip",null);o.closeTabCB=Widget_param(prms,"closeTabCB",null);o.isSelected=false;o.leftimgid="naviTabL_"+o.id;o.midimgid="naviTabM_"+o.id;o.rightimgid="naviTabR_"+o.id;o.txtid="naviTabTxt_"+o.id;o.sepid="naviTabSep_"+o.id;o.closeid="naviTabClose_"+o.id;o.iconid="naviTabIcon_"+o.id;switch(o.tabType){case _VertTab:case _VertTabWithIcon:o.tabCSSTable=_vertTabCSS;break;case _HorizTabBottom:o.tabCSSTable=_horizBottomTabCSS;break;case _HorizTabTopWithClose:o.tabCSSTable=_horizTabWithCloseCSS;break;case _HorizTabTop:default:o.tabCSSTable=_horizTabCSS;break;case _menuBarTab:o.tabCSSTable=_menuBarTabCSS;break}o.mover=NaviTabWidget_mover;o.mdown=NaviTabWidget_mdown;o.keydownCB=NaviTabWidget_keydownCB;o.contextMenuCB=NaviTabWidget_contextMenuCB;o.changeState=NaviTabWidget_changeState;o.getVertHTML=NaviTabWidget_getVertHTML;o.getHorizHTML=NaviTabWidget_getHorizHTML;o.displaySep=NaviTabWidget_displaySep;o.isVert=NaviTabWidget_isVert;o.updateCloseIcon=NaviTabWidget_updateCloseIcon;o.mdown_closeIcon=NaviTabWidget_mdown_closeIcon;o.kdown_closeIcon=NaviTabWidget_kdown_closeIcon;o.clickCB=NaviTabWidget_clickCB;o.dblClickCB=NaviTabWidget_dblClickCB;o.leftimgLyr=null;o.midimgLyr=null;o.rightimgLyr=null;o.txtLyr=null;o.iconLyr=null;o.sepLyr=null;o.closeLyr=null;o.data=new Object;return o}function NaviTabWidget_init(){var o=this;o.superInit();if(o.layer){o.layer.onmouseover=o.mover;o.layer.onmouseout=o.mover;o.layer.onmousedown=o.mdown;o.layer.onmouseup=o.mdown;o.layer.onclick=o.clickCB;if(_ie){o.layer.ondblclick=o.dblClickCB}o.layer.onkeydown=o.keydownCB;o.layer.onselectstart=function(){return false};o.layer.ondragstart=function(){return false};o.layer.oncontextmenu=o.contextMenuCB}o.leftimgLyr=getLayer(o.leftimgid);o.midimgLyr=getLayer(o.midimgid);o.rightimgLyr=getLayer(o.rightimgid);o.txtLyr=getLayer(o.txtid);o.iconLyr=getLayer(o.iconid);o.sepLyr=getLayer(o.sepid);if(o.hasCloseButton()){o.closeLyr=getLayer(o.closeid);o.closeLyr.onmousedown=o.mdown_closeIcon;o.closeLyr.onkeypress=o.kdown_closeIcon;o.closeLyr.onmouseup=o.mdown_closeIcon;o.updateCloseIcon("naviHTabCloseSel",o.isSelected)}}function NaviTabWidget_getVertHTML(){var o=this;var s="";s='<table id="'+o.id+'" style="cursor:'+_hand+'" cellspacing="0" cellpadding="0" border="0">';s+='<tbody><tr height="'+_mitemH+'">';var state=o.isSelected?_vertTabSelected:_vertTabNormal;s+='<td id="'+o.leftimgid+'" class="'+o.tabCSSTable[_tabImgLeft][state]+'"><div style="width:'+_vertTabImgW+'px;"></div></td>';var w=o.par.w-2*_vertTabImgW;s+='<td id="'+o.midimgid+'" class="'+o.tabCSSTable[_tabImgMid][state]+'" width="'+w+'">';if(o.tabType==_VertTabWithIcon){s+='<table cellspacing="0" cellpadding="0" border="0" width="100%">';s+='<tbody><tr height="'+_mitemH+'">';s+='<td style="padding-left:'+_vertTabLBorderToIcon+'px;">'+imgOffset((o.icon?o.icon:(_skin+"../transp.gif")),_vertTabIconSize,o.iconH,o.iconOffX,o.iconOffY,o.iconid)+"</td>";var ww=Math.max(40,w-_vertTabLBorderToIcon-_vertTabIconSize);s+='<td style="padding-left:'+_vertTabIconToTxt+"px;width:"+ww+'px;" >';s+='<div id="'+o.txtid+'" class="naviVTabText" style="width:'+(ww-_vertTabIconToTxt-2)+'px;">'+convStr(o.name)+"</div></td>";s+="</tr></tbody></table>"}else{s+='<div id="'+o.txtid+'" class="naviVTabText" style="padding-left:'+_vertTabLBorderToTxt+"px;width:"+(w-_vertTabLBorderToTxt-2)+'px;">'+convStr(o.name)+"</div>"}s+="</td>";s+='<td id="'+o.rightimgid+'" class="'+o.tabCSSTable[_tabImgRight][state]+'"><div style="width:'+_vertTabImgW+'px"></div></td>';s+="</tr></tbody></table>";return s}function NaviTabWidget_hasCloseButton(){var o=this;return _HorizTabTopWithClose==o.tabType&&(!o.par.getTabIndexByName(o.name)==0||o.isFirstTabClosable)}function NaviTabWidget_getHorizHTML(){var o=this;var s='<table id="'+o.id+'" style="cursor:'+_hand+'" cellspacing="0" cellpadding="0" border="0">';s+='<tbody><tr height="'+_naviHorzTabH+'">';var state=o.isSelected?_horizTabSelected:_horizTabNormal;s+='<td id="'+o.leftimgid+'" class="'+o.tabCSSTable[_tabImgLeft][state]+'" valign="top"><div style="width:'+_horizTabImgL+'px;"></div></td>';s+='<td id="'+o.midimgid+'" valign="bottom" class="'+o.tabCSSTable[_tabImgMid][state]+'">';s+='<table cellspacing="0" cellpadding="0" border="0" width="100%">';s+='<tbody><tr height="'+_naviHorzTabH+'">';if(_menuBarTab!=o.tabType){var sty=(_HorizTabTop==o.tabType||_HorizTabTopWithClose==o.tabType)?"margin-bottom:3px;":"margin-bottom:6px;";sty=sty+"margin-left:"+((o.iconW>1)?_horizTabImgPadL:0)+"px;";s+='<td valign="bottom" >'+imgOffset((o.icon?o.icon:(_skin+"../transp.gif")),o.iconW,o.iconH,o.iconOffX,o.iconOffY,o.iconid,null,null,sty)+"</td>"}var txt_sty=' style="padding-left:'+((o.iconW>1)?_horizTabImgToTxt:_horizTabTxtPaddingL)+"px;padding-right:"+((_HorizTabTopWithClose==o.tabType)?_horizTabTxtToClose:_horizTabTxtPaddingR)+"px;padding-bottom:"+((_HorizTabTop==o.tabType||_HorizTabTopWithClose==o.tabType)?_horizTabTxtPaddingB:_horizBottomTabTxtPadB)+'px;" ';var txt='<div tabindex="0" role="tab" id="'+o.txtid+'" '+txt_sty+' class="'+o.tabCSSTable[_tabTxt][state]+'" >'+convStr(o.name)+"</div>";s+='<td valign="bottom">'+txt+"</td>";if(o.hasCloseButton()){s+='<td valign="top" style="padding-right:'+_horizTabClosePadR+'px;">';s+='<div tabindex="0" class="naviHTabCloseSel" id="'+o.closeid+'" role="button" title="'+L_DHTMLLIB_closeTab+" "+convStr(o.name)+'"></div></td>'}s+="</tr></tbody></table>";s+="</td>";s+='<td id="'+o.rightimgid+'" class="'+o.tabCSSTable[_tabImgRight][state]+'" valign="top">';s+='<div style="width:'+((_HorizTabTopWithClose==o.tabType)?_horizTabImgL:_horizTabImgR)+'px"></div></td>';s+='<td class="'+((o.tabType==_HorizTabBottom)?"naviHBottomTabMNormal":"naviHTabMNormal")+'">';s+='<div id="'+o.sepid+'" class="naviHTabSeparator"></div></td>';s+="</tr></tbody></table>";return s}function NaviTabWidget_isVert(){var o=this;return(o.tabType==_VertTabWithIcon||o.tabType==_VertTab)}function NaviTabWidget_getHTML(){var o=this;return(o.isVert())?o.getVertHTML():o.getHorizHTML()}function NaviTabWidget_select(sel){var o=this;o.isSelected=sel;o.changeState(o.isVert()?(sel?_vertTabSelected:_vertTabNormal):(sel?_horizTabSelected:_horizTabNormal));o.updateCloseIcon("naviHTabCloseSel",o.isSelected)}function NaviTabWidget_updateCloseIcon(cls,show){var o=this;if(o.tabType==_HorizTabTopWithClose&&o.closeLyr){o.closeLyr.className=cls;o.closeLyr.style.visibility=show?_show:_hide}}function NaviTabWidget_changeState(state){var o=this;if(o.layer){o.leftimgLyr.className=o.tabCSSTable[_tabImgLeft][state];o.midimgLyr.className=o.tabCSSTable[_tabImgMid][state];o.rightimgLyr.className=o.tabCSSTable[_tabImgRight][state]}if(o.txtLyr&&!o.isVert()){o.txtLyr.className=o.tabCSSTable[_tabTxt][state]}}function NaviTabWidget_mover(evt){var o=getWidget(this);var evt=getEvent(evt);var over=(evt&&evt.type=="mouseover")?true:false;if(o.isVert()){o.changeState(over?_vertTabHover:(o.isSelected?_vertTabSelected:_vertTabNormal))}else{o.changeState(o.isSelected?(over?_horizTabSelHover:_horizTabSelected):(over?_horizTabHover:_horizTabNormal));var tabs=o.par.getPrevNextTabs(o.idx);if(!tabs){return}var prevTab=tabs.prevTab;var nextTab=tabs.nextTab;if(!o.isSelected){var d=false;if(!over){d=true;if(nextTab){if(nextTab.isSelected){d=false}}else{d=false}}o.displaySep(d,true);if(prevTab){prevTab.displaySep(over?false:((prevTab.isSelected)?false:true),true)}}else{o.displaySep(false);if(prevTab){prevTab.displaySep(false)}}o.updateCloseIcon((over?"naviHTabCloseHover":"naviHTabCloseSel"),(o.isSelected||over))}}function NaviTabWidget_mdown(evt){var o=getWidget(this);var evt=getEvent(evt);var down=(evt&&evt.type=="mousedown")?true:false;if(o.isVert()){o.changeState(down?_vertTabPressed:(o.isSelected?_vertTabSelected:_vertTabNormal))}}function NaviTabWidget_mdown_closeIcon(evt){var o=getWidget(this);var evt=getEvent(evt);var down=(evt&&evt.type=="mousedown")?true:false;o.updateCloseIcon((down?"naviHTabClosePressed":"naviHTabCloseSel"),(down||o.isSelected));if(!down){if(o.par&&o.par.closeTab){o.par.closeTab(o.par.findTabIndex(o),o.closeTabCB)}}}function NaviTabWidget_kdown_closeIcon(e){var k=eventGetKey(e);if(k==32||k==13){eventCancelBubble(e);var o=getWidget(this);if(o.par&&o.par.closeTab){o.par.closeTab(o.par.findTabIndex(o),o.closeTabCB)}}}function NaviTabWidget_clickCB(evt){var evt=getEvent(evt);var o=getWidget(this);if(o&&o.cb){o.cb()}eventCancelBubble(evt);return false}function NaviTabWidget_dblClickCB(evt){var evt=getEvent(evt);var o=getWidget(this);if(o&&o.dblClick){o.dblClick()}eventCancelBubble(evt);return false}function NaviTabWidget_keydownCB(e){var k=eventGetKey(e);if(k==13){eventCancelBubble(e);var o=getWidget(this);if(o&&o.cb){o.cb()}}}function NaviTabWidget_displaySep(d,effect){var o=this;if(!o.isVert()&&o.sepLyr){o.sepLyr.style.visibility=d?_show:_hide}}function NaviTabWidget_setUserData(s){this.data.userdata=s}function NaviTabWidget_getUserData(){return this.data.userdata}function NaviTabWidget_contextMenuCB(evt){evt=getEvent(evt);var tab=getWidget(this);var tabbar=tab.par;if(tab&&tab.cb){tab.cb()}if(tabbar&&tabbar.showTabMenu){tabbar.showTabMenu(evt,tab.idx)}eventCancelBubble(evt);return false}function NaviTabWidget_setMenu(m){this.data.menu=m}function NaviTabWidget_getMenu(){return this.data.menu}function NaviTabWidget_setHtml(html){this.data.html=html}function NaviTabWidget_getHtml(){return this.data.html}function new_NaviBarWidget(prms){var o=new_Widget(prms);o.superInit=o.init;o.oldResize=o.resize;o.init=NaviBarWidget_init;o.getHTML=NaviBarWidget_getHTML;o.add=NaviBarWidget_add;o.addByPrms=NaviBarWidget_addByPrms;o.remove=NaviBarWidget_remove;o.removeAll=NaviBarWidget_removeAll;o.getCount=NaviBarWidget_getCount;o.select=NaviBarWidget_select;o.getSelection=NaviBarWidget_getSelection;o.getBarType=NaviBarWidget_getBarType;o.getMenu=NaviBarWidget_getMenu;o.showMenu=NaviBarWidget_showMenu;o.getTabMenu=NaviBarWidget_getTabMenu;o.showTabMenu=NaviBarWidget_showTabMenu;o.setShowContextMenuAllowed=NaviBarWidget_setShowContextMenuAllowed;o.getTab=NaviBarWidget_getTab;o.findTabIndex=NaviBarWidget_findTabIndex;o.getSelectedTab=NaviBarWidget_getSelectedTab;o.showTab=NaviBarWidget_showTab;o.resize=NaviBarWidget_resize;o.setTabHTML=NaviBarWidget_setTabHTML;o.getTabHTML=NaviBarWidget_getTabHTML;o.getTabIndexByName=NaviBarWidget_getTabIndexByName;o.getTabIndexByValue=NaviBarWidget_getTabIndexByValue;o.getTabID=NaviBarWidget_getTabID;var w=Widget_param(prms,"w",null);var h=Widget_param(prms,"h",null);o.cb=Widget_param(prms,"cb",null);o.isFirstTabClosable=Widget_param(prms,"isFirstTabClosable",true);o.dblclick=Widget_param(prms,"dblclick",null);o.beforeShowTabMenu=Widget_param(prms,"beforeShowTabMenu",null);o.type=Widget_param(prms,"naviBarType",_VertTab);o.counter=0;o.items=new Array;o.selIndex=-1;o.leftLimit=0;o.showContextMenuAllowed=true;o.menu=newMenuWidget("naviBarMenu_"+o.id,null,Widget_param(prms,"beforeShowMenu",null));o.tabList=null;o.showScrollBar=_noScrollBar;o.isVert=((o.type==_VertTab)||(o.type==_VertTabWithIcon))?true:false;if(o.isVert){if(w){w=Math.max(_vertNaviPanelMinW,w);w=Math.min(w,_vertNaviPanelMaxW)}o.w=(w?w:((o.type==_VertTab)?_vertNaviPanelMinW:_vertNaviPanelWithIconW))+2;if(h){var n=Math.ceil(h/_mitemH);h=(Math.max(1,n))*_mitemH}o.h=(h?h:_vertNaviPanelH)+2}else{var showTabList=Widget_param(prms,"showTabList",false);if(showTabList){o.tabList=newMenuWidget("naviBarTabListMenu_"+o.id,null,NaviBarWidget_beforeShowTabListCB,NaviBarWidget_TabListonPositionCB);o.tabList.navibar=o}else{var showScrollBar=Widget_param(prms,"showScrollBar",false);o.showScrollBar=showScrollBar?((_HorizTabBottom==o.type)?_ScrollBarAtBegin:_ScrollBarAtEnd):_noScrollBar}o.w=w?w:(_horizBarWidth+_scrollBarWidth);o.h=_naviHorzTabH}switch(o.type){case _VertTab:case _VertTabWithIcon:o.tabCSSTable=_vertTabCSS;break;case _HorizTabBottom:o.tabCSSTable=_horizBottomTabCSS;break;case _HorizTabTop:default:o.tabCSSTable=_horizTabCSS;break}o.trid="naviBarTR_"+o.id;o.trLyr=null;o.divid="naviBarDIV_"+o.id;o.divLyr=null;o.scrollbarid="scrlbar_"+o.id;o.firstid="f_"+o.id;o.previd="p_"+o.id;o.nextid="n_"+o.id;o.lastid="l_"+o.id;o.scrollbarLyr=null;o.firstLyr=null;o.prevLyr=null;o.nexttLyr=null;o.lastLyr=null;o.updateSepDisplay=NaviBarWidget_updateSepDisplay;o.getPrevNextTabs=NaviBarWidget_getPrevNextTabs;o.closeTab=NaviBarWidget_closeTab;o.getBarIndex=NaviBarWidget_getBarIndex;o.mover_scrollbar=NaviBarWidget_mover_scrollbar;o.mdown_scrollbar=NaviBarWidget_mdown_scrollbar;o.contextMenuCB=NaviBarWidget_contextMenuCB;o.dblclickCB=NaviBarWidget_dblclickCB;o.getItemXPos=NaviBarWidget_getItemXPos;o.par=null;o.tablistid="bartablist_"+o.id;o.tablistLyr=null;o.mover_tablist=NaviBarWidget_mover_tablist;o.mdown_tablist=NaviBarWidget_mdown_tablist;o.kdown_tablist=NaviBarWidget_kdown_tablist;o.onfocus_tablist=NaviBarWidget_onfocus_tablist;o.onblur_tablist=NaviBarWidget_onblur_tablist;o.click_tablist=NaviBarWidget_click_tablist;o.onChangeTabList=NaviBarWidget_onChangeTabList;o.showTabListIcon=NaviBarWidget_showTabListIcon;o.buildTabList=NaviBarWidget_buildTabList;return o}function newNaviBarWidget(id,naviBarType,cb,dblclick,w,h,beforeShowTabMenu,beforeShowMenu,showScrollBar,showTabList,isFirstTabClosable){return new_NaviBarWidget({id:id,naviBarType:naviBarType,cb:cb,dblclick:dblclick,w:w,h:h,beforeShowTabMenu:beforeShowTabMenu,beforeShowMenu:beforeShowMenu,showScrollBar:showScrollBar,showTabList:showTabList,isFirstTabClosable:isFirstTabClosable})}function NaviBarWidget_getBarType(){return this.type}function NaviBarWidget_init(){var o=this,items=o.items;o.superInit();o.trLyr=getLayer(o.trid);o.divLyr=getLayer(o.divid);var len=items.length;for(var i=0;i<len;i++){var it=items[i];it.init();it.select(i==o.selIndex)}o.updateSepDisplay();if(o.tabList){o.tablistLyr=getLayer(o.tablistid);o.tablistLyr.onmouseover=o.mover_tablist;o.tablistLyr.onmouseout=o.mover_tablist;o.tablistLyr.onmousedown=o.mdown_tablist;o.tablistLyr.onkeypress=o.kdown_tablist;o.tablistLyr.onmouseup=o.mdown_tablist;o.tablistLyr.onfocus=o.onfocus_tablist;o.tablistLyr.onblur=o.onblur_tablist;o.tablistLyr.onclick=o.click_tablist;o.tablistLyr.oncontextmenu=function(){return false};o.showTabListIcon()}else{if(o.showScrollBar!=_noScrollBar){o.scrollbarLyr=getLayer(o.scrollbarid);o.firstLyr=getLayer(o.firstid);o.prevLyr=getLayer(o.previd);o.nexttLyr=getLayer(o.nextid);o.lastLyr=getLayer(o.lastid);var arr=[o.firstLyr,o.prevLyr,o.nexttLyr,o.lastLyr];for(var i=0;i<4;i++){arr[i].onmouseover=o.mover_scrollbar;arr[i].onmouseout=o.mover_scrollbar;arr[i].onmousedown=o.mdown_scrollbar;arr[i].onmouseup=o.mdown_scrollbar}o.firstLyr.onclick=o.firstCB;o.prevLyr.onclick=o.prevCB;o.nexttLyr.onclick=o.nextCB;o.lastLyr.onclick=o.lastCB;o.scrollbarLyr.oncontextmenu=function(){return false}}}if(o.isVert){o.layer.oncontextmenu=o.contextMenuCB}else{if(o.divLyr){o.divLyr.oncontextmenu=o.contextMenuCB}}if(o.cb){if(o.isVert){o.layer.onclick=function(){o.cb();return false}}else{if(o.divLyr){o.divLyr.onclick=function(){o.cb();return false}}}}if(o.dblclick){if(o.isVert){o.layer.ondblclick=o.dblclickCB}else{if(o.divLyr){o.divLyr.ondblclick=o.dblclickCB}}}o.layer.onselectstart=function(){return false};o.layer.ondragstart=function(){return false};o.resize(o.w,o.h)}function NaviBarWidget_dblclickCB(evt){var o=getWidget(this);var evt=getEvent(evt);if(o.dblclick){o.dblclick()}eventCancelBubble(evt);return false}function NaviBarWidget_mover_scrollbar(evt){if(this.disabled){return}var o=getWidget(this);var evt=getEvent(evt);var over=(evt&&evt.type=="mouseover")?true:false;this.className=over?o.tabCSSTable[_tabScrollBar][_scrollbarHover]:o.tabCSSTable[_tabScrollBar][_scrollbarM]}function NaviBarWidget_mdown_scrollbar(evt){if(this.disabled){return}var o=getWidget(this);var evt=getEvent(evt);var down=(evt&&evt.type=="mousedown")?true:false;this.className=down?o.tabCSSTable[_tabScrollBar][_scrollbarPressed]:o.tabCSSTable[_tabScrollBar][_scrollbarM]}function NaviBarWidget_getHTML(){var o=this,items=o.items,len=items.length;var s='<div id="'+this.id+'" class="'+(o.isVert?"dlgFrame":"")+'" align="left" style="overflow:hidden;width:'+o.w+"px;height:"+o.h+'px">';s+='<table cellspacing="0" cellpadding="0" border="0" '+(o.isVert?' class="naviVTabBackgnd"':"")+"><tbody>";if(o.isVert){for(var i=0;i<len;i++){s+="<tr><td>"+items[i].getHTML()+"</td></tr>"}}else{s+="<tr>";var scroll="";if(o.showScrollBar!=_noScrollBar){scroll="<td>";scroll+='<table id="'+o.scrollbarid+'" cellspacing="0" cellpadding="0" border="0" width="'+_scrollBarWidth+'"><tbody><tr style="width:'+_scrollBarWidth+'px;">';scroll+='<td class="'+o.tabCSSTable[_tabScrollBar][_scrollbarL]+'"><div></div></td>';scroll+='<td id="'+o.firstid+'" class="'+o.tabCSSTable[_tabScrollBar][_scrollbarM]+'" align="center" valign="bottom"><div class="'+o.tabCSSTable[_tabScrollBar][_scrollbarFirst]+'"></div></td>';scroll+='<td id="'+o.previd+'" class="'+o.tabCSSTable[_tabScrollBar][_scrollbarM]+'" align="center" valign="bottom"><div class="'+o.tabCSSTable[_tabScrollBar][_scrollbarPrev]+'"></div></td>';scroll+='<td id="'+o.nextid+'" class="'+o.tabCSSTable[_tabScrollBar][_scrollbarM]+'" align="center" valign="bottom"><div class="'+o.tabCSSTable[_tabScrollBar][_scrollbarNext]+'"></div></td>';scroll+='<td id="'+o.lastid+'" class="'+o.tabCSSTable[_tabScrollBar][_scrollbarM]+'" align="center" valign="bottom"><div class="'+o.tabCSSTable[_tabScrollBar][_scrollbarLast]+'"></div></td>';scroll+='<td class="'+o.tabCSSTable[_tabScrollBar][_scrollbarR]+'"><div></div></td>';scroll+="</tr></tbody></table>";scroll+="</td>"}if(o.showScrollBar==_ScrollBarAtBegin){s+=scroll}var w=o.w;if(o.showScrollBar!=_noScrollBar){w=Math.max(w-_scrollBarWidth,_horizBarWidth)}s+='<td><div style="overflow:hidden;width:'+w+'px;" id="'+o.divid+'" class="'+o.tabCSSTable[_tabImgMid][_horizTabNormal]+'">';s+='<table cellspacing="0" cellpadding="0" border="0"><tbody>';s+='<tr id="'+o.trid+'">';for(var i=0;i<len;i++){s+="<td>"+items[i].getHTML()+"</td>"}s+="</tr></tbody></table></div></td>";if(o.tabList){s+='<td class="'+o.tabCSSTable[_tabImgMid][_horizTabNormal]+'"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr>';s+='<td tabindex=0 id="'+o.tablistid+'" class="'+o.tabCSSTable[_tabList][_tabListNormal]+'" role="button" title="'+L_bobj_crv_TabList+'">';s+='<div class="tabListIcon"></div></td>';s+="</tr></tbody></table></td>"}if(o.showScrollBar==_ScrollBarAtEnd){s+=scroll}s+="</tr>"}s+="</tbody></table></div>";return s}function NaviBarWidget_add(name,value,idx,icon,iconW,iconH,iconOffX,iconOffY,tooltip,closeTabCB){return this.addByPrms({name:name,value:value,tooltip:tooltip,icon:icon,iconW:iconW,iconH:iconH,iconOffX:iconOffX,iconOffY:iconOffY,closeTabCB:closeTabCB},idx)}function NaviBarWidget_addByPrms(prms,idx){var o=this,counter=o.counter++;prms.id="naviTab_"+counter+"_"+o.id;prms.tabType=o.type;prms.clickCB=NaviBarWidget_itemClick;prms.dblclickCB=NaviBarWidget_itemDblClick;var obj=new_NaviTabWidget(prms);obj.par=o;obj.idx=counter;arrayAdd(o,"items",obj,idx);var len=o.items.length;if(o.isVert&&o.layer!=null){var tdElt=document.createElement("td");tdElt.innerHTML=obj.getHTML();var trElt=document.createElement("tr");trElt.appendChild(tdElt);var node=o.layer.childNodes[0].childNodes[0];if((typeof(idx)=="undefined")||(len==1)||(idx==null)||(idx==-1)||(idx>=len)){node.appendChild(trElt);idx=len-1}else{if(node.childNodes[parseInt(idx)]){node.insertBefore(trElt,node.childNodes[parseInt(idx)])}}obj.init()}else{if(o.trLyr){var tdElt=document.createElement("td");tdElt.innerHTML=obj.getHTML();if((typeof(idx)=="undefined")||(len==1)||(idx==null)||(idx==-1)||(idx>=len)){o.trLyr.appendChild(tdElt);idx=len-1}else{o.trLyr.insertBefore(tdElt,o.trLyr.childNodes[parseInt(idx)])}obj.init();o.showTabListIcon()}}if((o.selIndex!=null)&&(o.selIndex>=0)){if(idx<=o.selIndex){o.selIndex++}}o.updateSepDisplay();return obj}function NaviBarWidget_getBarIndex(itemIdx){var o=this,items=o.items,len=items.length;for(var i=0;i<len;i++){if(items[i].idx==itemIdx){return i}}return null}function NaviBarWidget_itemClick(){var o=this.par,items=o.items,len=items.length,index=-1;for(var i=0;i<len;i++){if(items[i].idx==this.idx){o.select(i);index=i;break}}if(o.cb){o.cb(index)}}function NaviBarWidget_itemDblClick(){var o=this.par,items=o.items,len=items.length,index=-1;for(var i=0;i<len;i++){if(items[i].idx==this.idx){index=i;break}}if(o.dblclick){o.dblclick(index)}}function NaviBarWidget_select(index){if(index==null||typeof(index)=="undefined"){return}var o=this,items=o.items,len=items.length;if(index==-1){index=len-1}if((index>=0)&&(index<len)){if((o.selIndex!=null)&&(o.selIndex>=0)&&(o.selIndex!=index)&&(o.selIndex<len)){items[o.selIndex].select(false)}o.selIndex=index;items[index].select(true);o.updateSepDisplay()}}function NaviBarWidget_updateSepDisplay(){var o=this;if(o.isVert||(o.layer==null)){return}var items=o.items,len=items.length;var d=true;for(var i=0;i<len;i++){d=true;if(items[i].isSelected){d=false}else{if((i+1<len)&&items[i+1].isSelected){d=false}else{if(i==len-1){d=false}}}items[i].displaySep(d)}}function NaviBarWidget_closeTab(itemIndex,closeTabCB){var o=this;var i=o.getBarIndex(itemIndex);if(closeTabCB){closeTabCB(i)}if(o.par&&o.par.closeTab){o.par.closeTab(i)}o.remove(i)}function NaviBarWidget_getPrevNextTabs(index){var o=this;var i=o.getBarIndex(index);var items=o.items,len=items.length;if(i!=null){var ret=new Object;ret.prevTab=(i==0)?null:items[i-1];ret.nextTab=(i==len-1)?null:items[i+1];return ret}return null}function NaviBarWidget_getItemXPos(index){var o=this;var x=0;for(var i=0;i<index;i++){x+=parseInt(o.items[i].getWidth())}return x}function NaviBarWidget_getCount(){return this.items.length}function NaviBarWidget_mover_tablist(evt){var o=getWidget(this);var evt=getEvent(evt);var over=(evt&&evt.type=="mouseover")?true:false;this.className=over?o.tabCSSTable[_tabList][_tabListHover]:o.tabCSSTable[_tabList][_tabListNormal]}function NaviBarWidget_mdown_tablist(evt){var o=getWidget(this);var evt=getEvent(evt);var down=(evt&&evt.type=="mousedown")?true:false;this.className=down?o.tabCSSTable[_tabList][_tabListPressed]:o.tabCSSTable[_tabList][_tabListNormal]}function NaviBarWidget_onfocus_tablist(evt){var o=getWidget(this);this.className=o.tabCSSTable[_tabList][_tabListHover]}function NaviBarWidget_onblur_tablist(evt){var o=getWidget(this);this.className=o.tabCSSTable[_tabList][_tabListNormal]}function NaviBarWidget_kdown_tablist(evt){if(eventGetKey(evt)==13){NaviBarWidget_click_tablist.apply(this)}}function NaviBarWidget_click_tablist(){var o=getWidget(this);o.buildTabList();var pos=NaviBarWidget_TabListonPositionCB.apply(o);o.tabList.show(true,pos.x,pos.y);o.tabList.resetTooltips()}function NaviBarWidget_TabListonPositionCB(){var o=this;if(!o){return}if(!o.tabList.layer){o.tabList.justInTimeInit()}var tablist_pos=getPosScrolled(o.tablistLyr);var pos=new Object;pos.x=Math.max(0,(tablist_pos.x+23-o.tabList.getWidth()));pos.y=(tablist_pos.y+o.tablistLyr.offsetHeight);return pos}function NaviBarWidget_beforeShowTabListCB(){var o=this.navibar;if(!o){return}var tab=o.getSelectedTab();if(tab){var menuitem=this.getItemByID(tab.idx);if(menuitem){menuitem.setTextClass("tabListMenuItem")}}}function NaviBarWidget_remove(idx,autoSelectNext){var o=this,items=o.items,len=items.length;if((idx>=0)&&(idx<len)){var elem=items[idx];arrayRemove(o,"items",idx);items=o.items;len=items.length;var l=elem.layer;if(l!=null){if(o.isVert&&o.layer){var row=l.parentNode.parentNode;var node=o.layer.childNodes[0].childNodes[0];node.removeChild(row)}else{if(o.trLyr){o.trLyr.removeChild(l.parentNode)}}if(elem.zoneId){var zoneLayer=getLayer(elem.zoneId);if(zoneLayer){zoneLayer.parentNode.removeChild(zoneLayer)}}}for(var i=0;i<len;i++){if(items[i].isSelected){o.selIndex=i;break}}if(autoSelectNext){if(o.selIndex>idx){o.cb(o.selIndex-1)}else{if((o.selIndex==idx)&&(len>0)){o.cb(Math.min(idx,len-1))}}}if(len==0){o.selIndex=null}o.showTabListIcon()}}function NaviBarWidget_removeAll(){var o=this,items=o.items,len=items.length;for(var i=len-1;i>=0;i--){o.remove(i)}}function NaviBarWidget_setTabHTML(index,s){var o=this;if(typeof(index)=="undefined"||index==null){index=o.items.length-1}if(index>=0&&index<=(o.items.length-1)){o.items[index].setHtml(s)}}function NaviBarWidget_getTabHTML(index){var o=this;if(index>=0&&index<=(o.items.length-1)){return o.items[index].getHtml()}return""}function NaviBarWidget_getSelection(){var o=this;if(o.getCount()==0){o.selIndex=-1;return null}var index=o.selIndex;if((index!=null)&&(index>=0)&&o.items[index]){var obj=new Object;obj.index=index;obj.valueOf=o.items[index].value;obj.name=o.items[index].name;return obj}else{return null}}function NaviBarWidget_getMenu(){return this.menu}function NaviBarWidget_getTabMenu(index){var menu=null;var o=this,items=o.items,len=items.length;if((index>=0)&&(index<len)){menu=items[index].getMenu();if(!menu){menu=newMenuWidget(("naviTabMenu_"+o.id+"_"+o.getTabID(index)),null,o.beforeShowTabMenu);items[index].setMenu(menu)}}return menu}function NaviBarWidget_setShowContextMenuAllowed(b){this.showContextMenuAllowed=b}function NaviBarWidget_showMenu(evt){if(this.showContextMenuAllowed==false){return}evt=getEvent(evt);this.menu.show(true,(eventGetX(evt)+winScrollX()),(eventGetY(evt)+winScrollY()))}function NaviBarWidget_showTabMenu(evt,itemIndex){if(this.showContextMenuAllowed==false){return}evt=getEvent(evt);var index=this.getBarIndex(itemIndex);var menu=this.items[index].getMenu();if(menu){menu.show(true,(eventGetX(evt)+winScrollX()),(eventGetY(evt)+winScrollY()))}}function NaviBarWidget_showTab(index,show){var o=this,items=o.items,len=items.length;if((index>=0)&&(index<len)){items[index].show(show)}}function NaviBarWidget_showTabListIcon(){var o=this;if(o.tablistLyr){o.tablistLyr.style.visibility=(o.items.length>1)?_show:_hide}}function NaviBarWidget_tabListMenuItemsCB(){var o=this.par.navibar;if(!o){return}var tab_index=o.getBarIndex(parseInt(this.id));if((tab_index>=0)&&(tab_index<o.items.length)&&o.divLyr&&o.tabList){o.onChangeTabList(tab_index);o.select(tab_index);if(o.cb){o.cb(tab_index)}}}function NaviBarWidget_onChangeTabList(visibleIdx){if(visibleIdx<0){visibleIdx=0}var o=this;var items=o.items,len=items.length;if(!o.divLyr||!o.trLyr||!o.tabList||!len){return}var toRight=visibleIdx;var toLeft=visibleIdx;var nLeftMost=visibleIdx;var visibleLen=o.divLyr.offsetWidth;var nItemsLen=items[visibleIdx].getWidth();if(o.trLyr.offsetWidth>o.divLyr.offsetWidth){if(nItemsLen<visibleLen){while(true){toRight++;if(toRight<len){if((items[toRight].getWidth()+nItemsLen)<visibleLen){nItemsLen+=items[toRight].getWidth()}else{break}}toLeft--;if(toLeft>=0){if((items[toLeft].getWidth()+nItemsLen)<visibleLen){nItemsLen+=items[toLeft].getWidth();nLeftMost=toLeft}else{break}}}}}else{nLeftMost=0}if(nLeftMost>=0){o.divLyr.scrollLeft=o.getItemXPos(nLeftMost)}}function NaviBarWidget_buildTabList(){var o=this;var items=o.items,len=items.length;o.tabList.removeAll();for(var i=0;i<len;i++){o.tabList.add((""+items[i].idx),items[i].name,NaviBarWidget_tabListMenuItemsCB)}}function NaviBarWidget_resize(w,h){var o=this;if(o.isVert){return}o.oldResize(w);if(w!=null){o.w=w;if(o.divLyr){if(o.tabList){w=Math.max((w-_tabListIconWidth),_horizBarWidth)}else{if(o.showScrollBar!=_noScrollBar){w=Math.max(o.w-_scrollBarWidth,_horizBarWidth)}}o.divLyr.style.width=""+w+"px"}o.onChangeTabList(o.selIndex)}}function NaviBarWidget_contextMenuCB(evt){evt=getEvent(evt);var tabbar=getWidget(this);if(tabbar.cb){tabbar.cb()}if(tabbar.showMenu){tabbar.showMenu(evt)}return false}function NaviBarWidget_getTabIndexByName(name){var o=this,items=o.items,len=items.length;for(var i=0;i<len;i++){if(items[i].name==name){return i}}return -1}function NaviBarWidget_getTabIndexByValue(value){var o=this,items=o.items,len=items.length;for(var i=0;i<len;i++){if(items[i].value==value){return i}}return -1}function NaviBarWidget_getTabID(tabIndex){var o=this,items=o.items;if((tabIndex!=null)&&(tabIndex>=0)&&(tabIndex<items.length)){return items[tabIndex].idx}return null}function NaviBarWidget_getTab(index){var o=this,items=o.items;if((index!=null)&&(index>=0)&&(index<items.length)){return items[index]}return null}function NaviBarWidget_findTabIndex(tab){var o=this,items=o.items,l=items.length;for(var i=0;i<l;i++){if(tab==items[i]){return i}}return -1}function NaviBarWidget_getSelectedTab(){var o=this;var sel=o.getSelection();if(sel){return o.getTab(sel.index)}return null}var _trIndent=18;var _TreeWidgetElemInstances=new Array();function newTreeWidget(id,w,h,icns,clickCB,doubleClickCB,bgClass,expandCB,collapseCB,deleteCB,minIcon,plusIcon){var o=newScrolledZoneWidget(id,2,4,w,h,bgClass);o.icns=icns;o.sub=new Array;o.clickCB=clickCB;o.doubleClickCB=doubleClickCB;o.expandCB=expandCB;o.collapseCB=collapseCB;o.deleteCB=deleteCB;o.minIcon=minIcon;o.plusIcon=plusIcon;o.mouseOverCB=null;o.rightClickMenuCB=null;o.mouseOverTooltip=false;o.dragDrop=null;o.oldInit=o.init;o.init=TreeWidget_init;o.getHTML=TreeWidget_getHTML;o.getSelections=TreeWidget_getSelections;o.getSelectedItem=TreeWidget_getSelectedItem;o.getSelectedItems=TreeWidget_getSelectedItems;o.getCheckedItems=TreeWidget_getCheckedItems;o.setDragDrop=TreeWidget_setDragDrop;o.setFocus=TreeWidget_setFocus;o.add=TreeWidget_add;o.setRightClickMenuCB=TreeWidget_setRightClickMenuCB;o.findByData=TreeWidget_findByData;o.findById=TreeWidget_findById;o.selectByData=TreeWidget_selectByData;o.selectById=TreeWidget_selectById;o.unselect=TreeWidget_unselect;o.treeLyr=null;o.elemCount=0;o.selId=-1;o.selIds=new Array;o.multiSelection=false;o.hlPath=false;o.hlElems=new Array;o.iconOrientVertical=true;o.focusNode=null;o.deleteAll=TreeWidget_deleteAll;o.rebuildHTML=TreeWidget_rebuildHTML;o.iconW=16;o.iconH=16;o.initialIndent=0;o.getCount=TreeWidget_getCount;o.dispIcnFuncName="dispIcn";o.setTooltipOnMouseOver=TreeWidget_setTooltipOnMouseOver;o.setMouseOverCB=TreeWidget_setMouseOverCB;o.setMultiSelection=TreeWidget_setMultiSelection;o.setHighlightPath=TreeWidget_setHighlightPath;o.highlightPath=TreeWidget_highlightPath;o.unhlPath=TreeWidget_unhlPath;o.getFirst=TreeWidget_getFirst;o.getLast=TreeWidget_getLast;return o}function TreeWidget_unselect(){var o=this;if(o.selId>=0){var prev=_TreeWidgetElemInstances[o.selId];prev.unselect();o.selId=-1}if(o.multiSelection){var len=o.selIds.length,id;for(var i=len-1;i>=0;i--){var prev=_TreeWidgetElemInstances[o.selIds[i]];if(prev){prev.unselect()}}o.selIds.length=0;o.layer._BOselIds=""}o.unhlPath()}function TreeWidget_selectByData(data,setFocus){var o=this,item=o.findByData(data);if(item){item.select(setFocus)}}function TreeWidget_selectById(id,setFocus){var o=this,item=o.findById(id);if(item){item.select(setFocus)}}function TreeWidget_findByData(data){var o=this,sub=o.sub,item=null;for(var i=0;i<sub.length;i++){item=sub[i].findByData(data);if(item){return item}}return null}function TreeWidget_findById(id){var o=this,sub=o.sub,item=null;for(var i=0;i<sub.length;i++){item=sub[i].findById(id);if(item){return item}}return null}function TreeWidget_add(elem,extraIndent){var o=this,sub=o.sub,len=sub.length;elem.treeView=o;elem.index=len;sub[len]=elem;elem.expanded=(len==0);if(extraIndent){elem.extraIndent=extraIndent}return elem}function TreeWidget_getHTML(){var o=this,sub=o.sub,len=sub.length,a=new Array(len+3),j=0;a[j++]=o.beginHTML()+'<div id="treeCont_'+o.id+'" role="tree" tabindex="-1" onfocus="'+_dhtmlLib+'.TreeWidget_focusCB(this)">';for(var i=0;i<sub.length;i++){a[j++]=sub[i].getHTML(o.initialIndent,i==0)}a[j++]="</div>"+o.endHTML();return a.join("")}function TreeWidget_deleteAll(){var sub=this.sub;for(var i=0;i<sub.length;i++){sub[i].deleteAll();sub[i]=null}sub.length=0}function TreeWidget_rebuildHTML(){var o=this,sub=o.sub,len=sub.length,a=new Array(len),j=0,idt=o.initialIndent;for(var i=0;i<sub.length;i++){a[j++]=sub[i].getHTML(idt,i==0)}o.treeLyr.innerHTML=a.join("");o.selId=-1;o.layer._BOselId=-1;o.selIds.length=0;o.layer._BOselIds=""}function TreeWidget_init(){this.oldInit();var l=this.treeLyr=getLayer("treeCont_"+this.id);if(this.dragDrop){this.dragDrop.attachCallbacks(this.layer)}var oldSel=this.layer._BOselId;if(oldSel!=null){this.selId=oldSel}var oldArraySel=this.layer._BOselIds;if(oldArraySel!=null&&oldArraySel!=""){this.selIds.length=0;this.selIds=oldArraySel.split(";")}var sub=this.sub}function TreeWidget_getSelectedItem(){var id=this.selId;return(id>=0)?_TreeWidgetElemInstances[id]:null}function TreeWidget_getSelections(){var o=this;if(o.multiSelection){return o.getSelectedItems()}else{var sel=o.getSelectedItem(),arrSel=new Array;if(sel!=null){arrSel[0]=sel}return arrSel}}function TreeWidget_setFocus(index){var elem=_TreeWidgetElemInstances[index];if(elem!=null){elem.init();var focus=this.focusNode;if(focus&&focus.domElem){focus.domElem.setAttribute("tabIndex",-1)}this.focusNode=elem;elem.domElem.setAttribute("tabIndex",0);elem.domElem.focus()}}function TreeWidget_setDragDrop(dragCB,acceptDropCB,dropCB,dragEndCB){this.dragCB=dragCB;this.acceptDropCB=acceptDropCB;this.dropCB=dropCB;this.dragEndCB=dragEndCB;this.dragDrop=newDragDropData(this,TreeWidget_dragStartCB,TreeWidget_dragCB,TreeWidget_dragEndCB,TreeWidget_acceptDropCB,TreeWidget_leaveDropCB,TreeWidget_dropCB)}function TreeWidget_dragStartCB(src){var items=src.getSelections(),vert=src.iconOrientVertical;src.dragCB(src);if(items&&items.length==1){var item=items[0];var idx=item.iconId;newTooltipWidget().show(true,item.getDragTooltip(),idx>=0?src.icns:null,src.iconW,src.iconH,vert?0:src.iconW*idx,vert?src.iconH*idx:0)}}function TreeWidget_setRightClickMenuCB(rightClickMenuCB){this.rightClickMenuCB=rightClickMenuCB}function TreeWidget_getCount(){var o=this;if(o.sub!=null){return o.sub.length}else{return 0}}function TreeWidget_setTooltipOnMouseOver(catchMouseOver){this.mouseOverTooltip=catchMouseOver}function TreeWidget_setMouseOverCB(mouseOverCB){this.mouseOverCB=mouseOverCB}function TreeWidget_dragCB(src){newTooltipWidget().setPos()}function TreeWidget_dragEndCB(src){newTooltipWidget().show(false);if(src.dragEndCB){src.dragEndCB()}}function TreeWidget_dragOverEnterCB(lyr,elemId){var e=_TreeWidgetElemInstances[elemId];if(lyr.ondrop==null){e.treeView.dragDrop.attachCallbacks(lyr,true);lyr.domEltID=elemId}var o=_ddData[lyr._dragDropData],e=_curWin.event;e.dataTransfer.dropEffect=e.ctrlKey?"copy":"move";if(o.acceptDropCB(window._globalDDD,o.widget,e.ctrlKey,e.ctrlKey?false:e.shiftKey,lyr,false)){e.returnValue=false}e.cancelBubble=true}function TreeWidget_acceptDropCB(src,target,ctrl,shift,layer){return target.acceptDropCB(src,target,ctrl,shift,layer)}function TreeWidget_leaveDropCB(src,target,ctrl,shift){if(target.dropWidget&&target.dropWidget.layer){if(target.dropWidget.layer.className!=target.dropWidget.nonselectedClass){target.dropWidget.layer.className=target.dropWidget.nonselectedClass}}}function TreeWidget_dropCB(src,target,ctrl,shift,layer,enter){newTooltipWidget().show(false);target.dropCB(src,target,ctrl,shift)}function TreeWidget_setMultiSelection(multi){if((!this.multiSelection&&multi)||(this.multiSelection&&!multi)){this.unselect()}this.multiSelection=multi}function TreeWidget_getSelectedItems(){var arrSel=new Array;var len=this.selIds.length,id,cpt=0;for(var i=0;i<len;i++){id=this.selIds[i];if(id>=0){arrSel[cpt]=_TreeWidgetElemInstances[id];cpt++}}return arrSel}function TreeWidget_getCheckedItems(){var arrChecked=new Array;var len=_TreeWidgetElemInstances.length,cpt=0;for(var i=0;i<len;i++){elem=_TreeWidgetElemInstances[i];if(elem.isChecked()){arrChecked[cpt]=elem;cpt++}}return arrChecked}function TreeWidget_setHighlightPath(hl){this.hlPath=hl;if(!hl){this.unhlPath()}}function TreeWidget_unhlPath(){var o=this,len=o.hlElems.length;var elem,de;if(len>0){for(var i=0;i<len;i++){elem=o.hlElems[i];elem.init();de=elem.domElem;if(de==null){return}if(elem.isSelected()){de.className=elem.selectedClass}else{de.className=elem.nonselectedClass}}o.hlElems.length=0}}function TreeWidget_highlightPath(elemId){var o=this;if(!o.hlPath){return}o.unhlPath();var elem=_TreeWidgetElemInstances[elemId];o.hlElems[o.hlElems.length]=elem;elem.domElem.className=elem.selectedClass;var papa=elem.par;while(papa){papa.init();papa.domElem.className=papa.hlClass;o.hlElems[o.hlElems.length]=papa;papa=papa.par}if(elem.isNode()){hlVisibleChildren(elem,o.hlElems)}}function hlVisibleChildren(node,arr){if(node.expanded&&!node.isIncomplete){var len=node.sub.length;for(var i=0;i<len;i++){var sub=node.sub[i];arr[arr.length]=sub;sub.init();sub.domElem.className=sub.hlClass;if(sub.isNode()){hlVisibleChildren(sub,arr)}}}}function TreeWidget_getFirst(){var o=this;if(o.sub&&o.sub.length>0){return o.sub[0]}return null}function TreeWidget_getLast(){var o=this;var sub=o.sub;while(sub&&sub.length>0){var last=sub[sub.length-1];if(last.expanded&&last.sub&&last.sub.length>0){sub=last.sub}else{return last}}return null}function TreeWidget_focusCB(tree){var o=getWidget(tree);if(o&&o.focusNode){o.setFocus(o.focusNode.id)}}function newTreeWidgetElem(iconId,name,userData,help,iconSelId,tooltip,iconAlt,textClass,textSelectedClass,enableDoubleClick,renderRTLHint){var o=new Object;o.enableDoubleClick=enableDoubleClick;o.expanded=false;o.generated=false;o.iconId=iconId;o.iconSelId=iconSelId?iconSelId:iconId;o.tooltip=tooltip;o.customTooltip=false;o.iconAlt=iconAlt;o.isHTML=false;o.renderRTLHint=renderRTLHint;o.isCheck=false;o.checked=false;o.check=TreeWidgetElem_check;o.isChecked=TreeWidgetElem_isChecked;o.checkCB=null;o.name=name;if(hasNoRTLCharacters(name)){o.name+="\u200e"}o.par=null;o.userData=userData;o.sub=new Array;o.treeView=null;o.id=_TreeWidgetElemInstances.length;o.index=-1;o.layer=null;o.plusLyr=null;o.icnLyr=null;o.checkElem=null;o.domElem=null;o.toggleLyr=null;o.actualNumChildren=null;o.blackTxt=(textClass)?textClass:"treeNormal";o.grayTxt="treeGray";o.selectedClass=(textSelectedClass)?textSelectedClass:"treeSelected";o.nonselectedClass=o.blackTxt;o.feedbackDDClass="treeFeedbackDD";o.hlClass="treeHL";o.cursorClass=null;o.help=help;_TreeWidgetElemInstances[o.id]=o;o.getHTML=TreeWidgetElem_getHTML;o.init=TreeWidgetElem_init;o.add=TreeWidgetElem_add;o.select=TreeWidgetElem_select;o.unselect=TreeWidgetElem_unselect;o.getNextPrev=TreeWidgetElem_getNextPrev;o.getHiddenParent=TreeWidgetElem_getHiddenParent;o.nodeIndent=0;o.getTooltip=TreeWidgetElem_getTooltip;o.getDragTooltip=TreeWidgetElem_getDragTooltip;o.deleteAll=TreeWidget_deleteAll;o.setGrayStyle=TreeWidgetElem_setGrayStyle;o.isGrayStyle=TreeWidgetElem_isGrayStyle;o.findByData=TreeWidgetElem_findByData;o.findById=TreeWidgetElem_findById;o.isIncomplete=false;o.querycompleteCB=null;o.setIncomplete=TreeWidgetElem_setIncomplete;o.finishComplete=TreeWidgetElem_finishComplete;o.setEditable=TreeWidgetElem_setEditable;o.isLeaf=TreeWidgetElem_isLeaf;o.isNode=TreeWidgetElem_isNode;o.isSelected=TreeWidgetElem_isSelected;o.htmlWritten=false;o.showCustomTooltipCB=null;o.hideCustomTooltipCB=null;o.setCursorClass=TreeWidgetElem_setCursorClass;return o}function TreeWidgetElem_checkCB(elem,id){var o=_TreeWidgetElemInstances[id];o.checked=elem.checked;if(o.checkCB){o.checkCB(o,id)}}function TreeWidgetElem_iconFocusCB(elem){while(elem&&elem.nextSibling){elem=elem.nextSibling}if(elem){elem.focus()}}function TreeWidgetElem_isChecked(){var o=this;return(o.isCheck?o.checked:false)}function TreeWidgetElem_check(checked){var o=this;if(o.isCheck){o.checked=checked;if(o.htmlWritten){o.init();o.checkElem.checked=checked}}}function TreeWidgetElem_EditNormalBehaviour(e){eventCancelBubble(e);return true}function TreeWidgetElem_EditBlurCB(){var widID=this.widID;setTimeout(function(){TreeWidgetElem_EditKeyCancel(widID)},1)}function TreeWidgetElem_EditKeyDown(e){eventCancelBubble(e);var k=eventGetKey(e),o=_TreeWidgetElemInstances[this.widID],widID=this.widID;if(k==27){setTimeout(function(){TreeWidgetElem_EditKeyCancel(widID)},1)}else{if(k==13){var newValue=this.value;setTimeout(function(){TreeWidgetElem_EditKeyAccept(widID,newValue)},1)}}}function TreeWidgetElem_EditKeyCancel(id){var o=_TreeWidgetElemInstances[id];o.showEditInput(false)}function TreeWidgetElem_EditKeyAccept(id,newValue){var o=_TreeWidgetElemInstances[id];if(o.validChangeNameCB){if(o.validChangeNameCB(newValue)==false){return}}o.change(null,newValue);o.showEditInput(false);if(o.changeNameCB){o.changeNameCB()}}function TreeWidgetElem_setEditable(isEditable,changeNameCB,validChangeNameCB){var o=this;if(isEditable){o.changeNameCB=changeNameCB;o.validChangeNameCB=validChangeNameCB}o.isEditable=isEditable}function TreeWidgetElem_triggerDD(){var o=_treeWClickedW,e=_curWin.event;if(o&&(o.clicked)&&(e.button==_leftBtn)){if(o.initialX!=null){var x=eventGetX(e),y=eventGetY(e),threshold=3;if((x<(o.initialX-threshold))||(x>(o.initialX+threshold))||(y<(o.initialY-threshold))||(y>(o.initialY+threshold))){this.dragDrop();o.clicked=false}}}}function TreeWidgetElem_mouseUp(){var o=_treeWClickedW,ev=_curWin.event;o.select(null,ev);o.domElem.onmouseup=null}function TreeWidgetElem_init(layer){var o=this;if(o.layer==null){var sub=o.sub,len=sub.length,exp=(len>0)||o.isIncomplete;o.layer=layer?layer:getLayer(_codeWinName+"TWe_"+o.id);if(o.layer==null){return}var cNodes=o.layer.childNodes,cLen=cNodes.length;o.plusLyr=exp?cNodes[0]:null;o.icnLyr=(o.iconId>-1)?cNodes[exp?1:0]:null;o.checkElem=o.isCheck?cNodes[cLen-2]:null;o.domElem=cNodes[cLen-1];if(o.layer.nextSibling&&o.layer.nextSibling.id==_codeWinName+"trTog"+o.id){o.toggleLyr=o.layer.nextSibling}if(o.treeView.mouseOverTooltip||o.treeView.mouseOverCB){o.domElem.onmouseout=TreeFuncMouseout}if(exp){addDblClickCB(o.plusLyr,_tpdb)}if(exp&&o.generated){for(var i=0;i<sub.length;i++){sub[i].init()}}if(o.enableDoubleClick){addDblClickCB(o.domElem,_tpdb)}}}function TreeIdToIdx(l){if(l){var id=l.id;if(id){var idx=id.lastIndexOf("TWe_");if(idx>=0){return parseInt(id.slice(idx+4))}else{return -1}}else{return TreeIdToIdx(l.parentNode)}}return -1}function TreeFuncMouseout(e){_tmoc(this,TreeIdToIdx(this),false,e)}function _tmvc(l,ev){_tmoc(l,TreeIdToIdx(l),true,ev)}function _tpl(l,event){TreeWidget_clickCB(TreeIdToIdx(l),true,event,true);return false}function _tkt(l,event){var k=eventGetKey(event);var stopPropagation=false;switch(k){case KEY_ENTER:case KEY_SPACE:return _tpt(l,event);case KEY_LEFT:case KEY_RIGHT:stopPropagation=true;TreeWidget_clickCB(TreeIdToIdx(l),true,event,true,k==KEY_RIGHT);break;case KEY_END:case KEY_HOME:stopPropagation=true;break;case KEY_PAGEUP:case KEY_PAGEDOWN:case KEY_UP:case KEY_DOWN:stopPropagation=true;TreeWidget_keydownCB(TreeIdToIdx(l),event,k);break;default:break}if(stopPropagation){eventCancelBubble(event);eventPreventDefault(event)}}function _tpt(l,event){TreeWidget_clickCB(TreeIdToIdx(l),false,event,true);return false}function _tpdb(e){treeDblClickCB(TreeIdToIdx(this),_ie?event:e);return false}function TreeWidgetElem_getHTML(indent,isFirst){var s="";with(this){htmlWritten=true;var isRoot=(par==null);var len=sub.length,exp=(len>0)||isIncomplete,a=new Array,i=0;if(this.extraIndent){indent+=_trIndent*extraIndent}var keyCB='onkeydown=" return '+_dhtmlLib+'._tkt(this,event)" ';var mouseCB='onclick="return '+_dhtmlLib+'._tpt(this,event)" ';if(treeView.mouseOverTooltip||treeView.mouseOverCB){mouseCB+='onmouseover="'+_dhtmlLib+'._tmvc(this,event)" '}var contextMenu="";if(treeView.rightClickMenuCB!=null){contextMenu=' oncontextmenu="'+_dhtmlLib+".treeContextMenuCB('"+id+"', event);return false\" "}var acceptDD="";if((treeView.acceptDropCB!=null)&&(_ie)){acceptDD=' ondragenter="'+_dhtmlLib+".TreeWidget_dragOverEnterCB(this,'"+id+"');\" ";acceptDD+=' ondragover="'+_dhtmlLib+".TreeWidget_dragOverEnterCB(this,'"+id+"');\" "}a[i++]='<div id="'+_codeWinName+"TWe_"+id+'"'+contextMenu+' class="trElt" role="presentation">';var onclick='onclick="return '+_dhtmlLib+'._tpl(this,event)"';if(exp){var expIcon;if(expanded){if(treeView.minIcon!=null){expIcon=treeView.minIcon}else{expIcon=_skin+"../min.gif"}}else{if(treeView.plusIcon!=null){expIcon=treeView.plusIcon}else{expIcon=_skin+"../plus.gif"}}a[i++]='<img tabindex="-1" '+onclick+' role="presentation" class=trPlus src="'+expIcon+'" onfocus="'+_dhtmlLib+'.TreeWidgetElem_iconFocusCB(this)" style="cursor:'+_hand+'"/>'}if(iconId>-1){var iconClass="trIcn"+(exp||isRoot?"Plus":"");if(this.cursorClass){iconClass+=" "+this.cursorClass}a[i++]="<img tabindex=-1 "+mouseCB+" "+keyCB+'class="'+iconClass+'" '+attr("src",_skin+"../transp.gif")+attr("alt",iconAlt)+' role="presentation" align="top" style="'+backImgOffset(treeView.icns,(treeView.iconOrientVertical?0:treeView.iconW*(expanded?iconSelId:iconId)),(treeView.iconOrientVertical?treeView.iconH*(expanded?iconSelId:iconId):0))+'" >'}else{if(!exp&&!isRoot){a[i++]="<img tabindex=-1 class=trSep "+attr("src",_skin+"../transp.gif")+">"}}if(isCheck){a[i++]='<input type=checkbox style="margin:0px;" onclick="'+_dhtmlLib+".TreeWidgetElem_checkCB(this,'"+id+"')\""+(this.checked?" checked":"")+">"}var textClass=nonselectedClass;if(this.cursorClass){textClass+=" "+this.cursorClass}var setSize=0;if(par){if(par.actualNumChildren){setSize=par.actualNumChildren}else{if(par.sub&&par.sub.length>0){setSize=par.sub.length}}}else{if(treeView.sub&&treeView.sub.length>0){setSize=treeView.sub.length}}var aria=(exp?'aria-expanded="'+expanded+'"':"")+(getLevel?'aria-level="'+getLevel()+'"':"")+(index>=0?'aria-posinset="'+(index+1)+'"':"")+'aria-setsize="'+setSize+'"';a[i++]='<a href="javascript:doNothing();" '+mouseCB+" "+keyCB+" tabindex="+(isFirst?"0":"-1")+acceptDD+' class="'+textClass+'" '+aria+' role="treeitem" dir="'+(renderRTLHint?"rtl":"ltr")+'" >';a[i++]=(isHTML?name:convStr(name));a[i++]="</a>";a[i++]="</div>";if(exp){a[i++]='<div id="'+_codeWinName+"trTog"+id+'" style="'+(_rtl?"margin-right":"margin-left")+":18px;display:"+(expanded?"":"none")+'" role="group">'}if(expanded){generated=true;for(var j=0;j<len;j++){a[i++]=sub[j].getHTML(0)}}if(exp){nodeIndent=indent;a[i++]="</div>"}}return a.join("")}function TreeWidgetElem_setGrayStyle(isGray){var o=this,cls=isGray?o.grayTxt:o.blackTxt;if(cls!=o.nonselectedClass){o.nonselectedClass=cls;o.init();if(o.domElem&&(o.domElem.className!=o.selectedClass)){o.domElem.className=cls}}}function TreeWidgetElem_isGrayStyle(){return this.nonselectedClass==this.grayTxt}function TreeWidgetElem_setIncomplete(querycompleteCB){this.isIncomplete=true;this.querycompleteCB=querycompleteCB}function TreeWidgetElem_finishComplete(){this.isIncomplete=false;TreeWidget_toggleCB(this.id)}function TreeWidgetElem_findByData(data){var o=this;if(o.userData==data){return o}var sub=o.sub;for(var i=0;i<sub.length;i++){var item=sub[i].findByData(data);if(item!=null){return item}}return null}function TreeWidgetElem_findById(id){var o=this;if(o.id==id){return o}var sub=o.sub;for(var i=0;i<sub.length;i++){var item=sub[i].findById(id);if(item!=null){return item}}return null}function treeInitDropFunc(lyr,elemId){var e=_TreeWidgetElemInstances[elemId];if(lyr.ondrop==null){e.treeView.dragDrop.attachCallbacks(lyr,true);lyr.domEltID=elemId}}function TreeWidget_toggleCB(elemId,noTimeOut){var elem=_TreeWidgetElemInstances[elemId];if(elem.sub.length==0){elem.plusLyr.style.visibility="hidden";return}elem.expanded=!elem.expanded;elem.init();if(noTimeOut){dispIcn(elemId)}else{setTimeout(function(){elem.treeView.dispIcnFuncName(elemId)},1)}var tree=elem.treeView;if(elem.expanded&&tree.expandCB){tree.expandCB(elem.userData)}if(!elem.expanded&&tree.collapseCB){tree.collapseCB(elem.userData)}}function dispIcn(eId){var e=_TreeWidgetElemInstances[eId];with(e){if(expanded&&!generated){generated=true;var a=new Array,i=0,len=sub.length,newInd=nodeIndent+_trIndent;for(var j=0;j<len;j++){a[i++]=sub[j].getHTML(newInd)}toggleLyr.innerHTML=a.join("")}toggleLyr.style.display=expanded?"block":"none";if(expanded){if(treeView.minIcon!=null){plusLyr.src=treeView.minIcon}else{plusLyr.src=_skin+"../min.gif"}}else{if(treeView.plusIcon!=null){plusLyr.src=treeView.plusIcon}else{plusLyr.src=_skin+"../plus.gif"}}domElem.setAttribute("aria-expanded",expanded);if(icnLyr&&icnLyr.childNodes&&icnLyr.childNodes.length>1){var iconL=icnLyr.childNodes[1];changeOffset(iconL,treeView.iconOrientVertical?0:treeView.iconW*(expanded?iconSelId:iconId),treeView.iconOrientVertical?treeView.iconH*(expanded?iconSelId:iconId):0)}}}function TreeWidgetElem_add(elem){with(this){elem.treeView=treeView;elem.par=this;elem.index=sub.length;sub[sub.length]=elem}return elem}function TreeWidgetElem_getHiddenParent(){var par=this.par;if(par==null){return null}if(!par.expanded){return par}return;par.getHiddenParent()}function TreeWidgetElem_getNextPrev(delta){var o=this;if(delta>0){if(o.expanded&&o.sub&&o.sub.length>0){return o.sub[0].getNextPrev(delta-1)}else{if(o.par){var index=o.index;var par=o.par;while(par){if(par.sub&&index+1<par.sub.length){return par.sub[index+1].getNextPrev(delta-1)}index=par.index;par=par.par}}}}else{if(delta<0){if(o.par){if(o.par.sub&&(o.index-1>=0)){var prev=o.par.sub[o.index-1];while(prev.expanded&&prev.sub&&prev.sub.length>0){prev=prev.sub[prev.sub.length-1]}return prev.getNextPrev(delta+1)}else{return o.par.getNextPrev(delta+1)}}}}return o}function TreeWidgetElem_scroll(elemLyr,treeLyr){var scrollH=Math.max(0,treeLyr.offsetHeight-20),scrollY=treeLyr.scrollTop;var elPos=getPos(elemLyr,treeLyr);var y=elPos.offsetTop,h=elemLyr.offsetHeight;if((y-scrollY+h)>scrollH){treeLyr.scrollTop=y+h-scrollH}if((y-scrollY)<0){treeLyr.scrollTop=y}}function TreeWidgetElem_unselect(){var o=this;with(o){init();if(domElem){domElem.className=o.nonselectedClass}treeView.selId=-1;if(treeView.multiSelection){var idx=arrayFind(treeView,"selIds",id);if(idx>-1){arrayRemove(treeView,"selIds",idx);treeView.layer._BOselIds="";var len=treeView.selIds.length;for(var i=0;i<len;i++){if(treeView.layer._BOselIds==""){treeView.layer._BOselIds=""+treeView.selIds[i]}else{treeView.layer._BOselIds+=";"+treeView.selIds[i]}}}}}}function TreeWidgetElem_select(setFocus,ev,noSendClickCB,isFromKeybArrow){var coll=new Array;var par=this.par;while(par){if(!par.expanded){coll[coll.length]=par}par=par.par}var cLen=coll.length;for(var i=cLen-1;i>=0;i--){TreeWidget_toggleCB(coll[i].id,true)}if(cLen>0){this.select(setFocus,ev,noSendClickCB,isFromKeybArrow)}if(this.treeView.multiSelection){TreeWidgetElem_multiSelect(this,setFocus,ev,noSendClickCB,isFromKeybArrow);return}if(noSendClickCB==null){noSendClickCB=false}with(this){if(treeView.selId!=id){if(treeView.selId>=0){var prev=_TreeWidgetElemInstances[treeView.selId];prev.init();if(prev.domElem){prev.domElem.className=prev.nonselectedClass;prev.domElem.removeAttribute("aria-selected")}}treeView.selId=id;init();treeView.layer._BOselId=id;var de=domElem;if(de==null){return}if(treeView.hlPath){treeView.highlightPath(id)}else{de.className=selectedClass;de.setAttribute("aria-selected",true)}if(setFocus){treeView.setFocus(id)}TreeWidgetElem_scroll(de,treeView.layer)}if((treeView.clickCB)&&(!noSendClickCB)){treeView.clickCB(userData,isFromKeybArrow!=null?isFromKeybArrow:false)}}}var _startShift=null;function TreeWidgetElem_multiSelectCtrl(){}var _treeWClickedW;function TreeWidget_clickCB(elemId,isIcon,ev,isDown,expand){eventCancelBubble(ev);var e=_TreeWidgetElemInstances[elemId];if(e==null){return}e.init();var tree=e.treeView;tree.setFocus(elemId);if(expand!=null){if(e.expanded==expand){if(expand&&e.sub&&e.sub.length>0){tree.setFocus(e.sub[0].id)}else{if(!expand&&e.par){tree.setFocus(e.par.id)}}return}}if(isIcon){if(e.sub.length>0){TreeWidget_toggleCB(elemId,true)}else{if(e.isIncomplete&&e.querycompleteCB){e.querycompleteCB()}else{return}}}else{e.select(null,ev)}if(_curDoc.onmousedown){_curDoc.onmousedown(ev)}if(isDown&&_ie){_treeWClickedW=e;e.init();e.clicked=true;e.initialX=eventGetX(ev);e.initialY=eventGetY(ev);if(_ie&&e.domElem){e.domElem.onmousemove=TreeWidgetElem_triggerDD}}return false}function treeDblClickCB(elemId,ev){eventCancelBubble(ev);var e=_TreeWidgetElemInstances[elemId],treeView=e.treeView;if(e.sub.length>0){TreeWidget_toggleCB(elemId)}else{if(e.isIncomplete&&e.querycompleteCB){e.querycompleteCB();return}}if(e.isEditable){e.showEditInput(true)}else{if(treeView.doubleClickCB){treeView.doubleClickCB(e.userData)}}}function TreeWidget_keydownCB(elemId,ev,k){eventCancelBubble(ev);var e=_TreeWidgetElemInstances[elemId],r,delta;var tree=e.treeView;switch(k){case KEY_PAGEUP:if(tree.layer&&e.layer){delta=Math.max(0,Math.round(tree.layer.offsetHeight/e.layer.offsetHeight)-1);r=e.getNextPrev(-delta);if(r){tree.setFocus(r.id)}}break;case KEY_PAGEDOWN:if(tree.layer&&e.layer){delta=Math.max(0,Math.round(tree.layer.offsetHeight/e.layer.offsetHeight)-1);r=e.getNextPrev(delta);if(r){tree.setFocus(r.id)}}break;case KEY_UP:r=e.getNextPrev(-1);if(r){tree.setFocus(r.id)}break;case KEY_DOWN:r=e.getNextPrev(1);if(r){tree.setFocus(r.id)}break;default:break}}function TreeWidgetElem_UpdateTooltip(newId,forceSelect){var elem=_TreeWidgetElemInstances[newId];if(elem){elem.init();if(elem.domElem!=null){elem.domElem.title=elem.getTooltip(forceSelect)}}}function TreeWidgetElem_getDragTooltip(){var o=this;if(o.obj&&o.obj.getDragTooltip){return o.obj.getDragTooltip()}return o.name}function TreeWidgetElem_getTooltip(forceSelect){var tooltip="",o=this;var itemSelected=false;if(o.treeView.multiSelection){itemSelected=(arrayFind(o.treeView,"selIds",o.id)>-1)}else{itemSelected=(o.treeView.selId==o.id)}if(forceSelect||itemSelected){tooltip=L_DHTMLLIB_selectedLab+" "}if((o.sub.length>0)||(o.isIncomplete)){if(o.expanded){tooltip+=" "+L_DHTMLLIB_expandedLab+" "}else{tooltip+=" "+L_DHTMLLIB_collapsedLab+" "}}if(o.advTooltip){tooltip+=" ("+o.advTooltip+")"}if(o.getLevel){tooltip+=" ("+L_DHTMLLIB_level+" "+o.getLevel()+")"}return tooltip}function _tmoc(e,elemId,over,ev){e.style.cursor=_hand;var elem=_TreeWidgetElemInstances[elemId];if(elem==null){return}if(elem.treeView.mouseOverTooltip){if(over){if(elem.customTooltip&&elem.showCustomTooltipCB){elem.showCustomTooltipCB(elem.userData,ev);elem.init()}else{e.title=elem.tooltip?elem.tooltip:""}}else{if(elem.customTooltip&&elem.hideCustomTooltipCB){elem.hideCustomTooltipCB()}else{e.title=""}}}if(elem.treeView.mouseOverCB){elem.treeView.mouseOverCB(elem)}}function treeContextMenuCB(elemId,ev){var elem=_TreeWidgetElemInstances[elemId];if(elem){elem.treeView.rightClickMenuCB(elemId,_ie?_curWin.event:ev)}}function TreeWidgetElem_isLeaf(){return(this.sub.length==0&&!this.isIncomplete)}function TreeWidgetElem_isNode(){return(!this.isLeaf())}function TreeWidgetElem_isSelected(){var o=this;if(o.treeView.multi){var idx=arrayFind(o.treeView,"selIds",o.id);return(idx>=0)}else{return(o.id==o.treeView.selId)}}function TreeWidgetElem_setCursorClass(newCursorClass){this.cursorClass=newCursorClass}DHTMLLIB.add(_tmvc,_tkt,_tpt,_tpl,TreeWidget_dragOverEnterCB,TreeWidgetElem_iconFocusCB,TreeWidget_focusCB);var DialogBoxWidget_instances=new Array();var DialogBoxWidget_current=null;var DialogBoxWidget_zindex=1000;var _promptDlgInfo=0;var _promptDlgWarning=1;var _promptDlgCritical=2;var _dlgTitleLBorderToTxt=20;var _dlgTitleHeight=25;var _dlgTitleMarginBottom=4;var _dlgTitleRBorderToClose=10;var _dlgTitleCloseBtnImgFile="dialogtitle.gif";var _dlgTitleCloseBtnW=11;var _dlgTitleCloseBtnH=10;var _dlgTitleCloseBtnDy=26;var _dlgTitleCloseBtnHoverDy=37;var _dlgBottomMargin=14;function newDialogBoxWidget(id,title,width,height,defaultCB,cancelCB,noCloseButton,isAlert){var o=newWidget(id);o.title=title;o.width=width;o.height=height;o.defaultCB=defaultCB;o.cancelCB=cancelCB;o.noCloseButton=noCloseButton?noCloseButton:false;o.isAlert=isAlert;o.closeCB=null;o.resizeable=false;o.oldMouseDown=null;o.oldCurrent=null;o.modal=null;o.hiddenVis=new Array;o.lastLink=null;o.firstLink=null;o.titleLayer=null;o.defaultBtn=null;o.divLayer=null;o.oldInit=o.init;o.oldShow=o.show;o.init=DialogBoxWidget_init;o.setResize=DialogBoxWidget_setResize;o.beginHTML=DialogBoxWidget_beginHTML;o.endHTML=DialogBoxWidget_endHTML;o.show=DialogBoxWidget_Show;o.center=DialogBoxWidget_center;o.focus=DialogBoxWidget_focus;o.setTitle=DialogBoxWidget_setTitle;o.getContainerWidth=DialogBoxWidget_getContainerWidth;o.getContainerHeight=DialogBoxWidget_getContainerHeight;DialogBoxWidget_instances[id]=o;o.modal=newWidget("modal_"+id);o.placeIframe=DialogBoxWidget_placeIframe;o.oldResize=o.resize;o.resize=DialogBoxWidget_resize;o.attachDefaultButton=DialogBoxWidget_attachDefaultButton;o.unload=DialogBoxWidget_unload;o.close=DialogBoxWidget_close;o.setCloseCB=DialogBoxWidget_setCloseCB;o.setNoCloseButton=DialogBoxWidget_setNoCloseButton;o.resizeModal=DialogBoxWidget_ResizeModal;o.setParent=DialogBoxWidget_setParent;o._onWindowResize=function(){o.resizeModal()};o.respectPageDirection=false;if(!_ie){if(o.width!=null){o.width=Math.max(0,width+4)}if(o.height!=null){o.height=Math.max(0,height+4)}}return o}function DialogBoxWidget_setParent(parent){this.parent=parent}function DialogBoxWidget_setResize(resizeCB,minWidth,minHeight,noResizeW,noResizeH){var o=this;o.resizeable=true;o.resizeCB=resizeCB;o.minWidth=minWidth?minWidth:50;o.minHeight=minHeight?minHeight:50;o.noResizeW=noResizeW;o.noResizeH=noResizeH}function DialogBoxWidget_setTitle(title){var o=this;o.title=title;if(o.titleLayer==null){o.titleLayer=getLayer("titledialog_"+this.id)}o.titleLayer.innerHTML=convStr(title)}function DialogBoxWidget_setCloseIcon(lyr,isActive){changeOffset(lyr,0,(isActive==1?0:18))}function DialogBoxWidget_beginHTML(){with(this){var moveableCb=' onselectstart="return false" ondragstart="return false" onmousedown="'+_dhtmlLib+".DialogBoxWidget_down(event,'"+id+"',this,false);return false;\" ";var titleBG="background-image:url("+_skin+"dialogtitle.gif)";var mdl='<div onselectstart="return false" onmouseup="'+_dhtmlLib+".DialogBoxWidget_keepFocus('"+this.id+'\');" onmousedown="'+_dhtmlLib+'.eventCancelBubble(event)" border="0" hspace="0" vspace="0" src="'+_skin+'../transp.gif" id="modal_'+id+'" type="modal" style="background-color:#888888;opacity:0.3;filter:alpha(opacity:30);position:absolute;top:0px;left:0px;width:1px;height:1px">'+(_ie?img(_skin+"../transp.gif","100%","100%",null):"")+"</div>";var btn="";if(_dtd4){btn='<td style="padding-'+(_rtl?"left":"right")+":"+_dlgTitleRBorderToClose+'px"><div id="dialogClose_'+id+'" class="dlgCloseBtn" title="'+L_DHTMLLIB_closeDialog+'"></div></td>'}else{btn='<td style="padding-'+(_rtl?"left":"right")+":"+_dlgTitleRBorderToClose+'px">'+simpleImgOffset(_skin+_dlgTitleCloseBtnImgFile,_dlgTitleCloseBtnW,_dlgTitleCloseBtnH,0,_dlgTitleCloseBtnDy,"dialogClose_"+id,null,L_DHTMLLIB_closeDialog)+"</td>"}var closeBtn='<td class="dlgCloseArea" align="left" valign="middle"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr style="height:'+_dlgTitleHeight+'px">'+btn+"</tr></tbody></table></td>";var dlgtitle='<table dir="'+(_rtl?"left":"right")+'" style="height:'+_dlgTitleHeight+'" class="dlgTitle" width="100%" border="0" cellspacing="0" cellpadding="0"><tr valign="top" style="height:'+_dlgTitleHeight+'px"><td '+moveableCb+' style="cursor:move;padding-'+(_rtl?"right":"left")+":"+_dlgTitleLBorderToTxt+'px;" width="100%" valign="middle" align="'+(_rtl?"right":"left")+'"><nobr><span id="titledialog_'+id+'" tabIndex="0" class="titlezone">'+convStr(title)+"</span></nobr></td>"+closeBtn+"</tr></table>";var s="";s=mdl;var dims=sty("width",width?(""+width+"px"):null)+sty("height",height?(""+Math.max(0,height+(_moz?-2:0))+"px"):null);s+='<button style="position:absolute;left:-30px;top:-30px; visibility:hidden" id="firstLink_'+this.id+'" onfocus="'+_dhtmlLib+".DialogBoxWidget_keepFocus('"+this.id+"', true);return false;\" ></button>";s+='<table border="0" cellspacing="0" cellpadding="0" id="'+id+'" style="display:none;padding:0px;visibility:'+_hide+";position:absolute;top:-2000px;left:-2000px;"+dims+'" '+(isAlert?'role="alertdialog"':'role="dialog"')+">";s+='<tr><td class="dialogbox" id="td_dialog_'+id+'" onresize="'+_dhtmlLib+".DialogBoxWidget_resizeIframeCB('"+id+'\',this)" valign="top">';s+="<table dir="+(_rtl?"rtl":"ltr")+' class="dlgBox2" border="0" cellspacing="0" cellpadding="0" style="width:100%;"><tbody>';s+='<tr><td height="'+_dlgTitleHeight+'" valign="top">'+dlgtitle+'<button id="webKitFocusElem'+id+'" style="height:1px;width:1px;position:absolute;left:-10000em;opacity:0;tabIndex:-1"/></td></tr>';s+='<tr><td class="dlgBody" valign="top" id="div_dialog_'+id+'">';return s}}function DialogBoxWidget_endHTML(){var s="</td></tr>";s+='<tr><td style="height:'+_dlgBottomMargin+'px;"></td></tr>';s+="</tbody></table>";s+="</td></tr></table>";s+='<button style="position:absolute;left:-30px;top:-30px; visibility:hidden" id="lastLink_'+this.id+'" onfocus="'+_dhtmlLib+".DialogBoxWidget_keepFocus('"+this.id+"', false);return false;\" ></button>";return s}function DialogBoxWidget_getContainerWidth(){var o=this;return o.width-(2+2)}function DialogBoxWidget_getContainerHeight(){var o=this;return o.height-(2+18+2+2+2)}function DialogBoxWidget_close(id){var o=DialogBoxWidget_instances[id];if(o){o.show(false);if(o.cancelCB!=null){o.cancelCB()}}}function DialogBoxWidget_setCloseCB(closeCB){this.closeCB=closeCB}function DialogBoxWidget_setNoCloseButton(noCloseButton){if(this.noCloseButton!==noCloseButton){this.noCloseButton=noCloseButton;if(this.initialized()){this.closeButton.style.visibility=this.noCloseButton?_hide:_show}}}function DialogBoxWidget_resizeIframeCB(id,lyr){DialogBoxWidget_instances[id].placeIframe()}function DialogBoxWidget_placeIframe(){var o=this;if(o.iframe){var lyr=o.td_lyr;if(lyr==null){o.td_lyr=lyr=getLayer("td_dialog_"+o.id)}o.iframe.resize(lyr.offsetWidth,lyr.offsetHeight);o.iframe.move(o.layer.offsetLeft,o.layer.offsetTop)}}function DialogBoxWidget_resize(w,h){var o=this;o.oldResize(w,h);if(o.iframe){o.iframe.resize(w,h)}}function DialogBoxWidget_init(){if(this.layer!=null){return}var o=this;o.oldInit();o.modal.init();o.lastLink=newWidget("lastLink_"+o.id);o.firstLink=newWidget("firstLink_"+o.id);o.lastLink.init();o.firstLink.init();if(_saf){o.webKitFocusElem=getLayer("webKitFocusElem"+o.id)}o.closeButton=getLayer("dialogClose_"+o.id);o.closeButton.style.visibility=o.noCloseButton?_hide:_show;o.closeButton.onmouseover=DialogBoxWidget_moverCloseBtn;o.closeButton.onmouseout=DialogBoxWidget_moverCloseBtn;o.closeButton.onclick=function(){o.close(o.id)}}function DialogBoxWidget_moverCloseBtn(evt){var evt=getEvent(evt);var over=(evt&&evt.type=="mouseover")?true:false;if(_dtd4){this.className=over?"dlgCloseBtnHover":"dlgCloseBtn"}else{changeOffset(this,0,over?_dlgTitleCloseBtnHoverDy:_dlgTitleCloseBtnDy)}}function DialogBoxWidget_attachDefaultButton(btn){this.defaultBtn=btn;this.defaultBtn.setDefaultButton()}var _theLYR=null;var _dlgResize=null;function DialogBoxWidget_down(e,id,obj,isResize){_dlgResize=isResize;var o=DialogBoxWidget_instances[id],lyr=o.layer,mod=o.modal.layer;lyr.onmousemove=mod.onmousemove=eval("_curWin."+_dhtmlLib+".DialogBoxWidget_move");lyr.onmouseup=mod.onmouseup=eval("_curWin."+_dhtmlLib+".DialogBoxWidget_up");lyr.dlgStartPosx=mod.dlgStartPosx=parseInt(lyr.style.left);lyr.dlgStartPosy=mod.dlgStartPosy=parseInt(lyr.style.top);lyr.dlgStartx=mod.dlgStartx=eventGetX(e);lyr.dlgStarty=mod.dlgStarty=eventGetY(e);lyr.dlgStartw=mod.dlgStartw=o.getWidth();lyr.dlgStarth=mod.dlgStarth=o.getHeight();lyr._widget=mod._widget=o.widx;_theLYR=lyr;eventCancelBubble(e);if(lyr.setCapture){lyr.setCapture(true)}}function DialogBoxWidget_move(e){var o=_theLYR,dlg=getWidget(o);if(_dlgResize){var newW=Math.max(dlg.minWidth,o.dlgStartw+eventGetX(e)-o.dlgStartx);var newH=Math.max(dlg.minHeight,o.dlgStarth+eventGetY(e)-o.dlgStarty);dlg.resize(dlg.noResizeW?null:newW,dlg.noResizeH?null:newH);if(dlg.firstTR){if(!dlg.noResizeW){dlg.firstTR.style.width=newW-4}if(!dlg.noResizeH){dlg.secondTR.style.height=newH-44}}if(dlg.resizeCB){dlg.resizeCB(newW,newH)}}else{var x=Math.max(0,o.dlgStartPosx-o.dlgStartx+eventGetX(e));var y=Math.max(0,o.dlgStartPosy-o.dlgStarty+eventGetY(e));dlg.iframe.move(x,y);dlg.move(x,y)}eventCancelBubble(e);return false}function DialogBoxWidget_up(e){var o=getWidget(_theLYR),lyr=o.layer,mod=o.modal.layer;lyr.onmousemove=mod.onmousemove=null;lyr.onmouseup=mod.onmouseup=null;if(lyr.releaseCapture){lyr.releaseCapture()}_theLYR=null}function DialogBoxWidget_keypress(e){eventCancelBubble(e);var dlg=DialogBoxWidget_current;if(dlg!=null){switch(eventGetKey(e)){case 13:if(dlg.yes&&!dlg.no){if(dlg.defaultCB){dlg.defaultCB()}return false}if(isTextArea(_ie?_curWin.event:e)){return true}if(dlg.defaultBtn!=null&&!dlg.defaultBtn.isDisabled()){dlg.defaultBtn.executeCB();return false}break;case 27:if(!dlg.noCloseButton){dlg.show(false);hideBlockWhileWaitWidget();if(dlg.cancelCB!=null){dlg.cancelCB()}}return false;break;case 8:return isTextInput(_ie?_curWin.event:e);break}}}function DialogBoxWidget_ResizeModal(){if(this.parent&&this.parent.layer){var parentLayer=this.parent.layer;var coord=getPos2(parentLayer);var dimension={w:parentLayer.offsetWidth,h:parentLayer.offsetHeight};var m_sty=this.modal.css;m_sty.top=coord.y+"px";m_sty.left=coord.x+"px";m_sty.width=dimension.w+"px";m_sty.height=dimension.h+"px"}}function DialogBoxWidget_center(){var o=this;var defaults={modalDisplay:o.modal.css.display,layerDisplay:o.css.display};var height=o.layer.offsetHeight,width=o.layer.offsetWidth;var yOffset=0,xOffset=0;if(this.parent&&this.parent.layer){var parentLayer=this.parent.layer;var coord=getPos2(parentLayer);var dimension={w:parentLayer.offsetWidth,h:parentLayer.offsetHeight};yOffset=coord.y+Math.max(0,(dimension.h-height)/2);xOffset=coord.x+Math.max(0,(dimension.w-width)/2)}o.move(Math.max(0,xOffset),Math.max(0,yOffset));o.placeIframe()}function DialogBoxWidget_Show(sh){with(this){var m_sty=modal.css;var l_sty=css;if(sh){if(!this.iframe){this.iframe=newWidget(getDynamicBGIFrameLayer().id);this.iframe.init();this.iframe.respectPageDirection=this.respectPageDirection}oldCurrent=DialogBoxWidget_current;DialogBoxWidget_current=this;if(_ie){layer.onkeydown=eval("_curWin."+_dhtmlLib+".DialogBoxWidget_keypress");modal.layer.onkeydown=eval("_curWin."+_dhtmlLib+".DialogBoxWidget_keypress");window.attachEvent("onresize",this._onWindowResize)}else{_curDoc.addEventListener("keydown",eval("_curWin."+_dhtmlLib+".DialogBoxWidget_keypress"),false);window.addEventListener("resize",this._onWindowResize,false)}oldMouseDown=_curDoc.onmousedown;_curDoc.onmousedown=null;hideBlockWhileWaitWidget()}else{DialogBoxWidget_current=oldCurrent;oldCurrent=null;if(_ie){layer.onkeydown=null;modal.layer.onkeydown=null;window.detachEvent("onresize",this._onWindowResize)}else{_curDoc.removeEventListener("keydown",eval("_curWin."+_dhtmlLib+".DialogBoxWidget_keypress"),false);window.removeEventListener("resize",this._onWindowResize,false)}_curDoc.onmousedown=oldMouseDown}var sameState=(layer.isShown==sh);if(sameState){return}layer.isShown=sh;if(sh){this.iframe.css.zIndex=DialogBoxWidget_zindex++;m_sty.zIndex=DialogBoxWidget_zindex++;l_sty.zIndex=DialogBoxWidget_zindex++;m_sty.display="";l_sty.display="block";this.iframe.setDisplay(true);holdBGIFrame(this.iframe.id);this.resizeModal();this.height=layer.offsetHeight;this.width=layer.offsetWidth;if(_small&&height){if(divLayer==null){divLayer=getLayer("div_dialog_"+id)}if(divLayer){divLayer.style.overflow="auto";divLayer.style.height=(winHeight()<height)?(winHeight()-40):getContainerHeight();divLayer.style.width=(_moz?width+20:getContainerWidth())}resize(null,((winHeight()<height)?(winHeight()-10):null))}if(isHidden(layer)){this.center()}if(!_small&&this.resizeCB){this.resizeCB(width,height)}}else{m_sty.width="1px";m_sty.height="1px";m_sty.display="none";l_sty.display="none";if(this.iframe!=null){this.iframe.setDisplay(false);releaseBGIFrame(this.iframe.id)}}modal.show(sh);firstLink.show(sh);lastLink.show(sh);oldShow(sh);if(DialogBoxWidget_current!=null&&sh==true){DialogBoxWidget_current.focus()}if(!sh&&closeCB!=null){closeCB()}}}function DialogBoxWidget_unload(){if(this.iframe){releaseBGIFrame(this.iframe.id)}}function DialogBoxWidget_keepFocus(id,isFocusLastChild){var o=DialogBoxWidget_instances[id];if(o){o.focus(isFocusLastChild)}}function DialogBoxWidget_focus(isFocusLastChild){with(this){if(!isFocusLastChild||!layer.querySelectorAll){if(titleLayer==null){titleLayer=getLayer("titledialog_"+id)}if(_saf&&webKitFocusElem&&webKitFocusElem.focus){webKitFocusElem.focus()}else{if(titleLayer.focus){titleLayer.focus()}}}else{var focusableElems=layer.querySelectorAll("span[tabindex='0'], div[tabindex='0'], a");if(focusableElems.length>0){focusableElems[focusableElems.length-1].focus()}}}}function newPromptDialog(id,title,text,okLabel,cancelLabel,promptType,yesCB,noCB,noCloseButton,isAlert){var o=newDialogBoxWidget(id,title,300,null,PromptDialog_defaultCB,PromptDialog_cancelCB,noCloseButton,isAlert);o.text=text;o.getHTML=PromptDialog_getHTML;o.yes=okLabel?newButtonWidget(id+"_yesBtn",okLabel,'PromptDialog_yesCB("'+o.id+'")',70):null;o.no=cancelLabel?newButtonWidget(id+"_noBtn",cancelLabel,'PromptDialog_noCB("'+o.id+'")',70):null;o.yesCB=yesCB;o.noCB=noCB;o.promptType=promptType;o.txtLayer=null;o.imgLayer=null;o.setPromptType=PromptDialog_setPromptType;o.setText=PromptDialog_setText;if(o.yes){o.attachDefaultButton(o.yes)}else{if(o.no){o.attachDefaultButton(o.no)}}return o}function PromptDialog_getimgPath(promptType){var imgPath=_skin;switch(promptType){case _promptDlgInfo:imgPath+="information_icon.gif";break;case _promptDlgWarning:imgPath+="warning_icon.gif";break;default:imgPath+="critical_icon.gif";break}return imgPath}function PromptDialog_getimgAlt(promptType){var imgAlt="";return imgAlt}function PromptDialog_setPromptType(promptType){var o=this;if(o.imgLayer==null){o.imgLayer=getLayer("dlg_img_"+o.id)}o.imgLayer.src=PromptDialog_getimgPath(promptType);o.imgLayer.alt=PromptDialog_getimgAlt(promptType)}function PromptDialog_setText(text){var o=this;o.text=text;if(o.txtLayer==null){o.txtLayer=getLayer("dlg_txt_"+o.id)}o.txtLayer.innerHTML='<div tabindex="0">'+convStr(text,false,true)+"</div>"}function PromptDialog_getHTML(){var o=this;var imgPath=PromptDialog_getimgPath(o.promptType);var imgAlt=PromptDialog_getimgAlt(o.promptType);return o.beginHTML()+'<table class="dialogzone" width="290" cellpadding="0" cellspacing="5" border="0"><tr><td><table class="dialogzone" cellpadding="5" cellspacing="0" border="0"><tr><td align="right" width="32" >'+img(imgPath,32,32,null,'id="dlg_img_'+o.id+'"',imgAlt)+'</td><td></td><td id="dlg_txt_'+o.id+'" align="left" tabindex="0">'+convStr(o.text,false,true)+"</td></tr></table></td></tr><tr><td>"+getSep()+'</td></tr><tr><td align="right"><table cellpadding="5" cellspacing="0" border="0"><tr>'+(o.yes?"<td>"+o.yes.getHTML()+"</td>":"")+(o.no?"<td>"+o.no.getHTML()+"</td>":"")+"</tr></table></td></tr></table>"+o.endHTML()}function PromptDialog_defaultCB(){var o=this;if(o.yesCB){if(typeof o.yesCB!="string"){o.yesCB()}else{eval(o.yesCB)}}this.show(false)}function PromptDialog_cancelCB(){var o=this;if(o.noCB){if(typeof o.noCB!="string"){o.noCB()}else{eval(o.noCB)}}this.show(false)}function PromptDialog_yesCB(id){DialogBoxWidget_instances[id].defaultCB()}function PromptDialog_noCB(id){DialogBoxWidget_instances[id].cancelCB()}DHTMLLIB.add(DialogBoxWidget_down,DialogBoxWidget_keepFocus,DialogBoxWidget_resizeIframeCB,DialogBoxWidget_move,DialogBoxWidget_up,DialogBoxWidget_keypress);function newWaitDialogBoxWidget(id,w,h,title,bShowCancel,cancelCB,bShowLabel,text,noCloseButton){var minW=250;var minH=150;if(w<minW){w=minW}if(h<minH){h=minH}var o=newDialogBoxWidget(id,title,w,null,null,WaitDialogBoxWidget_cancelCB,noCloseButton,true);o.pad=5;o.frZone=newFrameZoneWidget(id+"_frZone",null,null);o.showLabel=(bShowLabel!=null)?bShowLabel:false;o.showCancel=(bShowCancel!=null)?bShowCancel:false;o.label=newWidget(id+"_label");o.label.text=text;if(o.showCancel){o.cancelButton=newButtonWidget(id+"_cancelButton",L_DHTMLLIB_cancelButtonLab,CancelButton_cancelCB);o.cancelButton.par=o}else{o.cancelButton={};o.cancelButton.init=function(){};o.cancelButton.setDisplay=function(x){};o.cancelButton.setDisabled=function(x){};o.cancelButton.getHTML=function(){return""}}o.cancelCB=cancelCB;o.oldDialogBoxInit=o.init;o.init=WaitDialogBoxWidget_init;o.getHTML=WaitDialogBoxWidget_getHTML;o.setShowCancel=WaitDialogBoxWidget_setShowCancel;o.setShowLabel=WaitDialogBoxWidget_setShowLabel;return o}function WaitDialogBoxWidget_init(){var o=this;o.oldDialogBoxInit();o.frZone.init();o.label.init();o.label.setDisplay(o.showLabel);o.cancelButton.init();o.cancelButton.setDisplay(o.showCancel)}function WaitDialogBoxWidget_getHTML(){var o=this,s="";s+=o.beginHTML();s+='<table border="0" cellspacing="0" cellpadding="0" width="100%" dir=';s+=bobj.crv.config.isRTL?'"RTL"':'"LTR"';s+="><tbody>";s+='<tr><td align="center" valign="top">'+o.frZone.beginHTML();s+='<table border="0" cellspacing="0" cellpadding="0" width="100%"><tbody><tr><td align="center" style="padding-top:5px;">'+img(_skin+"wait01.gif",200,40)+'</td></tr><tr><td align="left" style="padding-left:2px;padding-right:2px;padding-top:5px;"><div id="'+o.label.id+'" class="iconText" style="wordWrap:break_word;text-align:center;">'+convStr(o.label.text,false,true)+"</div></td></tr></tbody></table>";s+=o.frZone.endHTML()+"</td></tr>";s+='<tr><td align="right" valign="middle" style="padding-top:5px;padding-right:9px">'+o.cancelButton.getHTML()+"</td></tr>";s+="</tbody></table>";s+=o.endHTML();return s}function WaitDialog_FrameZoneWidget_beginHTML(){var o=this;return'<table class="waitdialogzone" style="'+sty("width",o.w)+sty("height",o.h)+'" id="'+o.id+'" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" class="dialogzone" id="frame_cont_'+o.id+'">'}function WaitDialog_FrameZoneWidget_endHTML(){var o=this;return"</td></tr></tbody></table>"}function WaitDialogBoxWidget_setShowCancel(show,cancelCB){var o=this;o.showCancel=show;o.cancelButton.setDisabled(false);o.cancelButton.setDisplay(show);o.cancelCB=cancelCB}function WaitDialogBoxWidget_setShowLabel(show,text){var o=this;o.showLabel=show;o.label.text=text;o.label.setHTML(text);o.label.setDisplay(show)}function WaitDialogBoxWidget_cancelCB(){var o=this;if(o.cancelCB!=null){o.cancelCB();o.cancelButton.setDisabled(true)}}function CancelButton_cancelCB(){var o=this;if(o.par.cancelCB!=null){o.par.cancelCB();o.par.cancelButton.setDisabled(true)}}function newSeparatorWidget(id,h,marginTop,marginRight,marginBottom,marginLeft){var o=newWidget(id);o.height=(h==null)?null:h+"px";o.marginTop=marginTop;o.marginRight=marginRight;o.marginBottom=marginBottom;o.marginLeft=marginLeft;o.getHTML=Separator_getHTML;o.getHeight=Separator_getHeight;return o}function Separator_getHTML(){var o=this,s="";var className=o.height?"verticalSeparator":"horizontalSeparator";var heightStyle=o.height?"height:"+o.height+"px;":"";var widthStyle=(_ie&&_isQuirksMode&&o.height)?"width:2px;":"";s+='<div id="'+o.id+'" class="'+className+'" style="margin-left:'+o.marginLeft+"px;margin-right:"+o.marginRight+"px;";s+="margin-top:"+o.marginTop+"px;margin-bottom:"+o.marginBottom+"px;"+heightStyle+widthStyle+'"></div>';return s}function Separator_getHeight(){if(this.isDisplayed()){return this.layer.offsetHeight+this.marginTop+this.marginBottom}else{return 0}}var swfobject=function(){var Z="undefined",P="object",B="Shockwave Flash",h="ShockwaveFlash.ShockwaveFlash",W="application/x-shockwave-flash",K="SWFObjectExprInst",G=window,g=document,N=navigator,f=[],H=[],Q=null,L=null,T=null,S=false,C=false;var a=function(){var l=typeof g.getElementById!=Z&&typeof g.getElementsByTagName!=Z&&typeof g.createElement!=Z&&typeof g.appendChild!=Z&&typeof g.replaceChild!=Z&&typeof g.removeChild!=Z&&typeof g.cloneNode!=Z,t=[0,0,0],n=null;if(typeof N.plugins!=Z&&typeof N.plugins[B]==P){n=N.plugins[B].description;if(n){n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1");t[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10);t[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10);t[2]=/r/.test(n)?parseInt(n.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof G.ActiveXObject!=Z){var o=null,s=false;try{o=new ActiveXObject(h+".7")}catch(k){try{o=new ActiveXObject(h+".6");t=[6,0,21];o.AllowScriptAccess="always"}catch(k){if(t[0]==6){s=true}}if(!s){try{o=new ActiveXObject(h)}catch(k){}}}if(!s&&o){try{n=o.GetVariable("$version");if(n){n=n.split(" ")[1].split(",");t=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]}}catch(k){}}}}var v=N.userAgent.toLowerCase(),j=N.platform.toLowerCase(),r=/webkit/.test(v)?parseFloat(v.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,i=false,q=j?/win/.test(j):/win/.test(v),m=j?/mac/.test(j):/mac/.test(v); /*@cc_on i=true;@if(@_win32)q=true;@elif(@_mac)m=true;@end@*/ return{w3cdom:l,pv:t,webkit:r,ie:i,win:q,mac:m}}();var e=function(){if(!a.w3cdom){return}J(I);if(a.ie&&a.win){try{g.write("<script id=__ie_ondomload defer=true src=//:><\/script>");var i=c("__ie_ondomload");if(i){i.onreadystatechange=function(){if(this.readyState=="complete"){this.parentNode.removeChild(this);V()}}}}catch(j){}}if(a.webkit&&typeof g.readyState!=Z){Q=setInterval(function(){if(/loaded|complete/.test(g.readyState)){V()}},10)}if(typeof g.addEventListener!=Z){g.addEventListener("DOMContentLoaded",V,null)}M(V)}();function V(){if(S){return}if(a.ie&&a.win){var m=Y("span");try{var l=g.getElementsByTagName("body")[0].appendChild(m);l.parentNode.removeChild(l)}catch(n){return}}S=true;if(Q){clearInterval(Q);Q=null}var j=f.length;for(var k=0;k<j;k++){f[k]()}}function J(i){if(S){i()}else{f[f.length]=i}}function M(j){if(typeof G.addEventListener!=Z){G.addEventListener("load",j,false)}else{if(typeof g.addEventListener!=Z){g.addEventListener("load",j,false)}else{if(typeof G.attachEvent!=Z){G.attachEvent("onload",j)}else{if(typeof G.onload=="function"){var i=G.onload;G.onload=function(){i();j()}}else{G.onload=j}}}}}function I(){var l=H.length;for(var j=0;j<l;j++){var m=H[j].id;if(a.pv[0]>0){var k=c(m);if(k){H[j].width=k.getAttribute("width")?k.getAttribute("width"):"0";H[j].height=k.getAttribute("height")?k.getAttribute("height"):"0";if(O(H[j].swfVersion)){if(a.webkit&&a.webkit<312){U(k)}X(m,true)}else{if(H[j].expressInstall&&!C&&O("6.0.65")&&(a.win||a.mac)){D(H[j])}else{d(k)}}}}else{X(m,true)}}}function U(m){var k=m.getElementsByTagName(P)[0];if(k){var p=Y("embed"),r=k.attributes;if(r){var o=r.length;for(var n=0;n<o;n++){if(r[n].nodeName.toLowerCase()=="data"){p.setAttribute("src",r[n].nodeValue)}else{p.setAttribute(r[n].nodeName,r[n].nodeValue)}}}var q=k.childNodes;if(q){var s=q.length;for(var l=0;l<s;l++){if(q[l].nodeType==1&&q[l].nodeName.toLowerCase()=="param"){p.setAttribute(q[l].getAttribute("name"),q[l].getAttribute("value"))}}}m.parentNode.replaceChild(p,m)}}function F(i){if(a.ie&&a.win&&O("8.0.0")){G.attachEvent("onunload",function(){var k=c(i);if(k){for(var j in k){if(typeof k[j]=="function"){k[j]=function(){}}}k.parentNode.removeChild(k)}})}}function D(j){C=true;var o=c(j.id);if(o){if(j.altContentId){var l=c(j.altContentId);if(l){L=l;T=j.altContentId}}else{L=b(o)}if(!(/%$/.test(j.width))&&parseInt(j.width,10)<310){j.width="310"}if(!(/%$/.test(j.height))&&parseInt(j.height,10)<137){j.height="137"}g.title=g.title.slice(0,47)+" - Flash Player Installation";var n=a.ie&&a.win?"ActiveX":"PlugIn",k=g.title,m="MMredirectURL="+G.location+"&MMplayerType="+n+"&MMdoctitle="+k,p=j.id;if(a.ie&&a.win&&o.readyState!=4){var i=Y("div");p+="SWFObjectNew";i.setAttribute("id",p);o.parentNode.insertBefore(i,o);o.style.display="none";G.attachEvent("onload",function(){o.parentNode.removeChild(o)})}R({data:j.expressInstall,id:K,width:j.width,height:j.height},{flashvars:m},p)}}function d(j){if(a.ie&&a.win&&j.readyState!=4){var i=Y("div");j.parentNode.insertBefore(i,j);i.parentNode.replaceChild(b(j),i);j.style.display="none";G.attachEvent("onload",function(){j.parentNode.removeChild(j)})}else{j.parentNode.replaceChild(b(j),j)}}function b(n){var m=Y("div");if(a.win&&a.ie){m.innerHTML=n.innerHTML}else{var k=n.getElementsByTagName(P)[0];if(k){var o=k.childNodes;if(o){var j=o.length;for(var l=0;l<j;l++){if(!(o[l].nodeType==1&&o[l].nodeName.toLowerCase()=="param")&&!(o[l].nodeType==8)){m.appendChild(o[l].cloneNode(true))}}}}}return m}function R(AE,AC,q){var p,t=c(q);if(typeof AE.id==Z){AE.id=q}if(a.ie&&a.win){var AD="";for(var z in AE){if(AE[z]!=Object.prototype[z]){if(z=="data"){AC.movie=AE[z]}else{if(z.toLowerCase()=="styleclass"){AD+=' class="'+AE[z]+'"'}else{if(z!="classid"){AD+=" "+z+'="'+AE[z]+'"'}}}}}var AB="";for(var y in AC){if(AC[y]!=Object.prototype[y]){AB+='<param name="'+y+'" value="'+AC[y]+'" />'}}t.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AD+">"+AB+"</object>";F(AE.id);p=c(AE.id)}else{if(a.webkit&&a.webkit<312){var AA=Y("embed");AA.setAttribute("type",W);for(var x in AE){if(AE[x]!=Object.prototype[x]){if(x=="data"){AA.setAttribute("src",AE[x])}else{if(x.toLowerCase()=="styleclass"){AA.setAttribute("class",AE[x])}else{if(x!="classid"){AA.setAttribute(x,AE[x])}}}}}for(var w in AC){if(AC[w]!=Object.prototype[w]){if(w!="movie"){AA.setAttribute(w,AC[w])}}}t.parentNode.replaceChild(AA,t);p=AA}else{var s=Y(P);s.setAttribute("type",W);for(var v in AE){if(AE[v]!=Object.prototype[v]){if(v.toLowerCase()=="styleclass"){s.setAttribute("class",AE[v])}else{if(v!="classid"){s.setAttribute(v,AE[v])}}}}for(var u in AC){if(AC[u]!=Object.prototype[u]&&u!="movie"){E(s,u,AC[u])}}t.parentNode.replaceChild(s,t);p=s}}return p}function E(k,i,j){var l=Y("param");l.setAttribute("name",i);l.setAttribute("value",j);k.appendChild(l)}function c(i){return g.getElementById(i)}function Y(i){return g.createElement(i)}function O(k){var j=a.pv,i=k.split(".");i[0]=parseInt(i[0],10);i[1]=parseInt(i[1],10);i[2]=parseInt(i[2],10);return(j[0]>i[0]||(j[0]==i[0]&&j[1]>i[1])||(j[0]==i[0]&&j[1]==i[1]&&j[2]>=i[2]))?true:false}function A(m,j){if(a.ie&&a.mac){return}var l=g.getElementsByTagName("head")[0],k=Y("style");k.setAttribute("type","text/css");k.setAttribute("media","screen");if(!(a.ie&&a.win)&&typeof g.createTextNode!=Z){k.appendChild(g.createTextNode(m+" {"+j+"}"))}l.appendChild(k);if(a.ie&&a.win&&typeof g.styleSheets!=Z&&g.styleSheets.length>0){var i=g.styleSheets[g.styleSheets.length-1];if(typeof i.addRule==P){i.addRule(m,j)}}}function X(k,i){var j=i?"visible":"hidden";if(S){c(k).style.visibility=j}else{A("#"+k,"visibility:"+j)}}return{registerObject:function(l,i,k){if(!a.w3cdom||!l||!i){return}var j={};j.id=l;j.swfVersion=i;j.expressInstall=k?k:false;H[H.length]=j;X(l,false)},getObjectById:function(l){var i=null;if(a.w3cdom&&S){var j=c(l);if(j){var k=j.getElementsByTagName(P)[0];if(!k||(k&&typeof j.SetVariable!=Z)){i=j}else{if(typeof k.SetVariable!=Z){i=k}}}}return i},embedSWF:function(n,u,r,t,j,m,k,p,s){if(!a.w3cdom||!n||!u||!r||!t||!j){return}r+="";t+="";if(O(j)){X(u,false);var q=(typeof s==P)?s:{};q.data=n;q.width=r;q.height=t;var o=(typeof p==P)?p:{};if(typeof k==P){for(var l in k){if(k[l]!=Object.prototype[l]){if(typeof o.flashvars!=Z){o.flashvars+="&"+l+"="+k[l]}else{o.flashvars=l+"="+k[l]}}}}J(function(){R(q,o,u);if(q.id==u){X(u,true)}})}else{if(m&&!C&&O("6.0.65")&&(a.win||a.mac)){X(u,false);J(function(){var i={};i.id=i.altContentId=u;i.width=r;i.height=t;i.expressInstall=m;D(i)})}}},getFlashPlayerVersion:function(){return{major:a.pv[0],minor:a.pv[1],release:a.pv[2]}},hasFlashPlayerVersion:O,createSWF:function(k,j,i){if(a.w3cdom&&S){return R(k,j,i)}else{return undefined}},createCSS:function(j,i){if(a.w3cdom){A(j,i)}},addDomLoadEvent:J,addLoadEvent:M,getQueryParamValue:function(m){var l=g.location.search||g.location.hash;if(m==null){return l}if(l){var k=l.substring(1).split("&");for(var j=0;j<k.length;j++){if(k[j].substring(0,k[j].indexOf("="))==m){return k[j].substring((k[j].indexOf("=")+1))}}}return""},expressInstallCallback:function(){if(C&&L){var i=c(K);if(i){i.parentNode.replaceChild(L,i);if(T){X(T,true);if(a.ie&&a.win){L.style.display="block"}}L=null;T=null;C=false}}}}}();if(typeof(bobj)=="undefined"){bobj={}}if(typeof(bobj.crv)=="undefined"){bobj.crv={}}if(typeof(bobj.crv.params)=="undefined"){bobj.crv.params={}}bobj.crv.params.FlexParameterBridge={_swfID:[],_swf:[],_cb:[],_isRTL:false,_isInitializing:undefined,_promptData:[],setPromptData:function(id,d){this._promptData[id]=d},setMasterCallBack:function(viewerName,callBack){this._cb[viewerName]=callBack},getSWF:function(viewerName){if(this._swf[viewerName]){return this._swf[viewerName]}else{var swf=document.getElementById(this._swfID[viewerName]);this._swf[viewerName]=swf;return swf}},clearSWF:function(viewerName){if(this._swf[viewerName]){this._swfID[viewerName]=null;this._swf[viewerName]=null}},getInstallHTML:function(){return L_bobj_crv_FlashRequired.replace("{0}","<br><a href='http://www.adobe.com/go/getflash/' target='_blank'>")+"</a>"},checkFlashPlayer:function(){return swfobject.hasFlashPlayerVersion("11.0.0")},createSWF:function(viewerName,divID,servletURL,showMinUI,locale,rptSrcKey,isRTL,isInitializing){this._isRTL=isRTL;this._isInitializing=isInitializing;var cb=this._cb[viewerName];if(!cb){return}if(cb.logger){cb.logger("Create the SWF")}if(this.checkFlashPlayer()){var swfBaseURL=cb.getSWFBaseURL();var swfPath=swfBaseURL+"prompting.swf";var swfID=cb.getSWFID();var useSavedData=cb.getUseSavedData?cb.getUseSavedData(viewerName):false;var useOKCancelButtons=cb.getUseOKCancelButtons?cb.getUseOKCancelButtons(viewerName):false;var isDialog=cb.getIsDialog?cb.getIsDialog(viewerName):false;var allowFullScreen=cb.getAllowFullScreen?cb.getAllowFullScreen(viewerName):false;var enforceRequiredPrompt=cb.getEnforceRequiredPrompt?cb.getEnforceRequiredPrompt():true;var shouldAutoResize=cb.getShouldAutoResize?cb.getShouldAutoResize(viewerName):false;var flashvars={eventTarget:viewerName,locale:locale,showMinUI:showMinUI,baseURL:swfBaseURL,servletURL:servletURL,reportSourceKey:rptSrcKey,useSavedData:useSavedData,useOKCancelButtons:useOKCancelButtons,isDialog:isDialog,allowFullScreen:allowFullScreen,enforceRequiredPrompt:enforceRequiredPrompt,shouldAutoResize:shouldAutoResize,isRTL:isRTL};var params={menu:"false",wmode:"window",AllowScriptAccess:"always"};var attributes={id:swfID,name:swfID,style:"z-index:"+cb.getZIndex()};if(cb.processingDelayedShow){cb.processingDelayedShow("hidden",divID)}var h=cb.getSWFHeight?cb.getSWFHeight(viewerName)+"":"600";var w=cb.getSWFWidth?cb.getSWFWidth(viewerName)+"":"800";swfobject.embedSWF(swfPath,divID,w,h,"11.0.0","",flashvars,params,attributes);this._swfID[viewerName]=swfID;if(cb.processingDelayedShow){cb.processingDelayedShow()}this.resize(viewerName,1,1,false);this.move(viewerName,1,1)}else{document.getElementById(divID).innerHTML="<p>"+cb.getInstallHTML()+"</p>"}},initViewer:function(viewerName){this._isInitializing=false;this.init(viewerName)},init:function(viewerName){if(!viewerName){return}var cb=this._cb[viewerName];var swf=this.getSWF(viewerName);if(!swf||!cb){return}if(cb.logger){cb.logger("Init the SWF")}if(swf.setIsInitializing){swf.setIsInitializing(this._isInitializing)}if(swf.setShowMinUI&&cb.getShowMinUI){swf.setShowMinUI(cb.getShowMinUI(viewerName))}if(swf.setUseSavedData&&cb.getUseSavedData){swf.setUseSavedData(cb.getUseSavedData(viewerName))}if(swf.setUseOKCancelButtons&&cb.getUseOKCancelButtons){swf.setUseOKCancelButtons(cb.getUseOKCancelButtons(viewerName))}if(swf.setAllowFullScreen&&cb.getAllowFullScreen){swf.setAllowFullScreen(cb.getAllowFullScreen(viewerName))}if(swf.setReportStateInfo&&cb.getReportStateInfo){swf.setReportStateInfo(cb.getReportStateInfo(viewerName))}if(swf.setPromptData){if(cb.getPromptData&&cb.getPromptData(viewerName)){swf.setPromptData(cb.getPromptData(viewerName))}else{swf.setPromptData(this._promptData[viewerName])}}if(cb.getShouldAutoResize&&cb.getShouldAutoResize(viewerName)){if(this._isInitializing==false){this.resize(viewerName,1,1,false);this.move(viewerName,1,1)}}else{if(cb.getSWFHeight&&cb.getSWFWidth){this.resize(viewerName,cb.getSWFHeight(viewerName),cb.getSWFWidth(viewerName),true)}}},closeDialog:function(viewerName){var cb=this._cb[viewerName];if(cb&&cb.closeDialog){cb.closeDialog(viewerName)}},resize:function(viewerName,height,width,shouldCenter,fitToScreen){var swf=this.getSWF(viewerName);var cb=this._cb[viewerName];if(swf&&cb){cb.logger("Resizing the SWF h:"+height+" w:"+width);if(cb.getScreenHeight&&cb.getScreenWidth){var screenHeight=cb.getScreenHeight(viewerName);var screenWidth=cb.getScreenWidth(viewerName);var p=MochiKit.Style.getElementPosition(swf.parentNode);if(width>screenWidth){width=screenWidth}if(!shouldCenter&&!fitToScreen){if(this._isRTL){var widthInc=width-swf.parentNode.offsetWidth;var x=p.x-widthInc;var vX=0;if(getLayer){var l=getLayer(viewerName);if(l){vX=l.offsetLeft}}if(x<vX){width+=(x-vX);x=vX}if(x!=p.x){swf.parentNode.style.left=x+"px"}}else{if((p.x>=0)&&((p.x+width)>=screenWidth)){width=screenWidth-p.x}}}if((p.y>=0)&&((p.y+height)>=screenHeight)&&!shouldCenter){height=screenHeight-p.y}else{if(height>screenHeight){height=screenHeight}}if(height<0){height=1}}if(shouldCenter){this.move(viewerName,((screenWidth-width)/2),((screenHeight-height)/2))}if(swf.setWidth&&swf.setHeight){swf.setWidth(width);swf.setHeight(height)}swf.style.width=width+"px";swf.style.height=height+"px";cb.setVisibility(viewerName);swf._isMaximized=false;if(cb.resize){cb.resize()}}},fitScreen:function(viewerName){var swf=this.getSWF(viewerName);var cb=this._cb[viewerName];if(swf&&cb&&cb.getScreenHeight&&cb.getScreenWidth&&swf.setHeight&&swf.setWidth){cb.logger("Fitting SWF to the screen");var h=cb.getScreenHeight(viewerName);var w=cb.getScreenWidth(viewerName);this.move(viewerName,0,0);this.resize(viewerName,h,w,false,true);swf._isMaximized=true}},startDrag:function(viewerName){var cb=this._cb[viewerName];if(cb&&cb.startDrag){cb.startDrag(viewerName)}},stopDrag:function(viewerName){var cb=this._cb[viewerName];if(cb&&cb.stopDrag){cb.stopDrag(viewerName)}},drag:function(viewerName,x,y){var cb=this._cb[viewerName];if(cb&&cb.drag){cb.drag(viewerName,x,y)}},move:function(viewerName,x,y){var cb=this._cb[viewerName];if(cb&&cb.move){cb.move(viewerName,x,y)}},setParamValues:function(viewerName,paramData){var cb=this._cb[viewerName];if(cb&&cb.setParamValues){cb.setParamValues(viewerName,paramData)}},logon:function(viewerName,logonData){var cb=this._cb[viewerName];if(cb&&cb.logon){cb.logon(viewerName,logonData)}},setReportStateInfo:function(viewerName,rsInfo){var cb=this._cb[viewerName];if(cb&&cb.setReportStateInfo){cb.setReportStateInfo(viewerName,rsInfo)}},sendAsyncRequest:function(viewerName,args){var cb=this._cb[viewerName];if(cb&&cb.sendAsyncRequest){cb.sendAsyncRequest(viewerName,args)}},handleAsyncResponse:function(viewerName,args){var swf=this.getSWF(viewerName);if(swf&&swf.handleAsyncResponse){swf.handleAsyncResponse(args)}},readyToShow:function(viewerName){var cb=this._cb[viewerName];if(cb&&cb.readyToShow){cb.readyToShow(viewerName)}this._isInitializing=false}};if(typeof bobj=="undefined"){bobj={}}if(typeof bobj.constants=="undefined"){bobj.constants={modalLayerIndex:1000}}bobj.uniqueId=function(){return"bobjid_"+(++bobj.uniqueId._count)};if(typeof bobj.uniqueId._count=="undefined"){bobj.uniqueId._count=new Date().getTime()}bobj.updateIf=function(test,self,obj){if(self===null){self={}}for(var i=1,len=arguments.length;i<len;i++){var o=arguments[i];if(typeof(o)!="undefined"&&o!==null){for(var k in o){if(test(self,obj,k)){self[k]=o[k]}}}}return self};bobj.fillIn=function(self,obj){var test=function(self,obj,k){return(typeof(self[k])=="undefined")};bobj.updateIf(test,self,obj)};bobj.isObject=function(obj){return(obj&&typeof obj=="object")};bobj.isArray=function(obj){if(bobj.isObject(obj)){try{return obj.constructor==Array}catch(e){return false}}return false};bobj.isString=function(obj){return(typeof(obj)=="string")};bobj.isNumber=function(obj){return typeof(obj)=="number"&&isFinite(obj)};bobj.isBoolean=function(obj){return typeof obj=="boolean"};bobj.isFunction=function(obj){return typeof(obj)=="function"};bobj.isBorderBoxModel=function(){if(typeof bobj.isBorderBoxModel._cachedValue=="undefined"){if(document.body){var box=document.createElement("div");box.style.width="10px";box.style.padding="1px";box.style.position="absolute";box.style.visibility="hidden";document.body.appendChild(box);bobj.isBorderBoxModel._cachedValue=(box.offsetWidth==10);document.body.removeChild(box)}else{return _ie&&bobj.isQuirksMode()}}return bobj.isBorderBoxModel._cachedValue};bobj.isQuirksMode=function(){return(document.compatMode!="CSS1Compat")};bobj.isValidHex=function(color){var regexp=/^(#)([0-9a-fA-F]{6})$/;return regexp.test(color)};bobj.setVisualStyle=function(element,visualStyle){if(element===null||visualStyle===null){return}var elemStyle=element.style;if(visualStyle.className){element.className=visualStyle.className}MochiKit.Iter.forEach(["background","borderWidth","borderStyle","borderColor","fontFamily","fontStyle","fontSize","fontWeight","textDecoration","color","width","height","left","top"],function(styleName){if(visualStyle[styleName]){elemStyle[styleName]=visualStyle[styleName]}})};bobj.setOuterSize=function(node,w,h,excludeMargins){var origStyle=null;var nodeStyle=node.style;if(nodeStyle.display=="none"){origStyle={visibility:nodeStyle.visibility,position:nodeStyle.position,display:"none"};nodeStyle.visibility="hidden";nodeStyle.position="absolute";nodeStyle.display=""}function pixels(selector){var value=MochiKit.DOM.getStyle(node,selector);if(bobj.isString(value)&&value.substring(value.length-2=="px")){return(parseInt(value,10)||0)}return 0}if(bobj.isNumber(w)){if(!bobj.isBorderBoxModel()){w-=pixels("border-left-width");w-=pixels("border-right-width");w-=pixels("padding-left");w-=pixels("padding-right");if(excludeMargins){w-=pixels("margin-left");w-=pixels("margin-right")}}nodeStyle.width=Math.max(0,w)+"px"}if(bobj.isNumber(h)){if(!bobj.isBorderBoxModel()){if(excludeMargins){h-=pixels("margin-top");h-=pixels("margin-bottom")}h-=pixels("border-top-width");h-=pixels("border-bottom-width");h-=pixels("padding-top");h-=pixels("padding-bottom")}nodeStyle.height=Math.max(0,h)+"px"}if(origStyle){nodeStyle.display=origStyle.display;nodeStyle.position=origStyle.position;nodeStyle.visibility=origStyle.visibility}};bobj.getContainer=function(child){if(child&&child.layer){return child.layer.parentNode}return null};bobj.checkParent=function(elem,parentTagName){var foundParent=false;if(elem&&parentTagName){parentTagName=parentTagName.toUpperCase();var parent=elem.parentNode;while(parent){if(parent.tagName==parentTagName){foundParent=true;break}parent=parent.parentNode}}return foundParent};bobj.isParentOf=function(child,parent){try{if(!parent||!child){return false}else{if(child.parentNode==parent){return true}else{if(child.parentNode==child){return false}else{return arguments.callee(child.parentNode,parent)}}}}catch(e){return false}};bobj.getEventTarget=function(e){return e.target||e.srcElement};bobj.slice=function(arrayLike,begin,end){if(bobj.isArray(arrayLike)){return arrayLike.slice(begin,end)}else{if(MochiKit.Base.isArrayLike(arrayLike)){var retArray=[];var endIdx=arrayLike.length;if(bobj.isNumber(end)&&end<endIdx){endIdx=end}begin=Math.max(begin,0);for(var i=begin;i<endIdx;++i){retArray.push(arrayLike[i])}return retArray}}return null};bobj.extractRange=function(list,start,end){if(list&&bobj.isNumber(start)){if(!bobj.isNumber(end)||end>list.length){end=list.length}start=Math.max(0,start);if(start<end){var s1=0,e1=start;var s2=end,e2=list.length;if(list.substring){return(list.substring(s1,e1)+list.substring(s2,e2))}else{return bobj.slice(list,s1,e1).concat(bobj.slice(list,s2,e2))}}}return list};bobj.unitValue=function(val,unit){if(bobj.isNumber(val)){return val+(unit||"px")}return val};bobj.evalInWindow=function(expression){if(window.execScript){return window.execScript(expression)}else{return MochiKit.Base.bind(eval,window,expression).call()}};bobj.evalScript=function(scriptText){eval(scriptText)};bobj.loadJSResourceAndExecCallBack=function(resource,callback){if(!resource||!callback){return}if(!resource.isLoaded){bobj.crv.AsyncTransporter.getInstance().get(bobj.crvUri(resource.path),null,function(response){resource.isLoaded=true;if(resource.isEvalOnWindow){bobj.evalInWindow(response.responseText)}else{bobj.evalScript(response.responseText)}callback.apply()},null,{Accept:"application/x-javascript, text/javascript"})}else{setTimeout(function(){callback.apply()},0)}};bobj.trimLeft=function(str){str=str||"";return str.replace(/^\s+/g,"")};bobj.trimRight=function(str){str=str||"";return str.replace(/\s+$/g,"")};bobj.trim=function(str){return bobj.trimLeft(bobj.trimRight(str))};bobj.equals=function(obj1,obj2){if(typeof(obj1)!=typeof(obj2)){return false}if(bobj.isObject(obj1)){var same=true;for(var prop in obj1){same=same&&bobj.equals(obj1[prop],obj2[prop])}return same}else{return obj1==obj2}};bobj.includeLink=function(href){var head=document.getElementsByTagName("head")[0];var body=document.body;var link=document.createElement("link");link.setAttribute("rel","stylesheet");link.setAttribute("type","text/css");link.setAttribute("href",href);if(head){head.appendChild(link)}else{if(body){body.appendChild(link)}}};bobj.includeCSSLinksAndExecuteCallback=function(hrefArray,callback){if(hrefArray==null||hrefArray.length<1){callback.apply();return}var cb=function(){var me=arguments.callee;var callback=me.callback;me.hrefCount--;if(me.hrefCount==0){callback.apply()}};cb.hrefCount=hrefArray.length;cb.callback=callback;for(var i=0,len=hrefArray.length;i<len;i++){bobj.includeCSSLinkAndExecuteCallback(hrefArray[i],cb)}};bobj.includeCSSLinkAndExecuteCallback=function(href,callback){var cssLinkId=encodeURIComponent(href);if(getLayer(cssLinkId)){callback.apply();return}bobj.crv.AsyncTransporter.getInstance().get(href,null,function(response){bobj.addStyleSheet(response.responseText,cssLinkId);callback.apply()},function(response){callback.apply()},{Accept:"text/css"})};bobj.addStyleSheet=function(stylesheet,id){var style=document.createElement("style");style.setAttribute("type","text/css");if(id){style.setAttribute("id",id)}if(style.styleSheet){style.styleSheet.cssText=stylesheet}else{style.appendChild(document.createTextNode(stylesheet))}var head=document.getElementsByTagName("head");var body=document.getElementsByTagName("body");if(head&&head[0]){head[0].appendChild(style)}else{if(body&&body[0]){body[0].appendChild(style)}}};bobj.removeAllChildElements=function(elem){if(elem){while(elem.lastChild){elem.removeChild(elem.lastChild)}}};bobj.getValueHashCode=function(valueType,value){var Types=bobj.crv.params.DataTypes;switch(valueType){case Types.BOOLEAN:case Types.CURRENCY:case Types.NUMBER:case Types.MEMBER:case Types.STRING:return""+value;case Types.TIME:return""+value.h+","+value.min+","+value.s+","+value.ms;case Types.DATE:return""+value.y+","+value.m+","+value.d;case Types.DATE_TIME:return""+value.y+","+value.m+","+value.d+","+value.h+","+value.min+","+value.s+","+value.ms}};bobj.getElementByIdOrName=function(idOrName){if(!idOrName){return null}var elem=document.getElementById(idOrName);if(elem){return elem}var elems=document.getElementsByName(idOrName);if(elems&&elems.length>0){return elems[0]}return null};bobj.getRect=function(top,right,bottom,left){return"rect("+top+"px, "+right+"px,"+bottom+"px,"+left+"px)"};bobj.getBodyScrollDimension=function(){var w=0;var h=0;var bodyTags=document.getElementsByTagName("Body");if(bodyTags&&bodyTags[0]){w=bodyTags[0].scrollWidth;h=bodyTags[0].scrollHeight}return{w:w,h:h}};bobj.disableTabbingKey=function(layer,dis){if(layer){layer.tabIndex=dis?-1:0}};bobj.getStringWidth=function(string,fontFamily,fontSize){if(document.body){var span=document.createElement("span");span.appendChild(document.createTextNode(string));span.style.position="absolute";span.style.visibility="hidden";if(fontFamily){span.style.fontFamily=fontFamily}if(fontSize){span.style.fontSize=fontSize}document.body.appendChild(span);var width=span.offsetWidth;document.body.removeChild(span);return width}return 0};bobj.deleteWidget=function(widget){if(widget&&widget.widx){if(widget.layer){widget.layer.click=null;widget.layer.onmouseup=null;widget.layer.onmousedown=null;widget.layer.onmouseover=null;widget.layer.onmousemove=null;widget.layer.onmouseout=null;widget.layer.onchange=null;widget.layer.onfocus=null;widget.layer.onkeydown=null;widget.layer.onkeyup=null;widget.layer.onkeypress=null;var parent=widget.layer.parentNode;if(parent){parent.removeChild(widget.layer)}delete widget.layer}delete widget.css;delete _widgets[widget.widx];_widgets[widget.widx]=null;delete widget}};bobj.cloneArray=function(array){return array.slice()};bobj.getExecuteDOMCallbackHTML=function(widgetID,fnName){return"return bobj.executeDOMCallback("+widgetID+", '"+fnName+"', event)"};bobj.getExecuteDOMCallback=function(widgetID,fnName){return function(ev){return bobj.executeDOMCallback(widgetID,fnName,ev)}};bobj.executeDOMCallback=function(widgetID,fnName,ev){if(_widgets[widgetID]!=null){var widget=_widgets[widgetID];if(widget[fnName]!=null){var cb=widget[fnName];return cb.apply(widget,[ev])}}};bobj.bindFunctionToObject=function(func,obj){return function(){return func.apply(obj,arguments)}};bobj.extendClass=function(object,ObjectClassDefinition,superClass){MochiKit.Base.update(object,ObjectClassDefinition);object.superClass={};for(var funcName in superClass){object.superClass[funcName]=bobj.bindFunctionToObject(superClass[funcName],object)}};bobj.displayElementWithAnimation=function(element){if(element!=null){MochiKit.DOM.setOpacity(element,0);MochiKit.Style.setDisplayForElement("block",element);new MochiKit.Visual.appear(element,{duration:0.5})}};bobj.getHiddenElementDimensions=function(element){var size={w:0,h:0};if(element){var body=document.body;var clonedNode=element.cloneNode(true);var nodeStyle=clonedNode.style;nodeStyle.display="";nodeStyle.visibility="hidden";nodeStyle.width="";nodeStyle.height="";nodeStyle.position="absolute";nodeStyle.left="-1000px";nodeStyle.top="-1000px";body.appendChild(clonedNode);size={w:clonedNode.offsetWidth,h:clonedNode.offsetHeight};body.removeChild(clonedNode)}return size};bobj.hasPDFReaderWithJSFunctionality=function(){if(window.ActiveXObject){try{var pdfReader=new ActiveXObject("AcroPDF.PDF.1");if(pdfReader){return true}}catch(e){}}else{if(navigator.plugins){var plugins=navigator.plugins;for(var i=0,len=plugins.length;i<len;i++){if(plugins[i].description.indexOf("Adobe PDF Plug-In")!=-1){return true}}}}return false};bobj.connectDOMEvent=function(domE,eventName,listener){if(domE.addEventListener){domE.addEventListener(eventName.substr(2),listener,false)}else{if(domE.attachEvent){domE.attachEvent(eventName,listener)}}};bobj.disconnectDOMEvent=function(domE,eventName,listener){if(domE.removeEventListener){domE.removeEventListener(eventName.substr(2),listener,false)}else{if(domE.detachEvent){domE.detachEvent(eventName,listener)}}};bobj.connectMouseWheelListener=function(elem,callback){if(elem.addEventListener){elem.addEventListener("DOMMouseScroll",callback,false);elem.addEventListener("mousewheel",callback,false)}else{elem.attachEvent("onmousewheel",callback)}};bobj.disconnectMouseWheelListener=function(elem,callback){if(elem.removeEventListener){elem.removeEventListener("DOMMouseScroll",callback,false);elem.removeEventListener("mousewheel",callback,false)}else{elem.detachEvent("onmousewheel",callback)}};bobj.logToConsole=function(msg){if(bobj.crv.config.isDebug&&window.console&&window.console.log){window.console.log(msg)}};bobj.getActiveElement=function(){try{return document.activeElement}catch(e){}return null};if(typeof bobj=="undefined"){bobj={}}bobj.encodeUTF8=function(string){var arr=[];var strLen=string.length;for(var i=0;i<strLen;i++){var c=string.charCodeAt(i);if(c<128){arr.push(c)}else{if(c<2048){arr.push((c>>6)|192);arr.push(c&63|128)}else{if(c<55296||c>=57344){arr.push((c>>12)|224);arr.push((c>>6)&63|128);arr.push(c&63|128)}else{if(c<56320){var c2=string.charCodeAt(i+1);if(isNaN(c2)||c2<56320||c2>=57344){arr.push(239,191,189);continue}i++;val=((c&1023)<<10)|(c2&1023);val+=65536;arr.push((val>>18)|240);arr.push((val>>12)&63|128);arr.push((val>>6)&63|128);arr.push(val&63|128)}else{arr.push(239,191,189)}}}}}return arr};bobj.encodeBASE64=function(byteArray){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var arr=[];var c1,c2,c3,e1,e2,e3,e4;var i=0,arrLen=byteArray.length;while(i<arrLen){c1=byteArray[i++];c2=byteArray[i++];c3=byteArray[i++];e1=c1>>2;e2=((c1&3)<<4)|(c2>>4);e3=((c2&15)<<2)|(c3>>6);e4=c3&63;if(isNaN(c2)){e3=e4=64}else{if(isNaN(c3)){e4=64}}arr.push(keyStr.charAt(e1));arr.push(keyStr.charAt(e2));arr.push(keyStr.charAt(e3));arr.push(keyStr.charAt(e4))}return arr.join("")};if(typeof(bobj.html)=="undefined"){bobj.html={}}bobj.html.openTag=function(tag,atts){var html="<"+tag;for(var i in atts){html+=" "+i+'="';var value=atts[i];if(bobj.isArray(value)){value=value.join(" ")}else{if(bobj.isObject(value)){var stringValue="";for(var k in value){stringValue+=k+":"+value[k]+";"}value=stringValue}}html+=value+'"'}return html+">"};bobj.html.closeTag=function(tag){return"</"+tag+">"};bobj.html.createHtml=function(tag,atts,innerHtml){var html=bobj.html.openTag(tag,atts);for(var i=2;i<arguments.length;++i){html+=arguments[i]}html+=bobj.html.closeTag(tag);return html};MochiKit.Iter.forEach(["table","ul","ol","li","td","tr","tbody","thead","tfoot","th","input","span","a","div","img","button","tt","pre","h1","h2","h3","br","label","textarea","form","p","select","option","optgroup","legend","fieldset","strong","canvas","iframe","script","b"],function(tagName){bobj.html[tagName.toUpperCase()]=MochiKit.Base.partial(bobj.html.createHtml,tagName)});bobj.html.extractScripts=function(html){var regexpScript=/(?:<script([^>]*)\/>|<script([^>]*)>([\s\S]*?)<\/script>)/i;var regexpSrc=/src=\"([^\"]*)\"/i;var scripts=[];var match=null;while(match=regexpScript.exec(html)){var script={src:null,text:null};var attributes=match[1]||match[2];if(attributes=regexpSrc.exec(attributes)){script.src=attributes[1]}if(match[3]){script.text=match[3]}scripts.push(script);html=bobj.extractRange(html,match.index,match.index+match[0].length)}return{scripts:scripts,html:html}};bobj.html.extractHtml=function(html){var extScripts=bobj.html.extractScripts(html);var extLinks=bobj.html.extractLinks(extScripts.html);var extStyles=bobj.html.extractStyles(extLinks.html);return{scripts:extScripts.scripts,html:extStyles.html,links:extLinks.links,styles:extStyles.styles}};bobj.html.extractLinks=function(html){var regexpLink=/<link([^>]*)>/i;var regexpHref=/href=\"([^\"]*)\"/i;var links=[];var match=null;while(match=regexpLink.exec(html)){var href=regexpHref.exec(match);if(href&&href.length>0){links.push(href[1])}html=bobj.extractRange(html,match.index,match.index+match[0].length)}return{links:links,html:html}};bobj.html.extractStyles=function(html){var regexpStyle=/<style([^>]*)>([\s\S]*?)<\/style>/i;var regexpType=/type=\"([^\"]*)\"/i;var regexpMedia=/media=\"([^\"]*)\"/i;var styles=[];var match=null;while(match=regexpStyle.exec(html)){var style={media:null,type:null,text:match[2]};var matchType=regexpType.exec(match[1]);if(matchType){style.type=matchType[1]}var matchMedia=regexpMedia.exec(match[1]);if(matchMedia){style.media=matchMedia[1]}styles.push(style);html=bobj.extractRange(html,match.index,match.index+match[0].length)}return{styles:styles,html:html}};bobj.crv.allInOne=(function(){var o=new Object();o.uri=bobj.crvUri("images/allInOne"+(bobj.crv.config.isRTL?"_rtl":"")+".gif");o.css="crvAllInOne"+(bobj.crv.config.isRTL?"RTL":"");var iconHeight22=22;var offset=0;offset+=3;offset=o.toolbarBackDy=offset;offset=o.toolbarForwardDy=offset+iconHeight22;offset=o.toolbarExportDy=offset+iconHeight22;offset=o.toolbarPrintDy=offset+iconHeight22;offset=o.toolbarRefreshDy=offset+iconHeight22;offset=o.toolbarSearchDy=offset+16;o.toolbarSearchDy+=3;offset=o.toolbarUpDy=offset+iconHeight22;offset-=3;offset=o.groupTreeToggleDy=offset+iconHeight22;offset=o.paramPanelToggleDy=offset+iconHeight22;offset=o.searchPanelToggleDy=offset+24;offset=o.toolbarPrevPageDy=offset+iconHeight22;offset=o.toolbarNextPageDy=offset+20;offset=o.paramRunDy=offset+20;offset=o.paramDataFetchingDy=offset+22;offset=o.closePanelDy=offset+16;offset=o.openParameterArrowDy=offset+7;offset=o.plusDy=offset+15;offset=o.minusDy=offset+12;offset=o.undoDy=offset+12;offset=o.cancelDy=offset+16;offset=o.scrollGrabHDy=offset+16;offset=o.scrollGrabVDy=offset+17;offset=o.scrollThumbHDy=offset+10;offset=o.scrollThumbVDy=offset+17;offset=o.scrollLeftDy=offset+4;offset=o.scrollRightDy=offset+34;offset=o.scrollUpDy=offset+34;offset=o.scrollDownDy=offset+17;offset=o.menuArrowsDy=offset+16;offset=o.breadcrumbReportDy=offset+8;offset=o.breadcrumbSubreportDy=offset+16;offset=o.breadcrumbDrillDy=offset+16;return o})();bobj.crv.setAllClasses=function(widget,prefix){if(widget&&widget.setClasses){if(prefix){widget.setClasses(prefix+"_default",prefix+"_depressed",prefix+"_hover",prefix+"_depressed")}else{widget.setClasses(null,null,null,null)}}};bobj.crv.newToolbar=function(kwArgs){var UPDATE=MochiKit.Base.update;kwArgs=UPDATE({id:bobj.uniqueId(),visualStyle:{className:null,backgroundColor:null,borderWidth:null,borderStyle:null,borderColor:null,fontFamily:null,fontWeight:null,textDecoration:null,color:null,width:null,height:null,fontStyle:null,fontSize:null}},kwArgs);var o=newPaletteContainerWidget(kwArgs.id);o.margin=0;bobj.fillIn(o,kwArgs);o._rightZoneWgts=[];o.widgetType="Toolbar";o.initOld=o.init;o.setDisplayOld=o.setDisplay;UPDATE(o,bobj.crv.Toolbar);o.palette=newPaletteWidget(o.id+"_palette");o.add(o.palette);return o};bobj.crv.Toolbar={addChild:function(widget){if(!widget){return}var SIGNAL=MochiKit.Signal.signal;var PARTIAL=MochiKit.Base.partial;var BIND=MochiKit.Base.bind;switch(widget.widgetType){case"ToolbarMenu":this.menu=widget;if(widget.exportMenuItem){widget.exportMenuItem.cb=PARTIAL(SIGNAL,this,"export")}if(widget.printMenuItem){widget.printMenuItem.cb=PARTIAL(SIGNAL,this,"print")}break;case"ToolbarButtonGroup":this.group=widget;if(widget.printButton){widget.printButton.clickCB=PARTIAL(SIGNAL,this,"print",widget.printButton.closeCB)}if(widget.exportButton){widget.exportButton.clickCB=PARTIAL(SIGNAL,this,"export",widget.exportButton.closeCB)}if(widget.refreshButton){widget.refreshButton.clickCB=PARTIAL(SIGNAL,this,"refresh")}if(widget.drillUpButton){widget.drillUpButton.clickCB=PARTIAL(SIGNAL,this,"drillUp")}break;case"BackNavigationButton":this.backNavigationButton=widget;widget.clickCB=PARTIAL(SIGNAL,this,"selectHistory",-1);break;case"ForwardNavigationButton":this.forwardNavigationButton=widget;widget.clickCB=PARTIAL(SIGNAL,this,"selectHistory",1);break;case"HistoryButton":this.historyButton=widget;MochiKit.Signal.connect(widget,"selectHistory",PARTIAL(SIGNAL,this,"selectHistory"));MochiKit.Signal.connect(widget,"clearHistory",PARTIAL(SIGNAL,this,"clearHistory"));break;case"PrevPageButton":this.prevPageButton=widget;widget.clickCB=PARTIAL(SIGNAL,this,"prevPage");break;case"NextPageButton":this.nextPageButton=widget;widget.clickCB=PARTIAL(SIGNAL,this,"nextPage");break;case"ZoomControl":this.zoomControl=widget;widget.zoomCB=PARTIAL(SIGNAL,this,"zoom");break;case"SelectPageControl":this.selectPageControl=widget;widget.selectPageCB=PARTIAL(SIGNAL,this,"selectPage");MochiKit.Signal.connect(widget,"showError",PARTIAL(SIGNAL,this,"showError"));if(widget.firstPage&&widget.lastPage){widget.firstPage.cb=PARTIAL(SIGNAL,this,"firstPage");widget.lastPage.cb=PARTIAL(SIGNAL,this,"lastPage")}break;default:break}if(widget.layoutAlign=="right"){this._rightZoneWgts.push(widget)}else{this.palette.add(widget)}},focusFirstChild:function(){if(!this.isVisible){return false}var items=this.palette.items;for(var i=0;i<items.length;i++){if(items[i].focus){items[i].focus();return true}}return false},delayedAddChild:function(widget,index,needsSeparator){if(!widget){return}var SIGNAL=MochiKit.Signal.signal;var PARTIAL=MochiKit.Base.partial;switch(widget.widgetType){case"ToolbarMenu":this.menu=widget;if(widget.exportMenuItem){widget.exportMenuItem.cb=PARTIAL(SIGNAL,this,"export")}if(widget.printMenuItem){widget.printMenuItem.cb=PARTIAL(SIGNAL,this,"print")}break;default:break}if(needsSeparator){var separator=bobj.crv.newToolbarSeparator();this.palette.delayedAddChild(separator,index)}this.palette.delayedAddChild(widget,index)},getSearchTextControl:function(){return null},getZoomControl:function(){return this.zoomControl},getSelectPageControl:function(){return this.selectPageControl},getButtonGroup:function(){return this.group},getBackNavigationButton:function(){return this.backNavigationButton},getForwardNavigationButton:function(){return this.forwardNavigationButton},getHistoryButton:function(){return this.historyButton},getNextPageButton:function(){return this.nextPageButton},getPrevPageButton:function(){return this.prevPageButton},init:function(){this.initOld();bobj.setVisualStyle(this.layer,this.visualStyle);this.palette.init();this._updateNavButtons();this.setDisplay(this.isVisible)},setDisplay:function(isDisplay){this.setDisplayOld(isDisplay);MochiKit.Signal.signal(this,"onSetDisplay",isDisplay)},write:function(){this._addRightZone();this.begin();this.palette.write();this.end();document.write(bobj.crv.getInitHTML(this.widx))},beginHTML:function(){var h=bobj.html;return h.openTag("div",{id:this.id,role:"toolbar",style:{width:"100%",height:"28px",overflow:"hidden",margin:this.margin+"px",display:this.isVisible?"block":"none"}})+h.DIV({"class":"crtoolbartop"})+h.DIV({"class":"crtoolbarbottom"})},getHTML:function(){this._addRightZone();return(this.beginHTML()+this.palette.getHTML()+this.endHTML())},getWidth:function(){var itemLayer;var width=0;var items=this.palette.items;for(var i=0,len=items.length;i<len;i++){itemLayer=items[i].layer;if(itemLayer.offsetWidth){width+=itemLayer.offsetWidth}if(itemLayer.offsetLeft){width+=(itemLayer.offsetLeft*2)}}return width},_addRightZone:function(){this.palette.beginRightZone();var w=null;while(w=this._rightZoneWgts.pop()){this.palette.add(w)}delete this._rightZoneWgts},_updateNavButtons:function(){if(this.selectPageControl){var curPg=this.selectPageControl.getCurrentPage();if(this.selectPageControl.firstPage){this.selectPageControl.firstPage.setDisabled(curPg==1)}if(this.prevPageButton){this.prevPageButton.setDisabled(curPg==1)}var numPgsStr=this.selectPageControl.getNumPages()+"";var lastPgKnown=numPgsStr.indexOf("+")==-1;var numPgs=parseInt(numPgsStr,10);var fwdDisabled=lastPgKnown&&numPgs==curPg;if(this.nextPageButton){this.nextPageButton.setDisabled(fwdDisabled)}if(this.selectPageControl.lastPage){this.selectPageControl.lastPage.setDisabled(fwdDisabled)}}},setPageNumber:function(curPage,numPages){if(this.selectPageControl){if(curPage&&numPages){this.selectPageControl.updateState(curPage,numPages)}else{if(curPage){this.selectPageControl.setCurrentPage(curPage)}else{if(numPages){this.selectPageControl.setNumPages(numPages)}}}this._updateNavButtons()}},update:function(update){if(update){for(var childNum in update.children){var child=update.children[childNum];if(child){switch(child.cons){case"bobj.crv.newForwardNavigationButton":if(this.forwardNavigationButton){this.forwardNavigationButton.update(child)}break;case"bobj.crv.newBackNavigationButton":if(this.backNavigationButton){this.backNavigationButton.update(child)}break;case"bobj.crv.newHistoryButton":if(this.historyButton){this.historyButton.update(child)}break;case"bobj.crv.newSelectPageControl":if(this.selectPageControl){this.selectPageControl.update(child);this._updateNavButtons()}break;case"bobj.crv.newZoomControl":if(this.zoomControl){this.zoomControl.update(child)}break;case"bobj.crv.newToolbarButtonGroup":if(this.group){this.group.update(child)}break}}}if(update.args){this.setVisible(update.args.isVisible)}}},setVisible:function(isVisible){this.isVisible=isVisible;this.setDisplay(this.isVisible)},clearHistory:function(){this.forwardNavigationButton.setDisabled(true);this.backNavigationButton.setDisabled(true);this.historyButton.setDisabled(true);this.historyButton.menu.removeAll()},doLayout:function(){if(_ie){this.layer.style.position="relative";this.layer.style.position=""}}};bobj.crv.newToolbarMenu=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId(),icon:null,text:L_bobj_crv_File,tooltip:L_bobj_crv_FileMenu},kwArgs);var o=newSingleIconMenuWidget(kwArgs.id,kwArgs.icon,null,kwArgs.text,kwArgs.tooltip);o.widgetType="ToolbarMenu";o._tbBtnOldInit=o.init;bobj.crv.setAllClasses(o.icon,null);bobj.crv.setAllClasses(o.arrow,null);bobj.crv.setAllClasses(o,"filemenu");o.arrow.resize(13,20);MochiKit.Base.update(o,bobj.crv.ToolbarMenu);return o};bobj.crv.ToolbarMenu={init:function(){this._tbBtnOldInit();bobj.disableTabbingKey(this.icon.layer,true);if(this.getMenu().items.length==0){this.arrow.setDisplay(false);bobj.crv.setAllClasses(this.icon,null);this.icon.clickCB=null}},addChild:function(widget){var menu=this.getMenu();switch(widget.widgetType){case"ExportMenuItem":var icon=bobj.crv.allInOne.uri;var dy=bobj.crv.allInOne.toolbarExportDy;var disDy=dy;this.exportMenuItem=menu.add(widget.id,L_bobj_crv_submitBtnLbl,null,icon,3,dy,widget.disabled,25,disDy,null);break;case"PrintMenuItem":var icon=bobj.crv.allInOne.uri;var dy=bobj.crv.allInOne.toolbarPrintDy;var disDy=dy;this.printMenuItem=menu.add(widget.id,L_bobj_crv_ActiveXPrintDialogTitle,null,icon,3,dy,widget.disabled,25,disDy,null);break;default:bobj.crv.ToolbarMenu.commonAddChild(menu,widget);break}},commonAddChild:function(menu,widget){switch(widget.widgetType){case"Separator":menu.addSeparator();break;case"ScriptMenuItem":var cb=function(){bobj.crv.ToolbarMenuItem.scriptItemCB(widget.callback,widget.args)};var menuitem=menu.add(widget.id,widget.text,cb,widget.icon,widget.dx,widget.dy,widget.disabled,widget.disDx,widget.disDy,widget.alt);if(widget.callback==null){menuitem.setDisabled(true)}break;case"ToolbarSubMenu":var menuitem=menu.add(widget.id,widget.text,null,widget.icon,widget.dx,widget.dy,widget.disabled,widget.disDx,widget.disDy,widget.alt);menuitem.attachSubMenu(widget.submenu);break}}};bobj.crv.newToolbarSubMenu=function(kwArgs){var o=MochiKit.Base.update({id:bobj.uniqueId(),text:null,icon:null,dx:0,dy:0,disabled:false,disDx:0,disDy:0,alt:null},kwArgs);o.submenu=newMenuWidget(o.id);o.widgetType="ToolbarSubMenu";MochiKit.Base.update(o,bobj.crv.ToolbarSubMenu);return o};bobj.crv.ToolbarSubMenu={addChild:function(widget){bobj.crv.ToolbarMenu.commonAddChild(this.submenu,widget)}};bobj.crv.newToolbarMenuItem=function(kwArgs){var o=MochiKit.Base.update({id:bobj.uniqueId(),widgetType:null,text:null,icon:null,dx:0,dy:0,disabled:false,disDx:0,disDy:0,alt:null},kwArgs);MochiKit.Base.update(o,bobj.crv.ToolbarMenuItem);return o};bobj.crv.ToolbarMenuItem={scriptItemCB:function(callback,args){if(callback){var f=eval(callback);if(typeof f=="function"){if(args){f.call(null,args)}else{f.call(null)}}}}};bobj.crv.newToolbarButton=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId(),icon:null,tooltip:null,text:null,isDisabled:false,isChecked:false,clickCB:null,width:16,height:16,dx:3,dy:3,disDx:25,disDy:3,isTabEnabled:true},kwArgs);var o=newIconWidget(kwArgs.id,kwArgs.icon,kwArgs.clickCB,kwArgs.text,kwArgs.tooltip,kwArgs.width,kwArgs.height,kwArgs.dx,kwArgs.dy,kwArgs.disDx,kwArgs.disDy,kwArgs.isTabEnabled);if(kwArgs.text){bobj.crv.setAllClasses(o,null)}else{bobj.crv.setAllClasses(o,"button")}o._tbBtnOldInit=o.init;o._tbBtnKwArgs=kwArgs;MochiKit.Base.update(o,bobj.crv.ToolbarButton);return o};bobj.crv.ToolbarButton={init:function(){this._tbBtnOldInit();var kwArgs=this._tbBtnKwArgs;this.setDisabled(kwArgs.isDisabled)},update:function(update){if(update&&bobj.isBoolean(update.args.isDisabled)){this.setDisabled(update.args.isDisabled)}}};bobj.crv.newBackNavigationButton=function(kwArgs){var o=bobj.crv.newToolbarButton(MochiKit.Base.update({icon:bobj.crv.allInOne.uri,tooltip:L_bobj_crv_Back,dx:3,dy:bobj.crv.allInOne.toolbarBackDy,disDx:25,disDy:bobj.crv.allInOne.toolbarBackDy},kwArgs));o.widgetType="BackNavigationButton";return o};bobj.crv.newForwardNavigationButton=function(kwArgs){var o=bobj.crv.newToolbarButton(MochiKit.Base.update({icon:bobj.crv.allInOne.uri,tooltip:L_bobj_crv_Forward,dx:3,dy:bobj.crv.allInOne.toolbarForwardDy,disDx:25,disDy:bobj.crv.allInOne.toolbarForwardDy},kwArgs));o.widgetType="ForwardNavigationButton";return o};bobj.crv.newPrevPageButton=function(kwArgs){var o=bobj.crv.newToolbarButton(MochiKit.Base.update({icon:bobj.crv.allInOne.uri,tooltip:L_bobj_crv_PrevPage,dx:3,dy:bobj.crv.allInOne.toolbarPrevPageDy+3,disDx:25,disDy:bobj.crv.allInOne.toolbarPrevPageDy+3,width:16,height:16},kwArgs));o.widgetType="PrevPageButton";return o};bobj.crv.newNextPageButton=function(kwArgs){var o=bobj.crv.newToolbarButton(MochiKit.Base.update({icon:bobj.crv.allInOne.uri,tooltip:L_bobj_crv_NextPage,dx:3,dy:bobj.crv.allInOne.toolbarNextPageDy+3,disDx:25,disDy:bobj.crv.allInOne.toolbarNextPageDy+3,width:16,height:16},kwArgs));o.widgetType="NextPageButton";return o};bobj.crv.newDrillUpButton=function(kwArgs){var o=bobj.crv.newToolbarButton(MochiKit.Base.update({icon:bobj.crv.allInOne.uri,tooltip:L_bobj_crv_DrillUp,dx:0,dy:bobj.crv.allInOne.toolbarUpDy,disDx:22,disDy:bobj.crv.allInOne.toolbarUpDy},kwArgs));o.widgetType="DrillUpButton";return o};bobj.crv.newRefreshButton=function(kwArgs){var o=bobj.crv.newToolbarButton(MochiKit.Base.update({icon:bobj.crv.allInOne.uri,tooltip:L_bobj_crv_Refresh,dy:bobj.crv.allInOne.toolbarRefreshDy,disDy:bobj.crv.allInOne.toolbarRefreshDy},kwArgs));o.widgetType="RefreshButton";return o};bobj.crv.newExportButton=function(kwArgs){var o=bobj.crv.newToolbarButton(MochiKit.Base.update({icon:bobj.crv.allInOne.uri,tooltip:L_bobj_crv_Export,dy:bobj.crv.allInOne.toolbarExportDy,disDy:bobj.crv.allInOne.toolbarExportDy},kwArgs));o.widgetType="ExportButton";o.closeCB=MochiKit.Base.bind(function(){if(this.focus){this.focus()}},o);return o};bobj.crv.newPrintButton=function(kwArgs){var o=bobj.crv.newToolbarButton(MochiKit.Base.update({icon:bobj.crv.allInOne.uri,tooltip:L_bobj_crv_Print,dy:bobj.crv.allInOne.toolbarPrintDy,disDy:bobj.crv.allInOne.toolbarPrintDy},kwArgs));o.widgetType="PrintButton";o.closeCB=MochiKit.Base.bind(function(){if(this.focus){this.focus()}},o);return o};bobj.crv.newLogoIcon=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId(),icon:bobj.crvUri("images/logo.gif"),link:"http://www.businessobjects.com/ipl/default.asp?destination=ViewerLogoLink&product=crystalreports&version=14%2E0",toolTip:"SAP Crystal Reports"},kwArgs);var o=newIconWidget(kwArgs.id,kwArgs.icon,function(){window.open(kwArgs.link)},null,decodeURIComponent(kwArgs.toolTip),120,20,0,0,0,0,true);bobj.crv.setAllClasses(o,null);o.layoutAlign="right";o.widgetType="LogoIcon";o.getHTML=function(){var h=bobj.html;var o=this;var buttonW=_ie&&_isQuirksMode?o.w+o.border:o.w+o.border-2;var buttonH=_ie&&_isQuirksMode?o.h+o.border:o.h+o.border-2;var tempdiv=h.DIV({id:o.id,"aria-haspopup":o.ariaHasPopUp,style:{width:buttonW,height:buttonH,cursor:(o.clickCB?(!o.acceptClick()?"default":_hand):"default"),overflow:"hidden",role:"button"}},h.IMG({src:this.src,target:"_blank",id:"IconImg_"+o.id,alt:o.alt,style:{"float":"right",border:"0",hspace:"0",vspace:"0",margin:"1px 2px 2px 2px"}}));return tempdiv};return o};bobj.crv.newCatalystIcon=function(kwArgs){var o=newIconWidget(kwArgs.id,bobj.crvUri("images/catalyst.gif"),function(){window.open("http://www.businessobjects.com/ipl/default.asp?destination=DHTMLViewerLandingPage&product=crystalreports&version=14%2E0")},null,L_bobj_crv_CatalystTip,22,22,0,0,0,0,true);bobj.crv.setAllClasses(o,null);o.layoutAlign="right";o.widgetType="CatalystIcon";return o};bobj.crv.newToolbarSeparator=function(){return newPaletteVerticalSepWidget(bobj.uniqueId(),26)};bobj.crv.newZoomControl=function(kwArgs){var UPDATE=MochiKit.Base.update;kwArgs=UPDATE({initialZoom:"100%",id:bobj.uniqueId()},kwArgs);if(bobj.isNumber(kwArgs.initialZoom)){kwArgs.initialZoom=kwArgs.initialZoom+"%"}var o=newTextComboWidget(kwArgs.id,5,L_bobj_crv_Zoom,60,bobj.crv.ZoomControl._zoomChangeCB,null,null,null);o.arrow.resize(13,20);bobj.crv.setAllClasses(o.arrow,"button");o.menu.setAccelEnabled(false);var zoomList=["400%","300%","200%","150%","125%","100%","75%","50%","25%"];for(var i=0,len=zoomList.length;i<len;++i){var zoomLevel=zoomList[i];o.add(zoomLevel,zoomLevel,(zoomLevel==kwArgs.initialZoom))}o.text.setValue(kwArgs.initialZoom);o.zoomCB=null;o.widgetType="ZoomControl";o.initOld=o.init;o._initZoom=kwArgs.initialZoom;UPDATE(o,bobj.crv.ZoomControl);return o};bobj.crv.ZoomControl={init:function(){this.initOld();this.setZoom(this._initZoom)},update:function(update){if(update.cons=="bobj.crv.newZoomControl"){this.setZoom(update.args.initialZoom)}},setZoom:function(lvl){var zoomVal=parseInt(lvl,10);if(bobj.isNumber(zoomVal)){zoomVal+="%";this.valueSelect(zoomVal);var si=this.selectedItem;if(si&&si.val!=zoomVal){si.check(false);this.selectedItem=null}this._lastValue=zoomVal;return true}return false},_zoomChangeCB:function(){var zoomLvl=parseInt(this.text.getValue(),10);if(bobj.isNumber(zoomLvl)){if(zoomLvl<10){zoomLvl=10}else{if(zoomLvl>400){zoomLvl=400}}}if(!this.setZoom(zoomLvl)){this.setZoom(this._lastValue)}else{if(this.zoomCB){this.zoomCB(zoomLvl)}}}};bobj.crv.newSelectPageControl=function(kwArgs){var UPDATE=MochiKit.Base.update;kwArgs=UPDATE({id:bobj.uniqueId(),showMenu:true},kwArgs);var textNWidth=bobj.crv.SelectPageControl.getTextAndWidth(kwArgs.curPage,kwArgs.numPages);var o=newTextComboWidget(kwArgs.id,75,L_bobj_crv_PageNav,textNWidth.width+13,null,null,null,null,"navigation",L_bobj_crv_Page);o.curPage=kwArgs.curPage;o.numPages=kwArgs.numPages;if(kwArgs.showMenu){o.addMenuItem(bobj.uniqueId(),L_bobj_crv_FirstPage,null,null,0,0,false,0,0);o.addMenuItem(bobj.uniqueId(),L_bobj_crv_LastPage,null,null,0,0,false,0,0);o.firstPage=o.menu.items[0];o.lastPage=o.menu.items[1];o.arrow.resize(13,20);bobj.crv.setAllClasses(o.arrow,"button");o.menu.setAccelEnabled(false)}else{o.setMenuDisabled(true)}o.text.oldSetValue=o.text.setValue;o.text.setValue=function(newText,newWidth){this.oldSetValue(newText);if(newWidth&&o.text.layer){this.resize(newWidth,null)}};o.text.focusCB=function(){this.setValue(o.curPage);var l=this.inputNode;if(l){l.select()}};o.text.blurCB=function(){var textNWidth=o.getTextAndWidth(o.curPage,o.numPages);this.setValue(textNWidth.text)};o.text.enterCB=function(){if(o.selectPageCB){var value=parseInt(this.getValue());if(isNaN(value)||value<=0){MochiKit.Signal.signal(o,"showError",L_bobj_crv_InvalidPageNumber)}else{o.selectPageCB(value)}}};o.margin=1;o.space=0;o.fieldWidth=30;o.labelWidth=13+o.space;o.selectPageCB=null;UPDATE(o,bobj.crv.SelectPageControl);o.updateTextValue();o.widgetType="SelectPageControl";return o};bobj.crv.SelectPageControl={getTextAndWidth:function(curPage,numPages){if(bobj.crv.config.isRTL&&bobj.isString(numPages)&&numPages.indexOf("+")>0){numPages="+"+numPages.replace("+","")}var text=L_bobj_crv_of.replace("%1",curPage).replace("%2",numPages);var fontFamily=MochiKit.Style.computedStyle(this.layer,"fontFamily");var stringWidth=bobj.getStringWidth(text,fontFamily,"11px");var width=Math.max(stringWidth+20,60);return{text:text,width:width}},update:function(update){if(update&&update.cons=="bobj.crv.newSelectPageControl"){this.updateState(update.args.curPage,update.args.numPages)}},updateState:function(currentPage,numPages){if(currentPage!=this.curPage||this.numPages!=numPages){this.curPage=currentPage;this.numPages=numPages;this.updateTextValue()}},updateTextValue:function(){var textNWidth=this.getTextAndWidth(this.curPage,this.numPages);this.text.setValue(textNWidth.text,textNWidth.width);var l=this.text.layer;if(l&&document.activeElement==l){l.blur()}},getCurrentPage:function(){return this.curPage},setCurrentPage:function(val){this.curPage=val;this.updateTextValue()},getNumPages:function(){return this.numPages},setNumPages:function(val){this.numPages=val;this.updateTextValue()},getFirstPageButton:function(){return this.firstPage},getLastPageButton:function(){return this.lastPage}};bobj.crv.newToolbarButtonGroup=function(kwArgs){var UPDATE=MochiKit.Base.update;kwArgs=UPDATE({id:bobj.uniqueId(),visualStyle:{className:null,backgroundColor:null,borderWidth:null,borderStyle:null,borderColor:null,fontFamily:null,fontWeight:null,textDecoration:null,color:null,width:null,height:null,fontStyle:null,fontSize:null}},kwArgs);var o=newPaletteContainerWidget(kwArgs.id);o.margin=2;bobj.fillIn(o,kwArgs);o.widgetType="ToolbarButtonGroup";o.initOld=o.init;UPDATE(o,bobj.crv.ToolbarButtonGroup);o.palette=newPaletteWidget(o.id+"_palette");o.add(o.palette);return o};bobj.crv.ToolbarButtonGroup={addChild:function(widget){switch(widget.widgetType){case"ExportButton":this.exportButton=widget;break;case"PrintButton":this.printButton=widget;break;case"RefreshButton":this.refreshButton=widget;break;case"DrillUpButton":this.drillUpButton=widget}this.palette.add(widget)},update:function(update){if(update!=null&&update.cons=="bobj.crv.newToolbarButtonGroup"){for(var childNum in update.children){var child=update.children[childNum];if(child){switch(child.cons){case"bobj.crv.newPrintButton":if(this.printButton){this.printButton.update(child)}break;case"bobj.crv.newExportButton":if(this.exportButton){this.exportButton.update(child)}break;case"bobj.crv.newRefreshButton":if(this.refreshButton){this.refreshButton.update(child)}break;case"bobj.crv.newDrillUpButton":if(this.drillUpButton){this.drillUpButton.update(child)}break}}}}},isAnyButtonDisplayed:function(){return(this.printButton!=null&&this.printButton.isDisplayed())||(this.exportButton!=null&&this.exportButton.isDisplayed())||(this.refreshButton!=null&&this.refreshButton.isDisplayed())||(this.drillUpButton!=null&&this.drillUpButton.isDisplayed())},autoDisplay:function(){if(this.isAnyButtonDisplayed()){this.setDisplay(true)}else{this.setDisplay(false)}},getExportButton:function(){return this.exportButton},getRefreshButton:function(){return this.refreshButton},getDrillUpButton:function(){return this.drillUpButton},getPrintButton:function(){return this.printButton},init:function(){this.initOld();bobj.setVisualStyle(this.layer,this.visualStyle);this.palette.init()},beginHTML:function(){var h=bobj.html;var groupHeight=bobj.isBorderBoxModel()?24:22;return h.openTag("div",{id:this.id,"class":"toolbar_buttongroup",style:{margin:this.margin+"px",height:groupHeight+"px"}})+h.openTag("div",null)},endHTML:function(){var h=bobj.html;return h.closeTag("div")+h.closeTag("div")},getHTML:function(){return this.beginHTML()+this.palette.getHTML()+this.endHTML()}};bobj.crv.newToolbarButtonGroupSeparator=function(){return newPaletteVerticalSepWidget(bobj.uniqueId(),14)};bobj.crv.newHistoryButton=function(kwArgs){var UPDATE=MochiKit.Base.update;var o=newIconMenuWidget(kwArgs.id,null,null,null,L_bobj_crv_History);bobj.crv.setAllClasses(o.arrow,"button");o.widgetType="HistoryButton";o.initOld=o.init;o.icon.disp=false;o.setDisabled(kwArgs.isDisabled);UPDATE(o,bobj.crv.HistoryButton);o._updateMenu(kwArgs);return o};bobj.crv.HistoryButton={init:function(){this.initOld()},update:function(update){if(update.cons=="bobj.crv.newHistoryButton"){if(update&&update.args){this._updateMenu(update.args)}}},_updateMenu:function(args){if(bobj.isBoolean(args.isDisabled)){this.setDisabled(args.isDisabled)}if(args.history){this.menu.removeAll();for(var i=0;i<args.history.length;++i){var historyItem=args.history[i];var historyItemLabel=decodeURIComponent(historyItem.label);if(bobj.crv.config.isRTL){var txtList=historyItemLabel.split("-");for(var j=0;j<txtList.length;j++){var tempStr=txtList[j];if(j==0){historyItemLabel=tempStr}else{historyItemLabel+=" - "+tempStr}if(hasNoRTLCharacters(tempStr)){historyItemLabel+="‎"}}}var menuItem=this.menu.addCheck(""+historyItem.id,historyItemLabel,this._onSelectHistory);menuItem.menu=this;if(historyItem.id==0){menuItem.check(true,true)}}this.menu.addSeparator();var onClearHistoryCB=bobj.bindFunctionToObject(this._onClearHistory,this);this.menu.addCheck("clear",L_bobj_crv_ClearHistory,onClearHistoryCB)}},_onSelectHistory:function(){var direction=parseInt(this.id);if(direction!=0){MochiKit.Signal.signal(this.menu,"selectHistory",direction)}else{this.check(true,true)}},_onClearHistory:function(){MochiKit.Signal.signal(this,"clearHistory")}};bobj.crv.newStatusbar=function(kwArgs){var UPDATE=MochiKit.Base.update;kwArgs=UPDATE({id:bobj.uniqueId(),visualStyle:{className:null,backgroundColor:null,borderWidth:null,borderStyle:null,borderColor:null,fontFamily:null,fontWeight:null,textDecoration:null,color:null,width:null,height:null,fontStyle:null,fontSize:null}},kwArgs);var o=newPaletteContainerWidget(kwArgs.id);o.margin=0;bobj.fillIn(o,kwArgs);o._rightZoneWgts=[];o.widgetType="Statusbar";o.initOld=o.init;UPDATE(o,bobj.crv.Statusbar);o.palette=newPaletteWidget(o.id+"_palette");o.palette.isLeftTableFixed=true;o.add(o.palette);return o};bobj.crv.Statusbar={init:function(){this.initOld();bobj.setVisualStyle(this.layer,this.visualStyle);this.palette.init();this.setDisplay(this.isVisible)},beginHTML:function(){return bobj.html.openTag("div",{id:this.id,"class":"dialogzone",style:{width:"100%",overflow:"hidden",margin:this.margin+"px",padding:"2px 0px",position:"absolute"}})},getHTML:function(){this._addRightZone();return(this.beginHTML()+this.palette.getHTML()+this.endHTML())},_addRightZone:function(){this.palette.beginRightZone();var w=null;while(w=this._rightZoneWgts.pop()){this.palette.add(w)}delete this._rightZoneWgts},write:function(){this._addRightZone();this.begin();this.palette.write();this.end();document.write(bobj.crv.getInitHTML(this.widx))},addChild:function(widget){switch(widget.widgetType){case"StatusbarBreadcrumb":this.breadcrumb=widget;break;case"StatusbarVersionIndicator":this.versionIndicator=widget;break}if(widget.layoutAlign=="right"){this._rightZoneWgts.push(widget)}else{this.palette.add(widget)}},update:function(update){if(update){for(var childNum in update.children){var child=update.children[childNum];if(child){switch(child.cons){case"bobj.crv.newStatusbarBreadcrumb":if(this.breadcrumb){this.breadcrumb.update(child.args)}break;case"bobj.crv.newStatusbarVersionIndicator":if(this.versionIndicator){this.versionIndicator.update(child.args)}break}}}if(update.args){this.setVisible(update.args.isVisible)}}},setVisible:function(isVisible){this.isVisible=isVisible;this.setDisplay(this.isVisible)},doLayout:function(){if(this.isDisplayed()&&this.breadcrumb){this.breadcrumb._doLayout()}}};bobj.crv.newStatusbarBreadcrumb=function(kwArgs){var o=newWidget(bobj.uniqueId());o.widgetType="StatusbarBreadcrumb";o.values=kwArgs.values;o.layoutAlign="left";o._separatorImage=img(bobj.crvUri("images/breadcrumbSep.gif"),14,9);MochiKit.Base.update(o,bobj.crv.StatusbarBreadcrumb);return o};bobj.crv.StatusbarBreadcrumb={update:function(kwArgs){this.values=kwArgs.values;this.layer.innerHTML=this._render()},getHTML:function(){return bobj.html.DIV({"class":"statusbar_breadcrumb"},bobj.html.DIV({id:this.id},this._render()))},_render:function(){var html="";if(this.values&&this.values.length>0){var cells="";for(i=0;i<this.values.length;i++){if(i>0){cells+=bobj.html.TD(null,this._separatorImage)}cells+=bobj.html.TD({style:{"white-space":"nowrap"}},this.values[i])}html=bobj.html.TABLE({"class":"iconText",cellspacing:"0",cellpadding:"0"},bobj.html.TR(null,cells))}return html},_doLayout:function(){var needsRightAlign=(this.layer.parentNode.scrollWidth>this.layer.parentNode.offsetWidth)||(this.layer.offsetLeft<0);if(needsRightAlign){this.layer.style.position="absolute";this.layer.style.top="0px";this.layer.style.right="0px"}else{this.layer.style.position=""}}};bobj.crv.newStatusbarVersionIndicator=function(kwArgs){var text=(kwArgs&&kwArgs.value)?L_bobj_crv_LastRefreshed.replace("{0}",kwArgs.value):" ";var o=NewLabelWidget(bobj.uniqueId(),text,true);o.widgetType="StatusbarVersionIndicator";o.layoutAlign="right";MochiKit.Base.update(o,bobj.crv.StatusbarVersionIndicator);return o};bobj.crv.StatusbarVersionIndicator={update:function(kwArgs){var text=(kwArgs&&kwArgs.value)?L_bobj_crv_LastRefreshed.replace("{0}",kwArgs.value):" ";this.layer.innerHTML=text}};bobj.crv.newGroupTreeNode=function(kwArgs){var UPDATE=MochiKit.Base.update;kwArgs=UPDATE({id:bobj.uniqueId()},kwArgs);var iconAlt=null;var iconId=-1;if(!kwArgs.isVisible){iconId=0;iconAlt=L_bobj_crv_Tree_Drilldown_Node.replace("%1",kwArgs.groupName)}var o=newTreeWidgetElem(iconId,kwArgs.groupName,kwArgs.groupPath,null,null,null,iconAlt,null,null,false,kwArgs.RenderRTLHint);o._children=[];o._curSigs=[];bobj.fillIn(o,kwArgs);o.widgetType="GroupTreeNode";o.initOld=o.init;o.selectOld=o.select;o.select=bobj.crv.GroupTreeNode._drilldown;o.enableDrilldown=false;o.enableNavigation=false;if(!kwArgs.isVisible){o.setCursorClass("drill_cursor")}UPDATE(o,bobj.crv.GroupTreeNode);return o};bobj.crv.GroupTreeNode={dispose:function(){while(this._curSigs.length>0){bobj.crv.SignalDisposer.dispose(this._curSigs.pop())}while(this._children.length>0){var child=this._children.pop();child.dispose();bobj.deleteWidget(child);delete child}this.sub=[]},init:function(layer){this.initOld(layer);this._setVisualStyle();if(this.isStatic){var spans=MochiKit.DOM.getElementsByTagAndClassName("span","treeNormal",this.layer);if(spans&&spans.length>0){spans[0].style.cursor="text"}}},isExpanded:function(){if(!this.layer){this.init()}var elemId=TreeIdToIdx(this.layer);return _TreeWidgetElemInstances[elemId].expanded},expand:function(){if(!this.layer){this.init()}var elemId=TreeIdToIdx(this.layer);_TreeWidgetElemInstances[elemId].expanded=false;TreeWidget_toggleCB(elemId,true)},collapse:function(){if(!this.layer){this.init()}var elemId=TreeIdToIdx(this.layer);_TreeWidgetElemInstances[elemId].expanded=true;TreeWidget_toggleCB(elemId,true)},_setVisualStyle:function(){try{var textNode=this.layer.lastChild;var parentNode=this.treeView}catch(err){return}var pvStyle=parentNode.visualStyle;var tStyle=textNode.style;if(pvStyle.fontFamily){tStyle.fontFamily=pvStyle.fontFamily}if(pvStyle.fontWeight){tStyle.fontWeight=pvStyle.fontWeight}if(pvStyle.textDecoration){tStyle.textDecoration=pvStyle.textDecoration}if(pvStyle.color){tStyle.color=pvStyle.color}if(pvStyle.fontStyle){tStyle.fontStyle=pvStyle.fontStyle}if(pvStyle.fontSize){tStyle.fontSize=pvStyle.fontSize}},updatePropertyAndConnectSignals:function(enableDrilldown,enableNavigation){this._updateProperty(enableDrilldown,enableNavigation);this._updateExpandedState();var children=this._children;for(var i=0;i<children.length;i++){var childNode=children[i];childNode.expandPath=this.expandPath+"-"+i;this.updatePropertyAndConnectSignalsForSingleWidget(childNode);childNode.updatePropertyAndConnectSignals(enableDrilldown,enableNavigation)}},updatePropertyAndConnectSignalsForSingleWidget:function(widget){if(widget){var CONNECT=MochiKit.Signal.connect;var SIGNAL=MochiKit.Signal.signal;var PARTIAL=MochiKit.Base.partial;this.add(widget);this._curSigs.push(CONNECT(widget,"grpDrilldown",PARTIAL(SIGNAL,this,"grpDrilldown")));this._curSigs.push(CONNECT(widget,"grpNodeRetrieveChildren",PARTIAL(SIGNAL,this,"grpNodeRetrieveChildren")));widget._updateProperty(this.enableDrilldown,this.enableNavigation);widget._updateExpandedState()}},addChild:function(widget){this._children.push(widget)},delayedAddChild:function(widget){this.addChild(widget);widget.expandPath=this.expandPath+"-"+(this._children.length-1);this.updatePropertyAndConnectSignalsForSingleWidget(widget)},getLevel:function(){return this.expandPath.split("-").length},_drilldown:function(){this.selectOld();MochiKit.Signal.signal(this,"grpDrilldown",this.groupName,this.groupPath,this.isVisible,this.groupNamePath,this.type)},_getChildren:function(){this.plusLyr.src=_skin+"../loading.gif";MochiKit.Signal.signal(this,"grpNodeRetrieveChildren",this.expandPath)},_updateProperty:function(enableDrilldown,enableNavigation){this.enableDrilldown=enableDrilldown;this.enableNavigation=enableNavigation;var isStatic=false;if(this.isVisible&&!enableNavigation){isStatic=true}else{if(!this.isVisible&&!enableDrilldown){isStatic=true}}if(isStatic){this.select=MochiKit.Base.noop}this.isStatic=isStatic},_updateExpandedState:function(){var childCount=this._children.length;if(childCount>0){this.expanded=true}else{this.expanded=false;if(!this.leaf){this.setIncomplete(bobj.crv.GroupTreeNode._getChildren)}}}};bobj.crv.newGroupTree=function(kwArgs){var UPDATE=MochiKit.Base.update;kwArgs=UPDATE({id:bobj.uniqueId(),visualStyle:{className:null,backgroundColor:null,borderWidth:null,borderStyle:null,borderColor:null,fontFamily:null,fontWeight:null,textDecoration:null,color:null,width:null,height:null,fontStyle:null,fontSize:null},icns:bobj.crvUri("images/magnify"+(bobj.crv.config.isRTL?"_rtl":"")+".gif"),minIcon:bobj.crvUri("images/min.gif"),plusIcon:bobj.crvUri("images/plus.gif")},kwArgs);var o=newTreeWidget(kwArgs.id+"_tree","100%","100%",kwArgs.icns,null,null,"groupTree",bobj.crv.GroupTree._expand,bobj.crv.GroupTree._collapse,null,kwArgs.minIcon,kwArgs.plusIcon);o.vsbar=new bobj.crv.VerticalScrollBar();o._children=[];o._modalChildren=[];o._lastNodeIdInitialized=-1;o._lastNodeInitialized=null;o._curSigs=[];bobj.fillIn(o,kwArgs);o.widgetType="GroupTree";o.initOld=o.init;UPDATE(o,bobj.crv.GroupTree);return o};bobj.crv.GroupTree={dispose:function(){while(this._curSigs.length>0){bobj.crv.SignalDisposer.dispose(this._curSigs.pop())}while(this._children.length>0){var child=this._children.pop();child.dispose();bobj.deleteWidget(child);delete child}this._lastNodeIdInitialized=-1;this._lastNodeInitialized=null;this.sub=[];bobj.removeAllChildElements(this.treeLyr)},beginHTML:function(){return'<label class="crvHidden" id="'+this.id+'_label">'+L_bobj_crv_GroupTree+'</label><div tabindex=-1 align= "'+(bobj.crv.config.isRTL?"right":"left")+'" id="'+this.id+'" style="position:relative;"><div aria-labelledby="'+this.id+'_label" id="'+this.id+'_ctr" style="overflow:hidden;padding:'+this.padding+'px">'},setSelected:function(isSelected){if(isSelected){this.getCtrNode().setAttribute("role","navigation")}else{this.getCtrNode().removeAttribute("role")}},focusFirstChild:function(){var isFocused=false;if(this.focusNode){this.setFocus(this.focusNode.id);return true}else{return false}},endHTML:function(){return"</div>"+this.vsbar.getHTML()+"</div>"},getModalChildren:function(){return this._modalChildren},addChild:function(widget){var Base=MochiKit.Base;var Signal=MochiKit.Signal;var connect=Signal.connect;widget.expandPath=this._children.length+"";this._children.push(widget);this.add(widget);widget.updatePropertyAndConnectSignals(this.enableDrilldown,this.enableNavigation);this._curSigs.push(connect(widget,"grpDrilldown",Base.partial(Signal.signal,this,"grpDrilldown")));this._curSigs.push(connect(widget,"grpNodeRetrieveChildren",Base.partial(Signal.signal,this,"grpNodeRetrieveChildren")))},delayedBatchAdd:function(children){this._modalChildren=[];if(!children||children.length==0){return}this._modalChildren=children;var childrenHTML="";var rootNode=null;var groupRootNode=null;while(this.containSingleReportNode(children)){var childWidget=bobj.crv.createWidget(children[0],true);if(groupRootNode!=null){groupRootNode.addChild(childWidget)}else{this.focusNode=childWidget;rootNode=childWidget}groupRootNode=childWidget;children=children[0].children}var numChildrenToRender=0;if(children){numChildrenToRender=children.length>100?100:children.length;if(groupRootNode!=null){groupRootNode.actualNumChildren=children.length}else{if(rootNode!=null){rootNode.actualNumChildren=children.length}}}if(numChildrenToRender>0){for(var i=0;i<numChildrenToRender;i++){var childWidget=bobj.crv.createWidget(children[i]);if(groupRootNode!=null){groupRootNode.addChild(childWidget)}else{this.addChild(childWidget);if(this.initialized()){childrenHTML+=child.getHTML(0)}}}}if(rootNode!=null){this.addChild(rootNode);childrenHTML+=rootNode.getHTML(0,true)}if(this.initialized()){this.appendChildrenHTML(childrenHTML);this.initChildren()}},getCtrNode:function(){return this._ctrNode},appendChildrenHTML:function(childrenHTML){append(this.treeLyr,childrenHTML)},appendToTreeCtr:function(node){this._ctrNode.appendChild(node)},init:function(){this.initOld();bobj.setVisualStyle(this.layer,this.visualStyle);this.css.verticalAlign="top";this.initChildren();this._ctrNode=getLayer(this.id+"_ctr");this.vsbar.init();this.vsbar.setScrollableElement(this._ctrNode);this._groupTreeListener=new bobj.crv.GroupTreeListener(this);this.selectPath(this.selectedPath)},update:function(update){if(update.cons=="bobj.crv.newGroupTree"){var args=update.args;var path=args.lastExpandedPath;var previousFocusPath=this.focusNode?this.focusNode.expandPath:"";if(path.length>0&&this._children.length>0){this.updateNode(path,update)}else{this.refreshChildNodes(update);if(previousFocusPath!=""){var resetFocusNode=this.findNodeByGroupPath(previousFocusPath);if(resetFocusNode!=null&&(resetFocusNode.domElem.clientWidth!=0||resetFocusNode.domElem.offsetTop!=0)){this.setFocus(resetFocusNode.id)}}}this.selectPath(args.selectedPath)}},selectPath:function(path){if(path){var node=this.findNodeByGroupPath(path);if(node&&node.selectOld){node.selectOld()}}},delayedAddChild:function(widget){this.addChild(widget);append(this.treeLyr,widget.getHTML(this.initialIndent))},initChildren:function(){while(this._lastNodeIdInitialized<this.getChildrenCount()-1){this.initNextChild()}},initNextChild:function(){var nextNode=null;var nextNodeId=-1;var children=this._children;if(this._lastNodeIdInitialized==-1){var treeSpanLayer=getLayer("treeCont_"+this.id);nextNode=treeSpanLayer.firstChild;nextNodeId=0}else{nextNode=this._lastNodeInitialized;do{if(nextNode.nextSibling!=null){nextNode=nextNode.nextSibling}else{nextNode=nextNode.firstChild}}while(!(nextNode.id&&nextNode.id.indexOf("TWe_")>-1));nextNodeId=this._lastNodeIdInitialized+1}if(nextNode!=null){this.getChildren(nextNodeId).init(nextNode);this._lastNodeInitialized=nextNode;this._lastNodeIdInitialized=nextNodeId}},getBestFitHeight:function(){return bobj.getHiddenElementDimensions(this.layer).h},refreshChildNodes:function(update){this.dispose();this.delayedBatchAdd(update.children);MochiKit.Signal.signal(this,"refreshed")},updateNode:function(path,newTree){if(path&&path.length>0){var pathArray=path.split("-");var node=this;var newNode=newTree;var i=0;var len=pathArray.length;for(;i<len;i++){if(node&&newNode){var childIndex=parseInt(pathArray[i]);var newNodeTmp=newNode.children[childIndex];var nodeTmp=node._children[childIndex];if(newNodeTmp&&nodeTmp){newNode=newNodeTmp;node=nodeTmp}}else{break}}if(node&&newNode&&newNode.args.groupPath==node.groupPath&&node._children.length==0){for(var nodeNum in newNode.children){var newChildnode=bobj.crv.createWidget(newNode.children[nodeNum]);node.addChild(newChildnode)}node.updatePropertyAndConnectSignals(this.enableDrilldown,this.enableNavigation);node.expand();for(;i<len;i++){var childIndex=parseInt(pathArray[i]);var node=node._children[childIndex];if(node){node.expand()}}}}},containSingleReportNode:function(children){if(!children||children.length!=1){return false}var object=children[0];if(object.widgetType){return(object.type!="group")}else{if(object.args){return(object.args.type!="group")}else{return false}}},getChildrenCount:function(){var count=0;var children=this._children;while(this.containSingleReportNode(children)){count++;children=children[0]._children}if(children){count+=children.length}return count},getModalChildrenCount:function(){var count=0;var children=this._modalChildren;while(this.containSingleReportNode(children)){count++;children=children[0].children}if(children){count+=children.length}return count},getChildren:function(index){var children=this._children;while(this.containSingleReportNode(children)&&index>0){index--;children=children[0]._children}return children[index]},getModalChild:function(index){var children=this._modalChildren;while(this.containSingleReportNode(children)&&index>0){index--;children=children[0].children}if(index<children.length){return children[index]}else{return null}},delayedAddChildToRealGroupRoot:function(node){this.getRealGroupRoot().delayedAddChild(node)},getRealGroupRoot:function(){var children=this._children;var root=null;while(this.containSingleReportNode(children)){root=children[0];children=children[0]._children}return root},addRealGroupChildrenHTML:function(html){var treeSpanLayer=getLayer("treeCont_"+this.id);var children=this._children;var realGroupChildrenLayer=treeSpanLayer;while(this.containSingleReportNode(children)){children=children[0]._children;realGroupChildrenLayer=realGroupChildrenLayer.firstChild.nextSibling}append(realGroupChildrenLayer,html)},_collapse:function(expandPath){MochiKit.Signal.signal(this,"grpNodeCollapse",expandPath);this._doLayout(this.getWidth(),this.getHeight())},_expand:function(expandPath){MochiKit.Signal.signal(this,"grpNodeExpand",expandPath);this._doLayout(this.getWidth(),this.getHeight())},_doLayout:function(w,h){bobj.setOuterSize(this.layer,w,h);bobj.setOuterSize(this._ctrNode,w,h);if(bobj.isNumber(h)){this.vsbar.adjustForResize(h);if(this.vsbar.isDisplayed()){var newWidth=Math.max(0,w-this.vsbar.SCROLLBAR_SIZE);bobj.setOuterSize(this._ctrNode,newWidth,null)}}},resize:function(width,height){this._doLayout(width,height);MochiKit.Signal.signal(this,"resized")},findNodeByGroupPath:function(groupPath){var pathArray=groupPath.split("-");var node=this;for(var i=0,len=pathArray.length;i<len;i++){if(node){var childIndex=parseInt(pathArray[i]);node=node._children[childIndex]}else{break}}return node}};bobj.crv.GroupTreeListener=function(groupTree){this._groupTree=groupTree;this._groupTreePrevState=this.getTreeState();this._lastNodeRendererd=this.getNumberOfNodesRendered()-1;this._nodeHeight=-1;this._futreNodesPlaceHolder=null;this.actionIDs=[];this.addFutureNodesPlaceHolder();MochiKit.Signal.connect(groupTree.getCtrNode(),"onscroll",bobj.bindFunctionToObject(this.detectTreeChanges,this));MochiKit.Signal.connect(groupTree,"refreshed",this,this.reset);MochiKit.Signal.connect(groupTree,"resized",this,this.detectTreeChanges)};bobj.crv.GroupTreeListener.prototype={getNumberOfNodesRendered:function(){return this._groupTree.getChildrenCount()},getNumberOfNodesMissing:function(){return this._groupTree.getModalChildrenCount()-this._lastNodeRendererd-1},getTreeState:function(){var gt=this._groupTree.getCtrNode();return{height:gt.offsetHeight,scrollTop:gt.scrollTop,scrollHeight:gt.scrollHeight}},getNumberOfNodesToRender:function(){if(this.getNumberOfNodesMissing()==0){return 0}var lastNodeRendered=this._groupTree.getChildren(this._lastNodeRendererd);var treeNewState=this.getTreeState();if(lastNodeRendered!=null){var offsetY=lastNodeRendered.layer.offsetTop;if(offsetY<treeNewState.scrollTop+(2*treeNewState.height)){var freeSpace=treeNewState.scrollTop+(2*treeNewState.height)-offsetY;return Math.floor(freeSpace/this.getNodeHeight())}}return 0},getNodeHeight:function(){if(this._nodeHeight>-1){return this._nodeHeight}else{if(this.getNumberOfNodesRendered()>0){var node=this._groupTree.sub[0];this._nodeHeight=bobj.getHiddenElementDimensions(node.layer).h;return this._nodeHeight}}return 0},updateTreeChildren:function(){var numNodesToRender=this.getNumberOfNodesToRender();if(numNodesToRender>0){var childrenHTML="";for(var i=this._lastNodeRendererd+1,lastNode=this._lastNodeRendererd+numNodesToRender;i<=lastNode;i++){var modalChild=this._groupTree.getModalChild(i);if(modalChild!=null){var treeNode=bobj.crv.createWidget(modalChild);this._groupTree.delayedAddChildToRealGroupRoot(treeNode);childrenHTML+=treeNode.getHTML(0);this._lastNodeRendererd=i}}this._groupTree.addRealGroupChildrenHTML(childrenHTML);this._groupTree.initChildren()}this.updateFutureNodesPlaceHolderHeight()},detectTreeChanges:function(){if(this.isTreeStateChanged()){this.actionIDs.push(setTimeout(bobj.bindFunctionToObject(this.updateTreeChildren,this),200))}this._groupTreePrevState=this.getTreeState()},isTreeStateChanged:function(){var currentState=this.getTreeState();if(currentState.height!=this._groupTreePrevState.height){return true}if(currentState.scrollTop!=this._groupTreePrevState.scrollTop){return true}if(currentState.scrollHeight!=this._groupTreePrevState.scrollHeight){return true}return false},reset:function(){this._groupTreePrevState=this.getTreeState();this._lastNodeRendererd=this.getNumberOfNodesRendered()-1;this.clearActions();this.updateFutureNodesPlaceHolderHeight()},clearActions:function(){while(this.actionIDs.length>0){clearTimeout(this.actionIDs.pop())}},updateFutureNodesPlaceHolderHeight:function(){var futurePlaceHolderLayer=this.getFutureNodesPlaceHolderLayer();if(futurePlaceHolderLayer!=null){futurePlaceHolderLayer.style.height=(this.getNumberOfNodesMissing()*this.getNodeHeight())+"px"}},getFutureNodesPlaceHolderLayer:function(){return this._futreNodesPlaceHolder},addFutureNodesPlaceHolder:function(){this._futreNodesPlaceHolder=MochiKit.DOM.DIV({id:bobj.uniqueId()+"_futureHolder",style:{width:"0px",height:(this.getNumberOfNodesMissing()*this.getNodeHeight())+"px"}});this._groupTree.appendToTreeCtr(this._futreNodesPlaceHolder)}};bobj.crv.ToolPanelType={None:"None",GroupTree:"GroupTree",ParameterPanel:"ParameterPanel",Search:"Search"};bobj.crv.ToolPanelTypeDetails={None:{title:null,img:null,alt:null},Search:{title:L_bobj_crv_Search,img:{uri:bobj.crv.allInOne.uri,dx:0,dy:bobj.crv.allInOne.searchPanelToggleDy},alt:L_bobj_crv_Search},GroupTree:{title:L_bobj_crv_GroupTree,img:{uri:bobj.crv.allInOne.uri,dx:0,dy:bobj.crv.allInOne.groupTreeToggleDy},alt:L_bobj_crv_GroupTree},ParameterPanel:{title:L_bobj_crv_ParamPanel,img:{uri:bobj.crv.allInOne.uri,dx:0,dy:bobj.crv.allInOne.paramPanelToggleDy},alt:L_bobj_crv_ParamPanel}};bobj.crv.newToolPanel=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId()+"_toolPanel",width:"300px",height:"100%",initialViewType:bobj.crv.ToolPanelType.None},kwArgs);var o=newWidget(kwArgs.id);bobj.fillIn(o,kwArgs);o.widgetType="ToolPanel";o._children=[];o._selectedChild=null;o._groupTree=null;o._paramPanel=null;o._search=null;o.initOld=o.init;o.resizeOld=o.resize;MochiKit.Base.update(o,bobj.crv.ToolPanel);o.needLeftBorder=false;return o};bobj.crv.ToolPanel={addChild:function(widget){if(!widget){return}var connect=MochiKit.Signal.connect;var partial=MochiKit.Base.partial;var signal=MochiKit.Signal.signal;var Type=bobj.crv.ToolPanelType;if(widget.widgetType=="Search"){this._search=widget;MochiKit.Iter.forEach(["searchAll","selectSearchItem"],function(sigName){connect(this._search,sigName,partial(signal,this,sigName))},this);if(this.initialViewType==Type.Search){this._selectedChild=widget}}else{if(widget.widgetType=="GroupTree"){this._groupTree=widget;MochiKit.Iter.forEach(["grpDrilldown","grpNodeRetrieveChildren","grpNodeCollapse","grpNodeExpand"],function(sigName){connect(this._groupTree,sigName,partial(signal,this,sigName))},this);if(this.initialViewType==Type.GroupTree){this._selectedChild=widget}}else{if(widget.widgetType=="ParameterPanel"){this._paramPanel=widget;connect(this._paramPanel,"resetParamPanel",partial(signal,this,"resetParamPanel"));if(this.initialViewType==Type.ParameterPanel){this._selectedChild=widget}}}}this._children.push(widget)},focusFirstChild:function(){var isFocused=false;if(this._selectedChild){return this._selectedChild.focusFirstChild()}else{return false}},resetSearch:function(){if(this._search){this._search.reset()}},hasGroupTree:function(){return this._groupTree!=null},hasSearch:function(){return this._search!=null},getSearch:function(){return this._search},hasParameterPanel:function(){return this._paramPanel!=null},getParameterPanel:function(){return this._paramPanel},delayedAddChild:function(widget){this.addChild(widget);var display=widget===this._selectedChild?"":"none";append2(this.layer,bobj.html.DIV({style:{display:display}},widget.getHTML()));widget.init()},setView:function(panelType){var prevSelectedChild=this._selectedChild;this.initialViewType=panelType;this.updateSelectedChild(panelType);var nextSelectedChild=this._selectedChild;if(prevSelectedChild!=nextSelectedChild){if(prevSelectedChild){var container=bobj.getContainer(prevSelectedChild);if(container){container.style.display="none"}prevSelectedChild.setSelected(false)}if(nextSelectedChild){var container=bobj.getContainer(nextSelectedChild);if(container){bobj.displayElementWithAnimation(container)}nextSelectedChild.setSelected(true)}}},updateSelectedChild:function(panelType){var Type=bobj.crv.ToolPanelType;switch(panelType){case Type.Search:this._selectedChild=this._search;break;case Type.GroupTree:this._selectedChild=this._groupTree;break;case Type.ParameterPanel:this._selectedChild=this._paramPanel;break;default:this._selectedChild=null}},getPanelType:function(){return this.initialViewType},getHTML:function(){var h=bobj.html;var content="";var children=this._children;for(var i=0,len=children.length;i<len;++i){var child=children[i];var display=child===this._selectedChild?"":"none";content+=h.DIV({style:{display:display}},child.getHTML())}var isDisplayed=(bobj.crv.ToolPanelType.None!==this.initialViewType);var toolPanelClass="toolPanel";if(bobj.crv.config.isRTL){toolPanelClass+="RTL"}if(this.needLeftBorder){toolPanelClass+=" leftBorder"}var layerAtt={id:this.id,"class":toolPanelClass,style:{position:"absolute",margin:"0",width:this.width,height:this.height,overflow:"hidden",display:isDisplayed?"":"none"}};var html=h.DIV(layerAtt,content);return html},init:function(){this.initOld();if(this._search){this._search.init()}if(this._groupTree){this._groupTree.init()}if(this._paramPanel){this._paramPanel.init()}if(this._selectedChild){this._selectedChild.setSelected(true)}},update:function(update){if(update&&update.cons=="bobj.crv.newToolPanel"){var updatePanelWidth=true;var signalDelayAdd=MochiKit.Base.partial(MochiKit.Signal.signal,this,"delayAddChild");for(var childVar in update.children){var child=update.children[childVar];if(child){switch(child.cons){case"bobj.crv.newSearchPanel":if(this._search){this._search.update(child);updatePanelWidth=false}else{this.delayedAddChild(bobj.crv.createWidget(child));signalDelayAdd(bobj.crv.ToolPanelType.Search)}break;case"bobj.crv.newGroupTree":if(this._groupTree){this._groupTree.update(child)}else{this.delayedAddChild(bobj.crv.createWidget(child));signalDelayAdd(bobj.crv.ToolPanelType.GroupTree)}break;case"bobj.crv.params.newParameterPanel":if(this._paramPanel){this._paramPanel.update(child)}else{this.delayedAddChild(bobj.crv.createWidget(child));signalDelayAdd(bobj.crv.ToolPanelType.ParameterPanel)}break}}}this.initialViewType=update.args.initialViewType;this.setView(this.initialViewType);if(updatePanelWidth){this.css.width=update.args.width}}},getBestFitHeight:function(){var height=0;if(this._selectedChild!=null){height=this._selectedChild.getBestFitHeight()}return height},hasPercentWidth:function(){return(this.width!=null)&&(this.width.length>0)&&(this.width.charAt(this.width.length-1)=="%")},getPercentWidth:function(){return parseInt(this.width)/100},_doLayout:function(){var innerWidth=this.layer.clientWidth;var contentHeight=this.layer.clientHeight;if(this._selectedChild){this._selectedChild.setDisplay(true);this._selectedChild.resize(innerWidth,contentHeight)}},resize:function(w,h){bobj.setOuterSize(this.layer,w,h);this._doLayout();var width=_ie&&_isQuirksMode?this.layer.offsetWidth:this.layer.clientWidth;var height=_ie&&_isQuirksMode?this.layer.offsetWidth:this.layer.clientWidth;MochiKit.Signal.signal(this,"resizeToolPanel",width,height);this.width=width},addLeftBorder:function(){this.needLeftBorder=true}};bobj.crv.PanelNavigator=function(){this._children=[];this.widgetType="PanelNavigator";this.id=bobj.uniqueId()+"_panelNav"};bobj.crv.PanelNavigator.prototype={getHTML:function(){var childrenHTML="";for(var i=0;i<this._children.length;i++){childrenHTML+=this._children[i].getHTML()}var DIV=bobj.html.DIV;var style={width:bobj.isBorderBoxModel()?"37px":"35px"};if(bobj.crv.config.isRTL){style.right="0px"}else{style.left="0px"}return DIV({"class":"panelNavigator"+(bobj.crv.config.isRTL?"RTL":""),id:this.id,style:style},DIV({id:this.id+"_innerBorder","class":"panelNavigatorInnerBorder"},childrenHTML))},focusFirstChild:function(){if(this._children.length==0){return false}else{this._children[0].focus();return true}},init:function(){this.layer=getLayer(this.id);this._innerBorder=getLayer(this.id+"_innerBorder");this.css=this.layer.style;if(this._children.length==0){this.css.display="none"}else{for(var i=0;i<this._children.length;i++){this._children[i].init()}}},hasPanelItem:function(itemName){for(var i=0;i<this._children.length;i++){var child=this._children[i];if(child.getName()==itemName){return true}}return false},selectChild:function(childName){for(var i=0;i<this._children.length;i++){var child=this._children[i];child.setSelected(child.getName()==childName)}},getChild:function(childName){for(var i=0;i<this._children.length;i++){var child=this._children[i];if(child.getName()==childName){return child}}return null},hasChildren:function(){return(this._children.length>0)},getGroupTreeButton:function(){return this.getChild(bobj.crv.ToolPanelType.GroupTree)},getParamPanelButton:function(){return this.getChild(bobj.crv.ToolPanelType.ParameterPanel)},addChild:function(kwArgs){kwArgs=MochiKit.Base.update({name:"",title:"",img:{uri:"",dx:0,dy:0}},kwArgs);var partial=MochiKit.Base.partial;var signal=MochiKit.Signal.signal;var connect=MochiKit.Signal.connect;var navItem=new bobj.crv.PanelNavigatorItem(kwArgs.name,kwArgs.img,kwArgs.title,35*this._children.length);connect(navItem,"switchPanel",partial(signal,this,"switchPanel"));this._children.push(navItem);return navItem},delayAddChild:function(kwArgs){var child=this.addChild(kwArgs);append2(this._innerBorder,child.getHTML());child.init()},resize:function(w,h){bobj.setOuterSize(this.layer,w,h);bobj.setOuterSize(this._innerBorder,w-1,h-2)},getBestFitHeight:function(){var height=0;for(var i=0;i<this._children.length;i++){height+=this._children[i].getHeight()}return height},move:Widget_move,getWidth:Widget_getWidth};bobj.crv.PanelNavigatorItem=function(name,img,title,topOffset){this._name=name;this._img=img;this._isSelected=false;this._title=title;this.topOffset=topOffset;this.widgetType="PanelNavigatorItem";this.id=bobj.uniqueId()+"_navItem_"+name};bobj.crv.PanelNavigatorItem.prototype={getHTML:function(){var h=bobj.html;var img=this._img;return h.DIV({id:this.id,"class":"panelNavigatorItem",tabindex:"0",style:{top:this.topOffset+"px","background-image":(_ie?"url("+_skin+"../transp.gif)":"")},title:this._title,role:"button"},imgOffset(img.uri,22,22,img.dx,img.dy,null,'class="panelNavigatorItemImage" title="'+this._title+'"'))},getName:function(){return this._name},init:function(){this.layer=getLayer(this.id);this.css=this.layer.style;var connect=MochiKit.Signal.connect;connect(this.layer,"onclick",this,this._onClick);connect(this.layer,"onkeydown",this,this._onKeyDown);connect(this.layer,"onmouseover",this,this._onMouseOver);connect(this.layer,"onmouseout",this,this._onMouseOut);connect(this.layer,"onfocus",this,this._onFocus);connect(this.layer,"onblur",this,this._onBlur);this.setSelected(this._isSelected)},_onFocus:function(){MochiKit.DOM.addElementClass(this.layer,"panelNavigatorItemHighlighted")},_onBlur:function(){MochiKit.DOM.removeElementClass(this.layer,"panelNavigatorItemHighlighted")},_onMouseOver:function(){MochiKit.DOM.addElementClass(this.layer,"panelNavigatorItemHighlighted")},_onMouseOut:function(){MochiKit.DOM.removeElementClass(this.layer,"panelNavigatorItemHighlighted")},_onKeyDown:function(ev){if(ev&&ev.key()&&(ev.key().code==13||ev.key().code==32)){this._signalSwitchPanel()}},_onClick:function(){this._signalSwitchPanel()},_signalSwitchPanel:function(){if(!this._isSelected){MochiKit.Signal.signal(this,"switchPanel",this._name)}},setSelected:function(isSelected){this._isSelected=isSelected;var DOM=MochiKit.DOM;if(this.layer){if(isSelected){DOM.addElementClass(this.layer,"panelNavigatorItemSelected")}else{DOM.removeElementClass(this.layer,"panelNavigatorItemSelected")}}},getWidth:Widget_getWidth,getHeight:Widget_getHeight,setDisplay:Widget_setDisplay,isDisplayed:Widget_isDisplayed,focus:Widget_focus};bobj.crv.PanelHeader=function(){this.id=bobj.uniqueId()+"_panelHeader";this._closeButton=newIconWidget(this.id+"_close",bobj.crv.allInOne.uri,bobj.bindFunctionToObject(this._closeButtonOnClick,this),null,L_bobj_crv_Minimize,8,7,0,bobj.crv.allInOne.closePanelDy,null,null,true);this.normalCssClass="panelHeaderCloseButton";this.highlightedCssClass="panelHeaderCloseButtonHighlighted";this._closeButton.setClasses(this.normalCssClass,this.normalCssClass,this.highlightedCssClass,this.highlightedCssClass);this._title="";this.respectPageDirection=true};bobj.crv.PanelHeader.prototype={getHTML:function(){var DIV=bobj.html.DIV;var h=bobj.isBorderBoxModel()?21:20;var topH=5;var bottomH=h-6;var style={height:h+"px"};return DIV({"class":"panelHeader"+(bobj.crv.config.isRTL?"RTL":""),id:this.id,style:style},DIV({"class":"panelHeaderTop",style:{height:topH+"px"}}),DIV({"class":"panelHeaderBottom",style:{top:topH+"px",height:bottomH+"px"}}),DIV({"class":"panelHeaderTitle "+(bobj.crv.config.isRTL?"crvRTL":"crvLTR"),id:this.id+"_title"},this._title),DIV({"class":"panelHeaderButtonCtn "+(bobj.crv.config.isRTL?"crvRTL":"crvLTR")},this._closeButton.getHTML()))},init:function(){this.layer=getLayer(this.id);this.css=this.layer.style;this._closeButton.init();var cbLayer=this._closeButton.layer;if(cbLayer){MochiKit.Signal.connect(cbLayer,"onfocus",this,this._closeButtonOnFocus);MochiKit.Signal.connect(cbLayer,"onblur",this,this._closeButtonOnBlur)}},_getTitleLayer:function(){return getLayer(this.id+"_title")},setTitle:function(title){this._title=title;this._closeButton.changeTooltip(L_bobj_crv_Minimize+" "+title);var l=this._getTitleLayer();if(l){l.innerHTML=title}},_closeButtonOnFocus:function(){if(this._closeButton&&this._closeButton.layer){MochiKit.DOM.addElementClass(this._closeButton.layer,this.highlightedCssClass)}},_closeButtonOnBlur:function(){if(this._closeButton&&this._closeButton.layer){MochiKit.DOM.removeElementClass(this._closeButton.layer,this.highlightedCssClass)}},_closeButtonOnClick:function(){MochiKit.Signal.signal(this,"switchPanel",bobj.crv.ToolPanelType.None)},resize:function(w,h){if(this.layer){bobj.setOuterSize(this.layer,w,h)}var titleLayer=this._getTitleLayer();if(titleLayer){bobj.setOuterSize(titleLayer,w-30)}},hideCloseButton:function(){if(this._closeButton){this._closeButton.setDisplay(false)}},getWidth:Widget_getWidth,getHeight:Widget_getHeight,move:Widget_move,setDisplay:Widget_setDisplay};bobj.crv.newLeftPanel=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId()+"_leftPanel",hasToggleSearchButton:true,hasToggleGroupTreeButton:true,hasToggleParameterPanelButton:true,paramIconImg:null,treeIconImg:null,isVisible:true},kwArgs);return new bobj.crv.LeftPanel(kwArgs.id,kwArgs.hasToggleSearchButton,kwArgs.hasToggleGroupTreeButton,kwArgs.hasToggleParameterPanelButton,kwArgs.isVisible,kwArgs.paramIconImg,kwArgs.treeIconImg)};bobj.crv.LeftPanel=function(id,hasToggleSearchButton,hasToggleGroupTreeButton,hasToggleParameterPanelButton,isVisible,paramIconImg,treeIconImg){this._panelNavigator=null;this._panelHeader=null;this._toolPanel=null;this.id=id;this.isVisible=isVisible;this.widgetType="LeftPanel";this.hasToggleSearchButton=hasToggleSearchButton;this.hasToggleParameterPanelButton=hasToggleParameterPanelButton;this.hasToggleGroupTreeButton=hasToggleGroupTreeButton;this.paramIconImg=paramIconImg;this.treeIconImg=treeIconImg;this._lastViewedPanel=null;this.respectPageDirection=true};bobj.crv.LeftPanel.prototype={getHTML:function(){return bobj.html.DIV({"class":"leftPanel "+(bobj.crv.config.isRTL?"crvRTL":"crvLTR"),id:this.id},this._getInnerHTML())},_getInnerHTML:function(){var toolPanelHTML=this._toolPanel?this._toolPanel.getHTML():"";var panelHeaderHTML=this._panelHeader?this._panelHeader.getHTML():"";var navigatorHTML=this._panelNavigator?this._panelNavigator.getHTML():"";return navigatorHTML+panelHeaderHTML+toolPanelHTML},resetSearch:function(){if(this._toolPanel){this._toolPanel.resetSearch()}},focusFirstChild:function(){if(!this.isVisible){return false}var isFocused=false;if(this._panelNavigator){isFocused=this._panelNavigator.focusFirstChild()}if(!isFocused&&this._toolPanel){isFocused=this._toolPanel.focusFirstChild()}return isFocused},getDOM:function(){if(this.layer){return this.layer}var div=MochiKit.DOM.DIV({"class":"leftPanel",id:this.id});div.innerHTML=this._getInnerHTML();return div},getBestFitWidth:function(){var w=0;if(this._panelNavigator){w+=this._panelNavigator.getWidth()}if(this._toolPanel&&this._toolPanel.isDisplayed()){w+=this._toolPanel.getWidth()}else{if(this.isDisplayed()){w+=5}}return w},getBestFitHeight:function(){var toolPanelHeight=0;var panelNavigatorHeight=0;if(this._panelHeader){toolPanelHeight+=this._panelHeader.getHeight()}if(this._toolPanel){toolPanelHeight+=this._toolPanel.getBestFitHeight()}if(this._panelNavigator){panelNavigatorHeight=this._panelNavigator.getBestFitHeight()}return Math.max(toolPanelHeight,panelNavigatorHeight)},update:function(update){if(!update||update.cons!="bobj.crv.newLeftPanel"){return}for(var childNum in update.children){var child=update.children[childNum];if(child&&child.cons=="bobj.crv.newToolPanel"){if(this._toolPanel){this._toolPanel.update(child)}break}}if(update.args){this.setVisible(update.args.isVisible)}},setVisible:function(isVisible){this.isVisible=isVisible;this.setDisplay(this.isVisible)},init:function(){this.layer=getLayer(this.id);this.css=this.layer.style;if(this._toolPanel){this._toolPanel.init()}if(this._panelHeader){this._panelHeader.init();if(!this.isToolPanelDisplayed()){this._panelHeader.setDisplay(false)}}if(this._panelNavigator){this._panelNavigator.init()}this.setDisplay(this.isVisible)},_initSignals:function(){var partial=MochiKit.Base.partial;var signal=MochiKit.Signal.signal;var connect=MochiKit.Signal.connect;if(this._toolPanel){MochiKit.Iter.forEach(["grpDrilldown","grpNodeRetrieveChildren","grpNodeCollapse","grpNodeExpand","resetParamPanel","resizeToolPanel","searchAll","selectSearchItem"],function(sigName){connect(this._toolPanel,sigName,partial(signal,this,sigName))},this);connect(this._toolPanel,"delayAddChild",this,"_onToolPanelDelayAddChild")}if(this._panelNavigator){connect(this._panelNavigator,"switchPanel",this,"_switchPanel")}if(this._panelHeader){connect(this._panelHeader,"switchPanel",this,"_switchPanel")}},_onToolPanelDelayAddChild:function(childName){var newChild=null;var ToolPanelType=bobj.crv.ToolPanelType;var ToolPanelTypeDetails=bobj.crv.ToolPanelTypeDetails;if(this._panelNavigator!=null){if(this.hasToggleParameterPanelButton&&childName==ToolPanelType.ParameterPanel&&!this._panelNavigator.hasPanelItem(ToolPanelType.ParameterPanel)){newChild={name:ToolPanelType.ParameterPanel,img:this.paramIconImg?this.paramIconImg:ToolPanelTypeDetails.ParameterPanel.img,title:ToolPanelTypeDetails.ParameterPanel.title}}else{if(this.hasToggleGroupTreeButton&&childName==ToolPanelType.GroupTree&&!this._panelNavigator.hasPanelItem(ToolPanelType.GroupTree)){newChild={name:ToolPanelType.GroupTree,img:this.treeIconImg?this.treeIconImg:ToolPanelTypeDetails.GroupTree.img,title:ToolPanelTypeDetails.GroupTree.title}}else{if(this.hasToggleSearchButton&&childName==ToolPanelType.Search&&!this._panelNavigator.hasPanelItem(ToolPanelType.Search)){newChild={name:ToolPanelType.Search,img:ToolPanelTypeDetails.Search.img,title:ToolPanelTypeDetails.Search.title}}}}if(newChild!=null){this._panelNavigator.delayAddChild(newChild)}}},isToolPanelDisplayed:function(){return this._toolPanel&&this._toolPanel.isDisplayed()},displayLastViewedPanel:function(){if(this._toolPanel){switch(this._lastViewedPanel){case bobj.crv.ToolPanelType.Search:this._switchPanel(bobj.crv.ToolPanelType.Search);break;case bobj.crv.ToolPanelType.GroupTree:this._switchPanel(bobj.crv.ToolPanelType.GroupTree);break;case bobj.crv.ToolPanelType.ParameterPanel:this._switchPanel(bobj.crv.ToolPanelType.ParameterPanel);break;default:this._switchPanel(bobj.crv.ToolPanelType.GroupTree)}}},hideToolPanel:function(){this._switchPanel(bobj.crv.ToolPanelType.None)},_switchPanel:function(panelType){if(this._toolPanel){this._toolPanel.setView(panelType);if(panelType==bobj.crv.ToolPanelType.None){this._toolPanel.setDisplay(false);this._panelHeader.setDisplay(false);this.focusFirstChild()}else{this._toolPanel.setDisplay(true);this._panelHeader.setDisplay(true);this._lastViewedPanel=panelType}}if(this._panelHeader){var title=bobj.crv.ToolPanelTypeDetails[panelType].title}this._panelHeader.setTitle(title);if(this._panelNavigator){this._panelNavigator.selectChild(panelType)}MochiKit.Signal.signal(this,"switchPanel",panelType)},getPanelNavigator:function(){return this._panelNavigator},getToolPanel:function(){return this._toolPanel},addChild:function(child){if(child.widgetType=="ToolPanel"){this._toolPanel=child;this.updateChildren();this._initSignals()}},updateChildren:function(){if(this._toolPanel){this._panelNavigator=new bobj.crv.PanelNavigator();this._panelHeader=new bobj.crv.PanelHeader();var newChild=null;if(this._toolPanel.hasSearch()&&this.hasToggleSearchButton){newChild={name:bobj.crv.ToolPanelType.Search,img:bobj.crv.ToolPanelTypeDetails.Search.img,title:bobj.crv.ToolPanelTypeDetails.Search.title};this._panelNavigator.addChild(newChild)}if(this._toolPanel.hasParameterPanel()&&this.hasToggleParameterPanelButton){newChild={name:bobj.crv.ToolPanelType.ParameterPanel,img:this.paramIconImg?this.paramIconImg:bobj.crv.ToolPanelTypeDetails.ParameterPanel.img,title:bobj.crv.ToolPanelTypeDetails.ParameterPanel.title};this._panelNavigator.addChild(newChild)}if(this._toolPanel.hasGroupTree()&&this.hasToggleGroupTreeButton){newChild={name:bobj.crv.ToolPanelType.GroupTree,img:this.treeIconImg?this.treeIconImg:bobj.crv.ToolPanelTypeDetails.GroupTree.img,title:bobj.crv.ToolPanelTypeDetails.GroupTree.title};this._panelNavigator.addChild(newChild)}this._lastViewedPanel=this._toolPanel.initialViewType;this._panelNavigator.selectChild(this._toolPanel.initialViewType);this._panelHeader.setTitle(bobj.crv.ToolPanelTypeDetails[this._toolPanel.initialViewType].title);if(!this._panelNavigator.hasChildren()){this._panelHeader.hideCloseButton();this._toolPanel.addLeftBorder()}}},resize:function(w,h){if(this.isDisplayed()){bobj.setOuterSize(this.layer,w,h);this._doLayout()}},_doLayout:function(){if(!this._toolPanel||!this._panelNavigator||!this._panelHeader||!this.isDisplayed()){return}var w=this.getWidth();var h=this.getHeight();var navigatorW=this._panelNavigator.getWidth();var newToolPanelWidth=w-navigatorW;var newToolPanelHeight=h-this._panelHeader.getHeight();if(this._toolPanel.isDisplayed()){this._toolPanel.resize(newToolPanelWidth,newToolPanelHeight);this._toolPanel.move(navigatorW,this._panelHeader.getHeight())}this._panelHeader.resize(newToolPanelWidth,null);this._panelHeader.move(navigatorW,0);this._panelNavigator.resize(navigatorW,h)},setDisplay:function(isDisplay){Widget_setDisplay.call(this,isDisplay);MochiKit.Signal.signal(this,"onSetDisplay",isDisplay)},move:Widget_move,getWidth:Widget_getWidth,getHeight:Widget_getHeight,isDisplayed:Widget_isDisplayed};bobj.crv.newReportPage=function(kwArgs){var newId=bobj.uniqueId();if(kwArgs.pageNum){newId+="_page_"+kwArgs.pageNum}kwArgs=MochiKit.Base.update({id:newId,bgColor:"#FFFFFF",width:720,height:984,isMissingTPC:false,documentView:bobj.crv.ReportPage.DocumentView.PRINT_LAYOUT},kwArgs);var o=newWidget(kwArgs.id);o.widgetType="ReportPage";o._hasContent=false;bobj.fillIn(o,kwArgs);o.initOld=o.init;o.resizeOld=o.resize;o.onUpdateHTMLListener=null;MochiKit.Base.update(o,bobj.crv.ReportPage);o._pageListener=new bobj.crv.ReportPageListener(o);return o};bobj.crv.ReportPage={DocumentView:{WEB_LAYOUT:"weblayout",PRINT_LAYOUT:"printlayout"},dispose:function(){this._hasContent=false;this._pageListener.dispose();MochiKit.DOM.removeElement(this.layer);delete this._pageListener;delete this._iframe;delete this._shadowNode;delete this._pageNode},focusFirstChild:function(){if(this._iframe){this._iframe.focus()}else{this.layer.focus()}return true},displayScrollBars:function(isDisplay){this.layer.style.overflow=isDisplay?"auto":"hidden"},isDisplayScrollBars:function(){this.layer.style.overflow=="auto"},setOnUpdateHTMLListener:function(listener){this.onUpdateHTMLListener=listener},getIframe:function(){return this._iframe},update:function(update){if(update){this.updateSize({width:update.args.width,height:update.args.height});this.layer.scrollLeft=0;this.layer.scrollTop=0;this.isMissingTPC=update.args.isMissingTPC;this.updateHTML(update.args.content,false)}},scrollToHighlighted:function(scrollWindow){if(this._iframe){var iframeDoc=_ie?this._iframe.contentWindow.document:this._iframe.contentDocument;var e=iframeDoc.getElementById("CrystalHighLighted");if(e){var ePosition=MochiKit.Style.getElementPosition(e,null,iframeDoc);if(scrollWindow){var reportPagePos=MochiKit.Style.getElementPosition(this.layer);window.scrollTo(reportPagePos.x+ePosition.x,reportPagePos.y+ePosition.y)}else{this.layer.scrollLeft=ePosition.x;this.layer.scrollTop=ePosition.y}}}},updateHTML:function(content,useAnimation){if(content){this._hasContent=true;if(!this._iframe){this._pageNode.appendChild(MochiKit.DOM.H2({id:this.id+"_h2",style:{position:"absolute",top:"-1000px",left:"-1000px"}},L_bobj_crv_PageNum.replace("{0}",this.getNumber())));this._iframe=MochiKit.DOM.createDOM("IFRAME",{id:this.id+"_iframe",width:"100%",tabIndex:"0","aria-labelledby":this.id+"_h2",height:"100%",frameBorder:"0",margin:"0"});this._pageNode.appendChild(this._iframe)}if(useAnimation){this._iframe.style.display="none"}var iframeDoc=_ie?this._iframe.contentWindow.document:this._iframe.contentDocument;iframeDoc.open();iframeDoc.write(this.getIFrameHTML(content));iframeDoc.close();if(useAnimation){bobj.displayElementWithAnimation(this._iframe)}if(this.onUpdateHTMLListener){this.onUpdateHTMLListener()}}},getIFrameHTML:function(content){return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>\r\n<head>\r\n<style> body { overflow :hidden; margin : 0px;}</style>\r\n</head>\r\n<body>\r\n'+content+"</body>\r\n</html>"},updateSize:function(sizeObject){if(sizeObject){this.width=(sizeObject.width!=undefined)?sizeObject.width:this.width;this.height=(sizeObject.height!=undefined)?sizeObject.height:this.height}var isBBM=bobj.isBorderBoxModel();if(this._pageNode){this._pageNode.style.width=(isBBM?this.width+2:this.width)+"px";this._pageNode.style.height=(isBBM?this.height+2:this.height)+"px"}if(this._shadowNode){this._shadowNode.style.width=this.width+"px";this._shadowNode.style.height=this.height+"px"}},hasContent:function(){return this._hasContent},getHTML:function(){var h=bobj.html;var isBBM=bobj.isBorderBoxModel();var layerStyle={width:"100%",height:"100%",overflow:"auto",position:"absolute"};var pageStyle={position:"relative",width:(isBBM?this.width+2:this.width)+"px",height:(isBBM?this.height+2:this.height)+"px","z-index":1,"border-width":"1px","border-style":"solid","background-color":this.bgColor,overflow:"hidden","text-align":"left"};var shadowStyle={position:"absolute","z-index":0,display:"none",width:(isBBM?this.width+2:this.width)+"px",height:(isBBM?this.height+2:this.height)+"px",top:"0px",left:"0px"};var shadowHTML="";if(this.documentView.toLowerCase()==bobj.crv.ReportPage.DocumentView.PRINT_LAYOUT){layerStyle["background-color"]="#8E8E8E";pageStyle["border-color"]="#000000";shadowStyle["background-color"]="#737373";shadowHTML=h.DIV({id:this.id+"_shadow","class":"menuShadow",style:shadowStyle});layerStyle["text-align"]="center";pageStyle.margin="0 auto";pageStyle.top="6px"}else{layerStyle["background-color"]="#FFFFFF";pageStyle["border-color"]="#FFFFFF";pageStyle.margin="0"}var html=h.DIV({id:this.id,style:layerStyle,"class":"insetBorder"},h.DIV({id:this.id+"_page",style:pageStyle}),shadowHTML);return html},init:function(){this._pageNode=getLayer(this.id+"_page");this._shadowNode=getLayer(this.id+"_shadow");this.initOld();this.updateHTML(this.content,true);delete this.content},isMissingTotalPageCount:function(){return this.isMissingTPC},updateShadowLocation:function(){var updateFunc=function(){if(this._shadowNode&&this._pageNode){this._shadowNode.style.display="none";var pageNodPos={x:this._pageNode.offsetLeft,y:this._pageNode.offsetTop};this._shadowNode.style.display="block";this._shadowNode.style.top=pageNodPos.y+(bobj.isBorderBoxModel()?4:6)+"px";this._shadowNode.style.left=pageNodPos.x+(bobj.isBorderBoxModel()?4:6)+"px"}};setTimeout(bobj.bindFunctionToObject(updateFunc,this),0)},getNumber:function(){return this.pageNum},resize:function(w,h){bobj.setOuterSize(this.layer,w,h);if(_moz){this.css.clip=bobj.getRect(0,w,h,0)}this.updateShadowLocation()},getBestFitSize:function(){var page=this._pageNode;return{width:page.offsetWidth+30,height:page.offsetHeight+30}},hideFrame:function(){this.css.borderStyle="none";this._pageNode.style.border=""},addCanvasListener:function(listener){if(this._pageListener){this._pageListener.addCanvasListener(listener)}},removeCanvasListener:function(listener){if(this._pageListener){this._pageListener.removeCanvasListener(listener)}},getCanvasListeners:function(){if(this._pageListener){return this._pageListener.getCanvasListeners()}return null}};bobj.crv.ReportPageListener=function(page){if(!(this instanceof bobj.crv.ReportPageListener)){throw"PE. Must instantiate a new instance of bobj.crv.ReportPageListener"}if(page==null){throw"page cannot be null"}page.setOnUpdateHTMLListener(function(){var iframeDoc=getCanvasDocument(page);if(iframeDoc){var connect=bobj.connectDOMEvent;connect(document,"onmousemove",onParentDocumentMouseMove);connect(iframeDoc,"onmousemove",onCanvasMouseMove);connect(iframeDoc,"onclick",onClick);connect(iframeDoc,"oncontextmenu",onContextMenu)}});var VALID_REPORT_TYPES={text:true,textInGrid:true,textfield:true,textfieldInGrid:true,field:true,numberField:true,fieldInGrid:true,numberFieldInGrid:true};var page=page;var lastHoveredElem=null;var canvasListeners=[];var isMouseInCanvas=false;function onParentDocumentMouseMove(e){try{if(isMouseInCanvas){isMouseInCanvas=false;fireEvent(bobj.crv.InternalCanvasEvents.REPORT_CANVAS_MOUSE_LEAVE,new bobj.crv.CanvasEventArgs(page,e))}}catch(e){bobj.logToConsole(e)}}function onCanvasMouseMove(e){if(canvasListeners.length==0){return}try{if(!isMouseInCanvas){isMouseInCanvas=true;fireEvent(bobj.crv.InternalCanvasEvents.REPORT_CANVAS_MOUSE_ENTER,new bobj.crv.CanvasEventArgs(page,e))}var newTarget=bobj.getEventTarget(e);if(lastHoveredElem==newTarget||bobj.isParentOf(newTarget,lastHoveredElem)){return}else{onMouseIn(newTarget,e)}}catch(e){bobj.logToConsole(e)}}function onContextMenu(e){if(canvasListeners.length==0){return}try{var isRightClick=e.which==3;var target=bobj.getEventTarget(e);var reportElem=findReportElement(target);if(reportElem!=null){fireEvent(bobj.crv.CanvasEvents.REPORT_ELEMENT_RIGHT_CLICK,new bobj.crv.ReportElementCanvasEventArgs(page,reportElem,e))}fireEvent(bobj.crv.CanvasEvents.REPORT_CANVAS_RIGHT_CLICK,new bobj.crv.CanvasEventArgs(page,e))}catch(e){bobj.logToConsole(e)}}function onClick(e){if(canvasListeners.length==0){return}try{var isRightClick=e.which==3;var target=bobj.getEventTarget(e);var reportElem=findReportElement(target);if(reportElem!=null){fireEvent(isRightClick?bobj.crv.CanvasEvents.REPORT_ELEMENT_RIGHT_CLICK:bobj.crv.CanvasEvents.REPORT_ELEMENT_CLICK,new bobj.crv.ReportElementCanvasEventArgs(page,reportElem,e))}fireEvent(isRightClick?bobj.crv.CanvasEvents.REPORT_CANVAS_RIGHT_CLICK:bobj.crv.CanvasEvents.REPORT_CANVAS_CLICK,new bobj.crv.CanvasEventArgs(page,e))}catch(e){bobj.logToConsole(e)}}function fireEvent(eventName,eventArgs){if(canvasListeners.length>0){MochiKit.Iter.forEach(canvasListeners,function(l){l.fire(eventName,eventArgs)})}}function onMouseIn(elem,originalEvent){var reportElem=findReportElement(elem);if(reportElem!=lastHoveredElem){onMouseOut(lastHoveredElem,originalEvent)}if(reportElem!=null){lastHoveredElem=reportElem;fireEvent(bobj.crv.CanvasEvents.REPORT_ELEMENT_MOUSE_ENTER,new bobj.crv.ReportElementCanvasEventArgs(page,lastHoveredElem,originalEvent))}}function onMouseOut(elem,originalEvent){if(lastHoveredElem!=null){fireEvent(bobj.crv.CanvasEvents.REPORT_ELEMENT_MOUSE_LEAVE,new bobj.crv.ReportElementCanvasEventArgs(page,lastHoveredElem,originalEvent))}lastHoveredElem=null}function isReportElement(domE){if(domE!=null&&domE.getAttribute!=null){var type=domE.getAttribute("type");return type!=null&&VALID_REPORT_TYPES[type]==true}return false}function findReportElement(domElem){if(domElem==null){return null}if(isReportElement(domElem)){return domElem}if(domElem!=domElem.parentNode){return arguments.callee(domElem.parentNode)}return null}this.addCanvasListener=function(listener){var hasIdentical=MochiKit.Base.findIdentical(canvasListeners,listener)>=0;if(!hasIdentical){canvasListeners.push(listener)}};this.removeCanvasListener=function(listener){var index=MochiKit.Base.findIdentical(canvasListeners,listener);if(index>=0){canvasListeners.splice(index,1)}};this.getCanvasListeners=function(){return canvasListeners};this.dispose=function(){var iframeDoc=getCanvasDocument(page);if(iframeDoc){var disconnect=bobj.connectDOMEvent;disconnect(document,"onmousemove",onParentDocumentMouseMove);disconnect(iframeDoc,"onmousemove",onCanvasMouseMove);disconnect(iframeDoc,"onclick",onClick);disconnect(iframeDoc,"oncontextmenu",onContextMenu)}};function getCanvasDocument(page){var pageFrame=getCanvasFrame(page);if(pageFrame!=null){var iframeDoc=_ie?pageFrame.contentWindow.document:pageFrame.contentDocument;return iframeDoc}return null}function getCanvasWindow(page){var frame=getCanvasFrame(page);if(frame!=null){return frame.contentWindow}else{return null}}function getCanvasFrame(page){if(page){return page.getIframe()}return null}bobj.crv.CanvasEventArgs=function(page,originalEvent){if(!page||!originalEvent){throw"programming error"}this.getCanvasDocument=function(){return getCanvasDocument(page)};this.getCanvasWindow=function(){return getCanvasWindow(page)};this.getCanvasFrame=function(){return getCanvasFrame(page)};this.event=new MochiKit.Signal.Event(this.getCanvasDocument(),originalEvent);this.pageNumber=page.getNumber()};bobj.crv.ReportElementCanvasEventArgs=function(page,reportElem,originalEvent){if(!page||!reportElem||!originalEvent){throw"programming error"}this.event=new MochiKit.Signal.Event(reportElem,originalEvent);this.target=reportElem;this.text=reportElem.textContent||reportElem.innerText||"";this.type=reportElem.getAttribute("type")||"";this.url=reportElem.getAttribute("url")||"";this.getCanvasDocument=function(){return getCanvasDocument(page)};this.getCanvasWindow=function(){return getCanvasWindow(page)};this.getCanvasFrame=function(){return getCanvasFrame(page)};this.getCanvasOffset=function(){return MochiKit.Style.getElementPosition(reportElem,null,reportElem.ownerDocument)};this.getWindowOffset=function(){var pageOffset=this.getCanvasOffset();var iframe=this.getCanvasFrame();var iframeOffset=MochiKit.Style.getElementPosition(iframe);return{x:parseInt(pageOffset.x+iframeOffset.x-(_ie&&bobj.isQuirksMode()?2:0)),y:parseInt(pageOffset.y+iframeOffset.y-(_ie&&bobj.isQuirksMode()?2:0))}}}};bobj.crv.BaseListener=function(validator){var listeners={};var isValidEvent=validator;this.onEvent=function(eventName,listener){if(!isValidEvent||isValidEvent(eventName)){if(listeners[eventName]==null){listeners[eventName]=new Array()}listeners[eventName].push(listener);return true}else{return false}};this.removeEvent=function(eventName,listener){if(listeners[eventName]!=null){if(arguments.length==1){listeners[eventName]=[]}else{var list=listeners[eventName];for(var i=list.length-1;i>=0;i--){if(list[i]==listener){list.splice(i,1)}}}}};this.fire=function(eventName,eventArgs){if(listeners[eventName]!=null){var list=listeners[eventName];for(var i=0;i<list.length;i++){list[i].call(null,eventArgs)}}}};bobj.crv.ActionEvents={EXPORT:"export",PRINT:"print",DRILL:"drill",GROUP_TREE_NAVIGATE:"navigate",ERROR:"error"};bobj.crv.BaseEvent=function(){var isHandled=false;this.setHandled=function(isH){isHandled=isH};this.isHandled=function(){return isHandled}};bobj.crv.ExportEvent=bobj.crv.BaseEvent;bobj.crv.PrintEvent=bobj.crv.BaseEvent;bobj.crv.DrillEvent=function(eventArgs){bobj.crv.BaseEvent.apply(this);this.groupName=eventArgs[0];this.groupPath=eventArgs[1];this.groupNamePath=eventArgs[2]};bobj.crv.GroupTreeNavigateEvent=function(eventArgs){bobj.crv.BaseEvent.apply(this);this.groupName=eventArgs[0];this.groupPath=eventArgs[1];this.groupNamePath=eventArgs[2]};bobj.crv.ErrorEvent=function(eventArgs){bobj.crv.BaseEvent.apply(this);this.text=eventArgs[0];this.details=eventArgs[1];this.code=eventArgs[2]||0;this.RCI=eventArgs[3]||""};bobj.crv.ActionEventFactory=new function(){this.create=function(eventName,eventArgs){var eventCons=null;switch(eventName){case bobj.crv.ActionEvents.EXPORT:eventCons=bobj.crv.ExportEvent;break;case bobj.crv.ActionEvents.PRINT:eventCons=bobj.crv.PrintEvent;break;case bobj.crv.ActionEvents.DRILL:eventCons=bobj.crv.DrillEvent;break;case bobj.crv.ActionEvents.GROUP_TREE_NAVIGATE:eventCons=bobj.crv.GroupTreeNavigateEvent;break;case bobj.crv.ActionEvents.ERROR:eventCons=bobj.crv.ErrorEvent;break;default:eventCons=bobj.crv.BaseEvent}if(eventCons!=null){return new eventCons(eventArgs)}}};bobj.crv.ActionListener=function(){function isValidEvent(name){if(!name){return false}for(var key in bobj.crv.ActionEvents){if(bobj.crv.ActionEvents[key]==name){return true}}return false}bobj.crv.BaseListener.apply(this,[isValidEvent])};bobj.crv.CanvasEvents={REPORT_ELEMENT_MOUSE_ENTER:"reportElementMouseEnter",REPORT_ELEMENT_MOUSE_LEAVE:"reportElementMouseLeave",REPORT_ELEMENT_CLICK:"reportElementClick",REPORT_ELEMENT_RIGHT_CLICK:"reportElementRightClick",REPORT_CANVAS_MOUSE_ENTER:"reportCanvasMouseEnter",REPORT_CANVAS_MOUSE_LEAVE:"reportCanvasMouseLeave",REPORT_CANVAS_CLICK:"reportCanvasClick",REPORT_CANVAS_RIGHT_CLICK:"reportCanvasRightClick"};bobj.crv.InternalCanvasEvents={REPORT_CANVAS_MOUSE_ENTER:"internalReportCanvasMouseEnter",REPORT_CANVAS_MOUSE_LEAVE:"internalReportCanvasMouseLeave",REPORT_VIEW_MOUSE_ENTER:"internalReportViewMouseEnter",REPORT_VIEW_MOUSE_LEAVE:"internalReportViewMouseLeave"};bobj.crv.CanvasListener=function(){function isValidEvent(name){if(!name){return false}for(var key in bobj.crv.CanvasEvents){if(bobj.crv.CanvasEvents[key]==name){return true}}for(var key in bobj.crv.InternalCanvasEvents){if(bobj.crv.InternalCanvasEvents[key]==name){return true}}return false}bobj.crv.BaseListener.apply(this,[isValidEvent])};bobj.crv.newScrollingReportPage=function(kwArgs){var o=bobj.crv.newReportPage(kwArgs);o.widgetType="ScrollingReportPage";o.updateHtmlOld=o.updateHTML;o.updateSizeOld=o.updateSize;o.updateOld=o.update;o.margin=10;MochiKit.Base.update(o,bobj.crv.ScrollingReportPage);o.highlightedCoord=null;return o};bobj.crv.ScrollingReportPage={addMouseWheelListener:function(callback){if(this._iframe){var iframeDoc=_ie?this._iframe.contentWindow.document:this._iframe.contentDocument;bobj.connectMouseWheelListener(iframeDoc,callback)}},removeMouseWheelListener:function(callback){if(this._iframe){var iframeDoc=_ie?this._iframe.contentWindow.document:this._iframe.contentDocument;bobj.disconnectMouseWheelListener(iframeDoc,callback)}},addKeyPressListener:function(callback){if(this._iframe){var e=_ie?this._iframe.contentWindow.document:this._iframe.contentWindow;var eventName=_moz?"onkeypress":"onkeydown";bobj.connectDOMEvent(e,eventName,callback)}},removeKeyPressListener:function(callback){if(this._iframe){var iframeDoc=_ie?this._iframe.contentWindow.document:this._iframe.contentDocument;bobj.disconnectDOMEvent(iframeDoc,"onkeypress",callback)}},getOffsetTop:function(){return this.layer.offsetTop},updateHTML:function(content){if(content){if(!this._iframe){bobj.removeAllChildElements(this._pageNode)}this.updateHtmlOld(content)}else{var imageTD=MochiKit.DOM.TD();imageTD.innerHTML=simpleImgOffset(bobj.skinUri("wait01.gif"),20,20,90,10,null,null,null,"float:none");var anchorTD=MochiKit.DOM.TD(null,MochiKit.DOM.A({href:"javascript:void(0);","class":"loadingMessage"},L_bobj_crv_LoadingPage.replace("{0}",this.getNumber())));var cells=[];cells.push(imageTD);cells.push(anchorTD);var table=MochiKit.DOM.TABLE({align:"center",cellSpacing:"0",cellPadding:"4"},MochiKit.DOM.TBODY(null,MochiKit.DOM.TR(null,cells)));var messageBar=MochiKit.DOM.DIV({"class":"loadingMessageBar",style:{width:this.width-12+"px"}},table);this._pageNode.appendChild(messageBar);bobj.connectDOMEvent(this._pageNode.lastChild,"onclick",this.screenReaderHandler)}},updateSize:function(sizeObject){this.updateSizeOld(sizeObject);if(this.layer){var isBBM=bobj.isBorderBoxModel();this.layer.style.width=((isBBM?this.width+2:this.width)+this.margin)+"px";this.layer.style.height=((isBBM?this.height+2:this.height)+this.margin)+"px"}},update:function(update){if(update){this.updateOld(update);this.highlightedCoord=null}},getHighlightedElementCoordinates:function(){if(this.highlightedCoord){return this.highlightedCoord}if(this._iframe){var iframeDoc=_ie?this._iframe.contentWindow.document:this._iframe.contentDocument;var e=iframeDoc.getElementById("CrystalHighLighted");if(e){this.highlightedCoord=MochiKit.Style.getElementPosition(e,null,iframeDoc)}return this.highlightedCoord}},getHeight:function(){var height=this.height+this.margin;if(bobj.isBorderBoxModel()){height+=2}return height},getWidth:function(){var width=this.width+this.margin;if(bobj.isBorderBoxModel()){width+=2}return width},getBestFitSize:function(){var page=this.layer;return{width:page.offsetWidth,height:page.offsetHeight}},getHTML:function(){var h=bobj.html;var isBBM=bobj.isBorderBoxModel();var layerStyle={position:"relative",width:(this.width+10)+"px",height:(this.height+10)+"px",overflow:"hidden"};var pageStyle={position:"absolute",width:(isBBM?this.width+2:this.width)+"px",height:(isBBM?this.height+2:this.height)+"px","z-index":1,"border-width":"1px","border-style":"solid","background-color":this.bgColor,overflow:"hidden",top:"0px",left:"0px"};var shadowStyle={position:"absolute","z-index":0,width:this.width+"px",height:this.height+"px",top:"10px",left:"10px"};var shadowHTML="";if(this.documentView.toLowerCase()==bobj.crv.ReportPage.DocumentView.PRINT_LAYOUT){layerStyle["background-color"]="transparent";pageStyle["border-color"]="#000000";pageStyle.top="4px";pageStyle.left="4px";shadowStyle["background-color"]="#737373";shadowHTML=h.DIV({id:this.id+"_shadow","class":"menuShadow",style:shadowStyle});layerStyle["text-align"]="center";layerStyle.margin="0 auto"}else{pageStyle["border-color"]="#FFFFFF";pageStyle.margin="0"}var html=h.DIV({id:this.id,style:layerStyle},h.DIV({id:this.id+"_page",style:pageStyle}),shadowHTML);return html},addDashedBottomBorder:function(){if(this._pageNode){this._pageNode.style.borderBottom="1px dashed #737373"}},isInFocus:function(){return this._iframe==bobj.getActiveElement()}};bobj.crv.newReportView=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId(),viewStateId:null,isMainReport:false},kwArgs);var o=newWidget(kwArgs.id);bobj.fillIn(o,kwArgs);o.widgetType="ReportView";o.reportPage=null;o._lastPanelWidth=null;o.initOld=o.init;o.isMainReportFlag=o.isMainReport;o.handlePageNavigationEvent=MochiKit.Base.partial(MochiKit.Signal.signal,o);MochiKit.Base.update(o,bobj.crv.ReportView);o._viewListener=new bobj.crv.ReportViewListener(o);return o};bobj.crv.ReportView={init:function(){this.initOld();if(this.reportPage){this.reportPage.init()}},addChild:function(widget){if(widget.widgetType=="ReportPage"){this.reportPage=widget}},focusFirstChild:function(){if(this.reportPage){return this.reportPage.focusFirstChild()}return false},delayedAddChild:function(widget){this.addChild(widget);append2(this.layer,widget.getHTML());widget.init()},scrollToHighlighted:function(scrollWindow){if(this.reportPage){this.reportPage.scrollToHighlighted(scrollWindow)}},update:function(update){if(update&&update.cons=="bobj.crv.newReportView"){if(update.args){this.viewStateId=update.args.viewStateId}for(var childVar in update.children){var child=update.children[childVar];if(child&&child.cons=="bobj.crv.newReportPage"){if(!this.reportPage){this.delayedAddChild(bobj.crv.createWidget(child))}else{this.reportPage.update(child)}break}}}},getHTML:function(){var h=bobj.html;var layerStyle={width:"100%",height:"100%",overflow:"hidden",position:"relative"};var html=h.DIV({id:this.id,role:"main",style:layerStyle},this.reportPage?this.reportPage.getHTML():"");return html},_doLayout:function(){if(this.reportPage){this.reportPage.resize(this.getWidth(),this.getHeight())}},isMainReport:function(){return this.isMainReportFlag},resize:function(){this._doLayout()},dispose:function(){if(this.reportPage){this.reportPage.dispose();bobj.deleteWidget(this.reportPage);delete this.reportPage}bobj.removeAllChildElements(this.layer)},getBestFitSize:function(){var w=0;var h=0;var pageSize=this.reportPage?this.reportPage.getBestFitSize():null;if(pageSize){w+=pageSize.width;h+=pageSize.height}return{width:w,height:h}},hasContent:function(){return this.reportPage!=null},hideFrame:function(){if(this.reportPage){this.reportPage.hideFrame()}},addCanvasListener:function(listener){if(this.reportPage){this.reportPage.addCanvasListener(listener)}},removeCanvasListener:function(listener){if(this.reportPage){this.reportPage.removeCanvasListener(listener)}},getCanvasListeners:function(){if(this.reportPage){return this.reportPage.getCanvasListeners()}return null},getPage:function(){return this.reportPage}};bobj.crv.ReportViewListener=function(view){if(!(this instanceof bobj.crv.ReportViewListener)){throw"PE. Must instantiate a new instance of bobj.crv.ReportViewListener"}if(view==null){throw"view cannot be null"}var currentPageNumber=null;var isMouseInReportPage=false;var isMouseInReportView=false;function onDocumentMouseMove(e){var target=bobj.getEventTarget(e);if(target.getAttribute&&target.getAttribute("type")!=="modal"){var isInView=bobj.isParentOf(target,view.layer);setMouseInReportView(isInView,e)}}bobj.connectDOMEvent(document,"onmousemove",onDocumentMouseMove);function setMouseInReportPage(isInPage,originalEvent){isMouseInReportPage=isInPage;if(isInPage){setMouseInReportView(true,originalEvent)}}function setMouseInReportView(isInView,originalEvent){if(isMouseInReportView&&!isInView){setTimeout(function(){if(!isMouseInReportView){fireEvent(bobj.crv.InternalCanvasEvents.REPORT_VIEW_MOUSE_LEAVE,new bobj.crv.ReportViewEvent(originalEvent))}},0)}else{if(!isMouseInReportView&&isInView){setTimeout(function(){if(isMouseInReportView){fireEvent(bobj.crv.InternalCanvasEvents.REPORT_VIEW_MOUSE_ENTER,new bobj.crv.ReportViewEvent(originalEvent))}},0)}}isMouseInReportView=isInView}view.addCanvasListener((function(){var listener=new bobj.crv.CanvasListener();listener.onEvent(bobj.crv.InternalCanvasEvents.REPORT_CANVAS_MOUSE_ENTER,function(e){if(currentPageNumber!=null&¤tPageNumber!=e.pageNumber){var page=view.getPage(currentPageNumber);if(!page){page=new function(){this.getNumber=function(){return currentPageNumber};this.getIframe=function(){return null}}}fireEvent(bobj.crv.CanvasEvents.REPORT_CANVAS_MOUSE_LEAVE,new bobj.crv.CanvasEventArgs(page,e.event))}if(currentPageNumber!=e.pageNumber){var page=view.getPage(e.pageNumber);fireEvent(bobj.crv.CanvasEvents.REPORT_CANVAS_MOUSE_ENTER,new bobj.crv.CanvasEventArgs(page,e.event))}currentPageNumber=e.pageNumber;setMouseInReportPage(true)});listener.onEvent(bobj.crv.InternalCanvasEvents.REPORT_CANVAS_MOUSE_LEAVE,function(e){if(currentPageNumber==e.pageNumber){var page=view.getPage(currentPageNumber);fireEvent(bobj.crv.CanvasEvents.REPORT_CANVAS_MOUSE_LEAVE,new bobj.crv.CanvasEventArgs(page,e.event));currentPageNumber=null;setMouseInReportPage(false)}});return listener})());function fireEvent(eventName,eventArgs){if(view.getCanvasListeners().length>0){MochiKit.Iter.forEach(view.getCanvasListeners(),function(l){l.fire(eventName,eventArgs)})}}bobj.crv.ReportViewEvent=function(originalEvent){this.event=new MochiKit.Signal.Event(null,originalEvent)}};bobj.crv.newButtonList=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId(),numLines:null,buttonWidth:24,buttonTooltip:L_bobj_crv_TabList,changeCB:null,label:null,tabIndex:0,multiSelect:false,menuWidth:null,menuTooltip:null},kwArgs);var o=newButtonWidget(kwArgs.id,kwArgs.label,bobj.crv.ButtonList._onClick,kwArgs.buttonWidth,null,kwArgs.buttonTooltip,kwArgs.tabIndex,0,_skin+"menus.gif",7,16,0,81,true,0,97);o._menu=newListWidget(kwArgs.id+"_menu",MochiKit.Base.bind(bobj.crv.ButtonList._onChange,o),kwArgs.multiSelect,kwArgs.menuWidth,kwArgs.numLines||2,kwArgs.menuTooltip,null,null);o._listItems=[];o._blOldInit=o.init;o._blOldGetHTML=o.getHTML;o._menuDiv=null;o._captureClicks=MenuWidget_captureClicks;o._releaseClicks=MenuWidget_releaseClicks;bobj.fillIn(o,kwArgs);o.widgetType="ButtonList";MochiKit.Base.update(o,bobj.crv.ButtonList);return o};bobj.crv.ButtonList={getMenu:function(){return this._menu},add:function(label,value,isSelected,id){if(this._menu&&this._menu.layer){this._menu.add(label,value,isSelected,id)}else{this._listItems.push({lbl:label,val:value,sel:isSelected,id:id})}},init:function(){var menu=this._menu;this._blOldInit();menu.init();this._menuDiv=getLayer(this.id+"_menuDiv");var listItems=this._listItems;for(var i=0,len=listItems.length;i<len;++i){var it=listItems[i];menu.add(it.lbl,it.val,it.sel,it.id)}this._listItems=[]},getHTML:function(){var h=bobj.html;var menuDivAtts={id:this.id+"_menuDiv",onmousedown:"event.cancelBubble=true","class":"menuFrame",style:{visibility:"hidden",position:"absolute","z-index":5000}};return this._blOldGetHTML()+h.DIV(menuDivAtts,this._menu.getHTML())},isMenuShowing:function(){return this._menuDiv&&this._menuDiv.style.visibility!="hidden"},hideMenu:function(){if(this._menuDiv){this._menuDiv.style.visibility="hidden"}},showMenu:function(){if(this._menuDiv){this._captureClicks();var body=document.body;if(this._menuDiv.parentNode!==body){body.appendChild(this._menuDiv)}var divStyle=this._menuDiv.style;divStyle.left="-1000px";divStyle.top="-1000px";divStyle.visibility="visible";var winDim=MochiKit.Style.getViewportDimensions();var w=this._menu.layer.offsetWidth;var h=this._menu.getHeight();if(!this.numLines){h=Math.min(this._menu.layer.scrollHeight+10,winDim.h-10);this._menu.resize(null,h)}var btnPos=getPosScrolled(this.layer);var x=btnPos.x;var y=btnPos.y+this.getHeight();var xRight=x+w+4;var yBottom=y+h+4;var xMax=winDim.w+body.scrollLeft-Math.max(0,(winDim.w-body.offsetWidth));if(xRight>xMax){x=Math.max(0,x-(xRight-xMax))}var yMax=winDim.h+body.scrollTop;if(yBottom>yMax){y=Math.max(0,y-(yBottom-yMax))}divStyle.left=x+"px";divStyle.top=y+"px"}},_captureClicks:function(){var BIND=MochiKit.Base.bind;try{this.layer.onmousedown=BIND(this._onCaptureClick,this,true);this._oldMousedown=document.onmousedown;document.onmousedown=BIND(this._onCaptureClick,this,false)}catch(ex){if(bobj.crv.config.isDebug){throw ex}}},_releaseClicks:function(){if(this.layer.onmousedown){this.layer.onmousedown=null;document.onmousedown=this._oldMousedown}},_onClick:function(){if(!this._cancelNextClick){this.showMenu()}this._cancelNextClick=false},_onChange:function(){this._releaseClicks();this.hideMenu();if(this.changeCB){this.changeCB()}},_onCaptureClick:function(cancelNext,e){this._cancelNextClick=cancelNext;eventCancelBubble(e);this.hideMenu();this._releaseClicks()}};bobj.crv.newReportAlbum=function(kwArgs){var mb=MochiKit.Base;var UPDATE=mb.update;var BIND=mb.bind;var ALBUM=bobj.crv.ReportAlbum;kwArgs=UPDATE({id:bobj.uniqueId(),initTabIdx:0,width:800,height:500,displayDrilldownTab:true},kwArgs);var tabbar=newNaviBarWidget(bobj.uniqueId(),_HorizTabTopWithClose,null,null,kwArgs.width,null,null,null,false,true,false);var o=newTabbedZone(kwArgs.id,tabbar,kwArgs.width,kwArgs.height);tabbar.cb=BIND(ALBUM._onSelectTab,o);tabbar.closeTab=BIND(ALBUM._removeView,o,true);bobj.fillIn(o,kwArgs);o.widgetType="ReportAlbum";o._views=[];o._hideFrame=false;o.selectOld=o.select;UPDATE(o,ALBUM);o.getNewRowBelowTabBar=bobj.crv.ReportAlbum.addBreadcrumb;o.displayBreadcrumb=undefined;o._signalMapping={};return o};bobj.crv.ReportAlbum={getTabBarHeight:function(){return this.tabs.getHeight()},init:function(){var partial=MochiKit.Base.partial;var signal=MochiKit.Signal.signal;var connect=MochiKit.Signal.connect;this.tzOldInit();this.tabs.init();if(this.breadcrumb){connect(this.breadcrumb,"showBreadcrumb",this,this.showBreadcrumb);connect(this.breadcrumb,"hideBreadcrumb",this,this.hideBreadcrumb);connect(this.breadcrumb,"breadcrumbNavigate",partial(signal,this,"breadcrumbNavigate"));this.breadcrumb.init()}this.showDrilldownTab(this.displayDrilldownTab);var views=this._views;if(views.length>0){for(var i=0,len=views.length;i<len;i++){views[i].init()}if(this.initTabIdx<0||this.initTabIdx>=views.length){this.initTabIdx=0}this.select(this.initTabIdx)}},addCanvasListener:function(canvasListener){for(var i=0,len=this._views.length;i<len;i++){this._views[i].addCanvasListener(canvasListener)}},removeCanvasListener:function(canvasListener){for(var i=0,len=this._views.length;i<len;i++){this._views[i].removeCanvasListener(canvasListener)}},showBreadcrumb:function(){if(this.displayBreadcrumb!=true){this.displayBreadcrumb=true;getLayer(this.id+"_breadcrumbtr").style.display=_ie?"block":"table-row";this.resizeOuter(this.getWidth(),this.getHeight())}},getBreadcrumb:function(){return this.breadcrumb},hideBreadcrumb:function(){if(this.displayBreadcrumb!=false){this.displayBreadcrumb=false;getLayer(this.id+"_breadcrumbtr").style.display="none";this.resizeOuter(this.getWidth(),this.getHeight())}},showDrilldownTab:function(isDisplay){this.displayDrilldownTab=isDisplay;try{this.tabs.layer.parentNode.parentNode.style.display=isDisplay?(_ie?"block":"table-row"):"none"}catch(e){}},isDisplayDrilldownTab:function(){return this.displayDrilldownTab},setHideFrame:function(hide){this._hideFrame=hide;var selectedView=this.getSelectedView();if(selectedView&&this._hideFrame){selectedView.hideFrame()}},addBreadcrumb:function(){if(this.breadcrumb){var align=bobj.crv.config.isRTL?"right":"left";return'<tr id="'+this.id+'_breadcrumbtr" style="display:none;height:23px" class="hideableFrame" valign="bottom"><td></td><td style="vertical-align: middle" align="'+align+'">'+this.breadcrumb.getHTML()+"</td><td></td></tr>"}else{return""}},update:function(update){if(!update||update.cons!=="bobj.crv.newReportAlbum"){return}var nNewViews=0;for(var i=0,len=update.children.length;i<len;i++){var child=update.children[i];if(child){switch(child.cons){case"bobj.crv.newReportView":case"bobj.crv.newScrollingReportView":var view=this._views[nNewViews++];if(view){view.update(child)}break;case"bobj.crv.newReportBreadcrumb":if(this.breadcrumb){this.breadcrumb.update(child)}break}}}var updateChildrenLength=nNewViews;var currentViewsLength=this._views.length;if(updateChildrenLength>currentViewsLength){for(var i=currentViewsLength,len=updateChildrenLength;i<len;i++){this.delayedAddChild(bobj.crv.createWidget(update.children[i]))}}else{if(updateChildrenLength<currentViewsLength){for(var i=currentViewsLength-1,len=updateChildrenLength;i>=len;i--){this._removeView(false,i)}}}this.initTabIdx=update.args.initTabIdx;this.select(this.initTabIdx)},findTabNumber:function(viewStateId){var views=this._views;for(var i=0,len=views.length;i<len;i++){if(views[i].viewStateId==viewStateId){return i}}return -1},delayedAddChild:function(view){this._views.push(view);var tab=this.tabs.add(view.label,view.tooltip);var tabHTML=this.getTabHTML(this._views.length-1);append(getLayer(this.id+"_container"),tabHTML);view.init()},addChild:function(child){if(child){switch(child.widgetType){case"ReportView":case"ScrollingReportView":this._views.push(child);this.add(child.label,child.tooltip);break;case"ReportBreadcrumb":this.breadcrumb=child;break}}},focusFirstChild:function(){var view=this.getSelectedView();if(view){return view.focusFirstChild()}return false},connectViewSignals:function(view){var connect=MochiKit.Signal.connect;var signal=MochiKit.Signal.signal;var partial=MochiKit.Base.partial;if(this._signalMapping[view]!=null){this.disconnectViewSignals(view)}this._signalMapping[view]=new Array();var arr=this._signalMapping[view];arr.push(connect(view,"getPage",partial(signal,this,"getPage")));arr.push(connect(view,"moveFocusGroup",partial(signal,this,"moveFocusGroup")));arr.push(connect(view,"updateCurrentPage",partial(signal,this,"updateCurrentPage")));arr.push(connect(view,"updateLastPage",partial(signal,this,"updateLastPage")));arr.push(connect(view,"nextPage",partial(signal,this,"nextPage")));arr.push(connect(view,"prevPage",partial(signal,this,"prevPage")));arr.push(connect(view,"firstPage",partial(signal,this,"firstPage")));arr.push(connect(view,"lastPage",partial(signal,this,"lastPage")));arr.push(connect(view,"selectPage",partial(signal,this,"selectPage")));arr.push(connect(view,"findLastPageNumber",partial(signal,this,"findLastPageNumber")))},disconnectViewSignals:function(view){if(this._signalMapping[view]!=null){var arr=this._signalMapping[view];while(arr.length>0){bobj.crv.SignalDisposer.dispose(arr.pop(),false)}delete this._signalMapping[view]}},getHTML:function(){var html=this.beginHTML();var children=this._views;for(var i=0,len=children.length;i<len;++i){html+=this.getTabHTML(i)}html+=this.endHTML();return html},getTabHTML:function(index){var tab=this.tabs.items[index];var view=this._views[index];var html="";if(tab&&view){html+=this.beginTabHTML(tab);html+=view.getHTML();html+=this.endTabHTML()}return html},resizeOuter:function(w,h){var tabHeight=33;var frameWidth=10;if(bobj.isNumber(h)){if(this.displayDrilldownTab||this.displayBreadcrumb){h-=tabHeight}else{h-=10}h=Math.max(h,0)}if(bobj.isNumber(w)){if(!this._hideFrame){w-=frameWidth}w=Math.max(w,0)}if(this.breadcrumb){this.breadcrumb.resize(w,h)}this.resize(w,h);this.tabs.resize(w);var selectedView=this.getSelectedView();if(selectedView){selectedView.resize(w,h)}},getBestFitSize:function(){var w=this._hideFrame?0:10;var h=(this.displayDrilldownTab||this.displayBreadcrumb)?33:10;var selectedView=this.getSelectedView();if(selectedView){var viewSize=selectedView.getBestFitSize();w+=viewSize.width;h+=viewSize.height}return{width:w,height:h}},beginTabHTML:function(tab){return bobj.html.openTag("div",{id:tab.zoneId,style:{display:"none",width:this.w+"px",height:this.h+"px",position:"relative"}})},getSelectedView:function(){return this._views[this.oldIndex]},select:function(index){if(index>=0&&index<this._views.length&&index!=this.oldIndex){var selectedView=this.getSelectedView();if(selectedView){this.disconnectViewSignals(selectedView);selectedView.dispose()}var selectedView=this._views[index];this.connectViewSignals(selectedView);this.selectOld(index);MochiKit.Signal.signal(this,"viewChanged")}},_removeView:function(autoSelectNext,index){var removedView=this._views[index];var removedTab=this.tabs.items[index];autoSelectNext=(removedTab!=null&&removedTab.isSelected&&autoSelectNext);if(removedView){removedView.dispose();bobj.deleteWidget(removedView);MochiKit.Signal.signal(this,"removeView",removedView)}if(removedTab.isSelected){this.oldIndex=-1}arrayRemove(this,"_views",index);this.tabs.remove(index,autoSelectNext);bobj.deleteWidget(removedTab)},_onSelectTab:function(index){if(index!=this.oldIndex){MochiKit.Signal.signal(this,"selectView",this._views[index])}}};bobj.crv.newReportBreadcrumb=function(kwArgs){var UPDATE=MochiKit.Base.update;kwArgs=UPDATE({id:bobj.uniqueId(),isVisible:kwArgs.isVisible,values:kwArgs.values,visualStyle:{className:null,backgroundColor:null,borderWidth:null,borderStyle:null,borderColor:null,fontFamily:null,fontWeight:null,textDecoration:null,color:null,width:null,height:null,fontStyle:null,fontSize:null}},kwArgs);var o=newWidget(kwArgs.id);o.margin=0;bobj.fillIn(o,kwArgs);o.widgetType="ReportBreadcrumb";o.initOld=o.init;UPDATE(o,bobj.crv.ReportBreadcrumb);o._newWidth="";return o};bobj.crv.ReportBreadcrumb={init:function(){this.initOld();bobj.setVisualStyle(this.layer,this.visualStyle);this.updateUI()},getHTML:function(){var h=bobj.html;return h.LABEL({"class":"crvHidden",id:this.id+"_label"},L_bobj_crv_Breadcrumb)+h.DIV({id:this.id,"class":"dialogzone","aria-labelledby":this.id+"_label",style:{width:"100%",overflow:"hidden",position:"relative"}})},update:function(update){if(update!=null&&update.cons=="bobj.crv.newReportBreadcrumb"){this.values=update.args.values;this.setVisible(update.args.isVisible)}},updateUI:function(){var signal=MochiKit.Signal.signal;if(this.isVisible&&this.values!=null&&this.values.length>0){this.refreshHTML();this.layer.setAttribute("role","navigation");signal(this,"showBreadcrumb")}else{signal(this,"hideBreadcrumb");this.layer.removeAttribute("role")}},setVisible:function(isVisible){this.isVisible=isVisible;this.updateUI()},navigate:function(args){MochiKit.Signal.signal(this,"breadcrumbNavigate",args);return false},refreshHTML:function(){var values=this.values;bobj.removeAllChildElements(this.layer);if(values&&values.length>1){var iconURI=bobj.crv.allInOne.uri;var SPAN=MochiKit.DOM.SPAN;var A=MochiKit.DOM.A;var TABLE=MochiKit.DOM.TABLE;var TBODY=MochiKit.DOM.TBODY;var TR=MochiKit.DOM.TR;var TD=MochiKit.DOM.TD;var bind=MochiKit.Base.bind;var cells=[];var first=values[0];var last=values[values.length-1];var drillName=first.drillname;var icon=newIconWidget(o.id+"_icon_"+0,iconURI,null,null,null,16,16,0,bobj.crv.allInOne.breadcrumbReportDy);bobj.crv.setAllClasses(icon,"breadcrumb");var crumb=this._createBreadcrumbItem(this.id+"_a_"+0,icon,drillName,first);cells.push(TD(null,crumb));var sep=MochiKit.DOM.IMG({height:"9",width:"14",src:bobj.crvUri("images/breadcrumbSep"+(bobj.crv.config.isRTL?"_rtl":"")+".gif")},null);sep.style.whiteSpace="nowrap";cells.push(TD(null,sep));drillName=last.drillname;var isSub=last.issub;var dy=isSub?bobj.crv.allInOne.breadcrumbSubreportDy:bobj.crv.allInOne.breadcrumbDrillDy;icon=newIconWidget(o.id+"_icon_"+(values.length-1),iconURI,null,null,null,16,16,0,dy);bobj.crv.setAllClasses(icon,"breadcrumb");crumb=this._createBreadcrumbItem(this.id+"_a_"+(values.length-1),icon,drillName);cells.push(TD(null,crumb));var tbl=TABLE({cellSpacing:"0",cellPadding:"0"},TBODY(null,MochiKit.DOM.TR(null,cells)));this.layer.appendChild(tbl);var parentElement=this.layer.lastChild.lastChild.lastChild;var refElement=parentElement.lastChild.previousSibling;for(i=1;i<values.length-1;i++){drillName=values[i].drillname;isSub=values[i].issub;icon=(isSub&&i==1)?newIconWidget(o.id+"_icon_"+i,iconURI,null,null,null,16,16,0,bobj.crv.allInOne.breadcrumbSubreportDy):null;bobj.crv.setAllClasses(icon,"breadcrumb");crumb=this._createBreadcrumbItem(this.id+"_a_"+i,icon,drillName,values[i]);parentElement.insertBefore(TD(null,sep.cloneNode(true)),refElement);parentElement.insertBefore(TD(null,crumb),refElement);if(this.layer.firstChild.clientWidth+27>this._newWidth){parentElement.removeChild(refElement.previousSibling);var tooltip="";for(j=i;j<values.length-1;j++){tooltip+=values[j].drillname;if(j<values.length-2){tooltip+=" -> "}}var span=SPAN({title:tooltip},". . .");span.style.whiteSpace="nowrap";parentElement.insertBefore(TD(null,span),refElement);break}}}},resize:function(width){if(this.values&&this._newWidth!=width){this._newWidth=width;this.refreshHTML()}},_createBreadcrumbItem:function(id,icon,drillName,drillValue){var cells=[];var text=null;if(drillValue){text=MochiKit.DOM.A({id:id,"class":"breadcrumbLink",title:L_bobj_crv_DrillTo.replace("%1",drillName),href:"javascript:void(0)",onclick:MochiKit.Base.bind(this.navigate,this,drillValue)},null)}else{text=MochiKit.DOM.SPAN({id:id,"class":"breadcrumbText"},null)}text.style.whiteSpace="nowrap";var tmp=convStr(drillName,true);if(bobj.crv.config.isRTL&&hasNoRTLCharacters(tmp)){text.style.direction="ltr";text.style.unicodeBidi="embed"}text.innerHTML=tmp;var td=null;if(icon){td=MochiKit.DOM.TD(null,null);td.innerHTML=icon.getHTML();cells.push(td)}td=MochiKit.DOM.TD(null,text);cells.push(td);return MochiKit.DOM.TABLE({"class":"iconText",style:{fontSize:"10px"},cellSpacing:"0",cellPadding:"0"},MochiKit.DOM.TBODY(null,MochiKit.DOM.TR(null,cells)))}};bobj.crv.newViewer=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId(),isDisplayModalBG:false,isLoadContentOnInit:false,layoutType:bobj.crv.Viewer.LayoutTypes.FIXED,visualStyle:{className:null,backgroundColor:null,borderWidth:null,borderStyle:null,borderColor:null,fontFamily:null,fontWeight:null,textDecoration:null,color:null,width:"800px",height:"600px",fontStyle:null,fontSize:null,top:"0px",left:"0px"}},kwArgs);var o=newWidget(kwArgs.id);bobj.fillIn(o,kwArgs);o.widgetType="Viewer";o._topToolbar=null;o._reportAlbum=null;o._leftPanel=null;o._separator=null;o._print=null;o._export=null;o._promptDlg=null;o._reportProcessing=null;o._eventListeners=[];o._statusbar=null;o._leftPanelResizeGrabber=newGrabberWidget(o.id+"_leftPanelResizeGrabber",bobj.bindFunctionToObject(bobj.crv.Viewer.onGrabberMove,o),0,0,4,1,true);o.initOld=o.init;o._boundaryControl=new bobj.crv.BoundaryControl(kwArgs.id+"_bc");o._modalBackground=new bobj.crv.ModalBackground(kwArgs.id+"_mb",bobj.bindFunctionToObject(bobj.crv.Viewer.keepFocus,o));MochiKit.Base.update(o,bobj.crv.Viewer);window[o.id]=o;o._actionListeners=[];return o};bobj.crv.Viewer={LayoutTypes:{FIXED:"fixed",CLIENT:"client",FITREPORT:"fitreport"},PromptingTypes:{HTML:"html",FLEX:"flex"},Components:{Toolbar:"Toolbar",LeftPanel:"LeftPanel",Statusbar:"Statusbar",Breadcrumb:"Breadcrumb"},onGrabberMove:function(x){if(this._leftPanel){this._leftPanel.resize(x,null);this._doLayout()}},keepFocus:function(){var swf=bobj.crv.params.FlexParameterBridge.getSWF(this.id);if(swf){swf.focus()}},addChild:function(widget){if(widget.widgetType=="ReportAlbum"){this._reportAlbum=widget}else{if(widget.widgetType=="Toolbar"){this._topToolbar=widget;this._separator=newSeparatorWidget(this.id+"_sep",null,0,4,2,4)}else{if(widget.widgetType=="Statusbar"){this._statusbar=widget}else{if(widget.widgetType=="PrintUI"){this._print=widget;this._print.setParent(this)}else{if(widget.widgetType=="ExportUI"){this._export=widget;this._export.setParent(this)}else{if(widget.widgetType=="ReportProcessingUI"){this._reportProcessing=widget;this._reportProcessing.setParent(this)}else{if(widget.widgetType=="LeftPanel"){this._leftPanel=widget}}}}}}}},getHTML:function(){var h=bobj.html;var layerStyle={overflow:"hidden",position:"relative",left:this.visualStyle.left,top:this.visualStyle.top};var innerStyle={width:_ie&&_isQuirksMode?"100%":"",height:_ie&&_isQuirksMode?"100%":""};var dir=bobj.crv.config.isRTL?"rtl":"ltr";var html=h.DIV({dir:dir,id:this.id,style:layerStyle,"class":"dialogzone"},h.DIV({"class":"crviewer",style:innerStyle},this._topToolbar?this._topToolbar.getHTML():"",this._separator?this._separator.getHTML():"",this._leftPanel?this._leftPanel.getHTML():"",this._reportAlbum?this._reportAlbum.getHTML():"",this._leftPanelResizeGrabber?this._leftPanelResizeGrabber.getHTML():"",this._statusbar?this._statusbar.getHTML():""));return html},_onWindowResize:function(){if(this._currWinSize.w!=winWidth()||this._currWinSize.h!=winHeight()){this._doLayout();this._currWinSize.w=winWidth();this._currWinSize.h=winHeight()}},init:function(){this.initOld();this._initSignals();if(this._reportAlbum){this._reportAlbum.init()}if(this._topToolbar){this._topToolbar.init()}if(this._separator){this._separator.init()}if(this._leftPanel){this._leftPanel.init()}if(this._statusbar){this._statusbar.init()}if(this._leftPanelResizeGrabber){this._leftPanelResizeGrabber.init();if(!this._leftPanel||!this._leftPanel.isToolPanelDisplayed()){this._leftPanelResizeGrabber.setDisplay(false)}}this.setDisplayModalBackground(this.isDisplayModalBG);bobj.setVisualStyle(this.layer,this.visualStyle);this._currWinSize={w:winWidth(),h:winHeight()};var connect=MochiKit.Signal.connect;var signal=MochiKit.Signal.signal;if(this.layoutType.toLowerCase()==bobj.crv.Viewer.LayoutTypes.CLIENT){connect(window,"onresize",this,"_onWindowResize")}if(!this._topToolbar&&!this._statusbar&&this._reportAlbum&&!this._reportAlbum.isDisplayDrilldownTab()){this.layer.className+=" hideFrame";this._reportAlbum.setHideFrame(true)}if(this.layer&&_ie&&bobj.checkParent(this.layer,"TABLE")){connect(window,"onload",this,"_doLayoutOnLoad");this._oldCssVisibility=this.css.visibility;this.css.visibility="hidden"}else{this._doLayout()}this.scrollToHighlighted();signal(this,"initialized",this.isLoadContentOnInit);bobj.crv.ViewerManager.onViewerInit(this)},resetSearch:function(){if(this._leftPanel){this._leftPanel.resetSearch()}},_initSignals:function(){var partial=MochiKit.Base.partial;var signal=MochiKit.Signal.signal;var connect=MochiKit.Signal.connect;var fe=MochiKit.Iter.forEach;if(this._topToolbar){fe(["zoom","drillUp","refresh","search","export","print","selectHistory","clearHistory"],function(sigName){connect(this._topToolbar,sigName,this,partial(this.fireAndSignalActionEvent,sigName))},this);fe(["firstPage","prevPage","nextPage","lastPage","selectPage"],function(sigName){connect(this._topToolbar,sigName,this,partial(this._onNavigatePage,sigName))},this);connect(this._topToolbar,"onSetDisplay",this,"_onToolbarSetDisplayListener")}this._initLeftPanelSignals();if(this._reportAlbum){fe(["selectView","removeView","viewChanged","getPage","firstPage","prevPage","nextPage","lastPage","selectPage","findLastPageNumber","breadcrumbNavigate"],function(sigName){connect(this._reportAlbum,sigName,partial(signal,this,sigName))},this);connect(this._reportAlbum,"updateLastPage",this,partial(this._onUpdateLastPageNumber));connect(this._reportAlbum,"updateCurrentPage",this,partial(this._onUpdatePageNumber));connect(this._reportAlbum,"moveFocusGroup",this,partial(this.moveGroupFocus,this._reportAlbum))}if(this._print){connect(this._print,"printSubmitted",partial(signal,this,"printSubmitted"))}if(this._export){connect(this._export,"exportSubmitted",partial(signal,this,"exportSubmitted"))}fe([this._export,this._print,this._topToolbar],function(obj){if(obj){connect(obj,"showError",this,this.showError)}},this);bobj.connectDOMEvent(this.layer,_ie||_saf?"onkeydown":"onkeypress",bobj.bindFunctionToObject(this._onKeyDownListener,this))},_onKeyDownListener:function(e){if(e.keyCode==117){var target=e.originalTarget||e.srcElement;var comp=this.findComponent(target);if(!comp){return false}this.moveGroupFocus(comp,!e.shiftKey);(new MochiKit.Signal.Event(this,e)).stop();return false}},moveGroupFocus:function(component,isNextGroup){if(component!=null){function isNotNull(o){return o!=null}var tabOrderList=MochiKit.Base.filter(isNotNull,[this._topToolbar,this._leftPanel,this._reportAlbum]);if(tabOrderList.length<=1){return}var index=MochiKit.Base.findIdentical(tabOrderList,component);if(index<0){throw"PE, Failed to find focused component"}else{var newIndex=0;if(isNextGroup){newIndex=(index+1)%tabOrderList.length}else{newIndex=index-1;if(newIndex<0){newIndex=tabOrderList.length-1}}var nextComponent=tabOrderList[newIndex];var isNextChildFocused=nextComponent.focusFirstChild();if(!isNextChildFocused){this.moveGroupFocus(nextComponent,isNextGroup)}}}},findComponent:function(element){if(element==null||element==this.layer){return null}else{if(element==this._topToolbar.layer){return this._topToolbar}else{if(element==this._leftPanel.layer){return this._leftPanel}else{if(element==this._reportAlbum.layer){return this._reportAlbum}else{if(element==this._statusbar.layer){return this._statusbar}else{return this.findComponent(element.parentNode)}}}}}},addCanvasListener:function(canvasListener){if(this._reportAlbum){this._reportAlbum.addCanvasListener(canvasListener)}},removeCanvasListener:function(canvasListener){if(this._reportAlbum){this._reportAlbum.removeCanvasListener(canvasListener)}},fireActionEvent:function(signalName){var isHandled=false;if(this._actionListeners.length>0){var actionEvent=bobj.crv.ActionEventFactory.create(signalName,MochiKit.Base.extend(null,arguments,1));if(actionEvent){for(var i=0;i<this._actionListeners.length;i++){this._actionListeners[i].fire(signalName,actionEvent)}isHandled=actionEvent.isHandled()}}return isHandled},fireAndSignalActionEvent:function(signalName){var isHandled=this.fireActionEvent.apply(this,arguments);if(!isHandled){MochiKit.Signal.signal.apply(null,MochiKit.Base.extend([this],arguments))}},addActionListener:function(listener){var hasListener=MochiKit.Base.findIdentical(this._actionListeners,listener)>=0;if(!hasListener){this._actionListeners.push(listener)}},removeActionListener:function(listener){var index=MochiKit.Base.findIdentical(this._actionListeners,listener);if(index>=0){this._actionListeners.splice(index,1)}},_onUpdateLastPageNumber:function(groupPath,lastPageNumber,lastPageNumberKnown){var numPagesString=lastPageNumber;if(!lastPageNumberKnown){numPagesString+="+"}if(this._topToolbar){this._topToolbar.setPageNumber(null,numPagesString)}MochiKit.Signal.signal(this,"updateLastPage",groupPath,lastPageNumber,lastPageNumberKnown)},_onUpdatePageNumber:function(currentPage,totalPages){if(this._topToolbar){this._topToolbar.setPageNumber(currentPage,totalPages)}MochiKit.Signal.signal(this,"updateCurrentPage",currentPage)},_onNavigatePage:function(){if(this._reportAlbum){var activeView=this._reportAlbum.getSelectedView();if(activeView){activeView.handlePageNavigationEvent.apply(activeView,arguments)}}},getLeftPanel:function(){return this._leftPanel},_initLeftPanelSignals:function(){var partial=MochiKit.Base.partial;var signal=MochiKit.Signal.signal;var connect=MochiKit.Signal.connect;var fe=MochiKit.Iter.forEach;if(this._leftPanel){fe(["grpDrilldown","grpNodeRetrieveChildren","grpNodeCollapse","grpNodeExpand","resetParamPanel","resizeToolPanel","searchAll","selectSearchItem"],function(sigName){connect(this._leftPanel,sigName,this,partial(this.fireAndSignalActionEvent,sigName))},this);connect(this._leftPanel,"switchPanel",this,"_onSwitchPanel");connect(this._leftPanel,"onSetDisplay",this,"_onLeftPanelSetDisplayListener")}},_isMainReportViewSelected:function(){var currentView=this._reportAlbum.getSelectedView();return currentView&¤tView.isMainReport()},_doLayoutOnLoad:function(){this.css.visibility=this._oldCssVisibility;this._doLayout()},_doLayout:function(){var topToolbarH=this._topToolbar?this._topToolbar.getHeight():0;var topToolbarW=this._topToolbar?this._topToolbar.getWidth():0;var separatorH=this._separator?this._separator.getHeight():0;var statusbarH=this._statusbar?this._statusbar.getHeight():0;var leftPanelW=this._leftPanel?this._leftPanel.getBestFitWidth():0;var leftPanelGrabberW=this._leftPanelResizeGrabber&&this._leftPanelResizeGrabber.isDisplayed()?this._leftPanelResizeGrabber.getWidth():0;var layout=this.layoutType.toLowerCase();var toolPanel=this._leftPanel?this._leftPanel.getToolPanel():null;var hasPercentWidth=(toolPanel&&toolPanel.isDisplayed()&&toolPanel.hasPercentWidth());if(bobj.crv.Viewer.LayoutTypes.CLIENT==layout){this.css.width="100%";this.css.height="100%";if(hasPercentWidth){leftPanelW=Math.max(leftPanelW,(this.getWidth()*toolPanel.getPercentWidth())-leftPanelGrabberW)}}else{if(bobj.crv.Viewer.LayoutTypes.FITREPORT==layout){var viewerWidth=0;var viewerHeight=0;if(hasPercentWidth){leftPanelW+=200}if(this._reportAlbum){var albumSize=this._reportAlbum.getBestFitSize();viewerWidth=(albumSize.width+leftPanelW+leftPanelGrabberW<topToolbarW)?topToolbarW:albumSize.width+leftPanelW+leftPanelGrabberW+2;viewerHeight=(albumSize.height+topToolbarH+separatorH+statusbarH+2)}else{if(this._leftPanel){viewerWidth=leftPanelW+2;viewerHeight=(this._leftPanel.getBestFitHeight()+topToolbarH+separatorH+statusbarH+2)}}this.css.height=viewerHeight+"px";this.css.width=viewerWidth+"px"}else{this.css.width=this.visualStyle.width;this.css.height=this.visualStyle.height;if(hasPercentWidth){leftPanelW=Math.max(leftPanelW,(this.getWidth()*toolPanel.getPercentWidth())-leftPanelGrabberW)}}}if(this._topToolbar){this._topToolbar.doLayout()}var albumW=Math.max(0,this.getWidth()-leftPanelW-leftPanelGrabberW-2);var albumH=Math.max(0,this.getHeight()-topToolbarH-separatorH-statusbarH-2);if(this._reportAlbum){this._reportAlbum.resizeOuter(albumW,albumH);this._reportAlbum.move(leftPanelW+leftPanelGrabberW+((bobj.crv.config.isRTL&&_webKit)?10:0),topToolbarH+separatorH)}if(this._leftPanel){this._leftPanel.resize(leftPanelW,albumH);this._leftPanel.move(0,topToolbarH+separatorH)}if(this._leftPanelResizeGrabber&&this._leftPanelResizeGrabber.isDisplayed()){this._leftPanelResizeGrabber.resize(null,albumH);this._leftPanelResizeGrabber.move(leftPanelW,topToolbarH+separatorH)}if(this._statusbar){this._statusbar.doLayout();this._statusbar.move(0,topToolbarH+separatorH+albumH)}if(this._print&&this._print.layer){this._print.center()}if(this._export&&this._export.layer){this._export.center()}if(this._reportProcessing&&this._reportProcessing.layer){this._reportProcessing.center()}var viewerP=MochiKit.Style.getElementPosition(this.layer);var viewerD=MochiKit.Style.getElementDimensions(this.layer);if(this._modalBackground){this._modalBackground.updateBoundary(viewerD.w,viewerD.h,viewerP.x,viewerP.y)}var bodyD=bobj.getBodyScrollDimension();var isViewerCutOff=((viewerP.x+viewerD.w)>=bodyD.w)||((viewerP.y+viewerD.h)>=bodyD.h);if(isViewerCutOff&&(layout!=bobj.crv.Viewer.LayoutTypes.CLIENT)){this._boundaryControl.updateBoundary(viewerD.w,viewerD.h,viewerP.x,viewerP.y)}else{this._boundaryControl.updateBoundary(0,0,0,0)}var FLEXUI=bobj.crv.params.FlexParameterBridge;var swf=FLEXUI.getSWF(this.id);if(swf){if(this._promptDlg&&this._promptDlg.style.visibility!="hidden"){if(swf._isMaximized){FLEXUI.fitScreen(this.id)}else{FLEXUI.resize(this.id,swf.offsetHeight,swf.offsetWidth,true)}}}this._adjustWindowScrollBars()},_onSwitchPanel:function(panelType){var Type=bobj.crv.ToolPanelType;if(Type.Search==panelType){MochiKit.Signal.signal(this,"showSearch")}else{if(Type.GroupTree==panelType){MochiKit.Signal.signal(this,"showGroupTree")}else{if(Type.ParameterPanel==panelType){MochiKit.Signal.signal(this,"showParamPanel")}else{if(Type.None==panelType){MochiKit.Signal.signal(this,"hideToolPanel")}}}}this._leftPanelResizeGrabber.setDisplay(!(Type.None==panelType));this._doLayout()},resize:function(w,h){if(bobj.isNumber(w)){w=w+"px"}if(bobj.isNumber(h)){h=h+"px"}this.visualStyle.width=w;this.visualStyle.height=h;this._doLayout()},setPageNumber:function(curPageNum,numPages){if(this._topToolbar){this._topToolbar.setPageNumber(curPageNum,numPages)}},showPromptDialog:function(html,closeCB){if(!this._promptDlg){var promptDialog_ShowCB=MochiKit.Base.bind(this._onShowPromptDialog,this);var promptDialog_HideCB=MochiKit.Base.bind(this._onHidePromptDialog,this);this._promptDlg=bobj.crv.params.newParameterDialog({id:this.id+"_promptDlg",showCB:promptDialog_ShowCB,hideCB:promptDialog_HideCB});this._promptDlg.setParent(this)}this._promptDlg.setCloseCB(closeCB);this._promptDlg.setNoCloseButton(!closeCB);this._originalDocumentOnKeyPress=document.onkeypress;this.updatePromptDialog(html)},updatePromptDialog:function(html){html=html||"";var callback=function(prompt,prompthtml){return function(){prompt.updateHtmlAndDisplay(prompthtml)}};bobj.loadJSResourceAndExecCallBack(bobj.crv.config.resources.HTMLPromptingSDK,callback(this._promptDlg,html));if(bobj.isParentWindowTestRunner()){setTimeout(MochiKit.Base.partial(MochiKit.Signal.signal,this,"promptDialogIsVisible"),5)}},showFlexPromptDialog:function(servletURL,closeCB,isInitializing){var FLEXUI=bobj.crv.params.FlexParameterBridge;var VIEWERFLEX=bobj.crv.params.ViewerFlexParameterAdapter;isInitializing=typeof(isInitializing)!=="undefined"?isInitializing:false;if(!FLEXUI.checkFlashPlayer()){var msg=L_bobj_crv_FlashRequired;this.showError(msg.substr(0,msg.indexOf("{0}")),FLEXUI.getInstallHTML());return}VIEWERFLEX.setViewerLayoutType(this.id,this.layoutType);if(!this._promptDlg){this._promptDlg=document.createElement("div");this._promptDlg.id=this.id+"_promptDlg";this._promptDlg.closeCB=closeCB;var PROMPT_STYLE=this._promptDlg.style;PROMPT_STYLE.border="1px";PROMPT_STYLE.borderStyle="solid";PROMPT_STYLE.borderColor="#000000";PROMPT_STYLE.position="absolute";PROMPT_STYLE.zIndex=bobj.constants.modalLayerIndex;var divID=bobj.uniqueId();this._promptDlg.innerHTML='<div id="'+divID+'" name="'+divID+'"></div>';var onfocusCB=bobj.bindFunctionToObject(bobj.crv.Viewer.keepFocus,this);var firstLink=MochiKit.DOM.createDOM("BUTTON",{id:this._promptDlg.id+"_firstLink",onfocus:onfocusCB,style:{width:"0px",height:"0px",position:"absolute",left:"-30px",top:"-30px"}});var lastLink=MochiKit.DOM.createDOM("BUTTON",{id:this._promptDlg.id+"_lastLink",onfocus:onfocusCB,style:{width:"0px",height:"0px",position:"absolute",left:"-30px",top:"-30px"}});document.body.appendChild(firstLink);document.body.appendChild(this._promptDlg);document.body.appendChild(lastLink);var state=bobj.crv.stateManager.getComponentState(this.id);var sessionID=state.common.reportSourceSessionID;var lang=bobj.crv.getLangCode();var isRTL=bobj.crv.config.isRTL;FLEXUI.setMasterCallBack(this.id,VIEWERFLEX);FLEXUI.createSWF(this.id,divID,servletURL,true,lang,sessionID,isRTL,isInitializing)}else{this._promptDlg.closeCB=closeCB;this._promptDlg.style.display="";FLEXUI.initViewer(this.id)}this.setDisplayModalBackground(true)},sendPromptingAsyncRequest:function(evArgs){MochiKit.Signal.signal(this,"crprompt_asyncrequest",evArgs)},setDisplayModalBackground:function(isDisplay,showWaitCursor,opacity,filterOpacity){isDisplay=this.isDisplayModalBG||isDisplay;if(this._modalBackground){this._modalBackground.show(isDisplay,showWaitCursor,opacity,filterOpacity)}},_onShowPromptDialog:function(){this._adjustWindowScrollBars();this.setDisplayModalBackground(true)},_onHidePromptDialog:function(){this._adjustWindowScrollBars();document.onkeypress=this._originalDocumentOnKeyPress;this.setDisplayModalBackground(false)},isPromptDialogVisible:function(){return this._promptDlg&&this._promptDlg.isVisible&&this._promptDlg.isVisible()},hidePromptDialog:function(){if(this.isPromptDialogVisible()){this._promptDlg.show(false)}},hideFlexPromptDialog:function(){if(this._promptDlg){if(_ie){this._promptDlg.focus()}this._promptDlg.style.visibility="hidden";this._promptDlg.style.display="none";this.setDisplayModalBackground(false);if(this._promptDlg.closeCB){this._promptDlg.closeCB()}}},_adjustWindowScrollBars:function(){if(_ie&&this.layoutType==bobj.crv.Viewer.LayoutTypes.CLIENT&&this._promptDlg&&this._promptDlg.layer&&MochiKit.DOM.currentDocument().body){var bodyOverFlow,pageOverFlow;var body=MochiKit.DOM.currentDocument().body;var promptDlgLayer=this._promptDlg.layer;if(this.getReportPage()&&this.getReportPage().layer){var reportPageLayer=this.getReportPage().layer}if(!window.bodyOverFlow){window.bodyOverFlow=MochiKit.DOM.getStyle(body,"overflow")}if(body.offsetHeight<(promptDlgLayer.offsetTop+promptDlgLayer.offsetHeight)){if(window.bodyOverFlow=="hidden"){bodyOverFlow="scroll"}pageOverFlow="hidden"}else{bodyOverFlow=window.bodyOverFlow;pageOverFlow="auto"}if(bodyOverFlow){body.style.overflow=bodyOverFlow}if(reportPageLayer){reportPageLayer.style.overflow=pageOverFlow}}},setComponentVisibility:function(componentName,isVisible){var Components=bobj.crv.Viewer.Components;switch(componentName){case Components.Toolbar:if(this._topToolbar){this._topToolbar.setVisible(isVisible)}break;case Components.Statusbar:if(this._statusbar){this._statusbar.setVisible(isVisible)}break;case Components.LeftPanel:if(this._leftPanel){this._leftPanel.setVisible(isVisible)}break;case Components.Breadcrumb:if(this._reportAlbum&&this._reportAlbum.getBreadcrumb()){this._reportAlbum.getBreadcrumb().setVisible(isVisible)}}this._doLayout()},showError:function(text,details,errorCode,RCI){var divDecode=document.createElement("div");divDecode.innerHTML=text;text=divDecode.innerHTML;if(details){divDecode.innerHTML=details;details=divDecode.innerHTML}var isDisplayErrorHandled=this.fireActionEvent("error",text,details,errorCode,RCI);if(!isDisplayErrorHandled){var parent=this;setTimeout(function(){var dlg=bobj.crv.ErrorDialog.getInstance();dlg.setParent(parent);dlg.setText(text,details);dlg.setTitle(L_bobj_crv_Error);dlg.show(true)},0)}},update:function(update){if(!update||update.cons!="bobj.crv.newViewer"){return}if(update.args){this.isDisplayModalBG=update.args.isDisplayModalBG}this.hidePromptDialog();for(var childNum in update.children){var child=update.children[childNum];if(child){switch(child.cons){case"bobj.crv.newReportAlbum":if(this._reportAlbum){this._reportAlbum.update(child)}break;case"bobj.crv.newToolbar":if(this._topToolbar){this._topToolbar.update(child)}break;case"bobj.crv.newStatusbar":if(this._statusbar){this._statusbar.update(child)}break;case"bobj.crv.newLeftPanel":if(this._leftPanel){this._leftPanel.update(child)}else{this._leftPanel=bobj.crv.createWidget(child);if(this.layer){var parentNode=this.layer.firstChild;if(this._reportAlbum){parentNode.insertBefore(this._leftPanel.getDOM(),this._reportAlbum.layer)}else{if(this._statusbar){parentNode.insertBefore(this._leftPanel.getDOM(),this._statusbar.layer)}else{parentNode.appendChild(this._leftPanel.getDOM())}}this._initLeftPanelSignals();this._leftPanel.init()}}break;case"bobj.crv.newExportUI":if(this._export){this._export.update(child)}break}}}this._doLayout();this.scrollToHighlighted();this.setDisplayModalBackground(this.isDisplayModalBG)},getToolPanel:function(){if(this._leftPanel){return this._leftPanel.getToolPanel()}return null},getParameterPanel:function(){var toolPanel=this.getToolPanel();if(toolPanel){return toolPanel.getParameterPanel()}return null},getReportPage:function(){if(this._reportAlbum){var view=this._reportAlbum.getSelectedView();if(view){return view.reportPage}}return null},scrollToHighlighted:function(){if(!this._reportAlbum){return}var currentView=this._reportAlbum.getSelectedView();if(currentView.scrollToHighlighted){currentView.scrollToHighlighted(this.layoutType.toLowerCase()==bobj.crv.Viewer.LayoutTypes.FITREPORT)}},addViewerEventListener:function(e,l){var ls=this._eventListeners[e];if(!ls){this._eventListeners[e]=[l];return}ls[ls.length]=l},removeViewerEventListener:function(e,l){var ls=this._eventListeners[e];if(ls){for(var i=0,lsLen=ls.length;i<lsLen;i++){if(ls[i]==l){ls.splice(i,1);return}}}},getEventListeners:function(e){return this._eventListeners[e]},recycle:function(){if(this._promptDlg){bobj.crv.params.FlexParameterBridge.clearSWF(this.id);MochiKit.DOM.removeElement(this._promptDlg);delete this._promptDlg}},_onToolbarSetDisplayListener:function(isVisible){if(this._separator){this._separator.setDisplay(isVisible)}},_onLeftPanelSetDisplayListener:function(isVisible){if(this._leftPanelResizeGrabber){var isDisplayGrabber=isVisible;if(!this._leftPanel||!this.getToolPanel()||!this._leftPanel.isToolPanelDisplayed()||this.getToolPanel().getPanelType()==bobj.crv.ToolPanelType.None){isDisplayGrabber=false}this._leftPanelResizeGrabber.setDisplay(isDisplayGrabber)}},addActionsMenu:function(json){if(json){var widget=bobj.crv.createWidget(json);this._topToolbar.delayedAddChild(widget,0,true)}}};bobj.crv.BoundaryControl=function(id){this.id=id};bobj.crv.BoundaryControl.prototype={updateBoundary:function(width,height,left,top){if(!this.layer){this._init()}if(this.layer){this.layer.style.width=width+"px";this.layer.style.height=height+"px";this.layer.style.left=left+"px";this.layer.style.top=top+"px"}},_getStyle:function(){return{display:"block",visibility:"hidden",position:"absolute"}},_getHTML:function(){return bobj.html.DIV({id:this.id,style:this._getStyle()})},_init:function(){if(!this.layer){append2(_curDoc.body,this._getHTML());this.layer=getLayer(this.id);this.layer.onselectstart=function(){return false};this.layer.onmousedown=eventCancelBubble;if(this.mouseupCB){this.layer.onmouseup=this.mouseupCB}}}};bobj.crv.ModalBackground=function(id,mouseupCB){this.id=id;this.mouseupCB=mouseupCB};bobj.crv.ModalBackground.prototype=new bobj.crv.BoundaryControl();MochiKit.Base.update(bobj.crv.ModalBackground.prototype,{_getStyle:function(){return{"background-color":"#888888",position:"absolute",opacity:0.3,display:"block",filter:"alpha(opacity=30);","z-index":bobj.constants.modalLayerIndex-2,visibility:"hidden",cursor:"auto"}},show:function(show,showWaitCursor,opacity,filterOpacity){if(!this.layer){this._init()}this.layer.style.visibility=show?"visible":"hidden";this.layer.style.cursor=show&&showWaitCursor?"wait":"auto";this.layer.style.opacity=show&&opacity!=undefined?opacity:0.3;if(this.layer.style.filter){this.layer.style.filter=show&&filterOpacity?filterOpacity:"alpha(opacity=30);"}}});bobj.crv.ViewerManager=new function(){var initListeners={};this.addOnViewerInitListener=function(viewerID,listener){if(initListeners[viewerID]==null){initListeners[viewerID]=[]}initListeners[viewerID].push(listener)};this.onViewerInit=function(viewer){if(viewer!=null){var id=viewer.id;if(initListeners[id]!=null){var listeners=initListeners[id];for(var i=0;i<listeners.length;i++){listeners[i].call(window,viewer)}}}}};if(typeof(bobj.crv.Async)=="undefined"){bobj.crv.Async={}}bobj.crv.ViewerListener=function(viewerName,ioHandler){this._name=viewerName;this._viewer=null;this._promptPage=null;this._paramCtrl=null;this._ioHandler=ioHandler;this._reportProcessing=null;this._prevCtxt=null;this._prevSubCtxt=null;this._requestDispatchCount=0;var connect=MochiKit.Signal.connect;var subscribe=bobj.event.subscribe;var bind=MochiKit.Base.bind;var widget=window[viewerName];if(widget){if(widget.widgetType=="Viewer"){this._viewer=widget;this._reportProcessing=this._viewer._reportProcessing}else{if(widget.widgetType=="PromptPage"){this._promptPage=widget;this._reportProcessing=this._promptPage._reportProcessing}}}if(this._viewer){connect(this._viewer,"selectView",this,"_onSelectView");connect(this._viewer,"removeView",this,"_onRemoveView");connect(this._viewer,"getPage",this,"_onGetPage");connect(this._viewer,"breadcrumbNavigate",this,"_onBreadcrumbNavigate");connect(this._viewer,"selectHistory",this,"_onSelectHistory");connect(this._viewer,"clearHistory",this,"_onClearHistory");connect(this._viewer,"firstPage",this,"_onFirstPage");connect(this._viewer,"prevPage",this,"_onPrevPage");connect(this._viewer,"nextPage",this,"_onNextPage");connect(this._viewer,"lastPage",this,"_onLastPage");connect(this._viewer,"selectPage",this,"_onSelectPage");connect(this._viewer,"findLastPageNumber",this,"_onfindLastPageNumber");connect(this._viewer,"zoom",this,"_onZoom");connect(this._viewer,"drillUp",this,"_onDrillUp");connect(this._viewer,"refresh",this,"_onRefresh");connect(this._viewer,"export",this,"_onExport");connect(this._viewer,"print",this,"_onPrint");connect(this._viewer,"updateCurrentPage",this,"_onUpdateCurrentPage");connect(this._viewer,"updateLastPage",this,"_onUpdateLastPage");connect(this._viewer,"resizeToolPanel",this,"_onResizeToolPanel");connect(this._viewer,"hideToolPanel",this,"_onHideToolPanel");connect(this._viewer,"grpDrilldown",this,"_onDrilldownGroupTree");connect(this._viewer,"grpNodeRetrieveChildren",this,"_onRetrieveGroupTreeNodeChildren");connect(this._viewer,"grpNodeCollapse",this,"_onCollapseGroupTreeNode");connect(this._viewer,"grpNodeExpand",this,"_onExpandGroupTreeNode");connect(this._viewer,"showSearch",this,"_onShowSearch");connect(this._viewer,"showParamPanel",this,"_onShowParamPanel");connect(this._viewer,"showGroupTree",this,"_onShowGroupTree");connect(this._viewer,"viewChanged",this,"_onChangeView");connect(this._viewer,"resetParamPanel",this,"_onResetParamPanel");connect(this._viewer,"printSubmitted",this,"_onSubmitPrintPdf");connect(this._viewer,"exportSubmitted",this,"_onSubmitExport");connect(this._viewer,"initialized",this,"_onViewerInitialization");connect(this._viewer,"searchAll",this,"_onSearchAll");connect(this._viewer,"selectSearchItem",this,"_onSelectSearchItem")}subscribe("drilldown",this._forwardTo("_onDrilldown"));subscribe("drilldownGraph",this._forwardTo("_onDrilldownGraph"));subscribe("drilldownSubreport",this._forwardTo("_onDrilldownSubreport"));subscribe("sort",this._forwardTo("_onSort"));subscribe("hyperlinkClicked",this._forwardTo("_onHyperlinkClicked"));subscribe("displayError",this._forwardTo("_displayError"));subscribe("refresh",this._forwardTo("_onRefresh"));subscribe("zoom",this._forwardTo("_onZoom"));subscribe("setParameters",this._forwardTo("applyParams"));subscribe("setReportSource",this._forwardTo("setReportSource"));subscribe("setPageNumber",this._forwardTo("setPageNumber"));subscribe("setComponentVisibility",this._forwardTo("setComponentVisibility"));subscribe("crprompt_param",this._forwardTo("_onSubmitStaticPrompts"));subscribe("crprompt_pmtEngine",this._forwardTo("_onSubmitPromptEnginePrompts"));subscribe("crprompt_logon",this._forwardTo("_onSubmitDBLogon"));subscribe("crprompt_cancel",this._forwardTo("_onCancelParamDlg"));subscribe("crprompt_flexparam",this._forwardTo("_onFlexParam"));subscribe("crprompt_flexlogon",this._forwardTo("_onFlexLogon"));subscribe("crprompt_asyncrequest",this._forwardTo("_onPromptingAsyncRequest"));subscribe("pnav",this._forwardTo("_onNavigateReportPart"));subscribe("navbookmark",this._forwardTo("_onNavigateBookmark"));subscribe("updatePromptDlg",this._forwardTo("_onPromptDialogUpdate"));subscribe("saveViewState",bind(this._onSaveViewState,this));subscribe("waitingModalBackground",this._forwardTo("_showWaitingModalBackground"));subscribe("takeaction_showMenuButton",this._forwardTo("_onTakeActionShowMenuButton"));subscribe("takeaction_hideMenuButton",this._forwardTo("_onTakeActionHideMenuButton"));subscribe("takeaction_accessibleKeyUp",this._forwardTo("_onTakeActionAccessibleKeyUp"));subscribe("takeaction_asyncRequest",this._forwardTo("_onTakeActionAsyncRequest"));subscribe("batchExecuteEvent",this._forwardTo("_onBatchExecuteEvent"));if(widget){widget.init()}if(bobj.isObject(window.jsUnit)&&!window.jsUnit.testSuite){window.jsUnit.testSuite=new jsUnit.crViewerTestSuite(this)}var doLoad=function(){if(widget.initialPromptData!=null){var FLEXUI=bobj.crv.params.FlexParameterBridge;if(typeof(FLEXUI._isInitializing)=="undefined"){bobj.crv.params.ViewerFlexParameterAdapter.setPromptData(widget.id,widget.initialPromptData,false);var closeCB=this._getPromptDialogCloseCB();widget.showFlexPromptDialog(this.getServletURI(),closeCB,true);widget.initialPromptData=null}}};doLoad=MochiKit.Base.bind(doLoad,this);swfobject.addLoadEvent(doLoad)};bobj.crv.ViewerListener.prototype={getCurrentView:function(){if(this._viewer&&this._viewer._reportAlbum){return this._viewer._reportAlbum.getSelectedView()}return null},getPromptingType:function(){return this._getCommonProperty("promptingType")},_displayError:function(args){args=MochiKit.Base.parseQueryString(args);if(args&&this._viewer){var errorMessage=args.errorMessage||L_bobj_crv_RequestError;var debug=args.debug||"";this.showError(errorMessage,debug)}},_forwardTo:function(handlerName){return MochiKit.Base.bind(function(target){if(target==this._name){var args=bobj.slice(arguments,1);this[handlerName].apply(this,args)}},this)},_onViewerInitialization:function(isLoadContentOnInit){if(isLoadContentOnInit){this._initialLoadViewerContent()}},_onSaveViewState:function(){this._saveViewState()},_onSelectView:function(view){if(view){bobj.crv.logger.info("UIAction View.Select");var state=bobj.crv.stateManager.getComponentState(this._name);if(state){state.curViewId=view.viewStateId;this._request({selectView:view.viewStateId},bobj.crv.config.useAsync,true)}}},_onRemoveView:function(view){if(view){bobj.crv.logger.info("UIAction View.Remove");var viewerState=bobj.crv.stateManager.getComponentState(this._name);if(viewerState){delete viewerState[view.viewStateId]}var commonState=this._getCommonState();if(commonState){var idx=MochiKit.Base.findValue(commonState.rptAlbumOrder,view.viewStateId);if(idx!=-1){arrayRemove(commonState,"rptAlbumOrder",idx)}}}},_onBreadcrumbNavigate:function(breadcrumbNavigateArgs){bobj.crv.logger.info("UIAction Breadcrumb.Navigate");this._request(breadcrumbNavigateArgs,bobj.crv.config.useAsync,true,null,null,bobj.crv.ActionEvents.DRILL)},_initialLoadViewerContent:function(){bobj.crv.logger.info("UIAction InitLoad");this._request({ajaxInitLoad:true},bobj.crv.config.useAsync,true)},_onSelectHistory:function(dir){bobj.crv.logger.info("UIAction Toolbar.SelectHistory");this._request({tb:"selectHistory",histPos:dir},bobj.crv.config.useAsync,true)},_onClearHistory:function(){bobj.crv.logger.info("UIAction Toolbar.ClearHistory");this._setCommonProperty("backHist",[]);this._setCommonProperty("fwdHist",[]);this._viewer._topToolbar.clearHistory()},_showWaitingModalBackground:function(show){if(this._viewer){this._viewer.setDisplayModalBackground(show,true,0,"alpha(opacity=0)")}},_onTakeActionShowMenuButton:function(event,element,window,isFocusIn){var instance=bobj.crv.TakeAction.getInstance(window.frameElement);instance.showDropDownButton(event,element,this._name,isFocusIn)},_onTakeActionHideMenuButton:function(event,element,delay){var instance=bobj.crv.TakeAction.getInstance();instance.hideDropDownButton(event,element,delay)},_onTakeActionAccessibleKeyUp:function(event){var instance=bobj.crv.TakeAction.getInstance();instance.accessibleKeyUp(event)},_onTakeActionAsyncRequest:function(eventArgs,onSuccess,onFailure){var ACTION_SERVICE_STATE_KEY="actionServiceState";this._ioHandler.addRequestField("ServletTask","TakeActionEvent");for(var key in eventArgs){this._ioHandler.addRequestField(key,eventArgs[key])}var actionServiceState=this._getCommonProperty(ACTION_SERVICE_STATE_KEY);if(actionServiceState){this._ioHandler.addRequestField(ACTION_SERVICE_STATE_KEY,this._getCommonProperty(ACTION_SERVICE_STATE_KEY))}function getJsonResponse(res){var json=null;if(bobj.isString(res)){json=MochiKit.Base.evalJSON(res)}else{if(res instanceof MochiKit.Async.XMLHttpRequestError){json=MochiKit.Async.evalJSONRequest(res.req)}else{json=MochiKit.Async.evalJSONRequest(res)}}return json}var viewerListener=this;var successCB=function(res){viewerListener._requestDispatchCount--;if(onSuccess){var jsonResponse=getJsonResponse(res);if(jsonResponse[ACTION_SERVICE_STATE_KEY]!=null){viewerListener._setCommonProperty(ACTION_SERVICE_STATE_KEY,jsonResponse[ACTION_SERVICE_STATE_KEY])}if(jsonResponse.StatusCode==500){onFailure(jsonResponse.CallbackResult)}else{onSuccess(jsonResponse)}}};var failureCB=function(res){viewerListener._requestDispatchCount--;if(onFailure){onFailure(getJsonResponse(res))}};var state={};state[this._name]={};var deferred=this._ioHandler.request(state,this._name,{},true,false,successCB,failureCB);this._requestDispatchCount++;if(deferred){deferred.addCallback(successCB);deferred.addErrback(failureCB)}},setPageNumber:function(pageNumber){this._onGetPage(pageNumber,true,true,true)},_onFirstPage:function(){this._onGetPage(1,true,true,true)},_onPrevPage:function(){var targetPage=this._getViewProperty("pageNum")-1;this._onGetPage(targetPage,true,true,true)},_onNextPage:function(){var targetPage=this._getViewProperty("pageNum")+1;this._onGetPage(targetPage,true,true,true)},_onLastPage:function(){this._onGetPage(-1,true,true,true)},_onSelectPage:function(pgNum){if(pgNum==-1){pgNum=NaN}this._onGetPage(pgNum,true,true,true)},_onGetPage:function(pgNum,isTopPage,isAllowIncompletePageCount,isDisplayProgressIndicator){bobj.logToConsole("getPage"+pgNum);bobj.crv.logger.info("Get Page"+pgNum);this._request({getPage:pgNum.toString(),isTopPage:isTopPage,isAllowIncompletePageCount:isAllowIncompletePageCount},bobj.crv.config.useAsync,isDisplayProgressIndicator)},_onDrillUp:function(){bobj.crv.logger.info("UIAction Toolbar.DrillUp");this._request({tb:"drillUp"},bobj.crv.config.useAsync,true)},_onfindLastPageNumber:function(){bobj.crv.logger.info("Find last page number");this._request({findLastPageNumber:1},true,false)},_onChangeView:function(){if(this._paramCtrl){this._paramCtrl.onChangeView()}},_onResetParamPanel:function(){if(this._isResettingParamPanel){return}this._isResettingParamPanel=true;if(this._paramCtrl){this._paramCtrl.setParameters([]);delete this._paramCtrl}this.clearAdvancedPromptData();var onFinishCB=bobj.bindFunctionToObject(function(){this._isResettingParamPanel=false},this);this._setInteractiveParams(onFinishCB)},_onZoom:function(zoomTxt){bobj.crv.logger.info("UIAction Toolbar.Zoom "+zoomTxt);this._request({tb:"zoom",value:zoomTxt},bobj.crv.config.useAsync,true)},_onExport:function(closeCB){var exportComponent=this._viewer._export;if(exportComponent){if(closeCB){exportComponent.setCloseCB(closeCB)}bobj.crv.logger.info("UIAction Toolbar.Export");exportComponent.show(true)}},_onBatchExecuteEvent:function(events){this._request({batchExecuteEvent:events},bobj.crv.config.useAsync,true);bobj.crv.logger.info("Batch Execute events")},_onPrint:function(closeCB){var printComponent=this._viewer._print;if(printComponent){if(closeCB){printComponent.setCloseCB(closeCB)}if(printComponent.isActxPrinting){bobj.crv.logger.info("UIAction Toolbar.Print ActiveX");var pageState=bobj.crv.stateManager.getCompositeState();var postBackData=this._ioHandler.getPostDataForPrinting(pageState,this._name);this._viewer._print.show(true,postBackData)}else{var isOneClickPrint=this._getCommonProperty("pdfOCP")&&bobj.hasPDFReaderWithJSFunctionality();if(isOneClickPrint){this._onSubmitPrintPdf(0,0,isOneClickPrint)}else{bobj.crv.logger.info("UIAction Toolbar.Print PDF");this._viewer._print.show(true)}}}},_onResizeToolPanel:function(width){this._setCommonProperty("toolPanelWidth",width);this._setCommonProperty("toolPanelWidthUnit","px")},_onHideToolPanel:function(){bobj.crv.logger.info("UIAction Toolbar.HideToolPanel");this._setCommonProperty("toolPanelType",bobj.crv.ToolPanelType.None)},_onShowSearch:function(){bobj.crv.logger.info("UIAction Toolbar.ShowSearch");this._setCommonProperty("toolPanelType",bobj.crv.ToolPanelType.Search)},_onShowParamPanel:function(){bobj.crv.logger.info("UIAction Toolbar.ShowParamPanel");this._setCommonProperty("toolPanelType",bobj.crv.ToolPanelType.ParameterPanel)},_onShowGroupTree:function(){bobj.crv.logger.info("UIAction Toolbar.ShowGroupTree");this._setCommonProperty("toolPanelType",bobj.crv.ToolPanelType.GroupTree)},_onDrilldown:function(drillargs){bobj.crv.logger.info("UIAction Report.Drilldown");this._request(drillargs,bobj.crv.config.useAsync,true,null,null,bobj.crv.ActionEvents.DRILL)},_onDrilldownSubreport:function(drillargs){bobj.crv.logger.info("UIAction Report.DrilldownSubreport");this._request(drillargs,bobj.crv.config.useAsync,true,null,null,bobj.crv.ActionEvents.DRILL)},_onDrilldownGraph:function(event,graphName,branch,offsetX,offsetY,pageNumber,nextpart,twipsPerPixel){if(event){bobj.crv.logger.info("UIAction Report.DrilldownGraph");var mouseX,mouseY;if(_ie||_saf){mouseX=event.offsetX;mouseY=event.offsetY}else{mouseX=event.layerX;mouseY=event.layerY}var zoomFactor=parseInt(this._getCommonProperty("zoom"),10);zoomFactor=(isNaN(zoomFactor)?1:zoomFactor/100);this._request({name:encodeURIComponent(graphName),brch:branch,coord:(mouseX*twipsPerPixel/zoomFactor+parseInt(offsetX,10))+"-"+(mouseY*twipsPerPixel/zoomFactor+parseInt(offsetY,10)),pageNumber:pageNumber,nextpart:encodeURIComponent(nextpart)},bobj.crv.config.useAsync,true,null,null,bobj.crv.ActionEvents.DRILL)}},_onDrilldownGroupTree:function(groupName,groupPath,isVisible,groupNamePath,nodeType){bobj.crv.logger.info("UIAction GroupTree.Drilldown");var encodedGroupName=encodeURIComponent(groupName);var evtArgs={drillname:encodedGroupName,gnpath:groupNamePath,type:nodeType};var actionEventType=null;if(isVisible){evtArgs.grp=groupPath;actionEventType=bobj.crv.ActionEvents.GROUP_TREE_NAVIGATE}else{evtArgs.brch=groupPath;actionEventType=bobj.crv.ActionEvents.DRILL}this._request(evtArgs,bobj.crv.config.useAsync,true,null,null,actionEventType)},_onRetrieveGroupTreeNodeChildren:function(groupPath){this._request({grow:groupPath},bobj.crv.config.useAsync,true)},_onCollapseGroupTreeNode:function(groupPath){bobj.crv.logger.info("UIAction GroupTree.CollapseNode");var expPathPointer=this.getCurrentExpandedPaths();var groupPathArray=groupPath.split("-");for(var i=0,end=groupPathArray.length-1;i<=end;i++){var nodeID=groupPathArray[i];if(expPathPointer[nodeID]){if(i==end){delete expPathPointer[nodeID];return}expPathPointer=expPathPointer[nodeID]}else{return}}},showError:function(message,detailText,errorCode,RCI){if(this._viewer){this._viewer.showError(message,detailText,errorCode,RCI)}},_onExpandGroupTreeNode:function(groupPath){bobj.crv.logger.info("UIAction GroupTree.ExpandNode");var expPathPointer=this.getCurrentExpandedPaths();var groupPathArray=groupPath.split("-");for(var i=0,end=groupPathArray.length;i<end;i++){var nodeID=groupPathArray[i];if(!expPathPointer[nodeID]){expPathPointer[nodeID]={}}expPathPointer=expPathPointer[nodeID]}},_onRefresh:function(){bobj.crv.logger.info("UIAction Toolbar.Refresh");var commonState=this._getCommonState();var useAsyncForRefresh=true;if(commonState&&commonState.useAsyncForRefresh!==undefined){useAsyncForRefresh=commonState.useAsyncForRefresh}this._viewer.resetSearch();this._request({tb:"refresh"},bobj.crv.config.useAsync&&useAsyncForRefresh,true,false,null,null,true)},_onSearchAll:function(searchText,isNewSearch,isCaseSensitive,isMatchWholeWordOnly,isFindFirstN,lastPageNumber,remainingGroupPaths,numberOfProcessedGroupPath){bobj.crv.logger.info("UIAction Toolbar.Search");var request=MochiKit.Base.bind(this._request,this,{searchAll:encodeURIComponent(searchText),isNewSearch:isNewSearch,isMatchCase:isCaseSensitive,isMatchWholeWordOnly:isMatchWholeWordOnly,isFindFirstN:isFindFirstN,lastPageNumber:lastPageNumber,remainingGroupPaths:remainingGroupPaths,numberOfProcessedGroupPath:numberOfProcessedGroupPath},true,false);if(this._requestDispatchCount>0){setTimeout(request,500)}else{request()}},_onSelectSearchItem:function(drillContext){this._request({selectSearchItem:drillContext},bobj.crv.config.useAsync,true)},_canUseAsync:function(){return this._viewer!=null&&bobj.crv.config.useAsync},_onFlexParam:function(paramData){this._request({crprompt:"flexPromptingSetValues",paramList:paramData,isFullPrompt:true},this._canUseAsync(),true)},_onFlexLogon:function(logonData){for(var i=0,len=logonData.length;i<len;i++){this._addRequestField(logonData[i].field,logonData[i].value)}this._request({crprompt:"logon"},this._canUseAsync(),true)},_onSubmitPromptEnginePrompts:function(isFullPrompt){isFullPrompt=eval(isFullPrompt);var useAjax=this._viewer&&this._viewer.isPromptDialogVisible();var showIndicator=this._viewer!=null;var valueIDKey="ValueID"+this._name;var contextIDKey="ContextID"+this._name;var contextHandleIDKey="ContextHandleID"+this._name;var _valueId=null;var _contextId=null;var _contextHandleId=null;var valueID=document.getElementById(valueIDKey);if(valueID){_valueId=encodeURIComponent(valueID.value)}var contextID=document.getElementById(contextIDKey);if(contextID){_contextId=encodeURIComponent(contextID.value)}var contextHandleID=document.getElementById(contextHandleIDKey);if(contextHandleID){_contextHandleId=encodeURIComponent(contextHandleID.value)}this._request({crprompt:"pmtEngine",isFullPrompt:isFullPrompt,ValueID:_valueId,ContextHandleID:_contextHandleId,ContextID:_contextId},useAjax,showIndicator);this._removeRequestField(valueIDKey);this._removeRequestField(contextIDKey);this._removeRequestField(contextHandleIDKey)},_onSubmitStaticPrompts:function(formName){this._addRequestFields(formName);this._request({crprompt:"param"},false,true)},_onSubmitDBLogon:function(formName){var useAjax=this._viewer&&this._viewer.isPromptDialogVisible();var showIndicator=this._viewer!=null;if(this._viewer){this._viewer.hidePromptDialog()}this._addRequestFieldsFromContent(formName);this._request({crprompt:"logon"},useAjax,showIndicator)},_onSubmitPrintPdf:function(start,end,isOneClickPrint){this._handlePrintOrExport(start,end,"PDF",isOneClickPrint)},_onSubmitExport:function(start,end,format){this._handlePrintOrExport(start,end,format)},_handlePrintOrExport:function(start,end,format,isOneClickPrint){var isRange=true;var useIframe=false;if(!start&&!end){isRange=false}if(!format){format="PDF"}var isOneClickPDFPrinting=(format=="PDF"&&isOneClickPrint);var reqObj={text:format,range:isRange+""};reqObj.tb=isOneClickPDFPrinting?"crpdfprint":"crexport";if(isRange){reqObj.from=start+"";reqObj.to=end+""}bobj.crv.logger.info("UIAction Export.Submit "+format);if(this._ioHandler instanceof bobj.crv.ServletAdapter||this._ioHandler instanceof bobj.crv.FacesAdapter){useIframe=true;this._ioHandler.redirectToServlet();this._ioHandler.addRequestField("ServletTask","Export");this._ioHandler.addRequestField("LoadInIFrame",useIframe)}else{useIframe=isOneClickPDFPrinting}this._request(reqObj,false,false,useIframe)},_onCancelParamDlg:function(){bobj.crv.logger.info("UIAction PromptDialog.Cancel");this._viewer.hidePromptDialog()},_onReceiveParamDlg:function(html){this._viewer.showPromptDialog(html)},_onSort:function(sortArgs){bobj.crv.logger.info("UIAction Report.Sort");this._request(sortArgs,bobj.crv.config.useAsync,true)},_onNavigateReportPart:function(navArgs){bobj.crv.logger.info("UIAction ReportPart.Navigate");this._request(navArgs,false,true)},_onNavigateBookmark:function(navArgs){bobj.crv.logger.info("UIAction Report.Navigate");this._request(navArgs,bobj.crv.config.useAsync,true)},getCurrentExpandedPaths:function(){var viewState=this._getViewState();if(viewState){return viewState.gpTreeCurrentExpandedPaths}return{}},recycle:function(){this._setCommonProperty("parameterFields",[]);this._clearPendingEvents();this._onResetParamPanel();this._viewer.recycle()},setReportSource:function(reportIdType,reportId,boeLogonType,boeLogonString,locale){this.recycle();if(arguments[0] instanceof SAP.CR.InProcReportSource){var inProcReportSourceVar=arguments[0];var reportId=inProcReportSourceVar.getReportId();reportId=reportId+"";var ebisId=inProcReportSourceVar.getEBISId();var productLocale=inProcReportSourceVar.getProductLocale;var docLocale=inProcReportSourceVar.getDocLocale();this._request({setReportSource:"InProc",reportId:reportId,ebisId:ebistId,productLocale:productLocale?productLocale:"en-US",docLocale:docLocale?docLocale:"en-US"},bobj.crv.config.useAsync,true)}else{if(arguments.length==1){this._request({setReportSource:"fromBOE",factorySessionID:arguments[0]},bobj.crv.config.useAsync,true)}else{this._request({setReportSource:"fromBOE",reportIdType:reportIdType,reportId:reportId,boeLogonType:boeLogonType,boeLogonString:boeLogonString,locale:locale?locale:"en-US"},bobj.crv.config.useAsync,true)}}},setComponentVisibility:function(component,isVisible){var Components=bobj.crv.Viewer.Components;var stateName=null;switch(component){case Components.Toolbar:stateName="isDisplayToolbar";break;case Components.Statusbar:stateName="isDisplayStatusBar";break;case Components.LeftPanel:stateName="isDisplayLeftPanel";break;case Components.Breadcrumb:stateName="isDisplayBreadCrumb";break}if(stateName){this._setCommonProperty(stateName,isVisible)}if(this._viewer){this._viewer.setComponentVisibility(component,isVisible)}},applyParams:function(params){if(params){bobj.crv.logger.info("UIAction ParameterPanel.Apply");var clonedParams=[];var cloneFunc=MochiKit.Base.clone;for(var i=0,len=params.length;i<len;i++){var clonedParam=cloneFunc(params[i]);clonedParam.modifiedValue=null;clonedParam.value=cloneFunc(params[i].value);if(this._ioHandler instanceof bobj.crv.ServletAdapter||this._ioHandler instanceof bobj.crv.FacesAdapter){this._encodeParameter(clonedParam)}clonedParams.push(clonedParam)}this._viewer.resetSearch();this._request({crprompt:"paramPanel",paramList:clonedParams},bobj.crv.config.useAsync,true,false,null,null,true)}},getServletURI:function(){var servletURL="";if(this._ioHandler instanceof bobj.crv.ServletAdapter||this._ioHandler instanceof bobj.crv.FacesAdapter){servletURL=this._ioHandler._servletUrl}return servletURL},showAdvancedParamDialog:function(param){var paramOpts=this._getCommonProperty("paramOpts");if(!paramOpts.canOpenAdvancedDialog){this.showError(L_bobj_crv_AdvancedDialog_NoAjax,L_bobj_crv_EnableAjax)}else{this._focusedParamName=param.paramName;if(this._isPromptingTypeFlex()){var flexAdapter=bobj.crv.params.ViewerFlexParameterAdapter;flexAdapter.setCurrentIParamInfo(this._name,this._paramCtrl,param);if(!flexAdapter.hasIParamPromptUnitData(this._name)){this._request({promptDlg:this._cloneParameter(param)},true,true)}else{if(param.allowMultiValue&¶m.allowRangeValue&¶m.modifiedValue.length>5){if(this._reportProcessing){this._reportProcessing.Show()}}var closeCB=this._getPromptDialogCloseCB();this._viewer.showFlexPromptDialog(this.getServletURI(),closeCB,false)}}else{this._request({promptDlg:this._cloneParameter(param)},true,true)}}},_cloneParameter:function(param){var clonedParam=MochiKit.Base.clone(param);clonedParam.defaultValues=null;clonedParam.modifiedValue=null;if(this._ioHandler instanceof bobj.crv.ServletAdapter||this._ioHandler instanceof bobj.crv.FacesAdapter){clonedParam.value=MochiKit.Base.clone(param.value)}return clonedParam},_encodeParameter:function(p){if(p){if(p.value&&(p.valueDataType==bobj.crv.params.DataTypes.STRING||p.valueDataType==bobj.crv.params.DataTypes.MEMBER)){for(var i=0,valuesLen=p.value.length;i<valuesLen;i++){var paramValue=p.value[i];if(bobj.isString(paramValue)){paramValue=encodeURIComponent(paramValue)}else{if(bobj.isObject(paramValue)){var isRangeValue=paramValue.beginValue||paramValue.endValue;if(isRangeValue){if(paramValue.beginValue){paramValue.beginValue=this._encodeParameterValue(paramValue.beginValue);paramValue.beginDisplay=this._encodeParameterValue(paramValue.beginDisplay)}if(paramValue.endValue){paramValue.endValue=this._encodeParameterValue(paramValue.endValue);paramValue.endDisplay=this._encodeParameterValue(paramValue.endDisplay)}}else{if(paramValue.value){paramValue.value=this._encodeParameterValue(paramValue.value)}if(paramValue.displayValue){paramValue.displayValue=this._encodeParameterValue(paramValue.displayValue)}if(paramValue.desc){paramValue.desc=this._encodeParameterValue(paramValue.desc)}}}}p.value[i]=paramValue}}if(p.paramName){p.paramName=encodeURIComponent(p.paramName)}if(p.reportName){p.reportName=encodeURIComponent(p.reportName)}}return p},_encodeParameterValue:function(paramValue){var actualValue=bobj.crv.params.getValue(paramValue);return encodeURIComponent(actualValue)},_setViewProperty:function(propName,propValue){var viewState=this._getViewState();if(viewState){viewState[propName]=propValue}},_getViewProperty:function(propName){var viewState=this._getViewState();if(viewState){return viewState[propName]}return null},_setCommonProperty:function(propName,propValue){var state=this._getCommonState();if(state){state[propName]=propValue}},_getCommonProperty:function(propName){var state=this._getCommonState();if(state){return state[propName]}return null},_updateUIState:function(viewId){},_getViewState:function(){var compState=bobj.crv.stateManager.getComponentState(this._name);if(compState&&compState.curViewId!==undefined){return compState[compState.curViewId]}return null},_getCommonState:function(){var compState=bobj.crv.stateManager.getComponentState(this._name);if(compState){return compState.common}return null},_setInteractiveParams:function(onFinishCB){if(!this._ioHandler.canUseAjax()){var paramPanel=this._viewer.getParameterPanel();if(paramPanel){paramPanel.showError(L_bobj_crv_InteractiveParam_NoAjax)}onFinishCB();return}var unusedParamList=[];var usedParamList=[];var paramList=this._getCommonProperty("parameterFields");if(paramList){var Parameter=bobj.crv.params.Parameter;for(var i=0;i<paramList.length;i++){var param=new Parameter(paramList[i]);if(param.isInteractive()){usedParamList.push(param)}else{unusedParamList.push(param)}}}if(usedParamList&&usedParamList.length){var callback=function(viewerListener,paramList,unusedParamList){return function(){var paramPanel=viewerListener._viewer.getParameterPanel();if(paramPanel){var paramOpts=viewerListener._getCommonProperty("paramOpts");var controller=new bobj.crv.params.ParameterController(paramPanel,viewerListener,paramOpts);controller.setParameters(paramList,onFinishCB);controller.setUnusedParameters(unusedParamList);viewerListener.setParameterController(controller)}}};bobj.loadJSResourceAndExecCallBack(bobj.crv.config.resources.ParameterControllerAndDeps,callback(this,usedParamList,unusedParamList))}else{onFinishCB()}},_isPromptingTypeFlex:function(){var type=this.getPromptingType();return(type&&type.toLowerCase()==bobj.crv.Viewer.PromptingTypes.FLEX)},setParameterController:function(controller){this._paramCtrl=controller},clearAdvancedPromptData:function(){if(this._isPromptingTypeFlex()){bobj.crv.params.ViewerFlexParameterAdapter.clearIParamPromptUnitData(this._name)}},_onPromptDialogUpdate:function(update){if(update.resolvedFields){this._viewer.hidePromptDialog();if(this._paramCtrl){for(var i=0;i<update.resolvedFields.length;i++){var param=new bobj.crv.params.Parameter(update.resolvedFields[i]);this._paramCtrl.updateParameter(param.paramName,param.getValue())}this._paramCtrl._updateToolbar()}}else{if(this._isPromptingTypeFlex()){if(update.script){bobj.evalInWindow(update.script);var closeCB=this._getPromptDialogCloseCB();this._viewer.showFlexPromptDialog(this.getServletURI(),closeCB,false)}}else{if(update.html){if(this._viewer.isPromptDialogVisible()){this._viewer.updatePromptDialog(update.html)}else{var closeCB=this._getPromptDialogCloseCB();this._viewer.showPromptDialog(update.html,closeCB)}}}}},_getPromptDialogCloseCB:function(){var closeCB=null;if(this._paramCtrl&&this._focusedParamName){closeCB=this._paramCtrl.getFocusAdvButtonCB(this._focusedParamName);this._focusedParamName=null}return closeCB},_onPromptingAsyncRequest:function(evArgs){this._request(evArgs,true,false,false)},_addToPendingEvents:function(evArgs){var pendingEvents=this._getCommonProperty("pendingEvents");if(!pendingEvents){pendingEvents={}}var index=0;while(index in pendingEvents){index++}pendingEvents[index]=('"'+MochiKit.Base.queryString(evArgs)+'"');this._setCommonProperty("pendingEvents",pendingEvents)},_clearPendingEvents:function(){this._setCommonProperty("pendingEvents",{})},_request:function(evArgs,allowAsynch,showIndicator,useIframe,callback,actionEventType,isWaitForPendingRequests){var pageState=bobj.crv.stateManager.getCompositeState();var bind=MochiKit.Base.bind;var defaultCallback=callback?callback:bind(this._onResponse,this,arguments,actionEventType);var defaultErrCallback=bind(this._onIOError,this);var ctxt=this._getViewProperty("vCtxt");this._prevCtxt=ctxt?{gpNme:ctxt.gpNme,gpPath:ctxt.gpPath,gpNamePath:ctxt.gpNamePath}:null;var subCtxt=this._getViewProperty("srptRqtCtxt");this._prevSubCtxt=subCtxt?{pX:subCtxt.pX,pY:subCtxt.pY,srptNm:subCtxt.srptNm}:null;if(this._reportProcessing&&showIndicator){this._reportProcessing.delayedShow()}function sendRequest(listener,pageState,evArgs,allowAsynch,useIframe,defaultCallback,defaultErrCallback,isWaitForPendingRequests){if(isWaitForPendingRequests&&listener._requestDispatchCount>0){setTimeout(function(){sendRequest(listener,pageState,evArgs,allowAsynch,useIframe,defaultCallback,defaultErrCallback,isWaitForPendingRequests)},500);return}if(!useIframe){listener._requestDispatchCount++}var deferred=listener._ioHandler.request(pageState,listener._name,evArgs,allowAsynch,useIframe,defaultCallback,defaultErrCallback);if(deferred){if(listener._reportProcessing&&showIndicator){listener._reportProcessing.setDeferred(deferred)}deferred.addCallback(defaultCallback);deferred.addErrback(defaultErrCallback)}}sendRequest(this,pageState,evArgs,allowAsynch,useIframe,defaultCallback,defaultErrCallback,isWaitForPendingRequests)},_onResponse:function(requestArgs,actionEventType,response){this._requestDispatchCount--;var json=null;if(bobj.isString(response)){json=MochiKit.Base.evalJSON(response)}else{json=MochiKit.Async.evalJSONRequest(response)}if(json){var isActionHandled=actionEventType!=null;var jsonState=json.state;if(jsonState){if(bobj.isString(jsonState)){jsonState=MochiKit.Base.evalJSON(jsonState)}isActionHandled=this._handleActionEvent(actionEventType,jsonState,requestArgs)}if(json.isRepeatRequest){this._addToPendingEvents({ajaxInitLoad:true,isRepeatRequest:true});this._request.apply(this,requestArgs);return}if(json.needsReload){this._setCommonProperty("isReloadRequest",true);var evArgs=requestArgs[0];this._request(evArgs,false,true);return}if(json.redirect){window.location=json.redirect;return}if(json.status&&this._viewer&&(json.status.errorMessage||json.status.debug)){var errorMessage=json.status.errorMessage||L_bobj_crv_RequestError;this.showError(errorMessage,json.status.debug,json.status.code,json.status.RCI)}if(!isActionHandled){if(jsonState){bobj.crv.stateManager.setComponentState(this._name,jsonState)}if(json.update){if(json.update.promptDlg){this._onPromptDialogUpdate(json.update.promptDlg);bobj.crv.logger.info("Update InteractiveParams")}else{if(this._viewer){if(bobj.crv.params.FlexParameterBridge._isInitializing==true&&this._isPromptingTypeFlex()){this._viewer.hideFlexPromptDialog()}this._viewer.update(json.update);bobj.crv.logger.info("Update Viewer")}}}}if(json.script&&json.script.length>0){bobj.evalInWindow(json.script);bobj.crv.logger.info("Execute Script")}}var isShowIndicator=requestArgs[2];if(this._reportProcessing&&isShowIndicator){this._reportProcessing.cancelShow()}if(bobj.isParentWindowTestRunner()){MochiKit.Signal.signal(this._viewer,"updated")}},_onIOError:function(response){this._requestDispatchCount--;if(this._reportProcessing.wasCancelled()==true){return}if(this._reportProcessing){this._reportProcessing.cancelShow()}if(this._viewer){var error=this._ioHandler.processError(response);var detailText="";if(bobj.isString(error)){detailText=error}else{for(var i in error){if(bobj.isString(error[i])||bobj.isNumber(error[i])){detailText+=i+": "+error[i]+"\n"}}}this.showError(L_bobj_crv_RequestError,detailText)}},_handleActionEvent:function(actionEventType,jsonState,requestArgs){var isActionHandled=false;var vCtxtChanged=true;var srptRqtCtxtChanged=true;var groupName,groupPath,groupNamePath;if(actionEventType==bobj.crv.ActionEvents.DRILL){var view=jsonState[jsonState.curViewId];var srptRqtCtxt=view.srptRqtCtxt;var vCtxt=view.vCtxt;vCtxtChanged=view.vCtxtChanged;srptRqtCtxtChanged=view.srptRqtCtxtChanged;if(vCtxtChanged==undefined||srptRqtCtxtChanged==undefined){return false}else{if(srptRqtCtxt&&srptRqtCtxtChanged){isActionHandled=this._viewer.fireActionEvent(actionEventType,null,null,null)}else{if(vCtxt&&vCtxtChanged){groupName=vCtxt.gpNme?decodeURIComponent(vCtxt.gpNme):null;groupPath=vCtxt.gpPath?vCtxt.gpPath:null;groupNamePath=vCtxt.gpNamePath?vCtxt.gpNamePath:null;isActionHandled=this._viewer.fireActionEvent(actionEventType,groupName,groupPath,groupNamePath)}}}}else{if(actionEventType==bobj.crv.ActionEvents.GROUP_TREE_NAVIGATE){var args=requestArgs[0];groupName=args.drillname?decodeURIComponent(args.drillname):null;groupPath=args.grp?args.grp:null;groupNamePath=args.gnpath?args.gnpath:null;isActionHandled=this._viewer.fireActionEvent(actionEventType,groupName,groupPath,groupNamePath)}}return isActionHandled||(!srptRqtCtxtChanged&&!vCtxtChanged)},_saveViewState:function(){var pageState=bobj.crv.stateManager.getCompositeState();this._ioHandler.saveViewState(pageState,this._name)},_addRequestFields:function(formName){var frm=document.getElementById(formName);if(frm){for(var i in frm){var frmElem=frm[i];if(frmElem&&frmElem.name&&frmElem.value){this._addRequestField(frmElem.name,frmElem.value)}}}},_addRequestFieldsFromContent:function(contentId){var parent=document.getElementById(contentId);if(!parent){return}var elements=MochiKit.DOM.getElementsByTagAndClassName("input",null,parent);for(var i in elements){var inputElement=elements[i];if(inputElement.type&&inputElement.type.toLowerCase()=="checkbox"&&inputElement.name){if(inputElement.checked){this._addRequestField(inputElement.name,inputElement.value)}}else{if(inputElement&&inputElement.name&&inputElement.value){this._addRequestField(inputElement.name,inputElement.value)}}}},_addRequestField:function(fldName,fldValue){this._ioHandler.addRequestField(fldName,fldValue)},_removeRequestField:function(fldName){this._ioHandler.removeRequestField(fldName)},_onHyperlinkClicked:function(args){args=MochiKit.Base.parseQueryString(args);var ls=this._viewer.getEventListeners("hyperlinkClicked");var handled=false;if(ls){for(var i=0,lsLen=ls.length;i<lsLen;i++){if(ls[i](args)==true){handled=true}}}if(handled){return}var w=window;if(args.target&&args.target!="_self"){w.open(args.url,args.target)}else{w.location=args.url}},_onUpdateCurrentPage:function(pageNum){this._setViewProperty("pageNum",pageNum);var ctxt=this._getViewProperty("vCtxt");if(ctxt!=null&&bobj.isString(ctxt)){var jsonCtxt=MochiKit.Base.evalJSON(ctxt);if(jsonCtxt.prc!=null&&jsonCtxt.prc.pn!=null){jsonCtxt.prc.pn=pageNum;this._setViewProperty("vCtxt",MochiKit.Base.serializeJSON(jsonCtxt))}}},_onUpdateLastPage:function(groupNamePath,lastPageNum,lastPageNumKnown){var lastPages=this._getCommonProperty("lastPageNumbers");if(lastPages){lastPages[groupNamePath]=lastPageNum}var lastPageKnowns=this._getCommonProperty("lastPageNumberKnowns");if(lastPageKnowns){lastPageKnowns[groupNamePath]=lastPageNumKnown}}};bobj.crv.StateManager=function(){this._state={}};bobj.crv.StateManager.prototype={setViewState:function(viewerName,stateName,viewState){var state=this._state;if(!state[viewerName]){state[viewerName]={}}state[viewerName][stateName]=viewState},getViewState:function(viewerName,stateName){var state=this._state;if(!state[viewerName]){return null}return state[viewerName][stateName]},setComponentState:function(viewerName,state){this._state[viewerName]=state},getComponentState:function(viewerName){return this._state[viewerName]},getCompositeState:function(){return this._state}};if(typeof bobj.crv.viewerState=="undefined"){bobj.crv.stateManager=new bobj.crv.StateManager()}bobj.crv.IOAdapterBase={request:function(){},addRequestField:function(fldName,fldValue){},removeRequestField:function(fldName){},saveViewState:function(pageState,viewerName){},getPostDataForPrinting:function(pageState,viewerName){},processError:function(response){return response},canUseAjax:function(){try{return(MochiKit.Async.getXMLHttpRequest()!==null)}catch(e){return false}},_getPostbackIframe:function(){if(!this._iframe){var ifrm=document.createElement("IFRAME");ifrm.id=bobj.uniqueId();ifrm.name=ifrm.id;ifrm.style.width="0px";ifrm.style.height="0px";ifrm.style.position="absolute";ifrm.style.top="0px";ifrm.style.left="0px";ifrm.style.visibility="hidden";document.body.appendChild(ifrm);if(!ifrm.contentWindow.name){ifrm.contentWindow.name=ifrm.id}this._iframe=ifrm}return this._iframe}};bobj.crv.ServletAdapter=function(pageUrl,servletUrl){this._pageUrl=pageUrl;this._servletUrl=servletUrl;this._form=null};bobj.crv.ServletAdapter._requestParams={STATE:"CRVCompositeViewState",TARGET:"CRVEventTarget",ARGUMENT:"CRVEventArgument"};bobj.crv.ServletAdapter.prototype=MochiKit.Base.merge(bobj.crv.IOAdapterBase,{request:function(pageState,viewerName,eventArgs,allowAsync,useIframe){if(!this._form){this._createForm()}var rp=bobj.crv.ServletAdapter._requestParams;var toJSON=MochiKit.Base.serializeJSON;this._form[rp.STATE].value=encodeURIComponent(toJSON(pageState));this._form[rp.TARGET].value=encodeURIComponent(viewerName);this._form[rp.ARGUMENT].value=encodeURIComponent(toJSON(eventArgs));var deferred=null;if(allowAsync&&this._servletUrl){deferred=bobj.crv.AsyncTransporter.getInstance().post(this._servletUrl,MochiKit.Base.queryString(this._form),null,null,{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8",Accept:"application/json"})}else{if(useIframe){this._form.target=this._getPostbackIframe().id}this._form.submit()}MochiKit.DOM.removeElement(this._form);this._form=null;return deferred},redirectToServlet:function(){if(!this._form){this._createForm()}this._form.action=this._servletUrl},_createForm:function(){var d=MochiKit.DOM;var rp=bobj.crv.ServletAdapter._requestParams;this._form=d.FORM({name:bobj.uniqueId(),style:"display:none",method:"POST",enctype:"application/x-www-form-urlencoded;charset=utf-8",action:this._pageUrl},d.INPUT({type:"hidden",name:rp.STATE}),d.INPUT({type:"hidden",name:rp.TARGET}),d.INPUT({type:"hidden",name:rp.ARGUMENT}));document.body.appendChild(this._form)},addRequestField:function(fldName,fldValue){if(fldName&&fldValue){if(!this._form){this._createForm()}var existingElem=this._form[fldName];if(existingElem){existingElem.value=fldValue}else{this._form.appendChild(MochiKit.DOM.INPUT({type:"hidden",name:fldName,value:fldValue}))}}},removeRequestField:function(fldName){if(fldName){var form=this._form;if(form){var existingElem=form[fldName];if(existingElem){MochiKit.DOM.removeElement(existingElem);if(form[fldName]){form[fldName]=null}}existingElem=null}}},getPostDataForPrinting:function(pageState,viewerName){var toJSON=MochiKit.Base.serializeJSON;var rp=bobj.crv.ServletAdapter._requestParams;var state=toJSON(pageState);var postData={};postData[rp.STATE]=encodeURIComponent(state);postData[rp.TARGET]=encodeURIComponent(viewerName);postData[rp.ARGUMENT]=encodeURIComponent('"axprint="');if(document.getElementById("com.sun.faces.VIEW")){postData["com.sun.faces.VIEW"]=encodeURIComponent(document.getElementById("com.sun.faces.VIEW").value)}return MochiKit.Base.queryString(postData)},processError:function(response){if(!(typeof(response.number)=="undefined")&&response.number==404){return L_bobj_crv_ServletMissing}else{if(!(typeof(response.number)=="undefined")&&response.number==500&&response.req&&response.req.responseText){return response.req.responseText.split("<body>").pop().split("</body>")[0]}}return response}});bobj.crv.AspDotNetAdapter=function(postbackEventReference,replacementParameter,stateID,callbackEventReference,aspnetVersion){this._postbackEventReference=postbackEventReference;this._replacementParameter=replacementParameter;this._stateID=stateID;this._aspnetVersion=aspnetVersion;this._form=null;this._callbackEventReference=callbackEventReference;this._additionalReqFlds=null;var tmpState=bobj.getElementByIdOrName(this._stateID);if(tmpState){this._form=tmpState.form}if(this._isAspNetVersionPriorToVersion4()){WebForm_CallbackComplete=this.WebForm_CallbackComplete}};bobj.crv.AspDotNetAdapter.prototype=MochiKit.Base.merge(bobj.crv.IOAdapterBase,{request:function(pageState,viewerName,eventArgs,allowAsync,useIframe,callbackHandler,errbackHandler){var toJSON=MochiKit.Base.serializeJSON;if(eventArgs&&this._additionalReqFlds){eventArgs=MochiKit.Base.update(eventArgs,this._additionalReqFlds)}this._additionalReqFlds=null;var jsonEventArgs=toJSON(eventArgs);this.saveViewState(pageState,viewerName);if(allowAsync){if(typeof WebForm_InitCallback=="function"){__theFormPostData="";__theFormPostCollection=[];WebForm_InitCallback()}var callback=this._callbackEventReference.replace("'arg'","jsonEventArgs");callback=callback.replace("'cb'","callbackHandler");callback=callback.replace("'errcb'","errbackHandler");callback=callback.replace("'frmID'","this._form.id");return eval(callback)}else{if(useIframe){this._form.target=this._getPostbackIframe().id}var postbackCall;if(this._postbackEventReference.indexOf("'"+this._replacementParameter+"'")>=0){postbackCall=this._postbackEventReference.replace("'"+this._replacementParameter+"'","jsonEventArgs")}else{postbackCall=this._postbackEventReference.replace('"'+this._replacementParameter+'"',"jsonEventArgs")}eval(postbackCall);this._clearEventFields()}},_isAspNetVersionPriorToVersion4:function(){if(this._aspnetVersion!=null){var sep=this._aspnetVersion.split(".");if(eval(sep[0])<4){return true}}return false},saveViewState:function(pageState,viewerName){var toJSON=MochiKit.Base.serializeJSON;var viewState=pageState[viewerName];var state=bobj.getElementByIdOrName(this._stateID);if(state){state.value=toJSON(viewState)}},getPostDataForPrinting:function(pageState,viewerName){this.saveViewState(pageState,viewerName);var nv=MochiKit.DOM.formContents(this.form);var names=nv[0];var values=nv[1];names.push("crprint");values.push(viewerName);var queryString=MochiKit.Base.queryString(names,values);return queryString},addRequestField:function(fldName,fldValue){if(!this._additionalReqFlds){this._additionalReqFlds={}}this._additionalReqFlds[fldName]=fldValue},_clearRequestField:function(fldName){if(fldName){if(this._form){var existingElem=this._form[fldName];if(existingElem){existingElem.value=""}}}},_clearEventFields:function(){this._clearRequestField("__EVENTTARGET");this._clearRequestField("__EVENTARGUMENT")},WebForm_CallbackComplete:function(){for(var i=0;i<__pendingCallbacks.length;i++){callbackObject=__pendingCallbacks[i];if(callbackObject&&callbackObject.xmlRequest&&(callbackObject.xmlRequest.readyState==4)){if(!__pendingCallbacks[i].async){__synchronousCallBackIndex=-1}__pendingCallbacks[i]=null;var callbackFrameID="__CALLBACKFRAME"+i;var xmlRequestFrame=document.getElementById(callbackFrameID);if(xmlRequestFrame){xmlRequestFrame.parentNode.removeChild(xmlRequestFrame)}WebForm_ExecuteCallback(callbackObject)}}}});bobj.crv.FacesAdapter=function(formName,servletUrl){this._formName=formName;this._servletUrl=servletUrl;this._useServlet=false;if(!bobj.crv.FacesAdapter._hasInterceptedSubmit){this._interceptSubmit();bobj.crv.FacesAdapter._hasInterceptedSubmit=true}};bobj.crv.FacesAdapter._requestParams={STATE:"CRVCompositeViewState",TARGET:"CRVEventTarget",ARGUMENT:"CRVEventArgument"};bobj.crv.FacesAdapter.prototype=MochiKit.Base.merge(bobj.crv.IOAdapterBase,{request:function(pageState,viewerName,eventArgs,allowAsync,useIframe){var rp=bobj.crv.FacesAdapter._requestParams;var toJSON=MochiKit.Base.serializeJSON;var INPUT=MochiKit.DOM.INPUT;var deferred=null;var form=this._getForm();if(!form){return}if(!form[rp.TARGET]){form.appendChild(INPUT({type:"hidden",name:rp.TARGET}))}form[rp.TARGET].value=encodeURIComponent(viewerName);if(!form[rp.ARGUMENT]){form.appendChild(INPUT({type:"hidden",name:rp.ARGUMENT}))}form[rp.ARGUMENT].value=encodeURIComponent(toJSON(eventArgs));if(!form[rp.STATE]){form.appendChild(INPUT({type:"hidden",name:rp.STATE}))}form[rp.STATE].value=encodeURIComponent(toJSON(pageState));if(allowAsync&&this._servletUrl){deferred=bobj.crv.AsyncTransporter.getInstance().post(this._servletUrl,MochiKit.Base.queryString(form),null,null,{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"})}else{var pageUrl=form.action;if(this._useServlet===true){form.action=this._servletUrl}var origTarget=form.target;if(useIframe){form.target=this._getPostbackIframe().id}form.submit();form.action=pageUrl;form.target=origTarget;this._useServlet=false}form[rp.TARGET].value="";form[rp.ARGUMENT].value="";form[rp.STATE].value="";this.removeRequestField("ServletTask");return deferred},redirectToServlet:function(){this._useServlet=true},addRequestField:function(fldName,fldValue){if(fldName&&fldValue){var form=this._getForm();if(form){var existingElem=form[fldName];if(existingElem){existingElem.value=fldValue}else{form.appendChild(MochiKit.DOM.INPUT({type:"hidden",name:fldName,value:fldValue}))}}}},removeRequestField:function(fldName){if(fldName){var form=this._getForm();if(form){var existingElem=form[fldName];if(existingElem){MochiKit.DOM.removeElement(existingElem);if(form[fldName]){form[fldName]=null}}existingElem=null}}},saveViewState:function(pageState,viewerName){if(!bobj.crv.FacesAdapter._isStateSaved){var form=this._getForm();if(form){var rp=bobj.crv.FacesAdapter._requestParams;var toJSON=MochiKit.Base.serializeJSON;var INPUT=MochiKit.DOM.INPUT;if(!form[rp.STATE]){form.appendChild(INPUT({type:"hidden",name:rp.STATE}))}form[rp.STATE].value=encodeURIComponent(toJSON(pageState))}bobj.crv.FacesAdapter._isStateSaved=true}},_getForm:function(){return document.forms[this._formName]},_interceptSubmit:function(){var form=this._getForm();if(form){var oldSubmit=form.submit;form.submit=function(){bobj.event.publish("saveViewState");form.submit=oldSubmit;form.submit()}}},getPostDataForPrinting:function(pageState,viewerName){var toJSON=MochiKit.Base.serializeJSON;var rp=bobj.crv.ServletAdapter._requestParams;var state=toJSON(pageState);var postData={};postData[rp.STATE]=encodeURIComponent(state);postData[rp.TARGET]=encodeURIComponent(viewerName);postData[rp.ARGUMENT]=encodeURIComponent('"axprint="');if(document.getElementById("com.sun.faces.VIEW")){postData["com.sun.faces.VIEW"]=encodeURIComponent(document.getElementById("com.sun.faces.VIEW").value)}return MochiKit.Base.queryString(postData)},processError:function(response){if(!(typeof(response.number)=="undefined")&&response.number==404){return L_bobj_crv_ServletMissing}else{if(!(typeof(response.number)=="undefined")&&response.number==500&&response.req&&response.req.responseText){return response.req.responseText.split("<body>").pop().split("</body>")[0]}}return response}});if(typeof bobj=="undefined"){bobj={}}bobj.ArgumentNormalizer=function(){this._rules=[]};bobj.ArgumentNormalizer.prototype={addRule:function(){this._rules.push(arguments)},normalize:function(){for(var rIdx=0,nRules=this._rules.length;rIdx<nRules;++rIdx){var rule=this._rules[rIdx];if(rule.length==arguments.length){var normalArgs={};for(var aIdx=0,nArgs=rule.length;aIdx<nArgs;++aIdx){var argVal=arguments[aIdx];var element=rule[aIdx];if(bobj.isString(element)){var argTest=null;var argName=element;var argXform=null}else{if(bobj.isArray(element)){var argTest=element[0];var argName=element[1];var argXform=element[2]}else{var argTest=element.test;var argName=element.name;var argXform=element.xform}}if(!argTest||argTest(argVal)){normalArgs[argName]=argXform?argXform(argVal):argVal;if(aIdx+1==nArgs){return normalArgs}}else{break}}}}return null},normalizeArray:function(argsArray){return this.normalize.apply(this,argsArray)}};if(typeof bobj=="undefined"){bobj={}}if(typeof bobj.event=="undefined"){bobj.event={};bobj.event._topicSubscriptions={};bobj.event._globalSubscriptions=[]}bobj.event.publish=function(topic){var args=bobj.slice(arguments,1);var topicSubs=bobj.event._topicSubscriptions[topic];if(topicSubs){for(var i=0;i<topicSubs.length;++i){topicSubs[i]._notify.apply(null,args)}}var globalSubs=bobj.event._globalSubscriptions;for(var j=0;j<globalSubs.length;++j){globalSubs[j]._notify.apply(null,args)}};bobj.event.subscribe=function(){var nmlr=bobj.event.subscribe._normalizer;if(!nmlr){nmlr=bobj.event.subscribe._normalizer=new bobj.ArgumentNormalizer();nmlr.addRule("topic","target","methName");nmlr.addRule([bobj.isString,"topic"],"callback");nmlr.addRule("target","methName");nmlr.addRule("callback")}return bobj.event.kwSubscribe(nmlr.normalizeArray(arguments))};bobj.event.kwSubscribe=function(kwArgs){var bind=MochiKit.Base.bind;var subscription={};if(kwArgs.callback){subscription._notify=kwArgs.callback}else{subscription._notify=bind(kwArgs.target[kwArgs.methName],kwArgs.target)}if(kwArgs.topic){subscription.topic=kwArgs.topic;var subs=bobj.event._topicSubscriptions;if(!subs[kwArgs.topic]){subs[kwArgs.topic]=[]}subs[kwArgs.topic].push(subscription)}else{bobj.event._globalSubscriptions.push(subscription)}return subscription};bobj.event.unsubscribe=function(subscription){var subsList=bobj.event._globalSubscriptions;if(subscription.topic){subsList=bobj.event._topicSubscriptions[subscription.topic]}if(subsList){var idx=MochiKit.Base.findIdentical(subsList,subscription);if(idx!=-1){subsList.splice(idx,1);delete subscription._notify}}};bobj.crv.newPromptPage=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId(),layoutType:"fixed",content:null,width:800,height:600,padding:5,top:0,left:0},kwArgs);var o=newWidget(kwArgs.id);o.widgetType="PromptPage";o._reportProcessing=null;bobj.fillIn(o,kwArgs);o.initOld=o.init;MochiKit.Base.update(o,bobj.crv.PromptPage);window[o.id]=o;return o};bobj.crv.PromptPage={setHTML:function(content){var pageNode=this._pageNode;if(bobj.isString(content)){var ext=bobj.html.extractHtml(content);pageNode.innerHTML=ext.html;var links=ext.links;for(var iLinks=0,linksLen=links.length;iLinks<linksLen;++iLinks){bobj.includeLink(links[iLinks])}var scripts=ext.scripts;for(var iScripts=0,scriptsLen=scripts.length;iScripts<scriptsLen;++iScripts){var script=scripts[iScripts];if(!script){continue}if(script.text){bobj.evalInWindow(script.text)}}}else{if(bobj.isObject(content)){pageNode.innerHTML="";pageNode.appendChild(content);var contentStyle=content.style;contentStyle.display="block";contentStyle.visibility="visible"}}},getHTML:function(){var h=bobj.html;var isBorderBoxModel=bobj.isBorderBoxModel();var pageOuterHeight=this.height+this.topMargin+this.bottomMargin;var pageOuterWidth=this.width+this.leftMargin+this.rightMargin;var contentHeight=isBorderBoxModel?pageOuterHeight:this.height;var contentWidth=isBorderBoxModel?pageOuterWidth:this.width;var layerStyle={position:"relative",width:contentWidth+"px",height:contentHeight+"px",top:this.top+"px",left:this.left+"px",border:"none","z-index":1,"background-color":this.bgColor};if(this.layoutType=="fixed"){layerStyle.overflow="auto"}var pageStyle={padding:this.padding+"px"};var html=h.DIV({id:this.id,style:layerStyle},h.DIV({id:this.id+"_page",style:pageStyle}));return html},init:function(){this._pageNode=document.getElementById(this.id+"_page");this.initOld();if(this.contentId){var content=document.getElementById(this.contentId);if(content){this.setHTML(content)}}else{if(this.content){this.setHTML(this.content);delete this.content}}var connect=MochiKit.Signal.connect;if(this.layoutType.toLowerCase()=="client"){connect(window,"onresize",this,"_doLayout")}this._doLayout()},_doLayout:function(){var layout=this.layoutType.toLowerCase();if("client"==layout){this.css.width="100%";this.css.height="100%"}else{if("fitreport"==layout){this.css.width="100%";this.css.height="100%"}else{if(this.width!=null&&this.width.length>0){if(this.width.indexOf("px")>0||this.width.indexOf("%")>0){this.css.width=this.width}else{this.css.width=this.width+"px"}}if(this.height!=null&&this.height.length>0){if(this.height.indexOf("px")>0||this.height.indexOf("%")>0){this.css.height=this.height}else{this.css.height=this.height+"px"}}}}var rptProcessing=this._reportProcessing;if(rptProcessing&&rptProcessing.layer){rptProcessing.center()}},addChild:function(widget){if(widget.widgetType=="ReportProcessingUI"){this._reportProcessing=widget}}};bobj.crv.newFlexPromptPage=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId(),layoutType:"fixed",width:800,height:600,padding:5,top:0,left:0},kwArgs);var o=newWidget(kwArgs.id);o.widgetType="FlexPromptPage";o._reportProcessing=null;bobj.fillIn(o,kwArgs);o.initOld=o.init;MochiKit.Base.update(o,bobj.crv.FlexPromptPage);window[o.id]=o;return o};bobj.crv.FlexPromptPage={setHTML:MochiKit.Base.noop,getHTML:function(){var isBorderBoxModel=bobj.isBorderBoxModel();var pageOuterHeight=this.height+this.topMargin+this.bottomMargin;var pageOuterWidth=this.width+this.leftMargin+this.rightMargin;var contentHeight=isBorderBoxModel?pageOuterHeight:this.height;var contentWidth=isBorderBoxModel?pageOuterWidth:this.width;var useSize=this.layoutType.toLowerCase()==bobj.crv.Viewer.LayoutTypes.FIXED;var layerStyle={position:"relative",width:useSize?contentWidth+"px":"100%",height:useSize?contentHeight+"px":"100%",top:this.top+"px",left:this.left+"px",border:"none","z-index":1,"background-color":this.bgColor};var pageStyle={padding:this.padding+"px",position:"absolute"};bobj.crv.params.ViewerFlexParameterAdapter.setViewerLayoutType(this.id,this.layoutType);var h=bobj.html;return h.DIV({id:this.id,style:layerStyle},h.DIV({id:this.id+"_page",style:pageStyle},h.DIV({id:this.contentId})))},init:function(){var connect=MochiKit.Signal.connect;if(this.layoutType.toLowerCase()=="client"){connect(window,"onresize",this,"_doLayout")}this._doLayout()},_doLayout:function(){var rptProcessing=this._reportProcessing;if(rptProcessing&&rptProcessing.layer){rptProcessing.center()}},addChild:function(widget){if(widget.widgetType=="ReportProcessingUI"){this._reportProcessing=widget}}};if(typeof bobj.crv.PrintUI=="undefined"){bobj.crv.PrintUI={}}if(typeof bobj.crv.ExportUI=="undefined"){bobj.crv.ExportUI={}}if(typeof bobj.crv.ErrorDialog=="undefined"){bobj.crv.ErrorDialog={}}if(typeof bobj.crv.ReportProcessingUI=="undefined"){bobj.crv.ReportProcessingUI={}}bobj.crv.newPrintUI=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId(),width:(bobj.crv.config.isRTL?340:325),isExporting:false,isActxPrinting:false,height:335},kwArgs);var lbl=kwArgs.submitBtnLabel;if(!lbl){lbl=L_bobj_crv_submitBtnLbl}var infoTitle=kwArgs.infoTitle;if(!infoTitle){infoTitle=L_bobj_crv_PrintInfoTitle}var dialogTitle=kwArgs.dialogTitle;if(!dialogTitle){if(kwArgs.isActxPrinting){dialogTitle=L_bobj_crv_ActiveXPrintDialogTitle}else{dialogTitle=L_bobj_crv_PDFPrintDialogTitle}}var infoMsg=kwArgs.infoMsg;if(!infoMsg){infoMsg=L_bobj_crv_PrintInfo1;infoMsg+="\n";infoMsg+=L_bobj_crv_PrintInfo2}var o=newDialogBoxWidget(kwArgs.id+"_dialog",dialogTitle,kwArgs.width,kwArgs.height,null,bobj.crv.PrintUI._cancel,false,kwArgs.isActxPrinting);o.infoMsg=infoMsg;o.infoTitle=infoTitle;o.actxId=o.id+"_actx";o.actxContainerId=o.id+"_actxdiv";o._processingPrinting=false;o._initOld=o.init;o._showOld=o.show;if(!kwArgs.isActxPrinting){o._fromBox=newIntFieldWidget(o.id+"_fromBox",null,null,null,null,true,"",50);o._fromBox.setDisabled=bobj.crv.PrintUI.disabledTextFieldWidget;o._toBox=newIntFieldWidget(o.id+"_toBox",null,null,null,null,true,"",50);o._toBox.setDisabled=bobj.crv.PrintUI.disabledTextFieldWidget;o._submitBtn=newButtonWidget(o.id+"_submitBtn",lbl,MochiKit.Base.bind(bobj.crv.PrintUI._submitBtnCB,o));o._submitBtn.setDelayCallback(false);o._allRadio=newRadioWidget(o.id+"_allRadio",o.id+"_grp",L_bobj_crv_PrintAllLbl,MochiKit.Base.bind(bobj.crv.PrintUI.disabledPageRange,o,true));o._allRadio.layerClass="dlgContent";o._rangeRadio=newRadioWidget(o.id+"_rangeRadio",o.id+"_grp",L_bobj_crv_PrintPagesLbl,MochiKit.Base.bind(bobj.crv.PrintUI.disabledPageRange,o,false));o._rangeRadio.layerClass="dlgContent"}o.widgetType="PrintUI";bobj.fillIn(o,kwArgs);MochiKit.Base.update(o,bobj.crv.PrintUI);return o};bobj.crv.PrintUI.disabledTextFieldWidget=function(disabled){TextFieldWidget_setDisabled.call(this,disabled);if(disabled){MochiKit.DOM.addElementClass(this.layer,"textDisabled")}else{MochiKit.DOM.removeElementClass(this.layer,"textDisabled")}};bobj.crv.PrintUI.disabledPageRange=function(bool){if(this._fromBox&&this._toBox){this._fromBox.setDisabled(bool);this._toBox.setDisabled(bool)}};bobj.crv.PrintUI._submitBtnCB=function(){var start=null;var end=null;if(this._rangeRadio.isChecked()){start=parseInt(this._fromBox.getValue(),10);end=parseInt(this._toBox.getValue(),10);if(!start||!end||(start<0)||(start>end)){MochiKit.Signal.signal(this,"showError",L_bobj_crv_PrintPageRangeError);return}}if(this.widgetType=="PrintUI"){MochiKit.Signal.signal(this,"printSubmitted",start,end)}else{MochiKit.Signal.signal(this,"exportSubmitted",start,end,this._comboBox.getSelection().value)}this.show(false)};bobj.crv.PrintUI._getRPSafeURL=function(url){if(!url){return}if(url.indexOf("/")===0){return url}var winLoc=window.location.href;var qPos=winLoc.lastIndexOf("?");if(qPos>0){winLoc=winLoc.substring(0,qPos)}var lPos=winLoc.lastIndexOf("/");if(lPos<0){return url}winLoc=winLoc.substring(0,lPos);return winLoc+"/"+url};bobj.crv.PrintUI._getObjectTag=function(postData){var oa=[];oa.push('<OBJECT width="0" height="0" ID="');oa.push(this.actxId);oa.push('" CLASSID="CLSID:');oa.push(bobj.crv.ActxPrintControl_CLSID);oa.push('" CODEBASE="');oa.push(this._getRPSafeURL(this.codeBase));oa.push("#Version=");oa.push(bobj.crv.ActxPrintControl_Version);oa.push('" VIEWASTEXT>');oa.push('<PARAM NAME="PostBackData" VALUE="');oa.push(postData);oa.push('">');oa.push('<PARAM NAME="ServerResourceVersion" VALUE="');oa.push(bobj.crv.ActxPrintControl_Version);oa.push('">');if(this.lcid){oa.push('<PARAM NAME="LocaleID" VALUE="');oa.push(this.lcid);oa.push('">')}if(this.url){oa.push('<PARAM NAME="URL" VALUE="');oa.push(this._getRPSafeURL(this.url));oa.push('">')}if(this.title){oa.push('<PARAM NAME="Title" VALUE="');oa.push(this.title);oa.push('">')}if(this.maxPage){oa.push('<PARAM NAME="MaxPageNumber" VALUE="');oa.push(this.maxPage);oa.push('">')}if(this.paperOrientation){oa.push('<PARAM NAME="PageOrientation" VALUE="');oa.push(this.paperOrientation);oa.push('">')}if(this.paperSize){oa.push('<PARAM NAME="PaperSize" VALUE="');oa.push(this.paperSize);oa.push('">')}if(this.paperWidth){oa.push('<PARAM NAME="PaperWidth" VALUE="');oa.push(this.paperWidth);oa.push('">')}if(this.paperLength){oa.push('<PARAM NAME="PaperLength" VALUE="');oa.push(this.paperLength);oa.push('">')}if(this.driverName){oa.push('<PARAM NAME="PrinterDriverName" VALUE="');oa.push(this.driverName);oa.push('">')}if(this.useDefPrinter){oa.push('<PARAM NAME="UseDefaultPrinter" VALUE="');oa.push(this.useDefPrinter);oa.push('">')}if(this.useDefPrinterSettings){oa.push('<PARAM NAME="UseDefaultPrinterSettings" VALUE="');oa.push(this.useDefPrinterSettings);oa.push('">')}if(this.sendPostDataOnce){oa.push('<PARAM NAME="SendPostDataOnce" VALUE="');oa.push(this.sendPostDataOnce);oa.push('">')}oa.push("</OBJECT>");oa.push('<table id="');oa.push(this.actxId);oa.push('_wait" border="0" cellspacing="0" cellpadding="0" width="100%" ><tbody>');oa.push('<tr><td align="center" valign="top">');var o=this;var zoneW=o.getContainerWidth()-10;var zoneH=o.getContainerHeight()-(2*o.pad+21+10);oa.push('<table style="');oa.push(sty("width",zoneW));oa.push(sty("height",zoneH));oa.push('" id="frame_table_');oa.push(o.id);oa.push('" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" class="dlgFrame" style="padding:5px" id="frame_cont_');oa.push(o.id);oa.push('">');oa.push('<table border="0" cellspacing="0" cellpadding="0" width="100%"><tbody>');oa.push('<tr><td align="center" style="padding-top:5px;">');oa.push(img(_skin+"wait01.gif",200,40));oa.push("</td></tr>");oa.push('<tr><td align="'+(bobj.crv.config.isRTL?"right":"left")+'" style="padding-left:2px;padding-right:2px;padding-top:5px;">');oa.push('<div class="icontext" style="wordWrap:break_word;">');oa.push(convStr(L_bobj_crv_PrintControlProcessingMessage,false,true));oa.push("</div></td></tr></tbody></table>");oa.push("</td></tr></tbody></table>");oa.push("</td></tr></tbody></table>");return oa.join("")};bobj.crv.PrintUI._cancel=function(){if(this.isActxPrinting){document.getElementById(this.actxContainerId).innerHTML="";this._processingPrinting=false}};bobj.crv.PrintUI._processPrinting=function(){if(!this._processingPrinting){var o=document.getElementById(this.actxId);var w=document.getElementById(this.actxId+"_wait");if(o&&w){o.width="100%";o.height="100%";w.style.display="none"}this._processingPrinting=true}};bobj.crv.PrintUI.show=function(visible,postBackData){this._processingPrinting=false;if(visible){if(!this.layer){targetApp(this.getHTML());this.init()}if(this.isActxPrinting){this.resize(null,100);document.getElementById(this.actxContainerId).innerHTML=this._getObjectTag(postBackData)}this._showOld(true)}else{if(this.layer){this._showOld(false)}}};bobj.crv.PrintUI.init=function(){this._initOld();if(!this.isActxPrinting){this._fromBox.init();this._toBox.init();this._submitBtn.init();this._allRadio.init();this._rangeRadio.init();this._allRadio.check(true);this._toBox.setDisabled(true);this._fromBox.setDisabled(true);if(this.widgetType=="ExportUI"){this._updateExportList()}}};bobj.crv.PrintUI.getHTML=function(){var h=bobj.html;var o=this;var html=o.beginHTML();if(!this.isActxPrinting){html+="<table "+(bobj.crv.config.isRTL?"dir='rtl'":"")+" cellspacing=0 cellpadding=0 border=0><tr><td><div class='dlgFrame'><table cellspacing=0 cellpadding=0 border=0><tr><td valign='top' class='naviBarFrame naviFrame'>"+(this.isExporting?this._getExportList():"")+"<fieldset style='border:0px;padding:0px'><legend style='position:relative;"+(_ie?"margin:0px -7px":"")+"'><table datatable='0' style='width:100%;line-height:10px;'><tr>"+(_ie?"<td class='dialogTitleLevel2'><label>":"<td class='dialogTitleLevel2'><label>")+L_bobj_crv_PrintRangeLbl+"</label></td><td class='dialogTitleLevel2Underline' style='width:100%'> </td></tr></table></legend><div style='margin:10px 25px;'>"+o._allRadio.getHTML()+o._rangeRadio.getHTML()+"<div style='padding-"+(bobj.crv.config.isRTL?"right":"left")+":25px'><table class=dlgContent datatable='0'><tr><td align=right><label for='"+o._fromBox.id+"'> "+L_bobj_crv_PrintFromLbl+"</label></td><td align="+(_rtl?"right":"left")+"> "+o._fromBox.getHTML()+"</td></tr><tr><td align=right><label for='"+o._toBox.id+"'> "+L_bobj_crv_PrintToLbl+"</label></td><td align="+(_rtl?"right":"left")+"> "+o._toBox.getHTML()+"</td></tr></table></div></div></fieldset>"+(!this.isExporting?"<table style='width:100%;line-height:10px;'><tr><td class='dialogTitleLevel2' tabIndex=0><label>"+this.infoTitle+"</label></td><td class='dialogTitleLevel2Underline' style='width:100%'> </td></tr></table><div style='margin:10px 0px 10px 25px;' class='dlgHelpText'>"+this.infoMsg+"</div>":"")+"</td></tr></table></div></td></tr><tr><td align='"+(bobj.crv.config.isRTL?"left":"right")+"' valign='top'><table style='margin:6px 9px 6px 9px' cellspacing=0 cellpadding=0 border=0><tbody><tr><td>"+this._submitBtn.getHTML()+"</td></tbody></tr></table></td></tr></table>"}else{html+="<div id='"+this.actxContainerId+"'></div><script for=\""+this.actxId+'" EVENT="Finished(status, statusText)" language="javascript">DHTMLLIB.getWidgetFromID("'+this.id+'").show(false);<\/script><script for="'+this.actxId+'" EVENT="PrintingProgress(pageNumber)" language="javascript">DHTMLLIB.getWidgetFromID("'+this.id+'")._processPrinting();<\/script>'}html+=o.endHTML();return html};bobj.crv.newExportUI=function(kwArgs){kwArgs=MochiKit.Base.update({submitBtnLabel:L_bobj_crv_ExportBtnLbl,dialogTitle:L_bobj_crv_ExportDialogTitle,infoTitle:L_bobj_crv_ExportInfoTitle,infoMsg:L_bobj_crv_PrintInfo1,isExporting:true,width:310,height:268},kwArgs);var o=bobj.crv.newPrintUI(kwArgs);o._comboBox=newCustomCombo(o.id+"_combo",MochiKit.Base.bind(bobj.crv.ExportUI._onSelectFormat,o),false,218,L_bobj_crv_ExportFormatLbl,_skin+"../transp.gif",0,14);if(o._comboBox){o._comboBox.icon.border=0;o._comboBox.icon.h=18;o._comboBox.arrow.h=14;o._comboBox.arrow.dy+=2;o._comboBox.arrow.disDy+=2}o.widgetType="ExportUI";MochiKit.Base.update(o,bobj.crv.ExportUI);if(_rtl){o._comboBox.menu.isCentered=true}return o};bobj.crv.ExportUI._onSelectFormat=function(){var format=this._comboBox.getSelection().value;if(format=="CrystalReports"||format=="RPTR"||format=="RecordToMSExcel"||format=="RecordToMSExcel2007"||format=="CharacterSeparatedValues"||format=="XML"){this._fromBox.setDisabled(true);this._toBox.setDisabled(true);this._rangeRadio.check(false);this._rangeRadio.setDisabled(true);this._allRadio.check(true)}else{this._rangeRadio.setDisabled(false)}};bobj.crv.ExportUI.update=function(update){if(!update||update.cons!=="bobj.crv.newExportUI"){return}this.availableFormats=update.args.availableFormats;if(this._comboBox.initialized()){this._updateExportList()}};bobj.crv.ExportUI._updateExportList=function(){if(!this._comboBox.initialized()){this._comboBox.init()}this._updateComboItems();var item0=this._comboBox.getItemByIndex(0);if(item0!=null){this._comboBox.selectItem(item0)}this._onSelectFormat()};bobj.crv.ExportUI._updateComboItems=function(){this._comboBox.removeAllMenuItems();var itemsCount=(bobj.isArray(this.availableFormats)?this.availableFormats.length:0);for(var i=0;i<itemsCount;i++){var item=this.availableFormats[i];this._comboBox.add(item.name,item.value,item.isSelected)}};bobj.crv.ExportUI._getExportList=function(){return"<table datatable='0' style='width:100%;line-height:10px;'><tr>"+(_ie?"<td class='dialogTitleLevel2'><label>":"<td class='dialogTitleLevel2'><label>")+L_bobj_crv_ExportFormatLbl+"</label></td><td class='dialogTitleLevel2Underline' style='width:100%'> </td></tr></table><div style='margin:10px 25px;'>"+this._comboBox.getHTML()+"</div>"};bobj.crv.ErrorDialog.getInstance=function(){if(!bobj.crv.ErrorDialog.__instance){bobj.crv.ErrorDialog.__instance=bobj.crv.newErrorDialog()}return bobj.crv.ErrorDialog.__instance};bobj.crv.newErrorDialog=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId(),title:L_bobj_crv_Error,text:null,detailText:null,okLabel:L_bobj_crv_OK,promptType:_promptDlgCritical},kwArgs);var o=newPromptDialog(kwArgs.id,kwArgs.title,kwArgs.text,kwArgs.okLabel,null,kwArgs.promptType,null,null,true,true);o.widgetType="ErrorDialog";bobj.fillIn(o,kwArgs);o._promptDlgInit=o.init;o._promptDialogSetText=o.setText;o._promptDialogShow=o.show;o._promptDialogSetTitle=o.setTitle;o._promptDialogSetPromptType=o.setPromptType;MochiKit.Base.update(o,bobj.crv.ErrorDialog);o.noCB=MochiKit.Base.bind(o._onClose,o);o.yesCB=o.noCB;o._detailBtn=newIconWidget(o.id+"_detailBtn",bobj.skinUri("../help.gif"),MochiKit.Base.bind(bobj.crv.ErrorDialog._onDetailBtnClick,o),L_bobj_crv_showDetails,L_bobj_crv_showDetails,16,16,0,0,22,0,true);o._separator=newSeparatorWidget(o.id+"_sep",null,4,2,4,2);return o};bobj.crv.ErrorDialog.init=function(){this._promptDlgInit();this._detailBtn.init();this._separator.init();this._detailRow=document.getElementById(this.id+"_detRow");this._detailArea=document.getElementById(this.id+"_detArea");if(!this.detailText){this._detailBtn.show(false)}};bobj.crv.ErrorDialog.getHTML=function(){var h=bobj.html;var TABLE=h.TABLE;var TBODY=h.TBODY;var TR=h.TR;var TD=h.TD;var PRE=h.PRE;var DIV=h.DIV;var imgPath=PromptDialog_getimgPath(this.promptType);var imgAlt=PromptDialog_getimgAlt(this.promptType);var errorText=convStr(this.text,false,true);var width="320";var detailWidth="300px";var detailHeight="100px";var contentHTML=TABLE({"class":"dlgBody",dir:(bobj.crv.config.isRTL?"RTL":"LTR"),width:width,cellpadding:"0",cellspacing:"5",border:"0"},TBODY(null,TR(null,TD(null,TABLE({"class":"dlgBody",cellpadding:"5",cellspacing:"0",border:"0"},TBODY(null,TR(null,TD({align:(bobj.crv.config.isRTL?"left":"right"),width:"32"},img(imgPath,32,32,null,'id="dlg_img_'+this.id+'"',imgAlt)),TD(),TD({id:"dlg_txt_"+this.id,align:(bobj.crv.config.isRTL?"right":"left")},DIV({tabindex:"0"},errorText))))))),TR({id:this.id+"_detRow",style:{display:"none"}},TD(null,DIV({"class":"infozone",dir:"ltr",style:{width:detailWidth,height:detailHeight,overflow:"auto"}},PRE({id:this.id+"_detArea"},this.detailText)))),TR(null,TD(null,this._separator.getHTML())),TR(null,TD(null,TABLE({cellpadding:"5",cellspacing:"0",border:"0",width:"100%"},TBODY(null,TR(null,TD({align:(bobj.crv.config.isRTL?"right":"left")},this._detailBtn.getHTML()),TD({align:(bobj.crv.config.isRTL?"left":"right")},this.yes.getHTML()))))))));return this.beginHTML()+contentHTML+this.endHTML()};bobj.crv.ErrorDialog.setText=function(text,detailText){if(bobj.crv.config.isRTL){text=text.replace(/]/g,"]‎").replace(/\[/g,"‎[")}this.text=text;this.detailText=detailText;if(this.layer){this._promptDialogSetText(text||"");if(this._detailArea){this._detailArea.innerHTML=detailText||""}var showDetails=detailText?true:false;this._detailBtn.show(showDetails);if(!showDetails){this.showDetails(false)}}};bobj.crv.ErrorDialog.setTitle=function(title){this.title=title;if(this.layer){this._promptDialogSetTitle(title||"")}};bobj.crv.ErrorDialog.setPromptType=function(promptType){this.promptType=promptType;if(this.layer){this._promptDialogSetPromptType(promptType)}};bobj.crv.ErrorDialog.show=function(isShow,closeCB){if(typeof isShow=="undefined"){isShow=true}if(isShow){this.lastFocusElement=bobj.getActiveElement();this._closeCB=closeCB;if(!this.layer){targetApp(this.getHTML());this.init()}this.layer.onkeyup=DialogBoxWidget_keypress;DialogBoxWidget_keypress=MochiKit.Base.noop;this._promptDialogShow(true)}else{if(this.layer){this._closeCB=null;this._promptDialogShow(false);if(this.lastFocusElement){try{this.lastFocusElement.focus()}catch(e){}this.lastFocusElement=null}}}};bobj.crv.ErrorDialog.showDetails=function(isShow){if(typeof isShow=="undefined"){isShow=true}if(this._detailRow&&this._detailBtn){if(isShow){this._detailRow.style.display="";this._detailBtn.changeText(L_bobj_crv_hideDetails)}else{this._detailRow.style.display="none";this._detailBtn.changeText(L_bobj_crv_showDetails)}}};bobj.crv.ErrorDialog._onDetailBtnClick=function(){if(this._detailRow){this.showDetails(this._detailRow.style.display=="none")}};bobj.crv.ErrorDialog._onClose=function(){if(this._closeCB){this._closeCB();this._closeCB=null}DialogBoxWidget_keypress=this.layer.onkeyup;this.layer.onkeyup=null};bobj.crv.newReportProcessingUI=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId(),delay:250,message:L_bobj_crv_ReportProcessingMessage},kwArgs);var d=document.createElement("div");d.style.visibility="hidden";d.innerHTML=kwArgs.message;var newMsg=d.innerHTML;d=null;var o=newWaitDialogBoxWidget(kwArgs.id,0,0,"",false,bobj.crv.ReportProcessingUI.cancelCB,true,newMsg,true);o.widgetType="ReportProcessingUI";o.delay=kwArgs.delay;MochiKit.Base.update(o,bobj.crv.ReportProcessingUI);return o};bobj.crv.reportProcessingDialog=null;bobj.crv.timerID=null;bobj.crv.ReportProcessingUI.cancelCB=function(){bobj.crv.reportProcessingDialog.cancelled=true;if(bobj.crv.reportProcessingDialog.deferred!==null){bobj.crv.reportProcessingDialog.deferred.cancel()}bobj.crv.reportProcessingDialog.cancelShow()};bobj.crv.ReportProcessingUI.wasCancelled=function(){return bobj.crv.reportProcessingDialog.cancelled};bobj.crv.ReportProcessingUI._prepareToShow=function(){if(bobj.crv.reportProcessingDialog!==null){bobj.crv.reportProcessingDialog.cancelShow()}if(!this.layer){append2(document.body,this.getHTML());this.init()}this.deferred=null;bobj.crv.reportProcessingDialog=this};bobj.crv.ReportProcessingUI.Show=function(){this.lastFocusElement=bobj.getActiveElement();this._prepareToShow();bobj.crv.reportProcessingDialog.show(true)};bobj.crv.ReportProcessingUI.delayedShow=function(){this.lastFocusElement=bobj.getActiveElement();this._prepareToShow();bobj.crv.timerID=setTimeout("bobj.crv._showReportProcessingDialog ()",bobj.crv.reportProcessingDialog.delay)};bobj.crv.ReportProcessingUI.cancelShow=function(){if(bobj.crv.timerID){clearTimeout(bobj.crv.timerID)}if(bobj.crv.reportProcessingDialog){bobj.crv.reportProcessingDialog.show(false)}bobj.crv.reportProcessingDialog=null;bobj.crv.timerID=null;if(this.lastFocusElement){try{this.lastFocusElement.focus()}catch(e){}this.lastFocusElement=null}};bobj.crv.ReportProcessingUI.setDeferred=function(deferred){bobj.crv.reportProcessingDialog.deferred=deferred;if(bobj.crv.reportProcessingDialog.wasCancelled()===true){deferred.cancel()}};bobj.crv._showReportProcessingDialog=function(){if(bobj.crv.reportProcessingDialog&&bobj.crv.reportProcessingDialog.delay!==0){bobj.crv.logger.info("ShowReportProcessingDialog");bobj.crv.reportProcessingDialog.show(true)}};bobj.crv.newStackedTab=function(kwArgs){var UPDATE=MochiKit.Base.update;kwArgs=UPDATE({id:bobj.uniqueId(),label:"",width:300,height:null,openAdvCB:null,name:"",isDataFetching:false},kwArgs);var o=newWidget(kwArgs.id);o.widgetType="StackedTab";bobj.fillIn(o,kwArgs);o._content=null;if(o.openAdvCB){o._advanceButton=newIconWidget(o.id+"_advBtn",bobj.crv.allInOne.uri,o.openAdvCB,null,L_bobj_crv_paramsOpenAdvance.replace("%1",o.name),10,10,3,bobj.crv.allInOne.openParameterArrowDy+(_ie?2:3));bobj.crv.setAllClasses(o._advanceButton,"button");o._advanceButton.margin=0}o._initWidget=o.init;o._resizeWidget=o.resize;UPDATE(o,bobj.crv.StackedTab);return o};bobj.crv.StackedTab={setTabDisabled:function(dis){if(this._content){this._content.setTabDisabled(dis)}if(this._advanceButton&&this._advanceButton.layer){bobj.disableTabbingKey(this._advanceButton.layer,dis)}if(this._textCtn){bobj.disableTabbingKey(this._textCtn,dis)}if(this._dataFetchLayer){bobj.disableTabbingKey(this._dataFetchLayer,dis)}},init:function(){var connect=MochiKit.Signal.connect;var signal=MochiKit.Signal.signal;var partial=MochiKit.Base.partial;this._initWidget();if(this._content){this._content.init()}if(this._advanceButton){this._advanceButton.init();this._onAdvanceButtonClickOld=MochiKit.Base.bind(this._advanceButton.layer.onclick,this._advanceButton.layer);this._advanceButton.layer.onclick=MochiKit.Base.bind(this.advButtonOnClick,this);this._advanceButton.css.width="14px"}this._dataFetchLayer=getLayer(this.id+"_df");this._labelCtn=getLayer(this.id+"_labelCtn");this._textCtn=getLayer(this.id+"_textCtn");this._contentCtn=getLayer(this.id+"_contentCtn");if(this._advanceButton){var advButtonLayer=this._advanceButton.layer;var bind=bobj.bindFunctionToObject;connect(this.layer,"onclick",bind(IconWidget_upCB,advButtonLayer));connect(this.layer,"onmouseover",bind(IconWidget_realOverCB,advButtonLayer));connect(this.layer,"onmouseout",bind(IconWidget_realOutCB,advButtonLayer));connect(this.layer,"onmousedown",bind(IconWidget_downCB,advButtonLayer))}connect(this._content,"ParameterUIResized",partial(signal,this,"StackedTabResized"))},getHTML:function(){var h=bobj.html;var DIV=h.DIV;var IMG=h.IMG;var stackedTabAtt={"class":"stackedTab",cellpadding:"0",id:this.id,style:{cursor:this._advanceButton?_hand:"default"}};var labelCtnAtt={id:this.id+"_labelCtn",cellpadding:"0","class":"crvnoselect stackedTabTitle"};var contentHTML=this._content?this._content.getHTML():"";var advButtonHTML=this._advanceButton?h.TD({width:"17px"},this._advanceButton.getHTML()):"";var dataFetchHTML="";if(this.isDataFetching){var URL_TAG="url(%1);";dataFetchHTML=h.TD({width:"20px"},IMG({src:_skin+"../transp.gif",title:L_bobj_crv_ParamsDataTip,tabindex:0,id:this.id+"_df",style:{width:"16px",height:"16px","background-image":URL_TAG.replace("%1",bobj.crv.allInOne.uri),"background-position":"0px "+(-bobj.crv.allInOne.paramDataFetchingDy)+"px","margin-right":"4px","vertical-align":"middle"}}))}var html=DIV(stackedTabAtt,DIV(labelCtnAtt,h.TABLE({cellpadding:"0",width:"100%",height:"20px",style:{"table-layout":"fixed"}},h.TD({style:{"vertical-align":"top",overflow:"hidden"}},DIV({"class":"stackedTabText",id:this.id+"_textCtn",title:this.label},convStr(this.label))),dataFetchHTML,advButtonHTML)),DIV({id:this.id+"_contentCtn","class":"stackedTabContentCtn"},contentHTML));return html},setDirty:function(isDirty){if(this._textCtn){this._textCtn.style.fontStyle=isDirty?"italic":"";this._textCtn.title=isDirty?this.label+" "+L_bobj_crv_ParamsDirtyTip:this.label}if(this._labelCtn){var titleClassName=isDirty?"stackedTabTitleDirty":"stackedTabTitle";this._labelCtn.setAttribute("className",titleClassName);this._labelCtn.setAttribute("class",titleClassName)}},resize:function(w){w=w-4;if(this._labelCtn){var excludeMargins=!_saf;bobj.setOuterSize(this._labelCtn,w,null,excludeMargins)}if(this._content){this._content.resize(w-2)}bobj.setOuterSize(this.layer,w)},setContent:function(widget){this._content=widget},getContent:function(){return this._content},focusAdvButton:function(){if(this._advanceButton&&this._advanceButton.focus){this._advanceButton.focus()}},advButtonOnClick:function(e){if(this._onAdvanceButtonClickOld){this._onAdvanceButtonClickOld(e);eventCancelBubble(e)}}};if(typeof(bobj.crv.StackedPanel)=="undefined"){bobj.crv.StackedPanel={}}bobj.crv.newStackedPanel=function(kwArgs){var mb=MochiKit.Base;var UPDATE=mb.update;var BIND=mb.bind;kwArgs=UPDATE({id:bobj.uniqueId(),width:null,height:null},kwArgs);var o=newWidget(kwArgs.id);o.widgetType="StackedPanel";bobj.fillIn(o,kwArgs);o._tabs=[];o.vsbar=new bobj.crv.VerticalScrollBar();o.vsbar.isRTL=bobj.crv.config.isRTL;o._initWidget=o.init;o._resizeWidget=o.resize;UPDATE(o,bobj.crv.StackedPanel);return o};bobj.crv.StackedPanel={init:function(){this._initWidget();this._tabsNode=getLayer(this.id+"_tabs");this.vsbar.init();this.vsbar.setScrollableElement(this._tabsNode);var tabs=this._tabs;var index=this._numTabsWritten;while(index<tabs.length){append(this._tabsNode,tabs[index].getHTML(),document);index++}for(var i=0,len=tabs.length;i<len;++i){tabs[i].init()}},setTabDisabled:function(dis){for(var i=0,len=this._tabs.length;i<len;i++){this._tabs[i].setTabDisabled(dis)}},getHTML:function(){var DIV=bobj.html.DIV;var layerStyle={};if(this.height){layerStyle.height=bobj.unitValue(this.height)}if(this.width){layerStyle.width=bobj.unitValue(this.width)}return DIV({id:this.id,style:layerStyle,"class":"stackedPanel",tabIndex:"-1"},DIV({id:this.id+"_tabs",style:{overflow:"hidden"}},this._getTabsHTML()),this.vsbar.getHTML())},_getTabsHTML:function(){var tabsHTML="";var tabs=this._tabs;var tabsLen=tabs.length;for(var i=0;i<tabsLen;++i){tabsHTML+=tabs[i].getHTML()}this._numTabsWritten=tabsLen;return tabsHTML},addTab:function(tab){if(tab){this._tabs.push(tab);if(this._tabsNode){append(this._tabsNode,tab.getHTML());tab.init()}if(this._tabsNode){tab.resize(this._tabsNode.clientWidth)}MochiKit.Signal.connect(tab,"StackedTabResized",this,"_onStackedTabResize")}},getNumTabs:function(){return this._tabs.length},getTab:function(index){return this._tabs[index]},removeTab:function(index){if(index>=0&&index<this._tabs.length){var tab=this._tabs[index];this._tabs.splice(index,1);delete _widgets[this._tabs.widx];if(tab.layer){tab.layer.parentNode.removeChild(tab.layer)}}},_onStackedTabResize:function(){this.resize(this.getWidth(),this.getHeight())},_doLayout:function(w,h){var excludeMargins=!_saf;bobj.setOuterSize(this.layer,w,h,excludeMargins);bobj.setOuterSize(this._tabsNode,w,h,excludeMargins);this.vsbar.adjustForResize(h);var tabs=this._tabs;var tabsLen=tabs.length;if(tabsLen){var tabWidth=this.layer.clientWidth;if(this.vsbar.isDisplayed()){tabWidth=Math.max(0,tabWidth-this.vsbar.SCROLLBAR_SIZE)}tabs[0].resize(tabWidth);if(tabWidth!=this.layer.clientWidth){tabWidth=this.layer.clientWidth;if(this.vsbar.isDisplayed()){tabWidth=Math.max(0,tabWidth-this.vsbar.SCROLLBAR_SIZE)}tabs[0].resize(tabWidth)}for(var i=1;i<tabsLen;++i){tabs[i].resize(tabWidth)}bobj.setOuterSize(this._tabsNode,tabWidth,null,excludeMargins)}},resize:function(w,h){this._doLayout(w,h)}};bobj.crv.SelectList=function(id,ariaLabel){this.id=id?id:bobj.uniqueId()+"_selectList";this.ariaLabel=ariaLabel?ariaLabel:"";this._prevSelectedItem=null;this._prevFocusedItem=null;this._children=new Array();this._curSigs=new Array();this.widx=_widgets.length;_widgets[this.widx]=this;this.vsbar=new bobj.crv.VerticalScrollBar()};bobj.crv.SelectList.prototype={addChild:function(title,desc,groupPath,isRTL){var newItem=new bobj.crv.SelectListItem(title,desc,groupPath,isRTL);append(this._itemsNode,newItem.getHTML());newItem.init();this._children.push(newItem);this._curSigs.push(MochiKit.Signal.connect(newItem,"selected",this,this.onSelectItem));this._curSigs.push(MochiKit.Signal.connect(newItem,"focused",this,this.onFocusItem));return newItem},removeChild:function(child){var childIndex=-1;for(var i=this._children.length-1;i>=0;i--){if(this._children[i]==child){childIndex=i;break}}if(childIndex>-1){this._children.splice(childIndex,1);var focusPrevChild=false;if(child==this._prevFocusedItem){focusPrevChild=true;this._prevFocusedItem=null}if(child==this._prevSelectedItem){focusPrevChild=true;this._prevSelectedItem=null}if(focusPrevChild){var prevChild=this._children[childIndex-1];if(prevChild&&prevChild.layer){prevChild.layer.onfocus()}}child.dispose()}},onSelectItem:function(item){if(this._prevSelectedItem&&this._prevSelectedItem!=item){this._prevSelectedItem.deselect()}this._prevSelectedItem=item;this._prevFocusedItem=item;MochiKit.Signal.signal(this,"itemSelected",item);this._scrollToItem(item)},onFocusItem:function(item){if(this._prevFocusedItem&&this._prevFocusedItem!=item){this._prevFocusedItem.unhighlight()}this._prevFocusedItem=item;this._scrollToItem(item);this._itemsNode.setAttribute("aria-activedescendant",item.getID())},_scrollToItem:function(item){var scrTop=this._itemsNode.scrollTop;var ctrHeight=this.layer.offsetHeight;if(item.layer){var itemTop=item.layer.offsetTop;var itemHeight=item.layer.offsetHeight;if(itemTop<scrTop){this._itemsNode.scrollTop=itemTop}else{if(itemTop+itemHeight>scrTop+ctrHeight){this._itemsNode.scrollTop=itemTop+itemHeight-ctrHeight}}}},reset:function(){while(this._children.length>0){var child=this._children.pop();child.dispose()}while(this._curSigs.length>0){bobj.crv.SignalDisposer.dispose(this._curSigs.pop())}bobj.removeAllChildElements(this._itemsNode);this._prevSelectedItem=null;this._prevFocusedItem=null;this.vsbar.layer.style.display="none"},getHTML:function(){var h=bobj.html;return h.DIV({id:this.id,onkeydown:bobj.getExecuteDOMCallbackHTML(this.widx,"onKeyDown"),onblur:bobj.getExecuteDOMCallbackHTML(this.widx,"onBlur"),"class":"selectListControl"},h.LABEL({"class":"crvHidden",id:this.id+"_label"},this.ariaLabel),h.DIV({id:this.id+"_items",style:{overflow:"hidden",padding:"2px"},tabIndex:"0",role:"listbox","aria-labelledby":this.id+"_label"}),this.vsbar.getHTML())},onBlur:function(){if(this._prevFocusedItem){this._prevFocusedItem.unhighlight();this._prevFocusedItem=null}},init:function(){this.layer=getLayer(this.id);this._itemsNode=getLayer(this.id+"_items");this.vsbar.init();this.vsbar.setScrollableElement(this._itemsNode)},onKeyDown:function(e){if(eventGetKey(e)==38){if(this._prevFocusedItem!=null){var layer=this._prevFocusedItem.layer.previousSibling;if(layer!=null){layer.onfocus();return false}}else{if(this._prevSelectedItem!=null){var layer=this._prevSelectedItem.layer.previousSibling;if(layer!=null){layer.onfocus();return false}}}}else{if(eventGetKey(e)==40){if(this._prevFocusedItem!=null){var layer=this._prevFocusedItem.layer.nextSibling;if(layer!=null){layer.onfocus();return false}}else{if(this._prevSelectedItem!=null){var layer=this._prevSelectedItem.layer.nextSibling;if(layer!=null){layer.onfocus();return false}}else{if(this._children.length>0){var firstChild=this._children[0];if(firstChild&&firstChild.layer){firstChild.layer.onfocus();return false}}}}}else{if(eventGetKey(e)==KEY_PAGEUP||eventGetKey(e)==KEY_PAGEDOWN){if(this._children.length==0){return}var isPageDown=(eventGetKey(e)==KEY_PAGEDOWN);var ADJUSTMENT=5;var isOnLastPage=this._itemsNode.scrollTop+ADJUSTMENT>(this._itemsNode.scrollHeight-this._itemsNode.offsetHeight);var pageAdjuster=isOnLastPage?Math.ceil:Math.round;var currentPage=pageAdjuster(this._itemsNode.scrollTop/this._itemsNode.offsetHeight);var newPage=Math.max(0,currentPage+(isPageDown?1:-1));this.focusFirstNodeOnPage(newPage)}else{if(eventGetKey(e)==36){if(this._itemsNode.children.length>0){this._itemsNode.firstChild.onfocus();return false}}else{if(eventGetKey(e)==35){if(this._itemsNode.children.length>0){this._itemsNode.lastChild.onfocus();return false}}else{if(eventGetKey(e)==13||eventGetKey(e)==32){if(this._prevFocusedItem!=null){this._prevFocusedItem.select()}return false}}}}}}return true},focusFirstNodeOnPage:function(pageNum){var itemHeight=this._children[0].getHeight();var itemsPerPage=this._itemsNode.offsetHeight/itemHeight;var newNodeNum=Math.ceil(itemsPerPage*pageNum);if(newNodeNum<this._itemsNode.children.length){var node=this._itemsNode.children[newNodeNum];node.onfocus();this._itemsNode.scrollTop=node.offsetTop}},_doLayout:function(w,h){bobj.setOuterSize(this.layer,w,h);bobj.setOuterSize(this._itemsNode,Math.max(0,w-2),Math.max(0,h-2-(_ie?1:0)),true);if(bobj.isNumber(h)){this.vsbar.adjustForResize(Math.max(0,h-2));if(this.vsbar.isDisplayed()){bobj.setOuterSize(this._itemsNode,Math.max(0,w-this.vsbar.SCROLLBAR_SIZE-2),null)}}},resize:function(w,h){this._doLayout(w,h)}};bobj.crv.SelectListItem=function(title,desc,groupPath,isRTL,itemIndex){this.id=bobj.uniqueId();this.title=title;this.desc=desc;this.isRTL=isRTL&&true;this.groupPath=groupPath;this.widx=_widgets.length;_widgets[this.widx]=this;this.isSelected=false};bobj.crv.SelectListItem.prototype={getHTML:function(){var h=bobj.html;return h.DIV({id:this.id,widx:this.widx,"class":"selectListItem",role:"option"},h.DIV({"class":"selectListItemTitle",dir:this.isRTL?"rtl":"ltr",style:{"text-align":bobj.crv.config.isRTL?"right":"left"}},this.title),h.DIV({"class":"selectListItemDesc"},this.desc))},init:function(){this.layer=getLayer(this.id);this.layer.onmouseover=bobj.getExecuteDOMCallback(this.widx,"onMouseOver");this.layer.onclick=bobj.getExecuteDOMCallback(this.widx,"onClick");this.layer.onkeydown=bobj.getExecuteDOMCallback(this.widx,"onKeyDown");this.layer.onmouseout=bobj.getExecuteDOMCallback(this.widx,"onMouseOut");this.layer.onfocus=bobj.getExecuteDOMCallback(this.widx,"onFocus");this.layer.onblur=bobj.getExecuteDOMCallback(this.widx,"onBlur")},getID:function(){return this.id},getGroupPath:function(){return this.groupPath},dispose:function(){bobj.deleteWidget(this)},onFocus:function(widx){this.highlight();MochiKit.Signal.signal(this,"focused",this)},onBlur:function(widx){this.unhighlight()},onMouseOver:function(widx){this.highlight()},onMouseOut:function(widx){this.unhighlight()},highlight:function(){MochiKit.DOM.addElementClass(this.layer,"selectListItemHighlighted")},unhighlight:function(){MochiKit.DOM.removeElementClass(this.layer,"selectListItemHighlighted")},onKeyDown:function(ev){if(eventGetKey(ev)==13||eventGetKey(ev)==32){this.select()}},onClick:function(){this.select()},select:function(){MochiKit.DOM.addElementClass(this.layer,"selectListItemSelected");MochiKit.Signal.signal(this,"selected",this);this.focus();this.isSelected=true},focus:function(){if(this.layer){this.layer.focus()}},deselect:function(){this.isSelected=false;MochiKit.DOM.removeElementClass(this.layer,"selectListItemSelected")},getHeight:Widget_getHeight};bobj.crv.SearchPanelState={Searching:"Searching",SearchCancelled:"SearchCancelled",Idle:"Idle",FoundFirstN:"FoundFirstN"};bobj.crv.newSearchPanel=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId()+"_searchPanel",searchText:""},kwArgs);return new bobj.crv.SearchPanel(kwArgs.id,kwArgs.searchText)};bobj.crv.SearchPanel=function(id,searchText){this.id=id;this.searchText=searchText;this.status=bobj.crv.SearchPanelState.Idle;this.itemCount=0;this.widgetType="Search";this.isMatchCase=false;this.isMatchWholeWordOnly=false;this.FIRST_N_SIZE=100;var bind=bobj.bindFunctionToObject;var startSearchCB=bind(this.startSearch,this);var cancelSearchCB=bind(this.cancelSearch,this);var showOptionsCB=bind(this._showOptionsMenu,this);var hideMenuCB=bind(this._onHideMenu,this);var toggleMatchCaseCB=bind(this._toggleMatchCase,this);var toggleMatchWholeWordOnlyCB=bind(this._toggleMatchWholeWordOnly,this);this._resultPanel=new bobj.crv.SelectList(null,L_bobj_crv_SearchResults);this._optionsMenu=newMenuWidget(this.id+"_menu",hideMenuCB);this._optionsMenu.setAccelEnabled(false);this._optionsMenu.insertCheck(1,"case",L_bobj_crv_MatchCase,toggleMatchCaseCB);this._optionsMenu.insertCheck(2,"wholeWord",L_bobj_crv_MatchWholeWordsOnly,toggleMatchWholeWordOnlyCB);this._searchButton=newIconWidget(this.id+"_button",bobj.crv.allInOne.uri,startSearchCB,null,L_bobj_crv_SearchText,16,14,0,bobj.crv.allInOne.toolbarSearchDy,bobj.crv.allInOne.toolbarSearchDy,3,true);this._searchButton.margin=0;this._cancelSearchButton=newIconWidget(this.id+"_cancelButton",bobj.crv.allInOne.uri,cancelSearchCB,null,L_bobj_crv_Cancel,16,14,0,bobj.crv.allInOne.cancelDy,bobj.crv.allInOne.cancelDy,0,true);this._cancelSearchButton.margin=0;this._optionsArrowButton=newIconWidget(this.id+"_optionsArrowButton",bobj.skinUri("menus.gif"),showOptionsCB,null,L_bobj_crv_SearchOptions,7,12,0,83,0,83,true,true);bobj.crv.setAllClasses(this._searchButton,"button");bobj.crv.setAllClasses(this._cancelSearchButton,"button");bobj.crv.setAllClasses(this._optionsArrowButton,"button");this._cancelSearchButton.setDisplay(false);this.totalNumOfGroupPaths=0;this.currentSearchText="";this.continueSearchGroupPath=null;this.widx=_widgets.length;this.findMoreItem=null;_widgets[this.widx]=this};bobj.crv.SearchPanel.prototype={getHTML:function(){var divH=bobj.isBorderBoxModel()?20:18;var h=bobj.html;return h.DIV({id:this.id,"class":"searchPanel"},h.TABLE({style:{width:"100%",height:"100%"}},h.TR({style:{height:"25px"}},h.TD(null,h.TABLE({style:{width:"100%"}},h.TR(null,h.TD(null,h.DIV({id:this.id+"_searchInputContainer","class":"searchPanelTextContainer",style:{height:divH+"px"}},h.TABLE({cellpadding:"0",cellspacing:"0",style:{width:"100%",height:"100%","table-layout":"fixed"}},h.TR(null,h.TD({style:{width:"100%","padding-left":"5px","padding-right":"2px"}},h.INPUT({onkeydown:bobj.getExecuteDOMCallbackHTML(this.widx,"onTextFieldKeyDown"),"class":"searchPanel searchPanelInput",id:this.id+"_searchTextinput",title:L_bobj_crv_Search})),h.TD({style:{width:"20px","vertical-align":"middle"}},this._searchButton.getHTML(),this._cancelSearchButton.getHTML()),h.TD({style:{width:"14px","vertical-align":"top"}},h.DIV({"class":"arrowContainer",style:{"float":"left"}},this._optionsArrowButton.getHTML())))))))))),h.TR(null,h.TD({style:{padding:"0px"}},h.DIV({id:this.id+"_info","class":"searchPanel info"},h.TABLE({style:{width:"100%",height:"24px"}},h.TR(null,h.TD({style:{width:"100%",height:"100%"}},h.DIV({id:this.id+"_numOfResultsFound",tabIndex:"0","class":"searchPanel info resultsFoundText",style:bobj.crv.config.isRTL?{right:"5px",left:"0px"}:{},"aria-live":"polite","aria-atomic":"true"})),h.TD({style:{width:"45px"}},h.DIV({id:this.id+"_loadingPercentText","class":"searchPanel loadingInfo",tabIndex:"0",title:L_bobj_crv_Completed,style:{display:"none","text-align":"right",padding:"0px","margin-right":bobj.crv.config.isRTL?"-5px":"0px"}})),h.TD({style:{width:"20px",height:"20px"}},h.DIV({id:this.id+"_loadingImage",style:{"margin-right":"4px",display:"none","vertical-align":"top"}},simpleImgOffset(bobj.skinUri("wait01.gif"),20,20,90,10,null,null,null,"float:right")))))))),h.TR(null,h.TD(null,this._resultPanel.getHTML()))))},setSelected:function(isSelected){if(isSelected){this.layer.setAttribute("role","search")}else{this.layer.removeAttribute("role")}},focusFirstChild:function(){this._searchTextInput.focus();return true},onTextFieldKeyDown:function(e){if(eventGetKey(e)==13){this.startSearch();return false}return true},init:function(){this.layer=getLayer(this.id);this._searchButton.init();this._cancelSearchButton.init();this._optionsArrowButton.init();this._resultPanel.init();this._infoLayer=getLayer(this.id+"_info");this._numOfResultsFoundLayer=getLayer(this.id+"_numOfResultsFound");this._loadingPercentText=getLayer(this.id+"_loadingPercentText");this._loadingImage=getLayer(this.id+"_loadingImage");this._searchTextInput=getLayer(this.id+"_searchTextinput");this._searchInputContainer=getLayer(this.id+"_searchInputContainer");MochiKit.Signal.connect(this._resultPanel,"itemSelected",this,"_OnSelectSearchItem")},_OnSelectSearchItem:function(item){if(item==this.findMoreItem){this.continueSearch()}else{MochiKit.Signal.signal(this,"selectSearchItem",item.groupPath)}},_toggleMatchCase:function(){this.isMatchCase=!this.isMatchCase},_toggleMatchWholeWordOnly:function(){this.isMatchWholeWordOnly=!this.isMatchWholeWordOnly},update:function(update){if(update&&update.cons=="bobj.crv.newSearchPanel"&&update.args!=null){if(update.args.state){var state=update.args.state;if(state.clearResults){this.reset()}else{if(state.searchText==this.currentSearchText){if(state.isFinished){this.updateSearchStatus(bobj.crv.SearchPanelState.Idle);var foundItems=update.args.foundItems;this.batchAddSearchItems(foundItems)}else{if(this.status==bobj.crv.SearchPanelState.Searching){if(state.totalNumOfGroupPaths){this.totalNumOfGroupPaths=state.totalNumOfGroupPaths}if(state.numberOfProcessedGroupPath==undefined){this.updateLoadingPercent(state.remainingGroupPaths.length)}else{this.updateLoadingPercent(state.remainingGroupPaths.length+this.totalNumOfGroupPaths-state.numberOfProcessedGroupPath)}var foundItems=update.args.foundItems;var isFetchNextBatch=true;if(foundItems!=null&&foundItems.length>0){for(var i=0,len=foundItems.length;i<len;i++){var item=foundItems[i];if(state.isFindFirstN&&this.itemCount==this.FIRST_N_SIZE){if(this.continueSearchGroupPath==null){this.continueSearchGroupPath={remainingItems:[],state:state}}this.continueSearchGroupPath.remainingItems.push(item);isFetchNextBatch=false}else{this.addSearchItem(item.title,item.desc,item.drillGroupPath,item.isRTL)}}this.updateItemsCount()}if(isFetchNextBatch){MochiKit.Signal.signal(this,"searchAll",state.searchText,false,state.isMatchCase,state.isMatchWholeWordOnly,state.isFindFirstN,state.lastPageNumber,state.remainingGroupPaths,state.numberOfProcessedGroupPath)}else{this.updateSearchStatus(bobj.crv.SearchPanelState.FoundFirstN)}}}}}}}},updateLoadingPercent:function(numOfRemainingGroupPaths){if(this.totalNumOfGroupPaths==0){this._loadingPercentText.style.display="none"}else{var percent=parseInt(((this.totalNumOfGroupPaths-numOfRemainingGroupPaths)/this.totalNumOfGroupPaths)*100);this._loadingPercentText.innerHTML="["+percent+"%]";this._loadingPercentText.style.display="inline"}},resetLoadingPercent:function(){this._loadingPercentText.innerHTML="";this._loadingPercentText.style.display="none"},addSearchItem:function(title,desc,groupPath,isRTL){this._resultPanel.addChild(title,desc,groupPath,isRTL);this.incrementItemCount()},resetItemCount:function(){this.itemCount=0;this.updateItemsCount()},updateItemsCount:function(){var itemsFound=this.itemCount;if(this.status==bobj.crv.SearchPanelState.FoundFirstN){itemsFound=itemsFound+"+"}this._numOfResultsFoundLayer.innerHTML=L_bobj_crv_ResultsFound.replace("{0}",bobj.html.B(null,itemsFound))},incrementItemCount:function(){this.itemCount++},getBestFitHeight:function(){return bobj.getHiddenElementDimensions(this.layer).h},resize:function(w,h){bobj.setOuterSize(this.layer,w,h);if(bobj.isNumber(h)){this._resultPanel.resize(w-6,h-63)}},setDisplayResultsFound:function(isDisplay){this._numOfResultsFoundLayer.style.display=isDisplay?"block":"none"},setDisplayLoadingInfo:function(isDisplay){this._loadingPercentText.style.display=isDisplay?"block":"none";this._loadingImage.style.display=isDisplay?"block":"none"},setDisplayFindMoreItem:function(isDisplay){if(isDisplay){if(!this.findMoreItem){var h=bobj.html;this.findMoreItem=this._resultPanel.addChild(h.B(null,h.A(null,L_bobj_crv_FindMore))," ","FindMore")}}else{if(this.findMoreItem){this._resultPanel.removeChild(this.findMoreItem)}this.findMoreItem=null}},setDisableTextInput:function(isDisable){this._searchTextInput.disabled=isDisable;this._optionsArrowButton.setDisabled(isDisable);this._searchInputContainer.className=isDisable?"searchPanelTextContainer searchPanelTextContainerDisabled":"searchPanelTextContainer";if(_firefox&&!isDisable&&document.activeElement==this._searchTextInput){this._searchTextInput.blur();this._searchTextInput.focus()}},startSearch:function(){if(this._searchTextInput.value.length>0){this.reset();this.currentSearchText=this._searchTextInput.value;this.updateSearchStatus(bobj.crv.SearchPanelState.Searching);MochiKit.Signal.signal(this,"searchAll",this.currentSearchText,true,this.isMatchCase,this.isMatchWholeWordOnly,true,null,null,null)}},reset:function(){this.continueSearchGroupPath=null;this._resultPanel.reset();this.resetItemCount();this.resetLoadingPercent();this.totalNumOfGroupPaths=0;this.updateSearchStatus(bobj.crv.SearchPanelState.Idle);this.setDisplayResultsFound(false)},batchAddSearchItems:function(items){if(items!=null&&items.length>0){MochiKit.Iter.forEach(items,function(item){this.addSearchItem(item.title,item.desc,item.drillGroupPath,item.isRTL)},this);this.updateItemsCount()}},continueSearch:function(){if(this.continueSearchGroupPath!=null){this.updateSearchStatus(bobj.crv.SearchPanelState.Searching);var remainingItems=this.continueSearchGroupPath.remainingItems;this.batchAddSearchItems(remainingItems);var state=this.continueSearchGroupPath.state;MochiKit.Signal.signal(this,"searchAll",state.searchText,false,state.isMatchCase,state.isMatchWholeWordOnly,false,state.lastPageNumber,state.remainingGroupPaths,state.numberOfProcessedGroupPath)}this.continueSearchGroupPath=null},cancelSearch:function(){this.updateSearchStatus(bobj.crv.SearchPanelState.SearchCancelled)},updateSearchStatus:function(status){this.status=status;switch(this.status){case bobj.crv.SearchPanelState.SearchCancelled:this.setDisplayLoadingInfo(false);this.setDisplayResultsFound(true);this.setDisplayFindMoreItem(false);this._searchButton.setDisplay(true);this._cancelSearchButton.setDisplay(false);this.setDisableTextInput(false);this._searchTextInput.select();break;case bobj.crv.SearchPanelState.Searching:this.setDisplayResultsFound(true);this.setDisplayLoadingInfo(true);this.setDisplayFindMoreItem(false);this._searchButton.setDisplay(false);this._cancelSearchButton.setDisplay(true);this.setDisableTextInput(true);break;case bobj.crv.SearchPanelState.Idle:this.setDisplayResultsFound(true);this.setDisplayLoadingInfo(false);this.setDisplayFindMoreItem(false);this._searchButton.setDisplay(true);this._cancelSearchButton.setDisplay(false);this.setDisableTextInput(false);break;case bobj.crv.SearchPanelState.FoundFirstN:this.setDisplayResultsFound(true);this.setDisplayLoadingInfo(false);this._cancelSearchButton.setDisplay(false);this._searchButton.setDisplay(true);this.setDisplayFindMoreItem(true);this.setDisableTextInput(false);this.updateItemsCount()}},_onHideMenu:function(){this._optionsArrowButton.focus()},_showOptionsMenu:function(){var layer=this._optionsArrowButton.layer;var position=getPosScrolled(layer);var dimension=MochiKit.Style.getElementDimensions(layer);if(this._optionsMenu.layer==null){this._optionsMenu.justInTimeInit()}var menuDimension=MochiKit.Style.getElementDimensions(this._optionsMenu.layer);var xPos=position.x-menuDimension.w+dimension.w;var yPos=position.y+dimension.h+3;if(MochiKit.Base.isIE()){if(bobj.isQuirksMode()){yPos+=2}}xPos=Math.max(xPos,0);yPos=Math.max(yPos,0);if(_rtl){xPos+=2*menuDimension.w-layer.offsetWidth}this._optionsMenu.show(true,xPos,yPos)},getWidth:Widget_getWidth,setDisplay:Widget_setDisplay};bobj.crv.VerticalScrollBar=function(){this.id=bobj.uniqueId();this.widx=_widgets.length;_widgets[this.widx]=this;this._track=new bobj.crv.ScrollTrack(true);this._toolTip=new bobj.crv.ScrollBarToolTip();this._moveScrollUpCB=null;this._moveScrollDownCB=null;this._thumbMoveCB=null;this._scrollBtnCBIntervalID=null;this._tooltipGeneratorFn=null;this._scrollableElement=null;this._scrollbarHeight=0;this._topOffset=0;this.SCROLLBAR_SIZE=16;this.SCROLL_DELTA=8};bobj.crv.VerticalScrollBar.prototype={init:function(){var bind=bobj.bindFunctionToObject;this._track.init();this._track.setThumbMoveListener(bind(this._onThumbMoveListener,this));this._toolTip.init();this.layer=getLayer(this.id);this._mouseWheelCB=bind(this._onScrollListener,this)},setCallBacks:function(upCB,downCB,thumbMoveCB){this._moveScrollDownCB=downCB;this._moveScrollUpCB=upCB;this._thumbMoveCB=thumbMoveCB},getHTML:function(){var h=bobj.html;return h.DIV({id:this.id,"class":"crvScrollBar crvVertical "+(bobj.crv.config.isRTL?"crvRTL":"crvLTR"),oncontextmenu:"return false"},h.TABLE({cellpadding:0,cellspacing:0},h.TR({"class":"crvScrollButton crvup"},h.TD({onmousedown:bobj.getExecuteDOMCallbackHTML(this.widx,"onMouseDown_ScrollUpBtn"),onmouseup:bobj.getExecuteDOMCallbackHTML(this.widx,"cancelCallBack"),onmouseout:bobj.getExecuteDOMCallbackHTML(this.widx,"cancelCallBack")},h.A({"class":bobj.crv.allInOne.css,href:"javascript:void(0);",tabIndex:"-1"}))),h.TR(null,h.TD(null,this._track.getHTML())),h.TR({"class":"crvScrollButton crvdown"},h.TD({onmousedown:bobj.getExecuteDOMCallbackHTML(this.widx,"onMouseDown_ScrollDownBtn"),onmouseup:bobj.getExecuteDOMCallbackHTML(this.widx,"cancelCallBack"),onmouseout:bobj.getExecuteDOMCallbackHTML(this.widx,"cancelCallBack")},h.A({"class":bobj.crv.allInOne.css,href:"javascript:void(0);",tabIndex:"-1"})))),this._toolTip.getHTML())},isDisplayed:function(){if(this.layer.style.display=="none"){return false}else{return true}},resize:function(height){this._track.resize(Math.max(0,height-34))},onMouseDown_ScrollUpBtn:function(ev){if(this._scrollableElement){this.scrollUp();var scrollCB=function(scroll,fn){return function(){scroll.setIntervalID(window.setInterval(fn,50))}};this._scrollBtnCBIntervalID=window.setTimeout(scrollCB(this,bobj.bindFunctionToObject(this.scrollUp,this)),200)}else{if(this._moveScrollUpCB){this._moveScrollUpCB();this._scrollBtnCBIntervalID=window.setInterval(this._moveScrollUpCB,100)}}eventCancelBubble(ev);if(ev.preventDefault){ev.preventDefault()}return false},onMouseDown_ScrollDownBtn:function(ev){if(this._scrollableElement){this.scrollDown();var scrollCB=function(scroll,fn){return function(){scroll.setIntervalID(window.setInterval(fn,50))}};this._scrollBtnCBIntervalID=window.setTimeout(scrollCB(this,bobj.bindFunctionToObject(this.scrollDown,this)),200)}else{if(this._moveScrollDownCB){this._moveScrollDownCB();this._scrollBtnCBIntervalID=window.setInterval(this._moveScrollDownCB,100)}}eventCancelBubble(ev);if(ev.preventDefault){ev.preventDefault()}return false},scrollUp:function(){if(this._scrollableElement){this._moveByDelta(-this.SCROLL_DELTA,true)}},scrollDown:function(){if(this._scrollableElement){this._moveByDelta(this.SCROLL_DELTA,true)}},pageUp:function(){if(this._scrollableElement){var delta=Math.max(0,this._scrollbarHeight-16);this._moveByDelta(-delta,true)}},pageDown:function(){if(this._scrollableElement){var delta=Math.max(0,this._scrollbarHeight-16);this._moveByDelta(delta,true)}},cancelCallBack:function(){if(this._scrollBtnCBIntervalID){clearInterval(this._scrollBtnCBIntervalID)}this._scrollBtnCBIntervalID=null},setTooltipGenerator:function(fn){this._tooltipGeneratorFn=fn},adjustForResize:function(height){if(height<=0){return}var scrHeight=this._scrollableElement.scrollHeight;scrHeight=this._scrollableElement.scrollHeight;var displayVsbar=scrHeight>height;this.layer.style.display=displayVsbar?"block":"none";this.layer.style.height=height+"px";if(displayVsbar){if(_ie&&this.offsetLeft<0){this.layer.style.visibility="hidden";this.layer.style.visibility="visible"}}this.resize(height);if(this._scrollableElement){this._scrollbarHeight=height;if(scrHeight>0){var lInPercent=(this._scrollbarHeight/scrHeight)*100;this.setThumbLength(lInPercent);this._moveByDelta(0)}}},_onThumbMoveListener:function(newY,moveByCode){if(this._thumbMoveCB){this._thumbMoveCB(newY)}if(this._tooltipGeneratorFn){this._toolTip.setToolTip(this._tooltipGeneratorFn(newY));var thumbClientPos=this.getThumbPosition();thumbClientPos+=this.getThumbLength()/2;this._toolTip.setPosition(thumbClientPos)}if(this._scrollableElement&&!isNaN(newY)){var elmtH=this._scrollableElement.scrollHeight;if(elmtH>=this._scrollbarHeight){var newTop=Math.floor((newY*(elmtH-this._scrollbarHeight))/100);var delta=newTop-this._topOffset;this._moveByDelta(delta,true)}}},_moveByDelta:function(delta,moveByThumb){var isMoved=false;var orginalOffsetTop=this._scrollableElement.scrollTop;if(this._scrollableElement){var elmtH=this._scrollableElement.scrollHeight;var diff=this._scrollbarHeight-elmtH;this._topOffset+=delta;this._topOffset=Math.max(this._topOffset,0);this._topOffset=Math.min(this._topOffset,elmtH-this._scrollbarHeight);if(!moveByThumb&&diff!=0){var pInPercent=-this._topOffset/diff*100;this.setThumbPosition(pInPercent)}else{if(this._scrollableElement.scrollTop!=this._topOffset){this._scrollableElement.scrollTop=this._topOffset}}isMoved=orginalOffsetTop!=this._scrollableElement.scrollTop}return isMoved},_onScrollListener:function(e){var delta=0;if(!e){e=window.event}if(e.wheelDelta){delta=e.wheelDelta/40;if(window.opera){delta-=delta}}else{if(e.detail){delta=-e.detail}}if(delta){this._onScroll(delta,e)}},_onScroll:function(value,event){if(value==0){return}var moveBy=value*this.SCROLL_DELTA;var isMoved=this._moveByDelta(-moveBy,true);if(isMoved){(new MochiKit.Signal.Event(this,event)).stop()}},_onElementScroll:function(){var delta=this._scrollableElement.scrollTop-this._topOffset;this._moveByDelta(delta)},getThumbLength:function(){return this._track.getThumb().getLength()},getThumbPosition:function(){return this._track.getThumb().getPosition()},setThumbLength:function(lInPercent){this._track.getThumb().setLength(lInPercent)},setThumbPosition:function(pInPercent){this._track.getThumb().setPosition(pInPercent)},setIntervalID:function(id){this._scrollBtnCBIntervalID=id},setScrollableElement:function(element){this._scrollableElement=element;if(this._scrollableElement){var bind=bobj.bindFunctionToObject;bobj.connectMouseWheelListener(this.layer,this._mouseWheelCB);bobj.connectMouseWheelListener(this._scrollableElement,this._mouseWheelCB);MochiKit.Signal.connect(this._scrollableElement,"onscroll",bind(this._onElementScroll,this));this._track.setMoveDownCB(bind(this.pageDown,this));this._track.setMoveUpCB(bind(this.pageUp,this))}}};bobj.crv.HorizontalScrollBar=function(){this.id=bobj.uniqueId();this.widx=_widgets.length;_widgets[this.widx]=this;this._track=new bobj.crv.ScrollTrack(false);this._scrollBtnCBIntervalID=null;this._scrollableElement=null;this._scrollbarWidth=0;this._leftOffset=0};bobj.crv.HorizontalScrollBar.prototype={getHTML:function(){var h=bobj.html;return h.DIV({id:this.id,"class":"crvScrollBar crvHorizontal",oncontextmenu:"return false"},h.TABLE({cellpadding:0,cellspacing:0,dir:"ltr",style:{"table-layout":"fixed"}},h.TR(null,h.TD({"class":"crvScrollButton crvLeft",onmousedown:bobj.getExecuteDOMCallbackHTML(this.widx,"onMouseDown_ScrollLeftBtn"),onmouseup:bobj.getExecuteDOMCallbackHTML(this.widx,"cancelCallBack"),onmouseout:bobj.getExecuteDOMCallbackHTML(this.widx,"cancelCallBack")},h.A({"class":bobj.crv.allInOne.css,href:"javascript:void(0);",tabIndex:"-1"})),h.TD({style:{width:"100%","vertical-align":"top"}},this._track.getHTML()),h.TD({"class":"crvScrollButton crvRight",onmousedown:bobj.getExecuteDOMCallbackHTML(this.widx,"onMouseDown_ScrollRightBtn"),onmouseup:bobj.getExecuteDOMCallbackHTML(this.widx,"cancelCallBack"),onmouseout:bobj.getExecuteDOMCallbackHTML(this.widx,"cancelCallBack")},h.A({"class":bobj.crv.allInOne.css,href:"javascript:void(0);",tabIndex:"-1"})))))},init:function(){this.layer=getLayer(this.id);this._track.init();this._track.setThumbMoveListener(bobj.bindFunctionToObject(this._onThumbMoveListener,this))},onMouseDown_ScrollRightBtn:function(ev){this.scrollRight();var scrollCB=function(scroll,fn){return function(){scroll.setIntervalID(window.setInterval(fn,50))}};this._scrollBtnCBIntervalID=window.setTimeout(scrollCB(this,bobj.bindFunctionToObject(this.scrollRight,this)),200);eventCancelBubble(ev);if(ev.preventDefault){ev.preventDefault()}return false},onMouseDown_ScrollLeftBtn:function(ev){this.scrollLeft();var scrollCB=function(scroll,fn){return function(){scroll.setIntervalID(window.setInterval(fn,50))}};this._scrollBtnCBIntervalID=window.setTimeout(scrollCB(this,bobj.bindFunctionToObject(this.scrollLeft,this)),200);eventCancelBubble(ev);if(ev.preventDefault){ev.preventDefault()}return false},scrollLeft:function(){if(this._scrollableElement){this._track.getThumb().moveXByDelta(-0.01)}},scrollRight:function(){if(this._scrollableElement){this._track.getThumb().moveXByDelta(0.01)}},setIntervalID:function(id){this._scrollBtnCBIntervalID=id},cancelCallBack:function(){if(this._scrollBtnCBIntervalID){clearInterval(this._scrollBtnCBIntervalID)}this._scrollBtnCBIntervalID=null},setScrollableElement:function(element){this._scrollableElement=element},adjustForResize:function(){if(this._scrollbarWidth==0&&bobj.crv.config.isRTL){this._track.getThumb().moveXByDelta(1)}this._scrollbarWidth=(this.layer)?this.layer.offsetWidth:0;if(this._scrollbarWidth==0){return}var elemOffsetWidth=this._scrollableElement.offsetWidth;var lInPercent=(this._scrollbarWidth/elemOffsetWidth)*100;this._track.getThumb().setLength(lInPercent);this._track.getThumb().moveX((this._leftOffset/elemOffsetWidth)*this._scrollbarWidth,true)},setThumbPosition:function(pInPercent){this._track.getThumb().setPosition(pInPercent)},_onThumbMoveListener:function(newX,moveByCode){if(this._scrollableElement){var elmtW=this._scrollableElement.offsetWidth;var sbarW=this._scrollbarWidth;if(elmtW>sbarW){var newLeft=Math.floor((newX*(elmtW-sbarW))/100);if(moveByCode&&this._leftOffset<newLeft){newLeft=this._leftOffset}this._scrollableElement.style.left=-newLeft+"px";this._leftOffset=newLeft}}}};bobj.crv.ScrollTrack=function(isVertical){this.id=bobj.uniqueId();this._isVertical=isVertical;this._thumb=new bobj.crv.ScrollThumb(isVertical);var bind=bobj.bindFunctionToObject;this._mouseDownCB=bind(this._onMouseDown,this);this._mouseUpCB=bind(this._onMouseUp,this);this._moveDownCB=null;this._moveUpCB=null;this._moveIntervalID=null};bobj.crv.ScrollTrack.prototype={getHTML:function(){var h=bobj.html;return h.DIV({id:this.id,"class":"crvScrollTrack",style:{height:!this._isVertical?"17px":"100%"}},this._thumb.getHTML())},getOffsetTop:function(){return this.layer.offsetTop},getLength:function(){if(this._isVertical){return this.layer.offsetHeight}else{return this.layer.offsetWidth}},init:function(){this.layer=getLayer(this.id);this._thumb.init();bobj.connectDOMEvent(this.layer,"onmousedown",this._mouseDownCB);bobj.connectDOMEvent(this.layer,"onmouseup",this._mouseUpCB)},resize:function(newSize){var style=this.layer.style;newSize+="px";if(this._isVertical){style.height=newSize}else{style.width=newSize}},setThumbMoveListener:function(listener){this._thumb.setMoveListener(listener)},setMoveDownCB:function(moveDownCB){this._moveDownCB=moveDownCB},setMoveUpCB:function(moveUpCB){this._moveUpCB=moveUpCB},getThumb:function(){return this._thumb},_onMouseDown:function(ev){if(ev.which==1||!!(ev.button&1)){this._clearMoveTimer();var clickOffset=null;if(this._isVertical){clickOffset=ev.layerY||ev.y}else{clickOffset=ev.layerX||ev.x}this._moveThumb(clickOffset,500)}else{return false}},_moveThumb:function(clickOffset,timeout){var thumbPos=this._thumb.getPosition();var thumbLen=this._thumb.getLength();if(clickOffset>thumbPos+thumbLen){if(this._isVertical){if(this._moveDownCB!=null){this._moveDownCB()}else{this._thumb.moveDown()}}else{this._thumb.moveRight()}}else{if(clickOffset<thumbPos){if(this._isVertical){if(this._moveUpCB!=null){this._moveUpCB()}else{this._thumb.moveUp()}}else{this._thumb.moveLeft()}}else{return}}this._moveTimerID=window.setTimeout(MochiKit.Base.bind(this._moveThumb,this,clickOffset,50),timeout)},_onMouseUp:function(ev){this._clearMoveTimer()},_clearMoveTimer:function(){if(this._moveTimerID!=null){clearTimeout(this._moveTimerID);this._moveTimerID=null}}};bobj.crv.ScrollThumb=function(isVertical){this._clickOffset=0;this._isVertical=isVertical;this.id=bobj.uniqueId()+"_thumb";this._onMoveListnerCB=null;var bind=bobj.bindFunctionToObject;this._mouseDownCB=bind(this._onMouseDown,this);this._mouseMoveCB=bind(this._onMouseMove,this);this._mouseUpCB=bind(this._onMouseUp,this);this._pageOverlay=null;this._length=null;this._position=null};bobj.crv.ScrollThumb.prototype={getHTML:function(){var h=bobj.html;if(this._isVertical){return h.A({"class":"crvScrollThumb crvThumbVertical",id:this.id,tabindex:-1,href:"javascript:void(0)"},h.TABLE({style:{"table-layout":"fixed"},cellspacing:0,cellpadding:0},h.TBODY(null,h.TR({"class":"crvThumbL1"},h.TD()),h.TR({"class":"crvThumbL2"},h.TD(null,h.DIV({"class":"crvThumbImage"}))),h.TR({"class":"crvThumbL3"},h.TD()))))}else{return h.A({"class":"crvScrollThumb crvThumbHorizontal",id:this.id,tabindex:-1,href:"javascript:void(0)"},h.TABLE({cellspacing:0,cellpadding:0},h.TR(null,h.TD({"class":"crvThumbL1"}),h.TD({"class":"crvThumbL2"},h.DIV({"class":"crvThumbImage"})),h.TD({"class":"crvThumbL3"}))))}},init:function(){this.layer=getLayer(this.id);this.css=this.layer.style;bobj.connectDOMEvent(this.layer,"onmousedown",this._mouseDownCB)},_getScrollTrackLength:function(){var par=this.layer.offsetParent;if(!par){return 0}if(this._isVertical){return par.offsetHeight}else{return par.offsetWidth}},_setThumbWidth:function(w){this.css.width=w+"%";this._length=null},_setThumbHeight:function(h){this.css.height=h+"%";var height=this.layer.offsetHeight;if(_ie&&document.documentMode==7){this.layer.firstChild.rows[1].style.height=Math.max(0,height-4)+"px"}this._length=null},_setThumbLeft:function(l){this.css.left=l+"%";this._position=null},_setThumbTop:function(t){this.css.top=t+"%";this._position=null},getLength:function(){if(!this._length){if(this._isVertical){this._length=Math.max(14,this.layer.offsetHeight)}else{this._length=Math.max(14,this.layer.offsetWidth)}}return this._length},setLength:function(newL){if(this._isVertical){this._setThumbHeight(newL)}else{this._setThumbWidth(newL)}},getPosition:function(){if(!this._position){if(this._isVertical){this._position=this.layer.offsetTop}else{this._position=this.layer.offsetLeft}}return this._position},setPosition:function(newP){var trackSpace=this._getScrollTrackLength()-this.getLength();var pos=newP*trackSpace/100;if(this._isVertical){this.moveY(pos,false)}else{this.moveX(pos,false)}},moveY:function(newTop,moveByCode){if(this._isVertical){var oldTop=this.getPosition();var scrollTrackH=this._getScrollTrackLength();if(newTop<0){newTop=0}else{if(newTop+this.getLength()>scrollTrackH){newTop=Math.max(0,scrollTrackH-this.getLength())}}if(scrollTrackH!=0){var newTopPercent=(newTop/scrollTrackH)*100;this._setThumbTop(newTopPercent)}if(oldTop!=Math.round(newTop)){var thumbPos=(newTop*100)/(scrollTrackH-this.getLength());if(this._onMoveListnerCB){this._onMoveListnerCB(thumbPos,moveByCode)}}}},moveX:function(newLeft,moveByCode){if(!this._isVertical){var scrollTrackW=this._getScrollTrackLength();if(scrollTrackW==0){return}if(newLeft<0){newLeft=0}else{if(newLeft+this.getLength()>scrollTrackW){newLeft=scrollTrackW-this.getLength()}}if(newLeft==this.getPosition()&&!moveByCode){return}var newLeftPercent=(newLeft/scrollTrackW)*100;this._setThumbLeft(newLeftPercent);var thumbOffset=(newLeft*100)/(scrollTrackW-this.getLength());if(this._onMoveListnerCB){this._onMoveListnerCB(thumbOffset,moveByCode)}}},moveXByDelta:function(delta){if(!this._isVertical){var scrollTrackW=this._getScrollTrackLength();var scrollableW=scrollTrackW-this.getLength();var newLeft=this.getPosition()+(delta*scrollableW);if(newLeft<0){newLeft=0}else{if(newLeft+this.getLength()>scrollTrackW){newLeft=scrollTrackW-this.getLength()}}var newLeftPercent=(newLeft/scrollTrackW)*100;this._setThumbLeft(newLeftPercent);var thumbOffset=(newLeft*100)/(scrollTrackW-this.getLength());if(this._onMoveListnerCB){this._onMoveListnerCB(thumbOffset,false)}}},moveLeft:function(){if(!this._isVertical){var newLeft=this.getPosition()-this.getLength();this.moveX(newLeft,false)}},moveRight:function(){if(!this._isVertical){var newLeft=this.getPosition()+this.getLength();this.moveX(newLeft,false)}},moveDown:function(){if(this._isVertical){var newTop=this.getPosition()+this.getLength();this.moveY(newTop)}},moveUp:function(){if(this._isVertical){var newTop=this.getPosition()-this.getLength();this.moveY(newTop)}},setMoveListener:function(listener){this._onMoveListnerCB=listener},_onMouseMove:function(ev){if(this._isVertical){var newTop=ev.clientY-this._clickOffset;this.moveY(newTop)}else{var newLeft=ev.clientX-this._clickOffset;this.moveX(newLeft,false)}return false},setDisplayPageOverLay:function(isDisplay){if(!this._pageOverlay&&isDisplay){this._pageOverlay=MochiKit.DOM.DIV({"class":"crvScrollThumbMoveOverlay",type:"modal"});document.body.appendChild(this._pageOverlay)}if(this._pageOverlay){this._pageOverlay.style.display=isDisplay?"block":"none"}},_onMouseDown:function(ev){if(ev.which==1||!!(ev.button&1)){var clientPos=(this._isVertical)?ev.clientY:ev.clientX;this._clickOffset=clientPos-this.getPosition();this.setDisplayPageOverLay(true);bobj.connectDOMEvent(document,"onmousemove",this._mouseMoveCB);bobj.connectDOMEvent(document,"onmouseup",this._mouseUpCB);MochiKit.DOM.addElementClass(this.layer,"thumbselected");eventCancelBubble(ev);if(ev.preventDefault){ev.preventDefault()}}else{return false}},_onMouseUp:function(ev){this.setDisplayPageOverLay(false);bobj.disconnectDOMEvent(document,"onmousemove",this._mouseMoveCB);bobj.disconnectDOMEvent(document,"onmouseup",this._mouseUpCB);MochiKit.DOM.removeElementClass(this.layer,"thumbselected");return true}};bobj.crv.ScrollBarToolTip=function(){this.id=bobj.uniqueId();this._timeoutID=null};bobj.crv.ScrollBarToolTip.prototype={init:function(){this.layer=getLayer(this.id);this.css=this.layer.style;this._animationObj=null},getHTML:function(){var h=bobj.html;return h.DIV({"class":"crvScrollThumbToolTip",id:this.id})},setPosition:function(thumbClientPos){var newX=(bobj.crv.config.isRTL?(+(this.getWidth()-20)):(-(this.getWidth()+2)));this.css.top=(thumbClientPos+this.getHeight()/2)+"px";this.css.left=newX+"px"},getHeight:function(){return this.layer.offsetHeight},getWidth:function(){return this.layer.offsetWidth},setToolTip:function(tooltip){this.setDisplay(true);this.layer.innerHTML=tooltip;if(this._timeoutID){clearTimeout(this._timeoutID)}this._timeoutID=setTimeout(MochiKit.Base.bind(this.setDisplay,this,false),_ie?1200:800)},setDisplay:function(isDisplay){if(isDisplay){if(this._animationObj){this._animationObj.cancel();this._animationObj=null}this.css.display="inline";MochiKit.Style.setOpacity(this.layer,1)}else{if(!_ie){this._animationObj=new MochiKit.Visual.fade(this.layer,{duration:0.4})}else{this.css.display="none"}}}};if(typeof bobj.crv.params=="undefined"){bobj.crv.params={}}bobj.crv.params.DataTypes={DATE:"d",DATE_TIME:"dt",TIME:"t",STRING:"s",NUMBER:"n",CURRENCY:"c",BOOLEAN:"b",MEMBER:"m"};bobj.crv.params.RangeBoundTypes={UNBOUNDED:0,EXCLUSIVE:1,INCLUSIVE:2};bobj.crv.params.DefaultDisplayTypes={Description:0,DescriptionAndValue:1};bobj.crv.params.CompareResults={TOO_BIG:1,TOO_SMALL:-1,EQUAL:0};bobj.crv.params.Parameter=function(paramInfo){var PARAMS=bobj.crv.params;var displayTypes=PARAMS.DefaultDisplayTypes;MochiKit.Base.update(this,{paramName:null,reportName:null,description:null,valueDataType:null,value:null,modifiedValue:null,defaultValues:null,defaultDisplayType:displayTypes.DescriptionAndValue,maxValue:null,minValue:null,allowCustomValue:true,allowDiscreteValue:true,allowMultiValue:false,allowNullValue:false,allowRangeValue:false,editMask:null,isOptionalPrompt:false,isEditable:true,isHidden:false,isDataFetching:false,attributes:null,isInUse:false,isShowOnPanel:false},paramInfo)};bobj.crv.params.Parameter.prototype={getTitle:function(){return(this.description||this.paramName)},isInteractive:function(){return this.isInUse&&this.isShowOnPanel},getName:function(){return this.paramName},hasLOV:function(){return(this.defaultValues!=null&&this.defaultValues.length>0)},hasDescription:function(){return this.description!=null},isPassword:function(){return(this.editMask!==null&&this.editMask.toLowerCase()=="password")},getValue:function(){this._initModifiedValue();return this.modifiedValue},reset:function(){delete this.modifiedValue},removeValueAt:function(index){this._initModifiedValue();var value=this.modifiedValue[index];this.modifiedValue.splice(index,1)},setValue:function(i,newValue){this._initModifiedValue();if(arguments.length==1&&bobj.isArray(arguments[0])){var value=arguments[0];this.modifiedValue=value}else{if(arguments.length==2){var oldValue=this.modifiedValue[i];this.modifiedValue[i]=newValue}}},clearValue:function(){this._initModifiedValue();this.modifiedValue=[]},commitValue:function(){this._initModifiedValue();this.value=this.modifiedValue.slice(0)},_initModifiedValue:function(){if(!this.modifiedValue){if(bobj.isArray(this.value)){this.modifiedValue=this.value.slice(0)}else{this.modifiedValue=[]}}},isDCP:function(){if(this.attributes!=null){if(this.attributes.IsDCP===true){return true}}return false}};bobj.crv.params.Validator=function(){};bobj.crv.params.Validator.ValueStatus={OK:0,ERROR:1,VALUE_MISSING:2,VALUE_INVALID_TYPE:3,VALUE_TOO_LONG:4,VALUE_TOO_SHORT:5,VALUE_TOO_BIG:6,VALUE_TOO_SMALL:7,VALUE_DUPLICATE:8};bobj.crv.params.Validator.getInstance=function(){if(!bobj.crv.params.Validator.__instance){bobj.crv.params.Validator.__instance=new bobj.crv.params.Validator()}return bobj.crv.params.Validator.__instance};bobj.crv.params.Validator.prototype={validateParameter:function(param){var PARAMS=bobj.crv.params;if(!param){return null}var Status=PARAMS.Validator.ValueStatus;if(!bobj.isArray(param.value)||!param.value.length){return{isValid:false,reason:Status.VALUE_MISSING}}var isValid=true;var statusList=[];for(var i=0,len=param.values.length;i<len;++i){var status=PARAMS.validateValue(param,i);statusList.push(status);isValid=isValid&&(status===ValueStatus.OK)}return{isValid:isValid,statusList:statusList}},validateValue:function(param,value){var Status=bobj.crv.params.Validator.ValueStatus;if(!param||!bobj.isArray(param.value)||(value===undefined)){return Status.ERROR}var validatorFunc=this._getTypeValidatorFunc(param.valueDataType);if(!validatorFunc){return Status.ERROR}var actualValue=bobj.crv.params.getValue(value);return validatorFunc(param,actualValue)},_getTypeValidatorFunc:function(type){var Type=bobj.crv.params.DataTypes;switch(type){case Type.STRING:case Type.MEMBER:return this._validateString;case Type.NUMBER:case Type.CURRENCY:return this._validateNumber;case Type.DATE:case Type.TIME:case Type.DATE_TIME:return this._validateDateTime;case Type.BOOLEAN:return this._validateBoolean;default:return null}},_validateString:function(param,value){var Status=bobj.crv.params.Validator.ValueStatus;if(!bobj.isString(value)){return Status.VALUE_INVALID_TYPE}var maxValue=param.maxValue;var minValue=param.minValue;if(bobj.isNumber(maxValue)&&value.length>maxValue){return Status.VALUE_TOO_LONG}if(bobj.isNumber(minValue)&&value.length<minValue){return Status.VALUE_TOO_SHORT}return Status.OK},_validateNumber:function(param,value){var Status=bobj.crv.params.Validator.ValueStatus;if(bobj.isString(value)&&(!isNaN(value)&&value.replace(/^\s+|\s+$/,"")!=="")){value=parseFloat(value)}else{if(!bobj.isNumber(value)){return Status.VALUE_INVALID_TYPE}}var maxValue=param.maxValue;var minValue=param.minValue;if(maxValue!==null&&value>maxValue){return Status.VALUE_TOO_BIG}else{if(minValue!==null&&value<minValue){return Status.VALUE_TOO_SMALL}else{return Status.OK}}},_validateDateTime:function(param,value){var Result=bobj.crv.params.CompareResults;var Status=bobj.crv.params.Validator.ValueStatus;if(bobj.isObject(value)){var isNumber=function(sel){return bobj.isNumber(value[sel])};if(MochiKit.Iter.every(["d","m","y","h","min","s","ms"],isNumber)){var compareFunc=bobj.crv.params.getDateCompareFunc(param.valueDataType);if(param.minValue&&compareFunc(param.minValue,value)==Result.TOO_BIG){return Status.VALUE_TOO_SMALL}else{if(param.maxValue&&compareFunc(param.maxValue,value)==Result.TOO_SMALL){return Status.VALUE_TOO_BIG}else{return Status.OK}}}}return Status.VALUE_INVALID_TYPE},_validateBoolean:function(param,value){return bobj.crv.params.Validator.ValueStatus.OK}};bobj.crv.params.dateToJson=function(date){return{d:date.getDate(),m:date.getMonth(),y:date.getFullYear(),h:date.getHours(),min:date.getMinutes(),s:date.getSeconds(),ms:date.getMilliseconds()}};bobj.crv.params.getDateCompareFunc=function(type){var PARAMS=bobj.crv.params;var Type=PARAMS.DataTypes;switch(type){case Type.DATE:return PARAMS.compareDate;case Type.TIME:return PARAMS.compareTime;case Type.DATE_TIME:return PARAMS.compareDateTime;default:return null}};bobj.crv.params.compareDateTime=function(dateTimeA,dateTimeB){var PARAMS=bobj.crv.params;var Result=PARAMS.CompareResults;var dateResult=PARAMS.compareDate(dateTimeA,dateTimeB);var timeResult=PARAMS.compareTime(dateTimeA,dateTimeB);if(dateResult==Result.EQUAL&&timeResult==Result.EQUAL){return Result.EQUAL}if(dateResult!=Result.EQUAL){return dateResult}else{return timeResult}};bobj.crv.params.compareDate=function(dateTimeA,dateTimeB){var Result=bobj.crv.params.CompareResults;if(dateTimeA.d==dateTimeB.d&&dateTimeA.m==dateTimeB.m&&dateTimeA.y==dateTimeB.y){return Result.EQUAL}if(dateTimeA.y>dateTimeB.y){return Result.TOO_BIG}else{if(dateTimeA.y<dateTimeB.y){return Result.TOO_SMALL}}if(dateTimeA.m>dateTimeB.m){return Result.TOO_BIG}else{if(dateTimeA.m<dateTimeB.m){return Result.TOO_SMALL}}if(dateTimeA.d>dateTimeB.d){return Result.TOO_BIG}else{if(dateTimeA.d<dateTimeB.d){return Result.TOO_SMALL}}};bobj.crv.params.compareTime=function(dateTimeA,dateTimeB){var Result=bobj.crv.params.CompareResults;if(dateTimeA.h==dateTimeB.h&&dateTimeA.min==dateTimeB.min&&dateTimeA.s==dateTimeB.s&&dateTimeA.ms==dateTimeB.ms){return Result.EQUAL}if(dateTimeA.h>dateTimeB.h){return Result.TOO_BIG}else{if(dateTimeA.h<dateTimeB.h){return Result.TOO_SMALL}}if(dateTimeA.min>dateTimeB.min){return Result.TOO_BIG}else{if(dateTimeA.min<dateTimeB.min){return Result.TOO_SMALL}}if(dateTimeA.s>dateTimeB.s){return Result.TOO_BIG}else{if(dateTimeA.s<dateTimeB.s){return Result.TOO_SMALL}}if(dateTimeA.ms>dateTimeB.ms){return Result.TOO_BIG}else{if(dateTimeA.ms<dateTimeB.ms){return Result.TOO_SMALL}}};bobj.crv.params.jsonToDate=function(json){var date=new Date();if(json){date.setFullYear(json.y||0,json.m||0,json.d||1);date.setHours(json.h||0);date.setMinutes(json.min||0);date.setSeconds(json.s||0);date.setMilliseconds(json.ms||0)}return date};bobj.crv.params.getValue=function(pair){if(pair===undefined||pair===null||pair.value===undefined){return pair}return pair.value};bobj.crv.params.getDescription=function(pair){if(pair===undefined||pair===null||pair.desc===undefined){return null}return pair.desc};bobj.crv.params.newParameterDialog=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId(),prompt:null,showCB:null,hideCB:null},kwArgs);var o=newDialogBoxWidget(kwArgs.id,L_bobj_crv_ParamsDlgTitle,kwArgs.width,kwArgs.height);bobj.fillIn(o,kwArgs);o._showDialogBox=o.show;o._initDialogBox=o.init;o._resizeSignal=null;MochiKit.Base.update(o,bobj.crv.params.ParameterDialog);return o};bobj.crv.params.ParameterDialog={init:function(){this._initDialogBox();this._form=document.getElementById(this.id+"_form")},_checkInitialization:function(){if(!this.layer){targetApp(this.getHTML());this.init()}},show:function(show){if(show){this._checkInitialization();this.doLayout();this.setResize(MochiKit.Base.noop);this._showDialogBox(true);o._resizeSignal=MochiKit.Signal.connect(window,"onresize",this,"_onWindowResize")}else{if(this.layer){this._showDialogBox(false)}bobj.crv.SignalDisposer.dispose(o._resizeSignal,true)}if(show&&this.showCB){this.showCB()}else{if(!show&&this.hideCB){this.hideCB()}}},isVisible:function(){return(this.initialized()&&this.isDisplayed())},getPreferredHeight:function(){return Math.min(Math.max(100,winHeight()-100),this.getFormHeight())},getFormHeight:function(){var form=this._form.cloneNode(true);form.style.display="none";form.style.height="";document.body.appendChild(form);var dimension=MochiKit.Style.getElementDimensions(form);form.innerHTML="";document.body.removeChild(form);return dimension.h},_onWindowResize:function(){this.doLayout();this.center()},doLayout:function(){if(this._form){this._form.style.height=this.getPreferredHeight()+"px"}},updateHtmlAndDisplay:function(html){if(html){this._checkInitialization();if(this.isDisplayed()){this.show(false)}var ext=bobj.html.extractHtml(html);var styleText="";for(var i=0,len=ext.styles.length;i<len;i++){styleText+=ext.styles[i].text+"\n"}var styleLayerID=this.id+"_stylesheet";var styleLayer=getLayer(styleLayerID);if(styleLayer){MochiKit.DOM.removeElement(styleLayer)}if(styleText.length>0){bobj.addStyleSheet(styleText,styleLayerID)}if(this._form){this._form.innerHTML='<div style="overflow:auto">'+ext.html+"</div>"}var callback=function(parameterDialog,scripts){return function(){parameterDialog.show(true);for(var iScripts=0,scriptsLen=scripts.length;iScripts<scriptsLen;++iScripts){var script=scripts[iScripts];if(!script){continue}if(script.text){bobj.evalInWindow(script.text)}}}}(this,ext.scripts);bobj.includeCSSLinksAndExecuteCallback(ext.links,callback)}},getHTML:function(html){var FORM=bobj.html.FORM;var DIV=bobj.html.DIV;var onsubmit="eventCancelBubble(event);return false;";return this.beginHTML()+DIV({"class":"dlgFrame naviBarFrame",style:{padding:"20px 15px 5px 20px"}},FORM({id:this.id+"_form",style:{overflow:"auto"},onsubmit:onsubmit}))+this.endHTML()}};bobj.crv.params.newParameterPanelToolbar=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId()},kwArgs);var o=newPaletteContainerWidget(kwArgs.id);bobj.fillIn(o,kwArgs);o.widgetType="ParameterPanelToolbar";o._paletteContainerInit=o.init;MochiKit.Base.update(o,bobj.crv.params.ParameterPanelToolbar);o._palette=newPaletteWidget(o.id+"_palette");o.add(o._palette);var bind=MochiKit.Base.bind;o.applyButton=newIconWidget(o.id+"_applyBtn",bobj.crv.allInOne.uri,bind(o._onApplyClick,o),L_bobj_crv_ParamsApply,L_bobj_crv_ParamsApplyTip,16,16,3,3+bobj.crv.allInOne.paramRunDy,25,3+bobj.crv.allInOne.paramRunDy,false);o.applyButton.setClasses("","","","");o.resetButton=newIconWidget(o.id+"_resetBtn",bobj.crv.allInOne.uri,bind(o._onResetClick,o),L_bobj_crv_Reset,L_bobj_crv_ResetTip,16,16,0,bobj.crv.allInOne.undoDy,16,bobj.crv.allInOne.undoDy,false);o.resetButton.setClasses("","","","");o._palette.add(o.applyButton);o._palette.add();o._palette.add(o.resetButton);return o};bobj.crv.params.ParameterPanelToolbar={init:function(){this._paletteContainerInit();this._palette.init();this.applyButton.setDisabled(true);this.resetButton.setDisabled(true)},focusFirstChild:function(){this.applyButton.focus();return true},setTabDisabled:function(dis){var items=[this.applyButton,this.resetButton];for(var i=0,len=items.length;i<len;i++){var item=items[i];if(item){bobj.disableTabbingKey(item.layer,dis)}}},beginHTML:function(){return bobj.html.openTag("div",{id:this.id,"class":"parameterPanelToolbar"})},getHTML:function(){return(this.beginHTML()+this._palette.getHTML()+this.endHTML())},_onApplyClick:function(){if(this.applyClickCB){bobj.crv.logger.info("UIAction ParameterPanel.Apply");this.applyClickCB()}},_onResetClick:function(){if(this.resetClickCB){this.resetClickCB()}}};bobj.crv.params.newParameterPanel=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId()+"_IPPanel"},kwArgs);var o=newWidget(kwArgs.id);o.widgetType="ParameterPanel";bobj.fillIn(o,kwArgs);MochiKit.Base.update(o,bobj.crv.params.ParameterPanel);o._tabPanel=bobj.crv.newStackedPanel({id:o.id+"_ParamtersStack"});o._overlayLayer=new bobj.crv.params.ParameterPanel.OverlayLayer(o.id);o._toolbar=bobj.crv.params.newParameterPanelToolbar({id:o.id+"_IPToolbar"});return o};bobj.crv.params.ParameterPanel={setToolbarCallBacks:function(applyClickCB,resetClickCB){if(this._toolbar){this._toolbar.applyClickCB=applyClickCB;this._toolbar.resetClickCB=resetClickCB}},setDisabled:function(dis){this._overlayLayer.setVisible(dis);this.setTabDisabled(dis)},setTabDisabled:function(dis){this._toolbar.setTabDisabled(dis);this._tabPanel.setTabDisabled(dis)},init:function(){Widget_init.call(this);this._toolbar.init();if(this._tabPanel){this._tabPanel.init()}MochiKit.Signal.signal(this,"resetParamPanel")},update:function(update){if(update&&update.cons=="bobj.crv.params.newParameterPanel"){if(update.args&&update.args.isResetParamPanel){MochiKit.Signal.signal(this,"resetParamPanel")}}},getHTML:function(){var DIV=bobj.html.DIV;var layerStyle={overflow:"hidden",width:this.width?bobj.unitValue(this.width):"auto",height:this.height?bobj.unitValue(this.height):"auto"};var innerHTML=this._toolbar.getHTML();if(this._tabPanel){innerHTML+=this._tabPanel.getHTML()}return DIV({id:this.id,style:layerStyle},innerHTML)},getBestFitHeight:function(){var height=0;if(this._tabPanel){height+=bobj.getHiddenElementDimensions(this._tabPanel.layer).h}if(this._toolbar){height+=this._toolbar.getHeight()}return height},resize:function(w,h){Widget_resize.call(this,w,h);if(this._toolbar){w=this.layer.clientWidth;this._toolbar.resize(w);if(this._tabPanel){h=this.layer.clientHeight-this._toolbar.getHeight();this._tabPanel.resize(w,h)}}},addParameter:function(kwArgs){kwArgs=MochiKit.Base.update({paramUI:null,label:null,isDataFetching:false,openAdvCB:null,clearValuesCB:null,id:this._tabPanel.id+"_P"+(this._tabPanel.getNumTabs()+1)},kwArgs);if(kwArgs.paramUI){var paramTab=bobj.crv.newStackedTab(kwArgs);paramTab.setContent(kwArgs.paramUI);this._tabPanel.addTab(paramTab)}},focusFirstChild:function(){return this._toolbar.focusFirstChild()},removeParameter:function(index){this._tabPanel.removeTab(index)},getWidth:function(){if(this.layer){return this.layer.offsetWidth}return this.width},setSelected:function(isSelected){},setResetButtonEnabled:function(isEnabled){this._toolbar.resetButton.setDisabled(!isEnabled)},setApplyButtonEnabled:function(isEnabled){this._toolbar.applyButton.setDisabled(!isEnabled)},isApplyButtonEnabled:function(){return this._toolbar!=null&&this._toolbar.applyButton!=null&&!this._toolbar.applyButton.isDisabled()},getIndex:function(paramUI){var numTabs=this._tabPanel.getNumTabs();for(var idx=0;idx<numTabs;++idx){var tab=this._tabPanel.getTab(idx);if(tab.getContent()===paramUI){return idx}}return -1},getParameterTabByWidget:function(paramUI){var index=this.getIndex(paramUI);if(index>=0){return this._tabPanel.getTab(index)}return null},getParameter:function(index){var tab=this._tabPanel.getTab(index);if(tab){return tab.getContent()}return null},getParameterTab:function(index){return this._tabPanel.getTab(index)},getParameterCount:function(){return this._tabPanel.getNumTabs()}};bobj.crv.params.ParameterPanel.OverlayLayer=function(paramPanelID){this.paramPanelId=paramPanelID;this.layer=null;this.id=bobj.uniqueId();this.widx=_widgets.length;_widgets[this.widx]=this;return this};bobj.crv.params.ParameterPanel.OverlayLayer.prototype={setVisible:function(visible){if(!this.layer){this.init()}if(this.css){this.css.visibility=visible?"visible":"hidden"}},isVisible:function(){if(!this.layer){this.init()}return this.css.visibility=="visible"},getHTML:function(){return"<div id = "+this.id+' onselectstart="return false" ondragstart="return false" onmousedown="'+_dhtmlLib+'.eventCancelBubble(event)" border="0" hspace="0" vspace="0" src="'+_skin+'../transp.gif" class="paramPanelOverLay">'+(_ie?img(_skin+"../transp.gif","100%","100%",null,"ISMAP"):"")+"</div>"},init:function(){var paramPanelLayer=getLayer(this.paramPanelId);if(paramPanelLayer){append2(paramPanelLayer,this.getHTML())}Widget_init.call(this)}};function bobj_WebForm_Callback(viewerID,callbackEventArgument,formID){if(!viewerID||!formID){return}var frm=document.getElementById(formID);if(!frm){return}var strArr=[];for(var i=0,itemCount=frm.elements.length;i<itemCount;i++){var elem=frm.elements[i];if(elem.name&&elem.value){strArr.push(elem.name);strArr.push("=");strArr.push(encodeURIComponent(elem.value));strArr.push("&")}}strArr.push("__BOBJ_CALLBACK_EVENTTARGET=");strArr.push(encodeURIComponent(viewerID));strArr.push("&__BOBJ_CALLBACK_EVENTARGUMENT=");strArr.push(encodeURIComponent(callbackEventArgument));var qryString=strArr.join("");var req=MochiKit.Async.getXMLHttpRequest();req.open("POST",frm.action,true);req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");req.setRequestHeader("Accept","application/json");return MochiKit.Async.sendXMLHttpRequest(req,qryString)}if(typeof bobj=="undefined"){bobj={}}if(typeof bobj.crv=="undefined"){bobj.crv={}}if(typeof bobj.crv.Calendar=="undefined"){bobj.crv.Calendar={}}bobj.crv.Calendar.getInstance=function(){if(!bobj.crv.Calendar.__instance){bobj.crv.Calendar.__instance=bobj.crv.newCalendar()}return bobj.crv.Calendar.__instance};bobj.crv.Calendar.Signals={OK_CLICK:"okClick",CANCEL_CLICK:"cancelClick",ON_HIDE:"onHide"};bobj.crv.newCalendar=function(kwArgs){var UPDATE=MochiKit.Base.update;kwArgs=UPDATE({id:bobj.uniqueId()+"_calendar",showTime:false,date:new Date(),timeFormats:["HH:mm:ss","H:mm:ss","H:m:s","HH:mm","H:mm","H:m","h:mm:ss a","h:m:s a","h:mm:ssa","h:m:sa","h:mm a","h:m a","h:mma","h:ma"]},kwArgs);var o=newMenuWidget();o.widgetType="Calendar";bobj.fillIn(o,kwArgs);o._menuJustInTimeInit=o.justInTimeInit;UPDATE(o,bobj.crv.Calendar);o._curTimeFormat=o.timeFormats[0];o._cells=[];o._firstDay=0;o._numDays=0;return o};bobj.crv.Calendar._createHeaderButtons=function(){var w=8;var h=4;var dx=46;var dyUp=0;var dyDown=12;var bind=MochiKit.Base.bind;this._prevMonthBtn=newIconWidget(this.id+"_pm",_skin+"../lov.gif",bind(this._onPrevMonthClick,this),"",L_DHTMLLIB_calendarPrevMonthLab,w,h,dx,dyDown,true);this._prevYearBtn=newIconWidget(this.id+"_py",_skin+"../lov.gif",bind(this._onPrevYearClick,this),"",L_DHTMLLIB_calendarPrevYearLab,w,h,dx,dyDown,true);this._nextMonthBtn=newIconWidget(this.id+"_nm",_skin+"../lov.gif",bind(this._onNextMonthClick,this),"",L_DHTMLLIB_calendarNextMonthLab,w,h,dx,dyUp,true);this._nextYearBtn=newIconWidget(this.id+"_ny",_skin+"../lov.gif",bind(this._onNextYearClick,this),"",L_DHTMLLIB_calendarNextYearLab,w,h,dx,dyUp,true);this._prevMonthBtn.allowDblClick=true;this._prevYearBtn.allowDblClick=true;this._nextMonthBtn.allowDblClick=true;this._nextYearBtn.allowDblClick=true};bobj.crv.Calendar._createTimeTextField=function(){var bind=MochiKit.Base.bind;this._timeField=newTextFieldWidget(this.id+"_time",bind(this._onTimeChange,this),null,null,null,true,null,null,null,null)};bobj.crv.Calendar._createOKCancelButtons=function(){var bind=MochiKit.Base.bind;this._okBtn=newButtonWidget(this.id+"_ok",L_bobj_crv_OK,bind(this._onOKClick,this));this._cancelBtn=newButtonWidget(this.id+"_cancel",L_bobj_crv_Cancel,bind(this._onCancelClick,this))};bobj.crv.Calendar.justInTimeInit=function(){this._menuJustInTimeInit();this._prevMonthBtn.init();this._prevYearBtn.init();this._nextMonthBtn.init();this._nextYearBtn.init();this._okBtn.init();this._cancelBtn.init();this._timeField.init();this._timeField.layer.style.width="100%";this._timeField.setValue(bobj.external.date.formatDate(this.date,this._curTimeFormat));this._timeRow=getLayer(this.id+"_timeRow");this._timeSep=getLayer(this.id+"_timeSep");this._month=getLayer(this.id+"_month");this._year=getLayer(this.id+"_year");var numCells=6*7;for(var i=0;i<numCells;i++){this._cells[i]=getLayer(this.id+"_c"+i)}this._update()};bobj.crv.Calendar.getHTML=function(){var h=bobj.html;var TABLE=h.TABLE;var TBODY=h.TBODY;var TR=h.TR;var TD=h.TD;var DIV=h.DIV;var SPAN=h.SPAN;var A=h.A;this._createHeaderButtons();this._createTimeTextField();this._createOKCancelButtons();var onkeydown=_dhtmlLib+".MenuWidget_keyDown('"+this.id+"', event); return true";var onmousedown=_dhtmlLib+".eventCancelBubble(event)";var onmouseup=_dhtmlLib+".eventCancelBubble(event)";var onkeypress=_dhtmlLib+".eventCancelBubble(event)";var dayHeaderAtt={"class":"calendarTextPart"};var isRTL=(bobj.crv.config&&bobj.crv.config.isRTL)||(bobj.prompt&&bobj.prompt.isRTL);var tableDir=isRTL?"rtl":"ltr";var buttonsAlign=isRTL?"left":"right";var html=TABLE({dir:tableDir,id:this.id,border:"0",cellpadding:"0",cellspacing:"0",onkeydown:onkeydown,onmousedown:onmousedown,onmouseup:onmouseup,onkeypress:onkeypress,"class":"menuFrame",style:{cursor:"default",visibility:"hidden","z-index":10000}},TBODY(null,TR(null,TD(null,this._getMonthYearHTML())),TR(null,TD({align:"center"},TABLE({border:"0",cellspacing:"0",cellpadding:"0",style:{margin:"2px","margin-top":"6px"}},TR({align:"center"},TD(dayHeaderAtt,L_bobj_crv_SundayShort),TD(dayHeaderAtt,L_bobj_crv_MondayShort),TD(dayHeaderAtt,L_bobj_crv_TuesdayShort),TD(dayHeaderAtt,L_bobj_crv_WednesdayShort),TD(dayHeaderAtt,L_bobj_crv_ThursdayShort),TD(dayHeaderAtt,L_bobj_crv_FridayShort),TD(dayHeaderAtt,L_bobj_crv_SaturdayShort)),TR(null,TD({colspan:"7",style:{padding:"2px"}},this._getSeparatorHTML())),this._getDaysHTML(),TR(null,TD({colspan:"7",style:{padding:"2px"}},this._getSeparatorHTML())),TR({id:this.id+"_timeRow",style:{display:this.showTime?"":"none"}},TD({colspan:"7",style:{"padding-top":"3px","padding-bottom":"3px","padding-right":"10px","padding-left":"10px"}},this._timeField.getHTML())),TR({id:this.id+"_timeSep",style:{display:this.showTime?"":"none"}},TD({colspan:"7",style:{padding:"2px"}},this._getSeparatorHTML())),TR(null,TD({colspan:"7",align:buttonsAlign,style:{"padding-bottom":"3px","padding-top":"3px"}},TABLE(null,TBODY(null,TR(null,TD(null,this._okBtn.getHTML()),TD(null,this._cancelBtn.getHTML())))))))))));return this._getLinkHTML("startLink_"+this.id,true)+html+this._getLinkHTML("endLink_"+this.id,false)};bobj.crv.Calendar._getMonthYearHTML=function(){var h=bobj.html;var TABLE=h.TABLE;var TBODY=h.TBODY;var TR=h.TR;var TD=h.TD;var DIV=h.DIV;var SPAN=h.SPAN;return TABLE({"class":"dialogzone",width:"100%",cellpadding:"0",cellspacing:"0"},TBODY(null,TR(null,TD({style:{"padding-top":"1px"}},this._nextMonthBtn.getHTML()),TD({rowspan:"2",width:"100%",align:"center","class":"dialogzone"},SPAN({id:this.id+"_month",tabIndex:"0"},L_DHTMLLIB_month[this.date.getMonth()])," ",SPAN({id:this.id+"_year",tabIndex:"0"},this.date.getFullYear())),TD({style:{"pading-top":"1px"}},this._nextYearBtn.getHTML())),TR({valign:"top"},TD({style:{"padding-bottom":"1px"}},this._prevMonthBtn.getHTML()),TD({style:{"padding-bottom":"1px"}},this._prevYearBtn.getHTML()))))};bobj.crv.Calendar._getSeparatorHTML=function(){var sep=newSeparatorWidget(bobj.uniqueId(),null,0,0,0,0);return sep.getHTML()};bobj.crv.Calendar._getLinkHTML=function(id,isFocusLastChild){return bobj.html.A({id:id,href:"javascript:void(0)",onfocus:"MenuWidget_keepFocus('"+this.id+"',"+isFocusLastChild+")",style:{visibility:"hidden",position:"absolute",top:"-1000px",left:"-1000px"}})};bobj.crv.Calendar._getDaysHTML=function(){var TD=bobj.html.TD;var DIV=bobj.html.DIV;var html="";for(var i=0;i<6;++i){html+='<tr align="right">';for(var j=0;j<7;++j){var cellNum=j+(i*7);var eventArgs="(this,"+cellNum+",event);";html+=TD({id:this.id+"_c"+(i*7+j),"class":"calendarTextPart",onmousedown:"bobj.crv.Calendar._onDayMouseDown"+eventArgs,onmouseover:"bobj.crv.Calendar._onDayMouseOver"+eventArgs,onmouseout:"bobj.crv.Calendar._onDayMouseOut"+eventArgs,ondblclick:"bobj.crv.Calendar._onDayDoubleClick"+eventArgs,onkeydown:"bobj.crv.Calendar._onDayKeyDown"+eventArgs},DIV({"class":"menuCalendar"}))}html+="</tr>"}return html};bobj.crv.Calendar._update=function(){var numCells=6*7;var curDate=this.date.getDate();var info=this._getMonthInfo(this.date.getMonth(),this.date.getFullYear());var firstCellInMonth=info.firstDay;this._firstDay=info.firstDay;this._numDays=info.numDays;var year=""+this.date.getFullYear();while(year.length<4){year="0"+year}this._year.innerHTML=year;this._month.innerHTML=L_DHTMLLIB_month[this.date.getMonth()];this._selectedDate=null;for(var cellNum=0;cellNum<numCells;cellNum++){var cell=this._cells[cellNum].firstChild;var cssClass="menuCalendar";var cellDate=this._getDateFromCellNum(cellNum);if(cellDate<1||cellDate>info.numDays){cell.innerHTML="";cell.tabIndex="-1"}else{cell.innerHTML=""+cellDate;cell.tabIndex="0";if(cellDate==curDate){cssClass="menuCalendarSel";this._selectedDay=cell}}cell.className=cssClass}};bobj.crv.Calendar._getMonthInfo=function(month,year){var date=new Date();date.setDate(1);date.setFullYear(year);date.setMonth(month);var firstDay=date.getDay();date.setDate(28);var lastDate=28;for(var i=29;i<32;i++){date.setDate(i);if(date.getMonth()!=month){break}lastDate=i}return{firstDay:firstDay,numDays:lastDate}};bobj.crv.Calendar._setDayOfMonth=function(date){if(date>0&&date<=this._numDays){var prevDate=this.date.getDate();if(date!=prevDate){var prevCell=this._getCellFromDate(prevDate);if(prevCell){prevCell.firstChild.className="menuCalendar"}this._getCellFromDate(date).firstChild.className="menuCalendarSel";this.date.setDate(date)}}};bobj.crv.Calendar._getCellFromDate=function(date){var cellNum=date+this._firstDay-1;return this._cells[cellNum]};bobj.crv.Calendar._getDateFromCellNum=function(cellNum){return cellNum-this._firstDay+1};bobj.crv.Calendar._onDayMouseOver=function(node,cellNum,event){var o=getWidget(node);var div=node.firstChild;var date=cellNum-o._firstDay+1;if(date<1||date>o._numDays){div.className="menuCalendar"}else{div.className="menuCalendarSel"}};bobj.crv.Calendar._onDayMouseOut=function(node,cellNum,event){var o=getWidget(node);var div=node.firstChild;var date=cellNum-o._firstDay+1;if(date!=o.date.getDate()){div.className="menuCalendar"}};bobj.crv.Calendar._onDayMouseDown=function(node,cellNum,event){var o=getWidget(node);var date=cellNum-o._firstDay+1;o._setDayOfMonth(date)};bobj.crv.Calendar._onDayDoubleClick=function(node,cellNum,event){var o=getWidget(node);o._onOKClick()};bobj.crv.Calendar._onDayKeyDown=function(node,cellNum,event){event=new MochiKit.Signal.Event(node,event);var key=event.key().string;if(key==="KEY_ENTER"){var o=getWidget(node);var date=cellNum-o._firstDay+1;o._setDayOfMonth(date)}};bobj.crv.Calendar._onPrevMonthClick=function(){var d=this.date;var oldMonth=d.getMonth();if(d.getMonth()===0){d.setYear(d.getFullYear()-1);d.setMonth(11)}else{d.setMonth(d.getMonth()-1);if(oldMonth===d.getMonth()){d.setMonth(oldMonth-1)}}this._update()};bobj.crv.Calendar._onPrevYearClick=function(){this.date.setFullYear(this.date.getFullYear()-1);this._update()};bobj.crv.Calendar._onNextMonthClick=function(){var d=this.date;var oldMonth=d.getMonth();d.setMonth(d.getMonth()+1);if((oldMonth+1)<d.getMonth()){d.setMonth(oldMonth+1)}this._update()};bobj.crv.Calendar._onNextYearClick=function(){this.date.setFullYear(this.date.getFullYear()+1);this._update()};bobj.crv.Calendar._onOKClick=function(){this.restoreFocus();MochiKit.Signal.signal(this,this.Signals.OK_CLICK,this._copyDate(this.date));this.show(false)};bobj.crv.Calendar._copyDate=function(date){if(date){return new Date(date.getFullYear(),date.getMonth(),date.getDate(),date.getHours(),date.getMinutes(),date.getSeconds(),date.getMilliseconds())}return new Date()};bobj.crv.Calendar._onCancelClick=function(){this.restoreFocus();this.show(false);MochiKit.Signal.signal(this,this.Signals.CANCEL_CLICK)};bobj.crv.Calendar._onTimeChange=function(){var text=this._timeField.getValue();var date=null;var format=null;for(var i=0;i<this.timeFormats.length&&date===null;++i){format=this.timeFormats[i];date=bobj.external.date.getDateFromFormat(text,format)}if(date){this._curTimeFormat=format;this.date.setHours(date.getHours());this.date.setMinutes(date.getMinutes());this.date.setSeconds(date.getSeconds());this.date.setMilliseconds(date.getMilliseconds())}else{this._timeField.setValue(bobj.external.date.formatDate(this.date,this._curTimeFormat))}};bobj.crv.Calendar.setShowTime=function(isShow){var disp=isShow?"":"none";this.showTime=isShow;if(this.layer){this._timeRow.style.display=disp;this._timeSep.style.display=disp;this._timeRow.style.visibility=isShow?"visible":"hidden"}};bobj.crv.Calendar.setDate=function(date){this.date=date;if(this.layer){this._timeField.setValue(bobj.external.date.formatDate(this.date,this._curTimeFormat));this._update()}};bobj.crv.Calendar.show=function(isShow,x,y,isAlignRight,isAlignBottom){ScrollMenuWidget_show.call(this,isShow,x,y);if(isShow){this.focus()}else{MochiKit.Signal.signal(this,this.Signals.ON_HIDE)}};bobj.crv.Calendar.focus=function(isFocusLastChild){if(isFocusLastChild==undefined){if(this._selectedDay){this._selectedDay.focus()}}else{var focusableElements=[];with(this.layer){try{focusableElements=querySelectorAll("table[tabindex='0'], span[tabindex='0'], div[tabindex='0'], a")}catch(e){focusableElements.push(getLayer(this.id+"_nm"))}}if(isFocusLastChild){if(focusableElements.length>0){focusableElements[focusableElements.length-1].focus()}}else{if(focusableElements.length>0){focusableElements[0].focus()}}}if(this.endLink){this.endLink.show(true)}if(this.startLink){this.startLink.show(true)}};bobj.crv.params.ViewerFlexParameterAdapter={_viewerLayoutType:[],_promptData:[],_paramCtrl:[],_iParam:[],_iPromptUnitData:[],_iParamData:[],_moveArea:null,setViewerLayoutType:function(id,l){this._viewerLayoutType[id]=l},setPromptData:function(id,d,forIParams){if(!forIParams){this._promptData[id]=d;this.clearIParamPromptUnitData(id)}else{for(var i=0,l=d.length;i<l;i++){var unit=d[i];this._addIParamPromptUnitData(id,unit.id,unit.names,unit.data)}}},setCurrentIParamInfo:function(id,c,p){this._paramCtrl[id]=c;this._iParam[id]=p},getShowMinUI:function(id){return this.hasIParamPromptUnitData(id)},getWidth:function(id){if(this.hasIParamPromptUnitData(id)){return 300}else{return this.getSWFWidth(id)}},getHeight:function(id){if(this.hasIParamPromptUnitData(id)){return 315}else{return this.getSWFHeight(id)}},getScreenHeight:function(id){var lDim=MochiKit.Style.getElementDimensions(getLayer(id));return lDim.h-2},getScreenWidth:function(id){var lDim=MochiKit.Style.getElementDimensions(getLayer(id));return lDim.w-2},getSWFHeight:function(id){var lTypes=bobj.crv.Viewer.LayoutTypes;var layout=lTypes.CLIENT;if(this._viewerLayoutType[id]){layout=this._viewerLayoutType[id]}var min=layout===lTypes.FIXED?0:480;var sH=this.getScreenHeight(id);return Math.max(min,sH-200)},getSWFWidth:function(id){var sW=this.getScreenWidth(id);return Math.min(600,sW-20)},getAllowFullScreen:function(id){return !this.hasIParamPromptUnitData(id)},hasIParamPromptUnitData:function(id){return(this._iPromptUnitData[id]!=null)&&(this._iParamData[id]!=null)&&(this._iParam[id]!=null)},_addIParamPromptUnitData:function(id,unitID,names,data){if(!this.hasIParamPromptUnitData(id)){this._iPromptUnitData[id]=[];this._iParamData[id]=[]}this._iPromptUnitData[id][unitID]=data;for(var i=0,len=names.length;i<len;i++){this._iParamData[id][names[i]]=unitID}},clearIParamPromptUnitData:function(id){if(!this.hasIParamPromptUnitData(id)){return}delete this._iPromptUnitData[id];delete this._iParamData[id];delete this._iParam[id]},getPromptData:function(id){if(this.hasIParamPromptUnitData(id)){var promptUUID=this._iParamData[id][this._iParam[id].paramName];if(promptUUID){return this._iPromptUnitData[id][promptUUID]}}return this._promptData[id]},startDrag:function(id){var swf=bobj.crv.params.FlexParameterBridge.getSWF(id);if(swf){if(this._moveArea){return}this._moveArea=document.createElement("div");this._moveArea.id=bobj.uniqueId();MOVE_STYLE=this._moveArea.style;var STYLE=swf.style;var P_STYLE=swf.parentNode.style;MOVE_STYLE.top=P_STYLE.top;MOVE_STYLE.left=P_STYLE.left;MOVE_STYLE.width=STYLE.width?STYLE.width:swf.width+"px";MOVE_STYLE.height=STYLE.height?STYLE.height:swf.height+"px";MOVE_STYLE.border="1px";MOVE_STYLE.borderStyle="solid";MOVE_STYLE.borderColor="#000000";MOVE_STYLE.backgroundColor="#FFFFFF";MOVE_STYLE.position="absolute";MOVE_STYLE.opacity=0.5;MOVE_STYLE.filter="alpha(opacity=50)";MOVE_STYLE.zIndex=bobj.constants.modalLayerIndex-1;document.body.appendChild(this._moveArea);document.body.style.cursor="move"}},stopDrag:function(id){if(this._moveArea){var p=MochiKit.Style.getElementPosition(this._moveArea);this.move(id,p.x,p.y);document.body.removeChild(this._moveArea);delete this._moveArea;document.body.style.cursor="default"}},drag:function(id,x,y){var LOG=bobj.crv.logger;LOG.info("doMove Called viewer:"+id+" x:"+x+" y:"+y);var l=getLayer(id);if(!l){LOG.error("Shifting SWF could not find the viewer:"+id);return}var m=this._moveArea;if(!m){LOG.error("Unable to move SWF, no move area available");return}var mX=m.offsetLeft;var mY=m.offsetTop;var mH=m.offsetHeight;var mW=m.offsetWidth;var vX=l.offsetLeft;var vY=l.offsetTop;var vH=l.offsetHeight;var vW=l.offsetWidth;var newX=mX+x;var newY=mY+y;if(newY<vY){newY=vY}else{if(newY+mH>vY+vH){newY=vH-mH}}if(newX<vX){newX=vX}else{if(newX+mW>vX+vW){newX=vW-mW}}m.style.top=newY+"px";m.style.left=newX+"px";LOG.info("Moved the SWF to x:"+newX+" y:"+newY)},move:function(id,x,y){var swf=bobj.crv.params.FlexParameterBridge.getSWF(id);if(swf){var p=new MochiKit.Style.Coordinates(x,y);MochiKit.Style.setElementPosition(swf.parentNode,p)}},setParamValues:function(id,valueData){bobj.crv.logger.info("setting parameter values");if(this.hasIParamPromptUnitData(id)){this._setIParamValues(id,valueData)}else{this._setFullParamValues(id,valueData);this.closeDialog(id)}},_setFullParamValues:function(id,valueData){bobj.event.publish("crprompt_flexparam",id,valueData)},_setIParamValues:function(id,valueData){var param=this._iParam[id];var ctrl=this._paramCtrl[id];var data=this._iParamData[id];var unitData=this._iPromptUnitData[id];if(!param||!ctrl||!data||!unitData||valueData.length!=1){return}var vPromptUnit=valueData[0];var vPrompts=vPromptUnit.prompts;for(var i=0,len=vPrompts.length;i<len;i++){var vPrompt=vPrompts[i];if(!vPrompt||!vPrompt.name||!vPrompt.values){continue}ctrl.updateParameter(decodeURI(vPrompt.name),this._convertFlexValues(vPrompt,param.valueDataType))}ctrl._updateToolbar();this._updatePromptData(id,vPromptUnit,param.valueDataType);this.closeDialog(id)},_updatePromptData:function(id,newUnitData,type){var newPrompts=newUnitData.prompts;var data=this._iPromptUnitData[id][newUnitData.id];var unitData=data.promptUnits[0];var prompts=unitData.prompts;for(var i=0,pLen=prompts.length;i<pLen;i++){var prompt=prompts[i];for(var j=0,npLen=newPrompts.length;j<npLen;j++){var newPrompt=newPrompts[j];if(prompt.id==newPrompt.id){prompt.values=this._unescapeFlexValues(newPrompt.values,type);break}}}},_unescapeFlexValues:function(fValues,type){if(type!=bobj.crv.params.DataTypes.STRING){return fValues}for(var i=0,len=fValues.length;i<len;i++){this._unescapeFlexValue(fValues[i],type)}return fValues},_unescapeFlexValue:function(fValue,type){if(type!=bobj.crv.params.DataTypes.STRING){return}if((fValue.value!==undefined&&fValue.value!==null)){fValue.value=decodeURI(fValue.value);if(fValue.labels!==undefined&&fValue.labels!==null){for(var i=0,len=fValue.labels.length;i<len;i++){fValue.labels[i]=decodeURI(fValue.labels[i])}}}else{if(fValue.start){this._unescapeFlexValue(fValue.start,type)}if(fValue.end){this._unescapeFlexValue(fValue.end,type)}}},_getDescriptionIndex:function(prompt){var vIndex=prompt.lovValueIndex;var types=prompt.lovFieldTypes;if(vIndex!==undefined&&types!==undefined){for(var i=0,len=types.length;i<len;i++){if(i!=vIndex&&types[i]=="s"){return i}}}return -1},_convertFlexValues:function(prompt,type){var dIndex=this._getDescriptionIndex(prompt);var fValues=prompt.values;var jsValues=[];for(var i=0,len=fValues.length;i<len;i++){jsValues.push(this._convertFlexValue(fValues[i],type,dIndex))}return jsValues},_convertFlexValue:function(fValue,type,dIndex){var jsValue={};if((fValue.value!==undefined&&fValue.value!==null)){if(dIndex>-1&&fValue.labels&&fValue.labels.length>dIndex){jsValue.desc=decodeURI(fValue.labels[dIndex])}var path=fValue.value.path;if(path!==undefined&&path!==null){jsValue.anncestors=[];for(var i=0,len=path.length;i<len;i++){jsValue.anncestors.push(this._convertFlexValue(path[i],type,-1))}}var Type=bobj.crv.params.DataTypes;switch(type){case Type.DATE:case Type.TIME:case Type.DATE_TIME:jsValue.value=this._convertDateTimeFlexValue(fValue.value,type);break;default:jsValue.value=decodeURI(fValue.value);break}}else{if(!fValue.beginDisplay){jsValue.beginDisplay=""}if(!fValue.endDisplay){jsValue.endDisplay=""}if(fValue.start){jsValue.lowerBoundType=fValue.start.inc==true?2:1;jsValue.beginValue=this._convertFlexValue(fValue.start,type,-1);if(dIndex>-1&&fValue.start.labels&&fValue.start.labels.length>dIndex){jsValue.beginDisplay=decodeURI(fValue.start.labels[dIndex])}}else{jsValue.lowerBoundType=0}if(fValue.end){jsValue.upperBoundType=fValue.end.inc==true?2:1;jsValue.endValue=this._convertFlexValue(fValue.end,type,-1);if(dIndex>-1&&fValue.end.labels&&fValue.end.labels.length>dIndex){jsValue.endDisplay=decodeURI(fValue.end.labels[dIndex])}}else{jsValue.upperBoundType=0}}return jsValue},_convertDateTimeFlexValue:function(fValue,type){var Type=bobj.crv.params.DataTypes;var dValue={};var parts=fValue.split(",");switch(type){case Type.DATE:dValue.y=parseInt(parts[0].substring(5),10);dValue.m=parseInt(parts[1],10)-1;dValue.d=parseInt(parts[2].substring(parts[2].length-1,0),10);break;case Type.TIME:dValue.h=parseInt(parts[0].substring(5),10);dValue.min=parseInt(parts[1],10);dValue.s=parseInt(parts[2].substring(parts[2].length-1,0),10);dValue.ms=0;break;case Type.DATE_TIME:dValue.y=parseInt(parts[0].substring(9),10);dValue.m=parseInt(parts[1],10)-1;dValue.d=parseInt(parts[2],10);dValue.h=parseInt(parts[3],10);dValue.min=parseInt(parts[4]);dValue.s=parseInt(parts[5].substring(parts[5].length-1,0),10);dValue.ms=0;break}return dValue},logon:function(id,logonData){bobj.crv.logger.info("logging on");this.closeDialog(id);bobj.event.publish("crprompt_flexlogon",id,logonData)},processingCancel:function(id){var v=getWidgetFromID(id);if(v&&v._reportProcessing){v._reportProcessing.cancelShow()}},processingDelayedShow:function(id){var v=getWidgetFromID(id);if(v&&v._reportProcessing){v._reportProcessing.delayedShow()}},logger:function(text){bobj.crv.logger.info(text)},getSWFBaseURL:function(){return bobj.crvUri("../../swf/")},getSWFID:function(){return bobj.uniqueId()},getZIndex:function(){return bobj.constants.modalLayerIndex},getUseSavedData:function(id){return this.hasIParamPromptUnitData(id)},closeDialog:function(id){var v=getWidgetFromID(id);if(v){v.hideFlexPromptDialog()}},getUseOKCancelButtons:function(id){return this.hasIParamPromptUnitData(id)},getIsDialog:function(id){return true},getShouldAutoResize:function(id){return true},setVisibility:function(id){var swf=bobj.crv.params.FlexParameterBridge.getSWF(id);if(swf){var P_STYLE=swf.parentNode.style;P_STYLE.position="absolute";P_STYLE.visibility="visible";P_STYLE.borderStyle="none";P_STYLE.opacity=1;if(swf.focus!==undefined){swf.focus()}}},getReportStateInfo:function(id){var s=bobj.crv.stateManager.getComponentState(id);if(s&&s.common&&s.common.reqCtx){return MochiKit.Base.serializeJSON(s.common.reqCtx)}},setReportStateInfo:function(id,rsInfo){var s=bobj.crv.stateManager.getComponentState(id);if(s&&s.common&&s.common.reqCtx){s.common.reqCtx=MochiKit.Base.evalJSON(unescape(rsInfo))}},sendAsyncRequest:function(id,args){bobj.event.publish("crprompt_asyncrequest",id,args)},readyToShow:function(id){this.processingCancel(id)}};if(typeof(bobj.crv.SignalDisposer)=="undefined"){bobj.crv.SignalDisposer=new function(){var signals=[];var timerID=null;var CLEAN_SIGNALS_PER_TASK=20;var disconnect=MochiKit.Signal.disconnect;function cleanTask(){var count=CLEAN_SIGNALS_PER_TASK;while(signals.length>0&&count>0){disconnect(signals.pop());count--}if(signals.length==0&&timerID!=null){clearInterval(timerID);timerID=null}}this.dispose=function(signal,sync){if(signal!=null){if(sync){disconnect(signal)}else{signals.push(signal);if(timerID==null){timerID=setInterval(cleanTask,100)}}}}}}bobj.crv.newScrollingReportView=function(kwArgs){kwArgs=MochiKit.Base.update({id:bobj.uniqueId()+"_scrollingReportView",viewStateId:null,printLayout:true,isMainReport:false,isLastPageNumberKnown:false,lastPageNumber:1,groupNamePath:""},kwArgs);var o=new bobj.crv.ScrollingReportView(kwArgs.id,kwArgs.printLayout,kwArgs.isMainReport,kwArgs.lastPageNumber,kwArgs.isLastPageNumberKnown,kwArgs.groupNamePath);return o};bobj.crv.ScrollingReportView=function(id,isPrintLayout,isMainReport,lastPageNumber,isLastPageNumberKnown,groupNamePath){this.isMainReportFlag=isMainReport;this.printLayout=isPrintLayout;this.id=id;this.widgetType="ScrollingReportView";this.pages=[];this.initChildren=[];this.lastPageNumber=lastPageNumber;this.isLastPageNumberKnown=isLastPageNumberKnown;this.groupNamePath=groupNamePath;this.zoomLevel=100;this.zoomChangeFactor=1;this.topOffset=-1;this.leftOffset=-1;this.vsbar=new bobj.crv.VerticalScrollBar();this.hsbar=new bobj.crv.HorizontalScrollBar();this.displayHsbar=false;this.displayVsbar=false;this.SCROLL_DOWN_PER_UNIT=16;this.LOAD_MARGIN=500;this.UNLOAD_MARGIN=2500;this.SCROLLBAR_SIZE=16;this.PAGES_BELOW_LAST=1;this.MAX_ABSOLUTE_DELTA=12;this.containerOffsetTop=0;this.panelHeight=0;this.panelWidth=0;this.loadPageIntervalMap={};this.sizeOfLastLoadedPage={w:720,h:984};this.scrollingStartPage=-1;var bind=bobj.bindFunctionToObject;this._canvasListeners=[];this._mouseWheelCallback=bind(this._onScrollListener,this);this._onKeypressCB=bind(this._onKeyPress,this);this._panelScrollListener=bind(this._panelScrollListener,this);this._viewListener=new bobj.crv.ReportViewListener(this);this.widx=_widgets.length;this._hasRequestedLastPageNumber=false;_widgets.push(this)};bobj.crv.ScrollingReportView.prototype={init:function(){Widget_init.apply(this);this._panelNode=getLayer(this.id+"_panel");this._hsbarNode=getLayer(this.id+"_hsbar");this._ctrNode=getLayer(this.id+"_ctr");this.vsbar.init();var bind=MochiKit.Base.bind;this.vsbar.setCallBacks(bind(this._moveDown,this,this.SCROLL_DOWN_PER_UNIT),bind(this._moveUp,this,this.SCROLL_DOWN_PER_UNIT),bind(this._onThumbMoveListener,this));this.vsbar.setTooltipGenerator(bind(this._getPageNumForScrollPos,this));this.hsbar.init();this.hsbar.setScrollableElement(this._ctrNode);bobj.connectMouseWheelListener(this.layer,this._mouseWheelCallback);while(this.initChildren.length>0){this._addPage(this.initChildren.pop(),false)}this._fillEmptySpaceWithPages();this._findLastPageNumberIfNecessary()},getCanvasListeners:function(){return this._canvasListeners},_findLastPageNumberIfNecessary:function(){var firstVisible=this._getFirstVisiblePage();if(firstVisible!=null&&firstVisible.isMissingTotalPageCount()&&!this._hasRequestedLastPageNumber){this._hasRequestedLastPageNumber=true;MochiKit.Signal.signal(this,"findLastPageNumber")}},addCanvasListener:function(listener){var hasIdentical=MochiKit.Base.findIdentical(this._canvasListeners,listener)>=0;if(!hasIdentical){this._canvasListeners.push(listener);for(var i=0,len=this.pages.length;i<len;i++){this.pages[i].addCanvasListener(listener)}}},removeCanvasListener:function(listener){var index=MochiKit.Base.findIdentical(this._canvasListeners,listener);if(index>=0){this._canvasListeners.splice(index,1);for(var i=0,len=this.pages.length;i<len;i++){this.pages[i].removeCanvasListener(listener)}}},_panelScrollListener:function(ev){if(this._panelNode.scrollTop>0){var scrollBy=Math.ceil(this._panelNode.scrollTop/this.SCROLL_DOWN_PER_UNIT);this._moveUp(scrollBy*this.SCROLL_DOWN_PER_UNIT,false);this._panelNode.scrollTop=0}},addChild:function(widget){if(widget.widgetType=="ScrollingReportPage"){this.initChildren.push(widget);this.sizeOfLastLoadedPage={w:widget.width,h:widget.height}}},_onKeyPress:function(ev){var stopEventPropagation=false;switch(ev.keyCode){case KEY_PAGEUP:this.gotoPrevPage();stopEventPropagation=true;break;case KEY_PAGEDOWN:this.gotoNextPage();stopEventPropagation=true;break;case KEY_END:this.gotoLastPage();stopEventPropagation=true;break;case KEY_HOME:this.gotoFirstPage();stopEventPropagation=true;break;case KEY_LEFT:if(this.displayHsbar){this.hsbar.scrollLeft()}stopEventPropagation=true;break;case KEY_UP:this._moveDown(this.SCROLL_DOWN_PER_UNIT,false);stopEventPropagation=true;break;case KEY_RIGHT:if(this.displayHsbar){this.hsbar.scrollRight()}stopEventPropagation=true;break;case KEY_DOWN:this._moveUp(this.SCROLL_DOWN_PER_UNIT,false);stopEventPropagation=true;break;case 117:MochiKit.Signal.signal(this,"moveFocusGroup",!ev.shiftKey);stopEventPropagation=true;break}if(stopEventPropagation){(new MochiKit.Signal.Event(this,ev)).stop()}},focusFirstChild:function(){var page=this._getFirstVisiblePage()||this._getFirstPageInCache();if(page){return page.focusFirstChild()}return false},isMainReport:function(){return this.isMainReportFlag},handlePageNavigationEvent:function(){var eventName=arguments[0];if(!eventName){return}switch(eventName){case"nextPage":this.gotoNextPage();break;case"prevPage":this.gotoPrevPage();break;case"firstPage":this.gotoFirstPage();break;case"lastPage":this.gotoLastPage();break;case"selectPage":this.gotoSelectPage(arguments[1]);break}},gotoNextPage:function(){var firstVisiblePage=this._getFirstVisiblePage();if(firstVisiblePage){var nextPageNumber=firstVisiblePage.getNumber()+1;this.gotoPage(nextPageNumber)}},gotoPrevPage:function(){var firstVisiblePage=this._getFirstVisiblePage();if(firstVisiblePage){var prevPage=firstVisiblePage.getNumber()-1;if(prevPage>0){this.gotoPage(prevPage)}}},gotoFirstPage:function(){this.gotoPage(1)},gotoLastPage:function(){this._clearAllLoadPageSignals();if(this.isLastPageNumberKnown){this.gotoPage(this.lastPageNumber)}else{MochiKit.Signal.signal(this,"lastPage",true,true)}},gotoSelectPage:function(page){this.gotoPage(page)},gotoPage:function(pageNumber){if(this.isLastPageNumberKnown&&pageNumber>this.lastPageNumber){this.gotoPage(this.lastPageNumber)}var currentPage=this._getCurrentPageNumber();if(currentPage>0){if(pageNumber>currentPage){this._updateCache(true)}else{this._updateCache(false)}}if(this._isPageInCacheAndLoaded(pageNumber)){this._displayPageAtTop(pageNumber)}else{this._signalLoadPage(pageNumber,true,this._isAllowIncompletePageRequest())}this._signalUpdateCurrentPage(pageNumber)},_isAllowIncompletePageRequest:function(){var lastLoadedPageInCache=this._getLastLoadedPageInCache();if(lastLoadedPageInCache!=null&&!lastLoadedPageInCache.isMissingTotalPageCount()){return false}return !this.isLastPageNumberKnown},_getCurrentPageNumber:function(){var firstVisiblePage=this._getFirstVisiblePage();if(firstVisiblePage){return firstVisiblePage.getNumber()}return -1},_isPageInCacheAndLoaded:function(pageNumber){return this._isPageInCache(pageNumber)&&this.loadPageIntervalMap[pageNumber]==undefined},_addPageBorder:function(page){if(!this.printLayout&&!(this.isLastPageNumberKnown&&page.pageNum==this.lastPageNumber)){page.addDashedBottomBorder()}},update:function(update){if(update&&update.cons=="bobj.crv.newScrollingReportView"){if(update.args){if(update.args.isClearCachedPages){this._unloadAllPages();this.lastPageNumber=1;this.isLastPageNumberKnown=false;this.viewStateId=update.args.viewStateId;this._hasRequestedLastPageNumber=false}else{if(this.groupNamePath!=update.args.groupNamePath||this.zoomLevel!=update.args.zoomLevel){return}}if(!this.isLastPageNumberKnown){var oldLastPage=this.lastPageNumber;var pagination=update.args.separatePages;this.lastPageNumber=pagination?update.args.lastPageNumber:1;this.isLastPageNumberKnown=pagination?update.args.isLastPageNumberKnown:true;if(oldLastPage!=this.lastPageNumber&&this.displayVsbar){this._adjustThumbSize()}}this.groupNamePath=update.args.groupNamePath;var oldZoom=this.zoomLevel;var newZoom=update.args.zoomLevel;this.zoomChangeFactor=newZoom/oldZoom;this.zoomLevel=newZoom;this._signalUpdateLastPage(this.lastPageNumber,this.isLastPageNumberKnown)}if(update.children){var child=update.children[0];this.sizeOfLastLoadedPage={w:child.args.width,h:child.args.height};if(child&&child.cons=="bobj.crv.newScrollingReportPage"){var pageNum=child.args.pageNum;var page=this._getPageFromCache(pageNum);this._clearLoadPageSignal(pageNum);if(page==null){page=bobj.crv.createWidget(child);this._addPage(page,true);this._logPages("Added page "+page.getNumber());if(pageNum==this.lastPageNumber){this._loadPage(pageNum-1,false)}}else{page.update(child);this._logPages("Updated page "+page.getNumber());var firstVisiblePage=this._getFirstVisiblePage();if(firstVisiblePage==null){this._displayPageAtTop(page.getNumber());bobj.logToConsole("HACK2 _displayPageAtTop "+page.getNumber())}this._addPageListeners(page)}this._addPageBorder(page)}}if(update.args){var pageAtTop=update.args.pageDisplayedAtTop;if(pageAtTop>0){var currentPageNumber=this._getCurrentPageNumber();this._displayPageAtTop(pageAtTop);if(this._getCurrentPageNumber()<pageAtTop){this._updateCache(true)}var page=this._getPageFromCache(pageAtTop);if(page){var hlCoord=page.getHighlightedElementCoordinates()}if(hlCoord){this._setContainerOffsetTop(this._getContainerOffsetTop()-hlCoord.y);if(this.displayHsbar){this.hsbar._leftOffset=hlCoord.x}}}}this._fillEmptySpaceWithPages();if(this.isLastPageNumberKnown){var isAdjustScrollbar=false;for(var i=this.pages.length-1;i>=0;i--){if(this.pages[i].getNumber()>this.lastPageNumber){this._unloadPage(this.pages[i]);isAdjustScrollbar=true}}if(isAdjustScrollbar&&this.displayVsbar){this._adjustThumbSize();this._adjustThumbPos()}}this._findLastPageNumberIfNecessary()}},_addPageListeners:function(page){page.addMouseWheelListener(this._mouseWheelCallback);page.addKeyPressListener(this._onKeypressCB);MochiKit.Iter.forEach(this._canvasListeners,function(l){page.addCanvasListener(l)})},_displayPageAtTop:function(pageNumber){var page=this._getPageFromCache(pageNumber);if(page){var offset=this._getPageTopOffset(page);this._setContainerOffsetTop(-offset);this._signalUpdateCurrentPage(pageNumber);this._adjustThumbPos()}},_getPageToLoadToFillEmptySpace:function(){var firstPageVisible=this._getFirstVisiblePage();if(firstPageVisible&&firstPageVisible.getNumber()>1&&this._getPageTopOffset(firstPageVisible)+this._getContainerOffsetTop()>this.LOAD_MARGIN){return firstPageVisible.getNumber()-1}var lastVisiblePage=this._getLastVisiblePage();var lastPageInCache=this._getLastPageInCache();if(this.isLastPageNumberKnown&&lastPageInCache&&lastPageInCache.getNumber()>=this.lastPageNumber){return null}else{if(lastVisiblePage&&lastPageInCache.getNumber()==lastVisiblePage.getNumber()&&this._getPageTopOffset(lastVisiblePage)+lastVisiblePage.getHeight()-(this._getContainerOffsetTop()-this._getContainerHeight())>(-1)*this.LOAD_MARGIN){return lastVisiblePage.getNumber()+1}}return null},_getContainerOffsetTop:function(){return this.containerOffsetTop},_setContainerOffsetTop:function(top){var newTop=Math.round(top);this._ctrNode.style.top=newTop+"px";this.containerOffsetTop=newTop},_getContainerHeight:function(){var height=0;for(var i=0,len=this.pages.length;i<len;i++){height+=this.pages[i].getHeight()}return height},_getPanelHeight:function(){return this.panelHeight},_setPanelHeight:function(height){this._panelNode.style.height=height+"px";this.panelHeight=height},_getPanelWidth:function(){return this.panelWidth},_setPanelWidth:function(width){this._panelNode.style.width=width+"px";this.panelWidth=width},_fillEmptySpaceWithPages:function(){var nextPageToLoad=this._getPageToLoadToFillEmptySpace();while(nextPageToLoad!=null){this._loadPage(nextPageToLoad,false);nextPageToLoad=this._getPageToLoadToFillEmptySpace()}},getHTML:function(){var h=bobj.html;var layerStyle={position:"relative",width:"100%",height:"100%",overflow:"hidden","background-color":"#F0F0F0"};var panelStyle={position:"absolute",top:"0px",overflow:"hidden"};var ctrStyle={position:"absolute",top:"0px",left:"0px",display:"block"};if(this.printLayout){panelStyle["background-color"]="#8E8E8E";panelStyle["text-align"]="center";ctrStyle.margin="0 auto"}else{panelStyle["background-color"]="#FFFFFF";ctrStyle.margin="0"}var hsbarStyle={position:"absolute",bottom:"0px",height:this.SCROLLBAR_SIZE+"px",display:"none"};if(bobj.crv.config.isRTL){panelStyle.right="0px";hsbarStyle.right="0px"}else{panelStyle.left="0px";hsbarStyle.left="0px"}var html=h.DIV({id:this.id,style:layerStyle,"class":"insetBorder",tabIndex:"-1",onkeydown:bobj.getExecuteDOMCallbackHTML(this.widx,"_onKeyPress")},h.DIV({id:this.id+"_panel",style:panelStyle,onscroll:bobj.getExecuteDOMCallbackHTML(this.widx,"_panelScrollListener")},h.DIV({id:this.id+"_ctr",style:ctrStyle,role:"main"})),this.vsbar.getHTML(),h.DIV({id:this.id+"_hsbar",style:hsbarStyle},this.hsbar.getHTML()));return html},_doLayout:function(w,h){var ctrHeight=this._getContainerHeight();var sbarSize=this.SCROLLBAR_SIZE;var isBBM=bobj.isBorderBoxModel();if(!isBBM){w-=4;h-=4;h=Math.max(0,h);w=Math.max(0,w);this.layer.style.width=w+"px";this.layer.style.height=h+"px"}else{w-=4;h-=4}var ctrWidth=this._ctrNode.offsetWidth;this.displayHsbar=(ctrWidth>w);this.displayVsbar=(ctrHeight>h)||(this._getOverallCtrTopAndHeight().height>h);if(this.displayHsbar){h-=sbarSize}if(this.displayVsbar){w-=sbarSize}h=Math.max(0,h);w=Math.max(0,w);this._setPanelHeight(h);this._setPanelWidth(w);this.vsbar.layer.style.display=this.displayVsbar?"block":"none";this.vsbar.layer.style.height=h+"px";this._hsbarNode.style.display=this.displayHsbar?"block":"none";this._hsbarNode.style.width=w+"px";if(ctrHeight==0){return}if(this.displayHsbar){this.hsbar.adjustForResize()}else{var ctrNewLeft=0;if(this.printLayout){ctrNewLeft=((w-ctrWidth)/2)}this._ctrNode.style.left=ctrNewLeft+"px"}if(this.displayVsbar){if(_ie&&this.vsbar.layer.offsetLeft<0){this.vsbar.layer.style.visibility="hidden";this.vsbar.layer.style.visibility="visible"}this.vsbar.resize(h);this._adjustThumbSize();this._adjustThumbPos();this.vsbar.layer.style.display="none";this.vsbar.layer.style.display=this.displayVsbar?"block":"none"}else{var newCtrTop=0;if(this.printLayout){newCtrTop=(h-ctrHeight)/2}this._setContainerOffsetTop(newCtrTop)}},resize:function(w,h){this._doLayout(w,h)},getBestFitSize:function(){var w=4;var h=4;var pages=this.pages;if(pages.length>1){w+=this.SCROLLBAR_SIZE}var maxPageWidth=0;if(pages.length>0){for(var i=0;i<pages.length;i++){maxPageWidth=Math.max(maxPageWidth,pages[i].getBestFitSize().width)}}var pageSize=pages.length>0?pages[0].getBestFitSize():null;if(pageSize){w+=maxPageWidth;h+=pageSize.height}else{w+=this.sizeOfLastLoadedPage.w;h+=this.sizeOfLastLoadedPage.h}return{width:w,height:h}},_logPages:function(msg){var s=null;for(var i=0;i<this.pages.length;i++){if(s!=null){s+=","}s+=this.pages[i].getNumber()}if(this.pages.length==0){return}bobj.logToConsole(msg+" - Current pages : "+s)},scrollTimeStampArray:[],_isExecuteScrollEvent:function(e){var currTimeStamp=e.timeStamp;var array=this.scrollTimeStampArray;if(array.length>0&&currTimeStamp-array[array.length-1]>1000){this.scrollTimeStampArray=[]}if(array.length>3&&currTimeStamp-array[array.length-3]<100){return false}array.push(currTimeStamp);return true},_onScrollListener:function(e){if(!this.displayVsbar){return}if(!this._isExecuteScrollEvent(e)){(new MochiKit.Signal.Event(this,e)).stop();return}var delta=0;if(!e){e=window.event}if(e.wheelDelta){delta=e.wheelDelta/40;if(window.opera){delta-=delta}}else{if(e.detail){delta=-e.detail}}if(Math.abs(delta)>this.MAX_ABSOLUTE_DELTA){delta=delta>0?this.MAX_ABSOLUTE_DELTA:-this.MAX_ABSOLUTE_DELTA}if(delta){this._onScroll(delta,e)}},_onScroll:function(value,event){if(value==0){return}var isMoved=false;var moveBy=value*this.SCROLL_DOWN_PER_UNIT;if(value<0){isMoved=this._moveUp(-moveBy)}else{if(value>0){isMoved=this._moveDown(moveBy)}}if(isMoved){(new MochiKit.Signal.Event(this,event)).stop()}},_updatePagesArray:function(page){var pageNum=page.getNumber();var isAdded=false;for(var i=0,len=this.pages.length;i<len;i++){if(pageNum<this.pages[i].getNumber()){this.pages.splice(i,0,page);isAdded=true;break}}if(!isAdded){this.pages.push(page)}},_isAllPagesCached:function(){return(this.isLastPageNumberKnown&&this.pages.length==this.lastPageNumber)},_getOverallCtrTopAndHeight:function(){if(this._isAllPagesCached()){return{height:this._getContainerHeight(),top:this._getContainerOffsetTop()}}else{var avgPageHeight=this._getAverageHeightOfCachedPages();var lastPageNumber=this.lastPageNumber;var lastPageInCache=this._getLastPageInCache();if(lastPageInCache){lastPageNumber=Math.max(this.lastPageNumber,lastPageInCache.getNumber())}var height=this._getContainerHeight();if(lastPageNumber>this.pages.length){height+=(lastPageNumber-this.pages.length)*avgPageHeight}var firstVisiblePage=this._getFirstVisiblePage();if(!firstVisiblePage){bobj.logToConsole("Error!!!!! No first visible page")}var missingPagesCount=0;for(var i=1,len=this.pages.length;i<len;i++){if(firstVisiblePage&&this.pages[i].getNumber()<=firstVisiblePage.getNumber()){missingPagesCount+=(this.pages[i].getNumber()-this.pages[i-1].getNumber()-1)}}var firstCachedPage=this._getFirstPageInCache();var top=0;if(firstCachedPage){top=this._getContainerOffsetTop()+(-1*((missingPagesCount*avgPageHeight)+((firstCachedPage.getNumber()-1)*avgPageHeight)))}return{height:height,top:top}}},_getAverageHeightOfCachedPages:function(){var height=this._getContainerHeight();var pagesCount=this.pages.length;if(pagesCount==0){return this.sizeOfLastLoadedPage.h}else{return height/pagesCount}},_adjustThumbSize:function(){var ctrTH=this._getOverallCtrTopAndHeight();if(ctrTH&&ctrTH.height>0){var lInPercent=(this._getPanelHeight()/ctrTH.height)*100;this.vsbar.setThumbLength(lInPercent)}},_adjustThumbPos:function(){var ctrTH=this._getOverallCtrTopAndHeight();if(ctrTH){var diff=ctrTH.height-this._getPanelHeight();if(diff!=0){var pInPercent=-ctrTH.top/diff*100;this.vsbar.setThumbPosition(pInPercent)}this.topOffset=-this._getPageTop(this._getFirstVisiblePage());if(this.topOffset<0){this.topOffset=0}}},_onThumbMoveListener:function(pos){var moveBy=this._getMoveByOffsetY(pos);if(moveBy<0){this._moveUp(-moveBy,true)}else{if(moveBy>0){this._moveDown(moveBy,true)}}},_getMoveByOffsetY:function(pos){var ctrTH=this._getOverallCtrTopAndHeight();if(ctrTH){var curTop=ctrTH.top;var newTop=-pos*(ctrTH.height-this._getPanelHeight())/100;var moveBy=newTop-curTop;return moveBy}return 0},_getPageNumForScrollPos:function(pos){var first=this._getFirstVisiblePage();if(first){return L_bobj_crv_PageNum.replace("{0}",this._getFirstVisiblePage().getNumber())}else{return""}},_addPage:function(page,isTopPage){bobj.logToConsole("START ScrollingReportView_addPage"+page.getNumber());var html=page.getHTML();var currentPageNumber=this._getCurrentPageNumber();var isAdded=false;var isAdjustOffset=false;for(var i=0;i<this.pages.length;i++){if(page.getNumber()<this.pages[i].getNumber()){if(currentPageNumber>0&&page.getNumber()<currentPageNumber){isAdjustOffset=true}insBefore2(this.pages[i].layer,html);isAdded=true;break}}if(!isAdded){append(this._ctrNode,html)}this._updatePagesArray(page);page.init();if(isAdjustOffset){var newTop=(this._getContainerOffsetTop()-page.getHeight());this._setContainerOffsetTop(newTop)}this._addPageListeners(page);if(!this._getFirstVisiblePage()){this._displayPageAtTop(page.getNumber());bobj.logToConsole("HACK1 _displayPageAtTop "+page.getNumber())}if(isTopPage&&this.zoomChangeFactor!=1){this._moveUp(this.zoomChangeFactor*this.topOffset)}this._adjustThumbPos();this._adjustThumbSize();bobj.logToConsole("END ScrollingReportView_addPage"+page.getNumber())},_getFirstVisiblePage:function(){for(var i=0,len=this.pages.length;i<len;i++){var page=this.pages[i];if(this._isPageVisible(page)){return page}}return null},_getLastLoadedPageInCache:function(){if(this.pages.length>0){for(var i=this.pages.length-1;i>=0;i--){if(this.pages[i]!=null&&this.pages[i].hasContent()){return this.pages[i]}}}return null},_getLastVisiblePage:function(){var p=this.pages;var len=p.length;for(var i=len-1;i>-1;i--){var page=p[i];if(this._isPageVisible(page)){return page}}return null},_getPageTop:function(page){return this._getContainerOffsetTop()+this._getPageTopOffset(page)},_getPageTopOffset:function(page){var offset=0;for(var i=0;i<this.pages.length;i++){if(this.pages[i].getNumber()<page.getNumber()){offset+=this.pages[i].getHeight()}else{break}}return offset},_isPageVisible:function(page){var pageTop=this._getPageTop(page);if(pageTop>this._getPanelHeight()){return false}var pageBottom=pageTop+page.getHeight();if(pageBottom<=0){return false}return true},_isPageAboutToVisible:function(page){var pageTop=this._getPageTop(page);if(pageTop>this._getPanelHeight()+50){return false}var pageBottom=pageTop+page.getHeight();if(pageBottom<-50){return false}return true},_canUnloadPage:function(page){if(this.pages.length==1){return false}var pageTop=this._getPageTop(page);if(pageTop>(this._getPanelHeight()+this.UNLOAD_MARGIN)){return true}var pageBottom=pageTop+page.getHeight();if(pageBottom<-this.UNLOAD_MARGIN){return true}return false},_findIndexOfPageInCache:function(pageNum){for(var i=0,len=this.pages.length;i<len;i++){if(this.pages[i].getNumber()==pageNum){return i}}return -1},_isPageInCache:function(pageNum){return this._findIndexOfPageInCache(pageNum)>=0},getPage:function(pageNum){return this._getPageFromCache(pageNum)},_getPageFromCache:function(pageNum){var index=this._findIndexOfPageInCache(pageNum);if(index>=0){return this.pages[index]}else{return null}},_unloadPage:function(page){bobj.logToConsole("START ScrollingReportView_unloadPage [page:"+page.getNumber()+"]");var cacheIndex=this._findIndexOfPageInCache(page.getNumber());var currentPageNumber=this._getCurrentPageNumber();this.pages.splice(cacheIndex,1);if(page.isInFocus()){this.layer.focus()}var height=page.getHeight();page.dispose();page.removeKeyPressListener(this._onKeypressCB);page.removeMouseWheelListener(this._mouseWheelCallback);bobj.deleteWidget(page);if(currentPageNumber>page.getNumber()){this._setContainerOffsetTop(this._getContainerOffsetTop()+height)}if(currentPageNumber==-1){this._setContainerOffsetTop(0);bobj.logToConsole("HACK3")}bobj.logToConsole("END ScrollingReportView_unloadPage [page:"+page.getNumber()+"]")},dispose:function(){this._unloadAllPages();bobj.removeAllChildElements(this.layer)},_unloadAllPages:function(){while(this.pages[0]){this._unloadPage(this.pages[0])}this._setContainerOffsetTop(0)},_moveUp:function(moveBy,byThumbMove){var isMoved=false;var originalTop=this._getContainerOffsetTop();if(this.pages.length==0||this._getContainerOffsetTop()>0){return isMoved}var oldPageNumber=this._getCurrentPageNumber();var pageToLoad=this._getPageToLoadFromMoveByOffset(moveBy,false);if(pageToLoad<oldPageNumber){return isMoved}var newTop=this._getContainerOffsetTop()-moveBy;var isLastPageLoaded=this.isLastPageNumberKnown&&(this.lastPageNumber==this._getLastPageInCache().getNumber());if(isLastPageLoaded){if((this._getContainerOffsetTop()+this._getContainerHeight())!=this._getPanelHeight()){var newBottom=newTop+this._getContainerHeight();var diff=this._getPanelHeight()-newBottom;if(diff>0){newTop+=diff}}else{newTop=this._getContainerOffsetTop()}}this._setContainerOffsetTop(newTop);if(!byThumbMove){this._adjustThumbPos()}this._loadPage(pageToLoad,false);if(this._getFirstVisiblePage()==null){this._displayPageAtTop(pageToLoad)}this._updateCache(true);var newPageNumber=this._getCurrentPageNumber();if(newPageNumber!=-1&&newPageNumber!=oldPageNumber){this._signalUpdateCurrentPage(newPageNumber)}this._loadPage(pageToLoad+1,false);this.vsbar.resize(this.panelHeight);isMoved=(originalTop!=this._getContainerOffsetTop());return isMoved},_updateCache:function(isMoveUp){if(isMoveUp){while(this.pages[0]&&this._canUnloadPage(this.pages[0])){this._unloadPage(this.pages[0])}}else{while(this.pages[this.pages.length-1]){var currentPage=this.pages[this.pages.length-1];if(this._canUnloadPage(currentPage)){this._unloadPage(currentPage)}else{break}}}},_getPageToLoadFromMoveByOffset:function(moveBy,isDownward){var firstVisiblePageNumber=this._getCurrentPageNumber();if(firstVisiblePageNumber==-1){var firstCachedPage=this._getFirstPageInCache();if(firstCachedPage){firstVisiblePageNumber=firstCachedPage.getNumber()}}if(isDownward){moveBy*=-1}var pageToLoad=Math.floor(firstVisiblePageNumber+(moveBy/this._getAverageHeightOfCachedPages()));if(pageToLoad<1){pageToLoad=1}return pageToLoad},_moveDown:function(moveBy,byThumbMove){var isMoved=false;var originalTop=this._getContainerOffsetTop();if(this.pages.length==0||this._getContainerOffsetTop()>0){return isMoved}var oldPageNumber=this._getCurrentPageNumber();var pageToLoad=this._getPageToLoadFromMoveByOffset(moveBy,true);if(pageToLoad>oldPageNumber){return isMoved}var newTop=this._getContainerOffsetTop()+moveBy;this._setContainerOffsetTop(newTop);if(oldPageNumber&&oldPageNumber==1&&this._getContainerOffsetTop()>0){this._setContainerOffsetTop(0);isMoved=(originalTop!=this._getContainerOffsetTop());return isMoved}if(!byThumbMove){this._adjustThumbPos()}this._updateCache(false);if(pageToLoad>=1){this._loadPage(pageToLoad,false);if(this._getContainerOffsetTop()>0){this._displayPageAtTop(pageToLoad)}}if(pageToLoad>1){this._loadPage(pageToLoad-1,false)}var newPageNumber=this._getCurrentPageNumber();if(newPageNumber!=oldPageNumber&&newPageNumber!=-1){this._signalUpdateCurrentPage(newPageNumber)}this.vsbar.resize(this.panelHeight);isMoved=(originalTop!=this._getContainerOffsetTop());return isMoved},_loadPage:function(pageNum,isTopPage){if(pageNum<1||(this.isLastPageNumberKnown&&pageNum>this.lastPageNumber)||this._isPageInCache(pageNum)){return}var loadingPage=bobj.crv.newScrollingReportPage({pageNum:pageNum,width:this.sizeOfLastLoadedPage.w,height:this.sizeOfLastLoadedPage.h,screenReaderHandler:MochiKit.Base.bind(this._signalLoadPage,this,pageNum,false,this._isAllowIncompletePageRequest(),true),documentView:(this.printLayout)?bobj.crv.ReportPage.DocumentView.PRINT_LAYOUT:bobj.crv.ReportPage.DocumentView.WEB_LAYOUT});this._addPage(loadingPage,isTopPage);this._logPages("Added dummy page "+loadingPage.getNumber());this._clearLoadPageSignal(pageNum);var loadPageCB=function(me,pageNumber,isTopPage,isAllowIncompletePage){return function(){me._signalLoadPage(pageNumber,isTopPage,isAllowIncompletePage,false)}}(this,pageNum,false,this._isAllowIncompletePageRequest());this.loadPageIntervalMap[pageNum]=setInterval(loadPageCB,200)},loadCompletePage:function(pageNum){this._signalLoadPage(pageNum,false,false,false)},_signalLoadPage:function(pageNum,isTopPage,isAllowIncompletePage,byScreenReaderLink){var page=this._getPageFromCache(pageNum);var cancelInterval=false;if((page&&this._isPageAboutToVisible(page))||isTopPage||byScreenReaderLink){var isShowProcessingIndicator=isTopPage;MochiKit.Signal.signal(this,"getPage",pageNum.toString(),isTopPage,isAllowIncompletePage,isShowProcessingIndicator);bobj.logToConsole("Getting page "+pageNum);cancelInterval=true;this._loadPage(pageNum-1,false);this._loadPage(pageNum+1,false)}else{if(page==null){cancelInterval=true}}if(cancelInterval){this._clearLoadPageSignal(pageNum)}},_clearAllLoadPageSignals:function(){for(var pageNum in this.loadPageIntervalMap){this._clearLoadPageSignal(pageNum);this._unloadPage(this._getPageFromCache(pageNum))}},_clearLoadPageSignal:function(pageNum){clearInterval(this.loadPageIntervalMap[pageNum]);delete this.loadPageIntervalMap[pageNum]},_getLastPageInCache:function(){if(this.pages){return this.pages[this.pages.length-1]}return null},_getFirstPageInCache:function(){if(this.pages){return this.pages[0]}return null},_signalUpdateCurrentPage:function(pageNum){var numPagesString=this.lastPageNumber;if(!this.isLastPageNumberKnown){numPagesString+="+"}MochiKit.Signal.signal(this,"updateCurrentPage",pageNum,numPagesString);var page=this.getPage(pageNum);if(this.isLastPageNumberKnown&&page!=null&&page.isMissingTotalPageCount()){this.loadCompletePage(pageNum)}},_signalUpdateLastPage:function(lastPageNum,lastPageNumKnown){MochiKit.Signal.signal(this,"updateLastPage",this.groupNamePath,lastPageNum,lastPageNumKnown)}};if(typeof(bobj.crv.AsyncTransporter)=="undefined"){bobj.crv.AsyncTransporter={}}bobj.crv.AsyncTransporter.getInstance=function(){if(!bobj.crv.AsyncTransporter.__instance){bobj.crv.AsyncTransporter.__instance=new function(){var iframe=null;var RID=0;var transporterURL=bobj.crvUri("../../html/transporter.html");var requests={};var isIframeLoaded=false;var messageQueue=[];function initIframe(){if(!iframe){iframe=MochiKit.DOM.createDOM("IFRAME");iframe.style.width="1px";iframe.style.height="1px";iframe.style.position="absolute";iframe.style.top="-2px";iframe.style.left="-2px";iframe.frameborder="0";iframe.scrolling="no";iframe.allowtransparency="true";iframe.src=transporterURL;function addIframe(){if(document.body.firstChild){document.body.insertBefore(iframe,document.body.firstChild)}else{document.body.appendChild(iframe)}bobj.connectDOMEvent(iframe,"onload",function(){bobj.disconnectDOMEvent(iframe,"onload",arguments.callee);setIsIFrameLoaded()})}if(document.body){addIframe()}else{bobj.connectDOMEvent(window,"onload",function(){addIframe()})}}}function postMessage(method,id,methodArgs){initIframe();var message={method:method,RID:id};message.methodArgs=methodArgs?methodArgs:"";var messageStr=MochiKit.Base.serializeJSON(message);if(!isIframeLoaded){messageQueue.push(messageStr)}else{iframe.contentWindow.postMessage(messageStr,iframe.src)}}function setIsIFrameLoaded(){isIframeLoaded=true;processQueue()}function processQueue(){for(var i=0;i<messageQueue.length;i++){iframe.contentWindow.postMessage(messageQueue[i],iframe.src)}messageQueue=[]}bobj.connectDOMEvent(window,"onmessage",function(ev){if(transporterURL.toLowerCase().indexOf(ev.origin.toLowerCase())>=0){try{var rawData=ev.data;var firstBar=rawData.indexOf("|");var secondBar=rawData.indexOf("|",firstBar+1);var status=parseInt(rawData.substring(0,firstBar));var RID=parseInt(rawData.substring(firstBar+1,secondBar));var responseText=rawData.substring(secondBar+1);var request=requests[RID];var response=new function(){this.responseText=responseText};if(status==200||status==304){request.onsuccess(response)}else{request.onfail(response)}}catch(e){throw {message:"unable to process async respons",innerException:e}}}});function sendXDomainRequest(method,url,args,onSuccess,onFail,headers){var _myID=RID++;var _successCB=onSuccess;var _failCB=onFail;var postFunc=function(){postMessage(method,_myID,{url:url,args:args,headers:headers})};if(_ie){setTimeout(postFunc,0)}else{postFunc()}var deferred=new function(){this.cancel=function(){postMessage("cancel",_myID)};this.addCallback=function(fn){_successCB=fn};this.addErrback=function(fn){_failCB=fn};this.onsuccess=function(req){if(_successCB){_successCB(req)}};this.onfail=function(req){if(_failCB){_failCB(req)}}};requests[_myID]=deferred;return deferred}function isCrossDomainRequest(url){var xDomainRegex=/^(\w+:)?\/\/([^\/?#]+)/;var urlSeq=xDomainRegex.exec(url);return urlSeq!=null&&(urlSeq[1]&&urlSeq[1]!==location.protocol||urlSeq[2]!==location.host)}this.post=function(url,args,onSuccess,onFail,headers){if(isCrossDomainRequest(url)){return sendXDomainRequest("POST",url,args,onSuccess,onFail,headers)}else{var req=MochiKit.Async.getXMLHttpRequest();req.open("POST",url,true);if(headers!=null){for(var hName in headers){req.setRequestHeader(hName,headers[hName])}}var deferred=MochiKit.Async.sendXMLHttpRequest(req,args);if(onSuccess){deferred.addCallback(onSuccess)}if(onFail){deferred.addErrback(onFail)}return deferred}};this.get=function(url,args,onSuccess,onFail,headers){if(isCrossDomainRequest(url)){return sendXDomainRequest("GET",url,args,onSuccess,onFail,headers)}else{var req=MochiKit.Async.getXMLHttpRequest();if(args!=null){url+="?"+args}req.open("GET",url,true);if(headers!=null){for(var hName in headers){req.setRequestHeader(hName,headers[hName])}}var deferred=MochiKit.Async.sendXMLHttpRequest(req,args);if(onSuccess){deferred.addCallback(onSuccess)}if(onFail){deferred.addErrback(onFail)}return deferred}}}}return bobj.crv.AsyncTransporter.__instance};if(typeof bobj=="undefined"){bobj={}}if(typeof bobj.crv=="undefined"){bobj.crv={}}if(typeof bobj.crv.TakeAction=="undefined"){bobj.crv.TakeAction={}}bobj.crv.TakeAction.getInstance=function(frameElement){if(!bobj.crv.TakeAction._widgetInstance){bobj.crv.TakeAction._widgetInstance=new bobj.crv.TakeAction._widget(frameElement)}else{if(frameElement){bobj.crv.TakeAction._widgetInstance.update(frameElement)}}return bobj.crv.TakeAction._widgetInstance};bobj.crv.TakeAction._widget=function(frameElement){this._currentFrameElement=null;this._contentDocumentElement=null;this._processingActions=null;this._button=null;this._menu=null;this._menuOverlay=null;this._timeoutId=null;this._associatedReportObject=null;this._associatedReportObjectHasKeyFocus=null;this._currentViewerID=null;this._noActionsMenuId=null;this._currentFrameElement=frameElement;this._contentDocumentElement=_ie?frameElement.contentWindow.document:frameElement.contentDocument;var frameContainingDiv=frameElement.parentNode;var imgId=bobj.uniqueId();var imgTooltip=L_bobj_crv_TakeActionMenuTip;var imgHTML=bobj.html.IMG({id:imgId,src:bobj.crvUri("../../images/takeaction/action_oncanvas_normal.gif"),alt:imgTooltip,title:imgTooltip,onmouseover:"bobj.crv.TakeAction.getInstance()._dropDownMenuMouseover(event,this)",onmouseout:"bobj.crv.TakeAction.getInstance()._dropDownMenuMouseout(event,this)",onclick:"bobj.crv.TakeAction.getInstance()._dropDownMenuOnClick(event,this)","class":"takeaction_menu_button"});append(frameContainingDiv,imgHTML);this._button=getLayer(imgId);this._borders={};MochiKit.Iter.forEach([["left",true],["right",true],["top",false],["bottom",false]],MochiKit.Base.bind(function(item){var borderId=bobj.uniqueId();var borderClass;if(item[1]){borderClass="takeaction_vertical_borders"}else{borderClass="takeaction_horizontal_borders"}var borderHTML=bobj.html.DIV({id:borderId,"class":borderClass});append(frameContainingDiv,borderHTML);this._borders[item[0]]=getLayer(borderId)},this));this._menu=bobj.crv.newScrollingMenu(bobj.uniqueId(),MochiKit.Base.bind(this._hideMenuAfterCallback,this));var menuOverlayId=bobj.uniqueId();var menuOverlayHTML=bobj.html.DIV({id:menuOverlayId,"class":"takeaction_menu_overlay"});targetApp(menuOverlayHTML);this._menuOverlay=getLayer(menuOverlayId);if(_ie){this._menuOverlay.style.position="absolute";bobj.connectMouseWheelListener(this._menuOverlay,function(){setTimeout(MochiKit.Base.bind(this._updateMenuOverlayPosition,this),1)})}this._processingActions=false};bobj.crv.TakeAction._widget.prototype={showDropDownButton:function(event,element,viewerName,isFocusIn){if(!this._processingActions&&!this._menu.isShown()&&this._helper_isMouseLeaveOrEnter(event,element)){if(this._timeoutId){clearTimeout(this._timeoutId);this._timeoutId=null}var css=this._button.style;css.visibility="visible";var position=this._helper_calculateAbsoluteXY(element);var xPosOffset=1;var yPosOffset=-1;if(_ie&&bobj.isQuirksMode()){if(bobj.crv.config.isRTL){xPosOffset=+2}else{xPosOffset=-1}}if(bobj.crv.config.isRTL){css.left=(position.x-xPosOffset-this._button.width)+"px"}else{css.left=(position.x+element.offsetWidth+xPosOffset)+"px"}css.top=(position.y+yPosOffset)+"px";var position=this._helper_calculateAbsoluteXY(element);this._updateBorders(position,element);MochiKit.Iter.forEach(["left","right","top","bottom"],MochiKit.Base.bind(function(name){this._borders[name].style.visibility="visible"},this));this._associatedReportObject=element;this._associatedReportObjectHasKeyFocus=false;this._currentViewerID=viewerName;if(isFocusIn){this._button.setAttribute("src",bobj.crvUri("../../images/takeaction/action_oncanvas_hover.gif"));css.outlineColor="invert";css.outlineStyle="dotted";css.outlineWidth="thin"}}},hideDropDownButton:function(event,element,delay){if(!this._processingActions&&!this._menu.isShown()&&this._helper_isMouseLeaveOrEnter(event,element)){if(delay){this._timeoutId=setTimeout(MochiKit.Base.bind(this._hideDropDownButton,this),300)}else{this._hideDropDownButton()}}},_hideDropDownButton:function(){this._button.setAttribute("src",bobj.crvUri("../../images/takeaction/action_oncanvas_normal.gif"));this._button.style.visibility="hidden";this._button.style.outlineColor="";this._button.style.outlineStyle="";this._button.style.outlineWidth="";MochiKit.Iter.forEach(["left","right","top","bottom"],MochiKit.Base.bind(function(name){this._borders[name].style.visibility="hidden"},this))},accessibleKeyUp:function(event){if(event.keyCode&&(event.keyCode==13||event.keyCode==32)){var css=this._button.style;if(css.outlineStyle!=""||css.outlineStyle!=""||css.outlineWidth!=""){css.outlineColor="";css.outlineStyle="";css.outlineWidth="";this._associatedReportObjectHasKeyFocus=true;this._dropDownMenuOnClick(event,this._button)}}},update:function(frameElement){var oldFrameContainingDiv=this._currentFrameElement.parentNode;var newFrameContainingDiv=frameElement.parentNode;if(oldFrameContainingDiv!=newFrameContainingDiv){this._currentFrameElement=frameElement;this._contentDocumentElement=_ie?frameElement.contentWindow.document:frameElement.contentDocument;if(oldFrameContainingDiv!=null){oldFrameContainingDiv.removeChild(this._button)}if(newFrameContainingDiv!=null){newFrameContainingDiv.appendChild(this._button)}MochiKit.Iter.forEach([["left",true],["right",true],["top",false],["bottom",false]],MochiKit.Base.bind(function(item){var border=this._borders[item[0]];if(oldFrameContainingDiv!=null){oldFrameContainingDiv.removeChild(border)}if(newFrameContainingDiv!=null){newFrameContainingDiv.appendChild(border)}},this))}},_updateBorders:function(position,reportObjectElement){var reportObjectHeight=reportObjectElement.offsetHeight;var reportObjectWidth=reportObjectElement.offsetWidth;var leftPos={x:(position.x-1),y:position.y,h:reportObjectHeight};var rightPos={x:(position.x+reportObjectWidth-1),y:position.y,h:leftPos.h};var topPos={x:leftPos.x,y:(position.y-1),w:(reportObjectWidth+2)};var bottomPos={x:leftPos.x,y:(position.y+reportObjectHeight-1),w:topPos.w};if(_ie&&bobj.isQuirksMode()){reportObjectHeight+=(reportObjectElement.clientTop*2);reportObjectWidth+=(reportObjectElement.clientLeft*2);leftPos={x:(position.x-3),y:(position.y-1),h:reportObjectHeight};rightPos={x:(position.x+reportObjectElement.offsetWidth-3),y:(position.y-1),h:leftPos.h};topPos={x:leftPos.x,y:(position.y-1),w:reportObjectWidth};bottomPos={x:leftPos.x,y:(position.y+reportObjectElement.offsetHeight-1),w:topPos.w};if(reportObjectElement.clientLeft<=0){rightPos.h+=2}}this._borders.left.style.left=leftPos.x+"px";this._borders.left.style.top=leftPos.y+"px";this._borders.left.style.height=leftPos.h+"px";this._borders.right.style.left=rightPos.x+"px";this._borders.right.style.top=rightPos.y+"px";this._borders.right.style.height=rightPos.h+"px";this._borders.top.style.left=topPos.x+"px";this._borders.top.style.top=topPos.y+"px";this._borders.top.style.width=topPos.w+"px";this._borders.bottom.style.left=bottomPos.x+"px";this._borders.bottom.style.top=bottomPos.y+"px";this._borders.bottom.style.width=bottomPos.w+"px"},_updateMenuOverlayPosition:function(){if(_ie){this._menuOverlay.style.left=document.body.scrollLeft;this._menuOverlay.style.top=document.body.scrollTop}},_getMultiValueContextInfo:function(assoRptObjElement){var contextId=assoRptObjElement.getAttribute("contextid");var docElement=this._contentDocumentElement;if(contextId!=null&&contextId.length>0&&docElement!=null){var contextInput=docElement.getElementById(contextId);if(contextInput){return contextInput.value}}return""},_hideMenuAfterCallback:function(event){this._menuOverlay.style.visibility="hidden";if(event&&event.keyCode&&event.keyCode==27&&this._associatedReportObjectHasKeyFocus){this._associatedReportObject.focus()}else{this._hideDropDownButton()}this._associatedReportObjectHasKeyFocus=false},_invokeAction:function(targetId,assoRptObjElement){var state=bobj.crv.stateManager.getComponentState(this._currentViewerID);var drillState=state[state.curViewId];var pageContext=drillState.vCtxt;var subreportName=null;if(drillState.srptRqtCtxt){subreportName=drillState.srptRqtCtxt.srptNm}var requestArgs={ReportSourceKey:state.common.reportSourceSessionID,RequestEvent:"EventActionInvoke",RequestRptObjName:assoRptObjElement.id,RequestTargetId:targetId,RequestContext:pageContext,RequestSubreportName:subreportName,RequestContextInfo:this._getMultiValueContextInfo(assoRptObjElement)};this._processingActions=true;bobj.event.publish("waitingModalBackground",this._currentViewerID,true);var onsuccess=MochiKit.Base.bind(function onSuccess(jsonObj){this._processingActions=false;bobj.event.publish("waitingModalBackground",this._currentViewerID,false);if(jsonObj.actionURL){window.open(jsonObj.actionURL)}},this);var onfail=MochiKit.Base.bind(function onFail(jsonObj){this._processingActions=false;bobj.event.publish("waitingModalBackground",this._currentViewerID,false);var errorMsg=L_bobj_crv_TakeActionExecuteActionError;if(jsonObj.actionError){errorMsg=jsonObj.actionError}bobj.event.publish("displayError",this._currentViewerID,"errorMessage="+errorMsg)},this);bobj.event.publish("takeaction_asyncRequest",this._currentViewerID,requestArgs,onsuccess,onfail)},_helper_showMenu:function(element,menu,menuOverlay){var mockOffset={x:0,y:0};var elementPos=MochiKit.Style.getElementPosition(element,null,null);mockOffset.x+=elementPos.x;mockOffset.y+=elementPos.y;if(_ie&&bobj.isQuirksMode()){mockOffset.x-=2;mockOffset.y-=2}if(this._menu.layer==null){this._menu.justInTimeInit()}var menuDimension=MochiKit.Style.getElementDimensions(this._menu.layer);var frameWidth=MochiKit.Style.getElementDimensions(this._currentFrameElement).w;if(bobj.crv.config.isRTL){if(_ie){mockOffset.x=frameWidth+mockOffset.x+182}mockOffset.x+=element.offsetWidth}menu.show(true,mockOffset.x,mockOffset.y+element.height,null,null,null,null,element.offsetHeight);menuOverlay.style.visibility="visible";this._updateMenuOverlayPosition()},_helper_addDisabledNoActionsMenuItem:function(){if(!this._noActionsMenuId){this._noActionsMenuId=bobj.uniqueId()}this._menu.internalAdd(this._noActionsMenuId,L_bobj_crv_TakeActionNoActionsMenuLabel,null,null,null,null,true)},_helper_calculateAbsoluteXY:function(element){var mockOffset={x:0,y:0};var elementPos=MochiKit.Style.getElementPosition(element,null,this._contentDocumentElement);mockOffset.x+=elementPos.x;mockOffset.y+=elementPos.y;if(_ie&&bobj.isQuirksMode()){mockOffset.x+=2}return mockOffset},_helper_isMouseLeaveOrEnter:function(event,element){var relatedTarget;if(event.relatedTarget){relatedTarget=event.relatedTarget}else{if(event.type=="mouseout"){relatedTarget=event.toElement}else{relatedTarget=event.FromElement}}while(relatedTarget&&relatedTarget!=element){relatedTarget=relatedTarget.parentNode}return(relatedTarget!=element)},_dropDownMenuMouseover:function(event,element){if(!this._processingActions&&!this._menu.isShown()&&this._helper_isMouseLeaveOrEnter(event,element)){this._button.setAttribute("src",bobj.crvUri("../../images/takeaction/action_oncanvas_hover.gif"));if(this._timeoutId){clearTimeout(this._timeoutId);this._timeoutId=null}}},_dropDownMenuMouseout:function(event,element){if(!this._processingActions&&!this._menu.isShown()&&this._helper_isMouseLeaveOrEnter(event,element)){this._button.setAttribute("src",bobj.crvUri("../../images/takeaction/action_oncanvas_normal.gif"));this._hideDropDownButton(event,this._associatedReportObject,false)}},_dropDownMenuOnClick:function(event,element){this._button.setAttribute("src",bobj.crvUri("../../images/takeaction/action_oncanvas_press.gif"));var state=bobj.crv.stateManager.getComponentState(this._currentViewerID);var viewState=state[state.curViewId];var sessionID=state.common.reportSourceSessionID;var rptObjName=this._associatedReportObject.id;var rptFieldType=this._associatedReportObject.getAttribute("fieldtype");var pageContext=viewState.vCtxt;var subreportName=null;if(viewState.srptRqtCtxt){subreportName=viewState.srptRqtCtxt.srptNm}var requestArgs={ReportSourceKey:sessionID,RequestEvent:"EventActionGet",RequestRptObjName:rptObjName,RequestRptFieldType:rptFieldType,RequestContext:pageContext,RequestSubreportName:subreportName,RequestContextInfo:this._getMultiValueContextInfo(this._associatedReportObject)};this._menu.removeAll();this._processingActions=true;bobj.event.publish("waitingModalBackground",this._currentViewerID,true);var onsuccess=MochiKit.Base.bind(function onSuccess(jsonObj){this._processingActions=false;bobj.event.publish("waitingModalBackground",this._currentViewerID,false);var actions=jsonObj.actions;if(actions&&actions.length>0){for(var i=0;i<actions.length;i++){var actionObj=actions[i];this._menu.internalAdd(actionObj.actionId,actionObj.actionName,MochiKit.Base.bind(function(actionId){this._invokeAction(actionId,this._associatedReportObject)},this,actionObj.actionId))}}else{this._helper_addDisabledNoActionsMenuItem()}this._helper_showMenu(element,this._menu,this._menuOverlay)},this);var onfail=MochiKit.Base.bind(function onFail(jsonObj){this._processingActions=false;bobj.event.publish("waitingModalBackground",this._currentViewerID,false);this._helper_addDisabledNoActionsMenuItem();this._helper_showMenu(element,this._menu,this._menuOverlay)},this);bobj.event.publish("takeaction_asyncRequest",this._currentViewerID,requestArgs,onsuccess,onfail)}};bobj.crv.ColorPalette=function(color){var hsvColor=RGB2HSV(hex2RGB(color));this.getSpecifiedColor=function(s,v){var newHSV=new HSV(hsvColor.h,s,v);newHSV.validate();return RGB2hex(HSV2RGB(newHSV))};this.getModifiedColor=function(hDelta,sRatio,vRatio){var newHSV=new HSV(0,0,0);newHSV.h=(hsvColor.h+hDelta)%360;if(sRatio>0){newHSV.s=hsvColor.s+((100-hsvColor.s)*sRatio)}else{newHSV.s=hsvColor.s+(hsvColor.s*sRatio)}if(vRatio>0){newHSV.v=hsvColor.v+((100-hsvColor.v)*vRatio)}else{newHSV.v=hsvColor.v+(hsvColor.v*vRatio)}newHSV.validate();return RGB2hex(HSV2RGB(newHSV))};function HSV(hue,saturation,value){this.h=hue;this.s=saturation;this.v=value;this.validate=function(){if(this.h<=0){this.h=0}if(this.s<=0){this.s=0}if(this.v<=0){this.v=0}if(this.h>360){this.h=360}if(this.s>100){this.s=100}if(this.v>100){this.v=100}}}function RGB(red,green,blue){this.r=red;this.g=green;this.b=blue;this.validate=function(){if(this.r<=0){this.r=0}if(this.g<=0){this.g=0}if(this.b<=0){this.b=0}if(this.r>255){this.r=255}if(this.g>255){this.g=255}if(this.b>255){this.b=255}}}function hexify(number){var digits="0123456789ABCDEF";var lsd=number%16;var msd=(number-lsd)/16;var hexified=digits.charAt(msd)+digits.charAt(lsd);return hexified}function decimalize(hexNumber){var digits="0123456789ABCDEF";return((digits.indexOf(hexNumber.charAt(0).toUpperCase())*16)+digits.indexOf(hexNumber.charAt(1).toUpperCase()))}function hex2RGB(colorString){var r=decimalize(colorString.substring(1,3));var g=decimalize(colorString.substring(3,5));var b=decimalize(colorString.substring(5,7));return new RGB(r,g,b)}function RGB2hex(rgb){return"#"+hexify(rgb.r)+hexify(rgb.g)+hexify(rgb.b)}function RGB2HSV(rgb){var hsv=new HSV(0,0,0);var r=rgb.r/255;var g=rgb.g/255;var b=rgb.b/255;var minVal=Math.min(r,g,b);var maxVal=Math.max(r,g,b);var delta=maxVal-minVal;hsv.v=maxVal;if(delta==0){hsv.h=0;hsv.s=0}else{hsv.s=delta/maxVal;var del_R=(((maxVal-r)/6)+(delta/2))/delta;var del_G=(((maxVal-g)/6)+(delta/2))/delta;var del_B=(((maxVal-b)/6)+(delta/2))/delta;if(r==maxVal){hsv.h=del_B-del_G}else{if(g==maxVal){hsv.h=(1/3)+del_R-del_B}else{if(b==maxVal){hsv.h=(2/3)+del_G-del_R}}}if(hsv.h<0){hsv.h+=1}if(hsv.h>1){hsv.h-=1}}hsv.h*=360;hsv.s*=100;hsv.v*=100;return hsv}function HSV2RGB(hsv){var rgb=new RGB(0,0,0);var h=hsv.h/360;var s=hsv.s/100;var v=hsv.v/100;if(s==0){rgb.r=v*255;rgb.g=v*255;rgb.b=v*255}else{var var_h=h*6;var var_i=Math.floor(var_h);var var_1=v*(1-s);var var_2=v*(1-s*(var_h-var_i));var var_3=v*(1-s*(1-(var_h-var_i)));var var_r=v;var var_g=var_3;var var_b=var_1;if(var_i==0){var_r=v;var_g=var_3;var_b=var_1}else{if(var_i==1){var_r=var_2;var_g=v;var_b=var_1}else{if(var_i==2){var_r=var_1;var_g=v;var_b=var_3}else{if(var_i==3){var_r=var_1;var_g=var_2;var_b=v}else{if(var_i==4){var_r=var_3;var_g=var_1;var_b=v}else{var_r=v;var_g=var_1;var_b=var_2}}}}}rgb.r=var_r*255;rgb.g=var_g*255;rgb.b=var_b*255}return rgb}};bobj.crv.ThemeManager=function(){this.id=bobj.uniqueId();var defaultThemeColor="#CDD9E9";var defaultFontFamily="tahoma, sans-serif";var scheme=createScheme(defaultThemeColor);var hideGradient=false;var BACKGROUND="background";var BGCOLOR="background-color";var BDCOLOR="border-color";var BDTCOLOR="border-top-color";var BDRCOLOR="border-right-color";var BDBCOLOR="border-bottom-color";var BDLCOLOR="border-left-color";var COLOR="color";var FILTER="filter";var FONTFAMILY="font-family";this.setThemeFont=function(family){var fontFamily=family?family+", "+defaultFontFamily:defaultFontFamily;var sheet=addStyleSheet(this.id+"_font");var selectors=[".crviewer",".crviewer input",".dialogbox",".dialogzone",".menuFrame",".menuFrame select",".menuFrame input",".dialogbox input",".calendarTextPart"];for(var i=0;i<selectors.length;i++){changeCSS(sheet,selectors[i],[FONTFAMILY],[fontFamily])}};this.setThemeColor=function(color,gradient){scheme=createScheme(bobj.isValidHex(color)?color:defaultThemeColor);hideGradient=gradient;var sheet=addStyleSheet(this.id+"_color");addRules(sheet)};function addStyleSheet(id){var style=getLayer(id);if(style){MochiKit.DOM.removeElement(style)}bobj.addStyleSheet(null,id);style=getLayer(id);var sheet=null;if(style.sheet){sheet=style.sheet}else{if(style.styleSheet){sheet=style.styleSheet}}return sheet}var rtl=(bobj.crv.config.isRTL?"RTL":"");function addRules(sheet){var regularRules=[[".crviewer",[BDCOLOR],[scheme.dark]],[".crtoolbarbottom",[BGCOLOR],[scheme.theme]],[".toolbar_buttongroup",[BGCOLOR,BDCOLOR],[scheme.faint,scheme.dark]],[".filemenu_hover",[BDCOLOR],[scheme.medium]],[".filemenu_depressed",[BDCOLOR],[scheme.medium]],[".button_hover .button_image",[BDCOLOR],[scheme.medium]],[".button_depressed .button_image",[BDCOLOR],[scheme.medium]],[".horizontalSeparator",[BDTCOLOR],[scheme.dark]],[".verticalSeparator",[BDLCOLOR],[scheme.dark]],[".panelHeaderBottom",[BGCOLOR],[scheme.dark]],[".panelHeader"+rtl,[BDTCOLOR,(bobj.crv.config.isRTL?BDLCOLOR:BDRCOLOR)],[scheme.dark,scheme.dark]],[".panelNavigator"+rtl,[BGCOLOR,BDCOLOR],[scheme.light,scheme.dark]],[".panelNavigatorInnerBorder",[BDCOLOR],[scheme.faint]],[".toolPanel"+rtl,[BGCOLOR,(bobj.crv.config.isRTL?BDLCOLOR:BDRCOLOR),BDBCOLOR],[scheme.faint,scheme.dark,scheme.dark]],[".searchPanelTextContainer",[BGCOLOR,BDCOLOR],["#FFFFFF",scheme.dark]],[".searchPanelTextContainer.searchPanelTextContainerDisabled",[BGCOLOR,BDCOLOR],["#DDDDDD","#999999"]],[".selectListControl",[BDCOLOR],[scheme.dark]],[".stackedTabTitleDirty",[BGCOLOR],[scheme.selBottom]],[".stackedPanel",[BGCOLOR],[scheme.faint]],[".stackedTab",[BGCOLOR,BDCOLOR],[scheme.faint,scheme.dark]],[".iactTextField",[BGCOLOR],[scheme.faint]],[".iactParamRowEditable",[BDCOLOR],[scheme.dark]],[".scrollingMenuArrow",[BDCOLOR],[scheme.dark]],[".breadcrumbLink",[COLOR],[scheme.link]],[".breadcrumbText",[COLOR],[scheme.visitedLink]],[".loadingMessageBar",[BGCOLOR],[scheme.selBottom]],[".tabbedFrame",[BGCOLOR],[scheme.light]],[".dialogzone",[BGCOLOR],[scheme.medium]],[".dialogbox",[BGCOLOR,BDCOLOR],[scheme.light,scheme.dark]],[".dlgFrame",[BDCOLOR],[scheme.dark]],[".dlgBody",[BGCOLOR],[scheme.light]],[".menuFrame",[BDCOLOR],[scheme.dark]],[".menuIconCheck",[BDCOLOR],[scheme.dark]],[".menuLeftPart",[BGCOLOR,BDCOLOR],[scheme.light,scheme.light]],[".menuTextPart",[BDCOLOR],[scheme.faint]],[".menuRightPart",[BGCOLOR,BDCOLOR],[scheme.faint,scheme.faint]],[".menuLeftPartSel",[BDCOLOR],[scheme.dark]],[".menuTextPartSel",[BDCOLOR],[scheme.dark]],[".menuRightPartSel",[BDCOLOR],[scheme.dark]],[".menuTextPartDisabled",[BGCOLOR,BDCOLOR],[scheme.faint,scheme.faint]],[".menuCalendarSel",[BGCOLOR,BDCOLOR],[scheme.selBottom,scheme.dark]],[".menuCalendar",[BDCOLOR],[scheme.faint]],[".treeSelected",[BGCOLOR],[scheme.dark]],[".wizbuttonBorder",[BDCOLOR],[scheme.dark]],[".textinputsBorder",[BDCOLOR],[scheme.dark]],[".textDisabled .textinputsBorder",[BGCOLOR,BDCOLOR],["#DDDDDD","#999999"]],[".iconnocheck",[BGCOLOR,BDCOLOR],[scheme.light,scheme.light]],[".iconcheckhover",[BGCOLOR,BDTCOLOR,BDLCOLOR],[scheme.theme,scheme.dark,scheme.dark]],[".iconhover",[BGCOLOR,BDRCOLOR,BDBCOLOR],[scheme.light,scheme.dark,scheme.dark]],[".infozone",[BDCOLOR],[scheme.dark]],[".combonocheck",[BDCOLOR],[scheme.medium]],[".combohover",[BDCOLOR],[scheme.dark]],[".comboEditable",[BDCOLOR],[scheme.dark]],[".combobtnhover",[BGCOLOR,BDCOLOR],[scheme.dark,scheme.dark]]];for(var i=0;i<regularRules.length;i++){changeCSS(sheet,regularRules[i][0],regularRules[i][1],regularRules[i][2])}var gradientRules=[[".crtoolbartop",null,scheme.theme,scheme.theme,false],[".filemenu_hover",scheme.selBottom,null,scheme.light,false],[".filemenu_depressed",scheme.selTop,scheme.selBottom,scheme.selTop,false],[".button_hover .button_image",scheme.selBottom,null,scheme.light,false],[".button_depressed .button_image",scheme.selTop,scheme.selBottom,scheme.selTop,false],[".panelNavigatorItemSelected",scheme.selTop,scheme.selBottom,scheme.selTop,false],[".panelNavigatorItemHighlighted",null,scheme.selBottom,scheme.selBottom,false],[".panelHeaderTop",scheme.medium,scheme.dark,scheme.dark,false],[".selectListItem","#FFFFFF","#FFFFFF","#FFFFFF",false],[".selectListItemHighlighted",null,scheme.selBottom,scheme.selBottom,false],[".selectListItemSelected",scheme.selTop,scheme.selBottom,scheme.selTop,false],[".dlgTitle",scheme.dark,scheme.theme,scheme.dark,false],[".menuIconCheck",scheme.selTop,scheme.selBottom,scheme.selTop,false],[".menuItemBG",null,scheme.selBottom,scheme.selBottom,false],[".menuTextPart",scheme.faint,scheme.faint,scheme.faint,false],[".wizbuttonBG",null,scheme.medium,scheme.medium,true]];for(var i=0;i<gradientRules.length;i++){changeGradientColor(sheet,gradientRules[i][0],gradientRules[i][1],gradientRules[i][2],gradientRules[i][3],gradientRules[i][4])}}function changeGradientColor(sheet,selector,startColor,endColor,solidColor,keepGradient){if(!startColor){startColor="#FAFCFD"}if(!endColor){endColor="#FAFCFD"}if(!solidColor){solidColor="#FAFCFD"}if(hideGradient&&!keepGradient){startColor=solidColor;endColor=solidColor}var newStyle=null;if(_webKit){newStyle="-webkit-gradient(linear, left top, left bottom, from("+startColor+"), to("+endColor+"))";changeCSS(sheet,selector,[BACKGROUND],[newStyle])}else{if(_moz){newStyle="-moz-linear-gradient(top, "+startColor+", "+endColor+")";changeCSS(sheet,selector,[BACKGROUND],[newStyle])}else{if(_ie){newStyle="progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='"+startColor+"', EndColorStr='"+endColor+"')";changeCSS(sheet,selector,[FILTER],[newStyle])}}}}function changeCSS(sheet,selector,elements,values){var numElements=elements.length;if(numElements!=values.length){return}var cssRules=null;if(sheet.rules){cssRules=sheet.rules}else{if(sheet.cssRules){cssRules=sheet.cssRules}else{return}}var newValue="";for(var i=0;i<numElements;i++){newValue+=elements[i]+": "+values[i]+" !important;"}if(sheet.insertRule){sheet.insertRule(selector+" { "+newValue+" }",cssRules.length)}else{if(sheet.addRule){sheet.addRule(selector,newValue)}}}function createScheme(color){var palette=new bobj.crv.ColorPalette(color);return{theme:color,faint:palette.getSpecifiedColor(2,100),light:palette.getModifiedColor(0,-0.5,0.5),medium:palette.getModifiedColor(0,0.01,-0.06),dark:palette.getModifiedColor(0,0.25,-0.15),selTop:palette.getModifiedColor(-19,0.54,0.22),selBottom:palette.getModifiedColor(-18,0.02,0.55),link:palette.getModifiedColor(-14,1,0),visitedLink:palette.getModifiedColor(-14,1,-0.31)}}};if(typeof bobj.crv.themeManager=="undefined"){bobj.crv.themeManager=new bobj.crv.ThemeManager();bobj.crv.themeManager.setThemeColor();bobj.crv.themeManager.setThemeFont()}bobj.crv.newScrollingMenu=function(id,hideCB,beforeShowCB){var UPDATE=MochiKit.Base.update;var o=newMenuWidget(id,hideCB,beforeShowCB);o.initOld=o.init;o.justInTimeInitOld=o.justInTimeInit;o._hasOverflow=false;o._scrollCBIntervalID=null;o.SCROLL_DELTA=4;o.ARROW_HEIGHT=12;UPDATE(o,bobj.crv.ScrollingMenu);return o};bobj.crv.ScrollingMenu={justInTimeInit:function(){var o=this;var bind=MochiKit.Base.bind;var connect=MochiKit.Signal.connect;o.justInTimeInitOld();o.scrollLayer=getLayer(o.id+"_scroll");o.scrollUpLayer=getLayer(o.id+"_scrollUp");o.scrollDownLayer=getLayer(o.id+"_scrollDown");o.scrollUpImageLayer=getLayer(o.id+"_scrollUpArrow");o.scrollDownImageLayer=getLayer(o.id+"_scrollDownArrow");connect(o.scrollUpLayer,"onmouseout",o,o._cancelCallback);connect(o.scrollDownLayer,"onmouseout",o,o._cancelCallback);connect(o.scrollUpLayer,"onmouseover",bind(o._onScroll,o,true));connect(o.scrollDownLayer,"onmouseover",bind(o._onScroll,o,false));connect(o.scrollUpLayer,"onmousedown",o,o._onArrowClick);connect(o.scrollDownLayer,"onmousedown",o,o._onArrowClick);connect(o.scrollLayer,"onscroll",o,o._updateScrolls);connect(window,"onresize",o,o.overflowCB)},beginHTML:function(){var o=this;var imgHTML=imgOffset(bobj.crv.allInOne.uri,8,8,0,bobj.crv.allInOne.menuArrowsDy,this.id+"_scrollUpArrow",null,null,"float:none;");return'<table cellspacing="0" cellpadding="0"><tr id="'+o.id+'_scrollUp" style="height:'+o.ARROW_HEIGHT+'px;"><td class="scrollingMenuArrow" align="center">'+imgHTML+'</td></tr><tr><td><div id="'+o.id+'_scroll" style="position:relative;overflow:hidden;">'},endHTML:function(){var o=this;var imgHTML=imgOffset(bobj.crv.allInOne.uri,8,8,16,bobj.crv.allInOne.menuArrowsDy,this.id+"_scrollDownArrow",null,null,"float:none;");return'</div></td></tr><tr id="'+o.id+'_scrollDown" style="height:'+o.ARROW_HEIGHT+'px;"><td class="scrollingMenuArrow" align="center">'+imgHTML+"</td></tr></table>"},overflowCB:function(){var o=this;o.scrollLayer.style.height="0px";if(o.isShown()){var top=o.layer.offsetTop;var scrollTop=document.body.scrollTop||document.documentElement.scrollTop;top=top-scrollTop;var regHeight=o.scrollLayer.scrollHeight;var newHeight=Math.max(0,winHeight()-top-(2*o.ARROW_HEIGHT)-(bobj.isBorderBoxModel()?2:6));o.scrollLayer.style.height=Math.min(regHeight,newHeight)+"px";o._hasOverflow=newHeight<regHeight;o.scrollLayer.style.marginTop=o._hasOverflow?"1px":"0px";o.scrollLayer.style.marginBottom=o._hasOverflow?"1px":"0px";o.scrollUpLayer.style.display=o._hasOverflow?"":"none";o.scrollDownLayer.style.display=o._hasOverflow?"":"none";if(o.iframeLyr){var w=o.getWidth();var h=o.getHeight();var iCss=o.iframeCss;iCss.width=""+w+"px";iCss.height=""+h+"px";iCss.top=o.css.top;iCss.left=o.css.left}if(!o._hasOverflow){o.scrollLayer.scrollTop=0}else{o._updateScrolls()}}},scroll:function(up){var o=this;if(up){o.scrollLayer.scrollTop-=o.SCROLL_DELTA}else{o.scrollLayer.scrollTop+=o.SCROLL_DELTA}},_updateScrolls:function(){var o=this;if(o._hasOverflow){var scrollTop=o.scrollLayer.scrollTop;if(scrollTop==0){changeOffset(o.scrollUpImageLayer,8,bobj.crv.allInOne.menuArrowsDy)}else{changeOffset(o.scrollUpImageLayer,0,bobj.crv.allInOne.menuArrowsDy)}if(scrollTop+o.scrollLayer.offsetHeight>=o.scrollLayer.scrollHeight){changeOffset(o.scrollDownImageLayer,24,bobj.crv.allInOne.menuArrowsDy)}else{changeOffset(o.scrollDownImageLayer,16,bobj.crv.allInOne.menuArrowsDy)}}},_onArrowClick:function(event){event.stop()},_onScroll:function(up){var o=this;o._scrollCBIntervalID=window.setInterval(MochiKit.Base.bind(o.scroll,o,up),100)},_cancelCallback:function(){var o=this;if(o._scrollCBIntervalID){clearInterval(o._scrollCBIntervalID)}o._scrollCBIntervalID=null}};bobj.swfobject=swfobject;bobj.evalScript=function(scriptText){eval(scriptText)}})();
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de