Ext.ns("Ext");Ext.applyIf(Ext,{isDefined:function(a){return typeof a!=="undefined"},num:function(b,a){b=Number(b===null||typeof b=="boolean"?NaN:b);return isNaN(b)?a:b},escapeRe:function(a){return a.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")}});Ext.applyIf(String,{escape:function(a){return a.replace(/('|\\)/g,"\\$1")},leftPad:function(d,b,c){var a=String(d);if(!c){c=" "}while(a.length<b){a=c+a}return a}});document.addListener=function(e,f,d,c){var a;switch(e){case"mousedown":case"dblclick":var b="on"+e+"Listeners";if(document[b]==undefined){document[b]=[]}a=document[b];break;default:return}a.push({target:f,fn:d,scope:c})};document.removeListener=function(d,e,c){var b;switch(d){case"mousedown":case"dblclick":b="on"+d+"Listeners";break;default:return}var a=[];if(document[b]==undefined){return}Ext.each(document[b],function(f){if(f.target==e&&(c==undefined||f.fn==c)){return}a.push(f)});document[b]=a};document.eventHandler=function(c,f){var b;switch(c){case"mousedown":case"dblclick":b="on"+c+"Listeners";break;default:return}var a=true;if(typeof(f)==="undefined"){f=window.event}var d=typeof(f.target)!=="undefined"?f.target:f.srcElement;Ext.each(document[b],function(e){if(e.target==d){if(f.preventDefault){f.preventDefault()}e.fn.call(e.scope,f);a=false}});return a};document.onmousedown=function(a){document.eventHandler("mousedown",a)};document.ondblclick=function(a){document.eventHandler("dblclick",a)};Ext.ns("Ext.ux");Ext.ux.clone=function(d){if(!d||"object"!==typeof d){return d}if("function"===typeof d.clone){return d.clone()}var e="function"===typeof d.pop?[]:{};var b,a;for(b in d){if(d.hasOwnProperty(b)){a=d[b];if(a&&"object"===typeof a){e[b]=Ext.ux.clone(a)}else{e[b]=a}}}return e};Ext.override(RegExp,{clone:function(){return new RegExp(this)}});Ext.apply(Number.prototype,{toRad:function(){return this*Math.PI/180},toDeg:function(){return this*180/Math.PI},toBrng:function(){return(this.toDeg()+360)%360}});LatLon=function(a,b){this.lat=Number(a);this.lon=Number(b)};LatLon.parse=function(b,k){var c=[b,k],l=[],f=/^-?[0-9]{2,3}\.[0-9]+$/i,h=/^([SNWE])([0-9]{2,3}) ([0-9]{0,2}\.[0-9]*)\'?$/i,a=/^([0-9]{4,5})([SNWE])$/i,d,g;for(var j=0;j<2;j++){if(f.test(c[j])){l[j]=c[j]}else{if(a.test(c[j])){d=c[j].replace(a,"$2");g=(d==="S")||(d==="W");var m=parseInt(c[j].replace(a,"$1"),10)/100;l[j]=m*(g?-1:1)}else{if(h.test(c[j])){d=c[j].replace(h,"$1");g=(d==="S")||(d==="W");var e=parseInt(c[j].replace(h,"$2"),10);e+=parseFloat(c[j].replace(h,"$3"))/60;l[j]=e*(g?-1:1)}else{return null}}}}return new LatLon(l[0],l[1])};LatLon.prototype={equals:function(a){return this.lat==a.lat&&this.lon==a.lon},getDegrees:function(){return[parseInt(this.lat,10),parseInt(this.lon,10)]},getMinutes:function(){return[(this.lat%1)*60,(this.lon%1)*60]},toIcaoStrings:function(){var e=this.getDegrees(),d=this.getMinutes(),c=[2,3],f=[["N","S"],["E","W"]],a=[];for(var b=0;b<2;b++){a[b]=String.leftPad(Math.abs(e[b]),c[b],"0")+String.leftPad(Math.round(Math.abs(d[b])),2,"0")+((e[b]>0)?f[b][0]:f[b][1])}return a},toGarminStrings:function(){var d=this.getDegrees(),c=this.getMinutes(),e=[["N","S"],["E","W"]],a=[];for(var b=0;b<2;b++){a[b]=((d[b]>0)?e[b][0]:e[b][1])+Math.abs(d[b])+" "+String.leftPad(Math.abs(c[b]).toFixed(3),6,"0")+"'"}return a},toRtfpStrings:function(){var d=this.getDegrees(),c=this.getMinutes(),e=[["N","S"],["E","W"]],a=[];for(var b=0;b<2;b++){a[b]=((d[b]>0)?e[b][0]:e[b][1])+Math.abs(d[b])+"&deg; "+Math.abs(c[b]).toFixed(1)+"'"}return a},distCosineLaw:function(b){var a=6371;return Math.acos(Math.sin(this.lat.toRad())*Math.sin(b.lat.toRad())+Math.cos(this.lat.toRad())*Math.cos(b.lat.toRad())*Math.cos((b.lon-this.lon).toRad()))*a},bearingTo:function(d){var e=this.lat.toRad(),c=d.lat.toRad(),b=(d.lon-this.lon).toRad(),f=Math.sin(b)*Math.cos(c),a=Math.cos(e)*Math.sin(c)-Math.sin(e)*Math.cos(c)*Math.cos(b);return Math.atan2(f,a).toBrng()},isWithinExtent:function(e,c){var a=Math.min(e.lat,c.lat),d=Math.max(e.lat,c.lat),b=Math.min(e.lon,c.lon),f=Math.max(e.lon,c.lon);return this.lat>=a&&this.lat<=d&&this.lon>=b&&this.lon<=f},isBetween:function(i,h){if(!this.isWithinExtent(i,h)){return false}var d=i.lat.toRad(),c=h.lat.toRad(),g=this.lat.toRad(),f=i.lon.toRad(),e=h.lon.toRad(),a=this.lon.toRad(),b=Math.atan((Math.sin(d)*Math.cos(c)*Math.sin(a-e)-Math.sin(c)*Math.cos(d)*Math.sin(a-f))/(Math.cos(d)*Math.cos(c)*Math.sin(f-e)));return Math.abs(b-g)<0.0004}};Ext.apply(String.prototype,{toUcFirst:function(){return this[0].toUpperCase()+this.substr(1).toLowerCase()},reverse:function(){var a="";for(var b=this.length-1;b>=0;b--){a+=this[b]}return a},addCommas:function(){var a=this.split("."),d=a[0],b=a.length>1?"."+a[1]:"",c=/(\d+)(\d{3})/;while(c.test(d)){d=d.replace(c,"$1,$2")}return d+b}});Ext.apply(Date,{patterns:{hhmm:"Hi",aopaTime:"g:i A",aopaTime24hr:"H:i T",aopaDate:"n/j/y",aopa:"n/j/y g:i A T",aopa24hr:"n/j/y H:i T",sortable:"Y/m/d H:i:sO"},relativeFormats:{FORMAT_NORMAL:{withinsecs:"within seconds",lessthanmin:"less than a minute {0}",aboutmin:"about a minute {0}",minutes:"{1} minutes {0}",abouthour:"about an hour {0}",morethanhr:"more than an hour {0}",hours:"{1} hours {0}",aboutday:"about a day {0}",morethanday:"more than a day {0}",days:"{1} days {0}",aboutwk:"about a week {0}",morethanwk:"more than a week {0}",weeks:"{1} weeks {0}"},FORMAT_SHORT:{withinsecs:"now",lessthanmin:"under 1 min {0}",aboutmin:"1 min {0}",minutes:"{1} min {0}",abouthour:"1 hour {0}",morethanhr:"over 1 hour {0}",hours:"{1} hours {0}",aboutday:"1 day {0}",morethanday:"over 1 day {0}",days:"{1} days {0}",aboutwk:"1 week {0}",morethanwk:"over 1 week {0}",weeks:"{1} weeks {0}"}},inMinutes:function(a){return new Date().add(Date.MINUTE,a)},fromHHMM:function(a){var c=new Ext.ux.DateFormat(Date.patterns.hhmm,"Z"),b=c.parse(a);if(b<new Date()){b=b.add(Date.DAY,1)}return b},fromISO:function(a){return Date.parseDate(a,"c")}});Ext.apply(Date.prototype,{toHHMMString:function(){var a=new Ext.ux.DateFormat(Date.patterns.hhmm,"Z");return a.format(this)},toISOString:function(){var a=new Ext.ux.DateFormat("c","Z");return a.format(this)},toAopaTimeString:function(){return this.format(Date.patterns.aopaTime)+" UTC"+(-1*this.getTimezoneOffset()/60)},toNumericDateString:function(){return this.format(Date.patterns.aopaDate)},toSortableString:function(){var a=new Ext.ux.DateFormat(Date.patterns.sortable,"Z");return a.format(this)},relativeTo:function(d,f){d=d||new Date();f=f||Date.relativeFormats.FORMAT_NORMAL;var e=this.getTime()-d.getTime(),b=(e<0)?"ago":"from now",h={millis_per_sec:1000,millis_per_min:60000,millis_per_hr:3600000,millis_per_day:86400000,millis_per_week:604800000};e=Math.abs(e);var a=null,g=null;if(e/h.millis_per_min<0.2){a=f.withinsecs}else{if(e/h.millis_per_min<0.8){a=f.lessthanmin}else{if(e/h.millis_per_min<1.5){a=f.aboutmin}else{if(e/h.millis_per_hr<0.9){g=Math.round(e/h.millis_per_min);a=f.minutes}else{if(e/h.millis_per_hr<1.2){a=f.abouthour}else{if(e/h.millis_per_hr<1.9){a=f.morethanhr}else{if(e/h.millis_per_day<0.8){g=Math.round(e/h.millis_per_hr);a=f.hours}else{if(e/h.millis_per_day<1.2){a=f.aboutday}else{if(e/h.millis_per_day<1.9){a=f.morethanday}else{if(e/h.millis_per_week<0.9){g=Math.round(e/h.millis_per_day);a=f.days}else{if(e/h.millis_per_week<1.2){a=f.aboutwk}else{if(e/h.millis_per_week<1.9){a=f.morethanwk}else{if(e/h.millis_per_week<7){g=Math.round(e/h.millis_per_week);a=f.weeks}}}}}}}}}}}}}return a?String.format(a,b,g):null}});Number.prototype.toHHMMString=function(b){if(b==undefined){b=""}var a=String.leftPad(Math.floor(Math.round(this)/60),2,"0");var c=String.leftPad(Math.round(Math.round(this)%60),2,"0");if(c>=60){a++;c=c-60}if((a=="00"&&c=="00")||isNaN(a)||isNaN(c)){return""}else{return a+b+c}};String.prototype.HHMMToMinutes=function(a){if(a==undefined){a=""}return parseInt(this.substr(2+a.length,2))+parseInt(this.substr(0,2))*60};
/*
 * Ext JS Library 3.0.0
 * Copyright(c) 2006-2009 Ext JS, LLC
 * licensing@extjs.com
 * http://www.extjs.com/license
 */
(function(){Date.useStrict=false;function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,f){return c[f]})}Date.formatCodeToRegex=function(d,c){var e=Date.parseCodes[d];if(e){e=typeof e=="function"?e():e;Date.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.escapeRe(d)}};var a=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{"M$":function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var f=(d||"").match(e);return f?new Date(((f[1]||"")+f[2])*1):null}},parseRegexes:[],formatFunctions:{"M$":function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},getShortMonthName:function(c){return Date.monthNames[c].substring(0,3)},getShortDayName:function(c){return Date.dayNames[c].substring(0,3)},getMonthNumber:function(c){return Date.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"this.getFullYear()",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var j="Y-m-dTH:i:sP",g=[],f=0,d=j.length;f<d;++f){var h=j.charAt(f);g.push(h=="T"?"'T'":Date.getFormatCode(h))}return g.join(" + ")},U:"Math.round(this.getTime() / 1000)"},isValid:function(n,c,l,j,f,g,e){j=j||0;f=f||0;g=g||0;e=e||0;var k=new Date(n,c-1,l,j,f,g,e);return n==k.getFullYear()&&c==k.getMonth()+1&&l==k.getDate()&&j==k.getHours()&&f==k.getMinutes()&&g==k.getSeconds()&&e==k.getMilliseconds()},parseDate:function(d,f,c){var e=Date.parseFunctions;if(e[f]==null){Date.createParser(f)}return e[f](d,Ext.isDefined(c)?c:Date.useStrict)},getFormatCode:function(d){var c=Date.formatCodes[d];if(c){c=typeof c=="function"?c():c;Date.formatCodes[d]=c}return c||("'"+String.escape(d)+"'")},createFormat:function(g){var f=[],c=false,e="";for(var d=0;d<g.length;++d){e=g.charAt(d);if(!c&&e=="\\"){c=true}else{if(c){c=false;f.push("'"+String.escape(e)+"'")}else{f.push(Date.getFormatCode(e))}}}Date.formatFunctions[g]=new Function("return "+f.join("+"))},createParser:function(){var c=["var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,","def = Date.defaults,","results = String(input).match(Date.parseRegexes[{0}]);","if(results){","{1}","if(u != null){","v = new Date(u * 1000);","}else{","dt = (new Date()).clearTime();","y = y >= 0? y : Ext.num(def.y, dt.getFullYear());","m = m >= 0? m : Ext.num(def.m - 1, dt.getMonth());","d = d >= 0? d : Ext.num(def.d, dt.getDate());","h  = h || Ext.num(def.h, dt.getHours());","i  = i || Ext.num(def.i, dt.getMinutes());","s  = s || Ext.num(def.s, dt.getSeconds());","ms = ms || Ext.num(def.ms, dt.getMilliseconds());","if(z >= 0 && y >= 0){","v = new Date(y, 0, 1, h, i, s, ms);","v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);","}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = new Date(y, m, d, h, i, s, ms);","}","}","}","if(v){","if(zz != null){","v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(l){var e=Date.parseRegexes.length,m=1,f=[],k=[],j=false,d="";for(var h=0;h<l.length;++h){d=l.charAt(h);if(!j&&d=="\\"){j=true}else{if(j){j=false;k.push(String.escape(d))}else{var g=a(d,m);m+=g.g;k.push(g.s);if(g.g&&g.c){f.push(g.c)}}}}Date.parseRegexes[e]=new RegExp("^"+k.join("")+"$","i");Date.parseFunctions[l]=new Function("input","strict",b(c,e,f.join("")))}}(),parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},D:function(){for(var c=[],d=0;d<7;c.push(Date.getShortDayName(d)),++d){}return{g:0,c:null,s:"(?:"+c.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:1,c:"z = parseInt(results[{0}], 10);\n",s:"(\\d{1,3})"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n",s:"("+Date.monthNames.join("|")+")"}},M:function(){for(var c=[],d=0;d<12;c.push(Date.getShortMonthName(d)),++d){}return Ext.applyIf({s:"("+c.join("|")+")"},a("F"))},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return a("Y")},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (results[{0}] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"},A:{g:1,c:"if (results[{0}] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"},g:function(){return a("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a("Y",1),a("m",2),a("d",3),a("h",4),a("i",5),a("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a("P",8).c,"}else{",a("O",8).c,"}","}"].join("\n")}];for(var f=0,d=c.length;f<d;++f){e.push(c[f].c)}return{g:1,c:e.join(""),s:[c[0].s,"(?:","-",c[1].s,"(?:","-",c[2].s,"(?:","(?:T| )?",c[3].s,":",c[4].s,"(?::",c[5].s,")?","(?:(?:\\.|,)(\\d+))?","(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",")?",")?",")?"].join("")}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}}})}());Ext.apply(Date.prototype,{dateFormat:function(a){if(Date.formatFunctions[a]==null){Date.createFormat(a)}return Date.formatFunctions[a].call(this)},getTimezone:function(){return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getGMTOffset:function(a){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+(a?":":"")+String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0")},getDayOfYear:function(){var c=0,b=0,e=this.clone(),a=this.getMonth();for(c=0,e.setMonth(0);c<a;e.setMonth(++c)){b+=e.getDaysInMonth()}return b+this.getDate()-1},getWeekOfYear:function(){var a=86400000,b=7*a;return function(){var d=Date.UTC(this.getFullYear(),this.getMonth(),this.getDate()+3)/a,c=Math.floor(d/7),e=new Date(c*b).getUTCFullYear();return c-Math.floor(Date.UTC(e,0,7)/b)+1}}(),isLeapYear:function(){var a=this.getFullYear();return !!((a&3)==0&&(a%100||(a%400==0&&a)))},getFirstDayOfMonth:function(){var a=(this.getDay()-(this.getDate()-1))%7;return(a<0)?(a+7):a},getLastDayOfMonth:function(){return this.getLastDateOfMonth().getDay()},getFirstDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),1)},getLastDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth())},getDaysInMonth:function(){var a=[31,28,31,30,31,30,31,31,30,31,30,31];return function(){var b=this.getMonth();return b==1&&this.isLeapYear()?29:a[b]}}(),getSuffix:function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},clone:function(){return new Date(this.getTime())},isDST:function(){return new Date(this.getFullYear(),0,1).getTimezoneOffset()!=this.getTimezoneOffset()},clearTime:function(f){if(f){return this.clone().clearTime()}var b=this.getDate();this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);if(this.getDate()!=b){for(var a=1,e=this.add(Date.HOUR,a);e.getDate()!=b;a++,e=this.add(Date.HOUR,a)){}this.setDate(b);this.setHours(e.getHours())}return this},add:function(b,c){var e=this.clone();if(!b||c===0){return e}switch(b.toLowerCase()){case Date.MILLI:e.setMilliseconds(this.getMilliseconds()+c);break;case Date.SECOND:e.setSeconds(this.getSeconds()+c);break;case Date.MINUTE:e.setMinutes(this.getMinutes()+c);break;case Date.HOUR:e.setHours(this.getHours()+c);break;case Date.DAY:e.setDate(this.getDate()+c);break;case Date.MONTH:var a=this.getDate();if(a>28){a=Math.min(a,this.getFirstDateOfMonth().add("mo",c).getLastDateOfMonth().getDate())}e.setDate(a);e.setMonth(this.getMonth()+c);break;case Date.YEAR:e.setFullYear(this.getFullYear()+c);break}return e},between:function(c,a){var b=this.getTime();return c.getTime()<=b&&b<=a.getTime()}});Date.prototype.format=Date.prototype.dateFormat;if(Ext.isSafari&&(navigator.userAgent.match(/WebKit\/(\d+)/)[1]||NaN)<420){Ext.apply(Date.prototype,{_xMonth:Date.prototype.setMonth,_xDate:Date.prototype.setDate,setMonth:function(a){if(a<=-1){var d=Math.ceil(-a),c=Math.ceil(d/12),b=(d%12)?12-d%12:0;this.setFullYear(this.getFullYear()-c);return this._xMonth(b)}else{return this._xMonth(a)}},setDate:function(a){return this.setTime(this.getTime()-(this.getDate()-a)*86400000)}})}Ext.ns("Ext.ux");Ext.ux.TimeZone=function(a){this.zone=a||new Date().getTimezone()};Ext.ux.TimeZone.ZONES={A:-60,ADT:{offset:180,isDaylight:true},AKDT:{offset:480,isDaylight:true},AKST:540,AST:240,B:-120,C:-180,CDT:{offset:300,isDaylight:true},CST:360,D:-240,E:-300,EDT:{offset:240,isDaylight:true},EST:300,F:-360,G:-420,GMT:0,H:-480,HAA:{offset:180,isDaylight:true},HAC:{offset:300,isDaylight:true},HADT:{offset:540,isDaylight:true},HAE:{offset:240,isDaylight:true},HAP:{offset:420,isDaylight:true},HAR:{offset:360,isDaylight:true},HAST:600,HAT:{offset:150,isDaylight:true},HAY:{offset:480,isDaylight:true},HNA:240,HNC:360,HNE:300,HNP:480,HNR:420,HNT:210,HNY:540,I:-540,K:-600,L:-660,M:-720,MDT:{offset:360,isDaylight:true},MST:420,N:60,NDT:{offset:150,isDaylight:true},O:120,P:180,PDT:{offset:420,isDaylight:true},PST:480,Q:240,R:300,S:360,T:420,U:480,UTC:0,V:540,W:600,X:660,Y:720,Z:0};Ext.apply(Ext.ux.TimeZone.prototype,{setTimezone:function(a){this.zone=a},getTimezone:function(){return this.zone},getTimezoneOffset:function(){var a=Ext.ux.TimeZone.ZONES[this.zone];if(typeof a==="object"){return a.offset}else{return a}},isDST:function(){var a=Ext.ux.TimeZone.ZONES[this.zone];if(typeof a==="object"){return a.isDaylight||false}else{return false}}});Ext.ns("Ext.ux");Ext.ux.DateFormat=function(a,b){this.fmt=a;if(typeof b==="object"){this.tz=b}else{this.tz=new Ext.ux.TimeZone(b)}};Ext.apply(Ext.ux.DateFormat.prototype,{setTimezone:function(a){if(typeof a==="object"){this.tz=a}else{this.tz=new Ext.ux.TimeZone(a)}},getTimezone:function(){return this.tz},format:function(b){var a=new Date(b.getTime());if(this.tz){a=a.add(Date.MINUTE,b.getTimezoneOffset()-this.tz.getTimezoneOffset());Ext.apply(a,{getTimezone:this.tz.getTimezone.createDelegate(this.tz),getTimezoneOffset:this.tz.getTimezoneOffset.createDelegate(this.tz)})}return a.format(this.fmt)},parse:function(a){var b=Date.parseDate(a,this.fmt);if(!b){return null}else{return b.add(Date.MINUTE,this.tz.getTimezoneOffset()-b.getTimezoneOffset())}}});Ext.ns("Aopa");Aopa.Cookie={dateFormat:new Ext.ux.DateFormat("D, j M Y H:i:s T","UTC"),get:function(a){var d=document.cookie.split(";");for(var b=0;b<d.length;b++){var e=d[b];while(e.charAt(0)===" "){e=e.substr(1)}if(e.indexOf(a+"=")===0){return e.substr(a.length+1)}}return null},set:function(b,e,a,f,d){if(a===undefined){a=new Date();a.setTime(a.getTime()+365*24*60*60*1000)}if(f===undefined){f="/"}var c=String.format("{0}={1}; expires={2}; path={3}",b,e,Aopa.Cookie.dateFormat.format(a),f);if(d!==undefined){c+=String.format("; domain={0}",d)}document.cookie=c},unset:function(a){var b=new Date();Aopa.Cookie.set(a,"",new Date(b.getTime()-60000))}};Ext.ns("Aopa");Aopa.AppData=function(a){Ext.apply(this,a)};Ext.apply(Aopa.AppData.prototype,{resync:function(){var b=Aopa.Cookie.get(this.app+"Data");if(b){try{this.data=Ext.decode(b)}catch(a){this.data={}}}else{this.data={}}},commit:function(){Aopa.Cookie.set(this.app+"Data",Ext.encode(this.data))},get:function(a){if(!this.data){this.resync()}return this.data[a]},set:function(b,a){if(!this.data){this.resync()}this.data[b]=a;this.commit()},clear:function(a){if(!this.data){this.resync()}delete this.data[a];this.commit()}});Ext.ns("Aopa");Aopa.HomeAirport=function(a){this.addEvents("newHomeAirport","exception");this.conn=new Ext.data.Connection({url:Aopa.HomeAirport.URL,listeners:{requestcomplete:{fn:function(g,b,c){try{var f=b.responseText;if(f==""){throw"Empty response"}var d=Ext.decode(f);if(!d.success){throw"Response indicates failure"}if(this.homeAirport!==d.homeAirport){this.homeAirport=d.homeAirport;this.fireEvent("newHomeAirport",d.homeAirport)}}catch(h){this.fireEvent("exception",b.responseText)}},scope:this},requestexception:{fn:function(d,b,c){this.fireEvent("exception",b)},scope:this}}});Ext.apply(this,a);Aopa.HomeAirport.superclass.constructor.call(this,a)};Aopa.HomeAirport.URL="/webservices/myinbox/homeAirport.cfm";Ext.extend(Aopa.HomeAirport,Ext.util.Observable,{get:function(){this.conn.request({url:this.conn.url+"?method=read"})},update:function(a){this.conn.request({url:this.conn.url+"?method=update",params:{homeAirport:a}})}});Ext.ns("Aopa.ticket");Aopa.ticket.Ticket=function(){var g=Aopa.Cookie.get("Ticket").split("&");for(var d=0;d<g.length;d++){switch(g[d]){case"expires":this.expire_date=Date.parse("m/d/Y",g[d+1]);break;case"aces":var f=g[d+1].split("*");var c={};for(var b=0;b<f.length;b++){var e=f[b].split(","),a=e.shift();c[a]=e}this.aceList=new Aopa.ticket.AceList(c);break}}};Ext.apply(Aopa.ticket.Ticket.prototype,{getAceList:function(){return this.aceList},getExpireDate:function(){return this.expire_date}});Ext.ns("Aopa.ticket");Aopa.ticket.AceList=function(a){this.aces=a};Ext.apply(Aopa.ticket.AceList.prototype,{getAce:function(a){return this.aces[a]}});Ext.ns("Aopa");Aopa.ServerClock=function(){this.reqStartDate=new Date().getTime();Ext.Ajax.request({url:"/wxservices/servertime.cfm",success:this.initializeClock,scope:this});this.initialized=false;Aopa.ServerClock.superclass.constructor.call(this);this.addEvents("gotskew")};Ext.extend(Aopa.ServerClock,Ext.util.Observable,{initializeClock:function(c){var b=new Date().getTime();if(!c.responseXML){return}this.initialized=true;var e=Ext.DomQuery,a=e.selectNode("utc",c.responseXML),d=new Date();d.setUTCFullYear(e.selectValue("year",a));d.setUTCMonth(e.selectValue("month",a)-1);d.setUTCDate(e.selectValue("day",a));d.setUTCHours(e.selectValue("hour",a));d.setUTCMinutes(e.selectValue("minute",a));d.setUTCSeconds(e.selectValue("second",a));this.skew=b-(b-this.reqStartDate)/2-d;this.fireEvent("gotskew",this,this.skew)},getSkew:function(){return this.skew},getServerDate:function(){return new Date().add(Date.MILLI,this.skew)}});function urlparam(b){b=b.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var d=new RegExp("[#&?]"+b+"=([^&#]*)","g"),a=window.location.href;var c=d.exec(a);if(c===null){return""}var e;while(e=d.exec(a)){c=e}return c[1]}function setUrlParam(a,h,e){var d=e?"#":"?",g=new RegExp("[#&?]"+a+"=([^&#]*)","g"),f=window.location,b=e?f.hash:f.search,i;var c=g.exec(b);if(c===null){if(b.length){i=b+"&"+a+"="+h}else{i=d+a+"="+h}}else{i=b.substr(0,c.index+1)+a+"="+h+b.substr(g.lastIndex)}if(e){f.hash=i}else{var c=g.exec(f.hash);if(c!==null){f.hash=f.hash.substr(0,c.index+1)+f.hash.substr(g.lastIndex)}if(f.hash==="#"){f.hash=""}f.search=i}}Ext.ns("Ext.ux");Ext.ux.HoverTabs=function(c,a){this.tabct=c;Ext.apply(this,a,{tabSelector:".tab",contentIdInsert:"Content",autoHide:false});var b=this;if(this.autoHide){this.hideTasks={};c.select(this.tabSelector).each(function(e){var d=Ext.fly(e).dom.id;b.hideTasks[d]=new Ext.util.DelayedTask(b.tabHide,b,[d]);var f=b.getContentEl(e);if(f){f.hover(function(){b.hideTasks[b.getTabEl(this).id].cancel()},function(g,h){b.hideTasks[b.getTabEl(this).id].delay(400)})}});c.select(this.tabSelector).hover(function(){b.tabHover(Ext.get(this))},function(){b.hideTasks[this.id].delay(200)})}else{c.on("mouseover",function(){b.tabHover(Ext.get(this))},null,{delegate:this.tabSelector})}};Ext.apply(Ext.ux.HoverTabs.prototype,{getContentEl:function(a){var b=a.id||a.dom.id;return Ext.get(b.slice(0,b.length-1)+this.contentIdInsert+b.slice(-1))},getTabEl:function(a){var b=a.id||a.dom.id;return Ext.get(b.slice(0,b.length-1-this.contentIdInsert.length)+b.slice(-1))},tabHide:function(a){var c=Ext.get(a);c.removeClass("on");var b=this.getContentEl(c);if(b){b.setVisible(false,{callback:function(e){var d=e.parent();for(var f=d.first();f!==null;f=f.next()){if(f.isVisible()){return}}d.setVisible(false)}})}},tabHover:function(b){b.radioClass("on");if(this.autoHide){this.hideTasks[b.dom.id].cancel()}var c=this.getContentEl(b);if(c){var a=c.parent();if(!this.contentctInitialized){a.setVisibilityMode(Ext.Element.DISPLAY);this.showContentTask=new Ext.util.DelayedTask(function(){var e=this.openContent;if(!e.isVisible()){e.setVisible(true,{stopFx:true})}for(var d=a.first();d!==null;d=d.next()){if(d!==e&&d.isVisible()){d.setVisible(false,true);break}}},this);this.contentctInitialized=true}if(!a.isVisible()){a.setVisible(true)}this.showContentTask.cancel();this.openContent=c;this.showContentTask.delay(100)}}});Ext.ns("Ext.ux");Ext.ux.Carousel=Ext.extend(Ext.util.Observable,{interval:3,transitionDuration:1,transitionType:"carousel",transitionEasing:"easeOut",itemSelector:"img",activeSlide:0,autoPlay:false,showPlayButton:false,pauseOnNavigate:false,wrap:false,freezeOnHover:false,navigationOnHover:false,hideNavigation:false,constructor:function(b,a){a=a||{};Ext.apply(this,a);Ext.ux.Carousel.superclass.constructor.call(this,a);this.addEvents("beforeprev","prev","beforenext","next","change","play","pause","freeze","unfreeze");this.el=Ext.get(b);this.slides=this.els=[];if(this.autoPlay||this.showPlayButton){this.wrap=true}if(this.autoPlay&&a.showPlayButton===undefined){this.showPlayButton=true}this.initMarkup();this.initEvents();if(this.carouselSize>0){this.refresh()}},initMarkup:function(){var a=Ext.DomHelper;this.carouselSize=0;this.els.container=a.append(this.el,{cls:"ux-carousel-container"},true);this.els.slidesWrap=a.append(this.els.container,{cls:"ux-carousel-slides-wrap"},true);this.els.navigation=a.append(this.els.container,{cls:"ux-carousel-nav"},true).hide();this.els.caption=a.append(this.els.navigation,{tag:"h2",cls:"ux-carousel-caption"},true);this.els.navNext=a.append(this.els.navigation,{tag:"a",href:"#",cls:"ux-carousel-nav-next"},true);if(this.showPlayButton){this.els.navPlay=a.append(this.els.navigation,{tag:"a",href:"#",cls:"ux-carousel-nav-play"},true)}this.els.navPrev=a.append(this.els.navigation,{tag:"a",href:"#",cls:"ux-carousel-nav-prev"},true);this.slideWidth=this.el.getWidth(true);this.slideHeight=this.el.getHeight(true);this.els.container.setStyle({width:this.slideWidth+"px",height:this.slideHeight+"px"});this.els.caption.setWidth((this.slideWidth-(this.els.navNext.getWidth()*2)-(this.showPlayButton?this.els.navPlay.getWidth():0)-20)+"px");this.el.select(this.itemSelector).appendTo(this.els.slidesWrap).each(function(b){b=b.wrap({cls:"ux-carousel-slide"});this.slides.push(b);b.setWidth(this.slideWidth+"px").setHeight(this.slideHeight+"px")},this);this.carouselSize=this.slides.length;if(this.navigationOnHover){this.els.navigation.setStyle("top",(-1*this.els.navigation.getHeight())+"px")}this.el.clip()},initEvents:function(){this.els.navPrev.on("click",function(a){a.preventDefault();var b=a.getTarget();b.blur();if(Ext.fly(b).hasClass("ux-carousel-nav-disabled")){return}this.prev()},this);this.els.navNext.on("click",function(a){a.preventDefault();var b=a.getTarget();b.blur();if(Ext.fly(b).hasClass("ux-carousel-nav-disabled")){return}this.next()},this);if(this.showPlayButton){this.els.navPlay.on("click",function(a){a.preventDefault();a.getTarget().blur();if(this.playing){this.pause()}else{this.play()}},this)}if(this.freezeOnHover){this.els.container.on("mouseenter",function(){if(this.playing){this.fireEvent("freeze",this.slides[this.activeSlide]);Ext.TaskMgr.stop(this.playTask)}},this);this.els.container.on("mouseleave",function(){if(this.playing){this.fireEvent("unfreeze",this.slides[this.activeSlide]);Ext.TaskMgr.start(this.playTask)}},this,{buffer:(this.interval/2)*1000})}if(this.navigationOnHover){this.els.container.on("mouseenter",function(){if(!this.navigationShown){this.navigationShown=true;this.els.navigation.stopFx(false).shift({y:this.els.container.getY(),duration:this.transitionDuration})}},this);this.els.container.on("mouseleave",function(){if(this.navigationShown){this.navigationShown=false;this.els.navigation.stopFx(false).shift({y:this.els.navigation.getHeight()-this.els.container.getY(),duration:this.transitionDuration})}},this)}if(this.interval&&this.autoPlay){this.play()}},prev:function(){if(this.fireEvent("beforeprev")===false){return}if(this.pauseOnNavigate){this.pause()}this.setSlide(this.activeSlide-1);this.fireEvent("prev",this.activeSlide);return this},next:function(){if(this.fireEvent("beforenext")===false){return}if(this.pauseOnNavigate){this.pause()}this.setSlide(this.activeSlide+1);this.fireEvent("next",this.activeSlide);return this},play:function(){if(!this.playing){this.playTask=this.playTask||{run:function(){this.playing=true;this.setSlide(this.activeSlide+1)},interval:this.interval*1000,scope:this};this.playTaskBuffer=this.playTaskBuffer||new Ext.util.DelayedTask(function(){Ext.TaskMgr.start(this.playTask)},this);this.playTaskBuffer.delay(this.interval*1000);this.playing=true;this.els.navPlay.addClass("ux-carousel-playing");this.fireEvent("play")}return this},pause:function(){if(this.playing){Ext.TaskMgr.stop(this.playTask);this.playTaskBuffer.cancel();this.playing=false;this.els.navPlay.removeClass("ux-carousel-playing");this.fireEvent("pause")}return this},clear:function(){this.els.slidesWrap.update("");this.slides=[];this.carouselSize=0;this.pause();return this},add:function(b,a){var c=Ext.fly(b).appendTo(this.els.slidesWrap).wrap({cls:"ux-carousel-slide"});c.setWidth(this.slideWidth+"px").setHeight(this.slideHeight+"px");this.slides.push(c);if(a){this.refresh()}return this},refresh:function(){this.carouselSize=this.slides.length;this.els.slidesWrap.setWidth((this.slideWidth*this.carouselSize)+"px");if(this.carouselSize>0){if(!this.hideNavigation){this.els.navigation.show()}this.activeSlide=0;this.setSlide(0,true)}return this},setSlide:function(b,a){if(!this.wrap&&!this.slides[b]){return}else{if(this.wrap){if(b<0){b=this.carouselSize-1}else{if(b>this.carouselSize-1){b=0}}}}if(!this.slides[b]){return}this.els.caption.update(this.slides[b].child(":first-child",true).title||"");var d=b*this.slideWidth;if(!a){switch(this.transitionType){case"fade":this.slides[b].setOpacity(0);this.slides[this.activeSlide].stopFx(false).fadeOut({duration:this.transitionDuration/2,callback:function(){this.els.slidesWrap.setStyle("left",(-1*d)+"px");this.slides[this.activeSlide].setOpacity(1);this.slides[b].fadeIn({duration:this.transitionDuration/2})},scope:this});break;default:var c=(-1*d)+this.els.container.getX();this.els.slidesWrap.stopFx(false);this.els.slidesWrap.shift({duration:this.transitionDuration,x:c,easing:this.transitionEasing});break}}else{this.els.slidesWrap.setStyle("left","0")}this.activeSlide=b;this.updateNav();this.fireEvent("change",this.slides[b],b)},updateNav:function(){this.els.navPrev.removeClass("ux-carousel-nav-disabled");this.els.navNext.removeClass("ux-carousel-nav-disabled");if(!this.wrap){if(this.activeSlide===0){this.els.navPrev.addClass("ux-carousel-nav-disabled")}if(this.activeSlide===this.carouselSize-1){this.els.navNext.addClass("ux-carousel-nav-disabled")}}}});
