roojs-core.js
[roojs1] / roojs-core.js
index 652b4e9..5b5b74e 100644 (file)
@@ -18,7 +18,8 @@ i<l;i++){var a=as[i];if(a instanceof Array){r=r.concat(a);}else if(a.length!==un
 },destroy:function(){for(var i=0,a=arguments,S=a.length;i<S;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,S){return v===null||v===undefined||(!S?v==='':false);},isOpera:C,isSafari:D,isFirefox:E,isIE:F,isIE7:G,isIE11:H,isEdge:I,isGecko:J,isBorderBox:K,isWindows:L,isLinux:N,isMac:M,isIOS:P,isAndroid:Q,isTouch:R,useShims:((F&&!G)||(J&&M)),selectNode:function(S,T){var U=Roo.DomQuery.selectNode(S,T);
-return U?Roo.get(U):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");
+return U?Roo.get(U):new Roo.Element(false);},getGridSize:function(){var w=Roo.lib.Dom.getViewWidth();switch(true){case w>1200:return 'xl';case w>992:return 'lg';case w>768:return 'md';case w>576:return 'sm';default:return 'xs'}}});})();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");
+
 // 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);
 }})();Roo.apply(Function.prototype,{createCallback:function(){var A=arguments;var B=this;return function(){return B.apply(window,A);};},createDelegate:function(A,B,C){var D=this;return function(){var E=B||arguments;if(C===true){E=Array.prototype.slice.call(arguments,0);
@@ -28,27 +29,29 @@ E=E.concat(B);}else if(typeof C=="number"){E=Array.prototype.slice.call(argument
 // String.js
 Roo.applyIf(String,{escape:function(A){return A.replace(/('|\\)/g,"\\$1");},leftPad:function(A,B,ch){var C=new String(A);if(ch===null||ch===undefined||ch===''){ch=" ";}while(C.length<B){C=ch+C;}return C;},format:function(A){var B=Array.prototype.slice.call(arguments,1);
 return A.replace(/\{(\d+)\}/g,function(m,i){return Roo.util.Format.htmlEncode(B[i]);});}});String.prototype.toggle=function(A,B){return this==A?B:A;};String.prototype.unicodeClean=function(){return this.replace(/[\s\S]/g,function(A){if(A.charCodeAt()<256){return A;
-}try{encodeURIComponent(A);}catch(e){return '';}return A;});};
+}try{encodeURIComponent(A);}catch(e){return '';}return A;});};String.prototype.toUpperCaseFirst=function(){return this.charAt(0).toUpperCase()+this.slice(1);};
 // Number.js
 Roo.applyIf(Number.prototype,{constrain:function(A,B){return Math.min(Math.max(this,A),B);}});
 // Array.js
 Roo.applyIf(Array.prototype,{indexOf:function(o){for(var i=0,A=this.length;i<A;i++){if(this[i]==o){return i;}}return -1;},remove:function(o){var A=this.indexOf(o);if(A!=-1){this.splice(A,1);}},map:function(A){var B=this.length>>>0;if(typeof A!="function"){throw new TypeError();
-}var C=new Array(B);var D=arguments[1];for(var i=0;i<B;i++){if(i in this){C[i]=A.call(D,this[i],i,this);}}return C;}});
+}var C=new Array(B);var D=arguments[1];for(var i=0;i<B;i++){if(i in this){C[i]=A.call(D,this[i],i,this);}}return C;},equals:function(b){if(this===b){return true;}if(b==null){return false;}if(this.length!==b.length){return false;}for(var i=0;i<this.length;
+++i){if(this[i]!==b[i]){return false;}}return true;}});Roo.applyIf(Array,{from:function(o){var A=[];for(var i=0;i<o.length;i++){A[i]=o[i];}return A;}});
 // Date.js
-Date.prototype.getElapsed=function(A){return Math.abs((A||new Date()).getTime()-this.getTime());};Date.parseFunctions={count:0};Date.parseRegexes=[];Date.formatFunctions={count:0};Date.prototype.dateFormat=function(A){if(Date.formatFunctions[A]==null){Date.createNewFormat(A);
-}var B=Date.formatFunctions[A];return this[B]();};Date.prototype.format=Date.prototype.dateFormat;Date.createNewFormat=function(A){var B="format"+Date.formatFunctions.count++;Date.formatFunctions[A]=B;var C="Date.prototype."+B+" = function(){return ";var D=false;
-var ch='';for(var i=0;i<A.length;++i){ch=A.charAt(i);if(!D&&ch=="\\"){D=true;}else if(D){D=false;C+="'"+String.escape(ch)+"' + ";}else{C+=Date.getFormatCode(ch);}}eval(C.substring(0,C.length-3)+";}");};Date.getFormatCode=function(A){switch(A){case "d":return "String.leftPad(this.getDate(), 2, '0') + ";
-case "D":return "Date.dayNames[this.getDay()].substring(0, 3) + ";case "j":return "this.getDate() + ";case "l":return "Date.dayNames[this.getDay()] + ";case "S":return "this.getSuffix() + ";case "w":return "this.getDay() + ";case "z":return "this.getDayOfYear() + ";
-case "W":return "this.getWeekOfYear() + ";case "F":return "Date.monthNames[this.getMonth()] + ";case "m":return "String.leftPad(this.getMonth() + 1, 2, '0') + ";case "M":return "Date.monthNames[this.getMonth()].substring(0, 3) + ";case "n":return "(this.getMonth() + 1) + ";
-case "t":return "this.getDaysInMonth() + ";case "L":return "(this.isLeapYear() ? 1 : 0) + ";case "Y":return "this.getFullYear() + ";case "y":return "('' + this.getFullYear()).substring(2, 4) + ";case "a":return "(this.getHours() < 12 ? 'am' : 'pm') + ";case "A":return "(this.getHours() < 12 ? 'AM' : 'PM') + ";
-case "g":return "((this.getHours() % 12) ? this.getHours() % 12 : 12) + ";case "G":return "this.getHours() + ";case "h":return "String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0') + ";case "H":return "String.leftPad(this.getHours(), 2, '0') + ";
-case "i":return "String.leftPad(this.getMinutes(), 2, '0') + ";case "s":return "String.leftPad(this.getSeconds(), 2, '0') + ";case "O":return "this.getGMTOffset() + ";case "P":return "this.getGMTColonOffset() + ";case "T":return "this.getTimezone() + ";case "Z":return "(this.getTimezoneOffset() * -60) + ";
-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.prototype.getElapsed=function(A,B){A=A||new Date();var C=Math.abs(A.getTime()-this.getTime());switch(B){case Date.SECOND:return Math.floor(C/(1000));case Date.MINUTE:return Math.floor(C/(1000*60));case Date.HOUR:return Math.floor(C/(1000*60*60));case Date.DAY:return Math.floor(C/(1000*60*60*24));
+case Date.MONTH:return ((A.format("Y")-this.format("Y"))*12)+(A.format("m")-this.format("m"));case Date.YEAR:return (A.format("Y")-this.format("Y"));case Date.MILLI:default:return C;}};Date.parseFunctions={count:0};Date.parseRegexes=[];Date.formatFunctions={count:0}
+;Date.prototype.dateFormat=function(A){if(Date.formatFunctions[A]==null){Date.createNewFormat(A);}var B=Date.formatFunctions[A];return this[B]();};Date.prototype.format=Date.prototype.dateFormat;Date.createNewFormat=function(A){var B="format"+Date.formatFunctions.count++;
+Date.formatFunctions[A]=B;var C="Date.prototype."+B+" = function(){return ";var D=false;var ch='';for(var i=0;i<A.length;++i){ch=A.charAt(i);if(!D&&ch=="\\"){D=true;}else if(D){D=false;C+="'"+String.escape(ch)+"' + ";}else{C+=Date.getFormatCode(ch);}}eval(C.substring(0,C.length-3)+";}");
+};Date.getFormatCode=function(A){switch(A){case "d":return "String.leftPad(this.getDate(), 2, '0') + ";case "D":return "Date.dayNames[this.getDay()].substring(0, 3) + ";case "j":return "this.getDate() + ";case "l":return "Date.dayNames[this.getDay()] + ";
+case "S":return "this.getSuffix() + ";case "w":return "this.getDay() + ";case "z":return "this.getDayOfYear() + ";case "W":return "this.getWeekOfYear() + ";case "F":return "Date.monthNames[this.getMonth()] + ";case "m":return "String.leftPad(this.getMonth() + 1, 2, '0') + ";
+case "M":return "Date.monthNames[this.getMonth()].substring(0, 3) + ";case "n":return "(this.getMonth() + 1) + ";case "t":return "this.getDaysInMonth() + ";case "L":return "(this.isLeapYear() ? 1 : 0) + ";case "Y":return "this.getFullYear() + ";case "y":return "('' + this.getFullYear()).substring(2, 4) + ";
+case "a":return "(this.getHours() < 12 ? 'am' : 'pm') + ";case "A":return "(this.getHours() < 12 ? 'AM' : 'PM') + ";case "g":return "((this.getHours() % 12) ? this.getHours() % 12 : 12) + ";case "G":return "this.getHours() + ";case "h":return "String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0') + ";
+case "H":return "String.leftPad(this.getHours(), 2, '0') + ";case "i":return "String.leftPad(this.getMinutes(), 2, '0') + ";case "s":return "String.leftPad(this.getSeconds(), 2, '0') + ";case "O":return "this.getGMTOffset() + ";case "P":return "this.getGMTColonOffset() + ";
+case "T":return "this.getTimezone() + ";case "Z":return "(this.getTimezoneOffset() * -60) + ";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); v.setFullYear(y);}\n"+"else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n"+"{v = new Date(y, m, d, h, i); v.setFullYear(y);}\n"+"else if (y >= 0 && m >= 0 && d > 0 && h >= 0)\n"+"{v = new Date(y, m, d, h); v.setFullYear(y);}\n"+"else if (y >= 0 && m >= 0 && d > 0)\n"+"{v = new Date(y, m, d); v.setFullYear(y);}\n"+"else if (y >= 0 && m >= 0)\n"+"{v = new Date(y, m); v.setFullYear(y);}\n"+"else if (y >= 0)\n"+"{v = new Date(y); v.setFullYear(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 "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 = Math.max(0,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})"}
@@ -155,6 +158,24 @@ i<G;++i){if(B[i]==F){return i;}}return -1;};var E=function(F){var G=F.totalFrame
 // Roo/lib/Beizer.js
 Roo.lib.Bezier=new function(){this.getPosition=function(A,t){var n=A.length;var B=[];for(var i=0;i<n;++i){B[i]=[A[i][0],A[i][1]];}for(var j=1;j<n;++j){for(i=0;i<n-j;++i){B[i][0]=(1-t)*B[i][0]+t*B[parseInt(i+1,10)][0];B[i][1]=(1-t)*B[i][1]+t*B[parseInt(i+1,10)][1];
 }}return [B[0][0],B[0][1]];};};
+// Roo/lib/Color.js
+Roo.lib.Color=function(){};Roo.apply(Roo.lib.Color.prototype,{rgb:null,hsv:null,hsl:null,getIntegerRGB:function(){var A=this.getRGB();return {'r':Math.round(A.r),'g':Math.round(A.g),'b':Math.round(A.b),'a':A.a};},getPercentageRGB:function(){var A=this.getRGB();
+return {'r':100*A.r/255,'g':100*A.g/255,'b':100*A.b/255,'a':A.a};},getCSSHexadecimalRGB:function(){var A=this.getIntegerRGB();var B=A.r.toString(16);var C=A.g.toString(16);var D=A.b.toString(16);return '#'+(B.length==2?B:'0'+B)+(C.length==2?C:'0'+C)+(D.length==2?D:'0'+D);
+},getCSSIntegerRGB:function(){var A=this.getIntegerRGB();return 'rgb('+A.r+','+A.g+','+A.b+')';},getCSSIntegerRGBA:function(){var A=this.getIntegerRGB();return 'rgb('+A.r+','+A.g+','+A.b+','+A.a+')';},getCSSPercentageRGB:function(){var A=this.getPercentageRGB();
+return 'rgb('+A.r+'%,'+A.g+'%,'+A.b+'%)';},getCSSPercentageRGBA:function(){var A=this.getPercentageRGB();return 'rgb('+A.r+'%,'+A.g+'%,'+A.b+'%,'+A.a+')';},getCSSHSL:function(){var A=this.getHSL();return 'hsl('+A.h+','+A.s+'%,'+A.l+'%)';},getCSSHSLA:function(){var A=this.getHSL();
+return 'hsl('+A.h+','+A.s+'%,'+A.l+'%,'+A.a+')';},setNodeColor:function(A){A.style.color=this.getCSSHexadecimalRGB();},setNodeBackgroundColor:function(A){A.style.backgroundColor=this.getCSSHexadecimalRGB();},toRGB:function(){var r=this.getIntegerRGB();return new Roo.lib.RGBColor(r.r,r.g,r.b,r.a);
+},toHSL:function(){var A=this.getHSL();return new Roo.lib.HSLColor(A.h,A.s,A.l,A.a);},toHSV:function(){var A=this.toRGB();var B=A.getHSV();return new Roo.lib.HSVColor(B.h,B.s,B.v,B.a);},saturate:function(v){var A=this.toRGB();var B=A.getHSV();return new Roo.lib.HSVColor(B.h,B.s*v,B.v,B.a);
+},getRGB:function(){return {'r':this.rgb.r,'g':this.rgb.g,'b':this.rgb.b,'a':this.alpha};},getHSV:function(){if(this.hsv==null){this.calculateHSV();}return {'h':this.hsv.h,'s':this.hsv.s,'v':this.hsv.v,'a':this.alpha};},getHSL:function(){if(this.hsl==null){this.calculateHSL();
+}return {'h':this.hsl.h,'s':this.hsl.s,'l':this.hsl.l,'a':this.alpha};}});Roo.lib.RGBColor=function(r,g,b,a){this.alpha=(a===undefined?1:Math.max(0,Math.min(1,a)));this.rgb={'r':Math.max(0,Math.min(255,r)),'g':Math.max(0,Math.min(255,g)),'b':Math.max(0,Math.min(255,b))}
+;};Roo.extend(Roo.lib.RGBColor,Roo.lib.Color,{getHue:function(A,B){var C=this.rgb;if(B==0){var D=0;}else{switch(A){case C.r:var D=(C.g-C.b)/B*60;if(D<0){D+=360;}break;case C.g:var D=(C.b-C.r)/B*60+120;break;case C.b:var D=(C.r-C.g)/B*60+240;break;}}return D;
+},calculateHSV:function(){var A=this.rgb;var B=Math.max(A.r,A.g,A.b);var C=B-Math.min(A.r,A.g,A.b);this.hsv={'h':this.getHue(B,C),'s':(B==0?0:100*C/B),'v':B/2.55};},calculateHSL:function(){var A=this.rgb;var B=Math.max(A.r,A.g,A.b);var C=B-Math.min(A.r,A.g,A.b);
+var l=B/255-C/510;this.hsl={'h':this.getHue(B,C),'s':(C==0?0:C/2.55/(l<0.5?l*2:2-l*2)),'l':100*l};}});Roo.lib.HSVColor=function(h,s,v,a){this.alpha=(a===undefined?1:Math.max(0,Math.min(1,a)));this.hsv={'h':(h%360+360)%360,'s':Math.max(0,Math.min(100,s)),'v':Math.max(0,Math.min(100,v))}
+;this.rgb=null;this.hsl=null;};Roo.extend(Roo.lib.HSVColor,Roo.lib.Color,{calculateRGB:function(){var A=this.hsv;if(A.s==0){var r=A.v;var g=A.v;var b=A.v;}else{var f=A.h/60-Math.floor(A.h/60);var p=A.v*(1-A.s/100);var q=A.v*(1-A.s/100*f);var t=A.v*(1-A.s/100*(1-f));
+switch(Math.floor(A.h/60)){case 0:var r=A.v;var g=t;var b=p;break;case 1:var r=q;var g=A.v;var b=p;break;case 2:var r=p;var g=A.v;var b=t;break;case 3:var r=p;var g=q;var b=A.v;break;case 4:var r=t;var g=p;var b=A.v;break;case 5:var r=A.v;var g=p;var b=q;
+break;}}this.rgb={'r':r*2.55,'g':g*2.55,'b':b*2.55};},calculateHSL:function(){var A=this.hsv;var l=(2-A.s/100)*A.v/2;this.hsl={'h':A.h,'s':A.s*A.v/(l<50?l*2:200-l*2),'l':l};if(isNaN(hsl.s)){hsl.s=0;}}});Roo.lib.HSLColor=function(h,s,l,a){this.alpha=(a===undefined?1:Math.max(0,Math.min(1,a)));
+this.hsl={'h':(h%360+360)%360,'s':Math.max(0,Math.min(100,s)),'l':Math.max(0,Math.min(100,l))};};Roo.extend(Roo.lib.HSLColor,Roo.lib.Color,{calculateRGB:function(){if(this.hsl.s==0){this.rgb={'r':this.hsl.l*2.55,'g':this.hsl.l*2.55,'b':this.hsl.l*2.55};}else{var p=this.hsl.l<50?this.hsl.l*(1+hsl.s/100):this.hsl.l+hsl.s-hsl.l*hsl.s/100;
+var q=2*hsl.l-p;this.rgb={'r':(h+120)/60%6,'g':h/60,'b':(h+240)/60%6};for(var A in this.rgb){if(this.rgb.hasOwnProperty(A)){if(this.rgb[A]<1){this.rgb[A]=q+(p-q)*this.rgb[A];}else if(this.rgb[A]<3){this.rgb[A]=p;}else if(this.rgb[A]<4){this.rgb[A]=q+(p-q)*(4-this.rgb[A]);
+}else{this.rgb[A]=q;}this.rgb[A]*=2.55;}}}},calculateHSV:function(){var t=this.hsl.s*(this.hsl.l<50?this.hsl.l:100-this.hsl.l)/100;this.hsv={'h':this.hsl.h,'s':200*t/(this.hsl.l+t),'v':t+this.hsl.l};if(isNaN(this.hsv.s)){this.hsv.s=0;}}});
 // Roo/lib/ColorAnim.js
 (function(){Roo.lib.ColorAnim=function(el,D,E,F){Roo.lib.ColorAnim.superclass.constructor.call(this,el,D,E,F);};Roo.extend(Roo.lib.ColorAnim,Roo.lib.AnimBase);var A=Roo.lib.AnimBase.fly;var Y=Roo.lib;var B=Y.ColorAnim.superclass;var C=Y.ColorAnim.prototype;
 C.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return ("ColorAnim "+id);};C.patterns.color=/color$/i;C.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;C.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;C.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;
@@ -189,75 +210,100 @@ i<J;++i){H[i]=[G[0]+H[i][0],G[1]+H[i][1]];}}this.runtimeAttributes[E]=[G];if(H.l
 var id=el.id||el.tagName;return ("Scroll "+id);};B.doMethod=function(C,D,E){var F=null;if(C=='scroll'){F=[this.method(this.currentFrame,D[0],E[0]-D[0],this.totalFrames),this.method(this.currentFrame,D[1],E[1]-D[1],this.totalFrames)];}else{F=A.doMethod.call(this,C,D,E);
 }return F;};B.getAttribute=function(C){var D=null;var el=this.getEl();if(C=='scroll'){D=[el.scrollLeft,el.scrollTop];}else{D=A.getAttribute.call(this,C);}return D;};B.setAttribute=function(C,D,E){var el=this.getEl();if(C=='scroll'){el.scrollLeft=D[0];el.scrollTop=D[1];
 }else{A.setAttribute.call(this,C,D,E);}};})();
