+/***
+
+ MochiKit.MochiKit 1.4 : PACKED VERSION
+
+ THIS FILE IS AUTOMATICALLY GENERATED. If creating patches, please
+ diff against the source tree, not this file.
+
+ 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={};
+}
+if(typeof (MochiKit.__export__)=="undefined"){
+MochiKit.__export__=(MochiKit.__compat__||(typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined"));
+}
+MochiKit.Base.VERSION="1.4";
+MochiKit.Base.NAME="MochiKit.Base";
+MochiKit.Base.update=function(_1,_2){
+if(_1===null){
+_1={};
+}
+for(var i=1;i<arguments.length;i++){
+var o=arguments[i];
+if(typeof (o)!="undefined"&&o!==null){
+for(var k in o){
+_1[k]=o[k];
+}
+}
+}
+return _1;
+};
+MochiKit.Base.update(MochiKit.Base,{__repr__:function(){
+return "["+this.NAME+" "+this.VERSION+"]";
+},toString:function(){
+return this.__repr__();
+},camelize:function(_6){
+var _7=_6.split("-");
+var cc=_7[0];
+for(var i=1;i<_7.length;i++){
+cc+=_7[i].charAt(0).toUpperCase()+_7[i].substring(1);
+}
+return cc;
+},counter:function(n){
+if(arguments.length===0){
+n=1;
+}
+return function(){
+return n++;
+};
+},clone:function(_b){
+var me=arguments.callee;
+if(arguments.length==1){
+me.prototype=_b;
+return new me();
+}
+},_flattenArray:function(_d,_e){
+for(var i=0;i<_e.length;i++){
+var o=_e[i];
+if(o instanceof Array){
+arguments.callee(_d,o);
+}else{
+_d.push(o);
+}
+}
+return _d;
+},flattenArray:function(lst){
+return MochiKit.Base._flattenArray([],lst);
+},flattenArguments:function(lst){
+var res=[];
+var m=MochiKit.Base;
+var _15=m.extend(null,arguments);
+while(_15.length){
+var o=_15.shift();
+if(o&&typeof (o)=="object"&&typeof (o.length)=="number"){
+for(var i=o.length-1;i>=0;i--){
+_15.unshift(o[i]);
+}
+}else{
+res.push(o);
+}
+}
+return res;
+},extend:function(_18,obj,_1a){
+if(!_1a){
+_1a=0;
+}
+if(obj){
+var l=obj.length;
+if(typeof (l)!="number"){
+if(typeof (MochiKit.Iter)!="undefined"){
+obj=MochiKit.Iter.list(obj);
+l=obj.length;
+}else{
+throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
+}
+}
+if(!_18){
+_18=[];
+}
+for(var i=_1a;i<l;i++){
+_18.push(obj[i]);
+}
+}
+return _18;
+},updatetree:function(_1d,obj){
+if(_1d===null){
+_1d={};
+}
+for(var i=1;i<arguments.length;i++){
+var o=arguments[i];
+if(typeof (o)!="undefined"&&o!==null){
+for(var k in o){
+var v=o[k];
+if(typeof (_1d[k])=="object"&&typeof (v)=="object"){
+arguments.callee(_1d[k],v);
+}else{
+_1d[k]=v;
+}
+}
+}
+}
+return _1d;
+},setdefault:function(_23,obj){
+if(_23===null){
+_23={};
+}
+for(var i=1;i<arguments.length;i++){
+var o=arguments[i];
+for(var k in o){
+if(!(k in _23)){
+_23[k]=o[k];
+}
+}
+}
+return _23;
+},keys:function(obj){
+var _29=[];
+for(var _2a in obj){
+_29.push(_2a);
+}
+return _29;
+},values:function(obj){
+var _2c=[];
+for(var _2d in obj){
+_2c.push(obj[_2d]);
+}
+return _2c;
+},items:function(obj){
+var _2f=[];
+var e;
+for(var _31 in obj){
+var v;
+try{
+v=obj[_31];
+}
+catch(e){
+continue;
+}
+_2f.push([_31,v]);
+}
+return _2f;
+},_newNamedError:function(_33,_34,_35){
+_35.prototype=new MochiKit.Base.NamedError(_33.NAME+"."+_34);
+_33[_34]=_35;
+},operator:{truth:function(a){
+return !!a;
+},lognot:function(a){
+return !a;
+},identity:function(a){
+return a;
+},not:function(a){
+return ~a;
+},neg:function(a){
+return -a;
+},add:function(a,b){
+return a+b;
+},sub:function(a,b){
+return a-b;
+},div:function(a,b){
+return a/b;
+},mod:function(a,b){
+return a%b;
+},mul:function(a,b){
+return a*b;
+},and:function(a,b){
+return a&b;
+},or:function(a,b){
+return a|b;
+},xor:function(a,b){
+return a^b;
+},lshift:function(a,b){
+return a<<b;
+},rshift:function(a,b){
+return a>>b;
+},zrshift:function(a,b){
+return a>>>b;
+},eq:function(a,b){
+return a==b;
+},ne:function(a,b){
+return a!=b;
+},gt:function(a,b){
+return a>b;
+},ge:function(a,b){
+return a>=b;
+},lt:function(a,b){
+return a<b;
+},le:function(a,b){
+return a<=b;
+},seq:function(a,b){
+return a===b;
+},sne:function(a,b){
+return a!==b;
+},ceq:function(a,b){
+return MochiKit.Base.compare(a,b)===0;
+},cne:function(a,b){
+return MochiKit.Base.compare(a,b)!==0;
+},cgt:function(a,b){
+return MochiKit.Base.compare(a,b)==1;
+},cge:function(a,b){
+return MochiKit.Base.compare(a,b)!=-1;
+},clt:function(a,b){
+return MochiKit.Base.compare(a,b)==-1;
+},cle:function(a,b){
+return MochiKit.Base.compare(a,b)!=1;
+},logand:function(a,b){
+return a&&b;
+},logor:function(a,b){
+return a||b;
+},contains:function(a,b){
+return b in a;
+}},forwardCall:function(_73){
+return function(){
+return this[_73].apply(this,arguments);
+};
+},itemgetter:function(_74){
+return function(arg){
+return arg[_74];
+};
+},typeMatcher:function(){
+var _76={};
+for(var i=0;i<arguments.length;i++){
+var typ=arguments[i];
+_76[typ]=typ;
+}
+return function(){
+for(var i=0;i<arguments.length;i++){
+if(!(typeof (arguments[i]) in _76)){
+return false;
+}
+}
+return true;
+};
+},isNull:function(){
+for(var i=0;i<arguments.length;i++){
+if(arguments[i]!==null){
+return false;
+}
+}
+return true;
+},isUndefinedOrNull:function(){
+for(var i=0;i<arguments.length;i++){
+var o=arguments[i];
+if(!(typeof (o)=="undefined"||o===null)){
+return false;
+}
+}
+return true;
+},isEmpty:function(obj){
+return !MochiKit.Base.isNotEmpty.apply(this,arguments);
+},isNotEmpty:function(obj){
+for(var i=0;i<arguments.length;i++){
+var o=arguments[i];
+if(!(o&&o.length)){
+return false;
+}
+}
+return true;
+},isArrayLike:function(){
+for(var i=0;i<arguments.length;i++){
+var o=arguments[i];
+var typ=typeof (o);
+if((typ!="object"&&!(typ=="function"&&typeof (o.item)=="function"))||o===null||typeof (o.length)!="number"||o.nodeType===3){
+return false;
+}
+}
+return true;
+},isDateLike:function(){
+for(var i=0;i<arguments.length;i++){
+var o=arguments[i];
+if(typeof (o)!="object"||o===null||typeof (o.getTime)!="function"){
+return false;
+}
+}
+return true;
+},xmap:function(fn){
+if(fn===null){
+return MochiKit.Base.extend(null,arguments,1);
+}
+var _87=[];
+for(var i=1;i<arguments.length;i++){
+_87.push(fn(arguments[i]));
+}
+return _87;
+},map:function(fn,lst){
+var m=MochiKit.Base;
+var itr=MochiKit.Iter;
+var _8d=m.isArrayLike;
+if(arguments.length<=2){
+if(!_8d(lst)){
+if(itr){
+lst=itr.list(lst);
+if(fn===null){
+return lst;
+}
+}else{
+throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
+}
+}
+if(fn===null){
+return m.extend(null,lst);
+}
+var _8e=[];
+for(var i=0;i<lst.length;i++){
+_8e.push(fn(lst[i]));
+}
+return _8e;
+}else{
+if(fn===null){
+fn=Array;
+}
+var _90=null;
+for(i=1;i<arguments.length;i++){
+if(!_8d(arguments[i])){
+if(itr){
+return itr.list(itr.imap.apply(null,arguments));
+}else{
+throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
+}
+}
+var l=arguments[i].length;
+if(_90===null||_90>l){
+_90=l;
+}
+}
+_8e=[];
+for(i=0;i<_90;i++){
+var _92=[];
+for(var j=1;j<arguments.length;j++){
+_92.push(arguments[j][i]);
+}
+_8e.push(fn.apply(this,_92));
+}
+return _8e;
+}
+},xfilter:function(fn){
+var _95=[];
+if(fn===null){
+fn=MochiKit.Base.operator.truth;
+}
+for(var i=1;i<arguments.length;i++){
+var o=arguments[i];
+if(fn(o)){
+_95.push(o);
+}
+}
+return _95;
+},filter:function(fn,lst,_9a){
+var _9b=[];
+var m=MochiKit.Base;
+if(!m.isArrayLike(lst)){
+if(MochiKit.Iter){
+lst=MochiKit.Iter.list(lst);
+}else{
+throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
+}
+}
+if(fn===null){
+fn=m.operator.truth;
+}
+if(typeof (Array.prototype.filter)=="function"){
+return Array.prototype.filter.call(lst,fn,_9a);
+}else{
+if(typeof (_9a)=="undefined"||_9a===null){
+for(var i=0;i<lst.length;i++){
+var o=lst[i];
+if(fn(o)){
+_9b.push(o);
+}
+}
+}else{
+for(i=0;i<lst.length;i++){
+o=lst[i];
+if(fn.call(_9a,o)){
+_9b.push(o);
+}
+}
+}
+}
+return _9b;
+},_wrapDumbFunction:function(_9f){
+return function(){
+switch(arguments.length){
+case 0:
+return _9f();
+case 1:
+return _9f(arguments[0]);
+case 2:
+return _9f(arguments[0],arguments[1]);
+case 3:
+return _9f(arguments[0],arguments[1],arguments[2]);
+}
+var _a0=[];
+for(var i=0;i<arguments.length;i++){
+_a0.push("arguments["+i+"]");
+}
+return eval("(func("+_a0.join(",")+"))");
+};
+},methodcaller:function(_a2){
+var _a3=MochiKit.Base.extend(null,arguments,1);
+if(typeof (_a2)=="function"){
+return function(obj){
+return _a2.apply(obj,_a3);
+};
+}else{
+return function(obj){
+return obj[_a2].apply(obj,_a3);
+};
+}
+},method:function(_a6,_a7){
+var m=MochiKit.Base;
+return m.bind.apply(this,m.extend([_a7,_a6],arguments,2));
+},compose:function(f1,f2){
+var _ab=[];
+var m=MochiKit.Base;
+if(arguments.length===0){
+throw new TypeError("compose() requires at least one argument");
+}
+for(var i=0;i<arguments.length;i++){
+var fn=arguments[i];
+if(typeof (fn)!="function"){
+throw new TypeError(m.repr(fn)+" is not a function");
+}
+_ab.push(fn);
+}
+return function(){
+var _af=arguments;
+for(var i=_ab.length-1;i>=0;i--){
+_af=[_ab[i].apply(this,_af)];
+}
+return _af[0];
+};
+},bind:function(_b1,_b2){
+if(typeof (_b1)=="string"){
+_b1=_b2[_b1];
+}
+var _b3=_b1.im_func;
+var _b4=_b1.im_preargs;
+var _b5=_b1.im_self;
+var m=MochiKit.Base;
+if(typeof (_b1)=="function"&&typeof (_b1.apply)=="undefined"){
+_b1=m._wrapDumbFunction(_b1);
+}
+if(typeof (_b3)!="function"){
+_b3=_b1;
+}
+if(typeof (_b2)!="undefined"){
+_b5=_b2;
+}
+if(typeof (_b4)=="undefined"){
+_b4=[];
+}else{
+_b4=_b4.slice();
+}
+m.extend(_b4,arguments,2);
+var _b7=function(){
+var _b8=arguments;
+var me=arguments.callee;
+if(me.im_preargs.length>0){
+_b8=m.concat(me.im_preargs,_b8);
+}
+var _ba=me.im_self;
+if(!_ba){
+_ba=this;
+}
+return me.im_func.apply(_ba,_b8);
+};
+_b7.im_self=_b5;
+_b7.im_func=_b3;
+_b7.im_preargs=_b4;
+return _b7;
+},bindMethods:function(_bb){
+var _bc=MochiKit.Base.bind;
+for(var k in _bb){
+var _be=_bb[k];
+if(typeof (_be)=="function"){
+_bb[k]=_bc(_be,_bb);
+}
+}
+},registerComparator:function(_bf,_c0,_c1,_c2){
+MochiKit.Base.comparatorRegistry.register(_bf,_c0,_c1,_c2);
+},_primitives:{"boolean":true,"string":true,"number":true},compare:function(a,b){
+if(a==b){
+return 0;
+}
+var _c5=(typeof (a)=="undefined"||a===null);
+var _c6=(typeof (b)=="undefined"||b===null);
+if(_c5&&_c6){
+return 0;
+}else{
+if(_c5){
+return -1;
+}else{
+if(_c6){
+return 1;
+}
+}
+}
+var m=MochiKit.Base;
+var _c8=m._primitives;
+if(!(typeof (a) in _c8&&typeof (b) in _c8)){
+try{
+return m.comparatorRegistry.match(a,b);
+}
+catch(e){
+if(e!=m.NotFound){
+throw e;
+}
+}
+}
+if(a<b){
+return -1;
+}else{
+if(a>b){
+return 1;
+}
+}
+var _c9=m.repr;
+throw new TypeError(_c9(a)+" and "+_c9(b)+" can not be compared");
+},compareDateLike:function(a,b){
+return MochiKit.Base.compare(a.getTime(),b.getTime());
+},compareArrayLike:function(a,b){
+var _ce=MochiKit.Base.compare;
+var _cf=a.length;
+var _d0=0;
+if(_cf>b.length){
+_d0=1;
+_cf=b.length;
+}else{
+if(_cf<b.length){
+_d0=-1;
+}
+}
+for(var i=0;i<_cf;i++){
+var cmp=_ce(a[i],b[i]);
+if(cmp){
+return cmp;
+}
+}
+return _d0;
+},registerRepr:function(_d3,_d4,_d5,_d6){
+MochiKit.Base.reprRegistry.register(_d3,_d4,_d5,_d6);
+},repr:function(o){
+if(typeof (o)=="undefined"){
+return "undefined";
+}else{
+if(o===null){
+return "null";
+}
+}
+try{
+if(typeof (o.__repr__)=="function"){
+return o.__repr__();
+}else{
+if(typeof (o.repr)=="function"&&o.repr!=arguments.callee){
+return o.repr();
+}
+}
+return MochiKit.Base.reprRegistry.match(o);
+}
+catch(e){
+if(typeof (o.NAME)=="string"&&(o.toString==Function.prototype.toString||o.toString==Object.prototype.toString)){
+return o.NAME;
+}
+}
+try{
+var _d8=(o+"");
+}
+catch(e){
+return "["+typeof (o)+"]";
+}
+if(typeof (o)=="function"){
+o=_d8.replace(/^\s+/,"");
+var idx=o.indexOf("{");
+if(idx!=-1){
+o=o.substr(0,idx)+"{...}";
+}
+}
+return _d8;
+},reprArrayLike:function(o){
+var m=MochiKit.Base;
+return "["+m.map(m.repr,o).join(", ")+"]";
+},reprString:function(o){
+return ("\""+o.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(o){
+return o+"";
+},registerJSON:function(_de,_df,_e0,_e1){
+MochiKit.Base.jsonRegistry.register(_de,_df,_e0,_e1);
+},evalJSON:function(){
+return eval("("+arguments[0]+")");
+},serializeJSON:function(o){
+var _e3=typeof (o);
+if(_e3=="number"||_e3=="boolean"){
+return o+"";
+}else{
+if(o===null){
+return "null";
+}
+}
+var m=MochiKit.Base;
+var _e5=m.reprString;
+if(_e3=="string"){
+return _e5(o);
+}
+var me=arguments.callee;
+var _e7;
+if(typeof (o.__json__)=="function"){
+_e7=o.__json__();
+if(o!==_e7){
+return me(_e7);
+}
+}
+if(typeof (o.json)=="function"){
+_e7=o.json();
+if(o!==_e7){
+return me(_e7);
+}
+}
+if(_e3!="function"&&typeof (o.length)=="number"){
+var res=[];
+for(var i=0;i<o.length;i++){
+var val=me(o[i]);
+if(typeof (val)!="string"){
+val="undefined";
+}
+res.push(val);
+}
+return "["+res.join(", ")+"]";
+}
+try{
+_e7=m.jsonRegistry.match(o);
+if(o!==_e7){
+return me(_e7);
+}
+}
+catch(e){
+if(e!=m.NotFound){
+throw e;
+}
+}
+if(_e3=="undefined"){
+throw new TypeError("undefined can not be serialized as JSON");
+}
+if(_e3=="function"){
+return null;
+}
+res=[];
+for(var k in o){
+var _ec;
+if(typeof (k)=="number"){
+_ec="\""+k+"\"";
+}else{
+if(typeof (k)=="string"){
+_ec=_e5(k);
+}else{
+continue;
+}
+}
+val=me(o[k]);
+if(typeof (val)!="string"){
+continue;
+}
+res.push(_ec+":"+val);
+}
+return "{"+res.join(", ")+"}";
+},objEqual:function(a,b){
+return (MochiKit.Base.compare(a,b)===0);
+},arrayEqual:function(_ef,arr){
+if(_ef.length!=arr.length){
+return false;
+}
+return (MochiKit.Base.compare(_ef,arr)===0);
+},concat:function(){
+var _f1=[];
+var _f2=MochiKit.Base.extend;
+for(var i=0;i<arguments.length;i++){
+_f2(_f1,arguments[i]);
+}
+return _f1;
+},keyComparator:function(key){
+var m=MochiKit.Base;
+var _f6=m.compare;
+if(arguments.length==1){
+return function(a,b){
+return _f6(a[key],b[key]);
+};
+}
+var _f9=m.extend(null,arguments);
+return function(a,b){
+var _fc=0;
+for(var i=0;(_fc===0)&&(i<_f9.length);i++){
+var key=_f9[i];
+_fc=_f6(a[key],b[key]);
+}
+return _fc;
+};
+},reverseKeyComparator:function(key){
+var _100=MochiKit.Base.keyComparator.apply(this,arguments);
+return function(a,b){
+return _100(b,a);
+};
+},partial:function(func){
+var m=MochiKit.Base;
+return m.bind.apply(this,m.extend([func,undefined],arguments,1));
+},listMinMax:function(_105,lst){
+if(lst.length===0){
+return null;
+}
+var cur=lst[0];
+var _108=MochiKit.Base.compare;
+for(var i=1;i<lst.length;i++){
+var o=lst[i];
+if(_108(o,cur)==_105){
+cur=o;
+}
+}
+return cur;
+},objMax:function(){
+return MochiKit.Base.listMinMax(1,arguments);
+},objMin:function(){
+return MochiKit.Base.listMinMax(-1,arguments);
+},findIdentical:function(lst,_10c,_10d,end){
+if(typeof (end)=="undefined"||end===null){
+end=lst.length;
+}
+if(typeof (_10d)=="undefined"||_10d===null){
+_10d=0;
+}
+for(var i=_10d;i<end;i++){
+if(lst[i]===_10c){
+return i;
+}
+}
+return -1;
+},mean:function(){
+var sum=0;
+var m=MochiKit.Base;
+var args=m.extend(null,arguments);
+var _113=args.length;
+while(args.length){
+var o=args.shift();
+if(o&&typeof (o)=="object"&&typeof (o.length)=="number"){
+_113+=o.length-1;
+for(var i=o.length-1;i>=0;i--){
+sum+=o[i];
+}
+}else{
+sum+=o;
+}
+}
+if(_113<=0){
+throw new TypeError("mean() requires at least one argument");
+}
+return sum/_113;
+},median:function(){
+var data=MochiKit.Base.flattenArguments(arguments);
+if(data.length===0){
+throw new TypeError("median() requires at least one argument");
+}
+data.sort(compare);
+if(data.length%2==0){
+var _117=data.length/2;
+return (data[_117]+data[_117-1])/2;
+}else{
+return data[(data.length-1)/2];
+}
+},findValue:function(lst,_119,_11a,end){
+if(typeof (end)=="undefined"||end===null){
+end=lst.length;
+}
+if(typeof (_11a)=="undefined"||_11a===null){
+_11a=0;
+}
+var cmp=MochiKit.Base.compare;
+for(var i=_11a;i<end;i++){
+if(cmp(lst[i],_119)===0){
+return i;
+}
+}
+return -1;
+},nodeWalk:function(node,_11f){
+var _120=[node];
+var _121=MochiKit.Base.extend;
+while(_120.length){
+var res=_11f(_120.shift());
+if(res){
+_121(_120,res);
+}
+}
+},nameFunctions:function(_123){
+var base=_123.NAME;
+if(typeof (base)=="undefined"){
+base="";
+}else{
+base=base+".";
+}
+for(var name in _123){
+var o=_123[name];
+if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){
+try{
+o.NAME=base+name;
+}
+catch(e){
+}
+}
+}
+},queryString:function(_127,_128){
+if(typeof (MochiKit.DOM)!="undefined"&&arguments.length==1&&(typeof (_127)=="string"||(typeof (_127.nodeType)!="undefined"&&_127.nodeType>0))){
+var kv=MochiKit.DOM.formContents(_127);
+_127=kv[0];
+_128=kv[1];
+}else{
+if(arguments.length==1){
+if(typeof (_127.length)=="number"&&_127.length==2){
+return arguments.callee(_127[0],_127[1]);
+}
+var o=_127;
+_127=[];
+_128=[];
+for(var k in o){
+var v=o[k];
+if(typeof (v)=="function"){
+continue;
+}else{
+if(typeof (v)!="string"&&typeof (v.length)=="number"){
+for(var i=0;i<v.length;i++){
+_127.push(k);
+_128.push(v[i]);
+}
+}else{
+_127.push(k);
+_128.push(v);
+}
+}
+}
+}
+}
+var rval=[];
+var len=Math.min(_127.length,_128.length);
+var _130=MochiKit.Base.urlEncode;
+for(var i=0;i<len;i++){
+v=_128[i];
+if(typeof (v)!="undefined"&&v!==null){
+rval.push(_130(_127[i])+"="+_130(v));
+}
+}
+return rval.join("&");
+},parseQueryString:function(_131,_132){
+var qstr=(_131.charAt(0)=="?")?_131.substring(1):_131;
+var _134=qstr.replace(/\+/g,"%20").split(/(\&\;|\&\#38\;|\&|\&)/);
+var o={};
+var _136;
+if(typeof (decodeURIComponent)!="undefined"){
+_136=decodeURIComponent;
+}else{
+_136=unescape;
+}
+if(_132){
+for(var i=0;i<_134.length;i++){
+var pair=_134[i].split("=");
+var name=_136(pair.shift());
+if(!name){
+continue;
+}
+var arr=o[name];
+if(!(arr instanceof Array)){
+arr=[];
+o[name]=arr;
+}
+arr.push(_136(pair.join("=")));
+}
+}else{
+for(i=0;i<_134.length;i++){
+pair=_134[i].split("=");
+var name=pair.shift();
+if(!name){
+continue;
+}
+o[_136(name)]=_136(pair.join("="));
+}
+}
+return o;
+}});
+MochiKit.Base.AdapterRegistry=function(){
+this.pairs=[];
+};
+MochiKit.Base.AdapterRegistry.prototype={register:function(name,_13c,wrap,_13e){
+if(_13e){
+this.pairs.unshift([name,_13c,wrap]);
+}else{
+this.pairs.push([name,_13c,wrap]);
+}
+},match:function(){
+for(var i=0;i<this.pairs.length;i++){
+var pair=this.pairs[i];
+if(pair[1].apply(this,arguments)){
+return pair[2].apply(this,arguments);
+}
+}
+throw MochiKit.Base.NotFound;
+},unregister:function(name){
+for(var i=0;i<this.pairs.length;i++){
+var pair=this.pairs[i];
+if(pair[0]==name){
+this.pairs.splice(i,1);
+return true;
+}
+}
+return false;
+}};
+MochiKit.Base.EXPORT=["flattenArray","noop","camelize","counter","clone","extend","update","updatetree","setdefault","keys","values","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(_144,_145){
+if(!MochiKit.__export__){
+return;
+}
+var all=_145.EXPORT_TAGS[":all"];
+for(var i=0;i<all.length;i++){
+_144[all[i]]=_145[all[i]];
+}
+};
+MochiKit.Base.__new__=function(){
+var m=this;
+m.noop=m.operator.identity;
+m.forward=m.forwardCall;
+m.find=m.findValue;
+if(typeof (encodeURIComponent)!="undefined"){
+m.urlEncode=function(_149){
+return encodeURIComponent(_149).replace(/\'/g,"%27");
+};
+}else{
+m.urlEncode=function(_14a){
+return escape(_14a).replace(/\+/g,"%2B").replace(/\"/g,"%22").rval.replace(/\'/g,"%27");
+};
+}
+m.NamedError=function(name){
+this.message=name;
+this.name=name;
+};
+m.NamedError.prototype=new Error();
+m.update(m.NamedError.prototype,{repr:function(){
+if(this.message&&this.message!=this.name){
+return this.name+"("+m.repr(this.message)+")";
+}else{
+return this.name+"()";
+}
+},toString:m.forwardCall("repr")});
+m.NotFound=new m.NamedError("MochiKit.Base.NotFound");
+m.listMax=m.partial(m.listMinMax,1);
+m.listMin=m.partial(m.listMinMax,-1);
+m.isCallable=m.typeMatcher("function");
+m.isUndefined=m.typeMatcher("undefined");
+m.merge=m.partial(m.update,null);
+m.zip=m.partial(m.map,null);
+m.average=m.mean;
+m.comparatorRegistry=new m.AdapterRegistry();
+m.registerComparator("dateLike",m.isDateLike,m.compareDateLike);
+m.registerComparator("arrayLike",m.isArrayLike,m.compareArrayLike);
+m.reprRegistry=new m.AdapterRegistry();
+m.registerRepr("arrayLike",m.isArrayLike,m.reprArrayLike);
+m.registerRepr("string",m.typeMatcher("string"),m.reprString);
+m.registerRepr("numbers",m.typeMatcher("number","boolean"),m.reprNumber);
+m.jsonRegistry=new m.AdapterRegistry();
+var all=m.concat(m.EXPORT,m.EXPORT_OK);
+m.EXPORT_TAGS={":common":m.concat(m.EXPORT_OK),":all":all};
+m.nameFunctions(this);
+};
+MochiKit.Base.__new__();
+if(MochiKit.__export__){
+compare=MochiKit.Base.compare;
+compose=MochiKit.Base.compose;
+serializeJSON=MochiKit.Base.serializeJSON;
+}
+MochiKit.Base._exportSymbols(this,MochiKit.Base);
+
+
Date.ext={};Date.ext.util={};Date.ext.util.xPad=function(x,pad,r){if(typeof (r)=="undefined"){r=10}for(;parseInt(x,10)<r&&r>1;r/=10){x=pad.toString()+x}return x.toString()};Date.prototype.locale="en-GB";if(document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang){Date.prototype.locale=document.getElementsByTagName("html")[0].lang}Date.ext.locales={};Date.ext.locales.en={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],x:"%d/%m/%y",X:"%T"};Date.ext.locales["en-US"]=Date.ext.locales.en;Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z";Date.ext.locales["en-US"].x="%D";Date.ext.locales["en-US"].X="%r";Date.ext.locales["en-GB"]=Date.ext.locales.en;Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"];Date.ext.formats={a:function(d){return Date.ext.locales[d.locale].a[d.getDay()]},A:function(d){return Date.ext.locales[d.locale].A[d.getDay()]},b:function(d){return Date.ext.locales[d.locale].b[d.getMonth()]},B:function(d){return Date.ext.locales[d.locale].B[d.getMonth()]},c:"toLocaleString",C:function(d){return Date.ext.util.xPad(parseInt(d.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(d){return Date.ext.util.xPad(parseInt(Date.ext.util.G(d)/100,10),0)},G:function(d){var y=d.getFullYear();var V=parseInt(Date.ext.formats.V(d),10);var W=parseInt(Date.ext.formats.W(d),10);if(W>V){y++}else{if(W===0&&V>=52){y--}}return y},H:["getHours","0"],I:function(d){var I=d.getHours()%12;return Date.ext.util.xPad(I===0?12:I,0)},j:function(d){var ms=d-new Date(""+d.getFullYear()+"/1/1 GMT");ms+=d.getTimezoneOffset()*60000;var doy=parseInt(ms/60000/60/24,10)+1;return Date.ext.util.xPad(doy,0,100)},m:function(d){return Date.ext.util.xPad(d.getMonth()+1,0)},M:["getMinutes","0"],p:function(d){return Date.ext.locales[d.locale].p[d.getHours()>=12?1:0]},P:function(d){return Date.ext.locales[d.locale].P[d.getHours()>=12?1:0]},S:["getSeconds","0"],u:function(d){var dow=d.getDay();return dow===0?7:dow},U:function(d){var doy=parseInt(Date.ext.formats.j(d),10);var rdow=6-d.getDay();var woy=parseInt((doy+rdow)/7,10);return Date.ext.util.xPad(woy,0)},V:function(d){var woy=parseInt(Date.ext.formats.W(d),10);var dow1_1=(new Date(""+d.getFullYear()+"/1/1")).getDay();var idow=woy+(dow1_1>4||dow1_1<=1?0:1);if(idow==53&&(new Date(""+d.getFullYear()+"/12/31")).getDay()<4){idow=1}else{if(idow===0){idow=Date.ext.formats.V(new Date(""+(d.getFullYear()-1)+"/12/31"))}}return Date.ext.util.xPad(idow,0)},w:"getDay",W:function(d){var doy=parseInt(Date.ext.formats.j(d),10);var rdow=7-Date.ext.formats.u(d);var woy=parseInt((doy+rdow)/7,10);return Date.ext.util.xPad(woy,0,10)},y:function(d){return Date.ext.util.xPad(d.getFullYear()%100,0)},Y:"getFullYear",z:function(d){var o=d.getTimezoneOffset();var H=Date.ext.util.xPad(parseInt(Math.abs(o/60),10),0);var M=Date.ext.util.xPad(o%60,0);return(o>0?"-":"+")+H+M},Z:function(d){return d.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(d){return"%"}};Date.ext.aggregates={c:"locale",D:"%m/%d/%y",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"};Date.ext.aggregates.z=Date.ext.formats.z(new Date());Date.ext.aggregates.Z=Date.ext.formats.Z(new Date());Date.ext.unsupported={};Date.prototype.strftime=function(fmt){if(!(this.locale in Date.ext.locales)){if(this.locale.replace(/-[a-zA-Z]+$/,"") in Date.ext.locales){this.locale=this.locale.replace(/-[a-zA-Z]+$/,"")}else{this.locale="en-GB"}}var d=this;while(fmt.match(/%[cDhnrRtTxXzZ]/)){fmt=fmt.replace(/%([cDhnrRtTxXzZ])/g,function(m0,m1){var f=Date.ext.aggregates[m1];return(f=="locale"?Date.ext.locales[d.locale][m1]:f)})}var str=fmt.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,function(m0,m1){var f=Date.ext.formats[m1];if(typeof (f)=="string"){return d[f]()}else{if(typeof (f)=="function"){return f.call(d,d)}else{if(typeof (f)=="object"&&typeof (f[0])=="string"){return Date.ext.util.xPad(d[f[0]](),f[1])}else{return m1}}}});d=null;return str};
DygraphLayout=function(_1,_2){
this.dygraph_=_1;
DygraphCanvasRenderer.isSupported=function(_31){
var _32=null;
try{
-if(MochiKit.Base.isUndefinedOrNull(_31)){
+if(typeof (_31)=="undefined"||_31==null){
_32=document.createElement("canvas");
}else{
_32=_31;
var _53=this.element.getContext("2d");
var _54=this.options.colorScheme.length;
var _55=this.options.colorScheme;
-var _56=MochiKit.Base.keys(this.layout.datasets);
-var _57=this.layout.options.errorBars;
-var _58=_56.length;
-var _59=MochiKit.Base.bind;
-var _60=MochiKit.Base.partial;
+var _56=this.layout.options.errorBars;
+var _57=MochiKit.Base.bind;
+var _58=[];
+for(var _59 in this.layout.datasets){
+_58.push(_59);
+}
+var _60=_58.length;
for(var i=0;i<this.layout.points.length;i++){
var _61=this.layout.points[i];
_61.canvasx=this.area.w*_61.x+this.area.x;
return x&&!isNaN(x);
};
var _63=function(ctx){
-for(var i=0;i<_58;i++){
-var _64=_56[i];
+for(var i=0;i<_60;i++){
+var _64=_58[i];
var _65=_55[i%_54];
_53.save();
var _61=this.layout.points[0];
}
};
var _71=function(ctx){
-for(var i=0;i<_58;i++){
-var _72=_56[i];
+for(var i=0;i<_60;i++){
+var _72=_58[i];
var _73=_55[i%_54];
_53.save();
_53.strokeStyle=_73;
ctx.fill();
}
};
-if(_57){
-_59(_71,this)(_53);
+if(_56){
+_57(_71,this)(_53);
}
-_59(_63,this)(_53);
+_57(_63,this)(_53);
_53.restore();
};
Dygraph=function(div,_82,_83){