var Hashtable=function(){function c(b){var d;if(typeof b=="string")return b;if(typeof b.hashCode==a)return d=b.hashCode(),typeof d=="string"?d:c(d);if(typeof b.toString==a)return b.toString();try{return String(b)}catch(e){return Object.prototype.toString.call(b)}}function d(a,b){return a.equals(b)}function e(b,c){return typeof c.equals==a?c.equals(b):b===c}function f(a){return function(b){if(b===null)throw new Error("null is not a valid "+a);if(typeof b=="undefined")throw new Error(a+" must not be undefined")}}function i(a,b,c,d){this[0]=a,this.entries=[],this.addEntry(b,c),d!==null&&(this.getEqualityFunction=function(){return d})}function m(a){return function(b){var c=this.entries.length,d,e=this.getEqualityFunction(b);while(c--){d=this.entries[c];if(e(b,d[0]))switch(a){case j:return!0;case k:return d;case l:return[c,d[1]]}}return!1}}function n(a){return function(b){var c=b.length;for(var d=0,e=this.entries.length;d=0;l--){if(h.indexOf(c.format.charAt(l))!=-1)break;m=c.format.charAt(l)+m}c.format=c.format.substring(i.length),c.format=c.format.substring(0,c.format.length-m.length);var n=new Number(b);return a._formatNumber(n,c,m,i,j)},a._formatNumber=function(b,c,d,e,f){var c=a.extend({},a.fn.formatNumber.defaults,c),g=k(c.locale.toLowerCase(),c.isFullLocale),h=g.dec,i=g.group,j=g.neg,l=!1;if(isNaN(b)){if(c.nanForceZero!=1)return null;b=0,l=!0}d=="%"&&(b*=100);var m="";if(c.format.indexOf(".")>-1){var n=h,o=c.format.substring(c.format.lastIndexOf(".")+1);if(c.round==1)b=new Number(b.toFixed(o.length));else{var p=b.toString();p=p.substring(0,p.lastIndexOf(".")+o.length+1),b=new Number(p)}var q=b%1,r=new String(q.toFixed(o.length));r=r.substring(r.lastIndexOf(".")+1);for(var s=0;s-1;s--)w=x.charAt(s)+w,z++,z==y&&s!=0&&(w=i+w,z=0);if(v.length>w.length){var A=v.indexOf("0");if(A!=-1){var B=v.length-A,C=v.length-w.length-1;while(w.length0?e=j+e:b<0&&(m=j+m),c.decimalSeparatorAlwaysShown||m.lastIndexOf(h)==m.length-1&&(m=m.substring(0,m.length-1)),m=e+m+d,m},a.fn.parseNumber=function(b,c,d){c==null&&(c=!0),d==null&&(d=!0);var e;a(this).is(":input")?e=new String(a(this).val()):e=new String(a(this).text());var f=a.parseNumber(e,b);if(f){c&&(a(this).is(":input")?a(this).val(f.toString()):a(this).text(f.toString()));if(d)return f}},a.parseNumber=function(b,c){var c=a.extend({},a.fn.parseNumber.defaults,c),d=k(c.locale.toLowerCase(),c.isFullLocale),e=d.dec,f=d.group,g=d.neg,h="1234567890.-";while(b.indexOf(f)>-1)b=b.replace(f,"");b=b.replace(e,".").replace(g,"-");var i="",j=!1;if(b.charAt(b.length-1)=="%"||c.isPercentage==1)j=!0;for(var l=0;l-1&&(i+=b.charAt(l));var m=new Number(i);if(j){m/=100;var n=i.indexOf(".");if(n!=-1){var o=i.length-n-1;m=m.toFixed(o+2)}else m=m.toFixed(i.length-1)}return m},a.fn.parseNumber.defaults={locale:"us",decimalSeparatorAlwaysShown:!1,isPercentage:!1,isFullLocale:!1},a.fn.formatNumber.defaults={format:"#,###.00",locale:"us",decimalSeparatorAlwaysShown:!1,nanForceZero:!0,round:!0,isFullLocale:!1},Number.prototype.toFixed=function(b){return a._roundNumber(this,b)},a._roundNumber=function(a,b){var c=Math.pow(10,b||0),d=String(Math.round(a*c)/c);if(b>0){var e=d.indexOf(".");e==-1?(d+=".",e=0):e=d.length-(e+1);while(e)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):a[c]=a[c]||b(document.getElementById(c).innerHTML);return d?e(d):e}}(),function(a){a.baseClass=function(b){return b=a(b),b.get(0).className.match(/([^ ]+)/)[1]},a.fn.addDependClass=function(b,c){var d={delimiter:c?c:"-"};return this.each(function(){var c=a.baseClass(this);c&&a(this).addClass(c+d.delimiter+b)})},a.fn.removeDependClass=function(b,c){var d={delimiter:c?c:"-"};return this.each(function(){var c=a.baseClass(this);c&&a(this).removeClass(c+d.delimiter+b)})},a.fn.toggleDependClass=function(b,c){var d={delimiter:c?c:"-"};return this.each(function(){var c=a.baseClass(this);c&&(a(this).is("."+c+d.delimiter+b)?a(this).removeClass(c+d.delimiter+b):a(this).addClass(c+d.delimiter+b))})}}(jQuery),function(a){function b(){this._init.apply(this,arguments)}b.prototype.oninit=function(){},b.prototype.events=function(){},b.prototype.onmousedown=function(){this.ptr.css({position:"absolute"})},b.prototype.onmousemove=function(a,b,c){this.ptr.css({left:b,top:c})},b.prototype.onmouseup=function(){},b.prototype.isDefault={drag:!1,clicked:!1,toclick:!0,mouseup:!1},b.prototype._init=function(){if(arguments.length>0){this.ptr=a(arguments[0]),this.outer=a(".draggable-outer"),this.is={},a.extend(this.is,this.isDefault);var b=this.ptr.offset();this.d={left:b.left,top:b.top,width:this.ptr.width(),height:this.ptr.height()},this.oninit.apply(this,arguments),this._events()}},b.prototype._getPageCoords=function(a){return a.targetTouches&&a.targetTouches[0]?{x:a.targetTouches[0].pageX,y:a.targetTouches[0].pageY}:{x:a.pageX,y:a.pageY}},b.prototype._bindEvent=function(a,b,c){var d=this;this.supportTouches_?a.get(0).addEventListener(this.events_[b],c,!1):a.bind(this.events_[b],c)},b.prototype._events=function(){var b=this;this.supportTouches_=a.browser.webkit&&navigator.userAgent.indexOf("Mobile")!=-1,this.events_={click:this.supportTouches_?"touchstart":"click",down:this.supportTouches_?"touchstart":"mousedown",move:this.supportTouches_?"touchmove":"mousemove",up:this.supportTouches_?"touchend":"mouseup"},this._bindEvent(a(document),"move",function(a){b.is.drag&&(a.stopPropagation(),a.preventDefault(),b._mousemove(a))}),this._bindEvent(a(document),"down",function(a){b.is.drag&&(a.stopPropagation(),a.preventDefault())}),this._bindEvent(a(document),"up",function(a){b._mouseup(a)}),this._bindEvent(this.ptr,"down",function(a){return b._mousedown(a),!1}),this._bindEvent(this.ptr,"up",function(a){b._mouseup(a)}),this.ptr.find("a").click(function(){b.is.clicked=!0;if(!b.is.toclick)return b.is.toclick=!0,!1}).mousedown(function(a){return b._mousedown(a),!1}),this.events()},b.prototype._mousedown=function(b){this.is.drag=!0,this.is.clicked=!1,this.is.mouseup=!1;var c=this.ptr.offset(),d=this._getPageCoords(b);this.cx=d.x-c.left,this.cy=d.y-c.top,a.extend(this.d,{left:c.left,top:c.top,width:this.ptr.width(),height:this.ptr.height()}),this.outer&&this.outer.get(0)&&this.outer.css({height:Math.max(this.outer.height(),a(document.body).height()),overflow:"hidden"}),this.onmousedown(b)},b.prototype._mousemove=function(a){this.is.toclick=!1;var b=this._getPageCoords(a);this.onmousemove(a,b.x-this.cx,b.y-this.cy)},b.prototype._mouseup=function(b){var c=this;this.is.drag&&(this.is.drag=!1,this.outer&&this.outer.get(0)&&(a.browser.mozilla?this.outer.css({overflow:"hidden"}):this.outer.css({overflow:"visible"}),a.browser.msie&&a.browser.version=="6.0"?this.outer.css({height:"100%"}):this.outer.css({height:"auto"})),this.onmouseup(b))},window.Draggable=b}(jQuery),function(a){function b(a){return typeof a=="undefined"?!1:a instanceof Array||!(a instanceof Object)&&Object.prototype.toString.call(a)=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice")?!0:!1}function d(){return this.init.apply(this,arguments)}function e(){Draggable.apply(this,arguments)}a.slider=function(b,c){var e=a(b);return e.data("jslider")||e.data("jslider",new d(b,c)),e.data("jslider")},a.fn.slider=function(c,d){function g(a){return a!==undefined}function h(a){return a!=null}var e,f=arguments;return this.each(function(){var i=a.slider(this,c);if(typeof c=="string")switch(c){case"value":if(g(f[1])&&g(f[2])){var j=i.getPointers();h(j[0])&&h(f[1])&&(j[0].set(f[1]),j[0].setIndexOver()),h(j[1])&&h(f[2])&&(j[1].set(f[2]),j[1].setIndexOver())}else if(g(f[1])){var j=i.getPointers();h(j[0])&&h(f[1])&&(j[0].set(f[1]),j[0].setIndexOver())}else e=i.getValue();break;case"prc":if(g(f[1])&&g(f[2])){var j=i.getPointers();h(j[0])&&h(f[1])&&(j[0]._set(f[1]),j[0].setIndexOver()),h(j[1])&&h(f[2])&&(j[1]._set(f[2]),j[1].setIndexOver())}else if(g(f[1])){var j=i.getPointers();h(j[0])&&h(f[1])&&(j[0]._set(f[1]),j[0].setIndexOver())}else e=i.getPrcValue();break;case"calculatedValue":var k=i.getValue().split(";");e="";for(var l=0;l0?";":"")+i.nice(k[l]);break;case"skin":i.setSkin(f[1])}else!c&&!d&&(b(e)||(e=[]),e.push(i))}),b(e)&&e.length==1&&(e=e[0]),e||this};var c={settings:{from:1,to:10,step:1,smooth:!0,limits:!0,round:0,format:{format:"#,##0.##"},value:"5;7",dimension:""},className:"jslider",selector:".jslider-",template:tmpl('
<%=settings.from%>
<%=settings.to%><%=settings.dimension%>
<%=settings.dimension%>
<%=settings.dimension%>
<%=scale%>
')};d.prototype.init=function(b,d){this.settings=a.extend(!0,{},c.settings,d?d:{}),this.inputNode=a(b).hide(),this.settings.interval=this.settings.to-this.settings.from,this.settings.value=this.inputNode.attr("value"),this.settings.calculate&&a.isFunction(this.settings.calculate)&&(this.nice=this.settings.calculate),this.settings.onstatechange&&a.isFunction(this.settings.onstatechange)&&(this.onstatechange=this.settings.onstatechange),this.is={init:!1},this.o={},this.create()},d.prototype.onstatechange=function(){},d.prototype.create=function(){var b=this;this.domNode=a(c.template({className:c.className,settings:{from:this.nice(this.settings.from),to:this.nice(this.settings.to),dimension:this.settings.dimension},scale:this.generateScale()})),this.inputNode.after(this.domNode),this.drawScale(),this.settings.skin&&this.settings.skin.length>0&&this.setSkin(this.settings.skin),this.sizes={domWidth:this.domNode.width(),domOffset:this.domNode.offset()},a.extend(this.o,{pointers:{},labels:{0:{o:this.domNode.find(c.selector+"value").not(c.selector+"value-to")},1:{o:this.domNode.find(c.selector+"value").filter(c.selector+"value-to")}},limits:{0:this.domNode.find(c.selector+"label").not(c.selector+"label-to"),1:this.domNode.find(c.selector+"label").filter(c.selector+"label-to")}}),a.extend(this.o.labels[0],{value:this.o.labels[0].o.find("span")}),a.extend(this.o.labels[1],{value:this.o.labels[1].o.find("span")}),b.settings.value.split(";")[1]||(this.settings.single=!0,this.domNode.addDependClass("single")),b.settings.limits||this.domNode.addDependClass("limitless"),this.domNode.find(c.selector+"pointer").each(function(a){var c=b.settings.value.split(";")[a];if(c){b.o.pointers[a]=new e(this,a,b);var d=b.settings.value.split(";")[a-1];d&&new Number(c)b.settings.to?b.settings.to:c,b.o.pointers[a].set(c,!0)}}),this.o.value=this.domNode.find(".v"),this.is.init=!0,a.each(this.o.pointers,function(a){b.redraw(this)}),function(b){a(window).resize(function(){b.onresize()})}(this)},d.prototype.setSkin=function(a){this.skin_&&this.domNode.removeDependClass(this.skin_,"_"),this.domNode.addDependClass(this.skin_=a,"_")},d.prototype.setPointersIndex=function(b){a.each(this.getPointers(),function(a){this.index(a)})},d.prototype.getPointers=function(){return this.o.pointers},d.prototype.generateScale=function(){if(this.settings.scale&&this.settings.scale.length>0){var a="",b=this.settings.scale,c=Math.round(100/(b.length-1)*10)/10;for(var d=0;d'+(b[d]!="|"?""+b[d]+"":"")+"";return a}return""},d.prototype.drawScale=function(){this.domNode.find(c.selector+"scale span ins").each(function(){a(this).css({marginLeft:-a(this).outerWidth()/2})})},d.prototype.onresize=function(){var b=this;this.sizes={domWidth:this.domNode.width(),domOffset:this.domNode.offset()},a.each(this.o.pointers,function(a){b.redraw(this)})},d.prototype.update=function(){this.onresize(),this.drawScale()},d.prototype.limits=function(a,b){if(!this.settings.smooth){var c=this.settings.step*100/this.settings.interval;a=Math.round(a/c)*c}var d=this.o.pointers[1-b.uid];return d&&b.uid&&ad.value.prc&&(a=d.value.prc),a<0&&(a=0),a>100&&(a=100),Math.round(a*10)/10},d.prototype.redraw=function(a){if(!this.is.init)return!1;this.setValue(),this.o.pointers[0]&&this.o.pointers[1]&&this.o.value.css({left:this.o.pointers[0].value.prc+"%",width:this.o.pointers[1].value.prc-this.o.pointers[0].value.prc+"%"}),this.o.labels[a.uid].value.html(this.nice(a.value.origin)),this.redrawLabels(a)},d.prototype.redrawLabels=function(a){function b(a,b,d){return b.margin=-b.label/2,label_left=b.border+b.margin,label_left<0&&(b.margin-=label_left),b.border+b.label/2>c.sizes.domWidth?(b.margin=0,b.right=!0):b.right=!1,a.o.css({left:d+"%",marginLeft:b.margin,right:"auto"}),b.right&&a.o.css({left:"auto",right:0}),b}var c=this,d=this.o.labels[a.uid],e=a.value.prc,f={label:d.o.outerWidth(),right:!1,border:e*this.sizes.domWidth/100};if(!this.settings.single){var g=this.o.pointers[1-a.uid],h=this.o.labels[g.uid];switch(a.uid){case 0:f.border+f.label/2>h.o.offset().left-this.sizes.domOffset.left?(h.o.css({visibility:"hidden"}),h.value.html(this.nice(g.value.origin)),d.o.css({visibility:"visible"}),e=(g.value.prc-e)/2+e,g.value.prc!=a.value.prc&&(d.value.html(this.nice(a.value.origin)+" – "+this.nice(g.value.origin)),f.label=d.o.outerWidth(),f.border=e*this.sizes.domWidth/100)):h.o.css({visibility:"visible"});break;case 1:f.border-f.label/2this.sizes.domWidth-e.outerWidth()&&(a[1]=!1)}for(var f=0;f0?";":"")+b.prcToValue(this.value.prc))}),c},d.prototype.getPrcValue=function(){if(!this.is.init)return!1;var b=this,c="";return a.each(this.o.pointers,function(a){this.value.prc!=undefined&&!isNaN(this.value.prc)&&(c+=(a>0?";":"")+this.value.prc)}),c},d.prototype.prcToValue=function(a){if(this.settings.heterogeneity&&this.settings.heterogeneity.length>0){var b=this.settings.heterogeneity,c=0,d=this.settings.from;for(var e=0;e<=b.length;e++){if(b[e])var f=b[e].split("/");else var f=[100,this.settings.to];f[0]=new Number(f[0]),f[1]=new Number(f[1]);if(a>=c&&a<=f[0])var g=d+(a-c)*(f[1]-d)/(f[0]-c);c=f[0],d=f[1]}}else var g=this.settings.from+a*this.settings.interval/100;return this.round(g)},d.prototype.valueToPrc=function(a,b){if(this.settings.heterogeneity&&this.settings.heterogeneity.length>0){var c=this.settings.heterogeneity,d=0,e=this.settings.from;for(var f=0;f<=c.length;f++){if(c[f])var g=c[f].split("/");else var g=[100,this.settings.to];g[0]=new Number(g[0]),g[1]=new Number(g[1]);if(a>=e&&a<=g[1])var h=b.limits(d+(a-e)*(g[0]-d)/(g[1]-e));d=g[0],e=g[1]}}else var h=b.limits((a-this.settings.from)*100/this.settings.interval);return h},d.prototype.round=function(a){return a=Math.round(a/this.settings.step)*this.settings.step,this.settings.round?a=Math.round(a*Math.pow(10,this.settings.round))/Math.pow(10,this.settings.round):a=Math.round(a),a},d.prototype.nice=function(b){return b=b.toString().replace(/,/gi,".").replace(/ /gi,""),a.formatNumber?a.formatNumber(new Number(b),this.settings.format||{}).replace(/-/gi,"−"):new Number(b)},e.prototype=new Draggable,e.prototype.oninit=function(a,b,c){this.uid=b,this.parent=c,this.value={},this.settings=this.parent.settings},e.prototype.onmousedown=function(a){this._parent={offset:this.parent.domNode.offset(),width:this.parent.domNode.width()},this.ptr.addDependClass("hover"),this.setIndexOver()},e.prototype.onmousemove=function(a,b){var c=this._getPageCoords(a);this._set(this.calc(c.x))},e.prototype.onmouseup=function(b){this.parent.settings.callback&&a.isFunction(this.parent.settings.callback)&&this.parent.settings.callback.call(this.parent,this.parent.getValue()),this.ptr.removeDependClass("hover")},e.prototype.setIndexOver=function(){this.parent.setPointersIndex(1),this.index(2)},e.prototype.index=function(a){this.ptr.css({zIndex:a})},e.prototype.limits=function(a){return this.parent.limits(a,this)},e.prototype.calc=function(a){var b=this.limits((a-this._parent.offset.left)*100/this._parent.width);return b},e.prototype.set=function(a,b){this.value.origin=this.parent.round(a),this._set(this.parent.valueToPrc(a,this),b)},e.prototype._set=function(a,b){b||(this.value.origin=this.parent.prcToValue(a)),this.value.prc=a,this.ptr.css({left:a+"%"}),this.parent.redraw(this)}}(jQuery);