+// Roo/lib/UndoManager.js
+Roo.lib.UndoManager=function(A,B){this.stack=[];this.limit=A;this.scope=B;this.fireEvent=typeof CustomEvent!='undefined'&&B&&B.dispatchEvent;if(this.fireEvent){this.bindEvents();}this.reset();};Roo.lib.UndoManager.prototype={limit:false,stack:false,scope:false,fireEvent:false,position:0,length:0,transact:function(A,B){if(arguments.length<2){throw new TypeError('Not enough arguments to UndoManager.transact.');
+}A.execute();this.stack.splice(0,this.position);if(B&&this.length){this.stack[0].push(A);}else{this.stack.unshift([A]);}this.position=0;if(this.limit&&this.stack.length>this.limit){this.length=this.stack.length=this.limit;}else{this.length=this.stack.length;
+}if(this.fireEvent){this.scope.dispatchEvent(new CustomEvent('DOMTransaction',{detail:{transactions:this.stack[0].slice()},bubbles:true,cancelable:false}));}},undo:function(){if(this.position<this.length){for(var i=this.stack[this.position].length-1;i>=0;
+i--){this.stack[this.position][i].undo();}this.position++;if(this.fireEvent){this.scope.dispatchEvent(new CustomEvent('undo',{detail:{transactions:this.stack[this.position-1].slice()},bubbles:true,cancelable:false}));}}},redo:function(){if(this.position>0){for(var i=0,n=this.stack[this.position-1].length;
+i<n;i++){this.stack[this.position-1][i].redo();}this.position--;if(this.fireEvent){this.scope.dispatchEvent(new CustomEvent('redo',{detail:{transactions:this.stack[this.position].slice()},bubbles:true,cancelable:false}));}}},item:function(A){if(A>=0&&A<this.length){return this.stack[A].slice();
+}return null;},clearUndo:function(){this.stack.length=this.length=this.position;},clearRedo:function(){this.stack.splice(0,this.position);this.position=0;this.length=this.stack.length;},reset:function(){this.stack=[];this.position=0;this.length=0;this.current_html=this.scope.innerHTML;
+if(this.timer!==false){clearTimeout(this.timer);}this.timer=false;this.merge=false;this.addEvent();},current_html:'',timer:false,merge:false,bindEvents:function(){var el=this.scope;el.undoManager=this;this.scope.addEventListener('keydown',function(e){if((e.ctrlKey||e.metaKey)&&e.keyCode===90){if(e.shiftKey){el.undoManager.redo();
+}else{el.undoManager.undo();}e.preventDefault();}});this.scope.addEventListener('keyup',function(e){if((e.ctrlKey||e.metaKey)&&e.keyCode===90){e.preventDefault();}});var t=this;el.addEventListener('input',function(e){if(el.innerHTML==t.current_html){return;
+}if(t.timer!==false){clearTimeout(t.timer);t.timer=false;}t.timer=setTimeout(function(){t.merge=false;},1000);t.addEvent(t.merge);t.merge=true;});},addEvent:function(A){A=typeof(A)=='undefined'?false:A;this.scope.undoManager.transact({scope:this.scope,oldHTML:this.current_html,newHTML:this.scope.innerHTML,execute:function(){}
+,undo:function(){this.scope.innerHTML=this.current_html=this.oldHTML;},redo:function(){this.scope.innerHTML=this.current_html=this.newHTML;}},false);this.merge=A;this.current_html=this.scope.innerHTML;}};
+// Roo/lib/Range.js
+Roo.lib.Range=function(){};Roo.lib.Range.wrap=function(r){return Roo.apply(r,Roo.lib.Range.prototype);};Roo.apply(Roo.lib.Range.prototype,{closest:function(A){if(typeof(A)!='string'){for(var i=0;i<A.length;i++){var r=this.closest(A[i]);if(r!==false){return r;
+}}return false;}A=A.toLowerCase();var n=this.commonAncestorContainer;while(n.nodeType!=1){n=n.parentNode;}if(n.nodeName.toLowerCase()==A){return n;}if(n.nodeName.toLowerCase()=='body'){return false;}return n.closest(A)||false;},cloneRange:function(){return Roo.lib.Range.wrap(Range.prototype.cloneRange.call(this));
+}});
+// Roo/lib/Selection.js
+Roo.lib.Selection=function(){};Roo.lib.Selection.wrap=function(r,A){Roo.apply(r,Roo.lib.Selection.prototype);r.ownerDocument=A;return r;};Roo.apply(Roo.lib.Selection.prototype,{ownerDocument:false,getRangeAt:function(n){return Roo.lib.Range.wrap(Selection.prototype.getRangeAt.call(this,n));
+},insertNode:function(A,B){if(typeof(A)=='string'){A=this.ownerDocument.createElement(A);if(B=='in'){A.innerHTML='&nbsp;';}}var C=this.getRangeAt(0);if(this.type!='Caret'){C.deleteContents();}var sn=A.childNodes[0];C.insertNode(A);if(B=='after'){A.insertAdjacentHTML('afterend','&nbsp;');
+sn=A.nextSibling;}if(B=='none'){return;}this.cursorText(sn);},cursorText:function(n){range=Roo.lib.Range.wrap(new Range());var ix=Array.from(n.parentNode.childNodes).indexOf(n);range.setStart(n.parentNode,ix);range.setEnd(n.parentNode,ix+1);this.removeAllRanges();
+this.addRange(range);Roo.log([n,range,this,this.baseOffset,this.extentOffset,this.type]);},cursorAfter:function(n){if(!n.nextSibling||n.nextSibling.nodeValue!='&nbsp;'){n.insertAdjacentHTML('afterend','&nbsp;');}this.cursorText(n.nextSibling);}});
 // Roo/DomHelper.js
 if(typeof Range!="undefined"&&typeof Range.prototype.createContextualFragment=="undefined"){Range.prototype.createContextualFragment=function(A){var B=window.document;var C=B.createElement("div");C.innerHTML=A;var D=B.createDocumentFragment(),n;while((n=C.firstChild)){D.appendChild(n);
 }return D;};}Roo.DomHelper=function(){var A=null;var B=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var C=/^table|tbody|tr|td$/i;var D={};var E=function(o){if(typeof o=='string'){return o;}var b="";if(!o.tag){o.tag="div";}b+="<"+o.tag;
-for(var M in o){if(M=="tag"||M=="children"||M=="cn"||M=="html"||typeof o[M]=="function"){continue;}if(M=="style"){var s=o["style"];if(typeof s=="function"){s=s.call();}if(typeof s=="string"){b+=' style="'+s+'"';}else if(typeof s=="object"){b+=' style="';for(var N in s){if(typeof s[N]!="function"){b+=N+":"+s[N]+";";
-}}b+='"';}}else{if(M=="cls"){b+=' class="'+o["cls"]+'"';}else if(M=="htmlFor"){b+=' for="'+o["htmlFor"]+'"';}else{b+=" "+M+'="'+o[M]+'"';}}}if(B.test(o.tag)){b+="/>";}else{b+=">";var cn=o.children||o.cn;if(cn){if((cn instanceof Array)||(Roo.isSafari&&typeof(cn.join)=="function")){for(var i=0,O=cn.length;
-i<O;i++){b+=E(cn[i],b);}}else{b+=E(cn,b);}}if(o.html){b+=o.html;}b+="</"+o.tag+">";}return b;};var F=function(o,M){var ns=false;if(o.ns&&o.ns!='html'){if(o.xmlns&&typeof(D[o.ns])=='undefined'){D[o.ns]=o.xmlns;ns=o.xmlns;}if(typeof(D[o.ns])=='undefined'){console.log("Trying to create namespace element "+o.ns+", however no xmlns was sent to builder previously");
-}ns=D[o.ns];}if(typeof(o)=='string'){return M.appendChild(document.createTextNode(o));}o.tag=o.tag||div;if(o.ns&&Roo.isIE){ns=false;o.tag=o.ns+':'+o.tag;}var el=ns?document.createElementNS(ns,o.tag||'div'):document.createElement(o.tag||'div');var N=el.setAttribute?true:false;
-for(var O in o){if(O=="tag"||O=="ns"||O=="xmlns"||O=="children"||O=="cn"||O=="html"||O=="style"||typeof o[O]=="function"){continue;}if(O=="cls"&&Roo.isIE){el.className=o["cls"];}else{if(N){el.setAttribute(O=="cls"?'class':O,o[O]);}else{el[O]=o[O];}}}Roo.DomHelper.applyStyles(el,o.style);
-var cn=o.children||o.cn;if(cn){if((cn instanceof Array)||(Roo.isSafari&&typeof(cn.join)=="function")){for(var i=0,P=cn.length;i<P;i++){F(cn[i],el);}}else{F(cn,el);}}if(o.html){el.innerHTML=o.html;}if(M){M.appendChild(el);}return el;};var G=function(M,s,h,e){A.innerHTML=[s,h,e].join('');
-var i=-1,el=A;while(++i<M){el=el.firstChild;}return el;};var ts='<table>',te='</table>',H=ts+'<tbody>',I='</tbody>'+te,J=H+'<tr>',K='</tr>'+I;var L=function(M,N,el,O){if(!A){A=document.createElement('div');}var P;var Q=null;if(M=='td'){if(N=='afterbegin'||N=='beforeend'){return;
-}if(N=='beforebegin'){Q=el;el=el.parentNode;}else{Q=el.nextSibling;el=el.parentNode;}P=G(4,J,O,K);}else if(M=='tr'){if(N=='beforebegin'){Q=el;el=el.parentNode;P=G(3,H,O,I);}else if(N=='afterend'){Q=el.nextSibling;el=el.parentNode;P=G(3,H,O,I);}else{if(N=='afterbegin'){Q=el.firstChild;
-}P=G(4,J,O,K);}}else if(M=='tbody'){if(N=='beforebegin'){Q=el;el=el.parentNode;P=G(2,ts,O,te);}else if(N=='afterend'){Q=el.nextSibling;el=el.parentNode;P=G(2,ts,O,te);}else{if(N=='afterbegin'){Q=el.firstChild;}P=G(3,H,O,I);}}else{if(N=='beforebegin'||N=='afterend'){return;
-}if(N=='afterbegin'){Q=el.firstChild;}P=G(2,ts,O,te);}el.insertBefore(P,Q);return P;};return {useDom:false,markup:function(o){return E(o);},applyStyles:function(el,M){if(M){el=Roo.fly(el);if(typeof M=="string"){var re=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;var N;
-while((N=re.exec(M))!=null){el.setStyle(N[1],N[2]);}}else if(typeof M=="object"){for(var O in M){el.setStyle(O,M[O]);}}else if(typeof M=="function"){Roo.DomHelper.applyStyles(el,M.call());}}},insertHtml:function(M,el,N){M=M.toLowerCase();if(el.insertAdjacentHTML){if(C.test(el.tagName)){var rs;
-if(rs=L(el.tagName.toLowerCase(),M,el,N)){return rs;}}switch(M){case "beforebegin":el.insertAdjacentHTML('BeforeBegin',N);return el.previousSibling;case "afterbegin":el.insertAdjacentHTML('AfterBegin',N);return el.firstChild;case "beforeend":el.insertAdjacentHTML('BeforeEnd',N);
-return el.lastChild;case "afterend":el.insertAdjacentHTML('AfterEnd',N);return el.nextSibling;}throw 'Illegal insertion point -> "'+M+'"';}var O=el.ownerDocument.createRange();var P;switch(M){case "beforebegin":O.setStartBefore(el);P=O.createContextualFragment(N);
-el.parentNode.insertBefore(P,el);return el.previousSibling;case "afterbegin":if(el.firstChild){O.setStartBefore(el.firstChild);P=O.createContextualFragment(N);el.insertBefore(P,el.firstChild);return el.firstChild;}else{el.innerHTML=N;return el.firstChild;
-}case "beforeend":if(el.lastChild){O.setStartAfter(el.lastChild);P=O.createContextualFragment(N);el.appendChild(P);return el.lastChild;}else{el.innerHTML=N;return el.lastChild;}case "afterend":O.setStartAfter(el);P=O.createContextualFragment(N);el.parentNode.insertBefore(P,el.nextSibling);
-return el.nextSibling;}throw 'Illegal insertion point -> "'+M+'"';},insertBefore:function(el,o,M){return this.doInsert(el,o,M,"beforeBegin");},insertAfter:function(el,o,M){return this.doInsert(el,o,M,"afterEnd","nextSibling");},insertFirst:function(el,o,M){return this.doInsert(el,o,M,"afterBegin");
-},doInsert:function(el,o,M,N,O){el=Roo.getDom(el);var P;if(this.useDom||o.ns){P=F(o,null);el.parentNode.insertBefore(P,O?el[O]:el);}else{var Q=E(o);P=this.insertHtml(N,el,Q);}return M?Roo.get(P,true):P;},append:function(el,o,M){el=Roo.getDom(el);var N;if(this.useDom||o.ns){N=F(o,null);
-el.appendChild(N);}else{var O=E(o);N=this.insertHtml("beforeEnd",el,O);}return M?Roo.get(N,true):N;},overwrite:function(el,o,M){el=Roo.getDom(el);if(o.ns){while(el.childNodes.length){el.removeChild(el.firstChild);}F(o,el);}else{el.innerHTML=E(o);}return M?Roo.get(el.firstChild,true):el.firstChild;
-},createTemplate:function(o){var M=E(o);return new Roo.Template(M);}};}();
+for(var N in o){if(N=="tag"||N=="children"||N=="cn"||N=="html"||typeof o[N]=="function"){continue;}if(N=="style"){var s=o["style"];if(typeof s=="function"){s=s.call();}if(typeof s=="string"){b+=' style="'+s+'"';}else if(typeof s=="object"){b+=' style="';for(var O in s){if(typeof s[O]!="function"){b+=O+":"+s[O]+";";
+}}b+='"';}}else{if(N=="cls"){b+=' class="'+o["cls"]+'"';}else if(N=="htmlFor"){b+=' for="'+o["htmlFor"]+'"';}else{b+=" "+N+'="'+o[N]+'"';}}}if(B.test(o.tag)){b+="/>";}else{b+=">";var cn=o.children||o.cn;if(cn){if((cn instanceof Array)||(Roo.isSafari&&typeof(cn.join)=="function")){for(var i=0,P=cn.length;
+i<P;i++){b+=E(cn[i],b);}}else{b+=E(cn,b);}}if(o.html){b+=o.html;}b+="</"+o.tag+">";}return b;};var F=function(o,N){var ns=false;if(o.ns&&o.ns!='html'){if(o.xmlns&&typeof(D[o.ns])=='undefined'){D[o.ns]=o.xmlns;ns=o.xmlns;}if(typeof(D[o.ns])=='undefined'){console.log("Trying to create namespace element "+o.ns+", however no xmlns was sent to builder previously");
+}ns=D[o.ns];}if(typeof(o)=='string'){return N.appendChild(document.createTextNode(o));}o.tag=o.tag||div;if(o.ns&&Roo.isIE){ns=false;o.tag=o.ns+':'+o.tag;}var el=ns?document.createElementNS(ns,o.tag||'div'):document.createElement(o.tag||'div');var O=el.setAttribute?true:false;
+for(var P in o){if(P=="tag"||P=="ns"||P=="xmlns"||P=="children"||P=="cn"||P=="html"||P=="style"||typeof o[P]=="function"){continue;}if(P=="cls"&&Roo.isIE){el.className=o["cls"];}else{if(O){el.setAttribute(P=="cls"?'class':P,o[P]);}else{el[P]=o[P];}}}Roo.DomHelper.applyStyles(el,o.style);
+var cn=o.children||o.cn;if(cn){if((cn instanceof Array)||(Roo.isSafari&&typeof(cn.join)=="function")){for(var i=0,Q=cn.length;i<Q;i++){F(cn[i],el);}}else{F(cn,el);}}if(o.html){el.innerHTML=o.html;}if(N){N.appendChild(el);}return el;};var G=function(N,s,h,e){A.innerHTML=[s,h,e].join('');
+var i=-1,el=A;while(++i<N&&el.firstChild){el=el.firstChild;}return el;};var ts='<table>',te='</table>',H=ts+'<tbody>',I='</tbody>'+te,J=H+'<tr>',K='</tr>'+I;var L=function(N,O,el,P){if(!A){A=document.createElement('div');}var Q;var R=null;if(N=='td'){if(O=='afterbegin'||O=='beforeend'){return;
+}if(O=='beforebegin'){R=el;el=el.parentNode;}else{R=el.nextSibling;el=el.parentNode;}Q=G(4,J,P,K);}else if(N=='tr'){if(O=='beforebegin'){R=el;el=el.parentNode;Q=G(3,H,P,I);}else if(O=='afterend'){R=el.nextSibling;el=el.parentNode;Q=G(3,H,P,I);}else{if(O=='afterbegin'){R=el.firstChild;
+}Q=G(4,J,P,K);}}else if(N=='tbody'){if(O=='beforebegin'){R=el;el=el.parentNode;Q=G(2,ts,P,te);}else if(O=='afterend'){R=el.nextSibling;el=el.parentNode;Q=G(2,ts,P,te);}else{if(O=='afterbegin'){R=el.firstChild;}Q=G(3,H,P,I);}}else{if(O=='beforebegin'||O=='afterend'){return;
+}if(O=='afterbegin'){R=el.firstChild;}Q=G(2,ts,P,te);}el.insertBefore(Q,R);return Q;};var M=function(N,to){Roo.log(["UpdateNode",N,to]);if(N.nodeType!=to.nodeType){Roo.log(["ReplaceChild - mismatch notType",to,N]);N.parentNode.replaceChild(to,N);}if(N.nodeType==3){if(N.data==to.data){return;
+}N.data=to.data;return;}if(!N.parentNode){return;}if(N.nodeType!=1||N.tagName!=to.tagName){Roo.log(["ReplaceChild",N,to]);N.parentNode.replaceChild(to,N);return;}var ar=Array.from(N.attributes);for(var i=0;i<ar.length;i++){if(to.hasAttribute(ar[i].name)){continue;
+}if(ar[i].name=='id'){continue;}Roo.log("removeAttribute"+ar[i].name);N.removeAttribute(ar[i].name);}ar=to.attributes;for(var i=0;i<ar.length;i++){if(N.getAttribute(ar[i].name)==to.getAttribute(ar[i].name)){Roo.log("skipAttribute "+ar[i].name+'='+to.getAttribute(ar[i].name));
+continue;}Roo.log("updateAttribute "+ar[i].name+'=>'+to.getAttribute(ar[i].name));N.setAttribute(ar[i].name,to.getAttribute(ar[i].name));}var O=Array.from(N.childNodes);var P=Array.from(to.childNodes);for(var i=0;i<Math.max(P.length,O.length);i++){if(i>=O.length){N.appendChild(P[i]);
+Roo.log(["add",P[i]]);}else if(i>=P.length){N.removeChild(O[i]);Roo.log(["remove",O[i]]);}else{M(O[i],P[i]);}}};return {useDom:false,markup:function(o){return E(o);},applyStyles:function(el,N){if(N){el=Roo.fly(el);if(typeof N=="string"){var re=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;
+var O;while((O=re.exec(N))!=null){el.setStyle(O[1],O[2]);}}else if(typeof N=="object"){for(var P in N){el.setStyle(P,N[P]);}}else if(typeof N=="function"){Roo.DomHelper.applyStyles(el,N.call());}}},insertHtml:function(N,el,O){N=N.toLowerCase();if(el.insertAdjacentHTML){if(C.test(el.tagName)){var rs;
+if(rs=L(el.tagName.toLowerCase(),N,el,O)){return rs;}}switch(N){case "beforebegin":el.insertAdjacentHTML('BeforeBegin',O);return el.previousSibling;case "afterbegin":el.insertAdjacentHTML('AfterBegin',O);return el.firstChild;case "beforeend":el.insertAdjacentHTML('BeforeEnd',O);
+return el.lastChild;case "afterend":el.insertAdjacentHTML('AfterEnd',O);return el.nextSibling;}throw 'Illegal insertion point -> "'+N+'"';}var P=el.ownerDocument.createRange();var Q;switch(N){case "beforebegin":P.setStartBefore(el);Q=P.createContextualFragment(O);
+el.parentNode.insertBefore(Q,el);return el.previousSibling;case "afterbegin":if(el.firstChild){P.setStartBefore(el.firstChild);Q=P.createContextualFragment(O);el.insertBefore(Q,el.firstChild);return el.firstChild;}else{el.innerHTML=O;return el.firstChild;
+}case "beforeend":if(el.lastChild){P.setStartAfter(el.lastChild);Q=P.createContextualFragment(O);el.appendChild(Q);return el.lastChild;}else{el.innerHTML=O;return el.lastChild;}case "afterend":P.setStartAfter(el);Q=P.createContextualFragment(O);el.parentNode.insertBefore(Q,el.nextSibling);
+return el.nextSibling;}throw 'Illegal insertion point -> "'+N+'"';},insertBefore:function(el,o,N){return this.doInsert(el,o,N,"beforeBegin");},insertAfter:function(el,o,N){return this.doInsert(el,o,N,"afterEnd","nextSibling");},insertFirst:function(el,o,N){return this.doInsert(el,o,N,"afterBegin");
+},doInsert:function(el,o,N,O,P){el=Roo.getDom(el);var Q;if(this.useDom||o.ns){Q=F(o,null);el.parentNode.insertBefore(Q,P?el[P]:el);}else{var R=E(o);Q=this.insertHtml(O,el,R);}return N?Roo.get(Q,true):Q;},append:function(el,o,N){el=Roo.getDom(el);var O;if(this.useDom||o.ns){O=F(o,null);
+el.appendChild(O);}else{var P=E(o);O=this.insertHtml("beforeEnd",el,P);}return N?Roo.get(O,true):O;},overwrite:function(el,o,N){el=Roo.getDom(el);if(o.ns){while(el.childNodes.length){el.removeChild(el.firstChild);}F(o,el);}else{el.innerHTML=E(o);}return N?Roo.get(el.firstChild,true):el.firstChild;
+},createTemplate:function(o){var N=E(o);return new Roo.Template(N);},update:function(el,o){M(Roo.getDom(el),F(o));}};}();
 // Roo/Template.js
