Roo/Element.js
authorAlan Knowles <alan@roojs.com>
Mon, 21 Mar 2016 09:59:06 +0000 (17:59 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 21 Mar 2016 09:59:06 +0000 (17:59 +0800)
roojs-core.js
roojs-core-debug.js

Roo/Element.js
roojs-core-debug.js
roojs-core.js

index d91a4d1..91fffea 100644 (file)
@@ -2086,7 +2086,7 @@ if(opt.anim.isAnimated()){
             
             // we wander
             var z = 0;
-            var dom = this.dom
+            var dom = this.dom;
             while (dom && dom.style) {
                 if (!isNaN(parseInt(dom.style.zIndex))) {
                     z = Math.max(z, parseInt(dom.style.zIndex));
index 50b3dc7..32f8f0a 100644 (file)
@@ -6584,6 +6584,9 @@ Roo.onReady(function(){
     if(Roo.isIOS){
         cls.push("roo-ios");
     }
+    if(Roo.isTouch){
+        cls.push("roo-touch");
+    }
     if(Roo.isBorderBox){
         cls.push('roo-border-box');
     }
@@ -9007,7 +9010,7 @@ if(opt.anim.isAnimated()){
             
             // we wander
             var z = 0;
-            var dom = this.dom
+            var dom = this.dom;
             while (dom && dom.style) {
                 if (!isNaN(parseInt(dom.style.zIndex))) {
                     z = Math.max(z, parseInt(dom.style.zIndex));
index 1ae5655..e21dd45 100644 (file)
@@ -1,23 +1,23 @@
 // Roo.js
 window["undefined"]=window["undefined"];var Roo={};Roo.apply=function(o,c,A){if(A){Roo.apply(o,A);}if(o&&c&&typeof c=='object'){for(var p in c){o[p]=c[p];}}return o;};(function(){var A=0;var ua=navigator.userAgent.toLowerCase();var B=document.compatMode=="CSS1Compat",C=ua.indexOf("opera")>-1,D=(/webkit|khtml/).test(ua),E=ua.indexOf("firefox")>-1,F=ua.indexOf("msie")>-1,G=ua.indexOf("msie 7")>-1,H=/trident.*rv\:11\./.test(ua),I=!D&&ua.indexOf("gecko")>-1,J=F&&!B,K=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),L=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),M=(ua.indexOf("linux")!=-1),N=window.location.href.toLowerCase().indexOf("https")===0,O=/iphone|ipad/.test(ua),P=(function(){try{document.createEvent("TouchEvent");
-return true;}catch(e){return false;}})();if(F&&!G){try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}}Roo.apply(Roo,{isStrict:B,isSecure:N,isReady:false,debug:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/localhost/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p];
-}}}return o;},addBehaviors:function(o){if(!Roo.isReady){Roo.onReady(function(){Roo.addBehaviors(o);});return;}var Q={};for(var b in o){var R=b.split('@');if(R[1]){var s=R[0];if(!Q[s]){Q[s]=Roo.select(s);}Q[s].on(R[1],o[b]);}}Q=null;},id:function(el,Q){Q=Q||"roo-gen";
-el=Roo.getDom(el);var id=Q+(++A);return el?(el.id?el.id:(el.id=id)):id;},extend:function(){var io=function(o){for(var m in o){this[m]=o[m];}};return function(sb,sp,Q){if(typeof sp=='object'){Q=sp;sp=sb;sb=function(){sp.apply(this,arguments);};}var F=function(){},R,S=sp.prototype;
-F.prototype=S;R=sb.prototype=new F();R.constructor=sb;sb.superclass=S;if(S.constructor==Object.prototype.constructor){S.constructor=sp;}sb.override=function(o){Roo.override(sb,o);};R.override=io;Roo.override(sb,Q);return sb;};}(),override:function(Q,R){if(R){var p=Q.prototype;
-for(var S in R){p[S]=R[S];}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i<a.length;++i){d=a[i].split(".");rt=d[0];eval('if (typeof '+rt+' == "undefined"){'+rt+' = {};} o = '+rt+';');for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];
-}}},factory:function(c,ns){if(!c.xtype||(!ns&&!c.xns)||(c.xns===false)){return c;}ns=c.xns?c.xns:ns;if(c.constructor==ns[c.xtype]){return c;}if(ns[c.xtype]){if(Roo.debug)Roo.log("Roo.Factory("+c.xtype+")");var Q=new ns[c.xtype](c);Q.xns=false;return Q;}c.xns=false;
-return c;},log:function(s){if((typeof(console)=='undefined')||(typeof(console.log)=='undefined')){return;}console.log(s);},urlEncode:function(o){if(!o){return "";}var Q=[];for(var R in o){var ov=o[R],k=Roo.encodeURIComponent(R);var S=typeof ov;if(S=='undefined'){Q.push(k,"=&");
-}else if(S!="function"&&S!="object"){Q.push(k,"=",Roo.encodeURIComponent(ov),"&");}else if(ov instanceof Array){if(ov.length){for(var i=0,T=ov.length;i<T;i++){Q.push(k,"=",Roo.encodeURIComponent(ov[i]===undefined?'':ov[i]),"&");}}else{Q.push(k,"=&");}}}Q.pop();
-return Q.join("");},encodeURIComponent:function(Q){try{return encodeURIComponent(Q);}catch(e){}if(Q==''||Q==null){return '';}function nibble_to_hex(T){var U='0123456789ABCDEF';return U.charAt(T);}Q=Q.toString();var R='';for(var i=0;i<Q.length;i++){var c=Q.charCodeAt(i);
-var bs=new Array();if(c>0x10000){bs[0]=0xF0|((c&0x1C0000)>>>18);bs[1]=0x80|((c&0x3F000)>>>12);bs[2]=0x80|((c&0xFC0)>>>6);bs[3]=0x80|(c&0x3F);}else if(c>0x800){bs[0]=0xE0|((c&0xF000)>>>12);bs[1]=0x80|((c&0xFC0)>>>6);bs[2]=0x80|(c&0x3F);}else if(c>0x80){bs[0]=0xC0|((c&0x7C0)>>>6);
-bs[1]=0x80|(c&0x3F);}else{bs[0]=c;}for(var j=0;j<bs.length;j++){var b=bs[j];var S=nibble_to_hex((b&0xF0)>>>4)+nibble_to_hex(b&0x0F);R+='%'+S;}}return R;},urlDecode:function(Q,R){if(!Q||!Q.length){return {};}var S={};var T=Q.split('&');var U,V,W;for(var i=0,X=T.length;
-i<X;i++){U=T[i].split('=');V=decodeURIComponent(U[0]);W=decodeURIComponent(U[1]);if(R!==true){if(typeof S[V]=="undefined"){S[V]=W;}else if(typeof S[V]=="string"){S[V]=[S[V]];S[V].push(W);}else{S[V].push(W);}}else{S[V]=W;}}return S;},each:function(Q,fn,R){if(typeof Q.length=="undefined"||typeof Q=="string"){Q=[Q];
-}for(var i=0,S=Q.length;i<S;i++){if(fn.call(R||Q[i],Q[i],i,Q)===false){return i;};}},combine:function(){var as=arguments,l=as.length,r=[];for(var i=0;i<l;i++){var a=as[i];if(a instanceof Array){r=r.concat(a);}else if(a.length!==undefined&&!a.substr){r=r.concat(Array.prototype.slice.call(a,0));
-}else{r.push(a);}}return r;},escapeRe:function(s){return s.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1");},callback:function(cb,Q,R,S){if(typeof cb=="function"){if(S){cb.defer(S,Q,R||[]);}else{cb.apply(Q,R||[]);}}},getDom:function(el){if(!el){return null;}return el.dom?el.dom:(typeof el=='string'?document.getElementById(el):el);
-},getCmp:function(id){return Roo.ComponentMgr.get(id);},num:function(v,Q){if(typeof v!='number'){return Q;}return v;},destroy:function(){for(var i=0,a=arguments,Q=a.length;i<Q;i++){var as=a[i];if(as){if(as.dom){as.removeAllListeners();as.remove();continue;
-}if(typeof as.purgeListeners=='function'){as.purgeListeners();}if(typeof as.destroy=='function'){as.destroy();}}}},type:function(o){if(o===undefined||o===null){return false;}if(o.htmlElement){return 'element';}var t=typeof o;if(t=='object'&&o.nodeName){switch(o.nodeType){case 1:return 'element';
-case 3:return (/\S/).test(o.nodeValue)?'textnode':'whitespace';}}if(t=='object'||t=='function'){switch(o.constructor){case Array:return 'array';case RegExp:return 'regexp';}if(typeof o.length=='number'&&typeof o.item=='function'){return 'nodelist';}}return t;
-},isEmpty:function(v,Q){return v===null||v===undefined||(!Q?v==='':false);},isOpera:C,isSafari:D,isFirefox:E,isIE:F,isIE7:G,isIE11:H,isGecko:I,isBorderBox:J,isWindows:K,isLinux:M,isMac:L,isIOS:O,isTouch:P,useShims:((F&&!G)||(I&&L)),selectNode:function(Q,R){var S=Roo.DomQuery.selectNode(Q,R);
+return true;}catch(e){return false;}})();if(F&&!G){try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}}Roo.apply(Roo,{isStrict:B,isSecure:N,isReady:false,debug:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/localhost/s.gif",emptyFn:function(){}
+,applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p];}}}return o;},addBehaviors:function(o){if(!Roo.isReady){Roo.onReady(function(){Roo.addBehaviors(o);});return;}var Q={};for(var b in o){var R=b.split('@');if(R[1]){var s=R[0];
+if(!Q[s]){Q[s]=Roo.select(s);}Q[s].on(R[1],o[b]);}}Q=null;},id:function(el,Q){Q=Q||"roo-gen";el=Roo.getDom(el);var id=Q+(++A);return el?(el.id?el.id:(el.id=id)):id;},extend:function(){var io=function(o){for(var m in o){this[m]=o[m];}};return function(sb,sp,Q){if(typeof sp=='object'){Q=sp;
+sp=sb;sb=function(){sp.apply(this,arguments);};}var F=function(){},R,S=sp.prototype;F.prototype=S;R=sb.prototype=new F();R.constructor=sb;sb.superclass=S;if(S.constructor==Object.prototype.constructor){S.constructor=sp;}sb.override=function(o){Roo.override(sb,o);
+};R.override=io;Roo.override(sb,Q);return sb;};}(),override:function(Q,R){if(R){var p=Q.prototype;for(var S in R){p[S]=R[S];}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i<a.length;++i){d=a[i].split(".");rt=d[0];eval('if (typeof '+rt+' == "undefined"){'+rt+' = {};} o = '+rt+';');
+for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}},factory:function(c,ns){if(!c.xtype||(!ns&&!c.xns)||(c.xns===false)){return c;}ns=c.xns?c.xns:ns;if(c.constructor==ns[c.xtype]){return c;}if(ns[c.xtype]){if(Roo.debug)Roo.log("Roo.Factory("+c.xtype+")");
+var Q=new ns[c.xtype](c);Q.xns=false;return Q;}c.xns=false;return c;},log:function(s){if((typeof(console)=='undefined')||(typeof(console.log)=='undefined')){return;}console.log(s);},urlEncode:function(o){if(!o){return "";}var Q=[];for(var R in o){var ov=o[R],k=Roo.encodeURIComponent(R);
+var S=typeof ov;if(S=='undefined'){Q.push(k,"=&");}else if(S!="function"&&S!="object"){Q.push(k,"=",Roo.encodeURIComponent(ov),"&");}else if(ov instanceof Array){if(ov.length){for(var i=0,T=ov.length;i<T;i++){Q.push(k,"=",Roo.encodeURIComponent(ov[i]===undefined?'':ov[i]),"&");
+}}else{Q.push(k,"=&");}}}Q.pop();return Q.join("");},encodeURIComponent:function(Q){try{return encodeURIComponent(Q);}catch(e){}if(Q==''||Q==null){return '';}function nibble_to_hex(T){var U='0123456789ABCDEF';return U.charAt(T);}Q=Q.toString();var R='';for(var i=0;
+i<Q.length;i++){var c=Q.charCodeAt(i);var bs=new Array();if(c>0x10000){bs[0]=0xF0|((c&0x1C0000)>>>18);bs[1]=0x80|((c&0x3F000)>>>12);bs[2]=0x80|((c&0xFC0)>>>6);bs[3]=0x80|(c&0x3F);}else if(c>0x800){bs[0]=0xE0|((c&0xF000)>>>12);bs[1]=0x80|((c&0xFC0)>>>6);bs[2]=0x80|(c&0x3F);
+}else if(c>0x80){bs[0]=0xC0|((c&0x7C0)>>>6);bs[1]=0x80|(c&0x3F);}else{bs[0]=c;}for(var j=0;j<bs.length;j++){var b=bs[j];var S=nibble_to_hex((b&0xF0)>>>4)+nibble_to_hex(b&0x0F);R+='%'+S;}}return R;},urlDecode:function(Q,R){if(!Q||!Q.length){return {};}var S={}
+;var T=Q.split('&');var U,V,W;for(var i=0,X=T.length;i<X;i++){U=T[i].split('=');V=decodeURIComponent(U[0]);W=decodeURIComponent(U[1]);if(R!==true){if(typeof S[V]=="undefined"){S[V]=W;}else if(typeof S[V]=="string"){S[V]=[S[V]];S[V].push(W);}else{S[V].push(W);
+}}else{S[V]=W;}}return S;},each:function(Q,fn,R){if(typeof Q.length=="undefined"||typeof Q=="string"){Q=[Q];}for(var i=0,S=Q.length;i<S;i++){if(fn.call(R||Q[i],Q[i],i,Q)===false){return i;};}},combine:function(){var as=arguments,l=as.length,r=[];for(var i=0;
+i<l;i++){var a=as[i];if(a instanceof Array){r=r.concat(a);}else if(a.length!==undefined&&!a.substr){r=r.concat(Array.prototype.slice.call(a,0));}else{r.push(a);}}return r;},escapeRe:function(s){return s.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1");},callback:function(cb,Q,R,S){if(typeof cb=="function"){if(S){cb.defer(S,Q,R||[]);
+}else{cb.apply(Q,R||[]);}}},getDom:function(el){if(!el){return null;}return el.dom?el.dom:(typeof el=='string'?document.getElementById(el):el);},getCmp:function(id){return Roo.ComponentMgr.get(id);},num:function(v,Q){if(typeof v!='number'){return Q;}return v;
+},destroy:function(){for(var i=0,a=arguments,Q=a.length;i<Q;i++){var as=a[i];if(as){if(as.dom){as.removeAllListeners();as.remove();continue;}if(typeof as.purgeListeners=='function'){as.purgeListeners();}if(typeof as.destroy=='function'){as.destroy();}}}},type:function(o){if(o===undefined||o===null){return false;
+}if(o.htmlElement){return 'element';}var t=typeof o;if(t=='object'&&o.nodeName){switch(o.nodeType){case 1:return 'element';case 3:return (/\S/).test(o.nodeValue)?'textnode':'whitespace';}}if(t=='object'||t=='function'){switch(o.constructor){case Array:return 'array';
+case RegExp:return 'regexp';}if(typeof o.length=='number'&&typeof o.item=='function'){return 'nodelist';}}return t;},isEmpty:function(v,Q){return v===null||v===undefined||(!Q?v==='':false);},isOpera:C,isSafari:D,isFirefox:E,isIE:F,isIE7:G,isIE11:H,isGecko:I,isBorderBox:J,isWindows:K,isLinux:M,isMac:L,isIOS:O,isTouch:P,useShims:((F&&!G)||(I&&L)),selectNode:function(Q,R){var S=Roo.DomQuery.selectNode(Q,R);
 return S?Roo.get(S):new Roo.Element(false);}});})();Roo.namespace("Roo","Roo.util","Roo.grid","Roo.dd","Roo.tree","Roo.data","Roo.form","Roo.menu","Roo.state","Roo.lib","Roo.layout","Roo.app","Roo.ux","Roo.bootstrap","Roo.bootstrap.dash");
 // Function.js
 (function(){if(Roo.isIE){function fnCleanUp(){var p=Function.prototype;delete p.createSequence;delete p.defer;delete p.createDelegate;delete p.createCallback;delete p.createInterceptor;window.detachEvent("onunload",fnCleanUp);}window.attachEvent("onunload",fnCleanUp);
@@ -45,15 +45,15 @@ case "i":return "String.leftPad(this.getMinutes(), 2, '0') + ";case "s":return "
 default:return "'"+String.escape(A)+"' + ";}};Date.parseDate=function(A,B){if(Date.parseFunctions[B]==null){Date.createParser(B);}var C=Date.parseFunctions[B];return Date[C](A);};Date.createParser=function(A){var B="parse"+Date.parseFunctions.count++;var C=Date.parseRegexes.length;
 var D=1;Date.parseFunctions[A]=B;var E="Date."+B+" = function(input){\n"+"var y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, o, z, v;\n"+"var d = new Date();\n"+"y = d.getFullYear();\n"+"m = d.getMonth();\n"+"d = d.getDate();\n"+"if (typeof(input) !== 'string') { input = input.toString(); }\n"+"var results = input.match(Date.parseRegexes["+C+"]);\n"+"if (results && results.length > 0) {";
 var F="";var G=false;var ch='';for(var i=0;i<A.length;++i){ch=A.charAt(i);if(!G&&ch=="\\"){G=true;}else if(G){G=false;F+=String.escape(ch);}else{var H=Date.formatCodeToRegex(ch,D);D+=H.g;F+=H.s;if(H.g&&H.c){E+=H.c;}}}E+="if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n"+"{v = new Date(y, m, d, h, i, s);}\n"+"else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n"+"{v = new Date(y, m, d, h, i);}\n"+"else if (y >= 0 && m >= 0 && d > 0 && h >= 0)\n"+"{v = new Date(y, m, d, h);}\n"+"else if (y >= 0 && m >= 0 && d > 0)\n"+"{v = new Date(y, m, d);}\n"+"else if (y >= 0 && m >= 0)\n"+"{v = new Date(y, m);}\n"+"else if (y >= 0)\n"+"{v = new Date(y);}\n"+"}return (v && (z || o))?\n"+"    ((z)? v.add(Date.SECOND, (v.getTimezoneOffset() * 60) + (z*1)) :\n"+"        v.add(Date.HOUR, (v.getGMTOffset() / 100) + (o / -100))) : v\n"+";}";
-Date.parseRegexes[C]=new RegExp("^"+F+"$");eval(E);};Date.formatCodeToRegex=function(A,B){switch(A){case "D":return {g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case "j":return {g:1,c:"d = parseInt(results["+B+"], 10);\n",s:"(\\d{1,2})"};case "d":return {g:1,c:"d = parseInt(results["+B+"], 10);\n",s:"(\\d{2})"};
-case "l":return {g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case "S":return {g:0,c:null,s:"(?:st|nd|rd|th)"};case "w":return {g:0,c:null,s:"\\d"};case "z":return {g:0,c:null,s:"(?:\\d{1,3})"};case "W":return {g:0,c:null,s:"(?:\\d{2})"};case "F":return {g:1,c:"m = parseInt(Date.monthNumbers[results["+B+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};
-case "M":return {g:1,c:"m = parseInt(Date.monthNumbers[results["+B+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case "n":return {g:1,c:"m = parseInt(results["+B+"], 10) - 1;\n",s:"(\\d{1,2})"};case "m":return {g:1,c:"m = parseInt(results["+B+"], 10) - 1;\n",s:"(\\d{2})"};
-case "t":return {g:0,c:null,s:"\\d{1,2}"};case "L":return {g:0,c:null,s:"(?:1|0)"};case "Y":return {g:1,c:"y = parseInt(results["+B+"], 10);\n",s:"(\\d{4})"};case "y":return {g:1,c:"var ty = parseInt(results["+B+"], 10);\n"+"y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};
-case "a":return {g:1,c:"if (results["+B+"] == 'am') {\n"+"if (h == 12) { h = 0; }\n"+"} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case "A":return {g:1,c:"if (results["+B+"] == 'AM') {\n"+"if (h == 12) { h = 0; }\n"+"} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};
-case "g":case "G":return {g:1,c:"h = parseInt(results["+B+"], 10);\n",s:"(\\d{1,2})"};case "h":case "H":return {g:1,c:"h = parseInt(results["+B+"], 10);\n",s:"(\\d{2})"};case "i":return {g:1,c:"i = parseInt(results["+B+"], 10);\n",s:"(\\d{2})"};case "s":return {g:1,c:"s = parseInt(results["+B+"], 10);\n",s:"(\\d{2})"};
-case "O":return {g:1,c:["o = results[",B,"];\n","var sn = o.substring(0,1);\n","var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);\n","var mn = o.substring(3,5) % 60;\n","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n","    (sn + String.leftPad(hr, 2, 0) + String.leftPad(mn, 2, 0)) : null;\n"].join(""),s:"([+\-]\\d{2,4})"};
-case "P":return {g:1,c:["o = results[",B,"];\n","var sn = o.substring(0,1);\n","var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);\n","var mn = o.substring(4,6) % 60;\n","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n","    (sn + String.leftPad(hr, 2, 0) + String.leftPad(mn, 2, 0)) : null;\n"].join(""),s:"([+\-]\\d{4})"};
-case "T":return {g:0,c:null,s:"[A-Z]{1,4}"};case "Z":return {g:1,c:"z = results["+B+"];\n"+"z = (-43200 <= z*1 && z*1 <= 50400)? z : null;\n",s:"([+\-]?\\d{1,5})"};default:return {g:0,c:null,s:String.escape(A)};}};Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{1,4})[\-+][0-9]{4} .*$/,"$1");
+Date.parseRegexes[C]=new RegExp("^"+F+"$");eval(E);};Date.formatCodeToRegex=function(A,B){switch(A){case "D":return {g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case "j":return {g:1,c:"d = parseInt(results["+B+"], 10);\n",s:"(\\d{1,2})"};case "d":return {g:1,c:"d = parseInt(results["+B+"], 10);\n",s:"(\\d{2})"}
+;case "l":return {g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case "S":return {g:0,c:null,s:"(?:st|nd|rd|th)"};case "w":return {g:0,c:null,s:"\\d"};case "z":return {g:0,c:null,s:"(?:\\d{1,3})"};case "W":return {g:0,c:null,s:"(?:\\d{2})"};case "F":return {g:1,c:"m = parseInt(Date.monthNumbers[results["+B+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"}
+;case "M":return {g:1,c:"m = parseInt(Date.monthNumbers[results["+B+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case "n":return {g:1,c:"m = parseInt(results["+B+"], 10) - 1;\n",s:"(\\d{1,2})"};case "m":return {g:1,c:"m = parseInt(results["+B+"], 10) - 1;\n",s:"(\\d{2})"}
+;case "t":return {g:0,c:null,s:"\\d{1,2}"};case "L":return {g:0,c:null,s:"(?:1|0)"};case "Y":return {g:1,c:"y = parseInt(results["+B+"], 10);\n",s:"(\\d{4})"};case "y":return {g:1,c:"var ty = parseInt(results["+B+"], 10);\n"+"y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"}
+;case "a":return {g:1,c:"if (results["+B+"] == 'am') {\n"+"if (h == 12) { h = 0; }\n"+"} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case "A":return {g:1,c:"if (results["+B+"] == 'AM') {\n"+"if (h == 12) { h = 0; }\n"+"} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"}
+;case "g":case "G":return {g:1,c:"h = parseInt(results["+B+"], 10);\n",s:"(\\d{1,2})"};case "h":case "H":return {g:1,c:"h = parseInt(results["+B+"], 10);\n",s:"(\\d{2})"};case "i":return {g:1,c:"i = parseInt(results["+B+"], 10);\n",s:"(\\d{2})"};case "s":return {g:1,c:"s = parseInt(results["+B+"], 10);\n",s:"(\\d{2})"}
+;case "O":return {g:1,c:["o = results[",B,"];\n","var sn = o.substring(0,1);\n","var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);\n","var mn = o.substring(3,5) % 60;\n","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n","    (sn + String.leftPad(hr, 2, 0) + String.leftPad(mn, 2, 0)) : null;\n"].join(""),s:"([+\-]\\d{2,4})"}
+;case "P":return {g:1,c:["o = results[",B,"];\n","var sn = o.substring(0,1);\n","var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);\n","var mn = o.substring(4,6) % 60;\n","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n","    (sn + String.leftPad(hr, 2, 0) + String.leftPad(mn, 2, 0)) : null;\n"].join(""),s:"([+\-]\\d{4})"}
+;case "T":return {g:0,c:null,s:"[A-Z]{1,4}"};case "Z":return {g:1,c:"z = results["+B+"];\n"+"z = (-43200 <= z*1 && z*1 <= 50400)? z : null;\n",s:"([+\-]?\\d{1,5})"};default:return {g:0,c:null,s:String.escape(A)};}};Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{1,4})[\-+][0-9]{4} .*$/,"$1");
 };Date.prototype.getGMTOffset=function(){return (this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset()/60)),2,"0")+String.leftPad(this.getTimezoneOffset()%60,2,"0");};Date.prototype.getGMTColonOffset=function(){return (this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset()/60)),2,"0")+":"+String.leftPad(this.getTimezoneOffset()%60,2,"0");
 };Date.prototype.getDayOfYear=function(){var A=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var i=0;i<this.getMonth();++i){A+=Date.daysInMonth[i];}return A+this.getDate()-1;};Date.prototype.getWeekOfYear=function(){var A=this.getDayOfYear()+(4-this.getDay());
 var B=new Date(this.getFullYear(),0,1);var C=(7-B.getDay()+4);return String.leftPad(((A-C)/7)+1,2,"0");};Date.prototype.isLeapYear=function(){var A=this.getFullYear();return ((A&3)==0&&(A%100||(A%400==0&&A)));};Date.prototype.getFirstDayOfMonth=function(){var A=(this.getDay()-(this.getDate()-1))%7;
@@ -79,8 +79,8 @@ y-=p.scrollTop;}p=p.parentNode;}return [x,y];},setXY:function(el,xy){el=Roo.fly(
 },setY:function(el,y){this.setXY(el,[false,y]);}};
 // Roo/lib/Event.js
 Roo.lib.Event=function(){var A=false;var B=[];var C=[];var D=0;var E=[];var F=0;var G=null;return {POLL_RETRYS:200,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,_interval:null,startInterval:function(){if(!this._interval){var H=this;var I=function(){H._tryPreloadAttach();
-};this._interval=setInterval(I,this.POLL_INTERVAL);}},onAvailable:function(H,I,J,K){E.push({id:H,fn:I,obj:J,override:K,checkReady:false});D=this.POLL_RETRYS;this.startInterval();},addListener:function(el,H,fn){el=Roo.getDom(el);if(!el||!fn){return false;}if("unload"==H){C[C.length]=[el,H,fn];
-return true;}var I=function(e){return fn(Roo.lib.Event.getEvent(e));};var li=[el,H,fn,I];var J=B.length;B[J]=li;this.doAdd(el,H,I,false);return true;},removeListener:function(el,H,fn){var i,I;el=Roo.getDom(el);if(!fn){return this.purgeElement(el,false,H);
+};this._interval=setInterval(I,this.POLL_INTERVAL);}},onAvailable:function(H,I,J,K){E.push({id:H,fn:I,obj:J,override:K,checkReady:false});D=this.POLL_RETRYS;this.startInterval();},addListener:function(el,H,fn){el=Roo.getDom(el);if(!el||!fn){return false;}
+if("unload"==H){C[C.length]=[el,H,fn];return true;}var I=function(e){return fn(Roo.lib.Event.getEvent(e));};var li=[el,H,fn,I];var J=B.length;B[J]=li;this.doAdd(el,H,I,false);return true;},removeListener:function(el,H,fn){var i,I;el=Roo.getDom(el);if(!fn){return this.purgeElement(el,false,H);
 }if("unload"==H){for(i=0,I=C.length;i<I;i++){var li=C[i];if(li&&li[0]==el&&li[1]==H&&li[2]==fn){C.splice(i,1);return true;}}return false;}var J=null;var K=arguments[3];if("undefined"==typeof K){K=this._getCacheIndex(el,H,fn);}if(K>=0){J=B[K];}if(!el||!J){return false;
 }this.doRemove(el,H,J[this.WFN],false);delete B[K][this.WFN];delete B[K][this.FN];B.splice(K,1);return true;},getTarget:function(ev,H){ev=ev.browserEvent||ev;ev=ev.touches?(ev.touches[0]||ev.changedTouches[0]||ev):ev;var t=ev.target||ev.srcElement;return this.resolveTextNode(t);
 },resolveTextNode:function(H){if(Roo.isSafari&&H&&3==H.nodeType){return H.parentNode;}else{return H;}},getPageX:function(ev){ev=ev.browserEvent||ev;ev=ev.touches?(ev.touches[0]||ev.changedTouches[0]||ev):ev;var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(Roo.isIE){x+=this.getScroll()[1];
@@ -93,27 +93,27 @@ i<I;++i){var li=B[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==H){
 }},_tryPreloadAttach:function(){if(this.locked){return false;}this.locked=true;var H=!A;if(!H){H=(D>0);}var I=[];for(var i=0,J=E.length;i<J;++i){var K=E[i];if(K){var el=this.getEl(K.id);if(el){if(!K.checkReady||A||el.nextSibling||(document&&document.body)){var L=el;
 if(K.override){if(K.override===true){L=K.obj;}else{L=K.override;}}K.fn.call(L,K.obj);E[i]=null;}}else{I.push(K);}}}D=(I.length===0)?0:D-1;if(H){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return true;},purgeElement:function(el,H,I){var J=this.getListeners(el,I);
 if(J){for(var i=0,K=J.length;i<K;++i){var l=J[i];this.removeListener(el,l.type,l.fn);}}if(H&&el&&el.childNodes){for(i=0,K=el.childNodes.length;i<K;++i){this.purgeElement(el.childNodes[i],H,I);}}},getListeners:function(el,H){var I=[],J;if(!H){J=[B,C];}else if(H=="unload"){J=[C];
-}else{J=[B];}for(var j=0;j<J.length;++j){var K=J[j];if(K&&K.length>0){for(var i=0,L=K.length;i<L;++i){var l=K[i];if(l&&l[this.EL]===el&&(!H||H===l[this.TYPE])){I.push({type:l[this.TYPE],fn:l[this.FN],obj:l[this.OBJ],adjust:l[this.ADJ_SCOPE],index:i});}}}}return (I.length)?I:null;
-},_unload:function(e){var EU=Roo.lib.Event,i,j,l,H,I;for(i=0,H=C.length;i<H;++i){l=C[i];if(l){var J=window;if(l[EU.ADJ_SCOPE]){if(l[EU.ADJ_SCOPE]===true){J=l[EU.OBJ];}else{J=l[EU.ADJ_SCOPE];}}l[EU.FN].call(J,EU.getEvent(e),l[EU.OBJ]);C[i]=null;l=null;J=null;
-}}C=null;if(B&&B.length>0){j=B.length;while(j){I=j-1;l=B[I];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],I);}j=j-1;}l=null;EU.clearCache();}EU.doRemove(window,"unload",EU._unload);},getScroll:function(){var dd=document.documentElement,db=document.body;
+}else{J=[B];}for(var j=0;j<J.length;++j){var K=J[j];if(K&&K.length>0){for(var i=0,L=K.length;i<L;++i){var l=K[i];if(l&&l[this.EL]===el&&(!H||H===l[this.TYPE])){I.push({type:l[this.TYPE],fn:l[this.FN],obj:l[this.OBJ],adjust:l[this.ADJ_SCOPE],index:i});}}}}
+return (I.length)?I:null;},_unload:function(e){var EU=Roo.lib.Event,i,j,l,H,I;for(i=0,H=C.length;i<H;++i){l=C[i];if(l){var J=window;if(l[EU.ADJ_SCOPE]){if(l[EU.ADJ_SCOPE]===true){J=l[EU.OBJ];}else{J=l[EU.ADJ_SCOPE];}}l[EU.FN].call(J,EU.getEvent(e),l[EU.OBJ]);
+C[i]=null;l=null;J=null;}}C=null;if(B&&B.length>0){j=B.length;while(j){I=j-1;l=B[I];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],I);}j=j-1;}l=null;EU.clearCache();}EU.doRemove(window,"unload",EU._unload);},getScroll:function(){var dd=document.documentElement,db=document.body;
 if(dd&&(dd.scrollTop||dd.scrollLeft)){return [dd.scrollTop,dd.scrollLeft];}else if(db){return [db.scrollTop,db.scrollLeft];}else{return [0,0];}},doAdd:function(){if(window.addEventListener){return function(el,H,fn,I){el.addEventListener(H,fn,(I));};}else if(window.attachEvent){return function(el,H,fn,I){el.attachEvent("on"+H,fn);
-};}else{return function(){};}}(),doRemove:function(){if(window.removeEventListener){return function(el,H,fn,I){el.removeEventListener(H,fn,(I));};}else if(window.detachEvent){return function(el,H,fn){el.detachEvent("on"+H,fn);};}else{return function(){};}}()};
-}();(function(){var E=Roo.lib.Event;E.on=E.addListener;E.un=E.removeListener;if(document&&document.body){E._load();}else{E.doAdd(window,"load",E._load);}E.doAdd(window,"unload",E._unload);E._tryPreloadAttach();})();
+};}else{return function(){};}}(),doRemove:function(){if(window.removeEventListener){return function(el,H,fn,I){el.removeEventListener(H,fn,(I));};}else if(window.detachEvent){return function(el,H,fn){el.detachEvent("on"+H,fn);};}else{return function(){};}
+}()};}();(function(){var E=Roo.lib.Event;E.on=E.addListener;E.un=E.removeListener;if(document&&document.body){E._load();}else{E.doAdd(window,"load",E._load);}E.doAdd(window,"unload",E._unload);E._tryPreloadAttach();})();
 // Roo/lib/Ajax.js
 (function(){Roo.lib.Ajax={request:function(A,B,cb,C,D){if(D){var hs=D.headers;if(hs){for(var h in hs){if(hs.hasOwnProperty(h)){this.initHeader(h,hs[h],false);}}}if(D.xmlData){this.initHeader('Content-Type','text/xml',false);A='POST';C=D.xmlData;}}return this.asyncRequest(A,B,cb,C);
 },serializeForm:function(A){if(typeof A=='string'){A=(document.getElementById(A)||document.forms[A]);}var el,B,C,D,E='',F=false;for(var i=0;i<A.elements.length;i++){el=A.elements[i];D=A.elements[i].disabled;B=A.elements[i].name;C=A.elements[i].value;if(!D&&B){switch(el.type){case 'select-one':case 'select-multiple':for(var j=0;
 j<el.options.length;j++){if(el.options[j].selected){if(Roo.isIE){E+=Roo.encodeURIComponent(B)+'='+Roo.encodeURIComponent(el.options[j].attributes['value'].specified?el.options[j].value:el.options[j].text)+'&';}else{E+=Roo.encodeURIComponent(B)+'='+Roo.encodeURIComponent(el.options[j].hasAttribute('value')?el.options[j].value:el.options[j].text)+'&';
 }}}break;case 'radio':case 'checkbox':if(el.checked){E+=Roo.encodeURIComponent(B)+'='+Roo.encodeURIComponent(C)+'&';}break;case 'file':case undefined:case 'reset':case 'button':break;case 'submit':if(F==false){E+=Roo.encodeURIComponent(B)+'='+Roo.encodeURIComponent(C)+'&';
-F=true;}break;default:E+=Roo.encodeURIComponent(B)+'='+Roo.encodeURIComponent(C)+'&';break;}}}E=E.substr(0,E.length-1);return E;},headers:{},hasHeaders:false,useDefaultHeader:true,defaultPostHeader:'application/x-www-form-urlencoded',useDefaultXhrHeader:true,defaultXhrHeader:'XMLHttpRequest',hasDefaultHeaders:true,defaultHeaders:{},poll:{},timeout:{},pollInterval:50,transactionId:0,setProgId:function(id){this.activeX.unshift(id);
-},setDefaultPostHeader:function(b){this.useDefaultHeader=b;},setDefaultXhrHeader:function(b){this.useDefaultXhrHeader=b;},setPollingInterval:function(i){if(typeof i=='number'&&isFinite(i)){this.pollInterval=i;}},createXhrObject:function(A){var B,C;try{C=new XMLHttpRequest();
-B={conn:C,tId:A};}catch(e){for(var i=0;i<this.activeX.length;++i){try{C=new ActiveXObject(this.activeX[i]);B={conn:C,tId:A};break;}catch(e){}}}finally{return B;}},getConnectionObject:function(){var o;var A=this.transactionId;try{o=this.createXhrObject(A);
-if(o){this.transactionId++;}}catch(e){}finally{return o;}},asyncRequest:function(A,B,C,D){var o=this.getConnectionObject();if(!o){return null;}else{o.conn.open(A,B,true);if(this.useDefaultXhrHeader){if(!this.defaultHeaders['X-Requested-With']){this.initHeader('X-Requested-With',this.defaultXhrHeader,true);
+F=true;}break;default:E+=Roo.encodeURIComponent(B)+'='+Roo.encodeURIComponent(C)+'&';break;}}}E=E.substr(0,E.length-1);return E;},headers:{},hasHeaders:false,useDefaultHeader:true,defaultPostHeader:'application/x-www-form-urlencoded',useDefaultXhrHeader:true,defaultXhrHeader:'XMLHttpRequest',hasDefaultHeaders:true,defaultHeaders:{}
+,poll:{},timeout:{},pollInterval:50,transactionId:0,setProgId:function(id){this.activeX.unshift(id);},setDefaultPostHeader:function(b){this.useDefaultHeader=b;},setDefaultXhrHeader:function(b){this.useDefaultXhrHeader=b;},setPollingInterval:function(i){if(typeof i=='number'&&isFinite(i)){this.pollInterval=i;
+}},createXhrObject:function(A){var B,C;try{C=new XMLHttpRequest();B={conn:C,tId:A};}catch(e){for(var i=0;i<this.activeX.length;++i){try{C=new ActiveXObject(this.activeX[i]);B={conn:C,tId:A};break;}catch(e){}}}finally{return B;}},getConnectionObject:function(){var o;
+var A=this.transactionId;try{o=this.createXhrObject(A);if(o){this.transactionId++;}}catch(e){}finally{return o;}},asyncRequest:function(A,B,C,D){var o=this.getConnectionObject();if(!o){return null;}else{o.conn.open(A,B,true);if(this.useDefaultXhrHeader){if(!this.defaultHeaders['X-Requested-With']){this.initHeader('X-Requested-With',this.defaultXhrHeader,true);
 }}if(D&&this.useDefaultHeader){this.initHeader('Content-Type',this.defaultPostHeader);}if(this.hasDefaultHeaders||this.hasHeaders){this.setHeader(o);}this.handleReadyState(o,C);o.conn.send(D||null);return o;}},handleReadyState:function(o,A){var B=this;if(A&&A.timeout){this.timeout[o.tId]=window.setTimeout(function(){B.abort(o,A,true);
 },A.timeout);}this.poll[o.tId]=window.setInterval(function(){if(o.conn&&o.conn.readyState==4){window.clearInterval(B.poll[o.tId]);delete B.poll[o.tId];if(A&&A.timeout){window.clearTimeout(B.timeout[o.tId]);delete B.timeout[o.tId];}B.handleTransactionResponse(o,A);
 }},this.pollInterval);},handleTransactionResponse:function(o,A,B){if(!A){this.releaseObject(o);return;}var C,D;try{if(o.conn.status!==undefined&&o.conn.status!=0){C=o.conn.status;}else{C=13030;}}catch(e){C=13030;}if(C>=200&&C<300){D=this.createResponseObject(o,A.argument);
 if(A.success){if(!A.scope){A.success(D);}else{A.success.apply(A.scope,[D]);}}}else{switch(C){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:D=this.createExceptionObject(o.tId,A.argument,(B?B:false));if(A.failure){if(!A.scope){A.failure(D);
-}else{A.failure.apply(A.scope,[D]);}}break;default:D=this.createResponseObject(o,A.argument);if(A.failure){if(!A.scope){A.failure(D);}else{A.failure.apply(A.scope,[D]);}}}}this.releaseObject(o);D=null;},createResponseObject:function(o,A){var B={};var C={};
-try{var D=o.conn.getAllResponseHeaders();var E=D.split('\n');for(var i=0;i<E.length;i++){var F=E[i].indexOf(':');if(F!=-1){C[E[i].substring(0,F)]=E[i].substring(F+2);}}}catch(e){}B.tId=o.tId;B.status=o.conn.status;B.statusText=o.conn.statusText;B.getResponseHeader=C;
+}else{A.failure.apply(A.scope,[D]);}}break;default:D=this.createResponseObject(o,A.argument);if(A.failure){if(!A.scope){A.failure(D);}else{A.failure.apply(A.scope,[D]);}}}}this.releaseObject(o);D=null;},createResponseObject:function(o,A){var B={};var C={}
+;try{var D=o.conn.getAllResponseHeaders();var E=D.split('\n');for(var i=0;i<E.length;i++){var F=E[i].indexOf(':');if(F!=-1){C[E[i].substring(0,F)]=E[i].substring(F+2);}}}catch(e){}B.tId=o.tId;B.status=o.conn.status;B.statusText=o.conn.statusText;B.getResponseHeader=C;
 B.getAllResponseHeaders=D;B.responseText=o.conn.responseText;B.responseXML=o.conn.responseXML;if(typeof A!==undefined){B.argument=A;}return B;},createExceptionObject:function(A,B,C){var D=0;var E='communication failure';var F=-1;var G='transaction aborted';
 var H={};H.tId=A;if(C){H.status=F;H.statusText=G;}else{H.status=D;H.statusText=E;}if(B){H.argument=B;}return H;},initHeader:function(A,B,C){var D=(C)?this.defaultHeaders:this.headers;if(D[A]===undefined){D[A]=B;}else{D[A]=B+","+D[A];}if(C){this.hasDefaultHeaders=true;
 }else{this.hasHeaders=true;}},setHeader:function(o){if(this.hasDefaultHeaders){for(var A in this.defaultHeaders){if(this.defaultHeaders.hasOwnProperty(A)){o.conn.setRequestHeader(A,this.defaultHeaders[A]);}}}if(this.hasHeaders){for(var A in this.headers){if(this.headers.hasOwnProperty(A)){o.conn.setRequestHeader(A,this.headers[A]);
@@ -245,17 +245,18 @@ q=q.replace(mm[1],"");}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));re
 if(!A[p]){A[p]=Roo.DomQuery.compile(p);if(!A[p]){throw p+" is not a valid selector";}}var S=A[p](N);if(S&&S!=document){Q=Q.concat(S);}}if(P.length>1){return nodup(Q);}return Q;},selectNode:function(M,N){return Roo.DomQuery.select(M,N)[0];},selectValue:function(M,N,O){M=M.replace(E,"");
 if(!C[M]){C[M]=Roo.DomQuery.compile(M,"select");}var n=C[M](N);n=n[0]?n[0]:n;var v=(n&&n.firstChild?n.firstChild.nodeValue:null);return ((v===null||v===undefined||v==='')?O:v);},selectNumber:function(M,N,O){var v=Roo.DomQuery.selectValue(M,N,O||0);return parseFloat(v);
 },is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el);}var M=(el instanceof Array);var N=Roo.DomQuery.filter(M?el:[el],ss);return M?(N.length==el.length):(N.length>0);},filter:function(M,ss,N){ss=ss.replace(E,"");if(!B[ss]){B[ss]=Roo.DomQuery.compile(ss,"simple");
-}var O=B[ss](M);return N?quickDiff(O,M):O;},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, null, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, null, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v;
-},"!=":function(a,v){return a!=v;},"^=":function(a,v){return a&&a.substr(0,v.length)==v;},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v;},"*=":function(a,v){return a&&a.indexOf(v)!==-1;},"%=":function(a,v){return (a%v)==0;},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+'-');
-},"~=":function(a,v){return a&&(' '+a+' ').indexOf(' '+v+' ')!=-1;}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1);if(!n){r[++ri]=ci;}}return r;},"last-child":function(c){var r=[],ri=-1,n;
-for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1);if(!n){r[++ri]=ci;}}return r;},"nth-child":function(c,a){var r=[],ri=-1;var m=I.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!J.test(a)&&"n+"+a||a);var f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];
-i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j;}}pn._batch=batch;}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n;}}else if((n.nodeIndex+l)%f==0){r[++ri]=n;}}return r;},"only-child":function(c){var r=[],ri=-1;
-;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci;}}return r;},"empty":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var M=ci.childNodes,j=0,cn,N=true;while(cn=M[j]){++j;if(cn.nodeType==1||cn.nodeType==3){N=false;break;}}if(N){r[++ri]=ci;
-}}return r;},"contains":function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||'').indexOf(v)!=-1){r[++ri]=ci;}}return r;},"nodeValue":function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci;
-}}return r;},"checked":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci;}}return r;},"not":function(c,ss){return Roo.DomQuery.filter(c,ss,true);},"odd":function(c){return this["nth-child"](c,"odd");},"even":function(c){return this["nth-child"](c,"even");
-},"nth":function(c,a){return c[a-1]||[];},"first":function(c){return c[0]||[];},"last":function(c){return c[c.length-1]||[];},"has":function(c,ss){var s=Roo.DomQuery.select;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci;}}return r;
-},"next":function(c,ss){var is=Roo.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci;}}return r;},"prev":function(c,ss){var is=Roo.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci;
-}}return r;}}};}();Roo.query=Roo.DomQuery.select;
+}var O=B[ss](M);return N?quickDiff(O,M):O;},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, null, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'}
+,{re:/^#([\w-]+)/,select:'n = byId(n, null, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v;},"!=":function(a,v){return a!=v;},"^=":function(a,v){return a&&a.substr(0,v.length)==v;
+},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v;},"*=":function(a,v){return a&&a.indexOf(v)!==-1;},"%=":function(a,v){return (a%v)==0;},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+'-');},"~=":function(a,v){return a&&(' '+a+' ').indexOf(' '+v+' ')!=-1;
+}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1);if(!n){r[++ri]=ci;}}return r;},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1);
+if(!n){r[++ri]=ci;}}return r;},"nth-child":function(c,a){var r=[],ri=-1;var m=I.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!J.test(a)&&"n+"+a||a);var f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;
+cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j;}}pn._batch=batch;}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n;}}else if((n.nodeIndex+l)%f==0){r[++ri]=n;}}return r;},"only-child":function(c){var r=[],ri=-1;;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci;
+}}return r;},"empty":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var M=ci.childNodes,j=0,cn,N=true;while(cn=M[j]){++j;if(cn.nodeType==1||cn.nodeType==3){N=false;break;}}if(N){r[++ri]=ci;}}return r;},"contains":function(c,v){var r=[],ri=-1;for(var i=0,ci;
+ci=c[i];i++){if((ci.textContent||ci.innerText||'').indexOf(v)!=-1){r[++ri]=ci;}}return r;},"nodeValue":function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci;}}return r;},"checked":function(c){var r=[],ri=-1;
+for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci;}}return r;},"not":function(c,ss){return Roo.DomQuery.filter(c,ss,true);},"odd":function(c){return this["nth-child"](c,"odd");},"even":function(c){return this["nth-child"](c,"even");},"nth":function(c,a){return c[a-1]||[];
+},"first":function(c){return c[0]||[];},"last":function(c){return c[c.length-1]||[];},"has":function(c,ss){var s=Roo.DomQuery.select;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci;}}return r;},"next":function(c,ss){var is=Roo.DomQuery.is;
+var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci;}}return r;},"prev":function(c,ss){var is=Roo.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci;}}return r;}}};}();Roo.query=Roo.DomQuery.select;
+
 // Roo/util/Observable.js
 Roo.util.Observable=function(A){A=A||{};this.addEvents(A.events||{});if(A.events){delete A.events;}Roo.apply(this,A);if(this.listeners){this.on(this.listeners);delete this.listeners;}};Roo.util.Observable.prototype={fireEvent:function(){var ce=this.events[arguments[0].toLowerCase()];
 if(typeof ce=="object"){return ce.fire.apply(ce,Array.prototype.slice.call(arguments,1));}else{return true;}},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(A,fn,B,o){if(typeof A=="object"){o=A;for(var e in o){if(this.filterOptRe.test(e)){continue;
@@ -265,9 +266,9 @@ this.events[A]=ce;}ce.addListener(fn,B,o);},removeListener:function(A,fn,B){var
 }},addEvents:function(o){if(!this.events){this.events={};}Roo.applyIf(this.events,o);},hasListener:function(A){var e=this.events[A];return typeof e=="object"&&e.listeners.length>0;}};Roo.util.Observable.prototype.on=Roo.util.Observable.prototype.addListener;
 Roo.util.Observable.prototype.un=Roo.util.Observable.prototype.removeListener;Roo.util.Observable.capture=function(o,fn,A){o.fireEvent=o.fireEvent.createInterceptor(fn,A);};Roo.util.Observable.releaseCapture=function(o){o.fireEvent=Roo.util.Observable.prototype.fireEvent;
 };(function(){var A=function(h,o,D){var E=new Roo.util.DelayedTask();return function(){E.delay(o.buffer,h,D,Array.prototype.slice.call(arguments,0));};};var B=function(h,e,fn,D){return function(){e.removeListener(fn,D);return h.apply(D,arguments);};};var C=function(h,o,D){return function(){var E=Array.prototype.slice.call(arguments,0);
-setTimeout(function(){h.apply(D,E);},o.delay||10);};};Roo.util.Event=function(D,E){this.name=E;this.obj=D;this.listeners=[];};Roo.util.Event.prototype={addListener:function(fn,D,E){var o=E||{};D=D||this.obj;if(!this.isListening(fn,D)){var l={fn:fn,scope:D,options:o};
-var h=fn;if(o.delay){h=C(h,o,D);}if(o.single){h=B(h,this,fn,D);}if(o.buffer){h=A(h,o,D);}l.fireFn=h;if(!this.firing){this.listeners.push(l);}else{this.listeners=this.listeners.slice(0);this.listeners.push(l);}}},findListener:function(fn,D){D=D||this.obj;var ls=this.listeners;
-for(var i=0,E=ls.length;i<E;i++){var l=ls[i];if(l.fn==fn&&l.scope==D){return i;}}return -1;},isListening:function(fn,D){return this.findListener(fn,D)!=-1;},removeListener:function(fn,D){var E;if((E=this.findListener(fn,D))!=-1){if(!this.firing){this.listeners.splice(E,1);
+setTimeout(function(){h.apply(D,E);},o.delay||10);};};Roo.util.Event=function(D,E){this.name=E;this.obj=D;this.listeners=[];};Roo.util.Event.prototype={addListener:function(fn,D,E){var o=E||{};D=D||this.obj;if(!this.isListening(fn,D)){var l={fn:fn,scope:D,options:o}
+;var h=fn;if(o.delay){h=C(h,o,D);}if(o.single){h=B(h,this,fn,D);}if(o.buffer){h=A(h,o,D);}l.fireFn=h;if(!this.firing){this.listeners.push(l);}else{this.listeners=this.listeners.slice(0);this.listeners.push(l);}}},findListener:function(fn,D){D=D||this.obj;
+var ls=this.listeners;for(var i=0,E=ls.length;i<E;i++){var l=ls[i];if(l.fn==fn&&l.scope==D){return i;}}return -1;},isListening:function(fn,D){return this.findListener(fn,D)!=-1;},removeListener:function(fn,D){var E;if((E=this.findListener(fn,D))!=-1){if(!this.firing){this.listeners.splice(E,1);
 }else{this.listeners=this.listeners.slice(0);this.listeners.splice(E,1);}return true;}return false;},clearListeners:function(){this.listeners=[];},fire:function(){var ls=this.listeners,D,E=ls.length;if(E>0){this.firing=true;var F=Array.prototype.slice.call(arguments,0);
 for(var i=0;i<E;i++){var l=ls[i];if(l.fireFn.apply(l.scope||this.obj||window,arguments)===false){this.firing=false;return false;}}this.firing=false;}return true;}};})();
 // Roo/EventManager.js
@@ -287,13 +288,13 @@ A.fire();A.clearListeners();return;}if(!A){K();}A.addListener(fn,T,U);},onWindow
 }else{F.fire(D.getViewWidth(),D.getViewHeight());}});}F.addListener(fn,T,U);},onTextResize:function(fn,T,U){if(!H){H=new Roo.util.Event();var V=new Roo.Element(document.createElement('div'));V.dom.className='x-text-resize';V.dom.innerHTML='X';V.appendTo(document.body);
 I=V.dom.offsetHeight;setInterval(function(){if(V.dom.offsetHeight!=I){H.fire(I,I=V.dom.offsetHeight);}},this.textResizeInterval);}H.addListener(fn,T,U);},removeResizeListener:function(fn,T){if(F){F.removeListener(fn,T);}},fireResize:function(){if(F){F.fire(D.getViewWidth(),D.getViewHeight());
 }},ieDeferSrc:false,textResizeInterval:50};S.on=S.addListener;S.un=S.removeListener;S.stoppedMouseDownEvent=new Roo.util.Event();return S;}();Roo.onReady=Roo.EventManager.onDocumentReady;Roo.onReady(function(){var bd=Roo.get(document.body);if(!bd){return;
-}var A=[Roo.isIE?"roo-ie":Roo.isGecko?"roo-gecko":Roo.isOpera?"roo-opera":Roo.isSafari?"roo-safari":""];if(Roo.isMac){A.push("roo-mac");}if(Roo.isLinux){A.push("roo-linux");}if(Roo.isIOS){A.push("roo-ios");}if(Roo.isBorderBox){A.push('roo-border-box');}if(Roo.isStrict){var p=bd.dom.parentNode;
-if(p){p.className+=' roo-strict';}}bd.addClass(A.join(' '));});Roo.EventObject=function(){var E=Roo.lib.Event;var A={63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35};var B=Roo.isIE?{1:0,4:1,2:2}:(Roo.isSafari?{1:0,2:1,3:2}:{0:0,1:1,2:2});
-Roo.EventObjectImpl=function(e){if(e){this.setEvent(e.browserEvent||e);}};Roo.EventObjectImpl.prototype={browserEvent:null,button:-1,shiftKey:false,ctrlKey:false,altKey:false,BACKSPACE:8,TAB:9,RETURN:13,ENTER:13,SHIFT:16,CONTROL:17,ESC:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,F5:116,setEvent:function(e){if(e==this||(e&&e.browserEvent)){return e;
+}var A=[Roo.isIE?"roo-ie":Roo.isGecko?"roo-gecko":Roo.isOpera?"roo-opera":Roo.isSafari?"roo-safari":""];if(Roo.isMac){A.push("roo-mac");}if(Roo.isLinux){A.push("roo-linux");}if(Roo.isIOS){A.push("roo-ios");}if(Roo.isTouch){A.push("roo-touch");}if(Roo.isBorderBox){A.push('roo-border-box');
+}if(Roo.isStrict){var p=bd.dom.parentNode;if(p){p.className+=' roo-strict';}}bd.addClass(A.join(' '));});Roo.EventObject=function(){var E=Roo.lib.Event;var A={63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35};var B=Roo.isIE?{1:0,4:1,2:2}
+:(Roo.isSafari?{1:0,2:1,3:2}:{0:0,1:1,2:2});Roo.EventObjectImpl=function(e){if(e){this.setEvent(e.browserEvent||e);}};Roo.EventObjectImpl.prototype={browserEvent:null,button:-1,shiftKey:false,ctrlKey:false,altKey:false,BACKSPACE:8,TAB:9,RETURN:13,ENTER:13,SHIFT:16,CONTROL:17,ESC:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,F5:116,setEvent:function(e){if(e==this||(e&&e.browserEvent)){return e;
 }this.browserEvent=e;if(e){this.button=e.button?B[e.button]:(e.which?e.which-1:-1);if(e.type=='click'&&this.button==-1){this.button=0;}this.type=e.type;this.shiftKey=e.shiftKey;this.ctrlKey=e.ctrlKey||e.metaKey;this.altKey=e.altKey;this.keyCode=e.keyCode;
 this.charCode=(e.type=='keyup'||e.type=='keydown')?0:e.charCode;this.target=E.getTarget(e);this.xy=E.getXY(e);}else{this.button=-1;this.shiftKey=false;this.ctrlKey=false;this.altKey=false;this.keyCode=0;this.charCode=0;this.target=null;this.xy=[0,0];}return this;
-},stopEvent:function(){if(this.browserEvent){if(this.browserEvent.type=='mousedown'){Roo.EventManager.stoppedMouseDownEvent.fire(this);}E.stopEvent(this.browserEvent);}},preventDefault:function(){if(this.browserEvent){E.preventDefault(this.browserEvent);}},isNavKeyPress:function(){var k=this.keyCode;
-k=Roo.isSafari?(A[k]||k):k;return (k>=33&&k<=40)||k==this.RETURN||k==this.TAB||k==this.ESC;},isSpecialKey:function(){var k=this.keyCode;return (this.type=='keypress'&&this.ctrlKey)||k==9||k==13||k==40||k==27||(k==16)||(k==17)||(k>=18&&k<=20)||(k>=33&&k<=35)||(k>=36&&k<=39)||(k>=44&&k<=45);
+},stopEvent:function(){if(this.browserEvent){if(this.browserEvent.type=='mousedown'){Roo.EventManager.stoppedMouseDownEvent.fire(this);}E.stopEvent(this.browserEvent);}},preventDefault:function(){if(this.browserEvent){E.preventDefault(this.browserEvent);}
+},isNavKeyPress:function(){var k=this.keyCode;k=Roo.isSafari?(A[k]||k):k;return (k>=33&&k<=40)||k==this.RETURN||k==this.TAB||k==this.ESC;},isSpecialKey:function(){var k=this.keyCode;return (this.type=='keypress'&&this.ctrlKey)||k==9||k==13||k==40||k==27||(k==16)||(k==17)||(k>=18&&k<=20)||(k>=33&&k<=35)||(k>=36&&k<=39)||(k>=44&&k<=45);
 },stopPropagation:function(){if(this.browserEvent){if(this.type=='mousedown'){Roo.EventManager.stoppedMouseDownEvent.fire(this);}E.stopPropagation(this.browserEvent);}},getCharCode:function(){return this.charCode||this.keyCode;},getKey:function(){var k=this.keyCode||this.charCode;
 return Roo.isSafari?(A[k]||k):k;},getPageX:function(){return this.xy[0];},getPageY:function(){return this.xy[1];},getTime:function(){if(this.browserEvent){return E.getTime(this.browserEvent);}return null;},getXY:function(){return this.xy;},getTarget:function(C,D,F){return C?Roo.fly(this.target).findParent(C,D,F):this.target;
 },getRelatedTarget:function(){if(this.browserEvent){return E.getRelatedTarget(this.browserEvent);}return null;},getWheelDelta:function(){var e=this.browserEvent;var C=0;if(e.wheelDelta){C=e.wheelDelta/120;}else if(e.detail){C=-e.detail/3;}return C;},hasModifier:function(){return !!((this.ctrlKey||this.altKey)||this.shiftKey);
@@ -330,52 +331,52 @@ return this;},setRight:function(J){this.setStyle("right",this.addUnits(J));retur
 }return this;},setLocation:function(x,y,J){this.setXY([x,y],this.preanim(arguments,2));return this;},moveTo:function(x,y,J){this.setXY([x,y],this.preanim(arguments,2));return this;},getRegion:function(){return D.getRegion(this.dom);},getHeight:function(J){var h=this.dom.offsetHeight||0;
 return J!==true?h:h-this.getBorderWidth("tb")-this.getPadding("tb");},getWidth:function(J){var w=this.dom.offsetWidth||0;return J!==true?w:w-this.getBorderWidth("lr")-this.getPadding("lr");},getComputedHeight:function(){var h=Math.max(this.dom.offsetHeight,this.dom.clientHeight);
 if(!h){h=parseInt(this.getStyle('height'),10)||0;if(!this.isBorderBox()){h+=this.getFrameWidth('tb');}}return h;},getComputedWidth:function(){var w=Math.max(this.dom.offsetWidth,this.dom.clientWidth);if(!w){w=parseInt(this.getStyle('width'),10)||0;if(!this.isBorderBox()){w+=this.getFrameWidth('lr');
-}}return w;},getSize:function(J){return {width:this.getWidth(J),height:this.getHeight(J)};},getViewSize:function(){var d=this.dom,J=document,aw=0,ah=0;if(d==J||d==J.body){return {width:D.getViewWidth(),height:D.getViewHeight()};}else{return {width:d.clientWidth,height:d.clientHeight};
-}},getValue:function(J){return J?parseInt(this.dom.value,10):this.dom.value;},adjustWidth:function(J){if(typeof J=="number"){if(this.autoBoxAdjust&&!this.isBorderBox()){J-=(this.getBorderWidth("lr")+this.getPadding("lr"));}if(J<0){J=0;}}return J;},adjustHeight:function(J){if(typeof J=="number"){if(this.autoBoxAdjust&&!this.isBorderBox()){J-=(this.getBorderWidth("tb")+this.getPadding("tb"));
+}}return w;},getSize:function(J){return {width:this.getWidth(J),height:this.getHeight(J)};},getViewSize:function(){var d=this.dom,J=document,aw=0,ah=0;if(d==J||d==J.body){return {width:D.getViewWidth(),height:D.getViewHeight()};}else{return {width:d.clientWidth,height:d.clientHeight}
+;}},getValue:function(J){return J?parseInt(this.dom.value,10):this.dom.value;},adjustWidth:function(J){if(typeof J=="number"){if(this.autoBoxAdjust&&!this.isBorderBox()){J-=(this.getBorderWidth("lr")+this.getPadding("lr"));}if(J<0){J=0;}}return J;},adjustHeight:function(J){if(typeof J=="number"){if(this.autoBoxAdjust&&!this.isBorderBox()){J-=(this.getBorderWidth("tb")+this.getPadding("tb"));
 }if(J<0){J=0;}}return J;},setWidth:function(J,K){J=this.adjustWidth(J);if(!K||!A){this.dom.style.width=this.addUnits(J);}else{this.anim({width:{to:J}},this.preanim(arguments,1));}return this;},setHeight:function(J,K){J=this.adjustHeight(J);if(!K||!A){this.dom.style.height=this.addUnits(J);
 }else{this.anim({height:{to:J}},this.preanim(arguments,1));}return this;},setSize:function(J,K,L){if(typeof J=="object"){K=J.height;J=J.width;}J=this.adjustWidth(J);K=this.adjustHeight(K);if(!L||!A){this.dom.style.width=this.addUnits(J);this.dom.style.height=this.addUnits(K);
-}else{this.anim({width:{to:J},height:{to:K}},this.preanim(arguments,2));}return this;},setBounds:function(x,y,J,K,L){if(!L||!A){this.setSize(J,K);this.setLocation(x,y);}else{J=this.adjustWidth(J);K=this.adjustHeight(K);this.anim({points:{to:[x,y]},width:{to:J},height:{to:K}},this.preanim(arguments,4),'motion');
-}return this;},setRegion:function(J,K){this.setBounds(J.left,J.top,J.right-J.left,J.bottom-J.top,this.preanim(arguments,1));return this;},addListener:function(J,fn,K,L){if(this.dom){Roo.EventManager.on(this.dom,J,fn,K||this,L);}},removeListener:function(J,fn){Roo.EventManager.removeListener(this.dom,J,fn);
-return this;},removeAllListeners:function(){E.purgeElement(this.dom);return this;},relayEvent:function(J,K){this.on(J,function(e){K.fireEvent(J,e);});},setOpacity:function(J,K){if(!K||!A){var s=this.dom.style;if(Roo.isIE){s.zoom=1;s.filter=(s.filter||'').replace(/alpha\([^\)]*\)/gi,"")+(J==1?"":"alpha(opacity="+J*100+")");
-}else{s.opacity=J;}}else{this.anim({opacity:{to:J}},this.preanim(arguments,1),null,.35,'easeIn');}return this;},getLeft:function(J){if(!J){return this.getX();}else{return parseInt(this.getStyle("left"),10)||0;}},getRight:function(J){if(!J){return this.getX()+this.getWidth();
-}else{return (this.getLeft(true)+this.getWidth())||0;}},getTop:function(J){if(!J){return this.getY();}else{return parseInt(this.getStyle("top"),10)||0;}},getBottom:function(J){if(!J){return this.getY()+this.getHeight();}else{return (this.getTop(true)+this.getHeight())||0;
-}},position:function(J,K,x,y){if(!J){if(this.getStyle('position')=='static'){this.setStyle('position','relative');}}else{this.setStyle("position",J);}if(K){this.setStyle("z-index",K);}if(x!==undefined&&y!==undefined){this.setXY([x,y]);}else if(x!==undefined){this.setX(x);
-}else if(y!==undefined){this.setY(y);}},clearPositioning:function(J){J=J||'';this.setStyle({"left":J,"right":J,"top":J,"bottom":J,"z-index":"","position":"static"});return this;},getPositioning:function(){var l=this.getStyle("left");var t=this.getStyle("top");
-return {"position":this.getStyle("position"),"left":l,"right":l?"":this.getStyle("right"),"top":t,"bottom":t?"":this.getStyle("bottom"),"z-index":this.getStyle("z-index")};},getBorderWidth:function(J){return this.addStyles(J,El.borders);},getPadding:function(J){return this.addStyles(J,El.paddings);
-},setPositioning:function(pc){this.applyStyles(pc);if(pc.right=="auto"){this.dom.style.right="";}if(pc.bottom=="auto"){this.dom.style.bottom="";}return this;},fixDisplay:function(){if(this.getStyle("display")=="none"){this.setStyle("visibility","hidden");
-this.setStyle("display",this.originalDisplay);if(this.getStyle("display")=="none"){this.setStyle("display","block");}}},setLeftTop:function(J,K){this.dom.style.left=this.addUnits(J);this.dom.style.top=this.addUnits(K);return this;},move:function(J,K,L){var xy=this.getXY();
-J=J.toLowerCase();switch(J){case "l":case "left":this.moveTo(xy[0]-K,xy[1],this.preanim(arguments,2));break;case "r":case "right":this.moveTo(xy[0]+K,xy[1],this.preanim(arguments,2));break;case "t":case "top":case "up":this.moveTo(xy[0],xy[1]-K,this.preanim(arguments,2));
-break;case "b":case "bottom":case "down":this.moveTo(xy[0],xy[1]+K,this.preanim(arguments,2));break;}return this;},clip:function(){if(!this.isClipped){this.isClipped=true;this.originalClip={"o":this.getStyle("overflow"),"x":this.getStyle("overflow-x"),"y":this.getStyle("overflow-y")};
-this.setStyle("overflow","hidden");this.setStyle("overflow-x","hidden");this.setStyle("overflow-y","hidden");}return this;},unclip:function(){if(this.isClipped){this.isClipped=false;var o=this.originalClip;if(o.o){this.setStyle("overflow",o.o);}if(o.x){this.setStyle("overflow-x",o.x);
-}if(o.y){this.setStyle("overflow-y",o.y);}}return this;},getAnchorXY:function(J,K,s){var w,h,vp=false;if(!s){var d=this.dom;if(d==document.body||d==document){vp=true;w=D.getViewWidth();h=D.getViewHeight();}else{w=this.getWidth();h=this.getHeight();}}else{w=s.width;
-h=s.height;}var x=0,y=0,r=Math.round;switch((J||"tl").toLowerCase()){case "c":x=r(w*.5);y=r(h*.5);break;case "t":x=r(w*.5);y=0;break;case "l":x=0;y=r(h*.5);break;case "r":x=w;y=r(h*.5);break;case "b":x=r(w*.5);y=h;break;case "tl":x=0;y=0;break;case "bl":x=0;
-y=h;break;case "br":x=w;y=h;break;case "tr":x=w;y=0;break;}if(K===true){return [x,y];}if(vp){var sc=this.getScroll();return [x+sc.left,y+sc.top];}var o=this.getXY();return [x+o[0],y+o[1]];},getAlignToXY:function(el,p,o){el=Roo.get(el);var d=this.dom;if(!el.dom){throw "Element.alignTo with an element that doesn't exist";
-}var c=false;var p1="",p2="";o=o||[0,0];if(!p){p="tl-bl";}else if(p=="?"){p="tl-bl?";}else if(p.indexOf("-")==-1){p="tl-"+p;}p=p.toLowerCase();var m=p.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!m){throw "Element.alignTo with an invalid alignment "+p;}p1=m[1];p2=m[2];
-c=!!m[3];var a1=this.getAnchorXY(p1,true);var a2=el.getAnchorXY(p2,false);var x=a2[0]-a1[0]+o[0];var y=a2[1]-a1[1]+o[1];if(c){var w=this.getWidth(),h=this.getHeight(),r=el.getRegion();var dw=D.getViewWidth()-5,dh=D.getViewHeight()-5;var J=p1.charAt(0),K=p1.charAt(p1.length-1);
-var L=p2.charAt(0),M=p2.charAt(p2.length-1);var N=((J=="t"&&L=="b")||(J=="b"&&L=="t"));var O=((K=="r"&&M=="l")||(K=="l"&&M=="r"));var P=document;var Q=(P.documentElement.scrollLeft||P.body.scrollLeft||0)+5;var R=(P.documentElement.scrollTop||P.body.scrollTop||0)+5;
-if((x+w)>dw+Q){x=O?r.left-w:dw+Q-w;}if(x<Q){x=O?r.right:Q;}if((y+h)>dh+R){y=N?r.top-h:dh+R-h;}if(y<R){y=N?r.bottom:R;}}return [x,y];},getConstrainToXY:function(){var os={top:0,left:0,bottom:0,right:0};return function(el,J,K,L){el=Roo.get(el);K=K?Roo.applyIf(K,os):os;
-var vw,vh,vx=0,vy=0;if(el.dom==document.body||el.dom==document){vw=Roo.lib.Dom.getViewWidth();vh=Roo.lib.Dom.getViewHeight();}else{vw=el.dom.clientWidth;vh=el.dom.clientHeight;if(!J){var M=el.getXY();vx=M[0];vy=M[1];}}var s=el.getScroll();vx+=K.left+s.left;
-vy+=K.top+s.top;vw-=K.right;vh-=K.bottom;var vr=vx+vw;var vb=vy+vh;var xy=L||(!J?this.getXY():[this.getLeft(true),this.getTop(true)]);var x=xy[0],y=xy[1];var w=this.dom.offsetWidth,h=this.dom.offsetHeight;var N=false;if((x+w)>vr){x=vr-w;N=true;}if((y+h)>vb){y=vb-h;
-N=true;}if(x<vx){x=vx;N=true;}if(y<vy){y=vy;N=true;}return N?[x,y]:false;};}(),adjustForConstraints:function(xy,J,K){return this.getConstrainToXY(J||document,false,K,xy)||xy;},alignTo:function(J,K,L,M){var xy=this.getAlignToXY(J,K,L);this.setXY(xy,this.preanim(arguments,3));
-return this;},anchorTo:function(el,J,K,L,M,N){var O=function(){this.alignTo(el,J,K,L);Roo.callback(N,this);};Roo.EventManager.onWindowResize(O,this);var tm=typeof M;if(tm!='undefined'){Roo.EventManager.on(window,'scroll',O,this,{buffer:tm=='number'?M:50});
-}O.call(this);return this;},clearOpacity:function(){if(window.ActiveXObject){if(typeof this.dom.style.filter=='string'&&(/alpha/i).test(this.dom.style.filter)){this.dom.style.filter="";}}else{this.dom.style.opacity="";this.dom.style["-moz-opacity"]="";this.dom.style["-khtml-opacity"]="";
-}return this;},hide:function(J){this.setVisible(false,this.preanim(arguments,0));return this;},show:function(J){this.setVisible(true,this.preanim(arguments,0));return this;},addUnits:function(J){return Roo.Element.addUnits(J,this.defaultUnit);},beginMeasure:function(){var el=this.dom;
-if(el.offsetWidth||el.offsetHeight){return this;}var J=[];var p=this.dom,b=document.body;while((!el.offsetWidth&&!el.offsetHeight)&&p&&p.tagName&&p!=b){var pe=Roo.get(p);if(pe.getStyle('display')=='none'){J.push({el:p,visibility:pe.getStyle("visibility")});
-p.style.visibility="hidden";p.style.display="block";}p=p.parentNode;}this._measureChanged=J;return this;},endMeasure:function(){var J=this._measureChanged;if(J){for(var i=0,K=J.length;i<K;i++){var r=J[i];r.el.style.visibility=r.visibility;r.el.style.display="none";
-}this._measureChanged=null;}return this;},update:function(J,K,L){if(typeof J=="undefined"){J="";}if(K!==true){this.dom.innerHTML=J;if(typeof L=="function"){L();}return this;}var id=Roo.id();var M=this.dom;J+='<span id="'+id+'"></span>';E.onAvailable(id,function(){var hd=document.getElementsByTagName("head")[0];
-var re=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig;var N=/\ssrc=([\'\"])(.*?)\1/i;var O=/\stype=([\'\"])(.*?)\1/i;var P;while(P=re.exec(J)){var Q=P[1];var R=Q?Q.match(N):false;if(R&&R[2]){var s=document.createElement("script");s.src=R[2];var S=Q.match(O);
-if(S&&S[2]){s.type=S[2];}hd.appendChild(s);}else if(P[2]&&P[2].length>0){if(window.execScript){window.execScript(P[2]);}else{window.eval(P[2]);}}}var el=document.getElementById(id);if(el){el.parentNode.removeChild(el);}if(typeof L=="function"){L();}});M.innerHTML=J.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,"");
-return this;},load:function(){var um=this.getUpdateManager();um.update.apply(um,arguments);return this;},getUpdateManager:function(){if(!this.updateManager){this.updateManager=new Roo.UpdateManager(this);}return this.updateManager;},unselectable:function(){this.dom.unselectable="on";
-this.swallowEvent("selectstart",true);this.applyStyles("-moz-user-select:none;-khtml-user-select:none;");this.addClass("x-unselectable");return this;},getCenterXY:function(){return this.getAlignToXY(document,'c-c');},center:function(J){this.alignTo(J||document,'c-c');
-return this;},isBorderBox:function(){return I[this.dom.tagName.toLowerCase()]||Roo.isBorderBox;},getBox:function(J,K){var xy;if(!K){xy=this.getXY();}else{var L=parseInt(this.getStyle("left"),10)||0;var M=parseInt(this.getStyle("top"),10)||0;xy=[L,M];}var el=this.dom,w=el.offsetWidth,h=el.offsetHeight,bx;
-if(!J){bx={x:xy[0],y:xy[1],0:xy[0],1:xy[1],width:w,height:h};}else{var l=this.getBorderWidth("l")+this.getPadding("l");var r=this.getBorderWidth("r")+this.getPadding("r");var t=this.getBorderWidth("t")+this.getPadding("t");var b=this.getBorderWidth("b")+this.getPadding("b");
-bx={x:xy[0]+l,y:xy[1]+t,0:xy[0]+l,1:xy[1]+t,width:w-(l+r),height:h-(t+b)};}bx.right=bx.x+bx.width;bx.bottom=bx.y+bx.height;return bx;},getFrameWidth:function(J,K){return K&&Roo.isBorderBox?0:(this.getPadding(J)+this.getBorderWidth(J));},setBox:function(J,K,L){var w=J.width,h=J.height;
-if((K&&!this.autoBoxAdjust)&&!this.isBorderBox()){w-=(this.getBorderWidth("lr")+this.getPadding("lr"));h-=(this.getBorderWidth("tb")+this.getPadding("tb"));}this.setBounds(J.x,J.y,w,h,this.preanim(arguments,2));return this;},repaint:function(){var J=this.dom;
-this.addClass("x-repaint");setTimeout(function(){Roo.get(J).removeClass("x-repaint");},1);return this;},getMargins:function(J){if(!J){return {top:parseInt(this.getStyle("margin-top"),10)||0,left:parseInt(this.getStyle("margin-left"),10)||0,bottom:parseInt(this.getStyle("margin-bottom"),10)||0,right:parseInt(this.getStyle("margin-right"),10)||0};
-}else{return this.addStyles(J,El.margins);}},addStyles:function(J,K){var L=0,v,w;for(var i=0,M=J.length;i<M;i++){v=this.getStyle(K[J.charAt(i)]);if(v){w=parseInt(v,10);if(w){L+=w;}}}return L;},createProxy:function(J,K,L){if(K){K=Roo.getDom(K);}else{K=document.body;
-}J=typeof J=="object"?J:{tag:"div",cls:J};var M=Roo.DomHelper.append(K,J,true);if(L){M.setBox(this.getBox());}return M;},mask:function(J,K){if(this.getStyle("position")=="static"&&this.dom.tagName!=='BODY'){this.setStyle("position","relative");}if(!this._mask){this._mask=Roo.DomHelper.append(this.dom,{cls:"roo-el-mask"},true);
-}this.addClass("x-masked");this._mask.setDisplayed(true);var z=0;var L=this.dom
-while(L&&L.style){if(!isNaN(parseInt(L.style.zIndex))){z=Math.max(z,parseInt(L.style.zIndex));}L=L.parentNode;}if(this.dom==document.body){z=1000000;this._mask.setWidth(Roo.lib.Dom.getDocumentWidth());
+}else{this.anim({width:{to:J},height:{to:K}},this.preanim(arguments,2));}return this;},setBounds:function(x,y,J,K,L){if(!L||!A){this.setSize(J,K);this.setLocation(x,y);}else{J=this.adjustWidth(J);K=this.adjustHeight(K);this.anim({points:{to:[x,y]},width:{to:J}
+,height:{to:K}},this.preanim(arguments,4),'motion');}return this;},setRegion:function(J,K){this.setBounds(J.left,J.top,J.right-J.left,J.bottom-J.top,this.preanim(arguments,1));return this;},addListener:function(J,fn,K,L){if(this.dom){Roo.EventManager.on(this.dom,J,fn,K||this,L);
+}},removeListener:function(J,fn){Roo.EventManager.removeListener(this.dom,J,fn);return this;},removeAllListeners:function(){E.purgeElement(this.dom);return this;},relayEvent:function(J,K){this.on(J,function(e){K.fireEvent(J,e);});},setOpacity:function(J,K){if(!K||!A){var s=this.dom.style;
+if(Roo.isIE){s.zoom=1;s.filter=(s.filter||'').replace(/alpha\([^\)]*\)/gi,"")+(J==1?"":"alpha(opacity="+J*100+")");}else{s.opacity=J;}}else{this.anim({opacity:{to:J}},this.preanim(arguments,1),null,.35,'easeIn');}return this;},getLeft:function(J){if(!J){return this.getX();
+}else{return parseInt(this.getStyle("left"),10)||0;}},getRight:function(J){if(!J){return this.getX()+this.getWidth();}else{return (this.getLeft(true)+this.getWidth())||0;}},getTop:function(J){if(!J){return this.getY();}else{return parseInt(this.getStyle("top"),10)||0;
+}},getBottom:function(J){if(!J){return this.getY()+this.getHeight();}else{return (this.getTop(true)+this.getHeight())||0;}},position:function(J,K,x,y){if(!J){if(this.getStyle('position')=='static'){this.setStyle('position','relative');}}else{this.setStyle("position",J);
+}if(K){this.setStyle("z-index",K);}if(x!==undefined&&y!==undefined){this.setXY([x,y]);}else if(x!==undefined){this.setX(x);}else if(y!==undefined){this.setY(y);}},clearPositioning:function(J){J=J||'';this.setStyle({"left":J,"right":J,"top":J,"bottom":J,"z-index":"","position":"static"}
+);return this;},getPositioning:function(){var l=this.getStyle("left");var t=this.getStyle("top");return {"position":this.getStyle("position"),"left":l,"right":l?"":this.getStyle("right"),"top":t,"bottom":t?"":this.getStyle("bottom"),"z-index":this.getStyle("z-index")}
+;},getBorderWidth:function(J){return this.addStyles(J,El.borders);},getPadding:function(J){return this.addStyles(J,El.paddings);},setPositioning:function(pc){this.applyStyles(pc);if(pc.right=="auto"){this.dom.style.right="";}if(pc.bottom=="auto"){this.dom.style.bottom="";
+}return this;},fixDisplay:function(){if(this.getStyle("display")=="none"){this.setStyle("visibility","hidden");this.setStyle("display",this.originalDisplay);if(this.getStyle("display")=="none"){this.setStyle("display","block");}}},setLeftTop:function(J,K){this.dom.style.left=this.addUnits(J);
+this.dom.style.top=this.addUnits(K);return this;},move:function(J,K,L){var xy=this.getXY();J=J.toLowerCase();switch(J){case "l":case "left":this.moveTo(xy[0]-K,xy[1],this.preanim(arguments,2));break;case "r":case "right":this.moveTo(xy[0]+K,xy[1],this.preanim(arguments,2));
+break;case "t":case "top":case "up":this.moveTo(xy[0],xy[1]-K,this.preanim(arguments,2));break;case "b":case "bottom":case "down":this.moveTo(xy[0],xy[1]+K,this.preanim(arguments,2));break;}return this;},clip:function(){if(!this.isClipped){this.isClipped=true;
+this.originalClip={"o":this.getStyle("overflow"),"x":this.getStyle("overflow-x"),"y":this.getStyle("overflow-y")};this.setStyle("overflow","hidden");this.setStyle("overflow-x","hidden");this.setStyle("overflow-y","hidden");}return this;},unclip:function(){if(this.isClipped){this.isClipped=false;
+var o=this.originalClip;if(o.o){this.setStyle("overflow",o.o);}if(o.x){this.setStyle("overflow-x",o.x);}if(o.y){this.setStyle("overflow-y",o.y);}}return this;},getAnchorXY:function(J,K,s){var w,h,vp=false;if(!s){var d=this.dom;if(d==document.body||d==document){vp=true;
+w=D.getViewWidth();h=D.getViewHeight();}else{w=this.getWidth();h=this.getHeight();}}else{w=s.width;h=s.height;}var x=0,y=0,r=Math.round;switch((J||"tl").toLowerCase()){case "c":x=r(w*.5);y=r(h*.5);break;case "t":x=r(w*.5);y=0;break;case "l":x=0;y=r(h*.5);
+break;case "r":x=w;y=r(h*.5);break;case "b":x=r(w*.5);y=h;break;case "tl":x=0;y=0;break;case "bl":x=0;y=h;break;case "br":x=w;y=h;break;case "tr":x=w;y=0;break;}if(K===true){return [x,y];}if(vp){var sc=this.getScroll();return [x+sc.left,y+sc.top];}var o=this.getXY();
+return [x+o[0],y+o[1]];},getAlignToXY:function(el,p,o){el=Roo.get(el);var d=this.dom;if(!el.dom){throw "Element.alignTo with an element that doesn't exist";}var c=false;var p1="",p2="";o=o||[0,0];if(!p){p="tl-bl";}else if(p=="?"){p="tl-bl?";}else if(p.indexOf("-")==-1){p="tl-"+p;
+}p=p.toLowerCase();var m=p.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!m){throw "Element.alignTo with an invalid alignment "+p;}p1=m[1];p2=m[2];c=!!m[3];var a1=this.getAnchorXY(p1,true);var a2=el.getAnchorXY(p2,false);var x=a2[0]-a1[0]+o[0];var y=a2[1]-a1[1]+o[1];
+if(c){var w=this.getWidth(),h=this.getHeight(),r=el.getRegion();var dw=D.getViewWidth()-5,dh=D.getViewHeight()-5;var J=p1.charAt(0),K=p1.charAt(p1.length-1);var L=p2.charAt(0),M=p2.charAt(p2.length-1);var N=((J=="t"&&L=="b")||(J=="b"&&L=="t"));var O=((K=="r"&&M=="l")||(K=="l"&&M=="r"));
+var P=document;var Q=(P.documentElement.scrollLeft||P.body.scrollLeft||0)+5;var R=(P.documentElement.scrollTop||P.body.scrollTop||0)+5;if((x+w)>dw+Q){x=O?r.left-w:dw+Q-w;}if(x<Q){x=O?r.right:Q;}if((y+h)>dh+R){y=N?r.top-h:dh+R-h;}if(y<R){y=N?r.bottom:R;}}return [x,y];
+},getConstrainToXY:function(){var os={top:0,left:0,bottom:0,right:0};return function(el,J,K,L){el=Roo.get(el);K=K?Roo.applyIf(K,os):os;var vw,vh,vx=0,vy=0;if(el.dom==document.body||el.dom==document){vw=Roo.lib.Dom.getViewWidth();vh=Roo.lib.Dom.getViewHeight();
+}else{vw=el.dom.clientWidth;vh=el.dom.clientHeight;if(!J){var M=el.getXY();vx=M[0];vy=M[1];}}var s=el.getScroll();vx+=K.left+s.left;vy+=K.top+s.top;vw-=K.right;vh-=K.bottom;var vr=vx+vw;var vb=vy+vh;var xy=L||(!J?this.getXY():[this.getLeft(true),this.getTop(true)]);
+var x=xy[0],y=xy[1];var w=this.dom.offsetWidth,h=this.dom.offsetHeight;var N=false;if((x+w)>vr){x=vr-w;N=true;}if((y+h)>vb){y=vb-h;N=true;}if(x<vx){x=vx;N=true;}if(y<vy){y=vy;N=true;}return N?[x,y]:false;};}(),adjustForConstraints:function(xy,J,K){return this.getConstrainToXY(J||document,false,K,xy)||xy;
+},alignTo:function(J,K,L,M){var xy=this.getAlignToXY(J,K,L);this.setXY(xy,this.preanim(arguments,3));return this;},anchorTo:function(el,J,K,L,M,N){var O=function(){this.alignTo(el,J,K,L);Roo.callback(N,this);};Roo.EventManager.onWindowResize(O,this);var tm=typeof M;
+if(tm!='undefined'){Roo.EventManager.on(window,'scroll',O,this,{buffer:tm=='number'?M:50});}O.call(this);return this;},clearOpacity:function(){if(window.ActiveXObject){if(typeof this.dom.style.filter=='string'&&(/alpha/i).test(this.dom.style.filter)){this.dom.style.filter="";
+}}else{this.dom.style.opacity="";this.dom.style["-moz-opacity"]="";this.dom.style["-khtml-opacity"]="";}return this;},hide:function(J){this.setVisible(false,this.preanim(arguments,0));return this;},show:function(J){this.setVisible(true,this.preanim(arguments,0));
+return this;},addUnits:function(J){return Roo.Element.addUnits(J,this.defaultUnit);},beginMeasure:function(){var el=this.dom;if(el.offsetWidth||el.offsetHeight){return this;}var J=[];var p=this.dom,b=document.body;while((!el.offsetWidth&&!el.offsetHeight)&&p&&p.tagName&&p!=b){var pe=Roo.get(p);
+if(pe.getStyle('display')=='none'){J.push({el:p,visibility:pe.getStyle("visibility")});p.style.visibility="hidden";p.style.display="block";}p=p.parentNode;}this._measureChanged=J;return this;},endMeasure:function(){var J=this._measureChanged;if(J){for(var i=0,K=J.length;
+i<K;i++){var r=J[i];r.el.style.visibility=r.visibility;r.el.style.display="none";}this._measureChanged=null;}return this;},update:function(J,K,L){if(typeof J=="undefined"){J="";}if(K!==true){this.dom.innerHTML=J;if(typeof L=="function"){L();}return this;}
+var id=Roo.id();var M=this.dom;J+='<span id="'+id+'"></span>';E.onAvailable(id,function(){var hd=document.getElementsByTagName("head")[0];var re=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig;var N=/\ssrc=([\'\"])(.*?)\1/i;var O=/\stype=([\'\"])(.*?)\1/i;
+var P;while(P=re.exec(J)){var Q=P[1];var R=Q?Q.match(N):false;if(R&&R[2]){var s=document.createElement("script");s.src=R[2];var S=Q.match(O);if(S&&S[2]){s.type=S[2];}hd.appendChild(s);}else if(P[2]&&P[2].length>0){if(window.execScript){window.execScript(P[2]);
+}else{window.eval(P[2]);}}}var el=document.getElementById(id);if(el){el.parentNode.removeChild(el);}if(typeof L=="function"){L();}});M.innerHTML=J.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this;},load:function(){var um=this.getUpdateManager();
+um.update.apply(um,arguments);return this;},getUpdateManager:function(){if(!this.updateManager){this.updateManager=new Roo.UpdateManager(this);}return this.updateManager;},unselectable:function(){this.dom.unselectable="on";this.swallowEvent("selectstart",true);
+this.applyStyles("-moz-user-select:none;-khtml-user-select:none;");this.addClass("x-unselectable");return this;},getCenterXY:function(){return this.getAlignToXY(document,'c-c');},center:function(J){this.alignTo(J||document,'c-c');return this;},isBorderBox:function(){return I[this.dom.tagName.toLowerCase()]||Roo.isBorderBox;
+},getBox:function(J,K){var xy;if(!K){xy=this.getXY();}else{var L=parseInt(this.getStyle("left"),10)||0;var M=parseInt(this.getStyle("top"),10)||0;xy=[L,M];}var el=this.dom,w=el.offsetWidth,h=el.offsetHeight,bx;if(!J){bx={x:xy[0],y:xy[1],0:xy[0],1:xy[1],width:w,height:h}
+;}else{var l=this.getBorderWidth("l")+this.getPadding("l");var r=this.getBorderWidth("r")+this.getPadding("r");var t=this.getBorderWidth("t")+this.getPadding("t");var b=this.getBorderWidth("b")+this.getPadding("b");bx={x:xy[0]+l,y:xy[1]+t,0:xy[0]+l,1:xy[1]+t,width:w-(l+r),height:h-(t+b)}
+;}bx.right=bx.x+bx.width;bx.bottom=bx.y+bx.height;return bx;},getFrameWidth:function(J,K){return K&&Roo.isBorderBox?0:(this.getPadding(J)+this.getBorderWidth(J));},setBox:function(J,K,L){var w=J.width,h=J.height;if((K&&!this.autoBoxAdjust)&&!this.isBorderBox()){w-=(this.getBorderWidth("lr")+this.getPadding("lr"));
+h-=(this.getBorderWidth("tb")+this.getPadding("tb"));}this.setBounds(J.x,J.y,w,h,this.preanim(arguments,2));return this;},repaint:function(){var J=this.dom;this.addClass("x-repaint");setTimeout(function(){Roo.get(J).removeClass("x-repaint");},1);return this;
+},getMargins:function(J){if(!J){return {top:parseInt(this.getStyle("margin-top"),10)||0,left:parseInt(this.getStyle("margin-left"),10)||0,bottom:parseInt(this.getStyle("margin-bottom"),10)||0,right:parseInt(this.getStyle("margin-right"),10)||0};}else{return this.addStyles(J,El.margins);
+}},addStyles:function(J,K){var L=0,v,w;for(var i=0,M=J.length;i<M;i++){v=this.getStyle(K[J.charAt(i)]);if(v){w=parseInt(v,10);if(w){L+=w;}}}return L;},createProxy:function(J,K,L){if(K){K=Roo.getDom(K);}else{K=document.body;}J=typeof J=="object"?J:{tag:"div",cls:J}
+;var M=Roo.DomHelper.append(K,J,true);if(L){M.setBox(this.getBox());}return M;},mask:function(J,K){if(this.getStyle("position")=="static"&&this.dom.tagName!=='BODY'){this.setStyle("position","relative");}if(!this._mask){this._mask=Roo.DomHelper.append(this.dom,{cls:"roo-el-mask"}
+,true);}this.addClass("x-masked");this._mask.setDisplayed(true);var z=0;var L=this.dom;while(L&&L.style){if(!isNaN(parseInt(L.style.zIndex))){z=Math.max(z,parseInt(L.style.zIndex));}L=L.parentNode;}if(this.dom==document.body){z=1000000;this._mask.setWidth(Roo.lib.Dom.getDocumentWidth());
 this._mask.setHeight(Roo.lib.Dom.getDocumentHeight());}if(typeof J=='string'){if(!this._maskMsg){this._maskMsg=Roo.DomHelper.append(this.dom,{cls:"roo-el-mask-msg",cn:{tag:'div'}},true);}var mm=this._maskMsg;mm.dom.className=K?"roo-el-mask-msg "+K:"roo-el-mask-msg";
 if(mm.dom.firstChild){mm.dom.firstChild.innerHTML=J;}mm.setDisplayed(true);mm.center(this);mm.setStyle('z-index',z+102);}if(Roo.isIE&&!(Roo.isIE7&&Roo.isStrict)&&this.getStyle('height')=='auto'){this._mask.setHeight(this.getHeight());}this._mask.setStyle('z-index',z+100);
 return this._mask;},unmask:function(J){if(this._mask){if(J===true){this._mask.remove();delete this._mask;if(this._maskMsg){this._maskMsg.remove();delete this._maskMsg;}}else{this._mask.setDisplayed(false);if(this._maskMsg){this._maskMsg.setDisplayed(false);
@@ -390,8 +391,8 @@ if(J===true){this.fitToParentDelegate=this.fitToParent.createDelegate(this,[true
 }return Roo.DomHelper[!this.dom.firstChild?'overwrite':'append'](this.dom,J,L!==true);},appendTo:function(el){el=Roo.getDom(el);el.appendChild(this.dom);return this;},insertBefore:function(el){el=Roo.getDom(el);el.parentNode.insertBefore(this.dom,el);return this;
 },insertAfter:function(el){el=Roo.getDom(el);el.parentNode.insertBefore(this.dom,el.nextSibling);return this;},insertFirst:function(el,J){el=el||{};if(typeof el=='object'&&!el.nodeType){return this.createChild(el,this.dom.firstChild,J);}else{el=Roo.getDom(el);
 this.dom.insertBefore(el,this.dom.firstChild);return !J?Roo.get(el):el;}},insertSibling:function(el,J,K){J=J?J.toLowerCase():'before';el=el||{};var rt,L=J=='before'?this.dom:this.dom.nextSibling;if(typeof el=='object'&&!el.nodeType){if(J=='after'&&!this.dom.nextSibling){rt=Roo.DomHelper.append(this.dom.parentNode,el,!K);
-}else{rt=Roo.DomHelper[J=='after'?'insertAfter':'insertBefore'](this.dom,el,!K);}}else{rt=this.dom.parentNode.insertBefore(Roo.getDom(el),J=='before'?this.dom:this.dom.nextSibling);if(!K){rt=Roo.get(rt);}}return rt;},wrap:function(J,K){if(!J){J={tag:"div"};
-}var L=Roo.DomHelper.insertBefore(this.dom,J,!K);L.dom?L.dom.appendChild(this.dom):L.appendChild(this.dom);return L;},replace:function(el){el=Roo.get(el);this.insertBefore(el);el.remove();return this;},insertHtml:function(J,K,L){var el=Roo.DomHelper.insertHtml(J,this.dom,K);
+}else{rt=Roo.DomHelper[J=='after'?'insertAfter':'insertBefore'](this.dom,el,!K);}}else{rt=this.dom.parentNode.insertBefore(Roo.getDom(el),J=='before'?this.dom:this.dom.nextSibling);if(!K){rt=Roo.get(rt);}}return rt;},wrap:function(J,K){if(!J){J={tag:"div"}
+;}var L=Roo.DomHelper.insertBefore(this.dom,J,!K);L.dom?L.dom.appendChild(this.dom):L.appendChild(this.dom);return L;},replace:function(el){el=Roo.get(el);this.insertBefore(el);el.remove();return this;},insertHtml:function(J,K,L){var el=Roo.DomHelper.insertHtml(J,this.dom,K);
 return L?Roo.get(el):el;},set:function(o,J){var el=this.dom;J=typeof J=='undefined'?(el.setAttribute?true:false):J;for(var K in o){if(K=="style"||typeof o[K]=="function")continue;if(K=="cls"){el.className=o["cls"];}else{if(J)el.setAttribute(K,o[K]);elseel[K]=o[K];
 }}if(o.style){Roo.DomHelper.applyStyles(el,o.style);}return this;},addKeyListener:function(J,fn,K){var L;if(typeof J!="object"||J instanceof Array){L={key:J,fn:fn,scope:K};}else{L={key:J.key,shift:J.shift,ctrl:J.ctrl,alt:J.alt,fn:fn,scope:K};}return new Roo.KeyMap(this,L);
 },addKeyMap:function(J){return new Roo.KeyMap(this,J);},isScrollable:function(){var J=this.dom;return J.scrollHeight>J.clientHeight||J.scrollWidth>J.clientWidth;},scrollTo:function(J,K,L){var M=J.toLowerCase()=="left"?"scrollLeft":"scrollTop";if(!L||!A){this.dom[M]=K;
@@ -406,8 +407,8 @@ var el=Roo.get(this.insertHtml('beforeBegin',String.format('<div class="{0}">'+E
 }return d[J];}:function(ns,J){var d=this.dom;return d.getAttributeNS(ns,J)||d.getAttribute(ns+":"+J)||d.getAttribute(J)||d[J];},attr:function(J){if(arguments.length>1){this.dom.setAttribute(J,arguments[1]);return arguments[1];}if(typeof(J)=='object'){for(var i in J){this.attr(i,J[i]);
 }return J;}if(!this.dom.hasAttribute(J)){return undefined;}return this.dom.getAttribute(J);}};var ep=El.prototype;ep.on=ep.addListener;ep.mon=ep.addListener;ep.un=ep.removeListener;ep.autoBoxAdjust=true;El.unitPattern=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;
 El.addUnits=function(v,J){if(v===""||v=="auto"){return v;}if(v===undefined){return '';}if(typeof v=="number"||!El.unitPattern.test(v)){return v+(J||'px');}return v;};El.boxMarkup='<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';
-El.VISIBILITY=1;El.DISPLAY=2;El.borders={l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"};El.paddings={l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"};El.margins={l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"};
-El.cache={};var H;El.get=function(el){var ex,J,id;if(!el){return null;}if(typeof el=="string"){if(!(J=document.getElementById(el))){return null;}if(ex=El.cache[el]){ex.dom=J;}else{ex=El.cache[el]=new El(J);}return ex;}else if(el.tagName){if(!(id=el.id)){id=Roo.id(el);
+El.VISIBILITY=1;El.DISPLAY=2;El.borders={l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"};El.paddings={l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"};El.margins={l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"}
+;El.cache={};var H;El.get=function(el){var ex,J,id;if(!el){return null;}if(typeof el=="string"){if(!(J=document.getElementById(el))){return null;}if(ex=El.cache[el]){ex.dom=J;}else{ex=El.cache[el]=new El(J);}return ex;}else if(el.tagName){if(!(id=el.id)){id=Roo.id(el);
 }if(ex=El.cache[id]){ex.dom=el;}else{ex=El.cache[id]=new El(el);}return ex;}else if(el instanceof El){if(el!=H){el.dom=document.getElementById(el.id)||el.dom;El.cache[el.id]=el;}return el;}else if(el.isComposite){return el;}else if(el instanceof Array){return El.select(el);
 }else if(el==document){if(!H){var f=function(){};f.prototype=El.prototype;H=new f();H.dom=document;}return H;}return null;};El.uncache=function(el){for(var i=0,a=arguments,J=a.length;i<J;i++){if(a[i]){delete El.cache[a[i].id||a[i]];}}};El.garbageCollect=function(){if(!Roo.enableGarbageCollector){clearInterval(El.collectorThread);
 return;}for(var J in El.cache){var el=El.cache[J],d=el.dom;if(!d||!d.parentNode||(!d.offsetParent&&!document.getElementById(J))){delete El.cache[J];if(d&&Roo.enableListenerCollection){E.purgeElement(d);}}}};El.collectorThreadId=setInterval(El.garbageCollect,30000);
@@ -417,32 +418,33 @@ El.Flyweight=function(J){this.dom=J;};El.Flyweight.prototype=El.prototype;El._fl
 }};Roo.select=Roo.Element.select;
 // Roo/Fx.js
 Roo.enableFx=true;Roo.Fx={slideIn:function(A,o){var el=this.getFxEl();o=o||{};el.queueFx(o,function(){A=A||"t";this.fixDisplay();var r=this.getFxRestore();var b=this.getBox();this.setSize(b);var B=this.fxWrap(r.pos,o,"hidden");var st=this.dom.style;st.visibility="visible";
-st.position="absolute";var C=function(){el.fxUnwrap(B,r.pos,o);st.width=r.width;st.height=r.height;el.afterFx(o);};var a,pt={to:[b.x,b.y]},bw={to:b.width},bh={to:b.height};switch(A.toLowerCase()){case "t":B.setSize(b.width,0);st.left=st.bottom="0";a={height:bh};
-break;case "l":B.setSize(0,b.height);st.right=st.top="0";a={width:bw};break;case "r":B.setSize(0,b.height);B.setX(b.right);st.left=st.top="0";a={width:bw,points:pt};break;case "b":B.setSize(b.width,0);B.setY(b.bottom);st.left=st.top="0";a={height:bh,points:pt};
-break;case "tl":B.setSize(0,0);st.right=st.bottom="0";a={width:bw,height:bh};break;case "bl":B.setSize(0,0);B.setY(b.y+b.height);st.right=st.top="0";a={width:bw,height:bh,points:pt};break;case "br":B.setSize(0,0);B.setXY([b.right,b.bottom]);st.left=st.top="0";
+st.position="absolute";var C=function(){el.fxUnwrap(B,r.pos,o);st.width=r.width;st.height=r.height;el.afterFx(o);};var a,pt={to:[b.x,b.y]},bw={to:b.width},bh={to:b.height};switch(A.toLowerCase()){case "t":B.setSize(b.width,0);st.left=st.bottom="0";a={height:bh}
+;break;case "l":B.setSize(0,b.height);st.right=st.top="0";a={width:bw};break;case "r":B.setSize(0,b.height);B.setX(b.right);st.left=st.top="0";a={width:bw,points:pt};break;case "b":B.setSize(b.width,0);B.setY(b.bottom);st.left=st.top="0";a={height:bh,points:pt}
+;break;case "tl":B.setSize(0,0);st.right=st.bottom="0";a={width:bw,height:bh};break;case "bl":B.setSize(0,0);B.setY(b.y+b.height);st.right=st.top="0";a={width:bw,height:bh,points:pt};break;case "br":B.setSize(0,0);B.setXY([b.right,b.bottom]);st.left=st.top="0";
 a={width:bw,height:bh,points:pt};break;case "tr":B.setSize(0,0);B.setX(b.x+b.width);st.left=st.bottom="0";a={width:bw,height:bh,points:pt};break;}this.dom.style.visibility="visible";B.show();arguments.callee.anim=B.fxanim(a,o,'motion',.5,'easeOut',C);});return this;
 },slideOut:function(A,o){var el=this.getFxEl();o=o||{};el.queueFx(o,function(){A=A||"t";var r=this.getFxRestore();var b=this.getBox();this.setSize(b);var B=this.fxWrap(r.pos,o,"visible");var st=this.dom.style;st.visibility="visible";st.position="absolute";
 B.setSize(b);var C=function(){if(o.useDisplay){el.setDisplayed(false);}else{el.hide();}el.fxUnwrap(B,r.pos,o);st.width=r.width;st.height=r.height;el.afterFx(o);};var a,D={to:0};switch(A.toLowerCase()){case "t":st.left=st.bottom="0";a={height:D};break;case "l":st.right=st.top="0";
-a={width:D};break;case "r":st.left=st.top="0";a={width:D,points:{to:[b.right,b.y]}};break;case "b":st.left=st.top="0";a={height:D,points:{to:[b.x,b.bottom]}};break;case "tl":st.right=st.bottom="0";a={width:D,height:D};break;case "bl":st.right=st.top="0";a={width:D,height:D,points:{to:[b.x,b.bottom]}};
-break;case "br":st.left=st.top="0";a={width:D,height:D,points:{to:[b.x+b.width,b.bottom]}};break;case "tr":st.left=st.bottom="0";a={width:D,height:D,points:{to:[b.right,b.y]}};break;}arguments.callee.anim=B.fxanim(a,o,'motion',.5,"easeOut",C);});return this;
+a={width:D};break;case "r":st.left=st.top="0";a={width:D,points:{to:[b.right,b.y]}};break;case "b":st.left=st.top="0";a={height:D,points:{to:[b.x,b.bottom]}};break;case "tl":st.right=st.bottom="0";a={width:D,height:D};break;case "bl":st.right=st.top="0";a={width:D,height:D,points:{to:[b.x,b.bottom]}
+};break;case "br":st.left=st.top="0";a={width:D,height:D,points:{to:[b.x+b.width,b.bottom]}};break;case "tr":st.left=st.bottom="0";a={width:D,height:D,points:{to:[b.right,b.y]}};break;}arguments.callee.anim=B.fxanim(a,o,'motion',.5,"easeOut",C);});return this;
 },puff:function(o){var el=this.getFxEl();o=o||{};el.queueFx(o,function(){this.clearOpacity();this.show();var r=this.getFxRestore();var st=this.dom.style;var A=function(){if(o.useDisplay){el.setDisplayed(false);}else{el.hide();}el.clearOpacity();el.setPositioning(r.pos);
-st.width=r.width;st.height=r.height;st.fontSize='';el.afterFx(o);};var B=this.getWidth();var C=this.getHeight();arguments.callee.anim=this.fxanim({width:{to:this.adjustWidth(B*2)},height:{to:this.adjustHeight(C*2)},points:{by:[-(B*.5),-(C*.5)]},opacity:{to:0},fontSize:{to:200,unit:"%"}},o,'motion',.5,"easeOut",A);
-});return this;},switchOff:function(o){var el=this.getFxEl();o=o||{};el.queueFx(o,function(){this.clearOpacity();this.clip();var r=this.getFxRestore();var st=this.dom.style;var A=function(){if(o.useDisplay){el.setDisplayed(false);}else{el.hide();}el.clearOpacity();
-el.setPositioning(r.pos);st.width=r.width;st.height=r.height;el.afterFx(o);};this.fxanim({opacity:{to:0.3}},null,null,.1,null,function(){this.clearOpacity();(function(){this.fxanim({height:{to:1},points:{by:[0,this.getHeight()*.5]}},o,'motion',0.3,'easeIn',A);
-}).defer(100,this);});});return this;},highlight:function(A,o){var el=this.getFxEl();o=o||{};el.queueFx(o,function(){A=A||"ffff9c";attr=o.attr||"backgroundColor";this.clearOpacity();this.show();var B=this.getColor(attr);var C=this.dom.style[attr];endColor=(o.endColor||B)||"ffffff";
-var D=function(){el.dom.style[attr]=C;el.afterFx(o);};var a={};a[attr]={from:A,to:endColor};arguments.callee.anim=this.fxanim(a,o,'color',1,'easeIn',D);});return this;},frame:function(A,B,o){var el=this.getFxEl();o=o||{};el.queueFx(o,function(){A=A||"#C3DAF9";
-if(A.length==6){A="#"+A;}B=B||1;duration=o.duration||1;this.show();var b=this.getBox();var C=function(){var D=this.createProxy({style:{visbility:"hidden",position:"absolute","z-index":"35000",border:"0px solid "+A}});var E=Roo.isBorderBox?2:1;D.animate({top:{from:b.y,to:b.y-20},left:{from:b.x,to:b.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:b.height,to:(b.height+(20*E))},width:{from:b.width,to:(b.width+(20*E))}},duration,function(){D.remove();
+st.width=r.width;st.height=r.height;st.fontSize='';el.afterFx(o);};var B=this.getWidth();var C=this.getHeight();arguments.callee.anim=this.fxanim({width:{to:this.adjustWidth(B*2)},height:{to:this.adjustHeight(C*2)},points:{by:[-(B*.5),-(C*.5)]},opacity:{to:0}
+,fontSize:{to:200,unit:"%"}},o,'motion',.5,"easeOut",A);});return this;},switchOff:function(o){var el=this.getFxEl();o=o||{};el.queueFx(o,function(){this.clearOpacity();this.clip();var r=this.getFxRestore();var st=this.dom.style;var A=function(){if(o.useDisplay){el.setDisplayed(false);
+}else{el.hide();}el.clearOpacity();el.setPositioning(r.pos);st.width=r.width;st.height=r.height;el.afterFx(o);};this.fxanim({opacity:{to:0.3}},null,null,.1,null,function(){this.clearOpacity();(function(){this.fxanim({height:{to:1},points:{by:[0,this.getHeight()*.5]}
+},o,'motion',0.3,'easeIn',A);}).defer(100,this);});});return this;},highlight:function(A,o){var el=this.getFxEl();o=o||{};el.queueFx(o,function(){A=A||"ffff9c";attr=o.attr||"backgroundColor";this.clearOpacity();this.show();var B=this.getColor(attr);var C=this.dom.style[attr];
+endColor=(o.endColor||B)||"ffffff";var D=function(){el.dom.style[attr]=C;el.afterFx(o);};var a={};a[attr]={from:A,to:endColor};arguments.callee.anim=this.fxanim(a,o,'color',1,'easeIn',D);});return this;},frame:function(A,B,o){var el=this.getFxEl();o=o||{}
+;el.queueFx(o,function(){A=A||"#C3DAF9";if(A.length==6){A="#"+A;}B=B||1;duration=o.duration||1;this.show();var b=this.getBox();var C=function(){var D=this.createProxy({style:{visbility:"hidden",position:"absolute","z-index":"35000",border:"0px solid "+A}}
+);var E=Roo.isBorderBox?2:1;D.animate({top:{from:b.y,to:b.y-20},left:{from:b.x,to:b.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:b.height,to:(b.height+(20*E))},width:{from:b.width,to:(b.width+(20*E))}},duration,function(){D.remove();
 });if(--B>0){C.defer((duration/2)*1000,this);}else{el.afterFx(o);}};C.call(this);});return this;},pause:function(A){var el=this.getFxEl();var o={};el.queueFx(o,function(){setTimeout(function(){el.afterFx(o);},A*1000);});return this;},fadeIn:function(o){var el=this.getFxEl();
 o=o||{};el.queueFx(o,function(){this.setOpacity(0);this.fixDisplay();this.dom.style.visibility='visible';var to=o.endOpacity||1;arguments.callee.anim=this.fxanim({opacity:{to:to}},o,null,.5,"easeOut",function(){if(to==1){this.clearOpacity();}el.afterFx(o);
 });});return this;},fadeOut:function(o){var el=this.getFxEl();o=o||{};el.queueFx(o,function(){arguments.callee.anim=this.fxanim({opacity:{to:o.endOpacity||0}},o,null,.5,"easeOut",function(){if(this.visibilityMode==Roo.Element.DISPLAY||o.useDisplay){this.dom.style.display="none";
-}else{this.dom.style.visibility="hidden";}this.clearOpacity();el.afterFx(o);});});return this;},scale:function(w,h,o){this.shift(Roo.apply({},o,{width:w,height:h}));return this;},shift:function(o){var el=this.getFxEl();o=o||{};el.queueFx(o,function(){var a={},w=o.width,h=o.height,x=o.x,y=o.y,op=o.opacity;
-if(w!==undefined){a.width={to:this.adjustWidth(w)};}if(h!==undefined){a.height={to:this.adjustHeight(h)};}if(x!==undefined||y!==undefined){a.points={to:[x!==undefined?x:this.getX(),y!==undefined?y:this.getY()]};}if(op!==undefined){a.opacity={to:op};}if(o.xy!==undefined){a.points={to:o.xy};
-}arguments.callee.anim=this.fxanim(a,o,'motion',.35,"easeOut",function(){el.afterFx(o);});});return this;},ghost:function(A,o){var el=this.getFxEl();o=o||{};el.queueFx(o,function(){A=A||"b";var r=this.getFxRestore();var w=this.getWidth(),h=this.getHeight();
-var st=this.dom.style;var B=function(){if(o.useDisplay){el.setDisplayed(false);}else{el.hide();}el.clearOpacity();el.setPositioning(r.pos);st.width=r.width;st.height=r.height;el.afterFx(o);};var a={opacity:{to:0},points:{}},pt=a.points;switch(A.toLowerCase()){case "t":pt.by=[0,-h];
-break;case "l":pt.by=[-w,0];break;case "r":pt.by=[w,0];break;case "b":pt.by=[0,h];break;case "tl":pt.by=[-w,-h];break;case "bl":pt.by=[-w,h];break;case "br":pt.by=[w,h];break;case "tr":pt.by=[w,-h];break;}arguments.callee.anim=this.fxanim(a,o,'motion',.5,"easeOut",B);
-});return this;},syncFx:function(){this.fxDefaults=Roo.apply(this.fxDefaults||{},{block:false,concurrent:true,stopFx:false});return this;},sequenceFx:function(){this.fxDefaults=Roo.apply(this.fxDefaults||{},{block:false,concurrent:false,stopFx:false});return this;
-},nextFx:function(){var ef=this.fxQueue[0];if(ef){ef.call(this);}},hasActiveFx:function(){return this.fxQueue&&this.fxQueue[0];},stopFx:function(){if(this.hasActiveFx()){var A=this.fxQueue[0];if(A&&A.anim&&A.anim.isAnimated()){this.fxQueue=[A];A.anim.stop(true);
-}}return this;},beforeFx:function(o){if(this.hasActiveFx()&&!o.concurrent){if(o.stopFx){this.stopFx();return true;}return false;}return true;},hasFxBlock:function(){var q=this.fxQueue;return q&&q[0]&&q[0].block;},queueFx:function(o,fn){if(!this.fxQueue){this.fxQueue=[];
+}else{this.dom.style.visibility="hidden";}this.clearOpacity();el.afterFx(o);});});return this;},scale:function(w,h,o){this.shift(Roo.apply({},o,{width:w,height:h}));return this;},shift:function(o){var el=this.getFxEl();o=o||{};el.queueFx(o,function(){var a={}
+,w=o.width,h=o.height,x=o.x,y=o.y,op=o.opacity;if(w!==undefined){a.width={to:this.adjustWidth(w)};}if(h!==undefined){a.height={to:this.adjustHeight(h)};}if(x!==undefined||y!==undefined){a.points={to:[x!==undefined?x:this.getX(),y!==undefined?y:this.getY()]}
+;}if(op!==undefined){a.opacity={to:op};}if(o.xy!==undefined){a.points={to:o.xy};}arguments.callee.anim=this.fxanim(a,o,'motion',.35,"easeOut",function(){el.afterFx(o);});});return this;},ghost:function(A,o){var el=this.getFxEl();o=o||{};el.queueFx(o,function(){A=A||"b";
+var r=this.getFxRestore();var w=this.getWidth(),h=this.getHeight();var st=this.dom.style;var B=function(){if(o.useDisplay){el.setDisplayed(false);}else{el.hide();}el.clearOpacity();el.setPositioning(r.pos);st.width=r.width;st.height=r.height;el.afterFx(o);
+};var a={opacity:{to:0},points:{}},pt=a.points;switch(A.toLowerCase()){case "t":pt.by=[0,-h];break;case "l":pt.by=[-w,0];break;case "r":pt.by=[w,0];break;case "b":pt.by=[0,h];break;case "tl":pt.by=[-w,-h];break;case "bl":pt.by=[-w,h];break;case "br":pt.by=[w,h];
+break;case "tr":pt.by=[w,-h];break;}arguments.callee.anim=this.fxanim(a,o,'motion',.5,"easeOut",B);});return this;},syncFx:function(){this.fxDefaults=Roo.apply(this.fxDefaults||{},{block:false,concurrent:true,stopFx:false});return this;},sequenceFx:function(){this.fxDefaults=Roo.apply(this.fxDefaults||{}
+,{block:false,concurrent:false,stopFx:false});return this;},nextFx:function(){var ef=this.fxQueue[0];if(ef){ef.call(this);}},hasActiveFx:function(){return this.fxQueue&&this.fxQueue[0];},stopFx:function(){if(this.hasActiveFx()){var A=this.fxQueue[0];if(A&&A.anim&&A.anim.isAnimated()){this.fxQueue=[A];
+A.anim.stop(true);}}return this;},beforeFx:function(o){if(this.hasActiveFx()&&!o.concurrent){if(o.stopFx){this.stopFx();return true;}return false;}return true;},hasFxBlock:function(){var q=this.fxQueue;return q&&q[0]&&q[0].block;},queueFx:function(o,fn){if(!this.fxQueue){this.fxQueue=[];
 }if(!this.hasFxBlock()){Roo.applyIf(o,this.fxDefaults);if(!o.concurrent){var A=this.beforeFx(o);fn.block=o.block;this.fxQueue.push(fn);if(A){this.nextFx();}}else{fn.call(this);}}return this;},fxWrap:function(A,o,B){var C;if(!o.wrap||!(C=Roo.get(o.wrap))){var D;
 if(o.fixPosition){D=this.getXY();}var E=document.createElement("div");E.style.visibility=B;C=Roo.get(this.dom.parentNode.insertBefore(E,this.dom));C.setPositioning(A);if(C.getStyle("position")=="static"){C.position("relative");}this.clearPositioning('auto');
 C.clip();C.dom.appendChild(this.dom);if(D){C.setXY(D);}}return C;},fxUnwrap:function(A,B,o){this.clearPositioning();this.setPositioning(B);if(!o.wrap){A.dom.parentNode.insertBefore(this.dom,A.dom);A.remove();}},getFxRestore:function(){var st=this.dom.style;
@@ -467,8 +469,8 @@ if(C!==-1){A=Roo.getDom(A);if(B){var d=this.elements[C];d.parentNode.insertBefor
 // Roo/data/Connection.js
 Roo.data.Connection=function(A){Roo.apply(this,A);this.addEvents({"beforerequest":true,"requestcomplete":true,"requestexception":true});Roo.data.Connection.superclass.constructor.call(this);};Roo.extend(Roo.data.Connection,Roo.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,request:function(o){if(this.fireEvent("beforerequest",this,o)!==false){var p=o.params;
 if(typeof p=="function"){p=p.call(o.scope||window,o);}if(typeof p=="object"){p=Roo.urlEncode(o.params);}if(this.extraParams){var A=Roo.urlEncode(this.extraParams);p=p?(p+'&'+A):A;}var B=o.url||this.url;if(typeof B=='function'){B=B.call(o.scope||window,o);
-}if(o.form){var C=Roo.getDom(o.form);B=B||C.action;var D=C.getAttribute("enctype");if(o.isUpload||(D&&D.toLowerCase()=='multipart/form-data')){return this.doFormUpload(o,p,B);}var f=Roo.lib.Ajax.serializeForm(C);p=p?(p+'&'+f):f;}var hs=o.headers;if(this.defaultHeaders){hs=Roo.apply(hs||{},this.defaultHeaders);
-if(!o.headers){o.headers=hs;}}var cb={success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{options:o},timeout:o.timeout||this.timeout};var E=o.method||this.method||(p?"POST":"GET");if(E=='GET'&&(this.disableCaching&&o.disableCaching!==false)||o.disableCaching===true){B+=(B.indexOf('?')!=-1?'&':'?')+'_dc='+(new Date().getTime());
+}if(o.form){var C=Roo.getDom(o.form);B=B||C.action;var D=C.getAttribute("enctype");if(o.isUpload||(D&&D.toLowerCase()=='multipart/form-data')){return this.doFormUpload(o,p,B);}var f=Roo.lib.Ajax.serializeForm(C);p=p?(p+'&'+f):f;}var hs=o.headers;if(this.defaultHeaders){hs=Roo.apply(hs||{}
+,this.defaultHeaders);if(!o.headers){o.headers=hs;}}var cb={success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{options:o},timeout:o.timeout||this.timeout};var E=o.method||this.method||(p?"POST":"GET");if(E=='GET'&&(this.disableCaching&&o.disableCaching!==false)||o.disableCaching===true){B+=(B.indexOf('?')!=-1?'&':'?')+'_dc='+(new Date().getTime());
 }if(typeof o.autoAbort=='boolean'){if(o.autoAbort){this.abort();}}else if(this.autoAbort!==false){this.abort();}if((E=='GET'&&p)||o.xmlData){B+=(B.indexOf('?')!=-1?'&':'?')+p;p='';}this.transId=Roo.lib.Ajax.request(E,B,cb,p,o);return this.transId;}else{Roo.callback(o.callback,o.scope,[o,null,null]);
 return null;}},isLoading:function(A){if(A){return Roo.lib.Ajax.isCallInProgress(A);}else{return this.transId?true:false;}},abort:function(A){if(A||this.isLoading()){Roo.lib.Ajax.abort(A||this.transId);}},handleResponse:function(A){this.transId=false;var B=A.argument.options;
 A.argument=B?B.argument:null;this.fireEvent("requestcomplete",this,A,B);Roo.callback(B.success,B.scope,[A,B]);Roo.callback(B.callback,B.scope,[B,true,A]);},handleFailure:function(A,e){this.transId=false;var B=A.argument.options;A.argument=B?B.argument:null;
@@ -487,8 +489,8 @@ this.updateDelegate=this.update.createDelegate(this);this.formUpdateDelegate=thi
 A=F.url;B=B||F.params;C=C||F.callback;D=D||F.discardUrl;if(C&&F.scope){C=C.createDelegate(F.scope);}if(typeof F.method!="undefined"){E=F.method;};if(typeof F.nocache!="undefined"){this.disableCaching=F.nocache;};if(typeof F.text!="undefined"){this.indicatorText='<div class="loading-indicator">'+F.text+"</div>";
 };if(typeof F.scripts!="undefined"){this.loadScripts=F.scripts;};if(typeof F.timeout!="undefined"){this.timeout=F.timeout;};}this.showLoading();if(!D){this.defaultUrl=A;}if(typeof A=="function"){A=A.call(this);}E=E||(B?"POST":"GET");if(E=="GET"){A=this.prepareUrl(A);
 }var o=Roo.apply(F||{},{url:A,params:B,success:this.successDelegate,failure:this.failureDelegate,callback:undefined,timeout:(this.timeout*1000),argument:{"url":A,"form":null,"callback":C,"params":B}});Roo.log("updated manager called with timeout of "+o.timeout);
-this.transaction=Roo.Ajax.request(o);}},formUpdate:function(A,B,C,D){if(this.fireEvent("beforeupdate",this.el,A,B)!==false){if(typeof B=="function"){B=B.call(this);}A=Roo.getDom(A);this.transaction=Roo.Ajax.request({form:A,url:B,success:this.successDelegate,failure:this.failureDelegate,timeout:(this.timeout*1000),argument:{"url":B,"form":A,"callback":D,"reset":C}});
-this.showLoading.defer(1,this);}},refresh:function(A){if(this.defaultUrl==null){return;}this.update(this.defaultUrl,null,A,true);},startAutoRefresh:function(A,B,C,D,E){if(E){this.update(B||this.defaultUrl,C,D,true);}if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);
+this.transaction=Roo.Ajax.request(o);}},formUpdate:function(A,B,C,D){if(this.fireEvent("beforeupdate",this.el,A,B)!==false){if(typeof B=="function"){B=B.call(this);}A=Roo.getDom(A);this.transaction=Roo.Ajax.request({form:A,url:B,success:this.successDelegate,failure:this.failureDelegate,timeout:(this.timeout*1000),argument:{"url":B,"form":A,"callback":D,"reset":C}
+});this.showLoading.defer(1,this);}},refresh:function(A){if(this.defaultUrl==null){return;}this.update(this.defaultUrl,null,A,true);},startAutoRefresh:function(A,B,C,D,E){if(E){this.update(B||this.defaultUrl,C,D,true);}if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);
 }this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[B||this.defaultUrl,C,D,true]),A*1000);},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId;}},isAutoRefreshing:function(){return this.autoRefreshProcId?true:false;
 },showLoading:function(){if(this.showLoadIndicator){this.el.update(this.indicatorText);}},prepareUrl:function(A){if(this.disableCaching){var B="_dc="+(new Date().getTime());if(A.indexOf("?")!==-1){A+="&"+B;}else{A+="?"+B;}}return A;},processSuccess:function(A){this.transaction=null;
 if(A.argument.form&&A.argument.reset){try{A.argument.form.reset();}catch(e){}}if(this.loadScripts){this.renderer.render(this.el,A,this,this.updateComplete.createDelegate(this,[A]));}else{this.renderer.render(this.el,A,this);this.updateComplete(A);}},updateComplete:function(A){this.fireEvent("update",this.el,A);
@@ -500,8 +502,8 @@ Roo.apply(um,C);um.update(A,B,C?C.callback:null);};Roo.UpdateManager.update=Roo.
 // Roo/DomTemplate.js
 Roo.DomTemplate=function(){Roo.DomTemplate.superclass.constructor.apply(this,arguments);if(this.html){this.compile();}};Roo.extend(Roo.DomTemplate,Roo.Template,{id:0,inPre:false,tpls:false,re:/(\{|\%7B)([\w-\.]+)(?:\:([\w\.]*)(?:\(([^)]*?)?\))?)?(\}|\%7D)/g,iterChild:function(A,B){var C=this.inPre;
 if(A.tagName=='PRE'){this.inPre=true;}for(var i=0;i<A.childNodes.length;i++){B.call(this,A.childNodes[i]);}this.inPre=C;},compile:function(){var s=this.html;var A=false;var B=false;try{A=document.implementation.createHTMLDocument("");A.documentElement.innerHTML=this.html;
-B=A.documentElement;}catch(e){B=document.createElement('div');B.innerHTML=this.html;}this.tpls=[];var _t=this;this.iterChild(B,function(n){_t.compileNode(n,true);});var C=this.tpls;var D={uid:'master',id:this.id++,attr:false,value:false,body:B.innerHTML,forCall:false,execCall:false,dom:B,isTop:true};
-C.unshift(D);this.tpls=[];Roo.each(C,function(tp){this.compileTpl(tp);this.tpls[tp.id]=tp;},this);this.master=C[0];return this;},compileNode:function(A,B){if(A.nodeType!=1){if(A.nodeType==3&&!this.inPre){A.nodeValue=A.nodeValue.replace(/\s+/g,' ');}return;
+B=A.documentElement;}catch(e){B=document.createElement('div');B.innerHTML=this.html;}this.tpls=[];var _t=this;this.iterChild(B,function(n){_t.compileNode(n,true);});var C=this.tpls;var D={uid:'master',id:this.id++,attr:false,value:false,body:B.innerHTML,forCall:false,execCall:false,dom:B,isTop:true}
+;C.unshift(D);this.tpls=[];Roo.each(C,function(tp){this.compileTpl(tp);this.tpls[tp.id]=tp;},this);this.master=C[0];return this;},compileNode:function(A,B){if(A.nodeType!=1){if(A.nodeType==3&&!this.inPre){A.nodeValue=A.nodeValue.replace(/\s+/g,' ');}return;
 }var C={uid:false,id:false,attr:false,value:false,body:'',forCall:false,execCall:false,dom:false,isTop:B};switch(true){case (A.hasAttribute('roo-for')):C.attr='for';break;case (A.hasAttribute('roo-if')):C.attr='if';break;case (A.hasAttribute('roo-name')):C.attr='name';
 break;case (A.hasAttribute('roo-exec')):C.attr='exec';break;}if(!C.attr){this.iterChild(A,this.compileNode);return;}C.uid=this.id++;C.value=A.getAttribute('roo-'+C.attr);A.removeAttribute('roo-'+C.attr);if(C.attr!='name'){var D=document.createTextNode('{domtpl'+C.uid+'}');
 A.parentNode.replaceChild(D,A);}else{var D=document.createElement('span');D.className='roo-tpl-'+C.value;A.parentNode.replaceChild(D,A);}this.iterChild(A,this.compileNode);var E=document.createElement('div');E.appendChild(A);C.dom=A;C.body=E.innerHTML;C.id=C.uid;
@@ -537,8 +539,8 @@ return o;},remove:function(o){return this.removeAt(this.indexOf(o));},removeAt:f
 this.fireEvent("remove",o,B);}},removeKey:function(A){return this.removeAt(this.indexOfKey(A));},getCount:function(){return this.length;},indexOf:function(o){if(!this.items.indexOf){for(var i=0,A=this.items.length;i<A;i++){if(this.items[i]==o)return i;}return -1;
 }else{return this.items.indexOf(o);}},indexOfKey:function(A){if(!this.keys.indexOf){for(var i=0,B=this.keys.length;i<B;i++){if(this.keys[i]==A)return i;}return -1;}else{return this.keys.indexOf(A);}},item:function(A){var B=typeof this.map[A]!="undefined"?this.map[A]:this.items[A];
 return typeof B!='function'||this.allowFunctions?B:null;},itemAt:function(A){return this.items[A];},key:function(A){return this.map[A];},contains:function(o){return this.indexOf(o)!=-1;},containsKey:function(A){return typeof this.map[A]!="undefined";},clear:function(){this.length=0;
-this.items=[];this.keys=[];this.map={};this.fireEvent("clear");},first:function(){return this.items[0];},last:function(){return this.items[this.length-1];},_sort:function(A,B,fn){var C=String(B).toUpperCase()=="DESC"?-1:1;fn=fn||function(a,b){return a-b;};
-var c=[],k=this.keys,D=this.items;for(var i=0,E=D.length;i<E;i++){c[c.length]={key:k[i],value:D[i],index:i};}c.sort(function(a,b){var v=fn(a[A],b[A])*C;if(v==0){v=(a.index<b.index?-1:1);}return v;});for(var i=0,E=c.length;i<E;i++){D[i]=c[i].value;k[i]=c[i].key;
+this.items=[];this.keys=[];this.map={};this.fireEvent("clear");},first:function(){return this.items[0];},last:function(){return this.items[this.length-1];},_sort:function(A,B,fn){var C=String(B).toUpperCase()=="DESC"?-1:1;fn=fn||function(a,b){return a-b;}
+;var c=[],k=this.keys,D=this.items;for(var i=0,E=D.length;i<E;i++){c[c.length]={key:k[i],value:D[i],index:i};}c.sort(function(a,b){var v=fn(a[A],b[A])*C;if(v==0){v=(a.index<b.index?-1:1);}return v;});for(var i=0,E=c.length;i<E;i++){D[i]=c[i].value;k[i]=c[i].key;
 }this.fireEvent("sort",this);},sort:function(A,fn){this._sort("value",A,fn);},keySort:function(A,fn){this._sort("key",A,fn||function(a,b){return String(a).toUpperCase()-String(b).toUpperCase();});},getRange:function(A,B){var C=this.items;if(C.length<1){return [];
 }A=A||0;B=Math.min(typeof B=="undefined"?this.length-1:B,this.length-1);var r=[];if(A<=B){for(var i=A;i<=B;i++){r[r.length]=C[i];}}else{for(var i=A;i>=B;i--){r[r.length]=C[i];}}return r;},filter:function(A,B){if(!B.exec){B=String(B);if(B.length==0){return this.clone();
 }B=new RegExp("^"+Roo.escapeRe(B),"i");}return this.filterBy(function(o){return o&&B.test(o[A]);});},filterBy:function(fn,A){var r=new Roo.util.MixedCollection();r.getKey=this.getKey;var k=this.keys,it=this.items;for(var i=0,B=it.length;i<B;i++){if(fn.call(A||this,it[i],k[i])){r.add(k[i],it[i]);
@@ -562,8 +564,8 @@ var C=Math.pow(10,B);var D=String(C).substring(1);v=(Math.round((v-0)*C))/C;v=St
 return E+F;},date:function(v,B){if(!v){return "";}if(!(v instanceof Date)){v=new Date(Date.parse(v));}return v.dateFormat(B||Roo.util.Format.defaults.date);},dateRenderer:function(B){return function(v){return Roo.util.Format.date(v,B);};},stripTagsRE:/<\/?[^>]+>/gi,stripTags:function(v){return !v?v:String(v).replace(this.stripTagsRE,"");
 }};}();Roo.util.Format.defaults={date:'d/M/Y'};
 // Roo/MasterTemplate.js
-Roo.MasterTemplate=function(){Roo.MasterTemplate.superclass.constructor.apply(this,arguments);this.originalHtml=this.html;var st={};var m,re=this.subTemplateRe;re.lastIndex=0;var A=0;while(m=re.exec(this.html)){var B=m[1],C=m[2];st[A]={name:B,index:A,buffer:[],tpl:new Roo.Template(C)};
-if(B){st[B]=st[A];}st[A].tpl.compile();st[A].tpl.call=this.call.createDelegate(this);A++;}this.subCount=A;this.subs=st;};Roo.extend(Roo.MasterTemplate,Roo.Template,{subTemplateRe:/<tpl(?:\sname="([\w-]+)")?>((?:.|\n)*?)<\/tpl>/gi,add:function(A,B){if(arguments.length==1){B=arguments[0];
+Roo.MasterTemplate=function(){Roo.MasterTemplate.superclass.constructor.apply(this,arguments);this.originalHtml=this.html;var st={};var m,re=this.subTemplateRe;re.lastIndex=0;var A=0;while(m=re.exec(this.html)){var B=m[1],C=m[2];st[A]={name:B,index:A,buffer:[],tpl:new Roo.Template(C)}
+;if(B){st[B]=st[A];}st[A].tpl.compile();st[A].tpl.call=this.call.createDelegate(this);A++;}this.subCount=A;this.subs=st;};Roo.extend(Roo.MasterTemplate,Roo.Template,{subTemplateRe:/<tpl(?:\sname="([\w-]+)")?>((?:.|\n)*?)<\/tpl>/gi,add:function(A,B){if(arguments.length==1){B=arguments[0];
 A=0;}var s=this.subs[A];s.buffer[s.buffer.length]=s.tpl.apply(B);return this;},fill:function(A,B,C){var a=arguments;if(a.length==1||(a.length==2&&typeof a[1]=="boolean")){B=a[0];A=0;C=a[1];}if(C){this.reset();}for(var i=0,D=B.length;i<D;i++){this.add(A,B[i]);
 }return this;},reset:function(){var s=this.subs;for(var i=0;i<this.subCount;i++){s[i].buffer=[];}return this;},applyTemplate:function(A){var s=this.subs;var B=-1;this.html=this.originalHtml.replace(this.subTemplateRe,function(m,C){return s[++B].buffer.join("");
 });return Roo.MasterTemplate.superclass.applyTemplate.call(this,A);},apply:function(){return this.applyTemplate.apply(this,arguments);},compile:function(){return this;}});Roo.MasterTemplate.prototype.addAll=Roo.MasterTemplate.prototype.fill;Roo.MasterTemplate.from=function(el,A){el=Roo.getDom(el);
@@ -588,9 +590,9 @@ if(this.pressClass){this.el.removeClass(this.pressClass);}this.el.on("mouseover"
 // Roo/KeyNav.js
 Roo.KeyNav=function(el,A){this.el=Roo.get(el);Roo.apply(this,A);if(!this.disabled){this.disabled=true;this.enable();}};Roo.KeyNav.prototype={disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,prepareEvent:function(e){var k=e.getKey();var h=this.keyToHandler[k];
 if(Roo.isSafari&&h&&k>=37&&k<=40){e.stopEvent();}},relay:function(e){var k=e.getKey();var h=this.keyToHandler[k];if(h&&this[h]){if(this.doRelay(e,this[h],h)!==true){e[this.defaultEventAction]();}}},doRelay:function(e,h,A){return h.call(this.scope||this,e);
-},enter:false,left:false,right:false,up:false,down:false,tab:false,esc:false,pageUp:false,pageDown:false,del:false,home:false,end:false,keyToHandler:{37:"left",39:"right",38:"up",40:"down",33:"pageUp",34:"pageDown",46:"del",36:"home",35:"end",13:"enter",27:"esc",9:"tab"},enable:function(){if(this.disabled){if(this.forceKeyDown||Roo.isIE||Roo.isAir){this.el.on("keydown",this.relay,this);
-}else{this.el.on("keydown",this.prepareEvent,this);this.el.on("keypress",this.relay,this);}this.disabled=false;}},disable:function(){if(!this.disabled){if(this.forceKeyDown||Roo.isIE||Roo.isAir){this.el.un("keydown",this.relay);}else{this.el.un("keydown",this.prepareEvent);
-this.el.un("keypress",this.relay);}this.disabled=true;}}};
+},enter:false,left:false,right:false,up:false,down:false,tab:false,esc:false,pageUp:false,pageDown:false,del:false,home:false,end:false,keyToHandler:{37:"left",39:"right",38:"up",40:"down",33:"pageUp",34:"pageDown",46:"del",36:"home",35:"end",13:"enter",27:"esc",9:"tab"}
+,enable:function(){if(this.disabled){if(this.forceKeyDown||Roo.isIE||Roo.isAir){this.el.on("keydown",this.relay,this);}else{this.el.on("keydown",this.prepareEvent,this);this.el.on("keypress",this.relay,this);}this.disabled=false;}},disable:function(){if(!this.disabled){if(this.forceKeyDown||Roo.isIE||Roo.isAir){this.el.un("keydown",this.relay);
+}else{this.el.un("keydown",this.prepareEvent);this.el.un("keypress",this.relay);}this.disabled=true;}}};
 // Roo/KeyMap.js
 Roo.KeyMap=function(el,A,B){this.el=Roo.get(el);this.eventName=B||"keydown";this.bindings=[];if(A){this.addBinding(A);}this.enable();};Roo.KeyMap.prototype={stopEvent:false,addBinding:function(A){if(A instanceof Array){for(var i=0,B=A.length;i<B;i++){this.addBinding(A[i]);
 }return;}var C=A.key,D=A.shift,E=A.ctrl,F=A.alt,fn=A.fn,G=A.scope;if(typeof C=="string"){var ks=[];var H=C.toUpperCase();for(var j=0,B=H.length;j<B;j++){ks.push(H.charCodeAt(j));}C=ks;}var I=C instanceof Array;var J=function(e){if((!D||e.shiftKey)&&(!E||e.ctrlKey)&&(!F||e.altKey)){var k=e.getKey();
@@ -612,28 +614,28 @@ var E=v.split("^");for(var i=0,F=E.length;i<F;i++){var kv=E[i].split("=");D[kv[0
 // Roo/state/Manager.js
 Roo.state.Manager=function(){var A=new Roo.state.Provider();return {setProvider:function(B){A=B;},get:function(B,C){return A.get(B,C);},set:function(B,C){A.set(B,C);},clear:function(B){A.clear(B);},getProvider:function(){return A;}};}();
 // Roo/state/CookieProvider.js
-Roo.state.CookieProvider=function(A){Roo.state.CookieProvider.superclass.constructor.call(this);this.path="/";this.expires=new Date(new Date().getTime()+(1000*60*60*24*7));this.domain=null;this.secure=false;Roo.apply(this,A);this.state=this.readCookies();};
-Roo.extend(Roo.state.CookieProvider,Roo.state.Provider,{set:function(A,B){if(typeof B=="undefined"||B===null){this.clear(A);return;}this.setCookie(A,B);Roo.state.CookieProvider.superclass.set.call(this,A,B);},clear:function(A){this.clearCookie(A);Roo.state.CookieProvider.superclass.clear.call(this,A);
+Roo.state.CookieProvider=function(A){Roo.state.CookieProvider.superclass.constructor.call(this);this.path="/";this.expires=new Date(new Date().getTime()+(1000*60*60*24*7));this.domain=null;this.secure=false;Roo.apply(this,A);this.state=this.readCookies();}
+;Roo.extend(Roo.state.CookieProvider,Roo.state.Provider,{set:function(A,B){if(typeof B=="undefined"||B===null){this.clear(A);return;}this.setCookie(A,B);Roo.state.CookieProvider.superclass.set.call(this,A,B);},clear:function(A){this.clearCookie(A);Roo.state.CookieProvider.superclass.clear.call(this,A);
 },readCookies:function(){var A={};var c=document.cookie+";";var re=/\s?(.*?)=(.*?);/g;var B;while((B=re.exec(c))!=null){var C=B[1];var D=B[2];if(C&&C.substring(0,3)=="ys-"){A[C.substr(3)]=this.decodeValue(D);}}return A;},setCookie:function(A,B){document.cookie="ys-"+A+"="+this.encodeValue(B)+((this.expires==null)?"":("; expires="+this.expires.toGMTString()))+((this.path==null)?"":("; path="+this.path))+((this.domain==null)?"":("; domain="+this.domain))+((this.secure==true)?"; secure":"");
 },clearCookie:function(A){document.cookie="ys-"+A+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+((this.path==null)?"":("; path="+this.path))+((this.domain==null)?"":("; domain="+this.domain))+((this.secure==true)?"; secure":"");}});
 // Roo/ComponentMgr.js
 Roo.ComponentMgr=function(){var A=new Roo.util.MixedCollection();return {register:function(c){A.add(c);},unregister:function(c){A.remove(c);},get:function(id){return A.get(id);},onAvailable:function(id,fn,B){A.on("add",function(C,o){if(o.id==id){fn.call(B||o,o);
 A.un("add",fn,B);}});}};}();
 // Roo/Component.js
-Roo.Component=function(A){A=A||{};if(A.tagName||A.dom||typeof A=="string"){A={el:A,id:A.id||A};}this.initialConfig=A;Roo.apply(this,A);this.addEvents({disable:true,enable:true,beforeshow:true,show:true,beforehide:true,hide:true,beforerender:true,render:true,beforedestroy:true,destroy:true});
-if(!this.id){this.id="roo-comp-"+(++Roo.Component.AUTO_ID);}Roo.ComponentMgr.register(this);Roo.Component.superclass.constructor.call(this);this.initComponent();if(this.renderTo){this.render(this.renderTo);delete this.renderTo;}};Roo.Component.AUTO_ID=1000;
+Roo.Component=function(A){A=A||{};if(A.tagName||A.dom||typeof A=="string"){A={el:A,id:A.id||A};}this.initialConfig=A;Roo.apply(this,A);this.addEvents({disable:true,enable:true,beforeshow:true,show:true,beforehide:true,hide:true,beforerender:true,render:true,beforedestroy:true,destroy:true}
+);if(!this.id){this.id="roo-comp-"+(++Roo.Component.AUTO_ID);}Roo.ComponentMgr.register(this);Roo.Component.superclass.constructor.call(this);this.initComponent();if(this.renderTo){this.render(this.renderTo);delete this.renderTo;}};Roo.Component.AUTO_ID=1000;
 Roo.extend(Roo.Component,Roo.util.Observable,{hidden:false,disabled:false,rendered:false,disabledClass:"x-item-disabled",allowDomMove:true,hideMode:'display',ctype:"Roo.Component",actionMode:"el",getActionEl:function(){return this[this.actionMode];},initComponent:Roo.emptyFn,render:function(A,B){if(!this.rendered&&this.fireEvent("beforerender",this)!==false){if(!A&&this.el){this.el=Roo.get(this.el);
 A=this.el.dom.parentNode;this.allowDomMove=false;}this.container=Roo.get(A);this.rendered=true;if(B!==undefined){if(typeof B=='number'){B=this.container.dom.childNodes[B];}else{B=Roo.getDom(B);}}this.onRender(this.container,B||null);if(this.cls){this.el.addClass(this.cls);
 delete this.cls;}if(this.style){this.el.applyStyles(this.style);delete this.style;}this.fireEvent("render",this);this.afterRender(this.container);if(this.hidden){this.hide();}if(this.disabled){this.disable();}}return this;},onRender:function(ct,A){if(this.el){this.el=Roo.get(this.el);
 if(this.allowDomMove!==false){ct.dom.insertBefore(this.el.dom,A);}}},getAutoCreate:function(){var A=typeof this.autoCreate=="object"?this.autoCreate:Roo.apply({},this.defaultAutoCreate);if(this.id&&!A.id){A.id=this.id;}return A;},afterRender:Roo.emptyFn,destroy:function(){if(this.fireEvent("beforedestroy",this)!==false){this.purgeListeners();
-this.beforeDestroy();if(this.rendered){this.el.removeAllListeners();this.el.remove();if(this.actionMode=="container"){this.container.remove();}}this.onDestroy();Roo.ComponentMgr.unregister(this);this.fireEvent("destroy",this);}},beforeDestroy:function(){},onDestroy:function(){},getEl:function(){return this.el;
-},getId:function(){return this.id;},focus:function(A){if(this.rendered){this.el.focus();if(A===true){this.el.dom.select();}}return this;},blur:function(){if(this.rendered){this.el.blur();}return this;},disable:function(){if(this.rendered){this.onDisable();
-}this.disabled=true;this.fireEvent("disable",this);return this;},onDisable:function(){this.getActionEl().addClass(this.disabledClass);this.el.dom.disabled=true;},enable:function(){if(this.rendered){this.onEnable();}this.disabled=false;this.fireEvent("enable",this);
-return this;},onEnable:function(){this.getActionEl().removeClass(this.disabledClass);this.el.dom.disabled=false;},setDisabled:function(A){this[A?"disable":"enable"]();},show:function(){if(this.fireEvent("beforeshow",this)!==false){this.hidden=false;if(this.rendered){this.onShow();
-}this.fireEvent("show",this);}return this;},onShow:function(){var ae=this.getActionEl();if(this.hideMode=='visibility'){ae.dom.style.visibility="visible";}else if(this.hideMode=='offsets'){ae.removeClass('x-hidden');}else{ae.dom.style.display="";}},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.hidden=true;
-if(this.rendered){this.onHide();}this.fireEvent("hide",this);}return this;},onHide:function(){var ae=this.getActionEl();if(this.hideMode=='visibility'){ae.dom.style.visibility="hidden";}else if(this.hideMode=='offsets'){ae.addClass('x-hidden');}else{ae.dom.style.display="none";
-}},setVisible:function(A){if(A){this.show();}else{this.hide();}return this;},isVisible:function(){return this.getActionEl().isVisible();},cloneConfig:function(A){A=A||{};var id=A.id||Roo.id();var B=Roo.applyIf(A,this.initialConfig);B.id=id;return new this.constructor(B);
-}});
+this.beforeDestroy();if(this.rendered){this.el.removeAllListeners();this.el.remove();if(this.actionMode=="container"){this.container.remove();}}this.onDestroy();Roo.ComponentMgr.unregister(this);this.fireEvent("destroy",this);}},beforeDestroy:function(){}
+,onDestroy:function(){},getEl:function(){return this.el;},getId:function(){return this.id;},focus:function(A){if(this.rendered){this.el.focus();if(A===true){this.el.dom.select();}}return this;},blur:function(){if(this.rendered){this.el.blur();}return this;
+},disable:function(){if(this.rendered){this.onDisable();}this.disabled=true;this.fireEvent("disable",this);return this;},onDisable:function(){this.getActionEl().addClass(this.disabledClass);this.el.dom.disabled=true;},enable:function(){if(this.rendered){this.onEnable();
+}this.disabled=false;this.fireEvent("enable",this);return this;},onEnable:function(){this.getActionEl().removeClass(this.disabledClass);this.el.dom.disabled=false;},setDisabled:function(A){this[A?"disable":"enable"]();},show:function(){if(this.fireEvent("beforeshow",this)!==false){this.hidden=false;
+if(this.rendered){this.onShow();}this.fireEvent("show",this);}return this;},onShow:function(){var ae=this.getActionEl();if(this.hideMode=='visibility'){ae.dom.style.visibility="visible";}else if(this.hideMode=='offsets'){ae.removeClass('x-hidden');}else{ae.dom.style.display="";
+}},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.hidden=true;if(this.rendered){this.onHide();}this.fireEvent("hide",this);}return this;},onHide:function(){var ae=this.getActionEl();if(this.hideMode=='visibility'){ae.dom.style.visibility="hidden";
+}else if(this.hideMode=='offsets'){ae.addClass('x-hidden');}else{ae.dom.style.display="none";}},setVisible:function(A){if(A){this.show();}else{this.hide();}return this;},isVisible:function(){return this.getActionEl().isVisible();},cloneConfig:function(A){A=A||{}
+;var id=A.id||Roo.id();var B=Roo.applyIf(A,this.initialConfig);B.id=id;return new this.constructor(B);}});
 // Roo/BoxComponent.js
 Roo.BoxComponent=function(A){Roo.Component.call(this,A);this.addEvents({resize:true,move:true});};Roo.extend(Roo.BoxComponent,Roo.Component,{boxReady:false,deferHeight:false,setSize:function(w,h){if(typeof w=='object'){h=w.height;w=w.width;}if(!this.boxReady){this.width=w;
 this.height=h;return this;}if(this.lastSize&&this.lastSize.width==w&&this.lastSize.height==h){return this;}this.lastSize={width:w,height:h};var A=this.adjustSize(w,h);var aw=A.width,ah=A.height;if(aw!==undefined||ah!==undefined){var rz=this.getResizeEl();
@@ -647,21 +649,22 @@ this.boxReady=true;this.setSize(this.width,this.height);if(this.x||this.y){this.
 return this;},onResize:function(A,B,C,D){},onPosition:function(x,y){},adjustSize:function(w,h){if(this.autoWidth){w='auto';}if(this.autoHeight){h='auto';}return {width:w,height:h};},adjustPosition:function(x,y){return {x:x,y:y};}});
 // Roo/XComponent.js
 Roo.XComponent=function(A){Roo.apply(this,A);this.addEvents({'built':true});this.region=this.region||'center';Roo.XComponent.register(this);this.modules=false;this.el=false;};Roo.extend(Roo.XComponent,Roo.util.Observable,{el:false,panel:false,layout:false,disabled:false,parent:false,order:false,name:false,region:'center',items:false,_tree:false,render:function(el){el=el||false;
-var hp=this.parent?1:0;Roo.debug&&Roo.log(this);if(!el&&typeof(this.parent)=='string'&&this.parent.substring(0,1)=='#'){var A=this.parent.substr(1);this.parent=false;Roo.debug&&Roo.log(A);switch(A){case 'bootstrap-body':if(typeof(Roo.bootstrap.Body)!='undefined'){this.parent={el:new Roo.bootstrap.Body()};
-Roo.debug&&Roo.log("setting el to doc body");}else{throw "Container is bootstrap body, but Roo.bootstrap.Body is not defined";}break;case 'bootstrap':this.parent={el:true};default:el=Roo.get(A);break;}if(!el&&!this.parent){Roo.debug&&Roo.log("Warning - element can not be found :#"+A);
+var hp=this.parent?1:0;Roo.debug&&Roo.log(this);if(!el&&typeof(this.parent)=='string'&&this.parent.substring(0,1)=='#'){var A=this.parent.substr(1);this.parent=false;Roo.debug&&Roo.log(A);switch(A){case 'bootstrap-body':if(typeof(Roo.bootstrap.Body)!='undefined'){this.parent={el:new Roo.bootstrap.Body()}
+;Roo.debug&&Roo.log("setting el to doc body");}else{throw "Container is bootstrap body, but Roo.bootstrap.Body is not defined";}break;case 'bootstrap':this.parent={el:true};default:el=Roo.get(A);break;}if(!el&&!this.parent){Roo.debug&&Roo.log("Warning - element can not be found :#"+A);
 return;}}Roo.debug&&Roo.log("EL:");Roo.debug&&Roo.log(el);Roo.debug&&Roo.log("this.parent.el:");Roo.debug&&Roo.log(this.parent.el);var B=this._tree?this._tree():this.tree();var C=(typeof(Roo.bootstrap)!='undefined'&&B.xns==Roo.bootstrap)||(typeof(Roo.mailer)!='undefined'&&B.xns==Roo.mailer);
-if(!this.parent&&C){this.parent={el:true};}if(!this.parent){Roo.debug&&Roo.log("no parent - creating one");el=el?Roo.get(el):false;this.parent={el:new Roo.BorderLayout(el||document.body,{center:{titlebar:false,autoScroll:false,closeOnTab:true,tabPosition:'top',alwaysShowTabs:el&&hp?false:true,hideTabs:el||!hp?true:false,minTabWidth:140}})}}if(!this.parent.el){return;
-}B.region=B.region||this.region;if(this.parent.el===true){this.parent.el=Roo.factory(B);}this.el=this.parent.el.addxtype(B);this.fireEvent('built',this);this.panel=this.el;this.layout=this.panel.layout;this.parentLayout=this.parent.layout||false;}});Roo.apply(Roo.XComponent,{hideProgress:false,buildCompleted:false,topModule:false,modules:[],elmodules:[],build_from_html:false,register:function(A){Roo.XComponent.event.fireEvent('register',A);
-switch(typeof(A.disabled)){case 'undefined':break;case 'function':if(A.disabled()){return;}break;default:if(A.disabled){return;}break;}this.modules.push(A);},toObject:function(str){if(!str||typeof(str)=='object'){return str;}if(str.substring(0,1)=='#'){return str;
-}var ar=str.split('.');var rt,o;rt=ar.shift();try{eval('if (typeof '+rt+' == "undefined"){ o = false;} o = '+rt+';');}catch(e){throw "Module not found : "+str;}if(o===false){throw "Module not found : "+str;}Roo.each(ar,function(e){if(typeof(o[e])=='undefined'){throw "Module not found : "+str;
-}o=o[e];});return o;},preBuild:function(){var _t=this;Roo.each(this.modules,function(A){Roo.XComponent.event.fireEvent('beforebuild',A);var B=A.parent;try{A.parent=this.toObject(B);}catch(e){Roo.debug&&Roo.log("parent:toObject failed: "+e.toString());return;
-}if(!A.parent){Roo.debug&&Roo.log("GOT top level module");Roo.debug&&Roo.log(A);A.modules=new Roo.util.MixedCollection(false,function(o){return o.order+''});this.topModule=A;return;}if(typeof(A.parent)=='string'){this.elmodules.push(A);return;}if(A.parent.constructor!=Roo.XComponent){Roo.debug&&Roo.log("Warning : Object Parent is not instance of XComponent:"+A.name)}if(!A.parent.modules){A.parent.modules=new Roo.util.MixedCollection(false,function(o){return o.order+''});
-}if(A.parent.disabled){A.disabled=true;}A.parent.modules.add(A);},this);},buildOrder:function(){var A=this;var B=function(a,b){return String(a).toUpperCase()>String(b).toUpperCase()?1:-1;};if((!this.topModule||!this.topModule.modules)&&!this.elmodules.length){throw "No top level modules to build";
+if(!this.parent&&C){this.parent={el:true};}if(!this.parent){Roo.debug&&Roo.log("no parent - creating one");el=el?Roo.get(el):false;this.parent={el:new Roo.BorderLayout(el||document.body,{center:{titlebar:false,autoScroll:false,closeOnTab:true,tabPosition:'top',alwaysShowTabs:el&&hp?false:true,hideTabs:el||!hp?true:false,minTabWidth:140}
+})}}if(!this.parent.el){return;}B.region=B.region||this.region;if(this.parent.el===true){this.parent.el=Roo.factory(B);}this.el=this.parent.el.addxtype(B);this.fireEvent('built',this);this.panel=this.el;this.layout=this.panel.layout;this.parentLayout=this.parent.layout||false;
+}});Roo.apply(Roo.XComponent,{hideProgress:false,buildCompleted:false,topModule:false,modules:[],elmodules:[],build_from_html:false,register:function(A){Roo.XComponent.event.fireEvent('register',A);switch(typeof(A.disabled)){case 'undefined':break;case 'function':if(A.disabled()){return;
+}break;default:if(A.disabled){return;}break;}this.modules.push(A);},toObject:function(str){if(!str||typeof(str)=='object'){return str;}if(str.substring(0,1)=='#'){return str;}var ar=str.split('.');var rt,o;rt=ar.shift();try{eval('if (typeof '+rt+' == "undefined"){ o = false;} o = '+rt+';');
+}catch(e){throw "Module not found : "+str;}if(o===false){throw "Module not found : "+str;}Roo.each(ar,function(e){if(typeof(o[e])=='undefined'){throw "Module not found : "+str;}o=o[e];});return o;},preBuild:function(){var _t=this;Roo.each(this.modules,function(A){Roo.XComponent.event.fireEvent('beforebuild',A);
+var B=A.parent;try{A.parent=this.toObject(B);}catch(e){Roo.debug&&Roo.log("parent:toObject failed: "+e.toString());return;}if(!A.parent){Roo.debug&&Roo.log("GOT top level module");Roo.debug&&Roo.log(A);A.modules=new Roo.util.MixedCollection(false,function(o){return o.order+''}
+);this.topModule=A;return;}if(typeof(A.parent)=='string'){this.elmodules.push(A);return;}if(A.parent.constructor!=Roo.XComponent){Roo.debug&&Roo.log("Warning : Object Parent is not instance of XComponent:"+A.name)}if(!A.parent.modules){A.parent.modules=new Roo.util.MixedCollection(false,function(o){return o.order+''}
+);}if(A.parent.disabled){A.disabled=true;}A.parent.modules.add(A);},this);},buildOrder:function(){var A=this;var B=function(a,b){return String(a).toUpperCase()>String(b).toUpperCase()?1:-1;};if((!this.topModule||!this.topModule.modules)&&!this.elmodules.length){throw "No top level modules to build";
 }var C=this.topModule?[this.topModule]:[];Roo.each(this.elmodules,function(e){C.push(e);if(!this.topModule&&typeof(e.parent)=='string'&&e.parent.substring(0,1)=='#'&&Roo.get(e.parent.substr(1))){A.topModule=e;}});var D=function(m){Roo.debug&&Roo.log("build Order: add: "+m.name);
 C.push(m);if(m.modules&&!m.disabled){Roo.debug&&Roo.log("build Order: "+m.modules.length+" child modules");m.modules.keySort('ASC',B);Roo.debug&&Roo.log("build Order: "+m.modules.length+" child modules (after sort)");m.modules.each(D);}else{Roo.debug&&Roo.log("build Order: no child modules");
 }if(m.finalize){m.finalize.name=m.name+" (clean up) ";C.push(m.finalize);}};if(this.topModule&&this.topModule.modules){this.topModule.modules.keySort('ASC',B);this.topModule.modules.each(D);}return C;},build:function(A){if(typeof(A)!='undefined'){Roo.apply(this,A);
-}this.preBuild();var B=this.buildOrder();if(!B.length){throw "NO modules!!!";}var C="Building Interface...";if(!this.hideProgress&&Roo.MessageBox){Roo.MessageBox.show({title:'loading'});Roo.MessageBox.show({title:"Please wait...",msg:C,width:450,progress:true,closable:false,modal:false});
-}var D=B.length;var E=this;var F=function(){if(!B.length){Roo.debug&&Roo.log('hide?');if(!this.hideProgress&&Roo.MessageBox){Roo.MessageBox.hide();}Roo.XComponent.build_from_html=false;Roo.XComponent.event.fireEvent('buildcomplete',E.topModule);return false;
+}this.preBuild();var B=this.buildOrder();if(!B.length){throw "NO modules!!!";}var C="Building Interface...";if(!this.hideProgress&&Roo.MessageBox){Roo.MessageBox.show({title:'loading'});Roo.MessageBox.show({title:"Please wait...",msg:C,width:450,progress:true,closable:false,modal:false}
+);}var D=B.length;var E=this;var F=function(){if(!B.length){Roo.debug&&Roo.log('hide?');if(!this.hideProgress&&Roo.MessageBox){Roo.MessageBox.hide();}Roo.XComponent.build_from_html=false;Roo.XComponent.event.fireEvent('buildcomplete',E.topModule);return false;
 }var m=B.shift();Roo.debug&&Roo.log(m);if(typeof(m)=='function'){m.call(this);return F.defer(10,E);}C="Building Interface "+(D-B.length)+" of "+D+(m.name?(' - '+m.name):'');Roo.debug&&Roo.log(C);if(!this.hideProgress&&Roo.MessageBox){Roo.MessageBox.updateProgress((D-B.length)/D,C);
-}var G=(typeof(m.disabled)=='function')?m.disabled.call(m.module.disabled):m.disabled;if(G){return F();}m.render();return F.defer(10,E);};F.defer(1,E);},event:false,on:false});Roo.XComponent.event=new Roo.util.Observable({events:{'register':true,'beforebuild':true,'buildcomplete':true}});
-Roo.XComponent.on=Roo.XComponent.event.on.createDelegate(Roo.XComponent.event);
+}var G=(typeof(m.disabled)=='function')?m.disabled.call(m.module.disabled):m.disabled;if(G){return F();}m.render();return F.defer(10,E);};F.defer(1,E);},event:false,on:false});Roo.XComponent.event=new Roo.util.Observable({events:{'register':true,'beforebuild':true,'buildcomplete':true}
+});Roo.XComponent.on=Roo.XComponent.event.on.createDelegate(Roo.XComponent.event);