/usr/share/javascript/timeline_ajax/simile-ajax-bundle.js is in libjs-simile-timeline 2.3.0+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 | SimileAjax.version="pre 2.3.0";SimileAjax.jQuery=jQuery.noConflict(true);if(typeof window["$"]=="undefined"){window.$=SimileAjax.jQuery}SimileAjax.Platform.os={isMac:false,isWin:false,isWin32:false,isUnix:false};SimileAjax.Platform.browser={isIE:false,isNetscape:false,isMozilla:false,isFirefox:false,isOpera:false,isSafari:false,majorVersion:0,minorVersion:0};(function(){var c=navigator.appName.toLowerCase();var a=navigator.userAgent.toLowerCase();SimileAjax.Platform.os.isMac=(a.indexOf("mac")!=-1);SimileAjax.Platform.os.isWin=(a.indexOf("win")!=-1);SimileAjax.Platform.os.isWin32=SimileAjax.Platform.isWin&&(a.indexOf("95")!=-1||a.indexOf("98")!=-1||a.indexOf("nt")!=-1||a.indexOf("win32")!=-1||a.indexOf("32bit")!=-1);SimileAjax.Platform.os.isUnix=(a.indexOf("x11")!=-1);SimileAjax.Platform.browser.isIE=(c.indexOf("microsoft")!=-1);SimileAjax.Platform.browser.isNetscape=(c.indexOf("netscape")!=-1);SimileAjax.Platform.browser.isMozilla=(a.indexOf("mozilla")!=-1);SimileAjax.Platform.browser.isFirefox=(a.indexOf("firefox")!=-1);SimileAjax.Platform.browser.isOpera=(c.indexOf("opera")!=-1);SimileAjax.Platform.browser.isSafari=(c.indexOf("safari")!=-1);var e=function(g){var f=g.split(".");SimileAjax.Platform.browser.majorVersion=parseInt(f[0]);SimileAjax.Platform.browser.minorVersion=parseInt(f[1])};var b=function(h,g,j){var f=h.indexOf(g,j);return f>=0?f:h.length};if(SimileAjax.Platform.browser.isMozilla){var d=a.indexOf("mozilla/");if(d>=0){e(a.substring(d+8,b(a," ",d)))}}if(SimileAjax.Platform.browser.isIE){var d=a.indexOf("msie ");if(d>=0){e(a.substring(d+5,b(a,";",d)))}}if(SimileAjax.Platform.browser.isNetscape){var d=a.indexOf("rv:");if(d>=0){e(a.substring(d+3,b(a,")",d)))}}if(SimileAjax.Platform.browser.isFirefox){var d=a.indexOf("firefox/");if(d>=0){e(a.substring(d+8,b(a," ",d)))}}if(!("localeCompare" in String.prototype)){String.prototype.localeCompare=function(f){if(this<f){return -1}else{if(this>f){return 1}else{return 0}}}}})();SimileAjax.Platform.getDefaultLocale=function(){return SimileAjax.Platform.clientLocale};SimileAjax.ListenerQueue=function(a){this._listeners=[];this._wildcardHandlerName=a};SimileAjax.ListenerQueue.prototype.add=function(a){this._listeners.push(a)};SimileAjax.ListenerQueue.prototype.remove=function(c){var b=this._listeners;for(var a=0;a<b.length;a++){if(b[a]==c){b.splice(a,1);break}}};SimileAjax.ListenerQueue.prototype.fire=function(b,a){var d=[].concat(this._listeners);for(var c=0;c<d.length;c++){var f=d[c];if(b in f){try{f[b].apply(f,a)}catch(g){SimileAjax.Debug.exception("Error firing event of name "+b,g)}}else{if(this._wildcardHandlerName!=null&&this._wildcardHandlerName in f){try{f[this._wildcardHandlerName].apply(f,[b])}catch(g){SimileAjax.Debug.exception("Error firing event of name "+b+" to wildcard handler",g)}}}}};SimileAjax.Set=function(b){this._hash={};this._count=0;if(b instanceof Array){for(var c=0;c<b.length;c++){this.add(b[c])}}else{if(b instanceof SimileAjax.Set){this.addSet(b)}}};SimileAjax.Set.prototype.add=function(a){if(!(a in this._hash)){this._hash[a]=true;this._count++;return true}return false};SimileAjax.Set.prototype.addSet=function(b){for(var a in b._hash){this.add(a)}};SimileAjax.Set.prototype.remove=function(a){if(a in this._hash){delete this._hash[a];this._count--;return true}return false};SimileAjax.Set.prototype.removeSet=function(b){for(var a in b._hash){this.remove(a)}};SimileAjax.Set.prototype.retainSet=function(b){for(var a in this._hash){if(!b.contains(a)){delete this._hash[a];this._count--}}};SimileAjax.Set.prototype.contains=function(a){return(a in this._hash)};SimileAjax.Set.prototype.size=function(){return this._count};SimileAjax.Set.prototype.toArray=function(){var b=[];for(var c in this._hash){b.push(c)}return b};SimileAjax.Set.prototype.visit=function(a){for(var b in this._hash){if(a(b)==true){break}}};SimileAjax.SortedArray=function(b,a){this._a=(a instanceof Array)?a:[];this._compare=b};SimileAjax.SortedArray.prototype.add=function(c){var a=this;var b=this.find(function(d){return a._compare(d,c)});if(b<this._a.length){this._a.splice(b,0,c)}else{this._a.push(c)}};SimileAjax.SortedArray.prototype.remove=function(c){var a=this;var b=this.find(function(d){return a._compare(d,c)});while(b<this._a.length&&this._compare(this._a[b],c)==0){if(this._a[b]==c){this._a.splice(b,1);return true}else{b++}}return false};SimileAjax.SortedArray.prototype.removeAll=function(){this._a=[]};SimileAjax.SortedArray.prototype.elementAt=function(a){return this._a[a]};SimileAjax.SortedArray.prototype.length=function(){return this._a.length};SimileAjax.SortedArray.prototype.find=function(g){var e=0;var d=this._a.length;while(e<d){var f=Math.floor((e+d)/2);var h=g(this._a[f]);if(f==e){return h<0?e+1:e}else{if(h<0){e=f}else{d=f}}}return e};SimileAjax.SortedArray.prototype.getFirst=function(){return(this._a.length>0)?this._a[0]:null};SimileAjax.SortedArray.prototype.getLast=function(){return(this._a.length>0)?this._a[this._a.length-1]:null};SimileAjax.EventIndex=function(b){var a=this;this._unit=(b!=null)?b:SimileAjax.NativeDateUnit;this._events=new SimileAjax.SortedArray(function(d,c){return a._unit.compare(d.getStart(),c.getStart())});this._idToEvent={};this._indexed=true};SimileAjax.EventIndex.prototype.getUnit=function(){return this._unit};SimileAjax.EventIndex.prototype.getEvent=function(a){return this._idToEvent[a]};SimileAjax.EventIndex.prototype.add=function(a){this._events.add(a);this._idToEvent[a.getID()]=a;this._indexed=false};SimileAjax.EventIndex.prototype.removeAll=function(){this._events.removeAll();this._idToEvent={};this._indexed=false};SimileAjax.EventIndex.prototype.getCount=function(){return this._events.length()};SimileAjax.EventIndex.prototype.getIterator=function(a,b){if(!this._indexed){this._index()}return new SimileAjax.EventIndex._Iterator(this._events,a,b,this._unit)};SimileAjax.EventIndex.prototype.getReverseIterator=function(a,b){if(!this._indexed){this._index()}return new SimileAjax.EventIndex._ReverseIterator(this._events,a,b,this._unit)};SimileAjax.EventIndex.prototype.getAllIterator=function(){return new SimileAjax.EventIndex._AllIterator(this._events)};SimileAjax.EventIndex.prototype.getEarliestDate=function(){var a=this._events.getFirst();return(a==null)?null:a.getStart()};SimileAjax.EventIndex.prototype.getLatestDate=function(){var a=this._events.getLast();if(a==null){return null}if(!this._indexed){this._index()}var c=a._earliestOverlapIndex;var b=this._events.elementAt(c).getEnd();for(var d=c+1;d<this._events.length();d++){b=this._unit.later(b,this._events.elementAt(d).getEnd())}return b};SimileAjax.EventIndex.prototype._index=function(){var d=this._events.length();for(var e=0;e<d;e++){var c=this._events.elementAt(e);c._earliestOverlapIndex=e}var g=1;for(var e=0;e<d;e++){var c=this._events.elementAt(e);var b=c.getEnd();g=Math.max(g,e+1);while(g<d){var a=this._events.elementAt(g);var f=a.getStart();if(this._unit.compare(f,b)<0){a._earliestOverlapIndex=e;g++}else{break}}}this._indexed=true};SimileAjax.EventIndex._Iterator=function(b,a,d,c){this._events=b;this._startDate=a;this._endDate=d;this._unit=c;this._currentIndex=b.find(function(e){return c.compare(e.getStart(),a)});if(this._currentIndex-1>=0){this._currentIndex=this._events.elementAt(this._currentIndex-1)._earliestOverlapIndex}this._currentIndex--;this._maxIndex=b.find(function(e){return c.compare(e.getStart(),d)});this._hasNext=false;this._next=null;this._findNext()};SimileAjax.EventIndex._Iterator.prototype={hasNext:function(){return this._hasNext},next:function(){if(this._hasNext){var a=this._next;this._findNext();return a}else{return null}},_findNext:function(){var b=this._unit;while((++this._currentIndex)<this._maxIndex){var a=this._events.elementAt(this._currentIndex);if(b.compare(a.getStart(),this._endDate)<0&&b.compare(a.getEnd(),this._startDate)>0){this._next=a;this._hasNext=true;return}}this._next=null;this._hasNext=false}};SimileAjax.EventIndex._ReverseIterator=function(b,a,d,c){this._events=b;this._startDate=a;this._endDate=d;this._unit=c;this._minIndex=b.find(function(e){return c.compare(e.getStart(),a)});if(this._minIndex-1>=0){this._minIndex=this._events.elementAt(this._minIndex-1)._earliestOverlapIndex}this._maxIndex=b.find(function(e){return c.compare(e.getStart(),d)});this._currentIndex=this._maxIndex;this._hasNext=false;this._next=null;this._findNext()};SimileAjax.EventIndex._ReverseIterator.prototype={hasNext:function(){return this._hasNext},next:function(){if(this._hasNext){var a=this._next;this._findNext();return a}else{return null}},_findNext:function(){var b=this._unit;while((--this._currentIndex)>=this._minIndex){var a=this._events.elementAt(this._currentIndex);if(b.compare(a.getStart(),this._endDate)<0&&b.compare(a.getEnd(),this._startDate)>0){this._next=a;this._hasNext=true;return}}this._next=null;this._hasNext=false}};SimileAjax.EventIndex._AllIterator=function(a){this._events=a;this._index=0};SimileAjax.EventIndex._AllIterator.prototype={hasNext:function(){return this._index<this._events.length()},next:function(){return this._index<this._events.length()?this._events.elementAt(this._index++):null}};SimileAjax.DateTime=new Object();SimileAjax.DateTime.MILLISECOND=0;SimileAjax.DateTime.SECOND=1;SimileAjax.DateTime.MINUTE=2;SimileAjax.DateTime.HOUR=3;SimileAjax.DateTime.DAY=4;SimileAjax.DateTime.WEEK=5;SimileAjax.DateTime.MONTH=6;SimileAjax.DateTime.YEAR=7;SimileAjax.DateTime.DECADE=8;SimileAjax.DateTime.CENTURY=9;SimileAjax.DateTime.MILLENNIUM=10;SimileAjax.DateTime.EPOCH=-1;SimileAjax.DateTime.ERA=-2;SimileAjax.DateTime.gregorianUnitLengths=[];(function(){var c=SimileAjax.DateTime;var b=c.gregorianUnitLengths;b[c.MILLISECOND]=1;b[c.SECOND]=1000;b[c.MINUTE]=b[c.SECOND]*60;b[c.HOUR]=b[c.MINUTE]*60;b[c.DAY]=b[c.HOUR]*24;b[c.WEEK]=b[c.DAY]*7;b[c.MONTH]=b[c.DAY]*31;b[c.YEAR]=b[c.DAY]*365;b[c.DECADE]=b[c.YEAR]*10;b[c.CENTURY]=b[c.YEAR]*100;b[c.MILLENNIUM]=b[c.YEAR]*1000})();SimileAjax.DateTime._dateRegexp=new RegExp("^(-?)([0-9]{4})("+["(-?([0-9]{2})(-?([0-9]{2}))?)","(-?([0-9]{3}))","(-?W([0-9]{2})(-?([1-7]))?)"].join("|")+")?$");SimileAjax.DateTime._timezoneRegexp=new RegExp("Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$");SimileAjax.DateTime._timeRegexp=new RegExp("^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(.([0-9]+))?)?)?$");SimileAjax.DateTime.setIso8601Date=function(i,g){var j=g.match(SimileAjax.DateTime._dateRegexp);if(!j){throw new Error("Invalid date string: "+g)}var b=(j[1]=="-")?-1:1;var k=b*j[2];var h=j[5];var c=j[7];var f=j[9];var a=j[11];var o=(j[13])?j[13]:1;i.setUTCFullYear(k);if(f){i.setUTCMonth(0);i.setUTCDate(Number(f))}else{if(a){i.setUTCMonth(0);i.setUTCDate(1);var m=i.getUTCDay();var l=(m)?m:7;var e=Number(o)+(7*Number(a));if(l<=4){i.setUTCDate(e+1-l)}else{i.setUTCDate(e+8-l)}}else{if(h){i.setUTCDate(1);i.setUTCMonth(h-1)}if(c){i.setUTCDate(c)}}}return i};SimileAjax.DateTime.setIso8601Time=function(g,c){var h=c.match(SimileAjax.DateTime._timeRegexp);if(!h){SimileAjax.Debug.warn("Invalid time string: "+c);return false}var a=h[1];var f=Number((h[3])?h[3]:0);var e=(h[5])?h[5]:0;var b=h[7]?(Number("0."+h[7])*1000):0;g.setUTCHours(a);g.setUTCMinutes(f);g.setUTCSeconds(e);g.setUTCMilliseconds(b);return g};SimileAjax.DateTime.timezoneOffset=new Date().getTimezoneOffset();SimileAjax.DateTime.setIso8601=function(b,a){var e=null;var f=(a.indexOf("T")==-1)?a.split(" "):a.split("T");SimileAjax.DateTime.setIso8601Date(b,f[0]);if(f.length==2){var c=f[1].match(SimileAjax.DateTime._timezoneRegexp);if(c){if(c[0]=="Z"){e=0}else{e=(Number(c[3])*60)+Number(c[5]);e*=((c[2]=="-")?1:-1)}f[1]=f[1].substr(0,f[1].length-c[0].length)}SimileAjax.DateTime.setIso8601Time(b,f[1])}if(e==null){e=b.getTimezoneOffset()}b.setTime(b.getTime()+e*60000);return b};SimileAjax.DateTime.parseIso8601DateTime=function(a){try{return SimileAjax.DateTime.setIso8601(new Date(0),a)}catch(b){return null}};SimileAjax.DateTime.parseGregorianDateTime=function(i){if(i==null){return null}else{if(i instanceof Date){return i}}var b=i.toString();if(b.length>0&&b.length<8){var c=b.indexOf(" ");if(c>0){var a=parseInt(b.substr(0,c));var g=b.substr(c+1);if(g.toLowerCase()=="bc"){a=1-a}}else{var a=parseInt(b)}var h=new Date(0);h.setUTCFullYear(a);return h}try{return new Date(Date.parse(b))}catch(f){return null}};SimileAjax.DateTime.roundDownToInterval=function(b,h,k,l,a){var e=k*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.HOUR];var j=new Date(b.getTime()+e);var f=function(m){m.setUTCMilliseconds(0);m.setUTCSeconds(0);m.setUTCMinutes(0);m.setUTCHours(0)};var c=function(m){f(m);m.setUTCDate(1);m.setUTCMonth(0)};switch(h){case SimileAjax.DateTime.MILLISECOND:var i=j.getUTCMilliseconds();j.setUTCMilliseconds(i-(i%l));break;case SimileAjax.DateTime.SECOND:j.setUTCMilliseconds(0);var i=j.getUTCSeconds();j.setUTCSeconds(i-(i%l));break;case SimileAjax.DateTime.MINUTE:j.setUTCMilliseconds(0);j.setUTCSeconds(0);var i=j.getUTCMinutes();j.setTime(j.getTime()-(i%l)*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.MINUTE]);break;case SimileAjax.DateTime.HOUR:j.setUTCMilliseconds(0);j.setUTCSeconds(0);j.setUTCMinutes(0);var i=j.getUTCHours();j.setUTCHours(i-(i%l));break;case SimileAjax.DateTime.DAY:f(j);break;case SimileAjax.DateTime.WEEK:f(j);var g=(j.getUTCDay()+7-a)%7;j.setTime(j.getTime()-g*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.DAY]);break;case SimileAjax.DateTime.MONTH:f(j);j.setUTCDate(1);var i=j.getUTCMonth();j.setUTCMonth(i-(i%l));break;case SimileAjax.DateTime.YEAR:c(j);var i=j.getUTCFullYear();j.setUTCFullYear(i-(i%l));break;case SimileAjax.DateTime.DECADE:c(j);j.setUTCFullYear(Math.floor(j.getUTCFullYear()/10)*10);break;case SimileAjax.DateTime.CENTURY:c(j);j.setUTCFullYear(Math.floor(j.getUTCFullYear()/100)*100);break;case SimileAjax.DateTime.MILLENNIUM:c(j);j.setUTCFullYear(Math.floor(j.getUTCFullYear()/1000)*1000);break}b.setTime(j.getTime()-e)};SimileAjax.DateTime.roundUpToInterval=function(d,f,c,a,b){var e=d.getTime();SimileAjax.DateTime.roundDownToInterval(d,f,c,a,b);if(d.getTime()<e){d.setTime(d.getTime()+SimileAjax.DateTime.gregorianUnitLengths[f]*a)}};SimileAjax.DateTime.incrementByInterval=function(b,e,a){a=(typeof a=="undefined")?0:a;var d=a*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.HOUR];var c=new Date(b.getTime()+d);switch(e){case SimileAjax.DateTime.MILLISECOND:c.setTime(c.getTime()+1);break;case SimileAjax.DateTime.SECOND:c.setTime(c.getTime()+1000);break;case SimileAjax.DateTime.MINUTE:c.setTime(c.getTime()+SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.MINUTE]);break;case SimileAjax.DateTime.HOUR:c.setTime(c.getTime()+SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.HOUR]);break;case SimileAjax.DateTime.DAY:c.setUTCDate(c.getUTCDate()+1);break;case SimileAjax.DateTime.WEEK:c.setUTCDate(c.getUTCDate()+7);break;case SimileAjax.DateTime.MONTH:c.setUTCMonth(c.getUTCMonth()+1);break;case SimileAjax.DateTime.YEAR:c.setUTCFullYear(c.getUTCFullYear()+1);break;case SimileAjax.DateTime.DECADE:c.setUTCFullYear(c.getUTCFullYear()+10);break;case SimileAjax.DateTime.CENTURY:c.setUTCFullYear(c.getUTCFullYear()+100);break;case SimileAjax.DateTime.MILLENNIUM:c.setUTCFullYear(c.getUTCFullYear()+1000);break}b.setTime(c.getTime()-d)};SimileAjax.DateTime.removeTimeZoneOffset=function(b,a){return new Date(b.getTime()+a*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.HOUR])};SimileAjax.DateTime.getTimezone=function(){var a=new Date().getTimezoneOffset();return a/-60};SimileAjax.Debug={silent:false};SimileAjax.Debug.log=function(b){var a;if("console" in window&&"log" in window.console){a=function(c){console.log(c)}}else{a=function(c){if(!SimileAjax.Debug.silent){alert(c)}}}SimileAjax.Debug.log=a;a(b)};SimileAjax.Debug.warn=function(b){var a;if("console" in window&&"warn" in window.console){a=function(c){console.warn(c)}}else{a=function(c){if(!SimileAjax.Debug.silent){alert(c)}}}SimileAjax.Debug.warn=a;a(b)};SimileAjax.Debug.exception=function(b,d){var a,c=SimileAjax.parseURLParameters();if(c.errors=="throw"||SimileAjax.params.errors=="throw"){a=function(f,e){throw (f)}}else{if("console" in window&&"error" in window.console){a=function(f,e){if(e!=null){console.error(e+" %o",f)}else{console.error(f)}throw (f)}}else{a=function(f,e){if(!SimileAjax.Debug.silent){alert("Caught exception: "+e+"\n\nDetails: "+("description" in f?f.description:f))}throw (f)}}}SimileAjax.Debug.exception=a;a(b,d)};SimileAjax.Debug.objectToString=function(a){return SimileAjax.Debug._objectToString(a,"")};SimileAjax.Debug._objectToString=function(d,a){var c=a+" ";if(typeof d=="object"){var b="{";for(e in d){b+=c+e+": "+SimileAjax.Debug._objectToString(d[e],c)+"\n"}b+=a+"}";return b}else{if(typeof d=="array"){var b="[";for(var e=0;e<d.length;e++){b+=SimileAjax.Debug._objectToString(d[e],c)+"\n"}b+=a+"]";return b}else{return d}}};SimileAjax.DOM=new Object();SimileAjax.DOM.registerEventWithObject=function(c,a,d,b){SimileAjax.DOM.registerEvent(c,a,function(f,e,g){return d[b].call(d,f,e,g)})};SimileAjax.DOM.registerEvent=function(c,b,d){var a=function(e){e=(e)?e:((event)?event:null);if(e){var f=(e.target)?e.target:((e.srcElement)?e.srcElement:null);if(f){f=(f.nodeType==1||f.nodeType==9)?f:f.parentNode}return d(c,e,f)}return true};if(SimileAjax.Platform.browser.isIE){c.attachEvent("on"+b,a)}else{c.addEventListener(b,a,false)}};SimileAjax.DOM.getPageCoordinates=function(b){var e=0;var d=0;if(b.nodeType!=1){b=b.parentNode}var c=b;while(c!=null){e+=c.offsetLeft;d+=c.offsetTop;c=c.offsetParent}var a=document.body;while(b!=null&&b!=a){if("scrollLeft" in b){e-=b.scrollLeft;d-=b.scrollTop}b=b.parentNode}return{left:e,top:d}};SimileAjax.DOM.getSize=function(b){var a=this.getStyle(b,"width");var c=this.getStyle(b,"height");if(a.indexOf("px")>-1){a=a.replace("px","")}if(c.indexOf("px")>-1){c=c.replace("px","")}return{w:a,h:c}};SimileAjax.DOM.getStyle=function(b,a){if(b.currentStyle){var c=b.currentStyle[a]}else{if(window.getComputedStyle){var c=document.defaultView.getComputedStyle(b,null).getPropertyValue(a)}else{var c=""}}return c};SimileAjax.DOM.getEventRelativeCoordinates=function(a,b){if(SimileAjax.Platform.browser.isIE){if(a.type=="mousewheel"){var c=SimileAjax.DOM.getPageCoordinates(b);return{x:a.clientX-c.left,y:a.clientY-c.top}}else{return{x:a.offsetX,y:a.offsetY}}}else{var c=SimileAjax.DOM.getPageCoordinates(b);if((a.type=="DOMMouseScroll")&&SimileAjax.Platform.browser.isFirefox&&(SimileAjax.Platform.browser.majorVersion==2)){return{x:a.screenX-c.left,y:a.screenY-c.top}}else{return{x:a.pageX-c.left,y:a.pageY-c.top}}}};SimileAjax.DOM.getEventPageCoordinates=function(a){if(SimileAjax.Platform.browser.isIE){return{x:a.clientX+document.body.scrollLeft,y:a.clientY+document.body.scrollTop}}else{return{x:a.pageX,y:a.pageY}}};SimileAjax.DOM.hittest=function(a,c,b){return SimileAjax.DOM._hittest(document.body,a,c,b)};SimileAjax.DOM._hittest=function(c,o,m,h){var p=c.childNodes;outer:for(var g=0;g<p.length;g++){var a=p[g];for(var f=0;f<h.length;f++){if(a==h[f]){continue outer}}if(a.offsetWidth==0&&a.offsetHeight==0){var b=SimileAjax.DOM._hittest(a,o,m,h);if(b!=a){return b}}else{var l=0;var e=0;var d=a;while(d){l+=d.offsetTop;e+=d.offsetLeft;d=d.offsetParent}if(e<=o&&l<=m&&(o-e)<a.offsetWidth&&(m-l)<a.offsetHeight){return SimileAjax.DOM._hittest(a,o,m,h)}else{if(a.nodeType==1&&a.tagName=="TR"){var k=SimileAjax.DOM._hittest(a,o,m,h);if(k!=a){return k}}}}}return c};SimileAjax.DOM.cancelEvent=function(a){a.returnValue=false;a.cancelBubble=true;if("preventDefault" in a){a.preventDefault()}};SimileAjax.DOM.appendClassName=function(c,d){var b=c.className.split(" ");for(var a=0;a<b.length;a++){if(b[a]==d){return}}b.push(d);c.className=b.join(" ")};SimileAjax.DOM.createInputElement=function(a){var b=document.createElement("div");b.innerHTML="<input type='"+a+"' />";return b.firstChild};SimileAjax.DOM.createDOMFromTemplate=function(b){var a={};a.elmt=SimileAjax.DOM._createDOMFromTemplate(b,a,null);return a};SimileAjax.DOM._createDOMFromTemplate=function(a,j,e){if(a==null){return null}else{if(typeof a!="object"){var d=document.createTextNode(a);if(e!=null){e.appendChild(d)}return d}else{var c=null;if("tag" in a){var k=a.tag;if(e!=null){if(k=="tr"){c=e.insertRow(e.rows.length)}else{if(k=="td"){c=e.insertCell(e.cells.length)}}}if(c==null){c=k=="input"?SimileAjax.DOM.createInputElement(a.type):document.createElement(k);if(e!=null){e.appendChild(c)}}}else{c=a.elmt;if(e!=null){e.appendChild(c)}}for(var b in a){var g=a[b];if(b=="field"){j[g]=c}else{if(b=="className"){c.className=g}else{if(b=="id"){c.id=g}else{if(b=="title"){c.title=g}else{if(b=="type"&&c.tagName=="input"){}else{if(b=="style"){for(n in g){var h=g[n];if(n=="float"){n=SimileAjax.Platform.browser.isIE?"styleFloat":"cssFloat"}c.style[n]=h}}else{if(b=="children"){for(var f=0;f<g.length;f++){SimileAjax.DOM._createDOMFromTemplate(g[f],j,c)}}else{if(b!="tag"&&b!="elmt"){c.setAttribute(b,g)}}}}}}}}}return c}}};SimileAjax.DOM._cachedParent=null;SimileAjax.DOM.createElementFromString=function(a){if(SimileAjax.DOM._cachedParent==null){SimileAjax.DOM._cachedParent=document.createElement("div")}SimileAjax.DOM._cachedParent.innerHTML=a;return SimileAjax.DOM._cachedParent.firstChild};SimileAjax.DOM.createDOMFromString=function(a,c,d){var b=typeof a=="string"?document.createElement(a):a;b.innerHTML=c;var e={elmt:b};SimileAjax.DOM._processDOMChildrenConstructedFromString(e,b,d!=null?d:{});return e};SimileAjax.DOM._processDOMConstructedFromString=function(d,a,b){var e=a.id;if(e!=null&&e.length>0){a.removeAttribute("id");if(e in b){var c=a.parentNode;c.insertBefore(b[e],a);c.removeChild(a);d[e]=b[e];return}else{d[e]=a}}if(a.hasChildNodes()){SimileAjax.DOM._processDOMChildrenConstructedFromString(d,a,b)}};SimileAjax.DOM._processDOMChildrenConstructedFromString=function(e,b,d){var c=b.firstChild;while(c!=null){var a=c.nextSibling;if(c.nodeType==1){SimileAjax.DOM._processDOMConstructedFromString(e,c,d)}c=a}};SimileAjax.Graphics=new Object();SimileAjax.Graphics.pngIsTranslucent=(!SimileAjax.Platform.browser.isIE)||(SimileAjax.Platform.browser.majorVersion>6);if(!SimileAjax.Graphics.pngIsTranslucent){SimileAjax.includeCssFile(document,SimileAjax.urlPrefix+"styles/graphics-ie6.css")}SimileAjax.Graphics._createTranslucentImage1=function(a,c){var b=document.createElement("img");b.setAttribute("src",a);if(c!=null){b.style.verticalAlign=c}return b};SimileAjax.Graphics._createTranslucentImage2=function(a,c){var b=document.createElement("img");b.style.width="1px";b.style.height="1px";b.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+a+"', sizingMethod='image')";b.style.verticalAlign=(c!=null)?c:"middle";return b};SimileAjax.Graphics.createTranslucentImage=SimileAjax.Graphics.pngIsTranslucent?SimileAjax.Graphics._createTranslucentImage1:SimileAjax.Graphics._createTranslucentImage2;SimileAjax.Graphics._createTranslucentImageHTML1=function(a,b){return'<img src="'+a+'"'+(b!=null?' style="vertical-align: '+b+';"':"")+" />"};SimileAjax.Graphics._createTranslucentImageHTML2=function(a,c){var b="width: 1px; height: 1px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+a+"', sizingMethod='image');"+(c!=null?" vertical-align: "+c+";":"");return"<img src='"+a+"' style=\""+b+'" />'};SimileAjax.Graphics.createTranslucentImageHTML=SimileAjax.Graphics.pngIsTranslucent?SimileAjax.Graphics._createTranslucentImageHTML1:SimileAjax.Graphics._createTranslucentImageHTML2;SimileAjax.Graphics.setOpacity=function(b,a){if(SimileAjax.Platform.browser.isIE){b.style.filter="progid:DXImageTransform.Microsoft.Alpha(Style=0,Opacity="+a+")"}else{var c=(a/100).toString();b.style.opacity=c;b.style.MozOpacity=c}};SimileAjax.Graphics.bubbleConfig={containerCSSClass:"simileAjax-bubble-container",innerContainerCSSClass:"simileAjax-bubble-innerContainer",contentContainerCSSClass:"simileAjax-bubble-contentContainer",borderGraphicSize:50,borderGraphicCSSClassPrefix:"simileAjax-bubble-border-",arrowGraphicTargetOffset:33,arrowGraphicLength:100,arrowGraphicWidth:49,arrowGraphicCSSClassPrefix:"simileAjax-bubble-arrow-",closeGraphicCSSClass:"simileAjax-bubble-close",extraPadding:20};SimileAjax.Graphics.createBubbleForContentAndPoint=function(f,d,c,a,b,e){if(typeof a!="number"){a=300}if(typeof e!="number"){e=0}f.style.position="absolute";f.style.left="-5000px";f.style.top="0px";f.style.width=a+"px";document.body.appendChild(f);window.setTimeout(function(){var j=f.scrollWidth+10;var g=f.scrollHeight+10;var i=0;if(e>0&&g>e){g=e;i=j-25}var h=SimileAjax.Graphics.createBubbleForPoint(d,c,j,g,b);document.body.removeChild(f);f.style.position="static";f.style.left="";f.style.top="";if(i>0){var k=document.createElement("div");f.style.width="";k.style.width=i+"px";k.appendChild(f);h.content.appendChild(k)}else{f.style.width=j+"px";h.content.appendChild(f)}},200)};SimileAjax.Graphics.createBubbleForPoint=function(b,a,k,m,d){k=parseInt(k,10);m=parseInt(m,10);var e=SimileAjax.Graphics.bubbleConfig;var o=SimileAjax.Graphics.pngIsTranslucent?"pngTranslucent":"pngNotTranslucent";var l=k+2*e.borderGraphicSize;var q=m+2*e.borderGraphicSize;var p=function(t){return t+" "+t+"-"+o};var h=document.createElement("div");h.className=p(e.containerCSSClass);h.style.width=k+"px";h.style.height=m+"px";var f=document.createElement("div");f.className=p(e.innerContainerCSSClass);h.appendChild(f);var i=function(){if(!j._closed){document.body.removeChild(j._div);j._doc=null;j._div=null;j._content=null;j._closed=true}};var j={_closed:false};var s=SimileAjax.WindowManager.pushLayer(i,true,h);j._div=h;j.close=function(){SimileAjax.WindowManager.popLayer(s)};var g=function(u){var t=document.createElement("div");t.className=p(e.borderGraphicCSSClassPrefix+u);f.appendChild(t)};g("top-left");g("top-right");g("bottom-left");g("bottom-right");g("left");g("right");g("top");g("bottom");var c=document.createElement("div");c.className=p(e.contentContainerCSSClass);f.appendChild(c);j.content=c;var r=document.createElement("div");r.className=p(e.closeGraphicCSSClass);f.appendChild(r);SimileAjax.WindowManager.registerEventWithObject(r,"click",j,"close");(function(){var A=SimileAjax.Graphics.getWindowDimensions();var v=A.w;var t=A.h;var w=Math.ceil(e.arrowGraphicWidth/2);var z=function(B){var C=document.createElement("div");C.className=p(e.arrowGraphicCSSClassPrefix+"point-"+B);f.appendChild(C);return C};if(b-w-e.borderGraphicSize-e.extraPadding>0&&b+w+e.borderGraphicSize+e.extraPadding<v){var y=b-Math.round(k/2);y=b<(v/2)?Math.max(y,e.extraPadding+e.borderGraphicSize):Math.min(y,v-e.extraPadding-e.borderGraphicSize-k);if((d&&d=="top")||(!d&&(a-e.arrowGraphicTargetOffset-m-e.borderGraphicSize-e.extraPadding>0))){var u=z("down");u.style.left=(b-w-y)+"px";h.style.left=y+"px";h.style.top=(a-e.arrowGraphicTargetOffset-m)+"px";return}else{if((d&&d=="bottom")||(!d&&(a+e.arrowGraphicTargetOffset+m+e.borderGraphicSize+e.extraPadding<t))){var u=z("up");u.style.left=(b-w-y)+"px";h.style.left=y+"px";h.style.top=(a+e.arrowGraphicTargetOffset)+"px";return}}}var x=a-Math.round(m/2);x=a<(t/2)?Math.max(x,e.extraPadding+e.borderGraphicSize):Math.min(x,t-e.extraPadding-e.borderGraphicSize-m);if((d&&d=="left")||(!d&&(b-e.arrowGraphicTargetOffset-k-e.borderGraphicSize-e.extraPadding>0))){var u=z("right");u.style.top=(a-w-x)+"px";h.style.top=x+"px";h.style.left=(b-e.arrowGraphicTargetOffset-k)+"px"}else{var u=z("left");u.style.top=(a-w-x)+"px";h.style.top=x+"px";h.style.left=(b+e.arrowGraphicTargetOffset)+"px"}})();document.body.appendChild(h);return j};SimileAjax.Graphics.getWindowDimensions=function(){if(typeof window.innerHeight=="number"){return{w:window.innerWidth,h:window.innerHeight}}else{if(document.documentElement&&document.documentElement.clientHeight){return{w:document.documentElement.clientWidth,h:document.documentElement.clientHeight}}else{if(document.body&&document.body.clientHeight){return{w:document.body.clientWidth,h:document.body.clientHeight}}}}};SimileAjax.Graphics.createMessageBubble=function(h){var g=h.createElement("div");if(SimileAjax.Graphics.pngIsTranslucent){var i=h.createElement("div");i.style.height="33px";i.style.background="url("+SimileAjax.urlPrefix+"images/message-top-left.png) top left no-repeat";i.style.paddingLeft="44px";g.appendChild(i);var c=h.createElement("div");c.style.height="33px";c.style.background="url("+SimileAjax.urlPrefix+"images/message-top-right.png) top right no-repeat";i.appendChild(c);var f=h.createElement("div");f.style.background="url("+SimileAjax.urlPrefix+"images/message-left.png) top left repeat-y";f.style.paddingLeft="44px";g.appendChild(f);var a=h.createElement("div");a.style.background="url("+SimileAjax.urlPrefix+"images/message-right.png) top right repeat-y";a.style.paddingRight="44px";f.appendChild(a);var d=h.createElement("div");a.appendChild(d);var b=h.createElement("div");b.style.height="55px";b.style.background="url("+SimileAjax.urlPrefix+"images/message-bottom-left.png) bottom left no-repeat";b.style.paddingLeft="44px";g.appendChild(b);var e=h.createElement("div");e.style.height="55px";e.style.background="url("+SimileAjax.urlPrefix+"images/message-bottom-right.png) bottom right no-repeat";b.appendChild(e)}else{g.style.border="2px solid #7777AA";g.style.padding="20px";g.style.background="white";SimileAjax.Graphics.setOpacity(g,90);var d=h.createElement("div");g.appendChild(d)}return{containerDiv:g,contentDiv:d}};SimileAjax.Graphics.createAnimation=function(b,e,d,c,a){return new SimileAjax.Graphics._Animation(b,e,d,c,a)};SimileAjax.Graphics._Animation=function(b,e,d,c,a){this.f=b;this.cont=(typeof a=="function")?a:function(){};this.from=e;this.to=d;this.current=e;this.duration=c;this.start=new Date().getTime();this.timePassed=0};SimileAjax.Graphics._Animation.prototype.run=function(){var b=this;window.setTimeout(function(){b.step()},50)};SimileAjax.Graphics._Animation.prototype.step=function(){this.timePassed+=50;var b=this.timePassed/this.duration;var a=-Math.cos(b*Math.PI)/2+0.5;var d=a*(this.to-this.from)+this.from;try{this.f(d,d-this.current)}catch(c){}this.current=d;if(this.timePassed<this.duration){this.run()}else{this.f(this.to,0);this["cont"]()}};SimileAjax.Graphics.createStructuredDataCopyButton=function(f,d,a,e){var g=document.createElement("div");g.style.position="relative";g.style.display="inline";g.style.width=d+"px";g.style.height=a+"px";g.style.overflow="hidden";g.style.margin="2px";if(SimileAjax.Graphics.pngIsTranslucent){g.style.background="url("+f+") no-repeat"}else{g.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+f+"', sizingMethod='image')"}var c;if(SimileAjax.Platform.browser.isIE){c="filter:alpha(opacity=0)"}else{c="opacity: 0"}g.innerHTML="<textarea rows='1' autocomplete='off' value='none' style='"+c+"' />";var b=g.firstChild;b.style.width=d+"px";b.style.height=a+"px";b.onmousedown=function(h){h=(h)?h:((event)?event:null);if(h.button==2){b.value=e();b.select()}};return g};SimileAjax.Graphics.getWidthHeight=function(c){var a,b;if(c.getBoundingClientRect==null){a=c.offsetWidth;b=c.offsetHeight}else{var d=c.getBoundingClientRect();a=Math.ceil(d.right-d.left);b=Math.ceil(d.bottom-d.top)}return{width:a,height:b}};SimileAjax.Graphics.getFontRenderingContext=function(a,b){return new SimileAjax.Graphics._FontRenderingContext(a,b)};SimileAjax.Graphics._FontRenderingContext=function(a,b){this._elmt=a;this._elmt.style.visibility="hidden";if(typeof b=="string"){this._elmt.style.width=b}else{if(typeof b=="number"){this._elmt.style.width=b+"px"}}};SimileAjax.Graphics._FontRenderingContext.prototype.dispose=function(){this._elmt=null};SimileAjax.Graphics._FontRenderingContext.prototype.update=function(){this._elmt.innerHTML="A";this._lineHeight=this._elmt.offsetHeight};SimileAjax.Graphics._FontRenderingContext.prototype.computeSize=function(d,c){var b=this._elmt;b.innerHTML=d;b.className=c===undefined?"":c;var a=SimileAjax.Graphics.getWidthHeight(b);b.className="";return a};SimileAjax.Graphics._FontRenderingContext.prototype.getLineHeight=function(){return this._lineHeight};SimileAjax.History={maxHistoryLength:10,historyFile:"__history__.html",enabled:true,_initialized:false,_listeners:new SimileAjax.ListenerQueue(),_actions:[],_baseIndex:0,_currentIndex:0,_plainDocumentTitle:document.title};SimileAjax.History.formatHistoryEntryTitle=function(a){return SimileAjax.History._plainDocumentTitle+" {"+a+"}"};SimileAjax.History.initialize=function(){if(SimileAjax.History._initialized){return}if(SimileAjax.History.enabled){var a=document.createElement("iframe");a.id="simile-ajax-history";a.style.position="absolute";a.style.width="10px";a.style.height="10px";a.style.top="0px";a.style.left="0px";a.style.visibility="hidden";a.src=SimileAjax.History.historyFile+"?0";document.body.appendChild(a);SimileAjax.DOM.registerEvent(a,"load",SimileAjax.History._handleIFrameOnLoad);SimileAjax.History._iframe=a}SimileAjax.History._initialized=true};SimileAjax.History.addListener=function(a){SimileAjax.History.initialize();SimileAjax.History._listeners.add(a)};SimileAjax.History.removeListener=function(a){SimileAjax.History.initialize();SimileAjax.History._listeners.remove(a)};SimileAjax.History.addAction=function(a){SimileAjax.History.initialize();SimileAjax.History._listeners.fire("onBeforePerform",[a]);window.setTimeout(function(){try{a.perform();SimileAjax.History._listeners.fire("onAfterPerform",[a]);if(SimileAjax.History.enabled){SimileAjax.History._actions=SimileAjax.History._actions.slice(0,SimileAjax.History._currentIndex-SimileAjax.History._baseIndex);SimileAjax.History._actions.push(a);SimileAjax.History._currentIndex++;var c=SimileAjax.History._actions.length-SimileAjax.History.maxHistoryLength;if(c>0){SimileAjax.History._actions=SimileAjax.History._actions.slice(c);SimileAjax.History._baseIndex+=c}try{SimileAjax.History._iframe.contentWindow.location.search="?"+SimileAjax.History._currentIndex}catch(b){var d=SimileAjax.History.formatHistoryEntryTitle(a.label);document.title=d}}}catch(b){SimileAjax.Debug.exception(b,"Error adding action {"+a.label+"} to history")}},0)};SimileAjax.History.addLengthyAction=function(c,a,b){SimileAjax.History.addAction({perform:c,undo:a,label:b,uiLayer:SimileAjax.WindowManager.getBaseLayer(),lengthy:true})};SimileAjax.History._handleIFrameOnLoad=function(){try{var b=SimileAjax.History._iframe.contentWindow.location.search;var h=(b.length==0)?0:Math.max(0,parseInt(b.substr(1)));var g=function(){var c=h-SimileAjax.History._currentIndex;SimileAjax.History._currentIndex+=c;SimileAjax.History._baseIndex+=c;SimileAjax.History._iframe.contentWindow.location.search="?"+h};if(h<SimileAjax.History._currentIndex){SimileAjax.History._listeners.fire("onBeforeUndoSeveral",[]);window.setTimeout(function(){while(SimileAjax.History._currentIndex>h&&SimileAjax.History._currentIndex>SimileAjax.History._baseIndex){SimileAjax.History._currentIndex--;var c=SimileAjax.History._actions[SimileAjax.History._currentIndex-SimileAjax.History._baseIndex];try{c.undo()}catch(i){SimileAjax.Debug.exception(i,"History: Failed to undo action {"+c.label+"}")}}SimileAjax.History._listeners.fire("onAfterUndoSeveral",[]);g()},0)}else{if(h>SimileAjax.History._currentIndex){SimileAjax.History._listeners.fire("onBeforeRedoSeveral",[]);window.setTimeout(function(){while(SimileAjax.History._currentIndex<h&&SimileAjax.History._currentIndex-SimileAjax.History._baseIndex<SimileAjax.History._actions.length){var c=SimileAjax.History._actions[SimileAjax.History._currentIndex-SimileAjax.History._baseIndex];try{c.perform()}catch(i){SimileAjax.Debug.exception(i,"History: Failed to redo action {"+c.label+"}")}SimileAjax.History._currentIndex++}SimileAjax.History._listeners.fire("onAfterRedoSeveral",[]);g()},0)}else{var a=SimileAjax.History._currentIndex-SimileAjax.History._baseIndex-1;var f=(a>=0&&a<SimileAjax.History._actions.length)?SimileAjax.History.formatHistoryEntryTitle(SimileAjax.History._actions[a].label):SimileAjax.History._plainDocumentTitle;SimileAjax.History._iframe.contentWindow.document.title=f;document.title=f}}}catch(d){}};SimileAjax.History.getNextUndoAction=function(){try{var a=SimileAjax.History._currentIndex-SimileAjax.History._baseIndex-1;return SimileAjax.History._actions[a]}catch(b){return null}};SimileAjax.History.getNextRedoAction=function(){try{var a=SimileAjax.History._currentIndex-SimileAjax.History._baseIndex;return SimileAjax.History._actions[a]}catch(b){return null}};SimileAjax.HTML=new Object();SimileAjax.HTML._e2uHash={};(function(){var a=SimileAjax.HTML._e2uHash;a.nbsp="\u00A0[space]";a.iexcl="\u00A1";a.cent="\u00A2";a.pound="\u00A3";a.curren="\u00A4";a.yen="\u00A5";a.brvbar="\u00A6";a.sect="\u00A7";a.uml="\u00A8";a.copy="\u00A9";a.ordf="\u00AA";a.laquo="\u00AB";a.not="\u00AC";a.shy="\u00AD";a.reg="\u00AE";a.macr="\u00AF";a.deg="\u00B0";a.plusmn="\u00B1";a.sup2="\u00B2";a.sup3="\u00B3";a.acute="\u00B4";a.micro="\u00B5";a.para="\u00B6";a.middot="\u00B7";a.cedil="\u00B8";a.sup1="\u00B9";a.ordm="\u00BA";a.raquo="\u00BB";a.frac14="\u00BC";a.frac12="\u00BD";a.frac34="\u00BE";a.iquest="\u00BF";a.Agrave="\u00C0";a.Aacute="\u00C1";a.Acirc="\u00C2";a.Atilde="\u00C3";a.Auml="\u00C4";a.Aring="\u00C5";a.AElig="\u00C6";a.Ccedil="\u00C7";a.Egrave="\u00C8";a.Eacute="\u00C9";a.Ecirc="\u00CA";a.Euml="\u00CB";a.Igrave="\u00CC";a.Iacute="\u00CD";a.Icirc="\u00CE";a.Iuml="\u00CF";a.ETH="\u00D0";a.Ntilde="\u00D1";a.Ograve="\u00D2";a.Oacute="\u00D3";a.Ocirc="\u00D4";a.Otilde="\u00D5";a.Ouml="\u00D6";a.times="\u00D7";a.Oslash="\u00D8";a.Ugrave="\u00D9";a.Uacute="\u00DA";a.Ucirc="\u00DB";a.Uuml="\u00DC";a.Yacute="\u00DD";a.THORN="\u00DE";a.szlig="\u00DF";a.agrave="\u00E0";a.aacute="\u00E1";a.acirc="\u00E2";a.atilde="\u00E3";a.auml="\u00E4";a.aring="\u00E5";a.aelig="\u00E6";a.ccedil="\u00E7";a.egrave="\u00E8";a.eacute="\u00E9";a.ecirc="\u00EA";a.euml="\u00EB";a.igrave="\u00EC";a.iacute="\u00ED";a.icirc="\u00EE";a.iuml="\u00EF";a.eth="\u00F0";a.ntilde="\u00F1";a.ograve="\u00F2";a.oacute="\u00F3";a.ocirc="\u00F4";a.otilde="\u00F5";a.ouml="\u00F6";a.divide="\u00F7";a.oslash="\u00F8";a.ugrave="\u00F9";a.uacute="\u00FA";a.ucirc="\u00FB";a.uuml="\u00FC";a.yacute="\u00FD";a.thorn="\u00FE";a.yuml="\u00FF";a.quot="\u0022";a.amp="\u0026";a.lt="\u003C";a.gt="\u003E";a.OElig="";a.oelig="\u0153";a.Scaron="\u0160";a.scaron="\u0161";a.Yuml="\u0178";a.circ="\u02C6";a.tilde="\u02DC";a.ensp="\u2002";a.emsp="\u2003";a.thinsp="\u2009";a.zwnj="\u200C";a.zwj="\u200D";a.lrm="\u200E";a.rlm="\u200F";a.ndash="\u2013";a.mdash="\u2014";a.lsquo="\u2018";a.rsquo="\u2019";a.sbquo="\u201A";a.ldquo="\u201C";a.rdquo="\u201D";a.bdquo="\u201E";a.dagger="\u2020";a.Dagger="\u2021";a.permil="\u2030";a.lsaquo="\u2039";a.rsaquo="\u203A";a.euro="\u20AC";a.fnof="\u0192";a.Alpha="\u0391";a.Beta="\u0392";a.Gamma="\u0393";a.Delta="\u0394";a.Epsilon="\u0395";a.Zeta="\u0396";a.Eta="\u0397";a.Theta="\u0398";a.Iota="\u0399";a.Kappa="\u039A";a.Lambda="\u039B";a.Mu="\u039C";a.Nu="\u039D";a.Xi="\u039E";a.Omicron="\u039F";a.Pi="\u03A0";a.Rho="\u03A1";a.Sigma="\u03A3";a.Tau="\u03A4";a.Upsilon="\u03A5";a.Phi="\u03A6";a.Chi="\u03A7";a.Psi="\u03A8";a.Omega="\u03A9";a.alpha="\u03B1";a.beta="\u03B2";a.gamma="\u03B3";a.delta="\u03B4";a.epsilon="\u03B5";a.zeta="\u03B6";a.eta="\u03B7";a.theta="\u03B8";a.iota="\u03B9";a.kappa="\u03BA";a.lambda="\u03BB";a.mu="\u03BC";a.nu="\u03BD";a.xi="\u03BE";a.omicron="\u03BF";a.pi="\u03C0";a.rho="\u03C1";a.sigmaf="\u03C2";a.sigma="\u03C3";a.tau="\u03C4";a.upsilon="\u03C5";a.phi="\u03C6";a.chi="\u03C7";a.psi="\u03C8";a.omega="\u03C9";a.thetasym="\u03D1";a.upsih="\u03D2";a.piv="\u03D6";a.bull="\u2022";a.hellip="\u2026";a.prime="\u2032";a.Prime="\u2033";a.oline="\u203E";a.frasl="\u2044";a.weierp="\u2118";a.image="\u2111";a.real="\u211C";a.trade="\u2122";a.alefsym="\u2135";a.larr="\u2190";a.uarr="\u2191";a.rarr="\u2192";a.darr="\u2193";a.harr="\u2194";a.crarr="\u21B5";a.lArr="\u21D0";a.uArr="\u21D1";a.rArr="\u21D2";a.dArr="\u21D3";a.hArr="\u21D4";a.forall="\u2200";a.part="\u2202";a.exist="\u2203";a.empty="\u2205";a.nabla="\u2207";a.isin="\u2208";a.notin="\u2209";a.ni="\u220B";a.prod="\u220F";a.sum="\u2211";a.minus="\u2212";a.lowast="\u2217";a.radic="\u221A";a.prop="\u221D";a.infin="\u221E";a.ang="\u2220";a.and="\u2227";a.or="\u2228";a.cap="\u2229";a.cup="\u222A";a["int"]="\u222B";a.there4="\u2234";a.sim="\u223C";a.cong="\u2245";a.asymp="\u2248";a.ne="\u2260";a.equiv="\u2261";a.le="\u2264";a.ge="\u2265";a.sub="\u2282";a.sup="\u2283";a.nsub="\u2284";a.sube="\u2286";a.supe="\u2287";a.oplus="\u2295";a.otimes="\u2297";a.perp="\u22A5";a.sdot="\u22C5";a.lceil="\u2308";a.rceil="\u2309";a.lfloor="\u230A";a.rfloor="\u230B";a.lang="\u2329";a.rang="\u232A";a.loz="\u25CA";a.spades="\u2660";a.clubs="\u2663";a.hearts="\u2665";a.diams="\u2666"})();SimileAjax.HTML.deEntify=function(c){var d=SimileAjax.HTML._e2uHash;var b=/&(\w+?);/;while(b.test(c)){var a=c.match(b);c=c.replace(b,d[a[1]])}return c};SimileAjax.JSON=new Object();(function(){var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};var s={array:function(x){var a=["["],b,f,i,l=x.length,v;for(i=0;i<l;i+=1){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=="string"){if(b){a[a.length]=","}a[a.length]=v;b=true}}}a[a.length]="]";return a.join("")},"boolean":function(x){return String(x)},"null":function(x){return"null"},number:function(x){return isFinite(x)?String(x):"null"},object:function(x){if(x){if(x instanceof Array){return s.array(x)}var a=["{"],b,f,i,v;for(i in x){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=="string"){if(b){a[a.length]=","}a.push(s.string(i),":",v);b=true}}}a[a.length]="}";return a.join("")}return"null"},string:function(x){if(/["\\\x00-\x1f]/.test(x)){x=x.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})}return'"'+x+'"'}};SimileAjax.JSON.toJSONString=function(o){if(o instanceof Object){return s.object(o)}else{if(o instanceof Array){return s.array(o)}else{return o.toString()}}};SimileAjax.JSON.parseJSON=function(){try{return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(this.replace(/"(\\.|[^"\\])*"/g,"")))&&eval("("+this+")")}catch(e){return false}}})();String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.startsWith=function(a){return this.length>=a.length&&this.substr(0,a.length)==a};String.prototype.endsWith=function(a){return this.length>=a.length&&this.substr(this.length-a.length)==a};String.substitute=function(b,d){var a="";var f=0;while(f<b.length-1){var c=b.indexOf("%",f);if(c<0||c==b.length-1){break}else{if(c>f&&b.charAt(c-1)=="\\"){a+=b.substring(f,c-1)+"%";f=c+1}else{var e=parseInt(b.charAt(c+1));if(isNaN(e)||e>=d.length){a+=b.substring(f,c+2)}else{a+=b.substring(f,c)+d[e].toString()}f=c+2}}}if(f<b.length){a+=b.substring(f)}return a};SimileAjax.NativeDateUnit=new Object();SimileAjax.NativeDateUnit.makeDefaultValue=function(){return new Date()};SimileAjax.NativeDateUnit.cloneValue=function(a){return new Date(a.getTime())};SimileAjax.NativeDateUnit.getParser=function(a){if(typeof a=="string"){a=a.toLowerCase()}return(a=="iso8601"||a=="iso 8601")?SimileAjax.DateTime.parseIso8601DateTime:SimileAjax.DateTime.parseGregorianDateTime};SimileAjax.NativeDateUnit.parseFromObject=function(a){return SimileAjax.DateTime.parseGregorianDateTime(a)};SimileAjax.NativeDateUnit.toNumber=function(a){return a.getTime()};SimileAjax.NativeDateUnit.fromNumber=function(a){return new Date(a)};SimileAjax.NativeDateUnit.compare=function(d,c){var b,a;if(typeof d=="object"){b=d.getTime()}else{b=Number(d)}if(typeof c=="object"){a=c.getTime()}else{a=Number(c)}return b-a};SimileAjax.NativeDateUnit.earlier=function(b,a){return SimileAjax.NativeDateUnit.compare(b,a)<0?b:a};SimileAjax.NativeDateUnit.later=function(b,a){return SimileAjax.NativeDateUnit.compare(b,a)>0?b:a};SimileAjax.NativeDateUnit.change=function(a,b){return new Date(a.getTime()+b)};SimileAjax.WindowManager={_initialized:false,_listeners:[],_draggedElement:null,_draggedElementCallback:null,_dropTargetHighlightElement:null,_lastCoords:null,_ghostCoords:null,_draggingMode:"",_dragging:false,_layers:[]};SimileAjax.WindowManager.initialize=function(){if(SimileAjax.WindowManager._initialized){return}SimileAjax.DOM.registerEvent(document.body,"mousedown",SimileAjax.WindowManager._onBodyMouseDown);SimileAjax.DOM.registerEvent(document.body,"mousemove",SimileAjax.WindowManager._onBodyMouseMove);SimileAjax.DOM.registerEvent(document.body,"mouseup",SimileAjax.WindowManager._onBodyMouseUp);SimileAjax.DOM.registerEvent(document,"keydown",SimileAjax.WindowManager._onBodyKeyDown);SimileAjax.DOM.registerEvent(document,"keyup",SimileAjax.WindowManager._onBodyKeyUp);SimileAjax.WindowManager._layers.push({index:0});SimileAjax.WindowManager._historyListener={onBeforeUndoSeveral:function(){},onAfterUndoSeveral:function(){},onBeforeUndo:function(){},onAfterUndo:function(){},onBeforeRedoSeveral:function(){},onAfterRedoSeveral:function(){},onBeforeRedo:function(){},onAfterRedo:function(){}};SimileAjax.History.addListener(SimileAjax.WindowManager._historyListener);SimileAjax.WindowManager._initialized=true};SimileAjax.WindowManager.getBaseLayer=function(){SimileAjax.WindowManager.initialize();return SimileAjax.WindowManager._layers[0]};SimileAjax.WindowManager.getHighestLayer=function(){SimileAjax.WindowManager.initialize();return SimileAjax.WindowManager._layers[SimileAjax.WindowManager._layers.length-1]};SimileAjax.WindowManager.registerEventWithObject=function(d,a,e,b,c){SimileAjax.WindowManager.registerEvent(d,a,function(g,f,h){return e[b].call(e,g,f,h)},c)};SimileAjax.WindowManager.registerEvent=function(d,b,e,c){if(c==null){c=SimileAjax.WindowManager.getHighestLayer()}var a=function(g,f,i){if(SimileAjax.WindowManager._canProcessEventAtLayer(c)){SimileAjax.WindowManager._popToLayer(c.index);try{e(g,f,i)}catch(h){SimileAjax.Debug.exception(h)}}SimileAjax.DOM.cancelEvent(f);return false};SimileAjax.DOM.registerEvent(d,b,a)};SimileAjax.WindowManager.pushLayer=function(c,d,b){var a={onPop:c,index:SimileAjax.WindowManager._layers.length,ephemeral:(d),elmt:b};SimileAjax.WindowManager._layers.push(a);return a};SimileAjax.WindowManager.popLayer=function(b){for(var a=1;a<SimileAjax.WindowManager._layers.length;a++){if(SimileAjax.WindowManager._layers[a]==b){SimileAjax.WindowManager._popToLayer(a-1);break}}};SimileAjax.WindowManager.popAllLayers=function(){SimileAjax.WindowManager._popToLayer(0)};SimileAjax.WindowManager.registerForDragging=function(b,c,a){SimileAjax.WindowManager.registerEvent(b,"mousedown",function(e,d,f){SimileAjax.WindowManager._handleMouseDown(e,d,c)},a)};SimileAjax.WindowManager._popToLayer=function(c){while(c+1<SimileAjax.WindowManager._layers.length){try{var a=SimileAjax.WindowManager._layers.pop();if(a.onPop!=null){a.onPop()}}catch(b){}}};SimileAjax.WindowManager._canProcessEventAtLayer=function(b){if(b.index==(SimileAjax.WindowManager._layers.length-1)){return true}for(var a=b.index+1;a<SimileAjax.WindowManager._layers.length;a++){if(!SimileAjax.WindowManager._layers[a].ephemeral){return false}}return true};SimileAjax.WindowManager.cancelPopups=function(a){var f=(a)?SimileAjax.DOM.getEventPageCoordinates(a):{x:-1,y:-1};var e=SimileAjax.WindowManager._layers.length-1;while(e>0&&SimileAjax.WindowManager._layers[e].ephemeral){var d=SimileAjax.WindowManager._layers[e];if(d.elmt!=null){var c=d.elmt;var b=SimileAjax.DOM.getPageCoordinates(c);if(f.x>=b.left&&f.x<(b.left+c.offsetWidth)&&f.y>=b.top&&f.y<(b.top+c.offsetHeight)){break}}e--}SimileAjax.WindowManager._popToLayer(e)};SimileAjax.WindowManager._onBodyMouseDown=function(b,a,c){if(!("eventPhase" in a)||a.eventPhase==a.BUBBLING_PHASE){SimileAjax.WindowManager.cancelPopups(a)}};SimileAjax.WindowManager._handleMouseDown=function(b,a,c){SimileAjax.WindowManager._draggedElement=b;SimileAjax.WindowManager._draggedElementCallback=c;SimileAjax.WindowManager._lastCoords={x:a.clientX,y:a.clientY};SimileAjax.DOM.cancelEvent(a);return false};SimileAjax.WindowManager._onBodyKeyDown=function(c,a,d){if(SimileAjax.WindowManager._dragging){if(a.keyCode==27){SimileAjax.WindowManager._cancelDragging()}else{if((a.keyCode==17||a.keyCode==16)&&SimileAjax.WindowManager._draggingMode!="copy"){SimileAjax.WindowManager._draggingMode="copy";var b=SimileAjax.Graphics.createTranslucentImage(SimileAjax.urlPrefix+"images/copy.png");b.style.position="absolute";b.style.left=(SimileAjax.WindowManager._ghostCoords.left-16)+"px";b.style.top=(SimileAjax.WindowManager._ghostCoords.top)+"px";document.body.appendChild(b);SimileAjax.WindowManager._draggingModeIndicatorElmt=b}}}};SimileAjax.WindowManager._onBodyKeyUp=function(b,a,c){if(SimileAjax.WindowManager._dragging){if(a.keyCode==17||a.keyCode==16){SimileAjax.WindowManager._draggingMode="";if(SimileAjax.WindowManager._draggingModeIndicatorElmt!=null){document.body.removeChild(SimileAjax.WindowManager._draggingModeIndicatorElmt);SimileAjax.WindowManager._draggingModeIndicatorElmt=null}}}};SimileAjax.WindowManager._onBodyMouseMove=function(a,p,i){if(SimileAjax.WindowManager._draggedElement!=null){var r=SimileAjax.WindowManager._draggedElementCallback;var f=SimileAjax.WindowManager._lastCoords;var o=p.clientX-f.x;var k=p.clientY-f.y;if(!SimileAjax.WindowManager._dragging){if(Math.abs(o)>5||Math.abs(k)>5){try{if("onDragStart" in r){r.onDragStart()}if("ghost" in r&&r.ghost){var l=SimileAjax.WindowManager._draggedElement;SimileAjax.WindowManager._ghostCoords=SimileAjax.DOM.getPageCoordinates(l);SimileAjax.WindowManager._ghostCoords.left+=o;SimileAjax.WindowManager._ghostCoords.top+=k;var q=l.cloneNode(true);q.style.position="absolute";q.style.left=SimileAjax.WindowManager._ghostCoords.left+"px";q.style.top=SimileAjax.WindowManager._ghostCoords.top+"px";q.style.zIndex=1000;SimileAjax.Graphics.setOpacity(q,50);document.body.appendChild(q);r._ghostElmt=q}SimileAjax.WindowManager._dragging=true;SimileAjax.WindowManager._lastCoords={x:p.clientX,y:p.clientY};document.body.focus()}catch(h){SimileAjax.Debug.exception("WindowManager: Error handling mouse down",h);SimileAjax.WindowManager._cancelDragging()}}}else{try{SimileAjax.WindowManager._lastCoords={x:p.clientX,y:p.clientY};if("onDragBy" in r){r.onDragBy(o,k)}if("_ghostElmt" in r){var q=r._ghostElmt;SimileAjax.WindowManager._ghostCoords.left+=o;SimileAjax.WindowManager._ghostCoords.top+=k;q.style.left=SimileAjax.WindowManager._ghostCoords.left+"px";q.style.top=SimileAjax.WindowManager._ghostCoords.top+"px";if(SimileAjax.WindowManager._draggingModeIndicatorElmt!=null){var j=SimileAjax.WindowManager._draggingModeIndicatorElmt;j.style.left=(SimileAjax.WindowManager._ghostCoords.left-16)+"px";j.style.top=SimileAjax.WindowManager._ghostCoords.top+"px"}if("droppable" in r&&r.droppable){var m=SimileAjax.DOM.getEventPageCoordinates(p);var i=SimileAjax.DOM.hittest(m.x,m.y,[SimileAjax.WindowManager._ghostElmt,SimileAjax.WindowManager._dropTargetHighlightElement]);i=SimileAjax.WindowManager._findDropTarget(i);if(i!=SimileAjax.WindowManager._potentialDropTarget){if(SimileAjax.WindowManager._dropTargetHighlightElement!=null){document.body.removeChild(SimileAjax.WindowManager._dropTargetHighlightElement);SimileAjax.WindowManager._dropTargetHighlightElement=null;SimileAjax.WindowManager._potentialDropTarget=null}var g=false;if(i!=null){if((!("canDropOn" in r)||r.canDropOn(i))&&(!("canDrop" in i)||i.canDrop(SimileAjax.WindowManager._draggedElement))){g=true}}if(g){var c=4;var d=SimileAjax.DOM.getPageCoordinates(i);var b=document.createElement("div");b.style.border=c+"px solid yellow";b.style.backgroundColor="yellow";b.style.position="absolute";b.style.left=d.left+"px";b.style.top=d.top+"px";b.style.width=(i.offsetWidth-c*2)+"px";b.style.height=(i.offsetHeight-c*2)+"px";SimileAjax.Graphics.setOpacity(b,30);document.body.appendChild(b);SimileAjax.WindowManager._potentialDropTarget=i;SimileAjax.WindowManager._dropTargetHighlightElement=b}}}}}catch(h){SimileAjax.Debug.exception("WindowManager: Error handling mouse move",h);SimileAjax.WindowManager._cancelDragging()}}SimileAjax.DOM.cancelEvent(p);return false}};SimileAjax.WindowManager._onBodyMouseUp=function(b,a,c){if(SimileAjax.WindowManager._draggedElement!=null){try{if(SimileAjax.WindowManager._dragging){var e=SimileAjax.WindowManager._draggedElementCallback;if("onDragEnd" in e){e.onDragEnd()}if("droppable" in e&&e.droppable){var d=false;var c=SimileAjax.WindowManager._potentialDropTarget;if(c!=null){if((!("canDropOn" in e)||e.canDropOn(c))&&(!("canDrop" in c)||c.canDrop(SimileAjax.WindowManager._draggedElement))){if("onDropOn" in e){e.onDropOn(c)}c.ondrop(SimileAjax.WindowManager._draggedElement,SimileAjax.WindowManager._draggingMode);d=true}}if(!d){}}}}finally{SimileAjax.WindowManager._cancelDragging()}SimileAjax.DOM.cancelEvent(a);return false}};SimileAjax.WindowManager._cancelDragging=function(){var b=SimileAjax.WindowManager._draggedElementCallback;if("_ghostElmt" in b){var a=b._ghostElmt;document.body.removeChild(a);delete b._ghostElmt}if(SimileAjax.WindowManager._dropTargetHighlightElement!=null){document.body.removeChild(SimileAjax.WindowManager._dropTargetHighlightElement);SimileAjax.WindowManager._dropTargetHighlightElement=null}if(SimileAjax.WindowManager._draggingModeIndicatorElmt!=null){document.body.removeChild(SimileAjax.WindowManager._draggingModeIndicatorElmt);SimileAjax.WindowManager._draggingModeIndicatorElmt=null}SimileAjax.WindowManager._draggedElement=null;SimileAjax.WindowManager._draggedElementCallback=null;SimileAjax.WindowManager._potentialDropTarget=null;SimileAjax.WindowManager._dropTargetHighlightElement=null;SimileAjax.WindowManager._lastCoords=null;SimileAjax.WindowManager._ghostCoords=null;SimileAjax.WindowManager._draggingMode="";SimileAjax.WindowManager._dragging=false};SimileAjax.WindowManager._findDropTarget=function(a){while(a!=null){if("ondrop" in a&&(typeof a.ondrop)=="function"){break}a=a.parentNode}return a};SimileAjax.XmlHttp=new Object();SimileAjax.XmlHttp._onReadyStateChange=function(a,d,b){switch(a.readyState){case 4:try{if(a.status==0||a.status==200){if(b){b(a)}}else{if(d){d(a.statusText,a.status,a)}}}catch(c){SimileAjax.Debug.exception("XmlHttp: Error handling onReadyStateChange",c)}break}};SimileAjax.XmlHttp._createRequest=function(){if(SimileAjax.Platform.browser.isIE){var a=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];for(var b=0;b<a.length;b++){try{var c=a[b];var d=function(){return new ActiveXObject(c)};var h=d();SimileAjax.XmlHttp._createRequest=d;return h}catch(g){}}}try{var d=function(){return new XMLHttpRequest()};var h=d();SimileAjax.XmlHttp._createRequest=d;return h}catch(g){throw new Error("Failed to create an XMLHttpRequest object")}};SimileAjax.XmlHttp.get=function(a,d,c){var b=SimileAjax.XmlHttp._createRequest();b.open("GET",a,true);b.onreadystatechange=function(){SimileAjax.XmlHttp._onReadyStateChange(b,d,c)};b.send(null)};SimileAjax.XmlHttp.post=function(b,a,e,d){var c=SimileAjax.XmlHttp._createRequest();c.open("POST",b,true);c.onreadystatechange=function(){SimileAjax.XmlHttp._onReadyStateChange(c,e,d)};c.send(a)};SimileAjax.XmlHttp._forceXML=function(a){try{a.overrideMimeType("text/xml")}catch(b){a.setrequestheader("Content-Type","text/xml")}};
|