-Roo.Template=function(A){if(A instanceof Array){A=A.join("");}else if(arguments.length>1){A=Array.prototype.join.call(arguments,"");}if(typeof(A)=='object'){Roo.apply(this,A)}else{this.html=A;}if(this.url){this.load();}};Roo.Template.prototype={url:false,html:'',applyTemplate:function(A){Roo.log(["applyTemplate",A]);
-try{if(this.compiled){return this.compiled(A);}var B=this.disableFormats!==true;var fm=Roo.util.Format,C=this;var fn=function(m,D,E,F){if(E&&B){if(E.substr(0,5)=="this."){return C.call(E.substr(5),A[D],A);}else{if(F){var re=/^\s*['"](.*)["']\s*$/;F=F.split(',');
-for(var i=0,G=F.length;i<G;i++){F[i]=F[i].replace(re,"$1");}F=[A[D]].concat(F);}else{F=[A[D]];}return fm[E].apply(fm,F);}}else{return A[D]!==undefined?A[D]:"";}};return this.html.replace(this.re,fn);}catch(e){Roo.log(e);throw e;}},loading:false,load:function(){if(this.loading){return;
-}var _t=this;this.loading=true;this.compiled=false;var cx=new Roo.data.Connection();cx.request({url:this.url,method:'GET',success:function(A){_t.loading=false;_t.html=A.responseText;_t.url=false;_t.compile();},failure:function(A){Roo.log("Template failed to load from "+_t.url);
-_t.loading=false;}});},set:function(A,B){this.html=A;this.compiled=null;if(B){this.compile();}return this;},disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var fm=Roo.util.Format;var A=this.disableFormats!==true;var B=Roo.isGecko?"+":",";
-var fn=function(m,D,E,F){if(E&&A){F=F?','+F:"";if(E.substr(0,5)!="this."){E="fm."+E+'(';}else{E='this.call("'+E.substr(5)+'", ';F=", values";}}else{F='';E="(values['"+D+"'] == undefined ? '' : ";}return "'"+B+E+"values['"+D+"']"+F+")"+B+"'";};var C;if(Roo.isGecko){C="this.compiled = function(values){ return '"+this.html.replace(/\\/g,'\\\\').replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn)+"';};";
-}else{C=["this.compiled = function(values){ return ['"];C.push(this.html.replace(/\\/g,'\\\\').replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn));C.push("'].join('');};");C=C.join('');}eval(C);return this;},call:function(A,B,C){return this[A](B,C);
-},insertFirst:function(el,A,B){return this.doInsert('afterBegin',el,A,B);},insertBefore:function(el,A,B){return this.doInsert('beforeBegin',el,A,B);},insertAfter:function(el,A,B){return this.doInsert('afterEnd',el,A,B);},append:function(el,A,B){return this.doInsert('beforeEnd',el,A,B);
-},doInsert:function(A,el,B,C){el=Roo.getDom(el);var D=Roo.DomHelper.insertHtml(A,el,this.applyTemplate(B));return C?Roo.get(D,true):D;},overwrite:function(el,A,B){el=Roo.getDom(el);el.innerHTML=this.applyTemplate(A);return B?Roo.get(el.firstChild,true):el.firstChild;
-}};Roo.Template.prototype.apply=Roo.Template.prototype.applyTemplate;Roo.DomHelper.Template=Roo.Template;Roo.Template.from=function(el){el=Roo.getDom(el);return new Roo.Template(el.value||el.innerHTML);};
+Roo.Template=function(A){if(A instanceof Array){A=A.join("");}else if(arguments.length>1){A=Array.prototype.join.call(arguments,"");}if(typeof(A)=='object'){Roo.apply(this,A)}else{this.html=A;}if(this.url){this.load();}};Roo.Template.prototype={onLoad:false,url:false,html:'',compiled:false,loaded:false,applyTemplate:function(A){try{if(this.compiled){return this.compiled(A);
+}var B=this.disableFormats!==true;var fm=Roo.util.Format,C=this;var fn=function(m,D,E,F){if(E&&B){if(E.substr(0,5)=="this."){return C.call(E.substr(5),A[D],A);}else{if(F){var re=/^\s*['"](.*)["']\s*$/;F=F.split(',');for(var i=0,G=F.length;i<G;i++){F[i]=F[i].replace(re,"$1");
+}F=[A[D]].concat(F);}else{F=[A[D]];}return fm[E].apply(fm,F);}}else{return A[D]!==undefined?A[D]:"";}};return this.html.replace(this.re,fn);}catch(e){Roo.log(e);throw e;}},loading:false,load:function(){if(this.loading){return;}var _t=this;this.loading=true;
+this.compiled=false;var cx=new Roo.data.Connection();cx.request({url:this.url,method:'GET',success:function(A){_t.loading=false;_t.url=false;_t.set(A.responseText,true);_t.loaded=true;if(_t.onLoad){_t.onLoad();}},failure:function(A){Roo.log("Template failed to load from "+_t.url);
+_t.loading=false;}});},set:function(A,B){this.html=A;this.compiled=false;if(B){this.compile();}return this;},disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var fm=Roo.util.Format;var A=this.disableFormats!==true;
+var B=Roo.isGecko?"+":",";var fn=function(m,D,E,F){if(E&&A){F=F?','+F:"";if(E.substr(0,5)!="this."){E="fm."+E+'(';}else{E='this.call("'+E.substr(5)+'", ';F=", values";}}else{F='';E="(values['"+D+"'] == undefined ? '' : ";}return "'"+B+E+"values['"+D+"']"+F+")"+B+"'";
+};var C;if(Roo.isGecko){C="this.compiled = function(values){ return '"+this.html.replace(/\\/g,'\\\\').replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn)+"';};";}else{C=["this.compiled = function(values){ return ['"];C.push(this.html.replace(/\\/g,'\\\\').replace(/(\r\n|\n)/g,'\\n').replace(/'/g,"\\'").replace(this.re,fn));
+C.push("'].join('');};");C=C.join('');}eval(C);return this;},call:function(A,B,C){return this[A](B,C);},insertFirst:function(el,A,B){return this.doInsert('afterBegin',el,A,B);},insertBefore:function(el,A,B){return this.doInsert('beforeBegin',el,A,B);},insertAfter:function(el,A,B){return this.doInsert('afterEnd',el,A,B);
+},append:function(el,A,B){return this.doInsert('beforeEnd',el,A,B);},doInsert:function(A,el,B,C){el=Roo.getDom(el);var D=Roo.DomHelper.insertHtml(A,el,this.applyTemplate(B));return C?Roo.get(D,true):D;},overwrite:function(el,A,B){el=Roo.getDom(el);el.innerHTML=this.applyTemplate(A);
+return B?Roo.get(el.firstChild,true):el.firstChild;}};Roo.Template.prototype.apply=Roo.Template.prototype.applyTemplate;Roo.DomHelper.Template=Roo.Template;Roo.Template.from=function(el){el=Roo.getDom(el);return new Roo.Template(el.value||el.innerHTML);};
+
 // Roo/DomQuery.js
 Roo.DomQuery=function(){var A={},B={},C={};var D=/\S/;var E=/^\s+|\s+$/g;var F=/\{(\d+)\}/g;var G=/^(\s?[\/>+~]\s?|\s|$)/;var H=/^(#)?([\w-\*]+)/;var I=/(\d*)n\+?(\d*)/,J=/\D/;function child(p,M){var i=0;var n=p.firstChild;while(n){if(n.nodeType==1){if(++i==M){return n;
 }}n=n.nextSibling;}return null;};function next(n){while((n=n.nextSibling)&&n.nodeType!=1);return n;};function prev(n){while((n=n.previousSibling)&&n.nodeType!=1);return n;};function children(d){var n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!D.test(n.nodeValue)){d.removeChild(n);
-}else{n.nodeIndex=++ni;}n=nx;}return this;};function byClassName(c,a,v){if(!v){return c;}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((' '+ci.className+' ').indexOf(v)!=-1){r[++ri]=ci;}}return r;};function attrValue(n,M){if(!n.tagName&&typeof n.length!="undefined"){n=n[0];
-}if(!n){return null;}if(M=="for"){return n.htmlFor;}if(M=="class"||M=="className"){return n.className;}return n.getAttribute(M)||n[M];};function getNodes(ns,M,N){var O=[],ri=-1,cs;if(!ns){return O;}N=N||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns];
+}else{n.nodeIndex=++ni;}n=nx;}return this;};function byClassName(c,a,v){if(!v){return c;}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((' '+((ci instanceof SVGElement)?ci.className.baseVal:ci.className)+' ').indexOf(v)!=-1){r[++ri]=ci;}}return r;};function attrValue(n,M){if(!n.tagName&&typeof n.length!="undefined"){n=n[0];
+}if(!n){return null;}if(M=="for"){return n.htmlFor;}if(M=="class"||M=="className"){return (n instanceof SVGElement)?n.className.baseVal:n.className;}return n.getAttribute(M)||n[M];};function getNodes(ns,M,N){var O=[],ri=-1,cs;if(!ns){return O;}N=N||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns];
 }if(!M){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(N);for(var j=0,ci;ci=cs[j];j++){O[++ri]=ci;}}}else if(M=="/"||M==">"){var P=N.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.children||ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==P||cj.nodeName==N||N=='*'){O[++ri]=cj;
 }}}}else if(M=="+"){var P=N.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1);if(n&&(n.nodeName==P||n.nodeName==N||N=='*')){O[++ri]=n;}}}else if(M=="~"){for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&(n.nodeType!=1||(N=='*'||n.tagName.toLowerCase()!=N)));
 if(n){O[++ri]=n;}}}return O;};function concat(a,b){if(b.slice){return a.concat(b);}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i];}return a;}function byTag(cs,M){if(cs.tagName||cs==document){cs=[cs];}if(!M){return cs;}var r=[],ri=-1;M=M.toLowerCase();for(var i=0,ci;
 ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==M){r[++ri]=ci;}}return r;};function byId(cs,M,id){if(cs.tagName||cs==document){cs=[cs];}if(!id){return cs;}var r=[],ri=-1;for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){r[++ri]=ci;return r;}}return r;
