dygraphs finally stays within its bounds! removed padding property and tweaked PlotKi...
[dygraphs.git] / dygraph-combined.js
index f0123ae..6cf8d2d 100644 (file)
@@ -1002,234 +1002,617 @@ serializeJSON=MochiKit.Base.serializeJSON;
 }
 MochiKit.Base._exportSymbols(this,MochiKit.Base);
 if(typeof (dojo)!="undefined"){
-dojo.provide("MochiKit.Format");
+dojo.provide("MochiKit.Iter");
+dojo.require("MochiKit.Base");
 }
-if(typeof (MochiKit)=="undefined"){
-MochiKit={};
+if(typeof (JSAN)!="undefined"){
+JSAN.use("MochiKit.Base",[]);
+}
+try{
+if(typeof (MochiKit.Base)=="undefined"){
+throw "";
+}
+}
+catch(e){
+throw "MochiKit.Iter depends on MochiKit.Base!";
 }
-if(typeof (MochiKit.Format)=="undefined"){
-MochiKit.Format={};
+if(typeof (MochiKit.Iter)=="undefined"){
+MochiKit.Iter={};
 }
-MochiKit.Format.NAME="MochiKit.Format";
-MochiKit.Format.VERSION="1.4";
-MochiKit.Format.__repr__=function(){
+MochiKit.Iter.NAME="MochiKit.Iter";
+MochiKit.Iter.VERSION="1.4";
+MochiKit.Base.update(MochiKit.Iter,{__repr__:function(){
 return "["+this.NAME+" "+this.VERSION+"]";
-};
-MochiKit.Format.toString=function(){
+},toString:function(){
 return this.__repr__();
-};
-MochiKit.Format._numberFormatter=function(_14d,_14e,_14f,_150,_151,_152,_153,_154,_155){
-return function(num){
-num=parseFloat(num);
-if(typeof (num)=="undefined"||num===null||isNaN(num)){
-return _14d;
+},registerIteratorFactory:function(name,_14e,_14f,_150){
+MochiKit.Iter.iteratorRegistry.register(name,_14e,_14f,_150);
+},iter:function(_151,_152){
+var self=MochiKit.Iter;
+if(arguments.length==2){
+return self.takewhile(function(a){
+return a!=_152;
+},_151);
 }
-var _157=_14e;
-var _158=_14f;
-if(num<0){
-num=-num;
+if(typeof (_151.next)=="function"){
+return _151;
 }else{
-_157=_157.replace(/-/,"");
+if(typeof (_151.iter)=="function"){
+return _151.iter();
 }
-var me=arguments.callee;
-var fmt=MochiKit.Format.formatLocale(_150);
-if(_151){
-num=num*100;
-_158=fmt.percent+_158;
-}
-num=MochiKit.Format.roundToFixed(num,_152);
-var _15b=num.split(/\./);
-var _15c=_15b[0];
-var frac=(_15b.length==1)?"":_15b[1];
-var res="";
-while(_15c.length<_153){
-_15c="0"+_15c;
-}
-if(_154){
-while(_15c.length>_154){
-var i=_15c.length-_154;
-res=fmt.separator+_15c.substring(i,_15c.length)+res;
-_15c=_15c.substring(0,i);
-}
-}
-res=_15c+res;
-if(_152>0){
-while(frac.length<_155){
-frac=frac+"0";
-}
-res=res+fmt.decimal+frac;
-}
-return _157+res+_158;
-};
-};
-MochiKit.Format.numberFormatter=function(_160,_161,_162){
-if(typeof (_161)=="undefined"){
-_161="";
-}
-var _163=_160.match(/((?:[0#]+,)?[0#]+)(?:\.([0#]+))?(%)?/);
-if(!_163){
-throw TypeError("Invalid pattern");
-}
-var _164=_160.substr(0,_163.index);
-var _165=_160.substr(_163.index+_163[0].length);
-if(_164.search(/-/)==-1){
-_164=_164+"-";
-}
-var _166=_163[1];
-var frac=(typeof (_163[2])=="string"&&_163[2]!="")?_163[2]:"";
-var _168=(typeof (_163[3])=="string"&&_163[3]!="");
-var tmp=_166.split(/,/);
-var _16a;
-if(typeof (_162)=="undefined"){
-_162="default";
-}
-if(tmp.length==1){
-_16a=null;
-}else{
-_16a=tmp[1].length;
-}
-var _16b=_166.length-_166.replace(/0/g,"").length;
-var _16c=frac.length-frac.replace(/0/g,"").length;
-var _16d=frac.length;
-var rval=MochiKit.Format._numberFormatter(_161,_164,_165,_162,_168,_16d,_16b,_16a,_16c);
+}
+try{
+return self.iteratorRegistry.match(_151);
+}
+catch(e){
 var m=MochiKit.Base;
-if(m){
-var fn=arguments.callee;
-var args=m.concat(arguments);
-rval.repr=function(){
-return [self.NAME,"(",map(m.repr,args).join(", "),")"].join("");
-};
+if(e==m.NotFound){
+e=new TypeError(typeof (_151)+": "+m.repr(_151)+" is not iterable");
+}
+throw e;
+}
+},count:function(n){
+if(!n){
+n=0;
 }
+var m=MochiKit.Base;
+return {repr:function(){
+return "count("+n+")";
+},toString:m.forwardCall("repr"),next:m.counter(n)};
+},cycle:function(p){
+var self=MochiKit.Iter;
+var m=MochiKit.Base;
+var lst=[];
+var _15c=self.iter(p);
+return {repr:function(){
+return "cycle(...)";
+},toString:m.forwardCall("repr"),next:function(){
+try{
+var rval=_15c.next();
+lst.push(rval);
 return rval;
+}
+catch(e){
+if(e!=self.StopIteration){
+throw e;
+}
+if(lst.length===0){
+this.next=function(){
+throw self.StopIteration;
 };
-MochiKit.Format.formatLocale=function(_172){
-if(typeof (_172)=="undefined"||_172===null){
-_172="default";
+}else{
+var i=-1;
+this.next=function(){
+i=(i+1)%lst.length;
+return lst[i];
+};
+}
+return this.next();
+}
+}};
+},repeat:function(elem,n){
+var m=MochiKit.Base;
+if(typeof (n)=="undefined"){
+return {repr:function(){
+return "repeat("+m.repr(elem)+")";
+},toString:m.forwardCall("repr"),next:function(){
+return elem;
+}};
+}
+return {repr:function(){
+return "repeat("+m.repr(elem)+", "+n+")";
+},toString:m.forwardCall("repr"),next:function(){
+if(n<=0){
+throw MochiKit.Iter.StopIteration;
+}
+n-=1;
+return elem;
+}};
+},next:function(_162){
+return _162.next();
+},izip:function(p,q){
+var m=MochiKit.Base;
+var self=MochiKit.Iter;
+var next=self.next;
+var _168=m.map(self.iter,arguments);
+return {repr:function(){
+return "izip(...)";
+},toString:m.forwardCall("repr"),next:function(){
+return m.map(next,_168);
+}};
+},ifilter:function(pred,seq){
+var m=MochiKit.Base;
+seq=MochiKit.Iter.iter(seq);
+if(pred===null){
+pred=m.operator.truth;
+}
+return {repr:function(){
+return "ifilter(...)";
+},toString:m.forwardCall("repr"),next:function(){
+while(true){
+var rval=seq.next();
+if(pred(rval)){
+return rval;
+}
+}
+return undefined;
+}};
+},ifilterfalse:function(pred,seq){
+var m=MochiKit.Base;
+seq=MochiKit.Iter.iter(seq);
+if(pred===null){
+pred=m.operator.truth;
+}
+return {repr:function(){
+return "ifilterfalse(...)";
+},toString:m.forwardCall("repr"),next:function(){
+while(true){
+var rval=seq.next();
+if(!pred(rval)){
+return rval;
+}
+}
+return undefined;
+}};
+},islice:function(seq){
+var self=MochiKit.Iter;
+var m=MochiKit.Base;
+seq=self.iter(seq);
+var _174=0;
+var stop=0;
+var step=1;
+var i=-1;
+if(arguments.length==2){
+stop=arguments[1];
+}else{
+if(arguments.length==3){
+_174=arguments[1];
+stop=arguments[2];
+}else{
+_174=arguments[1];
+stop=arguments[2];
+step=arguments[3];
+}
+}
+return {repr:function(){
+return "islice("+["...",_174,stop,step].join(", ")+")";
+},toString:m.forwardCall("repr"),next:function(){
+var rval;
+while(i<_174){
+rval=seq.next();
+i++;
+}
+if(_174>=stop){
+throw self.StopIteration;
+}
+_174+=step;
+return rval;
+}};
+},imap:function(fun,p,q){
+var m=MochiKit.Base;
+var self=MochiKit.Iter;
+var _17e=m.map(self.iter,m.extend(null,arguments,1));
+var map=m.map;
+var next=self.next;
+return {repr:function(){
+return "imap(...)";
+},toString:m.forwardCall("repr"),next:function(){
+return fun.apply(this,map(next,_17e));
+}};
+},applymap:function(fun,seq,self){
+seq=MochiKit.Iter.iter(seq);
+var m=MochiKit.Base;
+return {repr:function(){
+return "applymap(...)";
+},toString:m.forwardCall("repr"),next:function(){
+return fun.apply(self,seq.next());
+}};
+},chain:function(p,q){
+var self=MochiKit.Iter;
+var m=MochiKit.Base;
+if(arguments.length==1){
+return self.iter(arguments[0]);
+}
+var _189=m.map(self.iter,arguments);
+return {repr:function(){
+return "chain(...)";
+},toString:m.forwardCall("repr"),next:function(){
+while(_189.length>1){
+try{
+return _189[0].next();
+}
+catch(e){
+if(e!=self.StopIteration){
+throw e;
+}
+_189.shift();
+}
+}
+if(_189.length==1){
+var arg=_189.shift();
+this.next=m.bind("next",arg);
+return this.next();
+}
+throw self.StopIteration;
+}};
+},takewhile:function(pred,seq){
+var self=MochiKit.Iter;
+seq=self.iter(seq);
+return {repr:function(){
+return "takewhile(...)";
+},toString:MochiKit.Base.forwardCall("repr"),next:function(){
+var rval=seq.next();
+if(!pred(rval)){
+this.next=function(){
+throw self.StopIteration;
+};
+this.next();
+}
+return rval;
+}};
+},dropwhile:function(pred,seq){
+seq=MochiKit.Iter.iter(seq);
+var m=MochiKit.Base;
+var bind=m.bind;
+return {"repr":function(){
+return "dropwhile(...)";
+},"toString":m.forwardCall("repr"),"next":function(){
+while(true){
+var rval=seq.next();
+if(!pred(rval)){
+break;
 }
-if(typeof (_172)=="string"){
-var rval=MochiKit.Format.LOCALE[_172];
-if(typeof (rval)=="string"){
-rval=arguments.callee(rval);
-MochiKit.Format.LOCALE[_172]=rval;
 }
+this.next=bind("next",seq);
 return rval;
+}};
+},_tee:function(_194,sync,_196){
+sync.pos[_194]=-1;
+var m=MochiKit.Base;
+var _198=m.listMin;
+return {repr:function(){
+return "tee("+_194+", ...)";
+},toString:m.forwardCall("repr"),next:function(){
+var rval;
+var i=sync.pos[_194];
+if(i==sync.max){
+rval=_196.next();
+sync.deque.push(rval);
+sync.max+=1;
+sync.pos[_194]+=1;
 }else{
-return _172;
+rval=sync.deque[i-sync.min];
+sync.pos[_194]+=1;
+if(i==sync.min&&_198(sync.pos)!=sync.min){
+sync.min+=1;
+sync.deque.shift();
 }
-};
-MochiKit.Format.twoDigitAverage=function(_174,_175){
-if(_175){
-var res=_174/_175;
-if(!isNaN(res)){
-return MochiKit.Format.twoDigitFloat(_174/_175);
 }
+return rval;
+}};
+},tee:function(_19b,n){
+var rval=[];
+var sync={"pos":[],"deque":[],"max":-1,"min":-1};
+if(arguments.length==1||typeof (n)=="undefined"||n===null){
+n=2;
+}
+var self=MochiKit.Iter;
+_19b=self.iter(_19b);
+var _tee=self._tee;
+for(var i=0;i<n;i++){
+rval.push(_tee(i,sync,_19b));
+}
+return rval;
+},list:function(_1a2){
+var rval;
+if(_1a2 instanceof Array){
+return _1a2.slice();
+}
+if(typeof (_1a2)=="function"&&!(_1a2 instanceof Function)&&typeof (_1a2.length)=="number"){
+rval=[];
+for(var i=0;i<_1a2.length;i++){
+rval.push(_1a2[i]);
+}
+return rval;
+}
+var self=MochiKit.Iter;
+_1a2=self.iter(_1a2);
+var rval=[];
+try{
+while(true){
+rval.push(_1a2.next());
+}
+}
+catch(e){
+if(e!=self.StopIteration){
+throw e;
+}
+return rval;
+}
+return undefined;
+},reduce:function(fn,_1a7,_1a8){
+var i=0;
+var x=_1a8;
+var self=MochiKit.Iter;
+_1a7=self.iter(_1a7);
+if(arguments.length<3){
+try{
+x=_1a7.next();
+}
+catch(e){
+if(e==self.StopIteration){
+e=new TypeError("reduce() of empty sequence with no initial value");
+}
+throw e;
+}
+i++;
+}
+try{
+while(true){
+x=fn(x,_1a7.next());
 }
-return "0";
-};
-MochiKit.Format.twoDigitFloat=function(_177){
-var sign=(_177<0?"-":"");
-var s=Math.floor(Math.abs(_177)*100).toString();
-if(s=="0"){
-return s;
 }
-if(s.length<3){
-while(s.charAt(s.length-1)=="0"){
-s=s.substring(0,s.length-1);
+catch(e){
+if(e!=self.StopIteration){
+throw e;
 }
-return sign+"0."+s;
 }
-var head=sign+s.substring(0,s.length-2);
-var tail=s.substring(s.length-2,s.length);
-if(tail=="00"){
-return head;
+return x;
+},range:function(){
+var _1ac=0;
+var stop=0;
+var step=1;
+if(arguments.length==1){
+stop=arguments[0];
+}else{
+if(arguments.length==2){
+_1ac=arguments[0];
+stop=arguments[1];
 }else{
-if(tail.charAt(1)=="0"){
-return head+"."+tail.charAt(0);
+if(arguments.length==3){
+_1ac=arguments[0];
+stop=arguments[1];
+step=arguments[2];
 }else{
-return head+"."+tail;
+throw new TypeError("range() takes 1, 2, or 3 arguments!");
 }
 }
-};
-MochiKit.Format.lstrip=function(str,_17d){
-str=str+"";
-if(typeof (str)!="string"){
-return null;
 }
-if(!_17d){
-return str.replace(/^\s+/,"");
-}else{
-return str.replace(new RegExp("^["+_17d+"]+"),"");
+if(step===0){
+throw new TypeError("range() step must not be 0");
+}
+return {next:function(){
+if((step>0&&_1ac>=stop)||(step<0&&_1ac<=stop)){
+throw MochiKit.Iter.StopIteration;
+}
+var rval=_1ac;
+_1ac+=step;
+return rval;
+},repr:function(){
+return "range("+[_1ac,stop,step].join(", ")+")";
+},toString:MochiKit.Base.forwardCall("repr")};
+},sum:function(_1b0,_1b1){
+if(typeof (_1b1)=="undefined"||_1b1===null){
+_1b1=0;
+}
+var x=_1b1;
+var self=MochiKit.Iter;
+_1b0=self.iter(_1b0);
+try{
+while(true){
+x+=_1b0.next();
+}
+}
+catch(e){
+if(e!=self.StopIteration){
+throw e;
+}
+}
+return x;
+},exhaust:function(_1b4){
+var self=MochiKit.Iter;
+_1b4=self.iter(_1b4);
+try{
+while(true){
+_1b4.next();
+}
+}
+catch(e){
+if(e!=self.StopIteration){
+throw e;
+}
+}
+},forEach:function(_1b6,func,self){
+var m=MochiKit.Base;
+if(arguments.length>2){
+func=m.bind(func,self);
+}
+if(m.isArrayLike(_1b6)){
+try{
+for(var i=0;i<_1b6.length;i++){
+func(_1b6[i]);
+}
+}
+catch(e){
+if(e!=MochiKit.Iter.StopIteration){
+throw e;
 }
-};
-MochiKit.Format.rstrip=function(str,_17f){
-str=str+"";
-if(typeof (str)!="string"){
-return null;
 }
-if(!_17f){
-return str.replace(/\s+$/,"");
 }else{
-return str.replace(new RegExp("["+_17f+"]+$"),"");
+self=MochiKit.Iter;
+self.exhaust(self.imap(func,_1b6));
 }
-};
-MochiKit.Format.strip=function(str,_181){
-var self=MochiKit.Format;
-return self.rstrip(self.lstrip(str,_181),_181);
-};
-MochiKit.Format.truncToFixed=function(_183,_184){
-_183=Math.floor(_183*Math.pow(10,_184));
-var res=(_183*Math.pow(10,-_184)).toFixed(_184);
-if(res.charAt(0)=="."){
-res="0"+res;
+},every:function(_1bb,func){
+var self=MochiKit.Iter;
+try{
+self.ifilterfalse(func,_1bb).next();
+return false;
 }
-return res;
-};
-MochiKit.Format.roundToFixed=function(_186,_187){
-return MochiKit.Format.truncToFixed(_186+0.5*Math.pow(10,-_187),_187);
-};
-MochiKit.Format.percentFormat=function(_188){
-return MochiKit.Format.twoDigitFloat(100*_188)+"%";
-};
-MochiKit.Format.EXPORT=["truncToFixed","roundToFixed","numberFormatter","formatLocale","twoDigitAverage","twoDigitFloat","percentFormat","lstrip","rstrip","strip"];
-MochiKit.Format.LOCALE={en_US:{separator:",",decimal:".",percent:"%"},de_DE:{separator:".",decimal:",",percent:"%"},fr_FR:{separator:" ",decimal:",",percent:"%"},"default":"en_US"};
-MochiKit.Format.EXPORT_OK=[];
-MochiKit.Format.EXPORT_TAGS={":all":MochiKit.Format.EXPORT,":common":MochiKit.Format.EXPORT};
-MochiKit.Format.__new__=function(){
-var base=this.NAME+".";
-var k,v,o;
-for(k in this.LOCALE){
-o=this.LOCALE[k];
-if(typeof (o)=="object"){
-o.repr=function(){
-return this.NAME;
-};
-o.NAME=base+"LOCALE."+k;
+catch(e){
+if(e!=self.StopIteration){
+throw e;
 }
+return true;
 }
-for(k in this){
-o=this[k];
-if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){
+},sorted:function(_1be,cmp){
+var rval=MochiKit.Iter.list(_1be);
+if(arguments.length==1){
+cmp=MochiKit.Base.compare;
+}
+rval.sort(cmp);
+return rval;
+},reversed:function(_1c1){
+var rval=MochiKit.Iter.list(_1c1);
+rval.reverse();
+return rval;
+},some:function(_1c3,func){
+var self=MochiKit.Iter;
 try{
-o.NAME=base+k;
+self.ifilter(func,_1c3).next();
+return true;
 }
 catch(e){
+if(e!=self.StopIteration){
+throw e;
 }
+return false;
 }
+},iextend:function(lst,_1c7){
+if(MochiKit.Base.isArrayLike(_1c7)){
+for(var i=0;i<_1c7.length;i++){
+lst.push(_1c7[i]);
 }
-};
-MochiKit.Format.__new__();
-if(typeof (MochiKit.Base)!="undefined"){
-MochiKit.Base._exportSymbols(this,MochiKit.Format);
 }else{
-(function(_18d,_18e){
-if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(MochiKit.__export__===false)){
-var all=_18e.EXPORT_TAGS[":all"];
-for(var i=0;i<all.length;i++){
-_18d[all[i]]=_18e[all[i]];
+var self=MochiKit.Iter;
+_1c7=self.iter(_1c7);
+try{
+while(true){
+lst.push(_1c7.next());
+}
+}
+catch(e){
+if(e!=self.StopIteration){
+throw e;
+}
+}
+}
+return lst;
+},groupby:function(_1ca,_1cb){
+var m=MochiKit.Base;
+var self=MochiKit.Iter;
+if(arguments.length<2){
+_1cb=m.operator.identity;
+}
+_1ca=self.iter(_1ca);
+var pk=undefined;
+var k=undefined;
+var v;
+function fetch(){
+v=_1ca.next();
+k=_1cb(v);
+}
+function eat(){
+var ret=v;
+v=undefined;
+return ret;
+}
+var _1d2=true;
+var _1d3=m.compare;
+return {repr:function(){
+return "groupby(...)";
+},next:function(){
+while(_1d3(k,pk)===0){
+fetch();
+if(_1d2){
+_1d2=false;
+break;
+}
+}
+pk=k;
+return [k,{next:function(){
+if(v==undefined){
+fetch();
+}
+if(_1d3(k,pk)!==0){
+throw self.StopIteration;
+}
+return eat();
+}}];
+}};
+},groupby_as_array:function(_1d4,_1d5){
+var m=MochiKit.Base;
+var self=MochiKit.Iter;
+if(arguments.length<2){
+_1d5=m.operator.identity;
+}
+_1d4=self.iter(_1d4);
+var _1d8=[];
+var _1d9=true;
+var _1da;
+var _1db=m.compare;
+while(true){
+try{
+var _1dc=_1d4.next();
+var key=_1d5(_1dc);
+}
+catch(e){
+if(e==self.StopIteration){
+break;
+}
+throw e;
+}
+if(_1d9||_1db(key,_1da)!==0){
+var _1de=[];
+_1d8.push([key,_1de]);
+}
+_1de.push(_1dc);
+_1d9=false;
+_1da=key;
+}
+return _1d8;
+},arrayLikeIter:function(_1df){
+var i=0;
+return {repr:function(){
+return "arrayLikeIter(...)";
+},toString:MochiKit.Base.forwardCall("repr"),next:function(){
+if(i>=_1df.length){
+throw MochiKit.Iter.StopIteration;
+}
+return _1df[i++];
+}};
+},hasIterateNext:function(_1e1){
+return (_1e1&&typeof (_1e1.iterateNext)=="function");
+},iterateNextIter:function(_1e2){
+return {repr:function(){
+return "iterateNextIter(...)";
+},toString:MochiKit.Base.forwardCall("repr"),next:function(){
+var rval=_1e2.iterateNext();
+if(rval===null||rval===undefined){
+throw MochiKit.Iter.StopIteration;
 }
+return rval;
+}};
+}});
+MochiKit.Iter.EXPORT_OK=["iteratorRegistry","arrayLikeIter","hasIterateNext","iterateNextIter"];
+MochiKit.Iter.EXPORT=["StopIteration","registerIteratorFactory","iter","count","cycle","repeat","next","izip","ifilter","ifilterfalse","islice","imap","applymap","chain","takewhile","dropwhile","tee","list","reduce","range","sum","exhaust","forEach","every","sorted","reversed","some","iextend","groupby","groupby_as_array"];
+MochiKit.Iter.__new__=function(){
+var m=MochiKit.Base;
+if(typeof (StopIteration)!="undefined"){
+this.StopIteration=StopIteration;
+}else{
+this.StopIteration=new m.NamedError("StopIteration");
 }
-})(this,MochiKit.Format);
+this.iteratorRegistry=new m.AdapterRegistry();
+this.registerIteratorFactory("arrayLike",m.isArrayLike,this.arrayLikeIter);
+this.registerIteratorFactory("iterateNext",this.hasIterateNext,this.iterateNextIter);
+this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
+m.nameFunctions(this);
+};
+MochiKit.Iter.__new__();
+if(MochiKit.__export__){
+reduce=MochiKit.Iter.reduce;
 }
+MochiKit.Base._exportSymbols(this,MochiKit.Iter);
 if(typeof (dojo)!="undefined"){
 dojo.provide("MochiKit.DOM");
 dojo.require("MochiKit.Base");
@@ -1266,8 +1649,8 @@ return MochiKit.DOM._window;
 return MochiKit.DOM._document;
 },withWindow:function(win,func){
 var self=MochiKit.DOM;
-var _194=self._document;
-var _195=self._window;
+var _1e8=self._document;
+var _1e9=self._window;
 var rval;
 try{
 self._window=win;
@@ -1275,16 +1658,16 @@ self._document=win.document;
 rval=func();
 }
 catch(e){
-self._window=_195;
-self._document=_194;
+self._window=_1e9;
+self._document=_1e8;
 throw e;
 }
-self._window=_195;
-self._document=_194;
+self._window=_1e9;
+self._document=_1e8;
 return rval;
 },formContents:function(elem){
-var _198=[];
-var _199=[];
+var _1ec=[];
+var _1ed=[];
 var m=MochiKit.Base;
 var self=MochiKit.DOM;
 if(typeof (elem)=="undefined"||elem===null){
@@ -1295,11 +1678,11 @@ elem=self.getElement(elem);
 m.nodeWalk(elem,function(elem){
 var name=elem.name;
 if(m.isNotEmpty(name)){
-var _19e=elem.tagName.toUpperCase();
-if(_19e==="INPUT"&&(elem.type=="radio"||elem.type=="checkbox")&&!elem.checked){
+var _1f2=elem.tagName.toUpperCase();
+if(_1f2==="INPUT"&&(elem.type=="radio"||elem.type=="checkbox")&&!elem.checked){
 return null;
 }
-if(_19e==="SELECT"){
+if(_1f2==="SELECT"){
 if(elem.type=="select-one"){
 if(elem.selectedIndex>=0){
 var opt=elem.options[elem.selectedIndex];
@@ -1310,18 +1693,18 @@ if(h&&!h.match(/^[^>]+\svalue\s*=/i)){
 v=opt.text;
 }
 }
-_198.push(name);
-_199.push(v);
+_1ec.push(name);
+_1ed.push(v);
 return null;
 }
-_198.push(name);
-_199.push("");
+_1ec.push(name);
+_1ed.push("");
 return null;
 }else{
 var opts=elem.options;
 if(!opts.length){
-_198.push(name);
-_199.push("");
+_1ec.push(name);
+_1ed.push("");
 return null;
 }
 for(var i=0;i<opts.length;i++){
@@ -1336,50 +1719,50 @@ if(h&&!h.match(/^[^>]+\svalue\s*=/i)){
 v=opt.text;
 }
 }
-_198.push(name);
-_199.push(v);
+_1ec.push(name);
+_1ed.push(v);
 }
 return null;
 }
 }
-if(_19e==="FORM"||_19e==="P"||_19e==="SPAN"||_19e==="DIV"){
+if(_1f2==="FORM"||_1f2==="P"||_1f2==="SPAN"||_1f2==="DIV"){
 return elem.childNodes;
 }
-_198.push(name);
-_199.push(elem.value||"");
+_1ec.push(name);
+_1ed.push(elem.value||"");
 return null;
 }
 return elem.childNodes;
 });
-return [_198,_199];
+return [_1ec,_1ed];
 },withDocument:function(doc,func){
 var self=MochiKit.DOM;
-var _1a7=self._document;
+var _1fb=self._document;
 var rval;
 try{
 self._document=doc;
 rval=func();
 }
 catch(e){
-self._document=_1a7;
+self._document=_1fb;
 throw e;
 }
-self._document=_1a7;
+self._document=_1fb;
 return rval;
-},registerDOMConverter:function(name,_1aa,wrap,_1ac){
-MochiKit.DOM.domConverters.register(name,_1aa,wrap,_1ac);
+},registerDOMConverter:function(name,_1fe,wrap,_200){
+MochiKit.DOM.domConverters.register(name,_1fe,wrap,_200);
 },coerceToDOM:function(node,ctx){
 var m=MochiKit.Base;
 var im=MochiKit.Iter;
 var self=MochiKit.DOM;
 if(im){
 var iter=im.iter;
-var _1b3=im.repeat;
+var _207=im.repeat;
 var map=m.map;
 }
-var _1b5=self.domConverters;
-var _1b6=arguments.callee;
-var _1b7=m.NotFound;
+var _209=self.domConverters;
+var _20a=arguments.callee;
+var _20b=m.NotFound;
 while(true){
 if(typeof (node)=="undefined"||node===null){
 return null;
@@ -1409,49 +1792,49 @@ node=node.apply(ctx,[ctx]);
 continue;
 }
 if(im){
-var _1b8=null;
+var _20c=null;
 try{
-_1b8=iter(node);
+_20c=iter(node);
 }
 catch(e){
 }
-if(_1b8){
-return map(_1b6,_1b8,_1b3(ctx));
+if(_20c){
+return map(_20a,_20c,_207(ctx));
 }
 }
 try{
-node=_1b5.match(node,ctx);
+node=_209.match(node,ctx);
 continue;
 }
 catch(e){
-if(e!=_1b7){
+if(e!=_20b){
 throw e;
 }
 }
 return self._document.createTextNode(node.toString());
 }
 return undefined;
-},isChildNode:function(node,_1ba){
+},isChildNode:function(node,_20e){
 var self=MochiKit.DOM;
 if(typeof (node)=="string"){
 node=self.getElement(node);
 }
-if(typeof (_1ba)=="string"){
-_1ba=self.getElement(_1ba);
+if(typeof (_20e)=="string"){
+_20e=self.getElement(_20e);
 }
-if(node===_1ba){
+if(node===_20e){
 return true;
 }
 while(node&&node.tagName.toUpperCase()!="BODY"){
 node=node.parentNode;
-if(node===_1ba){
+if(node===_20e){
 return true;
 }
 }
 return false;
-},setNodeAttribute:function(node,attr,_1be){
+},setNodeAttribute:function(node,attr,_212){
 var o={};
-o[attr]=_1be;
+o[attr]=_212;
 try{
 return MochiKit.DOM.updateNodeAttributes(node,o);
 }
@@ -1460,11 +1843,11 @@ catch(e){
 return null;
 },getNodeAttribute:function(node,attr){
 var self=MochiKit.DOM;
-var _1c3=self.attributeArray.renames[attr];
+var _217=self.attributeArray.renames[attr];
 node=self.getElement(node);
 try{
-if(_1c3){
-return node[_1c3];
+if(_217){
+return node[_217];
 }
 return node.getAttribute(attr);
 }
@@ -1473,33 +1856,33 @@ catch(e){
 return null;
 },removeNodeAttribute:function(node,attr){
 var self=MochiKit.DOM;
-var _1c7=self.attributeArray.renames[attr];
+var _21b=self.attributeArray.renames[attr];
 node=self.getElement(node);
 try{
-if(_1c7){
-return node[_1c7];
+if(_21b){
+return node[_21b];
 }
 return node.removeAttribute(attr);
 }
 catch(e){
 }
 return null;
-},updateNodeAttributes:function(node,_1c9){
+},updateNodeAttributes:function(node,_21d){
 var elem=node;
 var self=MochiKit.DOM;
 if(typeof (node)=="string"){
 elem=self.getElement(node);
 }
-if(_1c9){
-var _1cc=MochiKit.Base.updatetree;
+if(_21d){
+var _220=MochiKit.Base.updatetree;
 if(self.attributeArray.compliant){
-for(var k in _1c9){
-var v=_1c9[k];
+for(var k in _21d){
+var v=_21d[k];
 if(typeof (v)=="object"&&typeof (elem[k])=="object"){
 if(k=="style"&&MochiKit.Style){
 MochiKit.Style.setStyle(elem,v);
 }else{
-_1cc(elem[k],v);
+_220(elem[k],v);
 }
 }else{
 if(k.substring(0,2)=="on"){
@@ -1513,21 +1896,21 @@ elem.setAttribute(k,v);
 }
 }
 }else{
-var _1cf=self.attributeArray.renames;
-for(var k in _1c9){
-v=_1c9[k];
-var _1d0=_1cf[k];
+var _223=self.attributeArray.renames;
+for(var k in _21d){
+v=_21d[k];
+var _224=_223[k];
 if(k=="style"&&typeof (v)=="string"){
 elem.style.cssText=v;
 }else{
-if(typeof (_1d0)=="string"){
-elem[_1d0]=v;
+if(typeof (_224)=="string"){
+elem[_224]=v;
 }else{
 if(typeof (elem[k])=="object"&&typeof (v)=="object"){
 if(k=="style"&&MochiKit.Style){
 MochiKit.Style.setStyle(elem,v);
 }else{
-_1cc(elem[k],v);
+_220(elem[k],v);
 }
 }else{
 if(k.substring(0,2)=="on"){
@@ -1551,16 +1934,16 @@ var self=MochiKit.DOM;
 if(typeof (node)=="string"){
 elem=self.getElement(node);
 }
-var _1d4=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];
-var _1d5=MochiKit.Base.concat;
-while(_1d4.length){
-var n=_1d4.shift();
+var _228=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];
+var _229=MochiKit.Base.concat;
+while(_228.length){
+var n=_228.shift();
 if(typeof (n)=="undefined"||n===null){
 }else{
 if(typeof (n.nodeType)=="number"){
 elem.appendChild(n);
 }else{
-_1d4=_1d5(n,_1d4);
+_228=_229(n,_228);
 }
 }
 }
@@ -1571,32 +1954,32 @@ var self=MochiKit.DOM;
 if(typeof (node)=="string"){
 elem=self.getElement(node);
 }
-var _1da=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];
-var _1db=elem.parentNode;
-var _1dc=MochiKit.Base.concat;
-while(_1da.length){
-var n=_1da.shift();
+var _22e=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];
+var _22f=elem.parentNode;
+var _230=MochiKit.Base.concat;
+while(_22e.length){
+var n=_22e.shift();
 if(typeof (n)=="undefined"||n===null){
 }else{
 if(typeof (n.nodeType)=="number"){
-_1db.insertBefore(n,elem);
+_22f.insertBefore(n,elem);
 }else{
-_1da=_1dc(n,_1da);
+_22e=_230(n,_22e);
 }
 }
 }
-return _1db;
+return _22f;
 },insertSiblingNodesAfter:function(node){
 var elem=node;
 var self=MochiKit.DOM;
 if(typeof (node)=="string"){
 elem=self.getElement(node);
 }
-var _1e1=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];
+var _235=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];
 if(elem.nextSibling){
-return self.insertSiblingNodesBefore(elem.nextSibling,_1e1);
+return self.insertSiblingNodesBefore(elem.nextSibling,_235);
 }else{
-return self.appendChildNodes(elem.parentNode,_1e1);
+return self.appendChildNodes(elem.parentNode,_235);
 }
 },replaceChildNodes:function(node){
 var elem=node;
@@ -1605,40 +1988,40 @@ if(typeof (node)=="string"){
 elem=self.getElement(node);
 arguments[0]=elem;
 }
-var _1e5;
-while((_1e5=elem.firstChild)){
-elem.removeChild(_1e5);
+var _239;
+while((_239=elem.firstChild)){
+elem.removeChild(_239);
 }
 if(arguments.length<2){
 return elem;
 }else{
 return self.appendChildNodes.apply(this,arguments);
 }
-},createDOM:function(name,_1e7){
+},createDOM:function(name,_23b){
 var elem;
 var self=MochiKit.DOM;
 var m=MochiKit.Base;
-if(typeof (_1e7)=="string"||typeof (_1e7)=="number"){
+if(typeof (_23b)=="string"||typeof (_23b)=="number"){
 var args=m.extend([name,null],arguments,1);
 return arguments.callee.apply(this,args);
 }
 if(typeof (name)=="string"){
-var _1ec=self._xhtml;
-if(_1e7&&!self.attributeArray.compliant){
-var _1ed="";
-if("name" in _1e7){
-_1ed+=" name=\""+self.escapeHTML(_1e7.name)+"\"";
+var _240=self._xhtml;
+if(_23b&&!self.attributeArray.compliant){
+var _241="";
+if("name" in _23b){
+_241+=" name=\""+self.escapeHTML(_23b.name)+"\"";
 }
-if(name=="input"&&"type" in _1e7){
-_1ed+=" type=\""+self.escapeHTML(_1e7.type)+"\"";
+if(name=="input"&&"type" in _23b){
+_241+=" type=\""+self.escapeHTML(_23b.type)+"\"";
 }
-if(_1ed){
-name="<"+name+_1ed+">";
-_1ec=false;
+if(_241){
+name="<"+name+_241+">";
+_240=false;
 }
 }
 var d=self._document;
-if(_1ec&&d===document){
+if(_240&&d===document){
 elem=d.createElementNS("http://www.w3.org/1999/xhtml",name);
 }else{
 elem=d.createElement(name);
@@ -1646,8 +2029,8 @@ elem=d.createElement(name);
 }else{
 elem=name;
 }
-if(_1e7){
-self.updateNodeAttributes(elem,_1e7);
+if(_23b){
+self.updateNodeAttributes(elem,_23b);
 }
 if(arguments.length<=2){
 return elem;
@@ -1665,12 +2048,12 @@ return e;
 },swapDOM:function(dest,src){
 var self=MochiKit.DOM;
 dest=self.getElement(dest);
-var _1f5=dest.parentNode;
+var _249=dest.parentNode;
 if(src){
 src=self.getElement(src);
-_1f5.replaceChild(src,dest);
+_249.replaceChild(src,dest);
 }else{
-_1f5.removeChild(dest);
+_249.removeChild(dest);
 }
 return src;
 },getElement:function(id){
@@ -1680,40 +2063,40 @@ return ((typeof (id)=="string")?self._document.getElementById(id):id);
 }else{
 return MochiKit.Base.map(self.getElement,arguments);
 }
-},getElementsByTagAndClassName:function(_1f8,_1f9,_1fa){
+},getElementsByTagAndClassName:function(_24c,_24d,_24e){
 var self=MochiKit.DOM;
-if(typeof (_1f8)=="undefined"||_1f8===null){
-_1f8="*";
+if(typeof (_24c)=="undefined"||_24c===null){
+_24c="*";
 }
-if(typeof (_1fa)=="undefined"||_1fa===null){
-_1fa=self._document;
+if(typeof (_24e)=="undefined"||_24e===null){
+_24e=self._document;
 }
-_1fa=self.getElement(_1fa);
-var _1fc=(_1fa.getElementsByTagName(_1f8)||self._document.all);
-if(typeof (_1f9)=="undefined"||_1f9===null){
-return MochiKit.Base.extend(null,_1fc);
+_24e=self.getElement(_24e);
+var _250=(_24e.getElementsByTagName(_24c)||self._document.all);
+if(typeof (_24d)=="undefined"||_24d===null){
+return MochiKit.Base.extend(null,_250);
 }
-var _1fd=[];
-for(var i=0;i<_1fc.length;i++){
-var _1ff=_1fc[i];
-var cls=_1ff.className;
+var _251=[];
+for(var i=0;i<_250.length;i++){
+var _253=_250[i];
+var cls=_253.className;
 if(!cls){
 continue;
 }
-var _201=cls.split(" ");
-for(var j=0;j<_201.length;j++){
-if(_201[j]==_1f9){
-_1fd.push(_1ff);
+var _255=cls.split(" ");
+for(var j=0;j<_255.length;j++){
+if(_255[j]==_24d){
+_251.push(_253);
 break;
 }
 }
 }
-return _1fd;
+return _251;
 },_newCallStack:function(path,once){
 var rval=function(){
-var _206=arguments.callee.callStack;
-for(var i=0;i<_206.length;i++){
-if(_206[i].apply(this,arguments)===false){
+var _25a=arguments.callee.callStack;
+for(var i=0;i<_25a.length;i++){
+if(_25a[i].apply(this,arguments)===false){
 break;
 }
 }
@@ -1727,102 +2110,102 @@ catch(e){
 };
 rval.callStack=[];
 return rval;
-},addToCallStack:function(_208,path,func,once){
+},addToCallStack:function(_25c,path,func,once){
 var self=MochiKit.DOM;
-var _20d=_208[path];
-var _20e=_20d;
-if(!(typeof (_20d)=="function"&&typeof (_20d.callStack)=="object"&&_20d.callStack!==null)){
-_20e=self._newCallStack(path,once);
-if(typeof (_20d)=="function"){
-_20e.callStack.push(_20d);
+var _261=_25c[path];
+var _262=_261;
+if(!(typeof (_261)=="function"&&typeof (_261.callStack)=="object"&&_261.callStack!==null)){
+_262=self._newCallStack(path,once);
+if(typeof (_261)=="function"){
+_262.callStack.push(_261);
 }
-_208[path]=_20e;
+_25c[path]=_262;
 }
-_20e.callStack.push(func);
+_262.callStack.push(func);
 },addLoadEvent:function(func){
 var self=MochiKit.DOM;
 self.addToCallStack(self._window,"onload",func,true);
-},focusOnLoad:function(_211){
+},focusOnLoad:function(_265){
 var self=MochiKit.DOM;
 self.addLoadEvent(function(){
-_211=self.getElement(_211);
-if(_211){
-_211.focus();
+_265=self.getElement(_265);
+if(_265){
+_265.focus();
 }
 });
-},setElementClass:function(_213,_214){
+},setElementClass:function(_267,_268){
 var self=MochiKit.DOM;
-var obj=self.getElement(_213);
+var obj=self.getElement(_267);
 if(self.attributeArray.compliant){
-obj.setAttribute("class",_214);
+obj.setAttribute("class",_268);
 }else{
-obj.setAttribute("className",_214);
+obj.setAttribute("className",_268);
 }
-},toggleElementClass:function(_217){
+},toggleElementClass:function(_26b){
 var self=MochiKit.DOM;
 for(var i=1;i<arguments.length;i++){
 var obj=self.getElement(arguments[i]);
-if(!self.addElementClass(obj,_217)){
-self.removeElementClass(obj,_217);
+if(!self.addElementClass(obj,_26b)){
+self.removeElementClass(obj,_26b);
 }
 }
-},addElementClass:function(_21b,_21c){
+},addElementClass:function(_26f,_270){
 var self=MochiKit.DOM;
-var obj=self.getElement(_21b);
+var obj=self.getElement(_26f);
 var cls=obj.className;
 if(cls==undefined||cls.length===0){
-self.setElementClass(obj,_21c);
+self.setElementClass(obj,_270);
 return true;
 }
-if(cls==_21c){
+if(cls==_270){
 return false;
 }
-var _220=cls.split(" ");
-for(var i=0;i<_220.length;i++){
-if(_220[i]==_21c){
+var _274=cls.split(" ");
+for(var i=0;i<_274.length;i++){
+if(_274[i]==_270){
 return false;
 }
 }
-self.setElementClass(obj,cls+" "+_21c);
+self.setElementClass(obj,cls+" "+_270);
 return true;
-},removeElementClass:function(_222,_223){
+},removeElementClass:function(_276,_277){
 var self=MochiKit.DOM;
-var obj=self.getElement(_222);
+var obj=self.getElement(_276);
 var cls=obj.className;
 if(cls==undefined||cls.length===0){
 return false;
 }
-if(cls==_223){
+if(cls==_277){
 self.setElementClass(obj,"");
 return true;
 }
-var _227=cls.split(" ");
-for(var i=0;i<_227.length;i++){
-if(_227[i]==_223){
-_227.splice(i,1);
-self.setElementClass(obj,_227.join(" "));
+var _27b=cls.split(" ");
+for(var i=0;i<_27b.length;i++){
+if(_27b[i]==_277){
+_27b.splice(i,1);
+self.setElementClass(obj,_27b.join(" "));
 return true;
 }
 }
 return false;
-},swapElementClass:function(_229,_22a,_22b){
-var obj=MochiKit.DOM.getElement(_229);
-var res=MochiKit.DOM.removeElementClass(obj,_22a);
+},swapElementClass:function(_27d,_27e,_27f){
+var obj=MochiKit.DOM.getElement(_27d);
+var res=MochiKit.DOM.removeElementClass(obj,_27e);
 if(res){
-MochiKit.DOM.addElementClass(obj,_22b);
+MochiKit.DOM.addElementClass(obj,_27f);
 }
 return res;
-},hasElementClass:function(_22e,_22f){
-var obj=MochiKit.DOM.getElement(_22e);
+},hasElementClass:function(_282,_283){
+var obj=MochiKit.DOM.getElement(_282);
 var cls=obj.className;
 if(!cls){
 return false;
 }
-var _232=cls.split(" ");
+var _286=cls.split(" ");
 for(var i=1;i<arguments.length;i++){
 var good=false;
-for(var j=0;j<_232.length;j++){
-if(_232[j]==arguments[i]){
+for(var j=0;j<_286.length;j++){
+if(_286[j]==arguments[i]){
 good=true;
 break;
 }
@@ -1840,49 +2223,49 @@ return MochiKit.DOM.emitHTML(dom).join("");
 if(typeof (lst)=="undefined"||lst===null){
 lst=[];
 }
-var _23a=[dom];
+var _28e=[dom];
 var self=MochiKit.DOM;
-var _23c=self.escapeHTML;
-var _23d=self.attributeArray;
-while(_23a.length){
-dom=_23a.pop();
+var _290=self.escapeHTML;
+var _291=self.attributeArray;
+while(_28e.length){
+dom=_28e.pop();
 if(typeof (dom)=="string"){
 lst.push(dom);
 }else{
 if(dom.nodeType==1){
 lst.push("<"+dom.tagName.toLowerCase());
-var _23e=[];
-var _23f=_23d(dom);
-for(var i=0;i<_23f.length;i++){
-var a=_23f[i];
-_23e.push([" ",a.name,"=\"",_23c(a.value),"\""]);
+var _292=[];
+var _293=_291(dom);
+for(var i=0;i<_293.length;i++){
+var a=_293[i];
+_292.push([" ",a.name,"=\"",_290(a.value),"\""]);
 }
-_23e.sort();
-for(i=0;i<_23e.length;i++){
-var _242=_23e[i];
-for(var j=0;j<_242.length;j++){
-lst.push(_242[j]);
+_292.sort();
+for(i=0;i<_292.length;i++){
+var _296=_292[i];
+for(var j=0;j<_296.length;j++){
+lst.push(_296[j]);
 }
 }
 if(dom.hasChildNodes()){
 lst.push(">");
-_23a.push("</"+dom.tagName.toLowerCase()+">");
-var _244=dom.childNodes;
-for(i=_244.length-1;i>=0;i--){
-_23a.push(_244[i]);
+_28e.push("</"+dom.tagName.toLowerCase()+">");
+var _298=dom.childNodes;
+for(i=_298.length-1;i>=0;i--){
+_28e.push(_298[i]);
 }
 }else{
 lst.push("/>");
 }
 }else{
 if(dom.nodeType==3){
-lst.push(_23c(dom.nodeValue));
+lst.push(_290(dom.nodeValue));
 }
 }
 }
 }
 return lst;
-},scrapeText:function(node,_246){
+},scrapeText:function(node,_29a){
 var rval=[];
 (function(node){
 var cn=node.childNodes;
@@ -1891,103 +2274,103 @@ for(var i=0;i<cn.length;i++){
 arguments.callee.call(this,cn[i]);
 }
 }
-var _24b=node.nodeValue;
-if(typeof (_24b)=="string"){
-rval.push(_24b);
+var _29f=node.nodeValue;
+if(typeof (_29f)=="string"){
+rval.push(_29f);
 }
 })(MochiKit.DOM.getElement(node));
-if(_246){
+if(_29a){
 return rval;
 }else{
 return rval.join("");
 }
-},removeEmptyTextNodes:function(_24c){
-_24c=MochiKit.DOM.getElement(_24c);
-for(var i=0;i<_24c.childNodes.length;i++){
-var node=_24c.childNodes[i];
+},removeEmptyTextNodes:function(_2a0){
+_2a0=MochiKit.DOM.getElement(_2a0);
+for(var i=0;i<_2a0.childNodes.length;i++){
+var node=_2a0.childNodes[i];
 if(node.nodeType==3&&!/\S/.test(node.nodeValue)){
 node.parentNode.removeChild(node);
 }
 }
-},makeClipping:function(_24f){
-_24f=MochiKit.DOM.getElement(_24f);
-var _250=_24f.style.overflow;
-if((MochiKit.Style.getStyle(_24f,"overflow")||"visible")!="hidden"){
-_24f.style.overflow="hidden";
+},makeClipping:function(_2a3){
+_2a3=MochiKit.DOM.getElement(_2a3);
+var _2a4=_2a3.style.overflow;
+if((MochiKit.Style.getStyle(_2a3,"overflow")||"visible")!="hidden"){
+_2a3.style.overflow="hidden";
 }
-return _250;
-},undoClipping:function(_251,_252){
-_251=MochiKit.DOM.getElement(_251);
-if(!_252){
+return _2a4;
+},undoClipping:function(_2a5,_2a6){
+_2a5=MochiKit.DOM.getElement(_2a5);
+if(!_2a6){
 return;
 }
-_251.style.overflow=_252;
-},makePositioned:function(_253){
-_253=MochiKit.DOM.getElement(_253);
-var pos=MochiKit.Style.getStyle(_253,"position");
+_2a5.style.overflow=_2a6;
+},makePositioned:function(_2a7){
+_2a7=MochiKit.DOM.getElement(_2a7);
+var pos=MochiKit.Style.getStyle(_2a7,"position");
 if(pos=="static"||!pos){
-_253.style.position="relative";
+_2a7.style.position="relative";
 if(/Opera/.test(navigator.userAgent)){
-_253.style.top=0;
-_253.style.left=0;
+_2a7.style.top=0;
+_2a7.style.left=0;
 }
 }
-},undoPositioned:function(_255){
-_255=MochiKit.DOM.getElement(_255);
-if(_255.style.position=="relative"){
-_255.style.position=_255.style.top=_255.style.left=_255.style.bottom=_255.style.right="";
+},undoPositioned:function(_2a9){
+_2a9=MochiKit.DOM.getElement(_2a9);
+if(_2a9.style.position=="relative"){
+_2a9.style.position=_2a9.style.top=_2a9.style.left=_2a9.style.bottom=_2a9.style.right="";
 }
-},getFirstElementByTagAndClassName:function(_256,_257,_258){
+},getFirstElementByTagAndClassName:function(_2aa,_2ab,_2ac){
 var self=MochiKit.DOM;
-if(typeof (_256)=="undefined"||_256===null){
-_256="*";
+if(typeof (_2aa)=="undefined"||_2aa===null){
+_2aa="*";
 }
-if(typeof (_258)=="undefined"||_258===null){
-_258=self._document;
+if(typeof (_2ac)=="undefined"||_2ac===null){
+_2ac=self._document;
 }
-_258=self.getElement(_258);
-var _25a=(_258.getElementsByTagName(_256)||self._document.all);
-if(typeof (_257)=="undefined"||_257===null){
-return _25a[0];
+_2ac=self.getElement(_2ac);
+var _2ae=(_2ac.getElementsByTagName(_2aa)||self._document.all);
+if(typeof (_2ab)=="undefined"||_2ab===null){
+return _2ae[0];
 }
-for(var i=0;i<_25a.length;i++){
-var _25c=_25a[i];
-var _25d=_25c.className.split(" ");
-for(var j=0;j<_25d.length;j++){
-if(_25d[j]==_257){
-return _25c;
+for(var i=0;i<_2ae.length;i++){
+var _2b0=_2ae[i];
+var _2b1=_2b0.className.split(" ");
+for(var j=0;j<_2b1.length;j++){
+if(_2b1[j]==_2ab){
+return _2b0;
 }
 }
 }
-},getFirstParentByTagAndClassName:function(elem,_260,_261){
+},getFirstParentByTagAndClassName:function(elem,_2b4,_2b5){
 var self=MochiKit.DOM;
 elem=self.getElement(elem);
-if(typeof (_260)=="undefined"||_260===null){
-_260="*";
+if(typeof (_2b4)=="undefined"||_2b4===null){
+_2b4="*";
 }else{
-_260=_260.toUpperCase();
+_2b4=_2b4.toUpperCase();
 }
-if(typeof (_261)=="undefined"||_261===null){
-_261=null;
+if(typeof (_2b5)=="undefined"||_2b5===null){
+_2b5=null;
 }
-var _263="";
-var _264="";
+var _2b7="";
+var _2b8="";
 while(elem&&elem.tagName){
 elem=elem.parentNode;
-if(_260=="*"&&_261===null){
+if(_2b4=="*"&&_2b5===null){
 return elem;
 }
-_263=elem.className.split(" ");
-_264=elem.tagName.toUpperCase();
-if(_261===null&&_260==_264){
+_2b7=elem.className.split(" ");
+_2b8=elem.tagName.toUpperCase();
+if(_2b5===null&&_2b4==_2b8){
 return elem;
 }else{
-if(_261!==null){
-for(var i=0;i<_263.length;i++){
-if(_260=="*"&&_263[i]==_261){
+if(_2b5!==null){
+for(var i=0;i<_2b7.length;i++){
+if(_2b4=="*"&&_2b7[i]==_2b5){
 return elem;
 }else{
-if(_260==_264&&_263[i]==_261){
+if(_2b4==_2b8&&_2b7[i]==_2b5){
 return elem;
 }
 }
@@ -1996,20 +2379,20 @@ return elem;
 }
 }
 return elem;
-},isParent:function(_266,_267){
-if(!_266.parentNode||_266==_267){
+},isParent:function(_2ba,_2bb){
+if(!_2ba.parentNode||_2ba==_2bb){
 return false;
 }
-if(_266.parentNode==_267){
+if(_2ba.parentNode==_2bb){
 return true;
 }
-return MochiKit.DOM.isParent(_266.parentNode,_267);
+return MochiKit.DOM.isParent(_2ba.parentNode,_2bb);
 },__new__:function(win){
 var m=MochiKit.Base;
 if(typeof (document)!="undefined"){
 this._document=document;
-var _26a="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
-this._xhtml=(document.documentElement&&document.createElementNS&&document.documentElement.namespaceURI===_26a);
+var _2be="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+this._xhtml=(document.documentElement&&document.createElementNS&&document.documentElement.namespaceURI===_2be);
 }else{
 if(MochiKit.MockDOM){
 this._document=MochiKit.MockDOM.document;
@@ -2017,83 +2400,83 @@ this._document=MochiKit.MockDOM.document;
 }
 this._window=win;
 this.domConverters=new m.AdapterRegistry();
-var _26b=this._document.createElement("span");
-var _26c;
-if(_26b&&_26b.attributes&&_26b.attributes.length>0){
-var _26d=m.filter;
-_26c=function(node){
-return _26d(_26c.ignoreAttrFilter,node.attributes);
-};
-_26c.ignoreAttr={};
-var _26f=_26b.attributes;
-var _270=_26c.ignoreAttr;
-for(var i=0;i<_26f.length;i++){
-var a=_26f[i];
-_270[a.name]=a.value;
-}
-_26c.ignoreAttrFilter=function(a){
-return (_26c.ignoreAttr[a.name]!=a.value);
-};
-_26c.compliant=false;
-_26c.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor","readonly":"readOnly","colspan":"colSpan","bgcolor":"bgColor","cellspacing":"cellSpacing","cellpadding":"cellPadding"};
-}else{
-_26c=function(node){
+var _2bf=this._document.createElement("span");
+var _2c0;
+if(_2bf&&_2bf.attributes&&_2bf.attributes.length>0){
+var _2c1=m.filter;
+_2c0=function(node){
+return _2c1(_2c0.ignoreAttrFilter,node.attributes);
+};
+_2c0.ignoreAttr={};
+var _2c3=_2bf.attributes;
+var _2c4=_2c0.ignoreAttr;
+for(var i=0;i<_2c3.length;i++){
+var a=_2c3[i];
+_2c4[a.name]=a.value;
+}
+_2c0.ignoreAttrFilter=function(a){
+return (_2c0.ignoreAttr[a.name]!=a.value);
+};
+_2c0.compliant=false;
+_2c0.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor","readonly":"readOnly","colspan":"colSpan","bgcolor":"bgColor","cellspacing":"cellSpacing","cellpadding":"cellPadding"};
+}else{
+_2c0=function(node){
 return node.attributes;
 };
-_26c.compliant=true;
-_26c.renames={};
+_2c0.compliant=true;
+_2c0.renames={};
 }
-this.attributeArray=_26c;
-var _275=function(_276,arr){
-var _278=arr[1].split(".");
+this.attributeArray=_2c0;
+var _2c9=function(_2ca,arr){
+var _2cc=arr[1].split(".");
 var str="";
 var obj={};
-str+="if (!MochiKit."+_278[1]+") { throw new Error(\"";
+str+="if (!MochiKit."+_2cc[1]+") { throw new Error(\"";
 str+="This function has been deprecated and depends on MochiKit.";
-str+=_278[1]+".\");}";
-str+="return MochiKit."+_278[1]+"."+arr[0];
+str+=_2cc[1]+".\");}";
+str+="return MochiKit."+_2cc[1]+"."+arr[0];
 str+=".apply(this, arguments);";
-obj[_278[2]]=new Function(str);
-MochiKit.Base.update(MochiKit[_276],obj);
+obj[_2cc[2]]=new Function(str);
+MochiKit.Base.update(MochiKit[_2ca],obj);
 };
 for(var i;i<MochiKit.DOM.DEPRECATED.length;i++){
-_275("DOM",MochiKit.DOM.DEPRECATED[i]);
-}
-var _27b=this.createDOMFunc;
-this.UL=_27b("ul");
-this.OL=_27b("ol");
-this.LI=_27b("li");
-this.TD=_27b("td");
-this.TR=_27b("tr");
-this.TBODY=_27b("tbody");
-this.THEAD=_27b("thead");
-this.TFOOT=_27b("tfoot");
-this.TABLE=_27b("table");
-this.TH=_27b("th");
-this.INPUT=_27b("input");
-this.SPAN=_27b("span");
-this.A=_27b("a");
-this.DIV=_27b("div");
-this.IMG=_27b("img");
-this.BUTTON=_27b("button");
-this.TT=_27b("tt");
-this.PRE=_27b("pre");
-this.H1=_27b("h1");
-this.H2=_27b("h2");
-this.H3=_27b("h3");
-this.BR=_27b("br");
-this.HR=_27b("hr");
-this.LABEL=_27b("label");
-this.TEXTAREA=_27b("textarea");
-this.FORM=_27b("form");
-this.P=_27b("p");
-this.SELECT=_27b("select");
-this.OPTION=_27b("option");
-this.OPTGROUP=_27b("optgroup");
-this.LEGEND=_27b("legend");
-this.FIELDSET=_27b("fieldset");
-this.STRONG=_27b("strong");
-this.CANVAS=_27b("canvas");
+_2c9("DOM",MochiKit.DOM.DEPRECATED[i]);
+}
+var _2cf=this.createDOMFunc;
+this.UL=_2cf("ul");
+this.OL=_2cf("ol");
+this.LI=_2cf("li");
+this.TD=_2cf("td");
+this.TR=_2cf("tr");
+this.TBODY=_2cf("tbody");
+this.THEAD=_2cf("thead");
+this.TFOOT=_2cf("tfoot");
+this.TABLE=_2cf("table");
+this.TH=_2cf("th");
+this.INPUT=_2cf("input");
+this.SPAN=_2cf("span");
+this.A=_2cf("a");
+this.DIV=_2cf("div");
+this.IMG=_2cf("img");
+this.BUTTON=_2cf("button");
+this.TT=_2cf("tt");
+this.PRE=_2cf("pre");
+this.H1=_2cf("h1");
+this.H2=_2cf("h2");
+this.H3=_2cf("h3");
+this.BR=_2cf("br");
+this.HR=_2cf("hr");
+this.LABEL=_2cf("label");
+this.TEXTAREA=_2cf("textarea");
+this.FORM=_2cf("form");
+this.P=_2cf("p");
+this.SELECT=_2cf("select");
+this.OPTION=_2cf("option");
+this.OPTGROUP=_2cf("optgroup");
+this.LEGEND=_2cf("legend");
+this.FIELDSET=_2cf("fieldset");
+this.STRONG=_2cf("strong");
+this.CANVAS=_2cf("canvas");
 this.$=this.getElement;
 this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
 m.nameFunctions(this);
@@ -2164,57 +2547,57 @@ return "{x: "+repr(this.x)+", y: "+repr(this.y)+"}";
 MochiKit.Style.Coordinates.prototype.toString=function(){
 return this.__repr__();
 };
-MochiKit.Base.update(MochiKit.Style,{getStyle:function(elem,_283){
+MochiKit.Base.update(MochiKit.Style,{getStyle:function(elem,_2d7){
 var dom=MochiKit.DOM;
 var d=dom._document;
 elem=dom.getElement(elem);
-_283=MochiKit.Base.camelize(_283);
+_2d7=MochiKit.Base.camelize(_2d7);
 if(!elem||elem==d){
 return undefined;
 }
-if(_283=="opacity"&&elem.filters){
-var _286=(MochiKit.Style.getStyle(elem,"filter")||"").match(/alpha\(opacity=(.*)\)/);
-if(_286&&_286[1]){
-return parseFloat(_286[1])/100;
+if(_2d7=="opacity"&&elem.filters){
+var _2da=(MochiKit.Style.getStyle(elem,"filter")||"").match(/alpha\(opacity=(.*)\)/);
+if(_2da&&_2da[1]){
+return parseFloat(_2da[1])/100;
 }
 return 1;
 }
-var _287=elem.style?elem.style[_283]:null;
-if(!_287){
+var _2db=elem.style?elem.style[_2d7]:null;
+if(!_2db){
 if(d.defaultView&&d.defaultView.getComputedStyle){
 var css=d.defaultView.getComputedStyle(elem,null);
-_283=_283.replace(/([A-Z])/g,"-$1").toLowerCase();
-_287=css?css.getPropertyValue(_283):null;
+_2d7=_2d7.replace(/([A-Z])/g,"-$1").toLowerCase();
+_2db=css?css.getPropertyValue(_2d7):null;
 }else{
 if(elem.currentStyle){
-_287=elem.currentStyle[_283];
+_2db=elem.currentStyle[_2d7];
 }
 }
 }
-if(_283=="opacity"){
-_287=parseFloat(_287);
+if(_2d7=="opacity"){
+_2db=parseFloat(_2db);
 }
-if(/Opera/.test(navigator.userAgent)&&(MochiKit.Base.find(["left","top","right","bottom"],_283)!=-1)){
+if(/Opera/.test(navigator.userAgent)&&(MochiKit.Base.find(["left","top","right","bottom"],_2d7)!=-1)){
 if(MochiKit.Style.getStyle(elem,"position")=="static"){
-_287="auto";
+_2db="auto";
 }
 }
-return _287=="auto"?null:_287;
-},setStyle:function(elem,_28a){
+return _2db=="auto"?null:_2db;
+},setStyle:function(elem,_2de){
 elem=MochiKit.DOM.getElement(elem);
-for(var name in _28a){
+for(var name in _2de){
 if(name=="opacity"){
-MochiKit.Style.setOpacity(elem,_28a[name]);
+MochiKit.Style.setOpacity(elem,_2de[name]);
 }else{
-elem.style[MochiKit.Base.camelize(name)]=_28a[name];
+elem.style[MochiKit.Base.camelize(name)]=_2de[name];
 }
 }
 },setOpacity:function(elem,o){
 elem=MochiKit.DOM.getElement(elem);
 var self=MochiKit.Style;
 if(o==1){
-var _28f=/Gecko/.test(navigator.userAgent)&&!(/Konqueror|AppleWebKit|KHTML/.test(navigator.userAgent));
-elem.style["opacity"]=_28f?0.999999:1;
+var _2e3=/Gecko/.test(navigator.userAgent)&&!(/Konqueror|AppleWebKit|KHTML/.test(navigator.userAgent));
+elem.style["opacity"]=_2e3?0.999999:1;
 if(/MSIE/.test(navigator.userAgent)){
 elem.style["filter"]=self.getStyle(elem,"filter").replace(/alpha\([^\)]*\)/gi,"");
 }
@@ -2227,7 +2610,7 @@ if(/MSIE/.test(navigator.userAgent)){
 elem.style["filter"]=self.getStyle(elem,"filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+o*100+")";
 }
 }
-},getElementPosition:function(elem,_291){
+},getElementPosition:function(elem,_2e5){
 var self=MochiKit.Style;
 var dom=MochiKit.DOM;
 elem=dom.getElement(elem);
@@ -2236,7 +2619,7 @@ return undefined;
 }
 var c=new self.Coordinates(0,0);
 var box=null;
-var _296=null;
+var _2ea=null;
 var d=MochiKit.DOM._document;
 var de=d.documentElement;
 var b=d.body;
@@ -2252,12 +2635,12 @@ c.y+=box.top+(de.scrollTop||b.scrollTop)-(de.clientTop||0);
 if(elem.offsetParent){
 c.x+=elem.offsetLeft;
 c.y+=elem.offsetTop;
-_296=elem.offsetParent;
-if(_296!=elem){
-while(_296){
-c.x+=_296.offsetLeft;
-c.y+=_296.offsetTop;
-_296=_296.offsetParent;
+_2ea=elem.offsetParent;
+if(_2ea!=elem){
+while(_2ea){
+c.x+=_2ea.offsetLeft;
+c.y+=_2ea.offsetTop;
+_2ea=_2ea.offsetParent;
 }
 }
 var ua=navigator.userAgent.toLowerCase();
@@ -2268,49 +2651,49 @@ c.y-=b.offsetTop;
 }
 }
 }
-if(typeof (_291)!="undefined"){
-_291=arguments.callee(_291);
-if(_291){
-c.x-=(_291.x||0);
-c.y-=(_291.y||0);
+if(typeof (_2e5)!="undefined"){
+_2e5=arguments.callee(_2e5);
+if(_2e5){
+c.x-=(_2e5.x||0);
+c.y-=(_2e5.y||0);
 }
 }
 if(elem.parentNode){
-_296=elem.parentNode;
+_2ea=elem.parentNode;
 }else{
-_296=null;
+_2ea=null;
 }
-while(_296){
-var _29b=_296.tagName.toUpperCase();
-if(_29b==="BODY"||_29b==="HTML"){
+while(_2ea){
+var _2ef=_2ea.tagName.toUpperCase();
+if(_2ef==="BODY"||_2ef==="HTML"){
 break;
 }
-var disp=self.getStyle(_296,"display");
+var disp=self.getStyle(_2ea,"display");
 if(disp!="inline"&&disp!="table-row"){
-c.x-=_296.scrollLeft;
-c.y-=_296.scrollTop;
+c.x-=_2ea.scrollLeft;
+c.y-=_2ea.scrollTop;
 }
-if(_296.parentNode){
-_296=_296.parentNode;
+if(_2ea.parentNode){
+_2ea=_2ea.parentNode;
 }else{
-_296=null;
+_2ea=null;
 }
 }
 return c;
-},setElementPosition:function(elem,_29e,_29f){
+},setElementPosition:function(elem,_2f2,_2f3){
 elem=MochiKit.DOM.getElement(elem);
-if(typeof (_29f)=="undefined"){
-_29f="px";
+if(typeof (_2f3)=="undefined"){
+_2f3="px";
 }
-var _2a0={};
-var _2a1=MochiKit.Base.isUndefinedOrNull;
-if(!_2a1(_29e.x)){
-_2a0["left"]=_29e.x+_29f;
+var _2f4={};
+var _2f5=MochiKit.Base.isUndefinedOrNull;
+if(!_2f5(_2f2.x)){
+_2f4["left"]=_2f2.x+_2f3;
 }
-if(!_2a1(_29e.y)){
-_2a0["top"]=_29e.y+_29f;
+if(!_2f5(_2f2.y)){
+_2f4["top"]=_2f2.y+_2f3;
 }
-MochiKit.DOM.updateNodeAttributes(elem,{"style":_2a0});
+MochiKit.DOM.updateNodeAttributes(elem,{"style":_2f4});
 },getElementDimensions:function(elem){
 var self=MochiKit.Style;
 var dom=MochiKit.DOM;
@@ -2326,38 +2709,38 @@ if(disp!="none"&&disp!==""&&typeof (disp)!="undefined"){
 return new self.Dimensions(elem.offsetWidth||0,elem.offsetHeight||0);
 }
 var s=elem.style;
-var _2a7=s.visibility;
-var _2a8=s.position;
+var _2fb=s.visibility;
+var _2fc=s.position;
 s.visibility="hidden";
 s.position="absolute";
 s.display="";
-var _2a9=elem.offsetWidth;
-var _2aa=elem.offsetHeight;
+var _2fd=elem.offsetWidth;
+var _2fe=elem.offsetHeight;
 s.display="none";
-s.position=_2a8;
-s.visibility=_2a7;
-return new self.Dimensions(_2a9,_2aa);
-},setElementDimensions:function(elem,_2ac,_2ad){
+s.position=_2fc;
+s.visibility=_2fb;
+return new self.Dimensions(_2fd,_2fe);
+},setElementDimensions:function(elem,_300,_301){
 elem=MochiKit.DOM.getElement(elem);
-if(typeof (_2ad)=="undefined"){
-_2ad="px";
+if(typeof (_301)=="undefined"){
+_301="px";
 }
-var _2ae={};
-var _2af=MochiKit.Base.isUndefinedOrNull;
-if(!_2af(_2ac.w)){
-_2ae["width"]=_2ac.w+_2ad;
+var _302={};
+var _303=MochiKit.Base.isUndefinedOrNull;
+if(!_303(_300.w)){
+_302["width"]=_300.w+_301;
 }
-if(!_2af(_2ac.h)){
-_2ae["height"]=_2ac.h+_2ad;
+if(!_303(_300.h)){
+_302["height"]=_300.h+_301;
 }
-MochiKit.DOM.updateNodeAttributes(elem,{"style":_2ae});
-},setDisplayForElement:function(_2b0,_2b1){
-var _2b2=MochiKit.Base.extend(null,arguments,1);
-var _2b3=MochiKit.DOM.getElement;
-for(var i=0;i<_2b2.length;i++){
-_2b1=_2b3(_2b2[i]);
-if(_2b1){
-_2b1.style.display=_2b0;
+MochiKit.DOM.updateNodeAttributes(elem,{"style":_302});
+},setDisplayForElement:function(_304,_305){
+var _306=MochiKit.Base.extend(null,arguments,1);
+var _307=MochiKit.DOM.getElement;
+for(var i=0;i<_306.length;i++){
+_305=_307(_306[i]);
+if(_305){
+_305.style.display=_304;
 }
 }
 },getViewportDimensions:function(){
@@ -2451,53 +2834,53 @@ return "["+this.NAME+" "+this.VERSION+"]";
 MochiKit.Color.toString=function(){
 return this.__repr__();
 };
-MochiKit.Color.Color=function(red,_2be,blue,_2c0){
-if(typeof (_2c0)=="undefined"||_2c0===null){
-_2c0=1;
+MochiKit.Color.Color=function(red,_312,blue,_314){
+if(typeof (_314)=="undefined"||_314===null){
+_314=1;
 }
-this.rgb={r:red,g:_2be,b:blue,a:_2c0};
+this.rgb={r:red,g:_312,b:blue,a:_314};
 };
-MochiKit.Color.Color.prototype={__class__:MochiKit.Color.Color,colorWithAlpha:function(_2c1){
+MochiKit.Color.Color.prototype={__class__:MochiKit.Color.Color,colorWithAlpha:function(_315){
 var rgb=this.rgb;
 var m=MochiKit.Color;
-return m.Color.fromRGB(rgb.r,rgb.g,rgb.b,_2c1);
+return m.Color.fromRGB(rgb.r,rgb.g,rgb.b,_315);
 },colorWithHue:function(hue){
 var hsl=this.asHSL();
 hsl.h=hue;
 var m=MochiKit.Color;
 return m.Color.fromHSL(hsl);
-},colorWithSaturation:function(_2c7){
+},colorWithSaturation:function(_31b){
 var hsl=this.asHSL();
-hsl.s=_2c7;
+hsl.s=_31b;
 var m=MochiKit.Color;
 return m.Color.fromHSL(hsl);
-},colorWithLightness:function(_2ca){
+},colorWithLightness:function(_31e){
 var hsl=this.asHSL();
-hsl.l=_2ca;
+hsl.l=_31e;
 var m=MochiKit.Color;
 return m.Color.fromHSL(hsl);
-},darkerColorWithLevel:function(_2cd){
+},darkerColorWithLevel:function(_321){
 var hsl=this.asHSL();
-hsl.l=Math.max(hsl.l-_2cd,0);
+hsl.l=Math.max(hsl.l-_321,0);
 var m=MochiKit.Color;
 return m.Color.fromHSL(hsl);
-},lighterColorWithLevel:function(_2d0){
+},lighterColorWithLevel:function(_324){
 var hsl=this.asHSL();
-hsl.l=Math.min(hsl.l+_2d0,1);
+hsl.l=Math.min(hsl.l+_324,1);
 var m=MochiKit.Color;
 return m.Color.fromHSL(hsl);
-},blendedColor:function(_2d3,_2d4){
-if(typeof (_2d4)=="undefined"||_2d4===null){
-_2d4=0.5;
+},blendedColor:function(_327,_328){
+if(typeof (_328)=="undefined"||_328===null){
+_328=0.5;
 }
-var sf=1-_2d4;
+var sf=1-_328;
 var s=this.rgb;
-var d=_2d3.rgb;
-var df=_2d4;
+var d=_327.rgb;
+var df=_328;
 return MochiKit.Color.Color.fromRGB((s.r*sf)+(d.r*df),(s.g*sf)+(d.g*df),(s.b*sf)+(d.b*df),(s.a*sf)+(d.a*df));
-},compareRGB:function(_2d9){
+},compareRGB:function(_32d){
 var a=this.asRGB();
-var b=_2d9.asRGB();
+var b=_32d.asRGB();
 return MochiKit.Base.compare([a.r,a.g,a.b,a.a],[b.r,b.g,b.b,b.a]);
 },isLight:function(){
 return this.asHSL().b>0.5;
@@ -2571,114 +2954,114 @@ var c=this.rgb;
 var col=[c.r,c.g,c.b,c.a];
 return this.__class__.NAME+"("+col.join(", ")+")";
 }};
-MochiKit.Base.update(MochiKit.Color.Color,{fromRGB:function(red,_2f0,blue,_2f2){
-var _2f3=MochiKit.Color.Color;
+MochiKit.Base.update(MochiKit.Color.Color,{fromRGB:function(red,_344,blue,_346){
+var _347=MochiKit.Color.Color;
 if(arguments.length==1){
 var rgb=red;
 red=rgb.r;
-_2f0=rgb.g;
+_344=rgb.g;
 blue=rgb.b;
 if(typeof (rgb.a)=="undefined"){
-_2f2=undefined;
+_346=undefined;
 }else{
-_2f2=rgb.a;
+_346=rgb.a;
 }
 }
-return new _2f3(red,_2f0,blue,_2f2);
-},fromHSL:function(hue,_2f6,_2f7,_2f8){
+return new _347(red,_344,blue,_346);
+},fromHSL:function(hue,_34a,_34b,_34c){
 var m=MochiKit.Color;
 return m.Color.fromRGB(m.hslToRGB.apply(m,arguments));
-},fromHSV:function(hue,_2fb,_2fc,_2fd){
+},fromHSV:function(hue,_34f,_350,_351){
 var m=MochiKit.Color;
 return m.Color.fromRGB(m.hsvToRGB.apply(m,arguments));
 },fromName:function(name){
-var _300=MochiKit.Color.Color;
+var _354=MochiKit.Color.Color;
 if(name.charAt(0)=="\""){
 name=name.substr(1,name.length-2);
 }
-var _301=_300._namedColors[name.toLowerCase()];
-if(typeof (_301)=="string"){
-return _300.fromHexString(_301);
+var _355=_354._namedColors[name.toLowerCase()];
+if(typeof (_355)=="string"){
+return _354.fromHexString(_355);
 }else{
 if(name=="transparent"){
-return _300.transparentColor();
+return _354.transparentColor();
 }
 }
 return null;
-},fromString:function(_302){
+},fromString:function(_356){
 var self=MochiKit.Color.Color;
-var _304=_302.substr(0,3);
-if(_304=="rgb"){
-return self.fromRGBString(_302);
+var _358=_356.substr(0,3);
+if(_358=="rgb"){
+return self.fromRGBString(_356);
 }else{
-if(_304=="hsl"){
-return self.fromHSLString(_302);
+if(_358=="hsl"){
+return self.fromHSLString(_356);
 }else{
-if(_302.charAt(0)=="#"){
-return self.fromHexString(_302);
+if(_356.charAt(0)=="#"){
+return self.fromHexString(_356);
 }
 }
 }
-return self.fromName(_302);
-},fromHexString:function(_305){
-if(_305.charAt(0)=="#"){
-_305=_305.substring(1);
+return self.fromName(_356);
+},fromHexString:function(_359){
+if(_359.charAt(0)=="#"){
+_359=_359.substring(1);
 }
-var _306=[];
+var _35a=[];
 var i,hex;
-if(_305.length==3){
+if(_359.length==3){
 for(i=0;i<3;i++){
-hex=_305.substr(i,1);
-_306.push(parseInt(hex+hex,16)/255);
+hex=_359.substr(i,1);
+_35a.push(parseInt(hex+hex,16)/255);
 }
 }else{
 for(i=0;i<6;i+=2){
-hex=_305.substr(i,2);
-_306.push(parseInt(hex,16)/255);
+hex=_359.substr(i,2);
+_35a.push(parseInt(hex,16)/255);
 }
 }
-var _309=MochiKit.Color.Color;
-return _309.fromRGB.apply(_309,_306);
-},_fromColorString:function(pre,_30b,_30c,_30d){
-if(_30d.indexOf(pre)===0){
-_30d=_30d.substring(_30d.indexOf("(",3)+1,_30d.length-1);
+var _35d=MochiKit.Color.Color;
+return _35d.fromRGB.apply(_35d,_35a);
+},_fromColorString:function(pre,_35f,_360,_361){
+if(_361.indexOf(pre)===0){
+_361=_361.substring(_361.indexOf("(",3)+1,_361.length-1);
 }
-var _30e=_30d.split(/\s*,\s*/);
-var _30f=[];
-for(var i=0;i<_30e.length;i++){
-var c=_30e[i];
+var _362=_361.split(/\s*,\s*/);
+var _363=[];
+for(var i=0;i<_362.length;i++){
+var c=_362[i];
 var val;
-var _313=c.substring(c.length-3);
+var _367=c.substring(c.length-3);
 if(c.charAt(c.length-1)=="%"){
 val=0.01*parseFloat(c.substring(0,c.length-1));
 }else{
-if(_313=="deg"){
+if(_367=="deg"){
 val=parseFloat(c)/360;
 }else{
-if(_313=="rad"){
+if(_367=="rad"){
 val=parseFloat(c)/(Math.PI*2);
 }else{
-val=_30c[i]*parseFloat(c);
+val=_360[i]*parseFloat(c);
 }
 }
 }
-_30f.push(val);
+_363.push(val);
 }
-return this[_30b].apply(this,_30f);
-},fromComputedStyle:function(elem,_315){
+return this[_35f].apply(this,_363);
+},fromComputedStyle:function(elem,_369){
 var d=MochiKit.DOM;
 var cls=MochiKit.Color.Color;
 for(elem=d.getElement(elem);elem;elem=elem.parentNode){
-var _318=MochiKit.Style.getStyle.apply(d,arguments);
-if(!_318){
+var _36c=MochiKit.Style.getStyle.apply(d,arguments);
+if(!_36c){
 continue;
 }
-var _319=cls.fromString(_318);
-if(!_319){
+var _36d=cls.fromString(_36c);
+if(!_36d){
 break;
 }
-if(_319.asRGB().a>0){
-return _319;
+if(_36d.asRGB().a>0){
+return _36d;
 }
 }
 return null;
@@ -2691,13 +3074,13 @@ return cls.fromComputedStyle(elem,"color","color")||cls.blackColor();
 },namedColors:function(){
 return MochiKit.Base.clone(MochiKit.Color.Color._namedColors);
 }});
-MochiKit.Base.update(MochiKit.Color,{clampColorComponent:function(v,_31f){
-v*=_31f;
+MochiKit.Base.update(MochiKit.Color,{clampColorComponent:function(v,_373){
+v*=_373;
 if(v<0){
 return 0;
 }else{
-if(v>_31f){
-return _31f;
+if(v>_373){
+return _373;
 }else{
 return v;
 }
@@ -2725,118 +3108,118 @@ val=n1;
 }
 }
 return val;
-},hsvToRGB:function(hue,_325,_326,_327){
+},hsvToRGB:function(hue,_379,_37a,_37b){
 if(arguments.length==1){
 var hsv=hue;
 hue=hsv.h;
-_325=hsv.s;
-_326=hsv.v;
-_327=hsv.a;
+_379=hsv.s;
+_37a=hsv.v;
+_37b=hsv.a;
 }
 var red;
-var _32a;
+var _37e;
 var blue;
-if(_325===0){
-red=_326;
-_32a=_326;
-blue=_326;
+if(_379===0){
+red=_37a;
+_37e=_37a;
+blue=_37a;
 }else{
 var i=Math.floor(hue*6);
 var f=(hue*6)-i;
-var p=_326*(1-_325);
-var q=_326*(1-(_325*f));
-var t=_326*(1-(_325*(1-f)));
+var p=_37a*(1-_379);
+var q=_37a*(1-(_379*f));
+var t=_37a*(1-(_379*(1-f)));
 switch(i){
 case 1:
 red=q;
-_32a=_326;
+_37e=_37a;
 blue=p;
 break;
 case 2:
 red=p;
-_32a=_326;
+_37e=_37a;
 blue=t;
 break;
 case 3:
 red=p;
-_32a=q;
-blue=_326;
+_37e=q;
+blue=_37a;
 break;
 case 4:
 red=t;
-_32a=p;
-blue=_326;
+_37e=p;
+blue=_37a;
 break;
 case 5:
-red=_326;
-_32a=p;
+red=_37a;
+_37e=p;
 blue=q;
 break;
 case 6:
 case 0:
-red=_326;
-_32a=t;
+red=_37a;
+_37e=t;
 blue=p;
 break;
 }
 }
-return {r:red,g:_32a,b:blue,a:_327};
-},hslToRGB:function(hue,_332,_333,_334){
+return {r:red,g:_37e,b:blue,a:_37b};
+},hslToRGB:function(hue,_386,_387,_388){
 if(arguments.length==1){
 var hsl=hue;
 hue=hsl.h;
-_332=hsl.s;
-_333=hsl.l;
-_334=hsl.a;
+_386=hsl.s;
+_387=hsl.l;
+_388=hsl.a;
 }
 var red;
-var _337;
+var _38b;
 var blue;
-if(_332===0){
-red=_333;
-_337=_333;
-blue=_333;
+if(_386===0){
+red=_387;
+_38b=_387;
+blue=_387;
 }else{
 var m2;
-if(_333<=0.5){
-m2=_333*(1+_332);
+if(_387<=0.5){
+m2=_387*(1+_386);
 }else{
-m2=_333+_332-(_333*_332);
+m2=_387+_386-(_387*_386);
 }
-var m1=(2*_333)-m2;
+var m1=(2*_387)-m2;
 var f=MochiKit.Color._hslValue;
 var h6=hue*6;
 red=f(m1,m2,h6+2);
-_337=f(m1,m2,h6);
+_38b=f(m1,m2,h6);
 blue=f(m1,m2,h6-2);
 }
-return {r:red,g:_337,b:blue,a:_334};
-},rgbToHSV:function(red,_33e,blue,_340){
+return {r:red,g:_38b,b:blue,a:_388};
+},rgbToHSV:function(red,_392,blue,_394){
 if(arguments.length==1){
 var rgb=red;
 red=rgb.r;
-_33e=rgb.g;
+_392=rgb.g;
 blue=rgb.b;
-_340=rgb.a;
+_394=rgb.a;
 }
-var max=Math.max(Math.max(red,_33e),blue);
-var min=Math.min(Math.min(red,_33e),blue);
+var max=Math.max(Math.max(red,_392),blue);
+var min=Math.min(Math.min(red,_392),blue);
 var hue;
-var _345;
-var _346=max;
+var _399;
+var _39a=max;
 if(min==max){
 hue=0;
-_345=0;
+_399=0;
 }else{
-var _347=(max-min);
-_345=_347/max;
+var _39b=(max-min);
+_399=_39b/max;
 if(red==max){
-hue=(_33e-blue)/_347;
+hue=(_392-blue)/_39b;
 }else{
-if(_33e==max){
-hue=2+((blue-red)/_347);
+if(_392==max){
+hue=2+((blue-red)/_39b);
 }else{
-hue=4+((red-_33e)/_347);
+hue=4+((red-_392)/_39b);
 }
 }
 hue/=6;
@@ -2847,37 +3230,37 @@ if(hue>1){
 hue-=1;
 }
 }
-return {h:hue,s:_345,v:_346,a:_340};
-},rgbToHSL:function(red,_349,blue,_34b){
+return {h:hue,s:_399,v:_39a,a:_394};
+},rgbToHSL:function(red,_39d,blue,_39f){
 if(arguments.length==1){
 var rgb=red;
 red=rgb.r;
-_349=rgb.g;
+_39d=rgb.g;
 blue=rgb.b;
-_34b=rgb.a;
+_39f=rgb.a;
 }
-var max=Math.max(red,Math.max(_349,blue));
-var min=Math.min(red,Math.min(_349,blue));
+var max=Math.max(red,Math.max(_39d,blue));
+var min=Math.min(red,Math.min(_39d,blue));
 var hue;
-var _350;
-var _351=(max+min)/2;
-var _352=max-min;
-if(_352===0){
+var _3a4;
+var _3a5=(max+min)/2;
+var _3a6=max-min;
+if(_3a6===0){
 hue=0;
-_350=0;
+_3a4=0;
 }else{
-if(_351<=0.5){
-_350=_352/(max+min);
+if(_3a5<=0.5){
+_3a4=_3a6/(max+min);
 }else{
-_350=_352/(2-max-min);
+_3a4=_3a6/(2-max-min);
 }
 if(red==max){
-hue=(_349-blue)/_352;
+hue=(_39d-blue)/_3a6;
 }else{
-if(_349==max){
-hue=2+((blue-red)/_352);
+if(_39d==max){
+hue=2+((blue-red)/_3a6);
 }else{
-hue=4+((red-_349)/_352);
+hue=4+((red-_39d)/_3a6);
 }
 }
 hue/=6;
@@ -2888,33 +3271,33 @@ if(hue>1){
 hue-=1;
 }
 }
-return {h:hue,s:_350,l:_351,a:_34b};
+return {h:hue,s:_3a4,l:_3a5,a:_39f};
 },toColorPart:function(num){
 num=Math.round(num);
-var _354=num.toString(16);
+var _3a8=num.toString(16);
 if(num<16){
-return "0"+_354;
+return "0"+_3a8;
 }
-return _354;
+return _3a8;
 },__new__:function(){
 var m=MochiKit.Base;
 this.Color.fromRGBString=m.bind(this.Color._fromColorString,this.Color,"rgb","fromRGB",[1/255,1/255,1/255,1]);
 this.Color.fromHSLString=m.bind(this.Color._fromColorString,this.Color,"hsl","fromHSL",[1/360,0.01,0.01,1]);
-var _356=1/3;
-var _357={black:[0,0,0],blue:[0,0,1],brown:[0.6,0.4,0.2],cyan:[0,1,1],darkGray:[_356,_356,_356],gray:[0.5,0.5,0.5],green:[0,1,0],lightGray:[2*_356,2*_356,2*_356],magenta:[1,0,1],orange:[1,0.5,0],purple:[0.5,0,0.5],red:[1,0,0],transparent:[0,0,0,0],white:[1,1,1],yellow:[1,1,0]};
-var _358=function(name,r,g,b,a){
+var _3aa=1/3;
+var _3ab={black:[0,0,0],blue:[0,0,1],brown:[0.6,0.4,0.2],cyan:[0,1,1],darkGray:[_3aa,_3aa,_3aa],gray:[0.5,0.5,0.5],green:[0,1,0],lightGray:[2*_3aa,2*_3aa,2*_3aa],magenta:[1,0,1],orange:[1,0.5,0],purple:[0.5,0,0.5],red:[1,0,0],transparent:[0,0,0,0],white:[1,1,1],yellow:[1,1,0]};
+var _3ac=function(name,r,g,b,a){
 var rval=this.fromRGB(r,g,b,a);
 this[name]=function(){
 return rval;
 };
 return rval;
 };
-for(var k in _357){
+for(var k in _3ab){
 var name=k+"Color";
-var _361=m.concat([_358,this.Color,name],_357[k]);
-this.Color[name]=m.bind.apply(null,_361);
+var _3b5=m.concat([_3ac,this.Color,name],_3ab[k]);
+this.Color[name]=m.bind.apply(null,_3b5);
 }
-var _362=function(){
+var _3b6=function(){
 for(var i=0;i<arguments.length;i++){
 if(!(arguments[i] instanceof Color)){
 return false;
@@ -2922,11 +3305,11 @@ return false;
 }
 return true;
 };
-var _364=function(a,b){
+var _3b8=function(a,b){
 return a.compareRGB(b);
 };
 m.nameFunctions(this);
-m.registerComparator(this.Color.NAME,_362,_364);
+m.registerComparator(this.Color.NAME,_3b6,_3b8);
 this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
 }});
 MochiKit.Color.EXPORT=["Color"];
@@ -3136,35 +3519,35 @@ this._event.returnValue=msg;
 }});
 MochiKit.Signal._specialMacKeys={3:"KEY_ENTER",63289:"KEY_NUM_PAD_CLEAR",63276:"KEY_PAGE_UP",63277:"KEY_PAGE_DOWN",63275:"KEY_END",63273:"KEY_HOME",63234:"KEY_ARROW_LEFT",63232:"KEY_ARROW_UP",63235:"KEY_ARROW_RIGHT",63233:"KEY_ARROW_DOWN",63302:"KEY_INSERT",63272:"KEY_DELETE"};
 (function(){
-var _373=MochiKit.Signal._specialMacKeys;
+var _3c7=MochiKit.Signal._specialMacKeys;
 for(i=63236;i<=63242;i++){
-_373[i]="KEY_F"+(i-63236+1);
+_3c7[i]="KEY_F"+(i-63236+1);
 }
 })();
 MochiKit.Signal._specialKeys={8:"KEY_BACKSPACE",9:"KEY_TAB",12:"KEY_NUM_PAD_CLEAR",13:"KEY_ENTER",16:"KEY_SHIFT",17:"KEY_CTRL",18:"KEY_ALT",19:"KEY_PAUSE",20:"KEY_CAPS_LOCK",27:"KEY_ESCAPE",32:"KEY_SPACEBAR",33:"KEY_PAGE_UP",34:"KEY_PAGE_DOWN",35:"KEY_END",36:"KEY_HOME",37:"KEY_ARROW_LEFT",38:"KEY_ARROW_UP",39:"KEY_ARROW_RIGHT",40:"KEY_ARROW_DOWN",44:"KEY_PRINT_SCREEN",45:"KEY_INSERT",46:"KEY_DELETE",59:"KEY_SEMICOLON",91:"KEY_WINDOWS_LEFT",92:"KEY_WINDOWS_RIGHT",93:"KEY_SELECT",106:"KEY_NUM_PAD_ASTERISK",107:"KEY_NUM_PAD_PLUS_SIGN",109:"KEY_NUM_PAD_HYPHEN-MINUS",110:"KEY_NUM_PAD_FULL_STOP",111:"KEY_NUM_PAD_SOLIDUS",144:"KEY_NUM_LOCK",145:"KEY_SCROLL_LOCK",186:"KEY_SEMICOLON",187:"KEY_EQUALS_SIGN",188:"KEY_COMMA",189:"KEY_HYPHEN-MINUS",190:"KEY_FULL_STOP",191:"KEY_SOLIDUS",192:"KEY_GRAVE_ACCENT",219:"KEY_LEFT_SQUARE_BRACKET",220:"KEY_REVERSE_SOLIDUS",221:"KEY_RIGHT_SQUARE_BRACKET",222:"KEY_APOSTROPHE"};
 (function(){
-var _374=MochiKit.Signal._specialKeys;
+var _3c8=MochiKit.Signal._specialKeys;
 for(var i=48;i<=57;i++){
-_374[i]="KEY_"+(i-48);
+_3c8[i]="KEY_"+(i-48);
 }
 for(i=65;i<=90;i++){
-_374[i]="KEY_"+String.fromCharCode(i);
+_3c8[i]="KEY_"+String.fromCharCode(i);
 }
 for(i=96;i<=105;i++){
-_374[i]="KEY_NUM_PAD_"+(i-96);
+_3c8[i]="KEY_NUM_PAD_"+(i-96);
 }
 for(i=112;i<=123;i++){
-_374[i]="KEY_F"+(i-112+1);
+_3c8[i]="KEY_F"+(i-112+1);
 }
 })();
-MochiKit.Signal.Ident=function(_376){
-this.source=_376.source;
-this.signal=_376.signal;
-this.listener=_376.listener;
-this.isDOM=_376.isDOM;
-this.objOrFunc=_376.objOrFunc;
-this.funcOrStr=_376.funcOrStr;
-this.connected=_376.connected;
+MochiKit.Signal.Ident=function(_3ca){
+this.source=_3ca.source;
+this.signal=_3ca.signal;
+this.listener=_3ca.listener;
+this.isDOM=_3ca.isDOM;
+this.objOrFunc=_3ca.objOrFunc;
+this.funcOrStr=_3ca.funcOrStr;
+this.connected=_3ca.connected;
 };
 MochiKit.Signal.Ident.prototype={};
 MochiKit.Base.update(MochiKit.Signal,{__repr__:function(){
@@ -3173,42 +3556,42 @@ return "["+this.NAME+" "+this.VERSION+"]";
 return this.__repr__();
 },_unloadCache:function(){
 var self=MochiKit.Signal;
-var _378=self._observers;
-for(var i=0;i<_378.length;i++){
-if(_378[i].signal!=="onload"&&_378[i].signal!=="onunload"){
-self._disconnect(_378[i]);
+var _3cc=self._observers;
+for(var i=0;i<_3cc.length;i++){
+if(_3cc[i].signal!=="onload"&&_3cc[i].signal!=="onunload"){
+self._disconnect(_3cc[i]);
 }
 }
-},_listener:function(src,sig,func,obj,_37e){
+},_listener:function(src,sig,func,obj,_3d2){
 var self=MochiKit.Signal;
 var E=self.Event;
-if(!_37e){
+if(!_3d2){
 return MochiKit.Base.bind(func,obj);
 }
 obj=obj||src;
 if(typeof (func)=="string"){
 if(sig==="onload"||sig==="onunload"){
-return function(_381){
-obj[func].apply(obj,[new E(src,_381)]);
-var _382=new MochiKit.Signal.Ident({source:src,signal:sig,objOrFunc:obj,funcOrStr:func});
-MochiKit.Signal._disconnect(_382);
+return function(_3d5){
+obj[func].apply(obj,[new E(src,_3d5)]);
+var _3d6=new MochiKit.Signal.Ident({source:src,signal:sig,objOrFunc:obj,funcOrStr:func});
+MochiKit.Signal._disconnect(_3d6);
 };
 }else{
-return function(_383){
-obj[func].apply(obj,[new E(src,_383)]);
+return function(_3d7){
+obj[func].apply(obj,[new E(src,_3d7)]);
 };
 }
 }else{
 if(sig==="onload"||sig==="onunload"){
-return function(_384){
-func.apply(obj,[new E(src,_384)]);
+return function(_3d8){
+func.apply(obj,[new E(src,_3d8)]);
 MochiKit.Signal.disconnect(src,sig,func);
-var _385=new MochiKit.Signal.Ident({source:src,signal:sig,objOrFunc:func});
-MochiKit.Signal._disconnect(_385);
+var _3d9=new MochiKit.Signal.Ident({source:src,signal:sig,objOrFunc:func});
+MochiKit.Signal._disconnect(_3d9);
 };
 }else{
-return function(_386){
-func.apply(obj,[new E(src,_386)]);
+return function(_3da){
+func.apply(obj,[new E(src,_3da)]);
 };
 }
 }
@@ -3216,8 +3599,8 @@ func.apply(obj,[new E(src,_386)]);
 return /MSIE/.test(navigator.userAgent);
 },_mouseEnterListener:function(src,sig,func,obj){
 var E=MochiKit.Signal.Event;
-return function(_38c){
-var e=new E(src,_38c);
+return function(_3e0){
+var e=new E(src,_3e0);
 try{
 e.relatedTarget().nodeName;
 }
@@ -3237,101 +3620,101 @@ return obj[func].apply(obj,[e]);
 return func.apply(obj,[e]);
 }
 };
-},_getDestPair:function(_38e,_38f){
+},_getDestPair:function(_3e2,_3e3){
 var obj=null;
 var func=null;
-if(typeof (_38f)!="undefined"){
-obj=_38e;
-func=_38f;
-if(typeof (_38f)=="string"){
-if(typeof (_38e[_38f])!="function"){
+if(typeof (_3e3)!="undefined"){
+obj=_3e2;
+func=_3e3;
+if(typeof (_3e3)=="string"){
+if(typeof (_3e2[_3e3])!="function"){
 throw new Error("'funcOrStr' must be a function on 'objOrFunc'");
 }
 }else{
-if(typeof (_38f)!="function"){
+if(typeof (_3e3)!="function"){
 throw new Error("'funcOrStr' must be a function or string");
 }
 }
 }else{
-if(typeof (_38e)!="function"){
+if(typeof (_3e2)!="function"){
 throw new Error("'objOrFunc' must be a function if 'funcOrStr' is not given");
 }else{
-func=_38e;
+func=_3e2;
 }
 }
 return [obj,func];
-},connect:function(src,sig,_394,_395){
+},connect:function(src,sig,_3e8,_3e9){
 src=MochiKit.DOM.getElement(src);
 var self=MochiKit.Signal;
 if(typeof (sig)!="string"){
 throw new Error("'sig' must be a string");
 }
-var _397=self._getDestPair(_394,_395);
-var obj=_397[0];
-var func=_397[1];
+var _3eb=self._getDestPair(_3e8,_3e9);
+var obj=_3eb[0];
+var func=_3eb[1];
 if(typeof (obj)=="undefined"||obj===null){
 obj=src;
 }
-var _39a=!!(src.addEventListener||src.attachEvent);
-if(_39a&&(sig==="onmouseenter"||sig==="onmouseleave")&&!self._browserAlreadyHasMouseEnterAndLeave()){
-var _39b=self._mouseEnterListener(src,sig.substr(2),func,obj);
+var _3ee=!!(src.addEventListener||src.attachEvent);
+if(_3ee&&(sig==="onmouseenter"||sig==="onmouseleave")&&!self._browserAlreadyHasMouseEnterAndLeave()){
+var _3ef=self._mouseEnterListener(src,sig.substr(2),func,obj);
 if(sig==="onmouseenter"){
 sig="onmouseover";
 }else{
 sig="onmouseout";
 }
 }else{
-var _39b=self._listener(src,sig,func,obj,_39a);
+var _3ef=self._listener(src,sig,func,obj,_3ee);
 }
 if(src.addEventListener){
-src.addEventListener(sig.substr(2),_39b,false);
+src.addEventListener(sig.substr(2),_3ef,false);
 }else{
 if(src.attachEvent){
-src.attachEvent(sig,_39b);
+src.attachEvent(sig,_3ef);
 }
 }
-var _39c=new MochiKit.Signal.Ident({source:src,signal:sig,listener:_39b,isDOM:_39a,objOrFunc:_394,funcOrStr:_395,connected:true});
-self._observers.push(_39c);
-if(!_39a&&typeof (src.__connect__)=="function"){
-var args=MochiKit.Base.extend([_39c],arguments,1);
+var _3f0=new MochiKit.Signal.Ident({source:src,signal:sig,listener:_3ef,isDOM:_3ee,objOrFunc:_3e8,funcOrStr:_3e9,connected:true});
+self._observers.push(_3f0);
+if(!_3ee&&typeof (src.__connect__)=="function"){
+var args=MochiKit.Base.extend([_3f0],arguments,1);
 src.__connect__.apply(src,args);
 }
-return _39c;
-},_disconnect:function(_39e){
-if(!_39e.connected){
+return _3f0;
+},_disconnect:function(_3f2){
+if(!_3f2.connected){
 return;
 }
-_39e.connected=false;
-if(!_39e.isDOM){
+_3f2.connected=false;
+if(!_3f2.isDOM){
 return;
 }
-var src=_39e.source;
-var sig=_39e.signal;
-var _3a1=_39e.listener;
+var src=_3f2.source;
+var sig=_3f2.signal;
+var _3f5=_3f2.listener;
 if(src.removeEventListener){
-src.removeEventListener(sig.substr(2),_3a1,false);
+src.removeEventListener(sig.substr(2),_3f5,false);
 }else{
 if(src.detachEvent){
-src.detachEvent(sig,_3a1);
+src.detachEvent(sig,_3f5);
 }else{
 throw new Error("'src' must be a DOM element");
 }
 }
-},disconnect:function(_3a2){
+},disconnect:function(_3f6){
 var self=MochiKit.Signal;
-var _3a4=self._observers;
+var _3f8=self._observers;
 var m=MochiKit.Base;
 if(arguments.length>1){
 var src=MochiKit.DOM.getElement(arguments[0]);
 var sig=arguments[1];
 var obj=arguments[2];
 var func=arguments[3];
-for(var i=_3a4.length-1;i>=0;i--){
-var o=_3a4[i];
+for(var i=_3f8.length-1;i>=0;i--){
+var o=_3f8[i];
 if(o.source===src&&o.signal===sig&&o.objOrFunc===obj&&o.funcOrStr===func){
 self._disconnect(o);
 if(!self._lock){
-_3a4.splice(i,1);
+_3f8.splice(i,1);
 }else{
 self._dirty=true;
 }
@@ -3339,11 +3722,11 @@ return true;
 }
 }
 }else{
-var idx=m.findIdentical(_3a4,_3a2);
+var idx=m.findIdentical(_3f8,_3f6);
 if(idx>=0){
-self._disconnect(_3a2);
+self._disconnect(_3f6);
 if(!self._lock){
-_3a4.splice(idx,1);
+_3f8.splice(idx,1);
 }else{
 self._dirty=true;
 }
@@ -3351,100 +3734,100 @@ return true;
 }
 }
 return false;
-},disconnectAllTo:function(_3ad,_3ae){
+},disconnectAllTo:function(_401,_402){
 var self=MochiKit.Signal;
-var _3b0=self._observers;
-var _3b1=self._disconnect;
-var _3b2=self._lock;
-var _3b3=self._dirty;
-if(typeof (_3ae)==="undefined"){
-_3ae=null;
+var _404=self._observers;
+var _405=self._disconnect;
+var _406=self._lock;
+var _407=self._dirty;
+if(typeof (_402)==="undefined"){
+_402=null;
 }
-for(var i=_3b0.length-1;i>=0;i--){
-var _3b5=_3b0[i];
-if(_3b5.objOrFunc===_3ad&&(_3ae===null||_3b5.funcOrStr===_3ae)){
-_3b1(_3b5);
-if(_3b2){
-_3b3=true;
+for(var i=_404.length-1;i>=0;i--){
+var _409=_404[i];
+if(_409.objOrFunc===_401&&(_402===null||_409.funcOrStr===_402)){
+_405(_409);
+if(_406){
+_407=true;
 }else{
-_3b0.splice(i,1);
+_404.splice(i,1);
 }
 }
 }
-self._dirty=_3b3;
+self._dirty=_407;
 },disconnectAll:function(src,sig){
 src=MochiKit.DOM.getElement(src);
 var m=MochiKit.Base;
-var _3b9=m.flattenArguments(m.extend(null,arguments,1));
+var _40d=m.flattenArguments(m.extend(null,arguments,1));
 var self=MochiKit.Signal;
-var _3bb=self._disconnect;
-var _3bc=self._observers;
-var i,_3be;
-var _3bf=self._lock;
-var _3c0=self._dirty;
-if(_3b9.length===0){
-for(i=_3bc.length-1;i>=0;i--){
-_3be=_3bc[i];
-if(_3be.source===src){
-_3bb(_3be);
-if(!_3bf){
-_3bc.splice(i,1);
+var _40f=self._disconnect;
+var _410=self._observers;
+var i,_412;
+var _413=self._lock;
+var _414=self._dirty;
+if(_40d.length===0){
+for(i=_410.length-1;i>=0;i--){
+_412=_410[i];
+if(_412.source===src){
+_40f(_412);
+if(!_413){
+_410.splice(i,1);
 }else{
-_3c0=true;
+_414=true;
 }
 }
 }
 }else{
 var sigs={};
-for(i=0;i<_3b9.length;i++){
-sigs[_3b9[i]]=true;
+for(i=0;i<_40d.length;i++){
+sigs[_40d[i]]=true;
 }
-for(i=_3bc.length-1;i>=0;i--){
-_3be=_3bc[i];
-if(_3be.source===src&&_3be.signal in sigs){
-_3bb(_3be);
-if(!_3bf){
-_3bc.splice(i,1);
+for(i=_410.length-1;i>=0;i--){
+_412=_410[i];
+if(_412.source===src&&_412.signal in sigs){
+_40f(_412);
+if(!_413){
+_410.splice(i,1);
 }else{
-_3c0=true;
+_414=true;
 }
 }
 }
 }
-self._dirty=_3c0;
+self._dirty=_414;
 },signal:function(src,sig){
 var self=MochiKit.Signal;
-var _3c5=self._observers;
+var _419=self._observers;
 src=MochiKit.DOM.getElement(src);
 var args=MochiKit.Base.extend(null,arguments,2);
-var _3c7=[];
+var _41b=[];
 self._lock=true;
-for(var i=0;i<_3c5.length;i++){
-var _3c9=_3c5[i];
-if(_3c9.source===src&&_3c9.signal===sig){
+for(var i=0;i<_419.length;i++){
+var _41d=_419[i];
+if(_41d.source===src&&_41d.signal===sig){
 try{
-_3c9.listener.apply(src,args);
+_41d.listener.apply(src,args);
 }
 catch(e){
-_3c7.push(e);
+_41b.push(e);
 }
 }
 }
 self._lock=false;
 if(self._dirty){
 self._dirty=false;
-for(var i=_3c5.length-1;i>=0;i--){
-if(!_3c5[i].connected){
-_3c5.splice(i,1);
+for(var i=_419.length-1;i>=0;i--){
+if(!_419[i].connected){
+_419.splice(i,1);
 }
 }
 }
-if(_3c7.length==1){
-throw _3c7[0];
+if(_41b.length==1){
+throw _41b[0];
 }else{
-if(_3c7.length>1){
+if(_41b.length>1){
 var e=new Error("Multiple errors thrown in handling 'sig', see errors property");
-e.errors=_3c7;
+e.errors=_41b;
 throw e;
 }
 }
@@ -3489,12 +3872,12 @@ MochiKit.Base._exportSymbols(this,MochiKit.Signal);
 ***/
 
 try{
-if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.DOM)=="undefined"||typeof (MochiKit.Color)=="undefined"||typeof (MochiKit.Format)=="undefined"){
+if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.DOM)=="undefined"||typeof (MochiKit.Color)=="undefined"){
 throw "";
 }
 }
 catch(e){
-throw "PlotKit depends on MochiKit.{Base,Color,DOM,Format}";
+throw "PlotKit depends on MochiKit.{Base,Color,DOM}";
 }
 MochiKit.Base.update(MochiKit.Color.Color.prototype,{asFillColor:function(){
 return this.lighterColorWithLevel(0.3);
@@ -3533,186 +3916,135 @@ catch(e){
 return false;
 }
 };
-MochiKit.Base.update(PlotKit.Base,{roundInterval:function(_1,_2,_3){
-var _4=MochiKit.Format.roundToFixed;
-var _5=_1/_2;
-return parseFloat(_4(_5,_3));
-},collapse:function(_6){
+MochiKit.Base.update(PlotKit.Base,{collapse:function(_1){
 var m=MochiKit.Base;
-var _8=new Array();
-for(var i=0;i<_6.length;i++){
-_8=m.concat(_8,_6[i]);
+var _3=new Array();
+for(var i=0;i<_1.length;i++){
+_3=m.concat(_3,_1[i]);
 }
 if(PlotKit.Base.usingPrototype()){
-delete _8.extend;
-delete _8.from;
-delete _8.inspect;
+delete _3.extend;
+delete _3.from;
+delete _3.inspect;
 }
-return _8;
-},uniq:function(_10){
+return _3;
+},uniq:function(_5){
 var m=MochiKit.Base;
-if(!m.isArrayLike(_10)||(_10.length<1)){
+if(!m.isArrayLike(_5)||(_5.length<1)){
 return new Array();
 }
-var _11=new Array();
-var _12=_10[0];
-_11.push(_10[0]);
-for(var i=1;i<_10.length;i++){
-if(m.compare(_10[i],_12)!=0){
-_12=_10[i];
-_11.push(_10[i]);
-}
-}
-return _11;
-},colorScheme:function(){
-var mb=MochiKit.Base;
-var mc=MochiKit.Color;
-var _15=["red","orange","yellow","green","cyan","blue","purple","magenta"];
-var _16=function(_17){
-return mc.Color[_17+"Color"]();
-};
-return mb.map(_16,_15);
-},baseDarkPrimaryColors:function(){
-var _18=MochiKit.Color.Color.fromHexString;
-return [_18("#ad3f40"),_18("#ddac2c"),_18("#dfdd0c"),_18("#5276c4"),_18("#739c5a")];
-},basePrimaryColors:function(){
-var _19=MochiKit.Color.Color.fromHexString;
-return [_19("#d24c4d"),_19("#f2b32f"),_19("#ece90e"),_19("#5d83da"),_19("#78a15d")];
-},baseBlueColors:function(){
-var _20=MochiKit.Color.Color.fromHexString;
-return [_20("#4b6b94"),_20("#5d81b4"),_20("#acbad2")];
-},palette:function(_21,_22,_23,_24){
-var _25=MochiKit.Base.isUndefinedOrNull;
-var _26=new Array();
-if(_25(_24)){
-_24=0.1;
-}
-if(_25(_23)){
-_23=0.4;
-}
-if(_25(_22)){
-_22=-0.2;
-}
-var _27=_22;
-while(_27<=_23){
-_26.push(_27);
-_27+=_24;
-}
-var _28=function(_29,_30){
-return _29.lighterColorWithLevel(_30);
-};
-return MochiKit.Base.map(partial(_28,_21),_26);
+var _6=new Array();
+var _7=_5[0];
+_6.push(_5[0]);
+for(var i=1;i<_5.length;i++){
+if(m.compare(_5[i],_7)!=0){
+_7=_5[i];
+_6.push(_5[i]);
+}
+}
+return _6;
+},palette:function(_8,_9,_10,_11){
+var _12=MochiKit.Base.isUndefinedOrNull;
+var _13=new Array();
+if(_12(_11)){
+_11=0.1;
+}
+if(_12(_10)){
+_10=0.4;
+}
+if(_12(_9)){
+_9=-0.2;
+}
+var _14=_9;
+while(_14<=_10){
+_13.push(_14);
+_14+=_11;
+}
+var _15=function(_16,_17){
+return _16.lighterColorWithLevel(_17);
+};
+return MochiKit.Base.map(partial(_15,_8),_13);
 },excanvasSupported:function(){
 if(/MSIE/.test(navigator.userAgent)&&!window.opera){
 return true;
 }
 return false;
 },findPosX:function(obj){
-var _32=0;
+var _19=0;
 if(obj.offsetParent){
 while(obj.offsetParent){
-_32+=obj.offsetLeft;
+_19+=obj.offsetLeft;
 obj=obj.offsetParent;
 }
 }else{
 if(obj.x){
-_32+=obj.x;
+_19+=obj.x;
 }
 }
-return _32;
+return _19;
 },findPosY:function(obj){
-var _33=0;
+var _20=0;
 if(obj.offsetParent){
 while(obj.offsetParent){
-_33+=obj.offsetTop;
+_20+=obj.offsetTop;
 obj=obj.offsetParent;
 }
 }else{
 if(obj.y){
-_33+=obj.y;
+_20+=obj.y;
 }
 }
-return _33;
+return _20;
 },isFuncLike:function(obj){
 return (typeof (obj)=="function");
 }});
 PlotKit.Base.map=function(fn,lst){
 if(PlotKit.Base.usingPrototype()){
-var _36=[];
+var _23=[];
 for(var x in lst){
 if(typeof (lst[x])=="function"){
 continue;
 }
-_36.push(fn(lst[x]));
+_23.push(fn(lst[x]));
 }
-return _36;
+return _23;
 }else{
 return MochiKit.Base.map(fn,lst);
 }
 };
 PlotKit.Base.items=function(lst){
 if(PlotKit.Base.usingPrototype()){
-var _38=[];
+var _25=[];
 for(var x in lst){
 if(typeof (lst[x])=="function"){
 continue;
 }
-_38.push([x,lst[x]]);
+_25.push([x,lst[x]]);
 }
-return _38;
+return _25;
 }else{
 return MochiKit.Base.items(lst);
 }
 };
 PlotKit.Base.keys=function(lst){
 if(PlotKit.Base.usingPrototype()){
-var _39=[];
+var _26=[];
 for(var x in lst){
 if(typeof (lst[x])=="function"){
 continue;
 }
-_39.push(x);
+_26.push(x);
 }
-return _39;
+return _26;
 }else{
 return MochiKit.Base.keys(lst);
 }
 };
 PlotKit.Base.baseColors=function(){
-var _40=MochiKit.Color.Color.fromHexString;
-return [_40("#476fb2"),_40("#be2c2b"),_40("#85b730"),_40("#734a99"),_40("#26a1c5"),_40("#fb8707"),_40("#000000")];
-};
-PlotKit.Base.officeBaseStyle={"axisLineWidth":2,"axisLabelColor":Color.grayColor(),"axisLineColor":Color.whiteColor(),"padding":{top:5,bottom:10,left:30,right:30}};
-MochiKit.Base.update(PlotKit.Base,{officeBlue:function(){
-var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),"backgroundColor":PlotKit.Base.baseColors()[0].lighterColorWithLevel(0.45)};
-MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle);
-return r;
-},officeRed:function(){
-var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[1]),"backgroundColor":PlotKit.Base.baseColors()[1].lighterColorWithLevel(0.5)};
-MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle);
-return r;
-},officeGreen:function(){
-var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[2]),"backgroundColor":PlotKit.Base.baseColors()[2].lighterColorWithLevel(0.5)};
-MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle);
-return r;
-},officePurple:function(){
-var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[3]),"backgroundColor":PlotKit.Base.baseColors()[3].lighterColorWithLevel(0.5)};
-MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle);
-return r;
-},officeCyan:function(){
-var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[4]),"backgroundColor":PlotKit.Base.baseColors()[4].lighterColorWithLevel(0.5)};
-MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle);
-return r;
-},officeOrange:function(){
-var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[5]),"backgroundColor":PlotKit.Base.baseColors()[5].lighterColorWithLevel(0.4)};
-MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle);
-return r;
-},officeBlack:function(){
-var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[6],0,0.6),"backgroundColor":PlotKit.Base.baseColors()[6].lighterColorWithLevel(0.9)};
-MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle);
-return r;
-}});
-PlotKit.Base.EXPORT=["baseColors","collapse","colorScheme","findPosX","findPosY","officeBaseStyle","officeBlue","officeRed","officeGreen","officePurple","officeCyan","officeOrange","officeBlack","roundInterval","uniq","isFuncLike","excanvasSupported"];
+var _27=MochiKit.Color.Color.fromHexString;
+return [_27("#476fb2"),_27("#be2c2b"),_27("#85b730"),_27("#734a99"),_27("#26a1c5"),_27("#fb8707"),_27("#000000")];
+};
+PlotKit.Base.EXPORT=["baseColors","collapse","findPosX","findPosY","uniq","isFuncLike","excanvasSupported"];
 PlotKit.Base.EXPORT_OK=[];
 PlotKit.Base.__new__=function(){
 var m=MochiKit.Base;
@@ -3741,10 +4073,10 @@ PlotKit.Layout.toString=function(){
 return this.__repr__();
 };
 PlotKit.Layout.valid_styles=["bar","line","pie","point"];
-PlotKit.Layout=function(_42,_43){
+PlotKit.Layout=function(_28,_29){
 this.options={"barWidthFillFraction":0.75,"barOrientation":"vertical","xOriginIsZero":true,"yOriginIsZero":true,"xAxis":null,"yAxis":null,"xTicks":null,"yTicks":null,"xNumberOfTicks":10,"yNumberOfTicks":5,"xTickPrecision":1,"yTickPrecision":1,"pieRadius":0.4};
-this.style=_42;
-MochiKit.Base.update(this.options,_43?_43:{});
+this.style=_28;
+MochiKit.Base.update(this.options,_29?_29:{});
 if(!MochiKit.Base.isUndefinedOrNull(this.options.xAxis)){
 this.minxval=this.options.xAxis[0];
 this.maxxval=this.options.xAxis[1];
@@ -3774,153 +4106,48 @@ this.xrange=1;
 this.yrange=1;
 this.hitTestCache={x2maxy:null};
 };
-PlotKit.Layout.prototype.addDataset=function(_44,_45){
-this.datasets[_44]=_45;
-};
-PlotKit.Layout.prototype.removeDataset=function(_46,_47){
-delete this.datasets[_46];
+PlotKit.Layout.prototype.addDataset=function(_30,_31){
+this.datasets[_30]=_31;
 };
-PlotKit.Layout.prototype.addDatasetFromTable=function(_48,_49,_50,_51,_52){
-var _53=MochiKit.Base.isUndefinedOrNull;
-var _54=MochiKit.DOM.scrapeText;
-var _55=MochiKit.Format.strip;
-if(_53(_50)){
-_50=0;
-}
-if(_53(_51)){
-_51=1;
-}
-if(_53(_52)){
-_52=-1;
-}
-var _56=_49.tBodies[0].rows;
-var _57=new Array();
-var _58=new Array();
-if(!_53(_56)){
-for(var i=0;i<_56.length;i++){
-_57.push([parseFloat(_55(_54(_56[i].cells[_50]))),parseFloat(_55(_54(_56[i].cells[_51])))]);
-if(_52>=0){
-_58.push({v:parseFloat(_55(_54(_56[i].cells[_50]))),label:_55(_54(_56[i].cells[_52]))});
-}
-}
-this.addDataset(_48,_57);
-if(_52>=0){
-this.options.xTicks=_58;
-}
-return true;
-}
-return false;
+PlotKit.Layout.prototype.removeDataset=function(_32,_33){
+delete this.datasets[_32];
 };
 PlotKit.Layout.prototype.evaluate=function(){
 this._evaluateLimits();
 this._evaluateScales();
-if(this.style=="bar"){
-if(this.options.barOrientation=="horizontal"){
-this._evaluateHorizBarCharts();
-}else{
-this._evaluateBarCharts();
-}
-this._evaluateBarTicks();
-}else{
 if(this.style=="line"){
 this._evaluateLineCharts();
 this._evaluateLineTicks();
-}else{
-if(this.style=="pie"){
-this._evaluatePieCharts();
-this._evaluatePieTicks();
-}
-}
 }
 };
-PlotKit.Layout.prototype.hitTest=function(x,y){
-var f=MochiKit.Format.twoDigitFloat;
-if((this.style=="bar")&&this.bars&&(this.bars.length>0)){
-for(var i=0;i<this.bars.length;i++){
-var bar=this.bars[i];
-if((x>=bar.x)&&(x<=bar.x+bar.w)&&(y>=bar.y)&&(y-bar.y<=bar.h)){
-return bar;
-}
-}
-}else{
-if(this.style=="line"){
-if(this.hitTestCache.x2maxy==null){
-this._regenerateHitTestCache();
-}
-var _62=x/this.xscale;
-var _63=this.hitTestCache.xvalues;
-var _64=null;
-var _65=null;
-for(var i=1;i<_63.length;i++){
-if(_63[i]>_62){
-_64=_63[i-1];
-_65=_63[i];
-break;
-}
-}
-if((_64!=null)){
-var _66=this.hitTestCache.x2maxy[_64];
-var _67=this.hitTestCache.x2maxy[_65];
-var _68=(1-y)/this.yscale;
-var _69=(_67-_66)/(_65-_64);
-var _70=_66+_69*(_62-_64);
-if(_70>=_68){
-var obj={xval:_62,yval:_68,xafter:_65,yafter:_67,xbefore:_64,ybefore:_66,yprojected:_70};
-return obj;
-}
-}
-}else{
-if(this.style=="pie"){
-var _71=Math.sqrt((y-0.5)*(y-0.5)+(x-0.5)*(x-0.5));
-if(_71>this.options.pieRadius){
-return null;
-}
-var _72=Math.atan2(y-0.5,x-0.5)-Math.PI/2;
-for(var i=0;i<this.slices.length;i++){
-var _73=this.slices[i];
-if(_73.startAngle<_72&&_73.endAngle>=_72){
-return _73;
-}
-}
-}
-}
-}
-return null;
-};
-PlotKit.Layout.prototype.rectForX=function(x){
-return null;
-};
-PlotKit.Layout.prototype.angleRangeForX=function(x){
-return null;
-};
 PlotKit.Layout.prototype._evaluateLimits=function(){
 var map=PlotKit.Base.map;
-var _75=PlotKit.Base.items;
-var _76=MochiKit.Base.itemgetter;
-var _77=PlotKit.Base.collapse;
-var _78=MochiKit.Base.listMin;
-var _79=MochiKit.Base.listMax;
-var _80=MochiKit.Base.isUndefinedOrNull;
-var all=_77(map(_76(1),_75(this.datasets)));
-if(_80(this.options.xAxis)){
+var _35=PlotKit.Base.items;
+var _36=MochiKit.Base.itemgetter;
+var _37=PlotKit.Base.collapse;
+var _38=MochiKit.Base.listMin;
+var _39=MochiKit.Base.listMax;
+var _40=MochiKit.Base.isUndefinedOrNull;
+var all=_37(map(_36(1),_35(this.datasets)));
+if(_40(this.options.xAxis)){
 if(this.options.xOriginIsZero){
 this.minxval=0;
 }else{
-this.minxval=_78(map(parseFloat,map(_76(0),all)));
+this.minxval=_38(map(parseFloat,map(_36(0),all)));
 }
-this.maxxval=_79(map(parseFloat,map(_76(0),all)));
+this.maxxval=_39(map(parseFloat,map(_36(0),all)));
 }else{
 this.minxval=this.options.xAxis[0];
 this.maxxval=this.options.xAxis[1];
 this.xscale=this.maxval-this.minxval;
 }
-if(_80(this.options.yAxis)){
+if(_40(this.options.yAxis)){
 if(this.options.yOriginIsZero){
 this.minyval=0;
 }else{
-this.minyval=_78(map(parseFloat,map(_76(1),all)));
+this.minyval=_38(map(parseFloat,map(_36(1),all)));
 }
-this.maxyval=_79(map(parseFloat,map(_76(1),all)));
+this.maxyval=_39(map(parseFloat,map(_36(1),all)));
 }else{
 this.minyval=this.options.yAxis[0];
 this.maxyval=this.options.yAxis[1];
@@ -3928,7 +4155,7 @@ this.yscale=this.maxyval-this.minyval;
 }
 };
 PlotKit.Layout.prototype._evaluateScales=function(){
-var _82=MochiKit.Base.isUndefinedOrNull;
+var _42=MochiKit.Base.isUndefinedOrNull;
 this.xrange=this.maxxval-this.minxval;
 if(this.xrange==0){
 this.xscale=1;
@@ -3943,193 +4170,75 @@ this.yscale=1/this.yrange;
 }
 };
 PlotKit.Layout.prototype._uniqueXValues=function(){
-var _83=PlotKit.Base.collapse;
+var _43=PlotKit.Base.collapse;
 var map=PlotKit.Base.map;
-var _84=PlotKit.Base.uniq;
-var _85=MochiKit.Base.itemgetter;
-var _86=PlotKit.Base.items;
-var _87=map(parseFloat,map(_85(0),_83(map(_85(1),_86(this.datasets)))));
-_87.sort(MochiKit.Base.compare);
-return _84(_87);
-};
-PlotKit.Layout.prototype._evaluateBarCharts=function(){
-var _88=PlotKit.Base.items;
-var _89=_88(this.datasets).length;
-var _90=10000000;
-var _91=this._uniqueXValues();
-for(var i=1;i<_91.length;i++){
-_90=Math.min(Math.abs(_91[i]-_91[i-1]),_90);
-}
-var _92=0;
-var _93=0;
-var _94=0;
-if(_91.length==1){
-_90=1;
-this.xscale=1;
-this.minxval=_91[0];
-_92=1*this.options.barWidthFillFraction;
-_93=_92/_89;
-_94=(1-this.options.barWidthFillFraction)/2;
-}else{
-if(this.xrange==1){
-this.xscale=0.5;
-}else{
-if(this.xrange==2){
-this.xscale=1/3;
-}else{
-this.xscale=(1-_90/this.xrange)/this.xrange;
-}
-}
-_92=_90*this.xscale*this.options.barWidthFillFraction;
-_93=_92/_89;
-_94=_90*this.xscale*(1-this.options.barWidthFillFraction)/2;
-}
-this.minxdelta=_90;
-this.bars=new Array();
-var i=0;
-for(var _95 in this.datasets){
-var _96=this.datasets[_95];
-if(PlotKit.Base.isFuncLike(_96)){
-continue;
-}
-for(var j=0;j<_96.length;j++){
-var _98=_96[j];
-var _99={x:((parseFloat(_98[0])-this.minxval)*this.xscale)+(i*_93)+_94,y:1-((parseFloat(_98[1])-this.minyval)*this.yscale),w:_93,h:((parseFloat(_98[1])-this.minyval)*this.yscale),xval:parseFloat(_98[0]),yval:parseFloat(_98[1]),name:_95};
-if((_99.x>=0)&&(_99.x<=1)&&(_99.y>=0)&&(_99.y<=1)){
-this.bars.push(_99);
-}
-}
-i++;
-}
-};
-PlotKit.Layout.prototype._evaluateHorizBarCharts=function(){
-var _100=PlotKit.Base.items;
-var _101=_100(this.datasets).length;
-var _102=10000000;
-var _103=this._uniqueXValues();
-for(var i=1;i<_103.length;i++){
-_102=Math.min(Math.abs(_103[i]-_103[i-1]),_102);
-}
-var _104=0;
-var _105=0;
-var _106=0;
-if(_103.length==1){
-_102=1;
-this.xscale=1;
-this.minxval=_103[0];
-_104=1*this.options.barWidthFillFraction;
-_105=_104/_101;
-_106=(1-this.options.barWidthFillFraction)/2;
-}else{
-this.xscale=(1-_102/this.xrange)/this.xrange;
-_104=_102*this.xscale*this.options.barWidthFillFraction;
-_105=_104/_101;
-_106=_102*this.xscale*(1-this.options.barWidthFillFraction)/2;
-}
-this.minxdelta=_102;
-this.bars=new Array();
-var i=0;
-for(var _107 in this.datasets){
-var _108=this.datasets[_107];
-if(PlotKit.Base.isFuncLike(_108)){
-continue;
-}
-for(var j=0;j<_108.length;j++){
-var item=_108[j];
-var rect={y:((parseFloat(item[0])-this.minxval)*this.xscale)+(i*_105)+_106,x:0,h:_105,w:((parseFloat(item[1])-this.minyval)*this.yscale),xval:parseFloat(item[0]),yval:parseFloat(item[1]),name:_107};
-if(rect.y<=0){
-rect.y=0;
-}
-if(rect.y>=1){
-rect.y=1;
-}
-if((rect.x>=0)&&(rect.x<=1)){
-this.bars.push(rect);
-}
-}
-i++;
-}
+var _44=PlotKit.Base.uniq;
+var _45=MochiKit.Base.itemgetter;
+var _46=PlotKit.Base.items;
+var _47=map(parseFloat,map(_45(0),_43(map(_45(1),_46(this.datasets)))));
+_47.sort(MochiKit.Base.compare);
+return _44(_47);
 };
 PlotKit.Layout.prototype._evaluateLineCharts=function(){
-var _111=PlotKit.Base.items;
-var _112=_111(this.datasets).length;
+var _48=PlotKit.Base.items;
+var _49=_48(this.datasets).length;
 this.points=new Array();
 var i=0;
-for(var _113 in this.datasets){
-var _114=this.datasets[_113];
-if(PlotKit.Base.isFuncLike(_114)){
+for(var _50 in this.datasets){
+var _51=this.datasets[_50];
+if(PlotKit.Base.isFuncLike(_51)){
 continue;
 }
-_114.sort(function(a,b){
+_51.sort(function(a,b){
 return compare(parseFloat(a[0]),parseFloat(b[0]));
 });
-for(var j=0;j<_114.length;j++){
-var item=_114[j];
-var _117={x:((parseFloat(item[0])-this.minxval)*this.xscale),y:1-((parseFloat(item[1])-this.minyval)*this.yscale),xval:parseFloat(item[0]),yval:parseFloat(item[1]),name:_113};
-if(_117.y<=0){
-_117.y=0;
+for(var j=0;j<_51.length;j++){
+var _55=_51[j];
+var _56={x:((parseFloat(_55[0])-this.minxval)*this.xscale),y:1-((parseFloat(_55[1])-this.minyval)*this.yscale),xval:parseFloat(_55[0]),yval:parseFloat(_55[1]),name:_50};
+if(_56.y<=0){
+_56.y=0;
 }
-if(_117.y>=1){
-_117.y=1;
+if(_56.y>=1){
+_56.y=1;
 }
-if((_117.x>=0)&&(_117.x<=1)){
-this.points.push(_117);
+if((_56.x>=0)&&(_56.x<=1)){
+this.points.push(_56);
 }
 }
 i++;
 }
 };
-PlotKit.Layout.prototype._evaluatePieCharts=function(){
-var _118=PlotKit.Base.items;
-var sum=MochiKit.Iter.sum;
-var _120=MochiKit.Base.itemgetter;
-var _121=_118(this.datasets).length;
-var _122=_118(this.datasets)[0][1];
-var _123=sum(map(_120(1),_122));
-this.slices=new Array();
-var _124=0;
-for(var i=0;i<_122.length;i++){
-var _125=_122[i][1]/_123;
-var _126=_124*Math.PI*2;
-var _127=(_124+_125)*Math.PI*2;
-var _128={fraction:_125,xval:_122[i][0],yval:_122[i][1],startAngle:_126,endAngle:_127};
-if(_122[i][1]!=0){
-this.slices.push(_128);
-}
-_124+=_125;
-}
-};
 PlotKit.Layout.prototype._evaluateLineTicksForXAxis=function(){
-var _129=MochiKit.Base.isUndefinedOrNull;
+var _57=MochiKit.Base.isUndefinedOrNull;
 if(this.options.xTicks){
 this.xticks=new Array();
-var _130=function(tick){
-var _132=tick.label;
-if(_129(_132)){
-_132=tick.v.toString();
+var _58=function(_59){
+var _60=_59.label;
+if(_57(_60)){
+_60=_59.v.toString();
 }
-var pos=this.xscale*(tick.v-this.minxval);
+var pos=this.xscale*(_59.v-this.minxval);
 if((pos>=0)&&(pos<=1)){
-this.xticks.push([pos,_132]);
+this.xticks.push([pos,_60]);
 }
 };
-MochiKit.Iter.forEach(this.options.xTicks,bind(_130,this));
+MochiKit.Iter.forEach(this.options.xTicks,bind(_58,this));
 }else{
 if(this.options.xNumberOfTicks){
-var _134=this._uniqueXValues();
-var _135=this.xrange/this.options.xNumberOfTicks;
-var _136=0;
+var _62=this._uniqueXValues();
+var _63=this.xrange/this.options.xNumberOfTicks;
+var _64=0;
 this.xticks=new Array();
-for(var i=0;i<=_134.length;i++){
-if((_134[i]-this.minxval)>=(_136*_135)){
-var pos=this.xscale*(_134[i]-this.minxval);
+for(var i=0;i<=_62.length;i++){
+if((_62[i]-this.minxval)>=(_64*_63)){
+var pos=this.xscale*(_62[i]-this.minxval);
 if((pos>1)||(pos<0)){
 continue;
 }
-this.xticks.push([pos,_134[i]]);
-_136++;
+this.xticks.push([pos,_62[i]]);
+_64++;
 }
-if(_136>this.options.xNumberOfTicks){
+if(_64>this.options.xNumberOfTicks){
 break;
 }
 }
@@ -4137,111 +4246,26 @@ break;
 }
 };
 PlotKit.Layout.prototype._evaluateLineTicksForYAxis=function(){
-var _137=MochiKit.Base.isUndefinedOrNull;
+var _65=MochiKit.Base.isUndefinedOrNull;
 if(this.options.yTicks){
 this.yticks=new Array();
-var _138=function(tick){
-var _139=tick.label;
-if(_137(_139)){
-_139=tick.v.toString();
+var _66=function(_67){
+var _68=_67.label;
+if(_65(_68)){
+_68=_67.v.toString();
 }
-var pos=1-(this.yscale*(tick.v-this.minyval));
+var pos=1-(this.yscale*(_67.v-this.minyval));
 if((pos>=0)&&(pos<=1)){
-this.yticks.push([pos,_139]);
+this.yticks.push([pos,_68]);
 }
 };
-MochiKit.Iter.forEach(this.options.yTicks,bind(_138,this));
-}else{
-if(this.options.yNumberOfTicks){
-this.yticks=new Array();
-var _140=PlotKit.Base.roundInterval;
-var prec=this.options.yTickPrecision;
-var _142=_140(this.yrange,this.options.yNumberOfTicks,prec);
-for(var i=0;i<=this.options.yNumberOfTicks;i++){
-var yval=this.minyval+(i*_142);
-var pos=1-((yval-this.minyval)*this.yscale);
-if((pos>1)||(pos<0)){
-continue;
-}
-this.yticks.push([pos,MochiKit.Format.roundToFixed(yval,prec)]);
-}
-}
+MochiKit.Iter.forEach(this.options.yTicks,bind(_66,this));
 }
 };
 PlotKit.Layout.prototype._evaluateLineTicks=function(){
 this._evaluateLineTicksForXAxis();
 this._evaluateLineTicksForYAxis();
 };
-PlotKit.Layout.prototype._evaluateBarTicks=function(){
-this._evaluateLineTicks();
-var _144=function(tick){
-return [tick[0]+(this.minxdelta*this.xscale)/2,tick[1]];
-};
-this.xticks=MochiKit.Base.map(bind(_144,this),this.xticks);
-if(this.options.barOrientation=="horizontal"){
-var _145=this.xticks;
-this.xticks=this.yticks;
-this.yticks=_145;
-var _146=function(tick){
-return [1-tick[0],tick[1]];
-};
-this.xticks=MochiKit.Base.map(_146,this.xticks);
-}
-};
-PlotKit.Layout.prototype._evaluatePieTicks=function(){
-var _147=MochiKit.Base.isUndefinedOrNull;
-var _148=MochiKit.Format.numberFormatter("#%");
-this.xticks=new Array();
-if(this.options.xTicks){
-var _149=new Array();
-for(var i=0;i<this.slices.length;i++){
-_149[this.slices[i].xval]=this.slices[i];
-}
-for(var i=0;i<this.options.xTicks.length;i++){
-var tick=this.options.xTicks[i];
-var _150=_149[tick.v];
-var _151=tick.label;
-if(_150){
-if(_147(_151)){
-_151=tick.v.toString();
-}
-_151+=" ("+_148(_150.fraction)+")";
-this.xticks.push([tick.v,_151]);
-}
-}
-}else{
-for(var i=0;i<this.slices.length;i++){
-var _150=this.slices[i];
-var _151=_150.xval+" ("+_148(_150.fraction)+")";
-this.xticks.push([_150.xval,_151]);
-}
-}
-};
-PlotKit.Layout.prototype._regenerateHitTestCache=function(){
-this.hitTestCache.xvalues=this._uniqueXValues();
-this.hitTestCache.xlookup=new Array();
-this.hitTestCache.x2maxy=new Array();
-var _152=MochiKit.Base.listMax;
-var _153=MochiKit.Base.itemgetter;
-var map=MochiKit.Base.map;
-var _154=keys(this.datasets);
-for(var i=0;i<_154.length;i++){
-var _155=this.datasets[_154[i]];
-for(var j=0;j<_155.length;j++){
-var xval=_155[j][0];
-var yval=_155[j][1];
-if(this.hitTestCache.xlookup[xval]){
-this.hitTestCache.xlookup[xval].push([yval,_154[i]]);
-}else{
-this.hitTestCache.xlookup[xval]=[[yval,_154[i]]];
-}
-}
-}
-for(var x in this.hitTestCache.xlookup){
-var _157=this.hitTestCache.xlookup[x];
-this.hitTestCache.x2maxy[x]=_152(map(_153(0),_157));
-}
-};
 PlotKit.LayoutModule={};
 PlotKit.LayoutModule.Layout=PlotKit.Layout;
 PlotKit.LayoutModule.EXPORT=["Layout"];
@@ -4272,21 +4296,21 @@ return "["+this.NAME+" "+this.VERSION+"]";
 PlotKit.CanvasRenderer.toString=function(){
 return this.__repr__();
 };
-PlotKit.CanvasRenderer=function(_158,_159,_160){
+PlotKit.CanvasRenderer=function(_69,_70,_71){
 if(arguments.length>0){
-this.__init__(_158,_159,_160);
+this.__init__(_69,_70,_71);
 }
 };
-PlotKit.CanvasRenderer.prototype.__init__=function(_161,_162,_163){
-var _164=MochiKit.Base.isUndefinedOrNull;
-var _165=MochiKit.Color.Color;
-this.options={"drawBackground":true,"backgroundColor":_165.whiteColor(),"padding":{left:30,right:30,top:5,bottom:10},"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),"strokeColor":_165.whiteColor(),"strokeColorTransform":"asStrokeColor","strokeWidth":0.5,"shouldFill":true,"shouldStroke":true,"drawXAxis":true,"drawYAxis":true,"axisLineColor":_165.blackColor(),"axisLineWidth":0.5,"axisTickSize":3,"axisLabelColor":_165.blackColor(),"axisLabelFont":"Arial","axisLabelFontSize":9,"axisLabelWidth":50,"pieRadius":0.4,"enableEvents":true};
-MochiKit.Base.update(this.options,_163?_163:{});
-this.layout=_162;
-this.element=MochiKit.DOM.getElement(_161);
+PlotKit.CanvasRenderer.prototype.__init__=function(_72,_73,_74){
+var _75=MochiKit.Base.isUndefinedOrNull;
+var _76=MochiKit.Color.Color;
+this.options={"drawBackground":true,"backgroundColor":_76.whiteColor(),"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),"strokeColor":_76.whiteColor(),"strokeColorTransform":"asStrokeColor","strokeWidth":0.5,"shouldFill":true,"shouldStroke":true,"drawXAxis":true,"drawYAxis":true,"axisLineColor":_76.blackColor(),"axisLineWidth":0.5,"axisTickSize":3,"axisLabelColor":_76.blackColor(),"axisLabelFont":"Arial","axisLabelFontSize":9,"axisLabelWidth":50,"pieRadius":0.4,"enableEvents":true};
+MochiKit.Base.update(this.options,_74?_74:{});
+this.layout=_73;
+this.element=MochiKit.DOM.getElement(_72);
 this.container=this.element.parentNode;
 this.isIE=PlotKit.Base.excanvasSupported();
-if(this.isIE&&!_164(G_vmlCanvasManager)){
+if(this.isIE&&!_75(G_vmlCanvasManager)){
 this.IEDelay=0.5;
 this.maxTries=5;
 this.renderDelay=null;
@@ -4295,19 +4319,21 @@ this.element=G_vmlCanvasManager.initElement(this.element);
 }
 this.height=this.element.height;
 this.width=this.element.width;
-if(_164(this.element)){
+if(_75(this.element)){
 throw "CanvasRenderer() - passed canvas is not found";
 }
 if(!this.isIE&&!(PlotKit.CanvasRenderer.isSupported(this.element))){
 throw "CanvasRenderer() - Canvas is not supported.";
 }
-if(_164(this.container)||(this.container.nodeName.toLowerCase()!="div")){
+if(_75(this.container)||(this.container.nodeName.toLowerCase()!="div")){
 throw "CanvasRenderer() - <canvas> needs to be enclosed in <div>";
 }
 this.xlabels=new Array();
 this.ylabels=new Array();
 this.isFirstRender=true;
-this.area={x:this.options.padding.left,y:this.options.padding.top,w:this.width-this.options.padding.left-this.options.padding.right,h:this.height-this.options.padding.top-this.options.padding.bottom};
+this.area={x:this.options.yAxisLabelWidth+2*this.options.axisTickSize,y:0};
+this.area.w=this.width-this.area.x-this.options.rightGap;
+this.area.h=this.height-this.options.axisLabelFontSize-2*this.options.axisTickSize;
 MochiKit.DOM.updateNodeAttributes(this.container,{"style":{"position":"relative","width":this.width+"px"}});
 };
 PlotKit.CanvasRenderer.prototype.render=function(){
@@ -4317,7 +4343,7 @@ if(this.renderDelay){
 this.renderDelay.cancel();
 this.renderDelay=null;
 }
-var _166=this.element.getContext("2d");
+var _77=this.element.getContext("2d");
 }
 catch(e){
 this.isFirstRender=false;
@@ -4331,161 +4357,57 @@ return;
 if(this.options.drawBackground){
 this._renderBackground();
 }
-if(this.layout.style=="bar"){
-this._renderBarChart();
-this._renderBarAxis();
-}else{
-if(this.layout.style=="pie"){
-this._renderPieChart();
-this._renderPieAxis();
-}else{
 if(this.layout.style=="line"){
 this._renderLineChart();
 this._renderLineAxis();
 }
-}
-}
-};
-PlotKit.CanvasRenderer.prototype._renderBarChartWrap=function(data,_168){
-var _169=this.element.getContext("2d");
-var _170=this.options.colorScheme.length;
-var _171=this.options.colorScheme;
-var _172=MochiKit.Base.keys(this.layout.datasets);
-var _173=_172.length;
-for(var i=0;i<_173;i++){
-var _174=_172[i];
-var _175=_171[i%_170];
-_169.save();
-_169.fillStyle=_175.toRGBString();
-if(this.options.strokeColor){
-_169.strokeStyle=this.options.strokeColor.toRGBString();
-}else{
-if(this.options.strokeColorTransform){
-_169.strokeStyle=_175[this.options.strokeColorTransform]().toRGBString();
-}
-}
-_169.lineWidth=this.options.strokeWidth;
-var _176=function(obj){
-if(obj.name==_174){
-_168(_169,obj);
-}
-};
-MochiKit.Iter.forEach(data,bind(_176,this));
-_169.restore();
-}
-};
-PlotKit.CanvasRenderer.prototype._renderBarChart=function(){
-var bind=MochiKit.Base.bind;
-var _178=function(_179,bar){
-var x=this.area.w*bar.x+this.area.x;
-var y=this.area.h*bar.y+this.area.y;
-var w=this.area.w*bar.w;
-var h=this.area.h*bar.h;
-if((w<1)||(h<1)){
-return;
-}
-if(this.options.shouldFill){
-_179.fillRect(x,y,w,h);
-}
-if(this.options.shouldStroke){
-_179.strokeRect(x,y,w,h);
-}
-};
-this._renderBarChartWrap(this.layout.bars,bind(_178,this));
 };
 PlotKit.CanvasRenderer.prototype._renderLineChart=function(){
-var _182=this.element.getContext("2d");
-var _183=this.options.colorScheme.length;
-var _184=this.options.colorScheme;
-var _185=MochiKit.Base.keys(this.layout.datasets);
-var _186=_185.length;
-var bind=MochiKit.Base.bind;
-var _187=MochiKit.Base.partial;
-for(var i=0;i<_186;i++){
-var _188=_185[i];
-var _189=_184[i%_183];
-var _190=this.options.strokeColorTransform;
-_182.save();
-_182.fillStyle=_189.toRGBString();
+var _78=this.element.getContext("2d");
+var _79=this.options.colorScheme.length;
+var _80=this.options.colorScheme;
+var _81=MochiKit.Base.keys(this.layout.datasets);
+var _82=_81.length;
+var _83=MochiKit.Base.bind;
+var _84=MochiKit.Base.partial;
+for(var i=0;i<_82;i++){
+var _85=_81[i];
+var _86=_80[i%_79];
+var _87=this.options.strokeColorTransform;
+_78.save();
+_78.fillStyle=_86.toRGBString();
 if(this.options.strokeColor){
-_182.strokeStyle=this.options.strokeColor.toRGBString();
+_78.strokeStyle=this.options.strokeColor.toRGBString();
 }else{
 if(this.options.strokeColorTransform){
-_182.strokeStyle=_189[_190]().toRGBString();
+_78.strokeStyle=_86[_87]().toRGBString();
 }
 }
-_182.lineWidth=this.options.strokeWidth;
-var _191=function(ctx){
+_78.lineWidth=this.options.strokeWidth;
+var _88=function(ctx){
 ctx.beginPath();
 ctx.moveTo(this.area.x,this.area.y+this.area.h);
-var _193=function(ctx_,_195){
-if(_195.name==_188){
-ctx_.lineTo(this.area.w*_195.x+this.area.x,this.area.h*_195.y+this.area.y);
+var _90=function(_91,_92){
+if(_92.name==_85){
+_91.lineTo(this.area.w*_92.x+this.area.x,this.area.h*_92.y+this.area.y);
 }
 };
-MochiKit.Iter.forEach(this.layout.points,_187(_193,ctx),this);
+MochiKit.Iter.forEach(this.layout.points,_84(_90,ctx),this);
 ctx.lineTo(this.area.w+this.area.x,this.area.h+this.area.y);
 ctx.lineTo(this.area.x,this.area.y+this.area.h);
 ctx.closePath();
 };
 if(this.options.shouldFill){
-bind(_191,this)(_182);
-_182.fill();
+_83(_88,this)(_78);
+_78.fill();
 }
 if(this.options.shouldStroke){
-bind(_191,this)(_182);
-_182.stroke();
-}
-_182.restore();
-}
-};
-PlotKit.CanvasRenderer.prototype._renderPieChart=function(){
-var _196=this.element.getContext("2d");
-var _197=this.options.colorScheme.length;
-var _198=this.layout.slices;
-var _199=this.area.x+this.area.w*0.5;
-var _200=this.area.y+this.area.h*0.5;
-var _201=Math.min(this.area.w*this.options.pieRadius,this.area.h*this.options.pieRadius);
-if(this.isIE){
-_199=parseInt(_199);
-_200=parseInt(_200);
-_201=parseInt(_201);
-}
-for(var i=0;i<_198.length;i++){
-var _202=this.options.colorScheme[i%_197];
-_196.save();
-_196.fillStyle=_202.toRGBString();
-var _203=function(){
-_196.beginPath();
-_196.moveTo(_199,_200);
-_196.arc(_199,_200,_201,_198[i].startAngle-Math.PI/2,_198[i].endAngle-Math.PI/2,false);
-_196.lineTo(_199,_200);
-_196.closePath();
-};
-if(Math.abs(_198[i].startAngle-_198[i].endAngle)>0.001){
-if(this.options.shouldFill){
-_203();
-_196.fill();
-}
-if(this.options.shouldStroke){
-_203();
-_196.lineWidth=this.options.strokeWidth;
-if(this.options.strokeColor){
-_196.strokeStyle=this.options.strokeColor.toRGBString();
-}else{
-if(this.options.strokeColorTransform){
-_196.strokeStyle=_202[this.options.strokeColorTransform]().toRGBString();
-}
-}
-_196.stroke();
-}
+_83(_88,this)(_78);
+_78.stroke();
 }
-_196.restore();
+_78.restore();
 }
 };
-PlotKit.CanvasRenderer.prototype._renderBarAxis=function(){
-this._renderAxis();
-};
 PlotKit.CanvasRenderer.prototype._renderLineAxis=function(){
 this._renderAxis();
 };
@@ -4493,138 +4415,102 @@ PlotKit.CanvasRenderer.prototype._renderAxis=function(){
 if(!this.options.drawXAxis&&!this.options.drawYAxis){
 return;
 }
-var _204=this.element.getContext("2d");
-var _205={"style":{"position":"absolute","fontSize":this.options.axisLabelFontSize+"px","zIndex":10,"color":this.options.axisLabelColor.toRGBString(),"width":this.options.axisLabelWidth+"px","overflow":"hidden"}};
-_204.save();
-_204.strokeStyle=this.options.axisLineColor.toRGBString();
-_204.lineWidth=this.options.axisLineWidth;
+var _93=this.element.getContext("2d");
+var _94={"style":{"position":"absolute","fontSize":this.options.axisLabelFontSize+"px","zIndex":10,"color":this.options.axisLabelColor.toRGBString(),"width":this.options.axisLabelWidth+"px","overflow":"hidden"}};
+_93.save();
+_93.strokeStyle=this.options.axisLineColor.toRGBString();
+_93.lineWidth=this.options.axisLineWidth;
 if(this.options.drawYAxis){
 if(this.layout.yticks){
-var _206=function(tick){
-if(typeof (tick)=="function"){
+var _95=function(_96){
+if(typeof (_96)=="function"){
 return;
 }
 var x=this.area.x;
-var y=this.area.y+tick[0]*this.area.h;
-_204.beginPath();
-_204.moveTo(x,y);
-_204.lineTo(x-this.options.axisTickSize,y);
-_204.closePath();
-_204.stroke();
-var _207=DIV(_205,tick[1]);
-_207.style.top=(y-this.options.axisLabelFontSize)+"px";
-_207.style.left=(x-this.options.padding.left-this.options.axisTickSize)+"px";
-_207.style.textAlign="right";
-_207.style.width=(this.options.padding.left-this.options.axisTickSize*2)+"px";
-MochiKit.DOM.appendChildNodes(this.container,_207);
-this.ylabels.push(_207);
-};
-MochiKit.Iter.forEach(this.layout.yticks,bind(_206,this));
-}
-_204.beginPath();
-_204.moveTo(this.area.x,this.area.y);
-_204.lineTo(this.area.x,this.area.y+this.area.h);
-_204.closePath();
-_204.stroke();
+var y=this.area.y+_96[0]*this.area.h;
+_93.beginPath();
+_93.moveTo(x,y);
+_93.lineTo(x-this.options.axisTickSize,y);
+_93.closePath();
+_93.stroke();
+var _98=DIV(_94,_96[1]);
+var top=(y-this.options.axisLabelFontSize/2);
+if(top<0){
+top=0;
+}
+if(top+this.options.axisLabelFontSize+3>this.height){
+_98.style.bottom="0px";
+}else{
+_98.style.top=top+"px";
+}
+_98.style.left="0px";
+_98.style.textAlign="right";
+_98.style.border="1px solid black";
+_98.style.width=this.options.yAxisLabelWidth+"px";
+MochiKit.DOM.appendChildNodes(this.container,_98);
+this.ylabels.push(_98);
+};
+MochiKit.Iter.forEach(this.layout.yticks,bind(_95,this));
+var _100=this.ylabels[0];
+var _101=this.options.axisLabelFontSize;
+var _102=parseInt(_100.style.top)+_101;
+if(_102>this.height-_101){
+_100.style.top=(parseInt(_100.style.top)-_101/2)+"px";
+}
+}
+_93.beginPath();
+_93.moveTo(this.area.x,this.area.y);
+_93.lineTo(this.area.x,this.area.y+this.area.h);
+_93.closePath();
+_93.stroke();
 }
 if(this.options.drawXAxis){
 if(this.layout.xticks){
-var _206=function(tick){
+var _95=function(tick){
 if(typeof (dataset)=="function"){
 return;
 }
 var x=this.area.x+tick[0]*this.area.w;
 var y=this.area.y+this.area.h;
-_204.beginPath();
-_204.moveTo(x,y);
-_204.lineTo(x,y+this.options.axisTickSize);
-_204.closePath();
-_204.stroke();
-var _208=DIV(_205,tick[1]);
-_208.style.top=(y+this.options.axisTickSize)+"px";
-_208.style.left=(x-this.options.axisLabelWidth/2)+"px";
-_208.style.textAlign="center";
-_208.style.width=this.options.axisLabelWidth+"px";
-MochiKit.DOM.appendChildNodes(this.container,_208);
-this.xlabels.push(_208);
-};
-MochiKit.Iter.forEach(this.layout.xticks,bind(_206,this));
-}
-_204.beginPath();
-_204.moveTo(this.area.x,this.area.y+this.area.h);
-_204.lineTo(this.area.x+this.area.w,this.area.y+this.area.h);
-_204.closePath();
-_204.stroke();
-}
-_204.restore();
-};
-PlotKit.CanvasRenderer.prototype._renderPieAxis=function(){
-if(!this.options.drawXAxis){
-return;
-}
-if(this.layout.xticks){
-var _209=new Array();
-for(var i=0;i<this.layout.slices.length;i++){
-_209[this.layout.slices[i].xval]=this.layout.slices[i];
-}
-var _210=this.area.x+this.area.w*0.5;
-var _211=this.area.y+this.area.h*0.5;
-var _212=Math.min(this.area.w*this.options.pieRadius,this.area.h*this.options.pieRadius);
-var _213=this.options.axisLabelWidth;
-for(var i=0;i<this.layout.xticks.length;i++){
-var _214=_209[this.layout.xticks[i][0]];
-if(MochiKit.Base.isUndefinedOrNull(_214)){
-continue;
-}
-var _215=(_214.startAngle+_214.endAngle)/2;
-var _216=_215;
-if(_216>Math.PI*2){
-_216=_216-Math.PI*2;
-}else{
-if(_216<0){
-_216=_216+Math.PI*2;
-}
-}
-var _217=_210+Math.sin(_216)*(_212+10);
-var _218=_211-Math.cos(_216)*(_212+10);
-var _219={"position":"absolute","zIndex":11,"width":_213+"px","fontSize":this.options.axisLabelFontSize+"px","overflow":"hidden","color":this.options.axisLabelColor.toHexString()};
-if(_216<=Math.PI*0.5){
-_219["textAlign"]="left";
-_219["verticalAlign"]="top";
-_219["left"]=_217+"px";
-_219["top"]=(_218-this.options.axisLabelFontSize)+"px";
-}else{
-if((_216>Math.PI*0.5)&&(_216<=Math.PI)){
-_219["textAlign"]="left";
-_219["verticalAlign"]="bottom";
-_219["left"]=_217+"px";
-_219["top"]=_218+"px";
-}else{
-if((_216>Math.PI)&&(_216<=Math.PI*1.5)){
-_219["textAlign"]="right";
-_219["verticalAlign"]="bottom";
-_219["left"]=(_217-_213)+"px";
-_219["top"]=_218+"px";
-}else{
-_219["textAlign"]="right";
-_219["verticalAlign"]="bottom";
-_219["left"]=(_217-_213)+"px";
-_219["top"]=(_218-this.options.axisLabelFontSize)+"px";
-}
-}
-}
-var _220=DIV({"style":_219},this.layout.xticks[i][1]);
-this.xlabels.push(_220);
-MochiKit.DOM.appendChildNodes(this.container,_220);
-}
-}
+_93.beginPath();
+_93.moveTo(x,y);
+_93.lineTo(x,y+this.options.axisTickSize);
+_93.closePath();
+_93.stroke();
+var _104=DIV(_94,tick[1]);
+_104.style.textAlign="center";
+_104.style.bottom="0px";
+var left=(x-this.options.axisLabelWidth/2);
+if(left+this.options.axisLabelWidth>this.width){
+left=this.width-this.options.xAxisLabelWidth;
+_104.style.textAlign="right";
+}
+if(left<0){
+left=0;
+_104.style.textAlign="left";
+}
+_104.style.left=left+"px";
+_104.style.border="1px solid black";
+_104.style.width=this.options.xAxisLabelWidth+"px";
+MochiKit.DOM.appendChildNodes(this.container,_104);
+this.xlabels.push(_104);
+};
+MochiKit.Iter.forEach(this.layout.xticks,bind(_95,this));
+}
+_93.beginPath();
+_93.moveTo(this.area.x,this.area.y+this.area.h);
+_93.lineTo(this.area.x+this.area.w,this.area.y+this.area.h);
+_93.closePath();
+_93.stroke();
+}
+_93.restore();
 };
 PlotKit.CanvasRenderer.prototype._renderBackground=function(){
-var _221=this.element.getContext("2d");
-_221.save();
-_221.fillStyle=this.options.backgroundColor.toRGBString();
-_221.fillRect(0,0,this.width,this.height);
-_221.restore();
+var _106=this.element.getContext("2d");
+_106.save();
+_106.fillStyle=this.options.backgroundColor.toRGBString();
+_106.fillRect(0,0,this.width,this.height);
+_106.restore();
 };
 PlotKit.CanvasRenderer.prototype.clear=function(){
 if(this.isIE){
@@ -4633,7 +4519,7 @@ if(this.clearDelay){
 this.clearDelay.cancel();
 this.clearDelay=null;
 }
-var _222=this.element.getContext("2d");
+var _107=this.element.getContext("2d");
 }
 catch(e){
 this.isFirstRender=false;
@@ -4642,88 +4528,88 @@ this.clearDelay.addCallback(bind(this.clear,this));
 return;
 }
 }
-var _222=this.element.getContext("2d");
-_222.clearRect(0,0,this.width,this.height);
+var _107=this.element.getContext("2d");
+_107.clearRect(0,0,this.width,this.height);
 MochiKit.Iter.forEach(this.xlabels,MochiKit.DOM.removeElement);
 MochiKit.Iter.forEach(this.ylabels,MochiKit.DOM.removeElement);
 this.xlabels=new Array();
 this.ylabels=new Array();
 };
 PlotKit.CanvasRenderer.prototype._initialiseEvents=function(){
-var _223=MochiKit.Signal.connect;
+var _108=MochiKit.Signal.connect;
 var bind=MochiKit.Base.bind;
-_223(this.element,"onclick",bind(this.onclick,this));
+_108(this.element,"onclick",bind(this.onclick,this));
 };
 PlotKit.CanvasRenderer.prototype._resolveObject=function(e){
 var x=(e.mouse().page.x-PlotKit.Base.findPosX(this.element)-this.area.x)/this.area.w;
 var y=(e.mouse().page.y-PlotKit.Base.findPosY(this.element)-this.area.y)/this.area.h;
-var _225=this.layout.hitTest(x,y);
-if(_225){
-return _225;
+var _111=this.layout.hitTest(x,y);
+if(_111){
+return _111;
 }
 return null;
 };
-PlotKit.CanvasRenderer.prototype._createEventObject=function(_226,e){
-if(_226==null){
+PlotKit.CanvasRenderer.prototype._createEventObject=function(_112,e){
+if(_112==null){
 return null;
 }
-e.chart=_226;
+e.chart=_112;
 return e;
 };
 PlotKit.CanvasRenderer.prototype.onclick=function(e){
-var _227=this._resolveObject(e);
-var _228=this._createEventObject(_227,e);
-if(_228!=null){
-MochiKit.Signal.signal(this,"onclick",_228);
+var _113=this._resolveObject(e);
+var _114=this._createEventObject(_113,e);
+if(_114!=null){
+MochiKit.Signal.signal(this,"onclick",_114);
 }
 };
 PlotKit.CanvasRenderer.prototype.onmouseover=function(e){
-var _229=this._resolveObject(e);
-var _230=this._createEventObject(_229,e);
-if(_230!=null){
-signal(this,"onmouseover",_230);
+var _115=this._resolveObject(e);
+var _116=this._createEventObject(_115,e);
+if(_116!=null){
+signal(this,"onmouseover",_116);
 }
 };
 PlotKit.CanvasRenderer.prototype.onmouseout=function(e){
-var _231=this._resolveObject(e);
-var _232=this._createEventObject(_231,e);
-if(_232==null){
+var _117=this._resolveObject(e);
+var _118=this._createEventObject(_117,e);
+if(_118==null){
 signal(this,"onmouseout",e);
 }else{
-signal(this,"onmouseout",_232);
+signal(this,"onmouseout",_118);
 }
 };
 PlotKit.CanvasRenderer.prototype.onmousemove=function(e){
-var _233=this._resolveObject(e);
-var _234=this._createEventObject(_233,e);
-if((_233==null)&&(this.event_isinside==null)){
+var _119=this._resolveObject(e);
+var _120=this._createEventObject(_119,e);
+if((_119==null)&&(this.event_isinside==null)){
 return;
 }
-if((_233!=null)&&(this.event_isinside==null)){
-signal(this,"onmouseover",_234);
+if((_119!=null)&&(this.event_isinside==null)){
+signal(this,"onmouseover",_120);
 }
-if((_233==null)&&(this.event_isinside!=null)){
-signal(this,"onmouseout",_234);
+if((_119==null)&&(this.event_isinside!=null)){
+signal(this,"onmouseout",_120);
 }
-if((_233!=null)&&(this.event_isinside!=null)){
-signal(this,"onmousemove",_234);
+if((_119!=null)&&(this.event_isinside!=null)){
+signal(this,"onmousemove",_120);
 }
-this.event_isinside=_233;
+this.event_isinside=_119;
 };
-PlotKit.CanvasRenderer.isSupported=function(_235){
-var _236=null;
+PlotKit.CanvasRenderer.isSupported=function(_121){
+var _122=null;
 try{
-if(MochiKit.Base.isUndefinedOrNull(_235)){
-_236=MochiKit.DOM.CANVAS({});
+if(MochiKit.Base.isUndefinedOrNull(_121)){
+_122=MochiKit.DOM.CANVAS({});
 }else{
-_236=MochiKit.DOM.getElement(_235);
+_122=MochiKit.DOM.getElement(_121);
 }
-var _237=_236.getContext("2d");
+var _123=_122.getContext("2d");
 }
 catch(e){
 var ie=navigator.appVersion.match(/MSIE (\d\.\d)/);
-var _239=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);
-if((!ie)||(ie[1]<6)||(_239)){
+var _125=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);
+if((!ie)||(ie[1]<6)||(_125)){
 return false;
 }
 return true;
@@ -4743,1296 +4629,1182 @@ PlotKit.Canvas.__new__();
 MochiKit.Base._exportSymbols(this,PlotKit.Canvas);
 
 
-// Copyright 2006 Dan Vanderkam (danvdk@gmail.com)
-// All Rights Reserved.
-
-/**
- * @fileoverview Subclasses various parts of PlotKit to meet the additional
- * needs of DateGraph: grid overlays and error bars
- */
-
-// Subclass PlotKit.Layout to add:
-// 1. Sigma/errorBars properties
-// 2. Copy error terms for PlotKit.CanvasRenderer._renderLineChart
-
-/**
- * Creates a new DateGraphLayout object. Options are the same as those allowed
- * by the PlotKit.Layout constructor.
- * @param {Object} options Options for PlotKit.Layout
- * @return {Object} The DateGraphLayout object
- */
-DateGraphLayout = function(options) {
-  PlotKit.Layout.call(this, "line", options);
-};
-DateGraphLayout.prototype = new PlotKit.Layout();
-
-/**
- * Behaves the same way as PlotKit.Layout, but also copies the errors
- * @private
- */
-DateGraphLayout.prototype.evaluateWithError = function() {
-  this.evaluate();
-  if (!this.options.errorBars) return;
-
-  // Copy over the error terms
-  var i = 0; // index in this.points
-  for (var setName in this.datasets) {
-    var j = 0;
-    var dataset = this.datasets[setName];
-    if (PlotKit.Base.isFuncLike(dataset)) continue;
-    for (var j = 0; j < dataset.length; j++, i++) {
-      var item = dataset[j];
-      var xv = parseFloat(item[0]);
-      var yv = parseFloat(item[1]);
-
-      if (xv == this.points[i].xval &&
-          yv == this.points[i].yval) {
-        this.points[i].errorMinus = parseFloat(item[2]);
-        this.points[i].errorPlus = parseFloat(item[3]);
-      }
-    }
-  }
+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){
+PlotKit.Layout.call(this,"line",_1);
 };
-
-/**
- * Convenience function to remove all the data sets from a graph
- */
-DateGraphLayout.prototype.removeAllDatasets = function() {
-  delete this.datasets;
-  this.datasets = new Array();
+DygraphLayout.prototype=new PlotKit.Layout();
+DygraphLayout.prototype.evaluateWithError=function(){
+this.evaluate();
+if(!this.options.errorBars){
+return;
+}
+var i=0;
+for(var _3 in this.datasets){
+var j=0;
+var _5=this.datasets[_3];
+if(PlotKit.Base.isFuncLike(_5)){
+continue;
+}
+for(var j=0;j<_5.length;j++,i++){
+var _6=_5[j];
+var xv=parseFloat(_6[0]);
+var yv=parseFloat(_6[1]);
+if(xv==this.points[i].xval&&yv==this.points[i].yval){
+this.points[i].errorMinus=parseFloat(_6[2]);
+this.points[i].errorPlus=parseFloat(_6[3]);
+}
+}
+}
 };
-
-/**
- * Change the values of various layout options
- * @param {Object} new_options an associative array of new properties
- */
-DateGraphLayout.prototype.updateOptions = function(new_options) {
-  MochiKit.Base.update(this.options, new_options ? new_options : {});
+DygraphLayout.prototype.removeAllDatasets=function(){
+delete this.datasets;
+this.datasets=new Array();
 };
-
-// Subclass PlotKit.CanvasRenderer to add:
-// 1. X/Y grid overlay
-// 2. Ability to draw error bars (if required)
-
-/**
- * Sets some PlotKit.CanvasRenderer options
- * @param {Object} element The canvas to attach to
- * @param {Layout} layout The DateGraphLayout object for this graph.
- * @param {Object} options Options to pass on to CanvasRenderer
- */
-DateGraphCanvasRenderer = function(element, layout, options) {
-  PlotKit.CanvasRenderer.call(this, element, layout, options);
-  this.options.shouldFill = false;
-  this.options.shouldStroke = true;
-  this.options.drawYGrid = true;
-  this.options.drawXGrid = true;
-  this.options.gridLineColor = MochiKit.Color.Color.grayColor();
-  MochiKit.Base.update(this.options, options);
-
-  // TODO(danvk) This shouldn't be necessary: effects should be overlaid
-  this.options.drawBackground = false;
+DygraphLayout.prototype.updateOptions=function(_9){
+MochiKit.Base.update(this.options,_9?_9:{});
+};
+DygraphCanvasRenderer=function(_10,_11,_12){
+PlotKit.CanvasRenderer.call(this,_10,_11,_12);
+this.options.shouldFill=false;
+this.options.shouldStroke=true;
+this.options.drawYGrid=true;
+this.options.drawXGrid=true;
+this.options.gridLineColor=MochiKit.Color.Color.grayColor();
+MochiKit.Base.update(this.options,_12);
+this.options.drawBackground=false;
+};
+DygraphCanvasRenderer.prototype=new PlotKit.CanvasRenderer();
+DygraphCanvasRenderer.prototype.render=function(){
+var ctx=this.element.getContext("2d");
+if(this.options.drawYGrid){
+var _14=this.layout.yticks;
+ctx.save();
+ctx.strokeStyle=this.options.gridLineColor.toRGBString();
+ctx.lineWidth=this.options.axisLineWidth;
+for(var i=0;i<_14.length;i++){
+var x=this.area.x;
+var y=this.area.y+_14[i][0]*this.area.h;
+ctx.beginPath();
+ctx.moveTo(x,y);
+ctx.lineTo(x+this.area.w,y);
+ctx.closePath();
+ctx.stroke();
+}
+}
+if(this.options.drawXGrid){
+var _14=this.layout.xticks;
+ctx.save();
+ctx.strokeStyle=this.options.gridLineColor.toRGBString();
+ctx.lineWidth=this.options.axisLineWidth;
+for(var i=0;i<_14.length;i++){
+var x=this.area.x+_14[i][0]*this.area.w;
+var y=this.area.y+this.area.h;
+ctx.beginPath();
+ctx.moveTo(x,y);
+ctx.lineTo(x,this.area.y);
+ctx.closePath();
+ctx.stroke();
+}
+}
+this._renderLineChart();
+this._renderLineAxis();
 };
-DateGraphCanvasRenderer.prototype = new PlotKit.CanvasRenderer();
-
-/**
- * Draw an X/Y grid on top of the existing plot
- */
-DateGraphCanvasRenderer.prototype.render = function() {
-  // Do the ordinary rendering, as before
-  // TODO(danvk) Call super.render()
-  this._renderLineChart();
-  this._renderLineAxis();
-
-  // Draw the new X/Y grid
-  var ctx = this.element.getContext("2d");
-  if (this.options.drawYGrid) {
-    var ticks = this.layout.yticks;
-    ctx.save();
-    ctx.strokeStyle = this.options.gridLineColor.toRGBString();
-    ctx.lineWidth = this.options.axisLineWidth;
-    for (var i = 0; i < ticks.length; i++) {
-      var x = this.area.x;
-      var y = this.area.y + ticks[i][0] * this.area.h;
-      ctx.beginPath();
-      ctx.moveTo(x, y);
-      ctx.lineTo(x + this.area.w, y);
-      ctx.closePath();
-      ctx.stroke();
-    }
-  }
-
-  if (this.options.drawXGrid) {
-    var ticks = this.layout.xticks;
-    ctx.save();
-    ctx.strokeStyle = this.options.gridLineColor.toRGBString();
-    ctx.lineWidth = this.options.axisLineWidth;
-    for (var i=0; i<ticks.length; i++) {
-      var x = this.area.x + ticks[i][0] * this.area.w;
-      var y = this.area.y + this.area.h;
-      ctx.beginPath();
-      ctx.moveTo(x, y);
-      ctx.lineTo(x, this.area.y);
-      ctx.closePath();
-      ctx.stroke();
-    }
-  }
+DygraphCanvasRenderer.prototype._renderLineChart=function(){
+var _17=this.element.getContext("2d");
+var _18=this.options.colorScheme.length;
+var _19=this.options.colorScheme;
+var _20=MochiKit.Base.keys(this.layout.datasets);
+var _21=this.layout.options.errorBars;
+var _22=_20.length;
+var _23=MochiKit.Base.bind;
+var _24=MochiKit.Base.partial;
+var _25=function(_26){
+_26.canvasx=this.area.w*_26.x+this.area.x;
+_26.canvasy=this.area.h*_26.y+this.area.y;
+};
+MochiKit.Iter.forEach(this.layout.points,_25,this);
+var _27=function(ctx){
+for(var i=0;i<_22;i++){
+var _28=_20[i];
+var _29=_19[i%_18];
+var _30=this.options.strokeColorTransform;
+_17.save();
+_17.strokeStyle=_29.toRGBString();
+_17.lineWidth=this.options.strokeWidth;
+ctx.beginPath();
+var _31=this.layout.points[0];
+var _32=true;
+var _33=function(_34,_31){
+if(_31.name==_28){
+if(_32){
+_34.moveTo(_31.canvasx,_31.canvasy);
+}else{
+_34.lineTo(_31.canvasx,_31.canvasy);
+}
+_32=false;
+}
+};
+MochiKit.Iter.forEach(this.layout.points,_24(_33,ctx),this);
+ctx.stroke();
+}
+};
+var _35=function(ctx){
+for(var i=0;i<_22;i++){
+var _36=_20[i];
+var _37=_19[i%_18];
+var _38=this.options.strokeColorTransform;
+_17.save();
+_17.strokeStyle=_37.toRGBString();
+_17.lineWidth=this.options.strokeWidth;
+var _39=-1;
+var _40=[-1,-1];
+var _41=0;
+var _42=this.layout.yscale;
+var _43=function(_44,_45){
+_41++;
+if(_45.name==_36){
+var _46=[_45.y-_45.errorPlus*_42,_45.y+_45.errorMinus*_42];
+_46[0]=this.area.h*_46[0]+this.area.y;
+_46[1]=this.area.h*_46[1]+this.area.y;
+if(_39>=0){
+_44.moveTo(_39,_40[0]);
+_44.lineTo(_45.canvasx,_46[0]);
+_44.lineTo(_45.canvasx,_46[1]);
+_44.lineTo(_39,_40[1]);
+_44.closePath();
+}
+_40[0]=_46[0];
+_40[1]=_46[1];
+_39=_45.canvasx;
+}
+};
+var _47=_37.colorWithAlpha(0.15);
+ctx.fillStyle=_47.toRGBString();
+ctx.beginPath();
+MochiKit.Iter.forEach(this.layout.points,_24(_43,ctx),this);
+ctx.fill();
+}
 };
-
-/**
- * Overrides the CanvasRenderer method to draw error bars
- */
-DateGraphCanvasRenderer.prototype._renderLineChart = function() {
-  var context = this.element.getContext("2d");
-  var colorCount = this.options.colorScheme.length;
-  var colorScheme = this.options.colorScheme;
-  var setNames = MochiKit.Base.keys(this.layout.datasets);
-  var errorBars = this.layout.options.errorBars;
-  var setCount = setNames.length;
-  var bind = MochiKit.Base.bind;
-  var partial = MochiKit.Base.partial;
-
-  //Update Points
-  var updatePoint = function(point) {
-    point.canvasx = this.area.w * point.x + this.area.x;
-    point.canvasy = this.area.h * point.y + this.area.y;
-  }
-  MochiKit.Iter.forEach(this.layout.points, updatePoint, this);
-
-  // create paths
-  var makePath = function(ctx) {
-    for (var i = 0; i < setCount; i++) {
-      var setName = setNames[i];
-      var color = colorScheme[i%colorCount];
-      var strokeX = this.options.strokeColorTransform;
-
-      // setup graphics context
-      context.save();
-      context.strokeStyle = color.toRGBString();
-      context.lineWidth = this.options.strokeWidth;
-      ctx.beginPath();
-      var point = this.layout.points[0];
-      var first_point = true;
-      var addPoint = function(ctx_, point) {
-        if (point.name == setName) {
-          if (first_point)
-            ctx_.moveTo(point.canvasx, point.canvasy);
-          else
-            ctx_.lineTo(point.canvasx, point.canvasy);
-          first_point = false;
-        }
-      };
-      MochiKit.Iter.forEach(this.layout.points, partial(addPoint, ctx), this);
-      ctx.stroke();
-    }
-  };
-
-  var makeErrorBars = function(ctx) {
-    for (var i = 0; i < setCount; i++) {
-      var setName = setNames[i];
-      var color = colorScheme[i % colorCount];
-      var strokeX = this.options.strokeColorTransform;
-
-      // setup graphics context
-      context.save();
-      context.strokeStyle = color.toRGBString();
-      context.lineWidth = this.options.strokeWidth;
-      var prevX = -1;
-      var prevYs = [-1, -1];
-      var count = 0;
-      var yscale = this.layout.yscale;
-      var errorTrapezoid = function(ctx_,point) {
-        count++;
-        if (point.name == setName) {
-          var newYs = [ point.y - point.errorPlus * yscale,
-                        point.y + point.errorMinus * yscale ];
-          newYs[0] = this.area.h * newYs[0] + this.area.y;
-          newYs[1] = this.area.h * newYs[1] + this.area.y;
-          if (prevX >= 0) {
-            ctx_.moveTo(prevX, prevYs[0]);
-            ctx_.lineTo(point.canvasx, newYs[0]);
-            ctx_.lineTo(point.canvasx, newYs[1]);
-            ctx_.lineTo(prevX, prevYs[1]);
-            ctx_.closePath();
-          }
-          prevYs[0] = newYs[0];
-          prevYs[1] = newYs[1];
-          prevX = point.canvasx;
-        }
-      };
-      // should be same color as the lines
-      var err_color = color.colorWithAlpha(0.15);
-      ctx.fillStyle = err_color.toRGBString();
-      ctx.beginPath();
-      MochiKit.Iter.forEach(this.layout.points, partial(errorTrapezoid, ctx), this);
-      ctx.fill();
-    }
-  };
-
-  if (errorBars)
-    bind(makeErrorBars, this)(context);
-  bind(makePath, this)(context);
-  context.restore();
+if(_21){
+_23(_35,this)(_17);
+}
+_23(_27,this)(_17);
+_17.restore();
 };
-// Copyright 2006 Dan Vanderkam (danvdk@gmail.com)
-// All Rights Reserved.
-
-/**
- * @fileoverview Creates an interactive, zoomable graph based on a CSV file or
- * string. DateGraph can handle multiple series with or without error bars. The
- * date/value ranges will be automatically set. DateGraph uses the
- * &lt;canvas&gt; tag, so it only works in FF1.5+.
- * @author danvdk@gmail.com (Dan Vanderkam)
-
-  Usage:
-   <div id="graphdiv" style="width:800px; height:500px;"></div>
-   <script type="text/javascript">
-     new DateGraph(document.getElementById("graphdiv"),
-                   "datafile.csv",
-                     ["Series 1", "Series 2"],
-                     { }); // options
-   </script>
-
- The CSV file is of the form
-
-   YYYYMMDD,A1,B1,C1
-   YYYYMMDD,A2,B2,C2
-
- If null is passed as the third parameter (series names), then the first line
- of the CSV file is assumed to contain names for each series.
-
- If the 'errorBars' option is set in the constructor, the input should be of
- the form
-
-   YYYYMMDD,A1,sigmaA1,B1,sigmaB1,...
-   YYYYMMDD,A2,sigmaA2,B2,sigmaB2,...
-
- If the 'fractions' option is set, the input should be of the form:
-
-   YYYYMMDD,A1/B1,A2/B2,...
-   YYYYMMDD,A1/B1,A2/B2,...
-
- And error bars will be calculated automatically using a binomial distribution.
-
- For further documentation and examples, see http://www/~danvk/dg/
-
- */
-
-/**
- * An interactive, zoomable graph
- * @param {String | Function} file A file containing CSV data or a function that
- * returns this data. The expected format for each line is
- * YYYYMMDD,val1,val2,... or, if attrs.errorBars is set,
- * YYYYMMDD,val1,stddev1,val2,stddev2,...
- * @param {Array.<String>} labels Labels for the data series
- * @param {Object} attrs Various other attributes, e.g. errorBars determines
- * whether the input data contains error ranges.
- */
-DateGraph = function(div, file, labels, attrs) {
-  if (arguments.length > 0)
-    this.__init__(div, file, labels, attrs);
+Dygraph=function(div,_49,_50){
+if(arguments.length>0){
+if(arguments.length==4){
+this.warn("Using deprecated four-argument dygraph constructor");
+this.__old_init__(div,_49,arguments[2],arguments[3]);
+}else{
+this.__init__(div,_49,_50);
+}
+}
 };
-
-DateGraph.NAME = "DateGraph";
-DateGraph.VERSION = "1.1";
-DateGraph.__repr__ = function() {
-  return "[" + this.NAME + " " + this.VERSION + "]";
+Dygraph.NAME="Dygraph";
+Dygraph.VERSION="1.2";
+Dygraph.__repr__=function(){
+return "["+this.NAME+" "+this.VERSION+"]";
 };
-DateGraph.toString = function() {
-  return this.__repr__();
+Dygraph.toString=function(){
+return this.__repr__();
 };
-
-// Various default values
-DateGraph.DEFAULT_ROLL_PERIOD = 1;
-DateGraph.DEFAULT_WIDTH = 480;
-DateGraph.DEFAULT_HEIGHT = 320;
-DateGraph.DEFAULT_STROKE_WIDTH = 1.0;
-DateGraph.AXIS_LINE_WIDTH = 0.3;
-
-/**
- * Initializes the DateGraph. This creates a new DIV and constructs the PlotKit
- * and interaction &lt;canvas&gt; inside of it. See the constructor for details
- * on the parameters.
- * @param {String | Function} file Source data
- * @param {Array.<String>} labels Names of the data series
- * @param {Object} attrs Miscellaneous other options
- * @private
- */
-DateGraph.prototype.__init__ = function(div, file, labels, attrs) {
-  // Copy the important bits into the object
-  this.maindiv_ = div;
-  this.labels_ = labels;
-  this.file_ = file;
-  this.rollPeriod_ = attrs.rollPeriod || DateGraph.DEFAULT_ROLL_PERIOD;
-  this.previousVerticalX_ = -1;
-  this.width_ = parseInt(div.style.width, 10);
-  this.height_ = parseInt(div.style.height, 10);
-  this.errorBars_ = attrs.errorBars || false;
-  this.fractions_ = attrs.fractions || false;
-  this.strokeWidth_ = attrs.strokeWidth || DateGraph.DEFAULT_STROKE_WIDTH;
-  this.dateWindow_ = attrs.dateWindow || null;
-  this.valueRange_ = attrs.valueRange || null;
-  this.labelsSeparateLines = attrs.labelsSeparateLines || false;
-  this.labelsDiv_ = attrs.labelsDiv || null;
-  this.labelsKMB_ = attrs.labelsKMB || false;
-  this.minTickSize_ = attrs.minTickSize || 0;
-  this.xValueParser_ = attrs.xValueParser || DateGraph.prototype.dateParser;
-  this.xValueFormatter_ = attrs.xValueFormatter ||
-      DateGraph.prototype.dateString_;
-  this.xTicker_ = attrs.xTicker || DateGraph.prototype.dateTicker;
-  this.sigma_ = attrs.sigma || 2.0;
-  this.wilsonInterval_ = attrs.wilsonInterval || true;
-  this.customBars_ = attrs.customBars || false;
-  this.attrs_ = attrs;
-
-  // Make a note of whether labels will be pulled from the CSV file.
-  this.labelsFromCSV_ = (this.labels_ == null);
-  if (this.labels_ == null)
-    this.labels_ = [];
-
-  // Prototype of the callback is "void clickCallback(event, date)"
-  this.clickCallback_ = attrs.clickCallback || null;
-
-  // Prototype of zoom callback is "void dragCallback(minDate, maxDate)"
-  this.zoomCallback_ = attrs.zoomCallback || null;
-
-  // Create the containing DIV and other interactive elements
-  this.createInterface_();
-
-  // Create the PlotKit grapher
-  this.layoutOptions_ = { 'errorBars': (this.errorBars_ || this.customBars_),
-                          'xOriginIsZero': false };
-  MochiKit.Base.update(this.layoutOptions_, attrs);
-  this.setColors_(attrs);
-
-  this.layout_ = new DateGraphLayout(this.layoutOptions_);
-
-  this.renderOptions_ = { colorScheme: this.colors_,
-                          strokeColor: null,
-                          strokeWidth: this.strokeWidth_,
-                          axisLabelFontSize: 14,
-                          axisLineWidth: DateGraph.AXIS_LINE_WIDTH };
-  MochiKit.Base.update(this.renderOptions_, attrs);
-  this.plotter_ = new DateGraphCanvasRenderer(this.hidden_, this.layout_,
-                                              this.renderOptions_);
-
-  this.createStatusMessage_();
-  this.createRollInterface_();
-  this.createDragInterface_();
-
-  connect(window, 'onload', this, function(e) { this.start_(); });
+Dygraph.DEFAULT_ROLL_PERIOD=1;
+Dygraph.DEFAULT_WIDTH=480;
+Dygraph.DEFAULT_HEIGHT=320;
+Dygraph.AXIS_LINE_WIDTH=0.3;
+Dygraph.DEFAULT_ATTRS={highlightCircleSize:3,pixelsPerXLabel:60,pixelsPerYLabel:30,labelsDivWidth:250,labelsDivStyles:{},labelsSeparateLines:false,labelsKMB:false,strokeWidth:1,axisTickSize:3,axisLabelFontSize:14,xAxisLabelWidth:50,yAxisLabelWidth:50,rightGap:5,showRoller:false,xValueFormatter:Dygraph.dateString_,xValueParser:Dygraph.dateParser,xTicker:Dygraph.dateTicker,sigma:2,errorBars:false,fractions:false,wilsonInterval:true,customBars:false};
+Dygraph.DEBUG=1;
+Dygraph.INFO=2;
+Dygraph.WARNING=3;
+Dygraph.ERROR=3;
+Dygraph.prototype.__old_init__=function(div,_51,_52,_53){
+if(_52!=null){
+var _54=["Date"];
+for(var i=0;i<_52.length;i++){
+_54.push(_52[i]);
+}
+MochiKit.Base.update(_53,{"labels":_54});
+}
+this.__init__(div,_51,_53);
+};
+Dygraph.prototype.__init__=function(div,_55,_56){
+if(_56==null){
+_56={};
+}
+this.maindiv_=div;
+this.file_=_55;
+this.rollPeriod_=_56.rollPeriod||Dygraph.DEFAULT_ROLL_PERIOD;
+this.previousVerticalX_=-1;
+this.fractions_=_56.fractions||false;
+this.dateWindow_=_56.dateWindow||null;
+this.valueRange_=_56.valueRange||null;
+this.wilsonInterval_=_56.wilsonInterval||true;
+this.customBars_=_56.customBars||false;
+if(div.style.width==""){
+div.style.width=Dygraph.DEFAULT_WIDTH+"px";
+}
+if(div.style.height==""){
+div.style.height=Dygraph.DEFAULT_HEIGHT+"px";
+}
+this.width_=parseInt(div.style.width,10);
+this.height_=parseInt(div.style.height,10);
+this.user_attrs_={};
+MochiKit.Base.update(this.user_attrs_,_56);
+this.attrs_={};
+MochiKit.Base.update(this.attrs_,Dygraph.DEFAULT_ATTRS);
+this.labelsFromCSV_=(this.attr_("labels")==null);
+this.createInterface_();
+this.layoutOptions_={"errorBars":(this.attr_("errorBars")||this.customBars_),"xOriginIsZero":false};
+MochiKit.Base.update(this.layoutOptions_,this.attrs_);
+MochiKit.Base.update(this.layoutOptions_,this.user_attrs_);
+this.layout_=new DygraphLayout(this.layoutOptions_);
+this.renderOptions_={colorScheme:this.colors_,strokeColor:null,axisLineWidth:Dygraph.AXIS_LINE_WIDTH};
+MochiKit.Base.update(this.renderOptions_,this.attrs_);
+MochiKit.Base.update(this.renderOptions_,this.user_attrs_);
+this.plotter_=new DygraphCanvasRenderer(this.hidden_,this.layout_,this.renderOptions_);
+this.createStatusMessage_();
+this.createRollInterface_();
+this.createDragInterface_();
+this.start_();
+};
+Dygraph.prototype.attr_=function(_57){
+if(typeof (this.user_attrs_[_57])!="undefined"){
+return this.user_attrs_[_57];
+}else{
+if(typeof (this.attrs_[_57])!="undefined"){
+return this.attrs_[_57];
+}else{
+return null;
+}
+}
 };
-
-/**
- * Returns the current rolling period, as set by the user or an option.
- * @return {Number} The number of days in the rolling window
- */
-DateGraph.prototype.rollPeriod = function() {
-  return this.rollPeriod_;
+Dygraph.prototype.log=function(_58,_59){
+if(typeof (console)!="undefined"){
+switch(_58){
+case Dygraph.DEBUG:
+console.debug("dygraphs: "+_59);
+break;
+case Dygraph.INFO:
+console.info("dygraphs: "+_59);
+break;
+case Dygraph.WARNING:
+console.warn("dygraphs: "+_59);
+break;
+case Dygraph.ERROR:
+console.error("dygraphs: "+_59);
+break;
 }
-
-/**
- * Generates interface elements for the DateGraph: a containing div, a div to
- * display the current point, and a textbox to adjust the rolling average
- * period.
- * @private
- */
-DateGraph.prototype.createInterface_ = function() {
-  // Create the all-enclosing graph div
-  var enclosing = this.maindiv_;
-
-  this.graphDiv = MochiKit.DOM.DIV( { style: { 'width': this.width_ + "px",
-                                                'height': this.height_ + "px"
-                                                 }});
-  appendChildNodes(enclosing, this.graphDiv);
-
-  // Create the canvas to store
-  var canvas = MochiKit.DOM.CANVAS;
-  this.canvas_ = canvas( { style: { 'position': 'absolute' },
-                          width: this.width_,
-                          height: this.height_});
-  appendChildNodes(this.graphDiv, this.canvas_);
-
-  this.hidden_ = this.createPlotKitCanvas_(this.canvas_);
-  connect(this.hidden_, 'onmousemove', this, function(e) { this.mouseMove_(e) });
-  connect(this.hidden_, 'onmouseout', this, function(e) { this.mouseOut_(e) });
 }
-
-/**
- * Creates the canvas containing the PlotKit graph. Only plotkit ever draws on
- * this particular canvas. All DateGraph work is done on this.canvas_.
- * @param {Object} canvas The DateGraph canvas to over which to overlay the plot
- * @return {Object} The newly-created canvas
- * @private
- */
-DateGraph.prototype.createPlotKitCanvas_ = function(canvas) {
-  var h = document.createElement("canvas");
-  h.style.position = "absolute";
-  h.style.top = canvas.style.top;
-  h.style.left = canvas.style.left;
-  h.width = this.width_;
-  h.height = this.height_;
-  MochiKit.DOM.appendChildNodes(this.graphDiv, h);
-  return h;
 };
-
-/**
- * Generate a set of distinct colors for the data series. This is done with a
- * color wheel. Saturation/Value are customizable, and the hue is
- * equally-spaced around the color wheel. If a custom set of colors is
- * specified, that is used instead.
- * @param {Object} attrs Various attributes, e.g. saturation and value
- * @private
- */
-DateGraph.prototype.setColors_ = function(attrs) {
-  var num = this.labels_.length;
-  this.colors_ = [];
-  if (!attrs.colors) {
-    var sat = attrs.colorSaturation || 1.0;
-    var val = attrs.colorValue || 0.5;
-    for (var i = 1; i <= num; i++) {
-      var hue = (1.0*i/(1+num));
-      this.colors_.push( MochiKit.Color.Color.fromHSV(hue, sat, val) );
-    }
-  } else {
-    for (var i = 0; i < num; i++) {
-      var colorStr = attrs.colors[i % attrs.colors.length];
-      this.colors_.push( MochiKit.Color.Color.fromString(colorStr) );
-    }
-  }
+Dygraph.prototype.info=function(_60){
+this.log(Dygraph.INFO,_60);
+};
+Dygraph.prototype.warn=function(_61){
+this.log(Dygraph.WARNING,_61);
+};
+Dygraph.prototype.error=function(_62){
+this.log(Dygraph.ERROR,_62);
+};
+Dygraph.prototype.rollPeriod=function(){
+return this.rollPeriod_;
+};
+Dygraph.prototype.createInterface_=function(){
+var _63=this.maindiv_;
+this.graphDiv=MochiKit.DOM.DIV({style:{"width":this.width_+"px","height":this.height_+"px"}});
+appendChildNodes(_63,this.graphDiv);
+var _64=MochiKit.DOM.CANVAS;
+this.canvas_=_64({style:{"position":"absolute"},width:this.width_,height:this.height_});
+appendChildNodes(this.graphDiv,this.canvas_);
+this.hidden_=this.createPlotKitCanvas_(this.canvas_);
+connect(this.hidden_,"onmousemove",this,function(e){
+this.mouseMove_(e);
+});
+connect(this.hidden_,"onmouseout",this,function(e){
+this.mouseOut_(e);
+});
+};
+Dygraph.prototype.createPlotKitCanvas_=function(_66){
+var h=document.createElement("canvas");
+h.style.position="absolute";
+h.style.top=_66.style.top;
+h.style.left=_66.style.left;
+h.width=this.width_;
+h.height=this.height_;
+MochiKit.DOM.appendChildNodes(this.graphDiv,h);
+return h;
+};
+Dygraph.prototype.setColors_=function(){
+var num=this.attr_("labels").length-1;
+this.colors_=[];
+var _69=this.attr_("colors");
+if(!_69){
+var sat=this.attr_("colorSaturation")||1;
+var val=this.attr_("colorValue")||0.5;
+for(var i=1;i<=num;i++){
+var hue=(1*i/(1+num));
+this.colors_.push(MochiKit.Color.Color.fromHSV(hue,sat,val));
+}
+}else{
+for(var i=0;i<num;i++){
+var _73=_69[i%_69.length];
+this.colors_.push(MochiKit.Color.Color.fromString(_73));
+}
+}
+this.renderOptions_.colorScheme=this.colors_;
+MochiKit.Base.update(this.plotter_.options,this.renderOptions_);
+MochiKit.Base.update(this.layoutOptions_,this.user_attrs_);
+MochiKit.Base.update(this.layoutOptions_,this.attrs_);
+};
+Dygraph.prototype.createStatusMessage_=function(){
+if(!this.attr_("labelsDiv")){
+var _74=this.attr_("labelsDivWidth");
+var _75={"style":{"position":"absolute","fontSize":"14px","zIndex":10,"width":_74+"px","top":"0px","left":(this.width_-_74-2)+"px","background":"white","textAlign":"left","overflow":"hidden"}};
+MochiKit.Base.update(_75["style"],this.attr_("labelsDivStyles"));
+var div=MochiKit.DOM.DIV(_75);
+MochiKit.DOM.appendChildNodes(this.graphDiv,div);
+this.attrs_.labelsDiv=div;
+}
+};
+Dygraph.prototype.createRollInterface_=function(){
+var _76=this.attr_("showRoller")?"block":"none";
+var _77={"type":"text","size":"2","value":this.rollPeriod_,"style":{"position":"absolute","zIndex":10,"top":(this.plotter_.area.h-25)+"px","left":(this.plotter_.area.x+1)+"px","display":_76}};
+var _78=MochiKit.DOM.INPUT(_77);
+var pa=this.graphDiv;
+MochiKit.DOM.appendChildNodes(pa,_78);
+connect(_78,"onchange",this,function(){
+this.adjustRoll(_78.value);
+});
+return _78;
+};
+Dygraph.prototype.createDragInterface_=function(){
+var _80=this;
+var _81=false;
+var _82=null;
+var _83=null;
+var _84=null;
+var _85=null;
+var _86=null;
+var px=0;
+var py=0;
+var _89=function(e){
+return e.mouse().page.x-px;
+};
+var _90=function(e){
+return e.mouse().page.y-py;
+};
+connect(this.hidden_,"onmousemove",function(_91){
+if(_81){
+_84=_89(_91);
+_85=_90(_91);
+_80.drawZoomRect_(_82,_84,_86);
+_86=_84;
 }
-
-/**
- * Create the div that contains information on the selected point(s)
- * This goes in the top right of the canvas, unless an external div has already
- * been specified.
- * @private
- */
-DateGraph.prototype.createStatusMessage_ = function(){
-  if (!this.labelsDiv_) {
-    var divWidth = 250;
-    var messagestyle = { "style": {
-      "position": "absolute",
-      "fontSize": "14px",
-      "zIndex": 10,
-      "width": divWidth + "px",
-      "top": "0px",
-      "left": this.width_ - divWidth + "px",
-      "background": "white",
-      "textAlign": "left",
-      "overflow": "hidden"}};
-    this.labelsDiv_ = MochiKit.DOM.DIV(messagestyle);
-    MochiKit.DOM.appendChildNodes(this.graphDiv, this.labelsDiv_);
-  }
+});
+connect(this.hidden_,"onmousedown",function(_92){
+_81=true;
+px=PlotKit.Base.findPosX(_80.canvas_);
+py=PlotKit.Base.findPosY(_80.canvas_);
+_82=_89(_92);
+_83=_90(_92);
+});
+connect(document,"onmouseup",this,function(_93){
+if(_81){
+_81=false;
+_82=null;
+_83=null;
+}
+});
+connect(this.hidden_,"onmouseout",this,function(_94){
+if(_81){
+_84=null;
+_85=null;
+}
+});
+connect(this.hidden_,"onmouseup",this,function(_95){
+if(_81){
+_81=false;
+_84=_89(_95);
+_85=_90(_95);
+var _96=Math.abs(_84-_82);
+var _97=Math.abs(_85-_83);
+if(_96<2&&_97<2&&_80.attr_("clickCallback")!=null&&_80.lastx_!=undefined){
+_80.attr_("clickCallback")(_95,new Date(_80.lastx_));
+}
+if(_96>=10){
+_80.doZoom_(Math.min(_82,_84),Math.max(_82,_84));
+}else{
+_80.canvas_.getContext("2d").clearRect(0,0,_80.canvas_.width,_80.canvas_.height);
+}
+_82=null;
+_83=null;
+}
+});
+connect(this.hidden_,"ondblclick",this,function(_98){
+_80.dateWindow_=null;
+_80.drawGraph_(_80.rawData_);
+var _99=_80.rawData_[0][0];
+var _100=_80.rawData_[_80.rawData_.length-1][0];
+if(_80.attr_("zoomCallback")){
+_80.attr_("zoomCallback")(_99,_100);
+}
+});
 };
-
-/**
- * Create the text box to adjust the averaging period
- * @return {Object} The newly-created text box
- * @private
- */
-DateGraph.prototype.createRollInterface_ = function() {
-  var padding = this.plotter_.options.padding;
-  var textAttr = { "type": "text",
-                   "size": "2",
-                   "value": this.rollPeriod_,
-                   "style": { "position": "absolute",
-                              "zIndex": 10,
-                              "top": (this.height_ - 25 - padding.bottom) + "px",
-                              "left": (padding.left+1) + "px" }
-                  };
-  var roller = MochiKit.DOM.INPUT(textAttr);
-  var pa = this.graphDiv;
-  MochiKit.DOM.appendChildNodes(pa, roller);
-  connect(roller, 'onchange', this,
-          function() { this.adjustRoll(roller.value); });
-  return roller;
+Dygraph.prototype.drawZoomRect_=function(_101,endX,_103){
+var ctx=this.canvas_.getContext("2d");
+if(_103){
+ctx.clearRect(Math.min(_101,_103),0,Math.abs(_101-_103),this.height_);
+}
+if(endX&&_101){
+ctx.fillStyle="rgba(128,128,128,0.33)";
+ctx.fillRect(Math.min(_101,endX),0,Math.abs(endX-_101),this.height_);
 }
-
-/**
- * Set up all the mouse handlers needed to capture dragging behavior for zoom
- * events. Uses MochiKit.Signal to attach all the event handlers.
- * @private
- */
-DateGraph.prototype.createDragInterface_ = function() {
-  var self = this;
-
-  // Tracks whether the mouse is down right now
-  var mouseDown = false;
-  var dragStartX = null;
-  var dragStartY = null;
-  var dragEndX = null;
-  var dragEndY = null;
-  var prevEndX = null;
-
-  // Utility function to convert page-wide coordinates to canvas coords
-  var px = PlotKit.Base.findPosX(this.canvas_);
-  var py = PlotKit.Base.findPosY(this.canvas_);
-  var getX = function(e) { return e.mouse().page.x - px };
-  var getY = function(e) { return e.mouse().page.y - py };
-
-  // Draw zoom rectangles when the mouse is down and the user moves around
-  connect(this.hidden_, 'onmousemove', function(event) {
-    if (mouseDown) {
-      dragEndX = getX(event);
-      dragEndY = getY(event);
-
-      self.drawZoomRect_(dragStartX, dragEndX, prevEndX);
-      prevEndX = dragEndX;
-    }
-  });
-
-  // Track the beginning of drag events
-  connect(this.hidden_, 'onmousedown', function(event) {
-    mouseDown = true;
-    dragStartX = getX(event);
-    dragStartY = getY(event);
-  });
-
-  // If the user releases the mouse button during a drag, but not over the
-  // canvas, then it doesn't count as a zooming action.
-  connect(document, 'onmouseup', this, function(event) {
-    if (mouseDown) {
-      mouseDown = false;
-      dragStartX = null;
-      dragStartY = null;
-    }
-  });
-
-  // Temporarily cancel the dragging event when the mouse leaves the graph
-  connect(this.hidden_, 'onmouseout', this, function(event) {
-    if (mouseDown) {
-      dragEndX = null;
-      dragEndY = null;
-    }
-  });
-
-  // If the mouse is released on the canvas during a drag event, then it's a
-  // zoom. Only do the zoom if it's over a large enough area (>= 10 pixels)
-  connect(this.hidden_, 'onmouseup', this, function(event) {
-    if (mouseDown) {
-      mouseDown = false;
-      dragEndX = getX(event);
-      dragEndY = getY(event);
-      var regionWidth = Math.abs(dragEndX - dragStartX);
-      var regionHeight = Math.abs(dragEndY - dragStartY);
-
-      if (regionWidth < 2 && regionHeight < 2 &&
-          self.clickCallback_ != null &&
-          self.lastx_ != undefined) {
-        self.clickCallback_(event, new Date(self.lastx_));
-      }
-
-      if (regionWidth >= 10) {
-        self.doZoom_(Math.min(dragStartX, dragEndX),
-                     Math.max(dragStartX, dragEndX));
-      } else {
-        self.canvas_.getContext("2d").clearRect(0, 0,
-                                           self.canvas_.width,
-                                           self.canvas_.height);
-      }
-
-      dragStartX = null;
-      dragStartY = null;
-    }
-  });
-
-  // Double-clicking zooms back out
-  connect(this.hidden_, 'ondblclick', this, function(event) {
-    self.dateWindow_ = null;
-    self.drawGraph_(self.rawData_);
-    var minDate = self.rawData_[0][0];
-    var maxDate = self.rawData_[self.rawData_.length - 1][0];
-    self.zoomCallback_(minDate, maxDate);
-  });
 };
-
-/**
- * Draw a gray zoom rectangle over the desired area of the canvas. Also clears
- * up any previous zoom rectangles that were drawn. This could be optimized to
- * avoid extra redrawing, but it's tricky to avoid interactions with the status
- * dots.
- * @param {Number} startX The X position where the drag started, in canvas
- * coordinates.
- * @param {Number} endX The current X position of the drag, in canvas coords.
- * @param {Number} prevEndX The value of endX on the previous call to this
- * function. Used to avoid excess redrawing
- * @private
- */
-DateGraph.prototype.drawZoomRect_ = function(startX, endX, prevEndX) {
-  var ctx = this.canvas_.getContext("2d");
-
-  // Clean up from the previous rect if necessary
-  if (prevEndX) {
-    ctx.clearRect(Math.min(startX, prevEndX), 0,
-                  Math.abs(startX - prevEndX), this.height_);
-  }
-
-  // Draw a light-grey rectangle to show the new viewing area
-  if (endX && startX) {
-    ctx.fillStyle = "rgba(128,128,128,0.33)";
-    ctx.fillRect(Math.min(startX, endX), 0,
-                 Math.abs(endX - startX), this.height_);
-  }
+Dygraph.prototype.doZoom_=function(lowX,_105){
+var _106=this.layout_.points;
+var _107=null;
+var _108=null;
+for(var i=0;i<_106.length;i++){
+var cx=_106[i].canvasx;
+var x=_106[i].xval;
+if(cx<lowX&&(_107==null||x>_107)){
+_107=x;
+}
+if(cx>_105&&(_108==null||x<_108)){
+_108=x;
+}
+}
+if(_107==null){
+_107=_106[0].xval;
+}
+if(_108==null){
+_108=_106[_106.length-1].xval;
+}
+this.dateWindow_=[_107,_108];
+this.drawGraph_(this.rawData_);
+if(this.attr_("zoomCallback")){
+this.attr_("zoomCallback")(_107,_108);
+}
 };
-
-/**
- * Zoom to something containing [lowX, highX]. These are pixel coordinates
- * in the canvas. The exact zoom window may be slightly larger if there are no
- * data points near lowX or highX. This function redraws the graph.
- * @param {Number} lowX The leftmost pixel value that should be visible.
- * @param {Number} highX The rightmost pixel value that should be visible.
- * @private
- */
-DateGraph.prototype.doZoom_ = function(lowX, highX) {
-  // Find the earliest and latest dates contained in this canvasx range.
-  var points = this.layout_.points;
-  var minDate = null;
-  var maxDate = null;
-  // Find the nearest [minDate, maxDate] that contains [lowX, highX]
-  for (var i = 0; i < points.length; i++) {
-    var cx = points[i].canvasx;
-    var x = points[i].xval;
-    if (cx < lowX  && (minDate == null || x > minDate)) minDate = x;
-    if (cx > highX && (maxDate == null || x < maxDate)) maxDate = x;
-  }
-  // Use the extremes if either is missing
-  if (minDate == null) minDate = points[0].xval;
-  if (maxDate == null) maxDate = points[points.length-1].xval;
-
-  this.dateWindow_ = [minDate, maxDate];
-  this.drawGraph_(this.rawData_);
-  this.zoomCallback_(minDate, maxDate);
+Dygraph.prototype.mouseMove_=function(_110){
+var _111=_110.mouse().page.x-PlotKit.Base.findPosX(this.hidden_);
+var _112=this.layout_.points;
+var _113=-1;
+var _114=-1;
+var _115=1e+100;
+var idx=-1;
+for(var i=0;i<_112.length;i++){
+var dist=Math.abs(_112[i].canvasx-_111);
+if(dist>_115){
+break;
+}
+_115=dist;
+idx=i;
+}
+if(idx>=0){
+_113=_112[idx].xval;
+}
+if(_111>_112[_112.length-1].canvasx){
+_113=_112[_112.length-1].xval;
+}
+var _118=[];
+for(var i=0;i<_112.length;i++){
+if(_112[i].xval==_113){
+_118.push(_112[i]);
+}
+}
+var _119=this.attr_("highlightCircleSize");
+var ctx=this.canvas_.getContext("2d");
+if(this.previousVerticalX_>=0){
+var px=this.previousVerticalX_;
+ctx.clearRect(px-_119-1,0,2*_119+2,this.height_);
+}
+if(_118.length>0){
+var _111=_118[0].canvasx;
+var _120=this.attr_("xValueFormatter")(_113,this)+":";
+var clen=this.colors_.length;
+for(var i=0;i<_118.length;i++){
+if(this.attr_("labelsSeparateLines")){
+_120+="<br/>";
+}
+var _122=_118[i];
+_120+=" <b><font color='"+this.colors_[i%clen].toHexString()+"'>"+_122.name+"</font></b>:"+this.round_(_122.yval,2);
+}
+this.attr_("labelsDiv").innerHTML=_120;
+this.lastx_=_113;
+ctx.save();
+for(var i=0;i<_118.length;i++){
+ctx.beginPath();
+ctx.fillStyle=this.colors_[i%clen].toRGBString();
+ctx.arc(_111,_118[i%clen].canvasy,_119,0,360,false);
+ctx.fill();
+}
+ctx.restore();
+this.previousVerticalX_=_111;
+}
+};
+Dygraph.prototype.mouseOut_=function(_123){
+var ctx=this.canvas_.getContext("2d");
+ctx.clearRect(0,0,this.width_,this.height_);
+this.attr_("labelsDiv").innerHTML="";
+};
+Dygraph.zeropad=function(x){
+if(x<10){
+return "0"+x;
+}else{
+return ""+x;
+}
+};
+Dygraph.prototype.hmsString_=function(date){
+var _125=Dygraph.zeropad;
+var d=new Date(date);
+if(d.getSeconds()){
+return _125(d.getHours())+":"+_125(d.getMinutes())+":"+_125(d.getSeconds());
+}else{
+if(d.getMinutes()){
+return _125(d.getHours())+":"+_125(d.getMinutes());
+}else{
+return _125(d.getHours());
+}
+}
+};
+Dygraph.dateString_=function(date,self){
+var _128=Dygraph.zeropad;
+var d=new Date(date);
+var year=""+d.getFullYear();
+var _130=_128(d.getMonth()+1);
+var day=_128(d.getDate());
+var ret="";
+var frac=d.getHours()*3600+d.getMinutes()*60+d.getSeconds();
+if(frac){
+ret=" "+self.hmsString_(date);
+}
+return year+"/"+_130+"/"+day+ret;
+};
+Dygraph.prototype.round_=function(num,_134){
+var _135=Math.pow(10,_134);
+return Math.round(num*_135)/_135;
+};
+Dygraph.prototype.loadedEvent_=function(data){
+this.rawData_=this.parseCSV_(data);
+this.drawGraph_(this.rawData_);
+};
+Dygraph.prototype.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
+Dygraph.prototype.quarters=["Jan","Apr","Jul","Oct"];
+Dygraph.prototype.addXTicks_=function(){
+var _137,endDate;
+if(this.dateWindow_){
+_137=this.dateWindow_[0];
+endDate=this.dateWindow_[1];
+}else{
+_137=this.rawData_[0][0];
+endDate=this.rawData_[this.rawData_.length-1][0];
+}
+var _138=this.attr_("xTicker")(_137,endDate,this);
+this.layout_.updateOptions({xTicks:_138});
+};
+Dygraph.SECONDLY=0;
+Dygraph.TEN_SECONDLY=1;
+Dygraph.THIRTY_SECONDLY=2;
+Dygraph.MINUTELY=3;
+Dygraph.TEN_MINUTELY=4;
+Dygraph.THIRTY_MINUTELY=5;
+Dygraph.HOURLY=6;
+Dygraph.SIX_HOURLY=7;
+Dygraph.DAILY=8;
+Dygraph.WEEKLY=9;
+Dygraph.MONTHLY=10;
+Dygraph.QUARTERLY=11;
+Dygraph.BIANNUAL=12;
+Dygraph.ANNUAL=13;
+Dygraph.DECADAL=14;
+Dygraph.NUM_GRANULARITIES=15;
+Dygraph.SHORT_SPACINGS=[];
+Dygraph.SHORT_SPACINGS[Dygraph.SECONDLY]=1000*1;
+Dygraph.SHORT_SPACINGS[Dygraph.TEN_SECONDLY]=1000*10;
+Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_SECONDLY]=1000*30;
+Dygraph.SHORT_SPACINGS[Dygraph.MINUTELY]=1000*60;
+Dygraph.SHORT_SPACINGS[Dygraph.TEN_MINUTELY]=1000*60*10;
+Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_MINUTELY]=1000*60*30;
+Dygraph.SHORT_SPACINGS[Dygraph.HOURLY]=1000*3600;
+Dygraph.SHORT_SPACINGS[Dygraph.HOURLY]=1000*3600*6;
+Dygraph.SHORT_SPACINGS[Dygraph.DAILY]=1000*86400;
+Dygraph.SHORT_SPACINGS[Dygraph.WEEKLY]=1000*604800;
+Dygraph.prototype.NumXTicks=function(_139,_140,_141){
+if(_141<Dygraph.MONTHLY){
+var _142=Dygraph.SHORT_SPACINGS[_141];
+return Math.floor(0.5+1*(_140-_139)/_142);
+}else{
+var _143=1;
+var _144=12;
+if(_141==Dygraph.QUARTERLY){
+_144=3;
+}
+if(_141==Dygraph.BIANNUAL){
+_144=2;
+}
+if(_141==Dygraph.ANNUAL){
+_144=1;
+}
+if(_141==Dygraph.DECADAL){
+_144=1;
+_143=10;
+}
+var _145=365.2524*24*3600*1000;
+var _146=1*(_140-_139)/_145;
+return Math.floor(0.5+1*_146*_144/_143);
+}
+};
+Dygraph.prototype.GetXAxis=function(_147,_148,_149){
+var _150=[];
+if(_149<Dygraph.MONTHLY){
+var _151=Dygraph.SHORT_SPACINGS[_149];
+var _152="%d%b";
+if(_149<Dygraph.HOURLY){
+_147=_151*Math.floor(0.5+_147/_151);
+}
+for(var t=_147;t<=_148;t+=_151){
+var d=new Date(t);
+var frac=d.getHours()*3600+d.getMinutes()*60+d.getSeconds();
+if(frac==0||_149>=Dygraph.DAILY){
+_150.push({v:t,label:new Date(t+3600*1000).strftime(_152)});
+}else{
+_150.push({v:t,label:this.hmsString_(t)});
+}
+}
+}else{
+var _154;
+var _155=1;
+if(_149==Dygraph.MONTHLY){
+_154=[0,1,2,3,4,5,6,7,8,9,10,11,12];
+}else{
+if(_149==Dygraph.QUARTERLY){
+_154=[0,3,6,9];
+}else{
+if(_149==Dygraph.BIANNUAL){
+_154=[0,6];
+}else{
+if(_149==Dygraph.ANNUAL){
+_154=[0];
+}else{
+if(_149==Dygraph.DECADAL){
+_154=[0];
+_155=10;
+}
+}
+}
+}
+}
+var _156=new Date(_147).getFullYear();
+var _157=new Date(_148).getFullYear();
+var _158=Dygraph.zeropad;
+for(var i=_156;i<=_157;i++){
+if(i%_155!=0){
+continue;
+}
+for(var j=0;j<_154.length;j++){
+var _159=i+"/"+_158(1+_154[j])+"/01";
+var t=Date.parse(_159);
+if(t<_147||t>_148){
+continue;
+}
+_150.push({v:t,label:new Date(t).strftime("%b %y")});
+}
+}
+}
+return _150;
 };
-
-/**
- * When the mouse moves in the canvas, display information about a nearby data
- * point and draw dots over those points in the data series. This function
- * takes care of cleanup of previously-drawn dots.
- * @param {Object} event The mousemove event from the browser.
- * @private
- */
-DateGraph.prototype.mouseMove_ = function(event) {
-  var canvasx = event.mouse().page.x - PlotKit.Base.findPosX(this.hidden_);
-  var points = this.layout_.points;
-
-  var lastx = -1;
-  var lasty = -1;
-
-  // Loop through all the points and find the date nearest to our current
-  // location.
-  var minDist = 1e+100;
-  var idx = -1;
-  for (var i = 0; i < points.length; i++) {
-    var dist = Math.abs(points[i].canvasx - canvasx);
-    if (dist > minDist) break;
-    minDist = dist;
-    idx = i;
-  }
-  if (idx >= 0) lastx = points[idx].xval;
-  // Check that you can really highlight the last day's data
-  if (canvasx > points[points.length-1].canvasx)
-    lastx = points[points.length-1].xval;
-
-  // Extract the points we've selected
-  var selPoints = [];
-  for (var i = 0; i < points.length; i++) {
-    if (points[i].xval == lastx) {
-      selPoints.push(points[i]);
-    }
-  }
-
-  // Clear the previously drawn vertical, if there is one
-  var circleSize = 3;
-  var ctx = this.canvas_.getContext("2d");
-  if (this.previousVerticalX_ >= 0) {
-    var px = this.previousVerticalX_;
-    ctx.clearRect(px - circleSize - 1, 0, 2 * circleSize + 2, this.height_);
-  }
-
-  if (selPoints.length > 0) {
-    var canvasx = selPoints[0].canvasx;
-
-    // Set the status message to indicate the selected point(s)
-    var replace = this.xValueFormatter_(lastx) + ":";
-    var clen = this.colors_.length;
-    for (var i = 0; i < selPoints.length; i++) {
-      if (this.labelsSeparateLines) {
-        replace += "<br/>";
-      }
-      var point = selPoints[i];
-      replace += " <b><font color='" + this.colors_[i%clen].toHexString() + "'>"
-              + point.name + "</font></b>:"
-              + this.round_(point.yval, 2);
-    }
-    this.labelsDiv_.innerHTML = replace;
-
-    // Save last x position for callbacks.
-    this.lastx_ = lastx;
-
-    // Draw colored circles over the center of each selected point
-    ctx.save()
-    for (var i = 0; i < selPoints.length; i++) {
-      ctx.beginPath();
-      ctx.fillStyle = this.colors_[i%clen].toRGBString();
-      ctx.arc(canvasx, selPoints[i%clen].canvasy, circleSize, 0, 360, false);
-      ctx.fill();
-    }
-    ctx.restore();
-
-    this.previousVerticalX_ = canvasx;
-  }
+Dygraph.dateTicker=function(_160,_161,self){
+var _162=-1;
+for(var i=0;i<Dygraph.NUM_GRANULARITIES;i++){
+var _163=self.NumXTicks(_160,_161,i);
+if(self.width_/_163>=self.attr_("pixelsPerXLabel")){
+_162=i;
+break;
+}
+}
+if(_162>=0){
+return self.GetXAxis(_160,_161,_162);
+}else{
+}
 };
-
-/**
- * The mouse has left the canvas. Clear out whatever artifacts remain
- * @param {Object} event the mouseout event from the browser.
- * @private
- */
-DateGraph.prototype.mouseOut_ = function(event) {
-  // Get rid of the overlay data
-  var ctx = this.canvas_.getContext("2d");
-  ctx.clearRect(0, 0, this.width_, this.height_);
-  this.labelsDiv_.innerHTML = "";
+Dygraph.numericTicks=function(minV,maxV,self){
+var _166=[1,2,5];
+var _167,low_val,high_val,nTicks;
+var _168=self.attr_("pixelsPerYLabel");
+for(var i=-10;i<50;i++){
+var _169=Math.pow(10,i);
+for(var j=0;j<_166.length;j++){
+_167=_169*_166[j];
+low_val=Math.floor(minV/_167)*_167;
+high_val=Math.ceil(maxV/_167)*_167;
+nTicks=(high_val-low_val)/_167;
+var _170=self.height_/nTicks;
+if(_170>_168){
+break;
+}
+}
+if(_170>_168){
+break;
+}
+}
+var _171=[];
+for(var i=0;i<nTicks;i++){
+var _172=low_val+i*_167;
+var _173=self.round_(_172,2);
+if(self.attr_("labelsKMB")){
+var k=1000;
+if(_172>=k*k*k){
+_173=self.round_(_172/(k*k*k),1)+"B";
+}else{
+if(_172>=k*k){
+_173=self.round_(_172/(k*k),1)+"M";
+}else{
+if(_172>=k){
+_173=self.round_(_172/k,1)+"K";
+}
+}
+}
+}
+_171.push({label:_173,v:_172});
+}
+return _171;
 };
-
-/**
- * Convert a JS date (millis since epoch) to YYYY/MM/DD
- * @param {Number} date The JavaScript date (ms since epoch)
- * @return {String} A date of the form "YYYY/MM/DD"
- * @private
- */
-DateGraph.prototype.dateString_ = function(date) {
-  var d = new Date(date);
-
-  // Get the year:
-  var year = "" + d.getFullYear();
-  // Get a 0 padded month string
-  var month = "" + (d.getMonth() + 1);  //months are 0-offset, sigh
-  if (month.length < 2)  month = "0" + month;
-  // Get a 0 padded day string
-  var day = "" + d.getDate();
-  if (day.length < 2)  day = "0" + day;
-
-  return year + "/" + month + "/" + day;
+Dygraph.prototype.addYTicks_=function(minY,maxY){
+var _177=Dygraph.numericTicks(minY,maxY,this);
+this.layout_.updateOptions({yAxis:[minY,maxY],yTicks:_177});
 };
-
-/**
- * Round a number to the specified number of digits past the decimal point.
- * @param {Number} num The number to round
- * @param {Number} places The number of decimals to which to round
- * @return {Number} The rounded number
- * @private
- */
-DateGraph.prototype.round_ = function(num, places) {
-  var shift = Math.pow(10, places);
-  return Math.round(num * shift)/shift;
+Dygraph.prototype.drawGraph_=function(data){
+var maxY=null;
+this.layout_.removeAllDatasets();
+this.setColors_();
+for(var i=1;i<data[0].length;i++){
+var _178=[];
+for(var j=0;j<data.length;j++){
+var date=data[j][0];
+_178[j]=[date,data[j][i]];
+}
+_178=this.rollingAverage(_178,this.rollPeriod_);
+var bars=this.attr_("errorBars")||this.customBars_;
+if(this.dateWindow_){
+var low=this.dateWindow_[0];
+var high=this.dateWindow_[1];
+var _182=[];
+for(var k=0;k<_178.length;k++){
+if(_178[k][0]>=low&&_178[k][0]<=high){
+_182.push(_178[k]);
+var y=bars?_178[k][1][0]:_178[k][1];
+if(maxY==null||y>maxY){
+maxY=y;
+}
+}
+}
+_178=_182;
+}else{
+if(!this.customBars_){
+for(var j=0;j<_178.length;j++){
+var y=bars?_178[j][1][0]:_178[j][1];
+if(maxY==null||y>maxY){
+maxY=bars?y+_178[j][1][1]:y;
+}
+}
+}else{
+for(var j=0;j<_178.length;j++){
+var y=_178[j][1][0];
+var high=_178[j][1][2];
+if(high>y){
+y=high;
+}
+if(maxY==null||y>maxY){
+maxY=y;
+}
+}
+}
+}
+if(bars){
+var vals=[];
+for(var j=0;j<_178.length;j++){
+vals[j]=[_178[j][0],_178[j][1][0],_178[j][1][1],_178[j][1][2]];
+}
+this.layout_.addDataset(this.attr_("labels")[i],vals);
+}else{
+this.layout_.addDataset(this.attr_("labels")[i],_178);
+}
+}
+if(this.valueRange_!=null){
+this.addYTicks_(this.valueRange_[0],this.valueRange_[1]);
+}else{
+maxY*=1.1;
+if(maxY<=0){
+maxY=1;
+}
+this.addYTicks_(0,maxY);
+}
+this.addXTicks_();
+this.layout_.evaluateWithError();
+this.plotter_.clear();
+this.plotter_.render();
+this.canvas_.getContext("2d").clearRect(0,0,this.canvas_.width,this.canvas_.height);
 };
-
-/**
- * Fires when there's data available to be graphed.
- * @param {String} data Raw CSV data to be plotted
- * @private
- */
-DateGraph.prototype.loadedEvent_ = function(data) {
-  this.rawData_ = this.parseCSV_(data);
-  this.drawGraph_(this.rawData_);
+Dygraph.prototype.rollingAverage=function(_184,_185){
+if(_184.length<2){
+return _184;
+}
+var _185=Math.min(_185,_184.length-1);
+var _186=[];
+var _187=this.attr_("sigma");
+if(this.fractions_){
+var num=0;
+var den=0;
+var mult=100;
+for(var i=0;i<_184.length;i++){
+num+=_184[i][1][0];
+den+=_184[i][1][1];
+if(i-_185>=0){
+num-=_184[i-_185][1][0];
+den-=_184[i-_185][1][1];
+}
+var date=_184[i][0];
+var _190=den?num/den:0;
+if(this.attr_("errorBars")){
+if(this.wilsonInterval_){
+if(den){
+var p=_190<0?0:_190,n=den;
+var pm=_187*Math.sqrt(p*(1-p)/n+_187*_187/(4*n*n));
+var _193=1+_187*_187/den;
+var low=(p+_187*_187/(2*den)-pm)/_193;
+var high=(p+_187*_187/(2*den)+pm)/_193;
+_186[i]=[date,[p*mult,(p-low)*mult,(high-p)*mult]];
+}else{
+_186[i]=[date,[0,0,0]];
+}
+}else{
+var _194=den?_187*Math.sqrt(_190*(1-_190)/den):1;
+_186[i]=[date,[mult*_190,mult*_194,mult*_194]];
+}
+}else{
+_186[i]=[date,mult*_190];
+}
+}
+}else{
+if(this.customBars_){
+var low=0;
+var mid=0;
+var high=0;
+var _196=0;
+for(var i=0;i<_184.length;i++){
+var data=_184[i][1];
+var y=data[1];
+_186[i]=[_184[i][0],[y,y-data[0],data[2]-y]];
+low+=data[0];
+mid+=y;
+high+=data[2];
+_196+=1;
+if(i-_185>=0){
+var prev=_184[i-_185];
+low-=prev[1][0];
+mid-=prev[1][1];
+high-=prev[1][2];
+_196-=1;
+}
+_186[i]=[_184[i][0],[1*mid/_196,1*(mid-low)/_196,1*(high-mid)/_196]];
+}
+}else{
+var _198=Math.min(_185-1,_184.length-2);
+if(!this.attr_("errorBars")){
+for(var i=0;i<_198;i++){
+var sum=0;
+for(var j=0;j<i+1;j++){
+sum+=_184[j][1];
+}
+_186[i]=[_184[i][0],sum/(i+1)];
+}
+for(var i=Math.min(_185-1,_184.length-2);i<_184.length;i++){
+var sum=0;
+for(var j=i-_185+1;j<i+1;j++){
+sum+=_184[j][1];
+}
+_186[i]=[_184[i][0],sum/_185];
+}
+}else{
+for(var i=0;i<_198;i++){
+var sum=0;
+var _200=0;
+for(var j=0;j<i+1;j++){
+sum+=_184[j][1][0];
+_200+=Math.pow(_184[j][1][1],2);
+}
+var _194=Math.sqrt(_200)/(i+1);
+_186[i]=[_184[i][0],[sum/(i+1),_187*_194,_187*_194]];
+}
+for(var i=Math.min(_185-1,_184.length-2);i<_184.length;i++){
+var sum=0;
+var _200=0;
+for(var j=i-_185+1;j<i+1;j++){
+sum+=_184[j][1][0];
+_200+=Math.pow(_184[j][1][1],2);
+}
+var _194=Math.sqrt(_200)/_185;
+_186[i]=[_184[i][0],[sum/_185,_187*_194,_187*_194]];
+}
+}
+}
+}
+return _186;
 };
-
-DateGraph.prototype.months =  ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
-                               "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
-DateGraph.prototype.quarters = ["Jan", "Apr", "Jul", "Oct"];
-
-/**
- * Add ticks on the x-axis representing years, months, quarters, weeks, or days
- * @private
- */
-DateGraph.prototype.addXTicks_ = function() {
-  // Determine the correct ticks scale on the x-axis: quarterly, monthly, ...
-  var startDate, endDate;
-  if (this.dateWindow_) {
-    startDate = this.dateWindow_[0];
-    endDate = this.dateWindow_[1];
-  } else {
-    startDate = this.rawData_[0][0];
-    endDate   = this.rawData_[this.rawData_.length - 1][0];
-  }
-
-  var xTicks = this.xTicker_(startDate, endDate);
-  this.layout_.updateOptions({xTicks: xTicks});
+Dygraph.dateParser=function(_201,self){
+var _202;
+var d;
+if(_201.length==10&&_201.search("-")!=-1){
+_202=_201.replace("-","/","g");
+while(_202.search("-")!=-1){
+_202=_202.replace("-","/");
 }
-
-/**
- * Add ticks to the x-axis based on a date range.
- * @param {Number} startDate Start of the date window (millis since epoch)
- * @param {Number} endDate End of the date window (millis since epoch)
- * @return {Array.<Object>} Array of {label, value} tuples.
- * @public
- */
-DateGraph.prototype.dateTicker = function(startDate, endDate) {
-  var ONE_DAY = 24*60*60*1000;
-  startDate = startDate / ONE_DAY;
-  endDate = endDate / ONE_DAY;
-  var dateSpan = endDate - startDate;
-
-  var scale = [];
-  var isMonthly = false;
-  var yearMod = 1;
-  if (dateSpan > 30 * 366) {      // decadal
-    isMonthly = true;
-    scale = ["Jan"];
-    yearMod = 10;
-  } else if (dateSpan > 4*366) {  // annual
-    scale = ["Jan"];
-    isMonthly = true;
-  } else if (dateSpan > 366) {    // quarterly
-    scale = this.quarters;
-    isMonthly = true;
-  } else if (dateSpan > 40) {     // monthly
-    scale = this.months;
-    isMonthly = true;
-  } else if (dateSpan > 10) {     // weekly
-    for (var week = startDate - 14; week < endDate + 14; week += 7) {
-      scale.push(week * ONE_DAY);
-    }
-  } else {                        // daily
-    for (var day = startDate - 14; day < endDate + 14; day += 1) {
-      scale.push(day * ONE_DAY);
-    }
-  }
-
-  var xTicks = [];
-
-  if (isMonthly) {
-    var startYear = 1900 + (new Date(startDate* ONE_DAY)).getYear();
-    var endYear   = 1900 + (new Date(endDate  * ONE_DAY)).getYear();
-    for (var i = startYear; i <= endYear; i++) {
-      if (i % yearMod != 0) continue;
-      for (var j = 0; j < scale.length; j++ ) {
-        var date = Date.parse(scale[j] + " 1, " + i);
-        xTicks.push( {label: scale[j] + "'" + ("" + i).substr(2,2), v: date } );
-      }
-    }
-  } else {
-    for (var i = 0; i < scale.length; i++) {
-      var date = new Date(scale[i]);
-      var year = date.getFullYear().toString();
-      var label = this.months[date.getMonth()] + date.getDate();
-      label += "'" + year.substr(year.length - 2, 2);
-      xTicks.push( {label: label, v: date} );
-    }
-  }
-  return xTicks;
+d=Date.parse(_202);
+}else{
+if(_201.length==8){
+_202=_201.substr(0,4)+"/"+_201.substr(4,2)+"/"+_201.substr(6,2);
+d=Date.parse(_202);
+}else{
+d=Date.parse(_201);
+}
+}
+if(!d||isNaN(d)){
+self.error("Couldn't parse "+_201+" as a date");
+}
+return d;
 };
-
-/**
- * Add ticks when the x axis has numbers on it (instead of dates)
- * @param {Number} startDate Start of the date window (millis since epoch)
- * @param {Number} endDate End of the date window (millis since epoch)
- * @return {Array.<Object>} Array of {label, value} tuples.
- * @public
- */
-DateGraph.prototype.numericTicks = function(minV, maxV) {
-  var scale;
-  if (maxV <= 0.0) {
-    scale = 1.0;
-  } else {
-    scale = Math.pow( 10, Math.floor(Math.log(maxV)/Math.log(10.0)) );
-  }
-
-  // Add a smallish number of ticks at human-friendly points
-  var nTicks = (maxV - minV) / scale;
-  while (2 * nTicks < 20) {
-    nTicks *= 2;
-  }
-  if ((maxV - minV) / nTicks < this.minTickSize_) {
-    nTicks = this.round_((maxV - minV) / this.minTickSize_, 1);
-  }
-
-  // Construct labels for the ticks
-  var ticks = [];
-  for (var i = 0; i <= nTicks; i++) {
-    var tickV = minV + i * (maxV - minV) / nTicks;
-    var label = this.round_(tickV, 2);
-    if (this.labelsKMB_) {
-      var k = 1000;
-      if (tickV >= k*k*k) {
-        label = this.round_(tickV/(k*k*k), 1) + "B";
-      } else if (tickV >= k*k) {
-        label = this.round_(tickV/(k*k), 1) + "M";
-      } else if (tickV >= k) {
-        label = this.round_(tickV/k, 1) + "K";
-      }
-    }
-    ticks.push( {label: label, v: tickV} );
-  }
-  return ticks;
+Dygraph.prototype.detectTypeFromString_=function(str){
+var _204=false;
+if(str.indexOf("-")>=0||str.indexOf("/")>=0||isNaN(parseFloat(str))){
+_204=true;
+}else{
+if(str.length==8&&str>"19700101"&&str<"20371231"){
+_204=true;
+}
+}
+if(_204){
+this.attrs_.xValueFormatter=Dygraph.dateString_;
+this.attrs_.xValueParser=Dygraph.dateParser;
+this.attrs_.xTicker=Dygraph.dateTicker;
+}else{
+this.attrs_.xValueFormatter=function(x){
+return x;
 };
-
-/**
- * Adds appropriate ticks on the y-axis
- * @param {Number} minY The minimum Y value in the data set
- * @param {Number} maxY The maximum Y value in the data set
- * @private
- */
-DateGraph.prototype.addYTicks_ = function(minY, maxY) {
-  // Set the number of ticks so that the labels are human-friendly.
-  var ticks = this.numericTicks(minY, maxY);
-  this.layout_.updateOptions( { yAxis: [minY, maxY],
-                                yTicks: ticks } );
+this.attrs_.xValueParser=function(x){
+return parseFloat(x);
 };
-
-/**
- * Update the graph with new data. Data is in the format
- * [ [date1, val1, val2, ...], [date2, val1, val2, ...] if errorBars=false
- * or, if errorBars=true,
- * [ [date1, [val1,stddev1], [val2,stddev2], ...], [date2, ...], ...]
- * @param {Array.<Object>} data The data (see above)
- * @private
- */
-DateGraph.prototype.drawGraph_ = function(data) {
-  var maxY = null;
-  this.layout_.removeAllDatasets();
-  // Loop over all fields in the dataset
-  for (var i = 1; i < data[0].length; i++) {
-    var series = [];
-    for (var j = 0; j < data.length; j++) {
-      var date = data[j][0];
-      series[j] = [date, data[j][i]];
-    }
-    series = this.rollingAverage(series, this.rollPeriod_);
-
-    // Prune down to the desired range, if necessary (for zooming)
-    var bars = this.errorBars_ || this.customBars_;
-    if (this.dateWindow_) {
-      var low = this.dateWindow_[0];
-      var high= this.dateWindow_[1];
-      var pruned = [];
-      for (var k = 0; k < series.length; k++) {
-        if (series[k][0] >= low && series[k][0] <= high) {
-          pruned.push(series[k]);
-          var y = bars ? series[k][1][0] : series[k][1];
-          if (maxY == null || y > maxY) maxY = y;
-        }
-      }
-      series = pruned;
-    } else {
-      for (var j = 0; j < series.length; j++) {
-        var y = bars ? series[j][1][0] : series[j][1];
-        if (maxY == null || y > maxY) {
-          maxY = bars ? y + series[j][1][1] : y;
-        }
-      }
-    }
-
-    if (bars) {
-      var vals = [];
-      for (var j=0; j<series.length; j++)
-        vals[j] = [series[j][0],
-                   series[j][1][0], series[j][1][1], series[j][1][2]];
-      this.layout_.addDataset(this.labels_[i - 1], vals);
-    } else {
-      this.layout_.addDataset(this.labels_[i - 1], series);
-    }
-  }
-
-  // Use some heuristics to come up with a good maxY value, unless it's been
-  // set explicitly by the user.
-  if (this.valueRange_ != null) {
-    this.addYTicks_(this.valueRange_[0], this.valueRange_[1]);
-  } else {
-    // Add some padding and round up to an integer to be human-friendly.
-    maxY *= 1.1;
-    if (maxY <= 0.0) maxY = 1.0;
-    else {
-      var scale = Math.pow(10, Math.floor(Math.log(maxY) / Math.log(10.0)));
-      maxY = scale * Math.ceil(maxY / scale);
-    }
-    this.addYTicks_(0, maxY);
-  }
-
-  this.addXTicks_();
-
-  // Tell PlotKit to use this new data and render itself
-  this.layout_.evaluateWithError();
-  this.plotter_.clear();
-  this.plotter_.render();
-  this.canvas_.getContext('2d').clearRect(0, 0,
-                                         this.canvas_.width, this.canvas_.height);
+this.attrs_.xTicker=Dygraph.numericTicks;
+}
 };
-
-/**
- * Calculates the rolling average of a data set.
- * If originalData is [label, val], rolls the average of those.
- * If originalData is [label, [, it's interpreted as [value, stddev]
- *   and the roll is returned in the same form, with appropriately reduced
- *   stddev for each value.
- * Note that this is where fractional input (i.e. '5/10') is converted into
- *   decimal values.
- * @param {Array} originalData The data in the appropriate format (see above)
- * @param {Number} rollPeriod The number of days over which to average the data
- */
-DateGraph.prototype.rollingAverage = function(originalData, rollPeriod) {
-  if (originalData.length < 2)
-    return originalData;
-  var rollPeriod = Math.min(rollPeriod, originalData.length - 1);
-  var rollingData = [];
-  var sigma = this.sigma_;
-
-  if (this.fractions_) {
-    var num = 0;
-    var den = 0;  // numerator/denominator
-    var mult = 100.0;
-    for (var i = 0; i < originalData.length; i++) {
-      num += originalData[i][1][0];
-      den += originalData[i][1][1];
-      if (i - rollPeriod >= 0) {
-        num -= originalData[i - rollPeriod][1][0];
-        den -= originalData[i - rollPeriod][1][1];
-      }
-
-      var date = originalData[i][0];
-      var value = den ? num / den : 0.0;
-      if (this.errorBars_) {
-        if (this.wilsonInterval_) {
-          // For more details on this confidence interval, see:
-          // http://en.wikipedia.org/wiki/Binomial_confidence_interval
-          if (den) {
-            var p = value < 0 ? 0 : value, n = den;
-            var pm = sigma * Math.sqrt(p*(1-p)/n + sigma*sigma/(4*n*n));
-            var denom = 1 + sigma * sigma / den;
-            var low  = (p + sigma * sigma / (2 * den) - pm) / denom;
-            var high = (p + sigma * sigma / (2 * den) + pm) / denom;
-            rollingData[i] = [date,
-                              [p * mult, (p - low) * mult, (high - p) * mult]];
-          } else {
-            rollingData[i] = [date, [0, 0, 0]];
-          }
-        } else {
-          var stddev = den ? sigma * Math.sqrt(value * (1 - value) / den) : 1.0;
-          rollingData[i] = [date, [mult * value, mult * stddev, mult * stddev]];
-        }
-      } else {
-        rollingData[i] = [date, mult * value];
-      }
-    }
-  } else if (this.customBars_) {
-    // just ignore the rolling for now.
-    // TODO(danvk): do something reasonable.
-    for (var i = 0; i < originalData.length; i++) {
-      var data = originalData[i][1];
-      var y = data[1];
-      rollingData[i] = [originalData[i][0], [y, y - data[0], data[2] - y]];
-    }
-  } else {
-    // Calculate the rolling average for the first rollPeriod - 1 points where
-    // there is not enough data to roll over the full number of days
-    var num_init_points = Math.min(rollPeriod - 1, originalData.length - 2);
-    if (!this.errorBars_){
-      for (var i = 0; i < num_init_points; i++) {
-        var sum = 0;
-        for (var j = 0; j < i + 1; j++)
-          sum += originalData[j][1];
-        rollingData[i] = [originalData[i][0], sum / (i + 1)];
-      }
-      // Calculate the rolling average for the remaining points
-      for (var i = Math.min(rollPeriod - 1, originalData.length - 2);
-          i < originalData.length;
-          i++) {
-        var sum = 0;
-        for (var j = i - rollPeriod + 1; j < i + 1; j++)
-          sum += originalData[j][1];
-        rollingData[i] = [originalData[i][0], sum / rollPeriod];
-      }
-    } else {
-      for (var i = 0; i < num_init_points; i++) {
-        var sum = 0;
-        var variance = 0;
-        for (var j = 0; j < i + 1; j++) {
-          sum += originalData[j][1][0];
-          variance += Math.pow(originalData[j][1][1], 2);
-        }
-        var stddev = Math.sqrt(variance)/(i+1);
-        rollingData[i] = [originalData[i][0],
-                          [sum/(i+1), sigma * stddev, sigma * stddev]];
-      }
-      // Calculate the rolling average for the remaining points
-      for (var i = Math.min(rollPeriod - 1, originalData.length - 2);
-          i < originalData.length;
-          i++) {
-        var sum = 0;
-        var variance = 0;
-        for (var j = i - rollPeriod + 1; j < i + 1; j++) {
-          sum += originalData[j][1][0];
-          variance += Math.pow(originalData[j][1][1], 2);
-        }
-        var stddev = Math.sqrt(variance) / rollPeriod;
-        rollingData[i] = [originalData[i][0],
-                          [sum / rollPeriod, sigma * stddev, sigma * stddev]];
-      }
-    }
-  }
-
-  return rollingData;
+Dygraph.prototype.parseCSV_=function(data){
+var ret=[];
+var _205=data.split("\n");
+var _206=0;
+if(this.labelsFromCSV_){
+_206=1;
+this.attrs_.labels=_205[0].split(",");
+}
+var _207;
+var _208=false;
+var _209=this.attr_("labels").length;
+for(var i=_206;i<_205.length;i++){
+var line=_205[i];
+if(line.length==0){
+continue;
+}
+var _211=line.split(",");
+if(_211.length<2){
+continue;
+}
+var _212=[];
+if(!_208){
+this.detectTypeFromString_(_211[0]);
+_207=this.attr_("xValueParser");
+_208=true;
+}
+_212[0]=_207(_211[0],this);
+if(this.fractions_){
+for(var j=1;j<_211.length;j++){
+var vals=_211[j].split("/");
+_212[j]=[parseFloat(vals[0]),parseFloat(vals[1])];
+}
+}else{
+if(this.attr_("errorBars")){
+for(var j=1;j<_211.length;j+=2){
+_212[(j+1)/2]=[parseFloat(_211[j]),parseFloat(_211[j+1])];
+}
+}else{
+if(this.customBars_){
+for(var j=1;j<_211.length;j++){
+var vals=_211[j].split(";");
+_212[j]=[parseFloat(vals[0]),parseFloat(vals[1]),parseFloat(vals[2])];
+}
+}else{
+for(var j=1;j<_211.length;j++){
+_212[j]=parseFloat(_211[j]);
+}
+}
+}
+}
+ret.push(_212);
+if(_212.length!=_209){
+this.error("Number of columns in line "+i+" ("+_212.length+") does not agree with number of labels ("+_209+") "+line);
+}
+}
+return ret;
 };
-
-/**
- * Parses a date, returning the number of milliseconds since epoch. This can be
- * passed in as an xValueParser in the DateGraph constructor.
- * @param {String} A date in YYYYMMDD format.
- * @return {Number} Milliseconds since epoch.
- * @public
- */
-DateGraph.prototype.dateParser = function(dateStr) {
-  var dateStrSlashed;
-  if (dateStr.search("-") != -1) {
-    dateStrSlashed = dateStr.replace("-", "/", "g");
-  } else if (dateStr.search("/") != -1) {
-    return Date.parse(dateStr);
-  } else {
-    dateStrSlashed = dateStr.substr(0,4) + "/" + dateStr.substr(4,2)
-                       + "/" + dateStr.substr(6,2);
-  }
-  return Date.parse(dateStrSlashed);
+Dygraph.prototype.parseArray_=function(data){
+if(data.length==0){
+this.error("Can't plot empty data set");
+return null;
+}
+if(data[0].length==0){
+this.error("Data set cannot contain an empty row");
+return null;
+}
+if(this.attr_("labels")==null){
+this.warn("Using default labels. Set labels explicitly via 'labels' "+"in the options parameter");
+this.attrs_.labels=["X"];
+for(var i=1;i<data[0].length;i++){
+this.attrs_.labels.push("Y"+i);
+}
+}
+if(MochiKit.Base.isDateLike(data[0][0])){
+this.attrs_.xValueFormatter=Dygraph.dateString_;
+this.attrs_.xTicker=Dygraph.dateTicker;
+var _213=MochiKit.Base.clone(data);
+for(var i=0;i<data.length;i++){
+if(_213[i].length==0){
+this.error("Row "<<(1+i)<<" of data is empty");
+return null;
+}
+if(_213[i][0]==null||typeof (_213[i][0].getTime)!="function"){
+this.error("x value in row "<<(1+i)<<" is not a Date");
+return null;
+}
+_213[i][0]=_213[i][0].getTime();
+}
+return _213;
+}else{
+this.attrs_.xValueFormatter=function(x){
+return x;
 };
-
-/**
- * Parses a string in a special csv format.  We expect a csv file where each
- * line is a date point, and the first field in each line is the date string.
- * We also expect that all remaining fields represent series.
- * if this.errorBars_ is set, then interpret the fields as:
- * date, series1, stddev1, series2, stddev2, ...
- * @param {Array.<Object>} data See above.
- * @private
- */
-DateGraph.prototype.parseCSV_ = function(data) {
-  var ret = [];
-  var lines = data.split("\n");
-  var start = this.labelsFromCSV_ ? 1 : 0;
-  if (this.labelsFromCSV_) {
-    var labels = lines[0].split(",");
-    labels.shift();  // a "date" parameter is assumed.
-    this.labels_ = labels;
-    // regenerate automatic colors.
-    this.setColors_(this.attrs_);
-    this.renderOptions_.colorScheme = this.colors_;
-    MochiKit.Base.update(this.plotter_.options, this.renderOptions_);
-    MochiKit.Base.update(this.layoutOptions_, this.attrs_);
-  }
-
-  for (var i = start; i < lines.length; i++) {
-    var line = lines[i];
-    if (line.length == 0) continue;  // skip blank lines
-    var inFields = line.split(',');
-    if (inFields.length < 2)
-      continue;
-
-    var fields = [];
-    fields[0] = this.xValueParser_(inFields[0]);
-
-    // If fractions are expected, parse the numbers as "A/B"
-    if (this.fractions_) {
-      for (var j = 1; j < inFields.length; j++) {
-        // TODO(danvk): figure out an appropriate way to flag parse errors.
-        var vals = inFields[j].split("/");
-        fields[j] = [parseFloat(vals[0]), parseFloat(vals[1])];
-      }
-    } else if (this.errorBars_) {
-      // If there are error bars, values are (value, stddev) pairs
-      for (var j = 1; j < inFields.length; j += 2)
-        fields[(j + 1) / 2] = [parseFloat(inFields[j]),
-                               parseFloat(inFields[j + 1])];
-    } else if (this.customBars_) {
-      // Bars are a low;center;high tuple
-      for (var j = 1; j < inFields.length; j++) {
-        var vals = inFields[j].split(";");
-        fields[j] = [ parseFloat(vals[0]),
-                      parseFloat(vals[1]),
-                      parseFloat(vals[2]) ];
-      }
-    } else {
-      // Values are just numbers
-      for (var j = 1; j < inFields.length; j++)
-        fields[j] = parseFloat(inFields[j]);
-    }
-    ret.push(fields);
-  }
-  return ret;
+this.attrs_.xTicker=Dygraph.numericTicks;
+return data;
+}
 };
-
-/**
- * Get the CSV data. If it's in a function, call that function. If it's in a
- * file, do an XMLHttpRequest to get it.
- * @private
- */
-DateGraph.prototype.start_ = function() {
-  if (typeof this.file_ == 'function') {
-    // Stubbed out to allow this to run off a filesystem
-    this.loadedEvent_(this.file_());
-  } else {
-    var req = new XMLHttpRequest();
-    var caller = this;
-    req.onreadystatechange = function () {
-      if (req.readyState == 4) {
-        if (req.status == 200) {
-          caller.loadedEvent_(req.responseText);
-        }
-      }
-    };
-
-    req.open("GET", this.file_, true);
-    req.send(null);
-  }
+Dygraph.prototype.parseDataTable_=function(data){
+var cols=data.getNumberOfColumns();
+var rows=data.getNumberOfRows();
+var _216=[];
+for(var i=0;i<cols;i++){
+_216.push(data.getColumnLabel(i));
+}
+this.attrs_.labels=_216;
+var _217=data.getColumnType(0);
+if(_217=="date"){
+this.attrs_.xValueFormatter=Dygraph.dateString_;
+this.attrs_.xValueParser=Dygraph.dateParser;
+this.attrs_.xTicker=Dygraph.dateTicker;
+}else{
+if(_217!="number"){
+this.attrs_.xValueFormatter=function(x){
+return x;
 };
-
-/**
- * Changes various properties of the graph. These can include:
- * <ul>
- * <li>file: changes the source data for the graph</li>
- * <li>errorBars: changes whether the data contains stddev</li>
- * </ul>
- * @param {Object} attrs The new properties and values
- */
-DateGraph.prototype.updateOptions = function(attrs) {
-  if (attrs.errorBars) {
-    this.errorBars_ = attrs.errorBars;
-  }
-  if (attrs.customBars) {
-    this.customBars_ = attrs.customBars;
-  }
-  if (attrs.strokeWidth) {
-    this.strokeWidth_ = attrs.strokeWidth;
-  }
-  if (attrs.rollPeriod) {
-    this.rollPeriod_ = attrs.rollPeriod;
-  }
-  if (attrs.dateWindow) {
-    this.dateWindow_ = attrs.dateWindow;
-  }
-  if (attrs.valueRange) {
-    this.valueRange_ = attrs.valueRange;
-  }
-  if (attrs.minTickSize) {
-    this.minTickSize_ = attrs.minTickSize;
-  }
-  if (typeof(attrs.labels) != 'undefined') {
-    this.labels_ = attrs.labels;
-    this.labelsFromCSV_ = (attrs.labels == null);
-  }
-  this.layout_.updateOptions({ 'errorBars': this.errorBars_ });
-  if (attrs['file'] && attrs['file'] != this.file_) {
-    this.file_ = attrs['file'];
-    this.start_();
-  } else {
-    this.drawGraph_(this.rawData_);
-  }
+this.attrs_.xValueParser=function(x){
+return parseFloat(x);
 };
-
-/**
- * Adjusts the number of days in the rolling average. Updates the graph to
- * reflect the new averaging period.
- * @param {Number} length Number of days over which to average the data.
- */
-DateGraph.prototype.adjustRoll = function(length) {
-  this.rollPeriod_ = length;
-  this.drawGraph_(this.rawData_);
+this.attrs_.xTicker=Dygraph.numericTicks;
+}else{
+this.error("only 'date' and 'number' types are supported for column 1"+"of DataTable input (Got '"+_217+"')");
+return null;
+}
+}
+var ret=[];
+for(var i=0;i<rows;i++){
+var row=[];
+if(_217=="date"){
+row.push(data.getValue(i,0).getTime());
+}else{
+row.push(data.getValue(i,0));
+}
+for(var j=1;j<cols;j++){
+row.push(data.getValue(i,j));
+}
+ret.push(row);
+}
+return ret;
+};
+Dygraph.prototype.start_=function(){
+if(typeof this.file_=="function"){
+this.loadedEvent_(this.file_());
+}else{
+if(MochiKit.Base.isArrayLike(this.file_)){
+this.rawData_=this.parseArray_(this.file_);
+this.drawGraph_(this.rawData_);
+}else{
+if(typeof this.file_=="object"&&typeof this.file_.getColumnRange=="function"){
+this.rawData_=this.parseDataTable_(this.file_);
+this.drawGraph_(this.rawData_);
+}else{
+if(typeof this.file_=="string"){
+if(this.file_.indexOf("\n")>=0){
+this.loadedEvent_(this.file_);
+}else{
+var req=new XMLHttpRequest();
+var _220=this;
+req.onreadystatechange=function(){
+if(req.readyState==4){
+if(req.status==200){
+_220.loadedEvent_(req.responseText);
+}
+}
+};
+req.open("GET",this.file_,true);
+req.send(null);
+}
+}else{
+this.error("Unknown data format: "+(typeof this.file_));
+}
+}
+}
+}
 };
+Dygraph.prototype.updateOptions=function(_221){
+if(_221.customBars){
+this.customBars_=_221.customBars;
+}
+if(_221.rollPeriod){
+this.rollPeriod_=_221.rollPeriod;
+}
+if(_221.dateWindow){
+this.dateWindow_=_221.dateWindow;
+}
+if(_221.valueRange){
+this.valueRange_=_221.valueRange;
+}
+MochiKit.Base.update(this.user_attrs_,_221);
+this.labelsFromCSV_=(this.attr_("labels")==null);
+this.layout_.updateOptions({"errorBars":this.attr_("errorBars")});
+if(_221["file"]&&_221["file"]!=this.file_){
+this.file_=_221["file"];
+this.start_();
+}else{
+this.drawGraph_(this.rawData_);
+}
+};
+Dygraph.prototype.adjustRoll=function(_222){
+this.rollPeriod_=_222;
+this.drawGraph_(this.rawData_);
+};
+Dygraph.GVizChart=function(_223){
+this.container=_223;
+};
+Dygraph.GVizChart.prototype.draw=function(data,_224){
+this.container.innerHTML="";
+this.date_graph=new Dygraph(this.container,data,_224);
+};
+DateGraph=Dygraph;
+