-};function byAttribute(cs,M,N,op,O){var r=[],ri=-1,st=O=="{";var f=Roo.DomQuery.operators[op];for(var i=0,ci;ci=cs[i];i++){var a;if(st){a=Roo.DomQuery.getStyle(ci,M);}else if(M=="class"||M=="className"){a=ci.className;}else if(M=="for"){a=ci.htmlFor;}else if(M=="href"){a=ci.getAttribute("href",2);
-}else{a=ci.getAttribute(M);}if((f&&f(a,N))||(!f&&a)){r[++ri]=ci;}}return r;};function byPseudo(cs,M,N){return Roo.DomQuery.pseudos[M](cs,N);};var K=window.ActiveXObject?true:false;var batch=30803;var L=30803;function nodupIEXml(cs){var d=++L;cs[0].setAttribute("_nodup",d);
-var r=[cs[0]];for(var i=1,M=cs.length;i<M;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c;}}for(var i=0,M=cs.length;i<M;i++){cs[i].removeAttribute("_nodup");}return r;}function nodup(cs){if(!cs){return [];}var M=cs.length,c,i,r=cs,cj,ri=-1;
-if(!M||typeof cs.nodeType!="undefined"||M==1){return cs;}if(K&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs);}var d=++L;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d;}else{r=[];for(var j=0;j<i;j++){r[++ri]=cs[j];}for(j=i+1;
-cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj;}}return r;}}return r;}function quickDiffIEXml(c1,c2){var d=++L;for(var i=0,M=c1.length;i<M;i++){c1[i].setAttribute("_qdiff",d);}var r=[];for(var i=0,M=c2.length;i<M;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i];
-}}for(var i=0,M=c1.length;i<M;i++){c1[i].removeAttribute("_qdiff");}return r;}function quickDiff(c1,c2){var M=c1.length;if(!M){return c2;}if(K&&c1[0].selectSingleNode){return quickDiffIEXml(c1,c2);}var d=++L;for(var i=0;i<M;i++){c1[i]._qdiff=d;}var r=[];for(var i=0,N=c2.length;
-i<N;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i];}}return r;}function quickId(ns,M,N,id){if(ns==N){var d=N.ownerDocument||N;return d.getElementById(id);}ns=getNodes(ns,M,"*");return byId(ns,null,id);}return {getStyle:function(el,M){return Roo.fly(el).getStyle(M);
-},compile:function(M,N){N=N||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"];var q=M,mode,lq;var tk=Roo.DomQuery.matchers;var O=tk.length;var mm;var P=q.match(G);if(P&&P[1]){fn[fn.length]='mode="'+P[1].replace(E,"")+'";';
-q=q.replace(P[1],"");}while(M.substr(0,1)=="/"){M=M.substr(1);}while(q&&lq!=q){lq=q;var tm=q.match(H);if(N=="select"){if(tm){if(tm[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tm[2]+'");';}else{fn[fn.length]='n = getNodes(n, mode, "'+tm[2]+'");';
-}q=q.replace(tm[0],"");}else if(q.substr(0,1)!='@'){fn[fn.length]='n = getNodes(n, mode, "*");';}}else{if(tm){if(tm[1]=="#"){fn[fn.length]='n = byId(n, null, "'+tm[2]+'");';}else{fn[fn.length]='n = byTag(n, "'+tm[2]+'");';}q=q.replace(tm[0],"");}}while(!(mm=q.match(G))){var Q=false;
-for(var j=0;j<O;j++){var t=tk[j];var m=q.match(t.re);if(m){fn[fn.length]=t.select.replace(F,function(x,i){return m[i];});q=q.replace(m[0],"");Q=true;break;}}if(!Q){throw 'Error parsing selector, parsing failed at "'+q+'"';}}if(mm[1]){fn[fn.length]='mode="'+mm[1].replace(E,"")+'";';
-q=q.replace(mm[1],"");}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f;},select:function(M,N,O){if(!N||N==document){N=document;}if(typeof N=="string"){N=document.getElementById(N);}var P=M.split(",");var Q=[];for(var i=0,R=P.length;i<R;i++){var p=P[i].replace(E,"");
-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;
-
+};function byAttribute(cs,M,N,op,O){var r=[],ri=-1,st=O=="{";var f=Roo.DomQuery.operators[op];for(var i=0,ci;ci=cs[i];i++){var a;if(st){a=Roo.DomQuery.getStyle(ci,M);}else if(M=="class"||M=="className"){a=(ci instanceof SVGElement)?ci.className.baseVal:ci.className;
+}else if(M=="for"){a=ci.htmlFor;}else if(M=="href"){a=ci.getAttribute("href",2);}else{a=ci.getAttribute(M);}if((f&&f(a,N))||(!f&&a)){r[++ri]=ci;}}return r;};function byPseudo(cs,M,N){return Roo.DomQuery.pseudos[M](cs,N);};var K=window.ActiveXObject?true:false;
+var batch=30803;var L=30803;function nodupIEXml(cs){var d=++L;cs[0].setAttribute("_nodup",d);var r=[cs[0]];for(var i=1,M=cs.length;i<M;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c;}}for(var i=0,M=cs.length;i<M;
+i++){cs[i].removeAttribute("_nodup");}return r;}function nodup(cs){if(!cs){return [];}var M=cs.length,c,i,r=cs,cj,ri=-1;if(!M||typeof cs.nodeType!="undefined"||M==1){return cs;}if(K&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs);}var d=++L;
+cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d;}else{r=[];for(var j=0;j<i;j++){r[++ri]=cs[j];}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj;}}return r;}}return r;}function quickDiffIEXml(c1,c2){var d=++L;for(var i=0,M=c1.length;
+i<M;i++){c1[i].setAttribute("_qdiff",d);}var r=[];for(var i=0,M=c2.length;i<M;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i];}}for(var i=0,M=c1.length;i<M;i++){c1[i].removeAttribute("_qdiff");}return r;}function quickDiff(c1,c2){var M=c1.length;
+if(!M){return c2;}if(K&&c1[0].selectSingleNode){return quickDiffIEXml(c1,c2);}var d=++L;for(var i=0;i<M;i++){c1[i]._qdiff=d;}var r=[];for(var i=0,N=c2.length;i<N;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i];}}return r;}function quickId(ns,M,N,id){if(ns==N){var d=N.ownerDocument||N;
+return d.getElementById(id);}ns=getNodes(ns,M,"*");return byId(ns,null,id);}return {getStyle:function(el,M){return Roo.fly(el).getStyle(M);},compile:function(M,N){N=N||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"];
+var q=M,mode,lq;var tk=Roo.DomQuery.matchers;var O=tk.length;var mm;var P=q.match(G);if(P&&P[1]){fn[fn.length]='mode="'+P[1].replace(E,"")+'";';q=q.replace(P[1],"");}while(M.substr(0,1)=="/"){M=M.substr(1);}while(q&&lq!=q){lq=q;var tm=q.match(H);if(N=="select"){if(tm){if(tm[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tm[2]+'");';
+}else{fn[fn.length]='n = getNodes(n, mode, "'+tm[2]+'");';}q=q.replace(tm[0],"");}else if(q.substr(0,1)!='@'){fn[fn.length]='n = getNodes(n, mode, "*");';}}else{if(tm){if(tm[1]=="#"){fn[fn.length]='n = byId(n, null, "'+tm[2]+'");';}else{fn[fn.length]='n = byTag(n, "'+tm[2]+'");';
+}q=q.replace(tm[0],"");}}while(!(mm=q.match(G))){var Q=false;for(var j=0;j<O;j++){var t=tk[j];var m=q.match(t.re);if(m){fn[fn.length]=t.select.replace(F,function(x,i){return m[i];});q=q.replace(m[0],"");Q=true;break;}}if(!Q){throw 'Error parsing selector, parsing failed at "'+q+'"';
+}}if(mm[1]){fn[fn.length]='mode="'+mm[1].replace(E,"")+'";';q=q.replace(mm[1],"");}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f;},select:function(M,N,O){if(!N||N==document){N=document;}if(typeof N=="string"){N=document.getElementById(N);
+}var P=M.split(",");var Q=[];for(var i=0,R=P.length;i<R;i++){var p=P[i].replace(E,"");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;
 // 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;
@@ -270,8 +316,8 @@ Roo.util.Observable.prototype.un=Roo.util.Observable.prototype.removeListener;Ro
 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;for(var i=0;i<E;i++){var F=Array.prototype.slice.call(arguments,0);
-var l=ls[i];F.push(l.options);if(l.fireFn.apply(l.scope||this.obj||window,F)===false){this.firing=false;return false;}}this.firing=false;}return true;}};})();
+}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,F)===false){this.firing=false;return false;}}this.firing=false;}return true;}};})();
 // Roo/Document.js
 Roo.Document=function(A){this.addEvents({'ready':true});Roo.util.Observable.call(this,A);var B=this;Roo.onReady(function(){B.fireEvent('ready');},null,false);};Roo.extend(Roo.Document,Roo.util.Observable,{});
 // Roo/EventManager.js
@@ -304,7 +350,7 @@ return Roo.isSafari?(A[k]||k):k;},getPageX:function(){return this.xy[0];},getPag
 },within:function(el,C){var t=this[C?"getRelatedTarget":"getTarget"]();return t&&Roo.fly(el).contains(t);},getPoint:function(){return new Roo.lib.Point(this.xy[0],this.xy[1]);}};return new Roo.EventObjectImpl();}();
 // Roo/Element.js
 (function(){var D=Roo.lib.Dom;var E=Roo.lib.Event;var A=Roo.lib.Anim;var B={};var C=/(-[a-z])/gi;var F=function(m,a){return a.charAt(1).toUpperCase();};var G=document.defaultView;Roo.Element=function(J,K){var L=typeof J=="string"?document.getElementById(J):J;
-if(!L){return null;}var id=L.id;if(K!==true&&id&&Roo.Element.cache[id]){return Roo.Element.cache[id];}this.dom=L;this.id=id||Roo.id(L);};var El=Roo.Element;El.prototype={originalDisplay:"",visibilityMode:1,defaultUnit:"px",setVisibilityMode:function(J){this.visibilityMode=J;
+this.listeners={};if(!L){return null;}var id=L.id;if(K!==true&&id&&Roo.Element.cache[id]){return Roo.Element.cache[id];}this.dom=L;this.id=id||Roo.id(L);return this;};var El=Roo.Element;El.prototype={originalDisplay:"",visibilityMode:1,defaultUnit:"px",setVisibilityMode:function(J){this.visibilityMode=J;
 return this;},enableDisplayMode:function(J){this.setVisibilityMode(El.DISPLAY);if(typeof J!="undefined"){this.originalDisplay=J;}return this;},findParent:function(J,K,L){var p=this.dom,b=document.body,M=0,dq=Roo.DomQuery,N;K=K||50;if(typeof K!="number"){N=Roo.getDom(K);
 K=10;}while(p&&p.nodeType==1&&M<K&&p!=b&&p!=N){if(dq.is(p,J)){return L?Roo.get(p):p;}M++;p=p.parentNode;}return null;},findParentNode:function(J,K,L){var p=Roo.fly(this.dom.parentNode,'_internal');return p?p.findParent(J,K,L):null;},findScrollableParent:function(){var J=/(auto|scroll)/;
 if(this.getStyle('position')==='fixed'){return Roo.isAndroid?Roo.get(document.documentElement):Roo.get(document.body);}var K=this.getStyle('position')==="absolute";for(var L=this;(L=Roo.get(L.dom.parentNode));){if(K&&L.getStyle('position')==="static"){continue;
@@ -323,26 +369,30 @@ this.setHeight(1);setTimeout(function(){var O=parseInt(this.dom.scrollHeight,10)
 }else{this.fixDisplay();this.dom.style.visibility=J?"visible":"hidden";}}else{var L=this.dom;var M=this.visibilityMode;if(J){this.setOpacity(.01);this.setVisible(true);}this.anim({opacity:{to:(J?1:0)}},this.preanim(arguments,1),null,.35,'easeIn',function(){if(!J){if(M==El.DISPLAY){L.style.display="none";
 }else{L.style.visibility="hidden";}Roo.get(L).setOpacity(1);}});}return this;},isDisplayed:function(){return this.getStyle("display")!="none";},toggle:function(J){this.setVisible(!this.isVisible(),this.preanim(arguments,0));return this;},setDisplayed:function(J){if(typeof J=="boolean"){J=J?this.originalDisplay:"none";
 }this.setStyle("display",J);return this;},focus:function(){try{this.dom.focus();}catch(e){}return this;},blur:function(){try{this.dom.blur();}catch(e){}return this;},addClass:function(J){if(J instanceof Array){for(var i=0,K=J.length;i<K;i++){this.addClass(J[i]);
-}}else{if(J&&!this.hasClass(J)){this.dom.className=this.dom.className+" "+J;}}return this;},radioClass:function(J){var K=this.dom.parentNode.childNodes;for(var i=0;i<K.length;i++){var s=K[i];if(s.nodeType==1){Roo.get(s).removeClass(J);}}this.addClass(J);return this;
-},removeClass:function(J){if(!J||!this.dom.className){return this;}if(J instanceof Array){for(var i=0,K=J.length;i<K;i++){this.removeClass(J[i]);}}else{if(this.hasClass(J)){var re=this.classReCache[J];if(!re){re=new RegExp('(?:^|\\s+)'+J+'(?:\\s+|$)',"g");
-this.classReCache[J]=re;}this.dom.className=this.dom.className.replace(re," ");}}return this;},classReCache:{},toggleClass:function(J){if(this.hasClass(J)){this.removeClass(J);}else{this.addClass(J);}return this;},hasClass:function(J){return J&&(' '+this.dom.className+' ').indexOf(' '+J+' ')!=-1;
-},replaceClass:function(J,K){this.removeClass(J);this.addClass(K);return this;},getStyles:function(){var a=arguments,J=a.length,r={};for(var i=0;i<J;i++){r[a[i]]=this.getStyle(a[i]);}return r;},getStyle:function(){return G&&G.getComputedStyle?function(J){var el=this.dom,v,cs,K;
-if(J=='float'){J="cssFloat";}if(el.style&&(v=el.style[J])){return v;}if(cs=G.getComputedStyle(el,"")){if(!(K=B[J])){K=B[J]=J.replace(C,F);}return cs[K];}return null;}:function(J){var el=this.dom,v,cs,K;if(J=='opacity'){if(typeof el.style.filter=='string'){var m=el.style.filter.match(/alpha\(opacity=(.*)\)/i);
-if(m){var fv=parseFloat(m[1]);if(!isNaN(fv)){return fv?fv/100:0;}}}return 1;}else if(J=='float'){J="styleFloat";}if(!(K=B[J])){K=B[J]=J.replace(C,F);}if(v=el.style[K]){return v;}if(cs=el.currentStyle){return cs[K];}return null;};}(),setStyle:function(J,K){if(typeof J=="string"){if(J=='float'){this.setStyle(Roo.isIE?'styleFloat':'cssFloat',K);
-return this;}var L;if(!(L=B[J])){L=B[J]=J.replace(C,F);}if(L=='opacity'){this.setOpacity(K);}else{this.dom.style[L]=K;}}else{for(var M in J){if(typeof J[M]!="function"){this.setStyle(M,J[M]);}}}return this;},applyStyles:function(J){Roo.DomHelper.applyStyles(this.dom,J);
-return this;},getX:function(){return D.getX(this.dom);},getY:function(){return D.getY(this.dom);},getXY:function(){return D.getXY(this.dom);},setX:function(x,J){if(!J||!A){D.setX(this.dom,x);}else{this.setXY([x,this.getY()],this.preanim(arguments,1));}return this;
-},setY:function(y,J){if(!J||!A){D.setY(this.dom,y);}else{this.setXY([this.getX(),y],this.preanim(arguments,1));}return this;},setLeft:function(J){this.setStyle("left",this.addUnits(J));return this;},setTop:function(J){this.setStyle("top",this.addUnits(J));
-return this;},setRight:function(J){this.setStyle("right",this.addUnits(J));return this;},setBottom:function(J){this.setStyle("bottom",this.addUnits(J));return this;},setXY:function(J,K){if(!K||!A){D.setXY(this.dom,J);}else{this.anim({points:{to:J}},this.preanim(arguments,1),'motion');
-}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"));
-}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;
+}}else{if(J&&!this.hasClass(J)){if(this.dom instanceof SVGElement){this.dom.className.baseVal=this.dom.className.baseVal+" "+J;}else{this.dom.className=this.dom.className+" "+J;}}}return this;},radioClass:function(J){var K=this.dom.parentNode.childNodes;for(var i=0;
+i<K.length;i++){var s=K[i];if(s.nodeType==1){Roo.get(s).removeClass(J);}}this.addClass(J);return this;},removeClass:function(J){var cn=this.dom instanceof SVGElement?this.dom.className.baseVal:this.dom.className;if(!J||!cn){return this;}if(J instanceof Array){for(var i=0,K=J.length;
+i<K;i++){this.removeClass(J[i]);}}else{if(this.hasClass(J)){var re=this.classReCache[J];if(!re){re=new RegExp('(?:^|\\s+)'+J+'(?:\\s+|$)',"g");this.classReCache[J]=re;}if(this.dom instanceof SVGElement){this.dom.className.baseVal=cn.replace(re," ");}else{this.dom.className=cn.replace(re," ");
+}}}return this;},classReCache:{},toggleClass:function(J){if(this.hasClass(J)){this.removeClass(J);}else{this.addClass(J);}return this;},hasClass:function(J){if(this.dom instanceof SVGElement){return J&&(' '+this.dom.className.baseVal+' ').indexOf(' '+J+' ')!=-1;
+}return J&&(' '+this.dom.className+' ').indexOf(' '+J+' ')!=-1;},replaceClass:function(J,K){this.removeClass(J);this.addClass(K);return this;},getStyles:function(){var a=arguments,J=a.length,r={};for(var i=0;i<J;i++){r[a[i]]=this.getStyle(a[i]);}return r;
+},getStyle:function(){return G&&G.getComputedStyle?function(J){var el=this.dom,v,cs,K;if(J=='float'){J="cssFloat";}if(el.style&&(v=el.style[J])){return v;}if(cs=G.getComputedStyle(el,"")){if(!(K=B[J])){K=B[J]=J.replace(C,F);}return cs[K];}return null;}:function(J){var el=this.dom,v,cs,K;
+if(J=='opacity'){if(typeof el.style.filter=='string'){var m=el.style.filter.match(/alpha\(opacity=(.*)\)/i);if(m){var fv=parseFloat(m[1]);if(!isNaN(fv)){return fv?fv/100:0;}}}return 1;}else if(J=='float'){J="styleFloat";}if(!(K=B[J])){K=B[J]=J.replace(C,F);
+}if(v=el.style[K]){return v;}if(cs=el.currentStyle){return cs[K];}return null;};}(),setStyle:function(J,K){if(typeof J=="string"){if(J=='float'){this.setStyle(Roo.isIE?'styleFloat':'cssFloat',K);return this;}var L;if(!(L=B[J])){L=B[J]=J.replace(C,F);}if(L=='opacity'){this.setOpacity(K);
+}else{this.dom.style[L]=K;}}else{for(var M in J){if(typeof J[M]!="function"){this.setStyle(M,J[M]);}}}return this;},applyStyles:function(J){Roo.DomHelper.applyStyles(this.dom,J);return this;},getX:function(){return D.getX(this.dom);},getY:function(){return D.getY(this.dom);
+},getXY:function(){return D.getXY(this.dom);},setX:function(x,J){if(!J||!A){D.setX(this.dom,x);}else{this.setXY([x,this.getY()],this.preanim(arguments,1));}return this;},setY:function(y,J){if(!J||!A){D.setY(this.dom,y);}else{this.setXY([this.getX(),y],this.preanim(arguments,1));
+}return this;},setLeft:function(J){this.setStyle("left",this.addUnits(J));return this;},setTop:function(J){this.setStyle("top",this.addUnits(J));return this;},setRight:function(J){this.setStyle("right",this.addUnits(J));return this;},setBottom:function(J){this.setStyle("bottom",this.addUnits(J));
+return this;},setXY:function(J,K){if(!K||!A){D.setXY(this.dom,J);}else{this.anim({points:{to:J}},this.preanim(arguments,1),'motion');}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"));}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(J=='dblclick'){this.addListener('touchstart',this.onTapHandler,this);}if(!this.dom){return;}if(this.dom instanceof SVGElement&&!(this.dom instanceof SVGSVGElement)){if(typeof(this.listeners[J])=='undefined'){this.listeners[J]=new Roo.util.Event(this,J);
+}this.listeners[J].addListener(fn,K,L);return;}Roo.EventManager.on(this.dom,J,fn,K||this,L);},tapedTwice:false,onTapHandler:function(J){if(!this.tapedTwice){this.tapedTwice=true;var s=this;setTimeout(function(){s.tapedTwice=false;},300);return;}J.preventDefault();
+var K=new MouseEvent('dblclick',{view:window,bubbles:true,cancelable:true});this.dom.dispatchEvent(K);},removeListener:function(J,fn,K){Roo.EventManager.removeListener(this.dom,J,fn);if(typeof(this.listeners)=='undefined'||typeof(this.listeners[J])=='undefined'){return this;
+}this.listeners[J].removeListener(fn,K);return this;},removeAllListeners:function(){E.purgeElement(this.dom);this.listeners={};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);
@@ -390,28 +440,29 @@ return this._mask;},unmask:function(J){if(this._mask){if(J===true){this._mask.re
 },this.dom);var L=function(e){if(K!==true||!e.within(this,true)){Roo.fly(this,'_internal').removeClass(J);}};this.on("mouseout",L,this.dom);return this;},addClassOnFocus:function(J){this.on("focus",function(){Roo.fly(this,'_internal').addClass(J);},this.dom);
 this.on("blur",function(){Roo.fly(this,'_internal').removeClass(J);},this.dom);return this;},addClassOnClick:function(J){var K=this.dom;this.on("mousedown",function(){Roo.fly(K,'_internal').addClass(J);var d=Roo.get(document);var fn=function(){Roo.fly(K,'_internal').removeClass(J);
 d.removeListener("mouseup",fn);};d.on("mouseup",fn);});return this;},swallowEvent:function(J,K){var fn=function(e){e.stopPropagation();if(K){e.preventDefault();}};if(J instanceof Array){for(var i=0,L=J.length;i<L;i++){this.on(J[i],fn);}return this;}this.on(J,fn);
-return this;},fitToParentDelegate:Roo.emptyFn,fitToParent:function(J,K){Roo.EventManager.removeResizeListener(this.fitToParentDelegate);this.fitToParentDelegate=Roo.emptyFn;if(J===true&&!this.dom.parentNode){return;}var p=Roo.get(K||this.dom.parentNode);this.setSize(p.getComputedWidth()-p.getFrameWidth('lr'),p.getComputedHeight()-p.getFrameWidth('tb'));
-if(J===true){this.fitToParentDelegate=this.fitToParent.createDelegate(this,[true,K]);Roo.EventManager.onWindowResize(this.fitToParentDelegate);}return this;},getNextSibling:function(){var n=this.dom.nextSibling;while(n&&n.nodeType!=1){n=n.nextSibling;}return n;
-},getPrevSibling:function(){var n=this.dom.previousSibling;while(n&&n.nodeType!=1){n=n.previousSibling;}return n;},appendChild:function(el){el=Roo.get(el);el.appendTo(this);return this;},createChild:function(J,K,L){J=J||{tag:'div'};if(K){return Roo.DomHelper.insertBefore(K,J,L!==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);
-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]);}else{el[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;
-}else{var to=M=="scrollLeft"?[K,this.dom.scrollTop]:[this.dom.scrollLeft,K];this.anim({scroll:{"to":to}},this.preanim(arguments,2),'scroll');}return this;},scroll:function(J,K,L){if(!this.isScrollable()){return;}var el=this.dom;var l=el.scrollLeft,t=el.scrollTop;
-var w=el.scrollWidth,h=el.scrollHeight;var cw=el.clientWidth,ch=el.clientHeight;J=J.toLowerCase();var M=false;var a=this.preanim(arguments,2);switch(J){case "l":case "left":if(w-l>cw){var v=Math.min(l+K,w-cw);this.scrollTo("left",v,a);M=true;}break;case "r":case "right":if(l>0){var v=Math.max(l-K,0);
-this.scrollTo("left",v,a);M=true;}break;case "t":case "top":case "up":if(t>0){var v=Math.max(t-K,0);this.scrollTo("top",v,a);M=true;}break;case "b":case "bottom":case "down":if(h-t>ch){var v=Math.min(t+K,h-ch);this.scrollTo("top",v,a);M=true;}break;}return M;
-},translatePoints:function(x,y){if(typeof x=='object'||x instanceof Array){y=x[1];x=x[0];}var p=this.getStyle('position');var o=this.getXY();var l=parseInt(this.getStyle('left'),10);var t=parseInt(this.getStyle('top'),10);if(isNaN(l)){l=(p=="relative")?0:this.dom.offsetLeft;
-}if(isNaN(t)){t=(p=="relative")?0:this.dom.offsetTop;}return {left:(x-o[0]+l),top:(y-o[1]+t)};},getScroll:function(){var d=this.dom,J=document;if(d==J||d==J.body){var l=window.pageXOffset||J.documentElement.scrollLeft||J.body.scrollLeft||0;var t=window.pageYOffset||J.documentElement.scrollTop||J.body.scrollTop||0;
-return {left:l,top:t};}else{return {left:d.scrollLeft,top:d.scrollTop};}},getColor:function(J,K,L){var v=this.getStyle(J);if(!v||v=="transparent"||v=="inherit"){return K;}var M=typeof L=="undefined"?"#":L;if(v.substr(0,4)=="rgb("){var N=v.slice(4,v.length-1).split(",");
-for(var i=0;i<3;i++){var h=parseInt(N[i]).toString(16);if(h<16){h="0"+h;}M+=h;}}else{if(v.substr(0,1)=="#"){if(v.length==4){for(var i=1;i<4;i++){var c=v.charAt(i);M+=c+c;}}else if(v.length==7){M+=v.substr(1);}}}return (M.length>5?M.toLowerCase():K);},boxWrap:function(J){J=J||'x-box';
-var el=Roo.get(this.insertHtml('beforeBegin',String.format('<div class="{0}">'+El.boxMarkup+'</div>',J)));el.child('.'+J+'-mc').dom.appendChild(this.dom);return el;},getAttributeNS:Roo.isIE?function(ns,J){var d=this.dom;var K=typeof d[ns+":"+J];if(K!='undefined'&&K!='unknown'){return d[ns+":"+J];
-}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>';
+return this;},fitToParentDelegate:Roo.emptyFn,fitToParent:function(J,K){Roo.EventManager.removeResizeListener(this.fitToParentDelegate);this.fitToParentDelegate=Roo.emptyFn;if(J===true&&!this.dom.parentNode){return this;}var p=Roo.get(K||this.dom.parentNode);
+this.setSize(p.getComputedWidth()-p.getFrameWidth('lr'),p.getComputedHeight()-p.getFrameWidth('tb'));if(J===true){this.fitToParentDelegate=this.fitToParent.createDelegate(this,[true,K]);Roo.EventManager.onWindowResize(this.fitToParentDelegate);}return this;
+},getNextSibling:function(){var n=this.dom.nextSibling;while(n&&n.nodeType!=1){n=n.nextSibling;}return n;},getPrevSibling:function(){var n=this.dom.previousSibling;while(n&&n.nodeType!=1){n=n.previousSibling;}return n;},appendChild:function(el){el=Roo.get(el);
+el.appendTo(this);return this;},createChild:function(J,K,L){J=J||{tag:'div'};if(K){return Roo.DomHelper.insertBefore(K,J,L!==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);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]);}else{el[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;}else{var to=M=="scrollLeft"?[K,this.dom.scrollTop]:[this.dom.scrollLeft,K];this.anim({scroll:{"to":to}
+},this.preanim(arguments,2),'scroll');}return this;},scroll:function(J,K,L){if(!this.isScrollable()){return;}var el=this.dom;var l=el.scrollLeft,t=el.scrollTop;var w=el.scrollWidth,h=el.scrollHeight;var cw=el.clientWidth,ch=el.clientHeight;J=J.toLowerCase();
+var M=false;var a=this.preanim(arguments,2);switch(J){case "l":case "left":if(w-l>cw){var v=Math.min(l+K,w-cw);this.scrollTo("left",v,a);M=true;}break;case "r":case "right":if(l>0){var v=Math.max(l-K,0);this.scrollTo("left",v,a);M=true;}break;case "t":case "top":case "up":if(t>0){var v=Math.max(t-K,0);
+this.scrollTo("top",v,a);M=true;}break;case "b":case "bottom":case "down":if(h-t>ch){var v=Math.min(t+K,h-ch);this.scrollTo("top",v,a);M=true;}break;}return M;},translatePoints:function(x,y){if(typeof x=='object'||x instanceof Array){y=x[1];x=x[0];}var p=this.getStyle('position');
+var o=this.getXY();var l=parseInt(this.getStyle('left'),10);var t=parseInt(this.getStyle('top'),10);if(isNaN(l)){l=(p=="relative")?0:this.dom.offsetLeft;}if(isNaN(t)){t=(p=="relative")?0:this.dom.offsetTop;}return {left:(x-o[0]+l),top:(y-o[1]+t)};},getScroll:function(){var d=this.dom,J=document;
+if(d==J||d==J.body){var l=window.pageXOffset||J.documentElement.scrollLeft||J.body.scrollLeft||0;var t=window.pageYOffset||J.documentElement.scrollTop||J.body.scrollTop||0;return {left:l,top:t};}else{return {left:d.scrollLeft,top:d.scrollTop};}},getColor:function(J,K,L){var v=this.getStyle(J);
+if(!v||v=="transparent"||v=="inherit"){return K;}var M=typeof L=="undefined"?"#":L;if(v.substr(0,4)=="rgb("){var N=v.slice(4,v.length-1).split(",");for(var i=0;i<3;i++){var h=parseInt(N[i]).toString(16);if(h<16){h="0"+h;}M+=h;}}else{if(v.substr(0,1)=="#"){if(v.length==4){for(var i=1;
+i<4;i++){var c=v.charAt(i);M+=c+c;}}else if(v.length==7){M+=v.substr(1);}}}return (M.length>5?M.toLowerCase():K);},boxWrap:function(J){J=J||'x-box';var el=Roo.get(this.insertHtml('beforeBegin',String.format('<div class="{0}">'+El.boxMarkup+'</div>',J)));el.child('.'+J+'-mc').dom.appendChild(this.dom);
+return el;},getAttributeNS:Roo.isIE?function(ns,J){var d=this.dom;var K=typeof d[ns+":"+J];if(K!='undefined'&&K!='unknown'){return d[ns+":"+J];}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);
 }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);
@@ -474,20 +525,20 @@ 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.formData){return this.doFormDataUpload(o,p,B);}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='';}Roo.lib.Ajax.useDefaultHeader=typeof(o.headers)=='undefined'||typeof(o.headers['Content-Type'])=='undefined';this.transId=Roo.lib.Ajax.request(E,B,cb,p,o);
-Roo.lib.Ajax.useDefaultHeader==true;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;this.fireEvent("requestexception",this,A,B,e);Roo.callback(B.failure,B.scope,[A,B]);Roo.callback(B.callback,B.scope,[B,false,A]);},doFormUpload:function(o,ps,A){var id=Roo.id();var B=document.createElement('iframe');
-B.id=id;B.name=id;B.className='x-hidden';if(Roo.isIE){B.src=Roo.SSL_SECURE_URL;}document.body.appendChild(B);if(Roo.isIE){document.frames[id].name=id;}var C=Roo.getDom(o.form);C.target=id;C.method='POST';C.enctype=C.encoding='multipart/form-data';if(A){C.action=A;
-}var D,hd;if(ps){D=[];ps=Roo.urlDecode(ps,false);for(var k in ps){if(ps.hasOwnProperty(k)){hd=document.createElement('input');hd.type='hidden';hd.name=k;hd.value=ps[k];C.appendChild(hd);D.push(hd);}}}function cb(){var r={responseText:'',responseXML:null};
-r.argument=o?o.argument:null;try{var F;if(Roo.isIE){F=B.contentWindow.document;}else{F=(B.contentDocument||window.frames[id].document);}if(F&&F.body){r.responseText=F.body.innerHTML;}if(F&&F.XMLDocument){r.responseXML=F.XMLDocument;}else{r.responseXML=F;}
-}catch(e){}Roo.EventManager.removeListener(B,'load',cb,this);this.fireEvent("requestcomplete",this,r,o);Roo.callback(o.success,o.scope,[r,o]);Roo.callback(o.callback,o.scope,[o,true,r]);setTimeout(function(){document.body.removeChild(B);},100);}Roo.EventManager.on(B,'load',cb,this);
-C.submit();if(D){for(var i=0,E=D.length;i<E;i++){C.removeChild(D[i]);}}},doFormDataUpload:function(o,ps,A){var B=Roo.getDom(o.form);B.enctype=B.encoding='multipart/form-data';var C=o.formData===true?new FormData(B):o.formData;var cb={success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{options:o}
-,timeout:o.timeout||this.timeout};if(typeof o.autoAbort=='boolean'){if(o.autoAbort){this.abort();}}else if(this.autoAbort!==false){this.abort();}Roo.lib.Ajax.useDefaultHeader=false;this.transId=Roo.lib.Ajax.request("POST",A,cb,o.formData,o);Roo.lib.Ajax.useDefaultHeader=true;
-}});
+}if(o.form){var C=Roo.getDom(o.form);B=B||C.action;var D=C.getAttribute("enctype");if(o.formData){return this.doFormDataUpload(o,B);}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;}if(!o.form&&o.formData){o.formData=o.formData===true?new FormData():o.formData;for(var k in o.params){o.formData.append(k,o.params[k]);}return this.doFormDataUpload(o,B);}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='';}Roo.lib.Ajax.useDefaultHeader=typeof(o.headers)=='undefined'||typeof(o.headers['Content-Type'])=='undefined';
+this.transId=Roo.lib.Ajax.request(E,B,cb,p,o);Roo.lib.Ajax.useDefaultHeader==true;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;this.fireEvent("requestexception",this,A,B,e);Roo.callback(B.failure,B.scope,[A,B]);Roo.callback(B.callback,B.scope,[B,false,A]);
+},doFormUpload:function(o,ps,A){var id=Roo.id();var B=document.createElement('iframe');B.id=id;B.name=id;B.className='x-hidden';if(Roo.isIE){B.src=Roo.SSL_SECURE_URL;}document.body.appendChild(B);if(Roo.isIE){document.frames[id].name=id;}var C=Roo.getDom(o.form);
+C.target=id;C.method='POST';C.enctype=C.encoding='multipart/form-data';if(A){C.action=A;}var D,hd;if(ps){D=[];ps=Roo.urlDecode(ps,false);for(var k in ps){if(ps.hasOwnProperty(k)){hd=document.createElement('input');hd.type='hidden';hd.name=k;hd.value=ps[k];
+C.appendChild(hd);D.push(hd);}}}function cb(){var r={responseText:'',responseXML:null};r.argument=o?o.argument:null;try{var F;if(Roo.isIE){F=B.contentWindow.document;}else{F=(B.contentDocument||window.frames[id].document);}if(F&&F.body){r.responseText=F.body.innerHTML;
+}if(F&&F.XMLDocument){r.responseXML=F.XMLDocument;}else{r.responseXML=F;}}catch(e){}Roo.EventManager.removeListener(B,'load',cb,this);this.fireEvent("requestcomplete",this,r,o);Roo.callback(o.success,o.scope,[r,o]);Roo.callback(o.callback,o.scope,[o,true,r]);
+setTimeout(function(){document.body.removeChild(B);},100);}Roo.EventManager.on(B,'load',cb,this);C.submit();if(D){for(var i=0,E=D.length;i<E;i++){C.removeChild(D[i]);}}},doFormDataUpload:function(o,A){var B;if(o.form){var C=Roo.getDom(o.form);C.enctype=C.encoding='multipart/form-data';
+B=o.formData===true?new FormData(C):o.formData;}else{B=o.formData===true?new FormData():o.formData;}var cb={success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{options:o},timeout:o.timeout||this.timeout};if(typeof o.autoAbort=='boolean'){if(o.autoAbort){this.abort();
+}}else if(this.autoAbort!==false){this.abort();}Roo.lib.Ajax.useDefaultHeader=false;this.transId=Roo.lib.Ajax.request("POST",A,cb,B,o);Roo.lib.Ajax.useDefaultHeader=true;}});
 // Roo/Ajax.js
 Roo.Ajax=new Roo.data.Connection({autoAbort:false,serializeForm:function(A){return Roo.lib.Ajax.serializeForm(A);}});
 // Roo/UpdateManager.js
@@ -571,7 +622,7 @@ return eval(fn).apply(window,B);}else{return eval(fn).call(window,value);}},toFi
 var fd=(ps[1]+z);var r=fd.substring(0,n);var rm=fd.substring(n);if(rm<5){return ps[0]+'.'+r;}r*=1;r++;if(String(r).length!=n){ps[0]*=1;ps[0]++;r=String(r).substring(1);}return ps[0]+'.'+r;},usMoney:function(v){return '$'+Roo.util.Format.number(v);},number:function(v,B,C){B=typeof(B)=='undefined'?2:B;
 C=typeof(C)=='undefined'?',':C;var D=Math.pow(10,B);var E=String(D).substring(1);v=(Math.round((v-0)*D))/D;v=String(v);var ps=v.split('.');var F=ps[0];var r=/(\d+)(\d{3})/;if(C.length!=0){F=F.replace(/\B(?=(\d{3})+(?!\d))/g,C);}var G=ps[1]?(B?('.'+ps[1]+E.substring(ps[1].length)):''):(B?('.'+E):'');
 return F+G;},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'};
+},size:function(B,C){var D=['b','k','M','G','T'];if(B==0){return 0;}var i=parseInt(Math.floor(Math.log(B)/Math.log(1024)));return Roo.util.Format.number(B/Math.pow(1024,i),C)+D[i];}};}();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];
@@ -596,6 +647,9 @@ if(A<500){return 400;}else if(A<1700){return 320;}else if(A<2600){return 250;}el
 if(this.pressClass){this.el.removeClass(this.pressClass);}this.el.on("mouseover",this.handleMouseReturn,this);},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn);if(this.pressClass){this.el.addClass(this.pressClass);}this.click();
 },handleMouseUp:function(){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn);this.el.un("mouseout",this.handleMouseOut);Roo.get(document).un("mouseup",this.handleMouseUp);this.el.removeClass(this.pressClass);this.fireEvent("mouseup",this);
 }});
+// Roo/util/Clipboard.js
+Roo.util.Clipboard={write:function(A){if(navigator.clipboard&&window.isSecureContext){navigator.clipboard.writeText(A);return;}var ta=document.createElement("textarea");ta.value=A;ta.style.position="fixed";ta.style.left="-999999px";ta.style.top="-999999px";
+document.body.appendChild(ta);ta.focus();ta.select();document.execCommand('copy');(function(){ta.remove();}).defer(100);}};
 // 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);
@@ -656,6 +710,28 @@ this.y=y;if(!this.boxReady){return this;}var A=this.adjustPosition(x,y);var ax=A
 return this;},onRender:function(ct,A){Roo.BoxComponent.superclass.onRender.call(this,ct,A);if(this.resizeEl){this.resizeEl=Roo.get(this.resizeEl);}if(this.positionEl){this.positionEl=Roo.get(this.positionEl);}},afterRender:function(){Roo.BoxComponent.superclass.afterRender.call(this);
 this.boxReady=true;this.setSize(this.width,this.height);if(this.x||this.y){this.setPosition(this.x,this.y);}if(this.pageX||this.pageY){this.setPagePosition(this.pageX,this.pageY);}},syncSize:function(){delete this.lastSize;this.setSize(this.el.getWidth(),this.el.getHeight());
 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/Layer.js
+(function(){Roo.Layer=function(C,D){C=C||{};var dh=Roo.DomHelper;var cp=C.parentEl,E=cp?Roo.getDom(cp):document.body;if(D){this.dom=Roo.getDom(D);}if(!this.dom){var o=C.dh||{tag:"div",cls:"x-layer"};this.dom=dh.append(E,o);}if(C.cls){this.addClass(C.cls);}
+this.constrain=C.constrain!==false;this.visibilityMode=Roo.Element.VISIBILITY;if(C.id){this.id=this.dom.id=C.id;}else{this.id=Roo.id(this.dom);}this.zindex=C.zindex||this.getZIndex();this.position("absolute",this.zindex);if(C.shadow){this.shadowOffset=C.shadowOffset||4;
+this.shadow=new Roo.Shadow({offset:this.shadowOffset,mode:C.shadow});}else{this.shadowOffset=0;}this.useShim=C.shim!==false&&Roo.useShims;this.useDisplay=C.useDisplay;this.hide();};var A=Roo.Element.prototype;var B=[];Roo.extend(Roo.Layer,Roo.Element,{getZIndex:function(){return this.zindex||parseInt(this.getStyle("z-index"),10)||11000;
+},getShim:function(){if(!this.useShim){return null;}if(this.shim){return this.shim;}var C=B.shift();if(!C){C=this.createShim();C.enableDisplayMode('block');C.dom.style.display='none';C.dom.style.visibility='visible';}var pn=this.dom.parentNode;if(C.dom.parentNode!=pn){pn.insertBefore(C.dom,this.dom);
+}C.setStyle('z-index',this.getZIndex()-2);this.shim=C;return C;},hideShim:function(){if(this.shim){this.shim.setDisplayed(false);B.push(this.shim);delete this.shim;}},disableShadow:function(){if(this.shadow){this.shadowDisabled=true;this.shadow.hide();this.lastShadowOffset=this.shadowOffset;
+this.shadowOffset=0;}},enableShadow:function(C){if(this.shadow){this.shadowDisabled=false;this.shadowOffset=this.lastShadowOffset;delete this.lastShadowOffset;if(C){this.sync(true);}}},sync:function(C){var sw=this.shadow;if(!this.updating&&this.isVisible()&&(sw||this.useShim)){var sh=this.getShim();
+var w=this.getWidth(),h=this.getHeight();var l=this.getLeft(true),t=this.getTop(true);if(sw&&!this.shadowDisabled){if(C&&!sw.isVisible()){sw.show(this);}else{sw.realign(l,t,w,h);}if(sh){if(C){sh.show();}var a=sw.adjusts,s=sh.dom.style;s.left=(Math.min(l,l+a.l))+"px";
+s.top=(Math.min(t,t+a.t))+"px";s.width=(w+a.w)+"px";s.height=(h+a.h)+"px";}}else if(sh){if(C){sh.show();}sh.setSize(w,h);sh.setLeftTop(l,t);}}},destroy:function(){this.hideShim();if(this.shadow){this.shadow.hide();}this.removeAllListeners();var pn=this.dom.parentNode;
+if(pn){pn.removeChild(this.dom);}Roo.Element.uncache(this.id);},remove:function(){this.destroy();},beginUpdate:function(){this.updating=true;},endUpdate:function(){this.updating=false;this.sync(true);},hideUnders:function(C){if(this.shadow){this.shadow.hide();
+}this.hideShim();},constrainXY:function(){if(this.constrain){var vw=Roo.lib.Dom.getViewWidth(),vh=Roo.lib.Dom.getViewHeight();var s=Roo.get(document).getScroll();var xy=this.getXY();var x=xy[0],y=xy[1];var w=this.dom.offsetWidth+this.shadowOffset,h=this.dom.offsetHeight+this.shadowOffset;
+var C=false;if((x+w)>vw+s.left){x=vw-w-this.shadowOffset;C=true;}if((y+h)>vh+s.top){y=vh-h-this.shadowOffset;C=true;}if(x<s.left){x=s.left;C=true;}if(y<s.top){y=s.top;C=true;}if(C){if(this.avoidY){var ay=this.avoidY;if(y<=ay&&(y+h)>=ay){y=ay-h-5;}}xy=[x,y];
+this.storeXY(xy);A.setXY.call(this,xy);this.sync();}}},isVisible:function(){return this.visible;},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("");}else if(this.lastXY){A.setXY.call(this,this.lastXY);}else if(this.lastLT){A.setLeftTop.call(this,this.lastLT[0],this.lastLT[1]);
+}},hideAction:function(){this.visible=false;if(this.useDisplay===true){this.setDisplayed(false);}else{this.setLeftTop(-10000,-10000);}},setVisible:function(v,a,d,c,e){if(v){this.showAction();}if(a&&v){var cb=function(){this.sync(true);if(c){c();}}.createDelegate(this);
+A.setVisible.call(this,true,true,d,cb,e);}else{if(!v){this.hideUnders(true);}var cb=c;if(a){cb=function(){this.hideAction();if(c){c();}}.createDelegate(this);}A.setVisible.call(this,v,a,d,cb,e);if(v){this.sync(true);}else if(!a){this.hideAction();}}},storeXY:function(xy){delete this.lastLT;
+this.lastXY=xy;},storeLeftTop:function(C,D){delete this.lastXY;this.lastLT=[C,D];},beforeFx:function(){this.beforeAction();return Roo.Layer.superclass.beforeFx.apply(this,arguments);},afterFx:function(){Roo.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible());
+},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide();}},setLeft:function(C){this.storeLeftTop(C,this.getTop(true));A.setLeft.apply(this,arguments);this.sync();},setTop:function(C){this.storeLeftTop(this.getLeft(true),C);A.setTop.apply(this,arguments);
+this.sync();},setLeftTop:function(C,D){this.storeLeftTop(C,D);A.setLeftTop.apply(this,arguments);this.sync();},setXY:function(xy,a,d,c,e){this.fixDisplay();this.beforeAction();this.storeXY(xy);var cb=this.createCB(c);A.setXY.call(this,xy,a,d,cb,e);if(!a){cb();
+}},createCB:function(c){var el=this;return function(){el.constrainXY();el.sync(true);if(c){c();}};},setX:function(x,a,d,c,e){this.setXY([x,this.getY()],a,d,c,e);},setY:function(y,a,d,c,e){this.setXY([this.getX(),y],a,d,c,e);},setSize:function(w,h,a,d,c,e){this.beforeAction();
+var cb=this.createCB(c);A.setSize.call(this,w,h,a,d,cb,e);if(!a){cb();}},setWidth:function(w,a,d,c,e){this.beforeAction();var cb=this.createCB(c);A.setWidth.call(this,w,a,d,cb,e);if(!a){cb();}},setHeight:function(h,a,d,c,e){this.beforeAction();var cb=this.createCB(c);
+A.setHeight.call(this,h,a,d,cb,e);if(!a){cb();}},setBounds:function(x,y,w,h,a,d,c,e){this.beforeAction();var cb=this.createCB(c);if(!a){this.storeXY([x,y]);A.setXY.call(this,[x,y]);A.setSize.call(this,w,h,a,d,cb,e);cb();}else{A.setBounds.call(this,x,y,w,h,a,d,cb,e);
+}return this;},setZIndex:function(C){this.zindex=C;this.setStyle("z-index",C+2);if(this.shadow){this.shadow.setZIndex(C+1);}if(this.shim){this.shim.setStyle("z-index",C);}}});})();
 // 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);var A=this._tree?this._tree():this.tree();if(!el&&typeof(this.parent)=='string'&&this.parent.substring(0,1)=='#'){var B=this.parent.substr(1);this.parent=false;Roo.debug&&Roo.log(B);switch(B){case 'bootstrap-body':if(typeof(A.el)!='undefined'&&A.el==document.body){this.parent={el:true}