appcelerator 2.0.1.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. data/appcelerator/templates/appcelerator.xml +1 -0
  2. data/appcelerator/templates/application.rb +1 -2
  3. data/appcelerator/templates/index.html +1 -1
  4. data/appcelerator/templates/{js → javascripts}/appcelerator-debug.js +1110 -372
  5. data/appcelerator/templates/javascripts/appcelerator.js +20 -0
  6. data/appcelerator/templates/modules/app_box/app_box.js +1 -0
  7. data/appcelerator/templates/modules/app_button/app_button.js +1 -0
  8. data/appcelerator/templates/modules/app_button/css/button.css +1 -0
  9. data/appcelerator/templates/modules/app_button/images/dark_round_left.png +0 -0
  10. data/appcelerator/templates/modules/app_button/images/dark_round_left_disabled.png +0 -0
  11. data/appcelerator/templates/modules/app_button/images/dark_round_left_over.png +0 -0
  12. data/appcelerator/templates/modules/app_button/images/dark_round_left_press.png +0 -0
  13. data/appcelerator/templates/modules/app_button/images/dark_round_middle.png +0 -0
  14. data/appcelerator/templates/modules/app_button/images/dark_round_middle_disabled.png +0 -0
  15. data/appcelerator/templates/modules/app_button/images/dark_round_middle_over.png +0 -0
  16. data/appcelerator/templates/modules/app_button/images/dark_round_middle_press.png +0 -0
  17. data/appcelerator/templates/modules/app_button/images/dark_round_right.png +0 -0
  18. data/appcelerator/templates/modules/app_button/images/dark_round_right_disabled.png +0 -0
  19. data/appcelerator/templates/modules/app_button/images/dark_round_right_over.png +0 -0
  20. data/appcelerator/templates/modules/app_button/images/dark_round_right_press.png +0 -0
  21. data/appcelerator/templates/modules/app_button/images/dark_square_left.png +0 -0
  22. data/appcelerator/templates/modules/app_button/images/dark_square_left_disabled.png +0 -0
  23. data/appcelerator/templates/modules/app_button/images/dark_square_left_over.png +0 -0
  24. data/appcelerator/templates/modules/app_button/images/dark_square_left_press.png +0 -0
  25. data/appcelerator/templates/modules/app_button/images/dark_square_middle.png +0 -0
  26. data/appcelerator/templates/modules/app_button/images/dark_square_middle_disabled.png +0 -0
  27. data/appcelerator/templates/modules/app_button/images/dark_square_middle_over.png +0 -0
  28. data/appcelerator/templates/modules/app_button/images/dark_square_middle_press.png +0 -0
  29. data/appcelerator/templates/modules/app_button/images/dark_square_right.png +0 -0
  30. data/appcelerator/templates/modules/app_button/images/dark_square_right_disabled.png +0 -0
  31. data/appcelerator/templates/modules/app_button/images/dark_square_right_over.png +0 -0
  32. data/appcelerator/templates/modules/app_button/images/dark_square_right_press.png +0 -0
  33. data/appcelerator/templates/modules/app_button/images/icon_add_gray.png +0 -0
  34. data/appcelerator/templates/modules/app_button/images/icon_add_green.png +0 -0
  35. data/appcelerator/templates/modules/app_button/images/icon_delete_gray.png +0 -0
  36. data/appcelerator/templates/modules/app_button/images/icon_delete_red.png +0 -0
  37. data/appcelerator/templates/modules/app_button/images/icon_edit_gray.png +0 -0
  38. data/appcelerator/templates/modules/app_button/images/icon_edit_yellow.png +0 -0
  39. data/appcelerator/templates/modules/app_button/images/icon_save_blue.png +0 -0
  40. data/appcelerator/templates/modules/app_button/images/icon_save_gray.png +0 -0
  41. data/appcelerator/templates/modules/app_button/images/light_round_left.png +0 -0
  42. data/appcelerator/templates/modules/app_button/images/light_round_left_disabled.png +0 -0
  43. data/appcelerator/templates/modules/app_button/images/light_round_left_over.png +0 -0
  44. data/appcelerator/templates/modules/app_button/images/light_round_left_press.png +0 -0
  45. data/appcelerator/templates/modules/app_button/images/light_round_middle.png +0 -0
  46. data/appcelerator/templates/modules/app_button/images/light_round_middle_disabled.png +0 -0
  47. data/appcelerator/templates/modules/app_button/images/light_round_middle_over.png +0 -0
  48. data/appcelerator/templates/modules/app_button/images/light_round_middle_press.png +0 -0
  49. data/appcelerator/templates/modules/app_button/images/light_round_right.png +0 -0
  50. data/appcelerator/templates/modules/app_button/images/light_round_right_disabled.png +0 -0
  51. data/appcelerator/templates/modules/app_button/images/light_round_right_over.png +0 -0
  52. data/appcelerator/templates/modules/app_button/images/light_round_right_press.png +0 -0
  53. data/appcelerator/templates/modules/app_button/images/light_square_left.png +0 -0
  54. data/appcelerator/templates/modules/app_button/images/light_square_left_disabled.png +0 -0
  55. data/appcelerator/templates/modules/app_button/images/light_square_left_over.png +0 -0
  56. data/appcelerator/templates/modules/app_button/images/light_square_left_press.png +0 -0
  57. data/appcelerator/templates/modules/app_button/images/light_square_middle.png +0 -0
  58. data/appcelerator/templates/modules/app_button/images/light_square_middle_disabled.png +0 -0
  59. data/appcelerator/templates/modules/app_button/images/light_square_middle_over.png +0 -0
  60. data/appcelerator/templates/modules/app_button/images/light_square_middle_press.png +0 -0
  61. data/appcelerator/templates/modules/app_button/images/light_square_right.png +0 -0
  62. data/appcelerator/templates/modules/app_button/images/light_square_right_disabled.png +0 -0
  63. data/appcelerator/templates/modules/app_button/images/light_square_right_over.png +0 -0
  64. data/appcelerator/templates/modules/app_button/images/light_square_right_press.png +0 -0
  65. data/appcelerator/templates/modules/app_calendar/app_calendar.js +1 -1
  66. data/appcelerator/templates/modules/app_chart/app_chart.js +1 -1
  67. data/appcelerator/templates/modules/app_content/app_content.js +1 -1
  68. data/appcelerator/templates/modules/app_datatable/app_datatable.js +1 -1
  69. data/appcelerator/templates/modules/app_http/app_http.js +1 -0
  70. data/appcelerator/templates/modules/app_if/app_if.js +1 -0
  71. data/appcelerator/templates/modules/app_iterator/app_iterator.js +1 -1
  72. data/appcelerator/templates/modules/app_message/app_message.js +1 -1
  73. data/appcelerator/templates/modules/app_modaldialog/app_modaldialog.js +1 -1
  74. data/appcelerator/templates/modules/app_panel/app_panel.js +1 -0
  75. data/appcelerator/templates/modules/app_panel/app_panel_test.html +24 -0
  76. data/appcelerator/templates/modules/app_panel/css/panel.css +1 -0
  77. data/appcelerator/templates/modules/app_panel/css/panel_ie7.css +1 -0
  78. data/appcelerator/templates/modules/app_panel/images/close.png +0 -0
  79. data/appcelerator/templates/modules/app_panel/images/close_hover.png +0 -0
  80. data/appcelerator/templates/modules/app_panel/images/close_onclick.png +0 -0
  81. data/appcelerator/templates/modules/app_panel/images/collapsed_headers_12.png +0 -0
  82. data/appcelerator/templates/modules/app_panel/images/collapsed_headers_13.gif +0 -0
  83. data/appcelerator/templates/modules/app_panel/images/collapsed_headers_15.png +0 -0
  84. data/appcelerator/templates/modules/app_panel/images/collapsed_headers_17.png +0 -0
  85. data/appcelerator/templates/modules/app_panel/images/collapsed_headers_19.png +0 -0
  86. data/appcelerator/templates/modules/app_panel/images/collapsed_headers_62.png +0 -0
  87. data/appcelerator/templates/modules/app_panel/images/collapsed_headers_63.gif +0 -0
  88. data/appcelerator/templates/modules/app_panel/images/collapsed_headers_65.png +0 -0
  89. data/appcelerator/templates/modules/app_panel/images/collapsed_headers_67.png +0 -0
  90. data/appcelerator/templates/modules/app_panel/images/collapsed_headers_69.png +0 -0
  91. data/appcelerator/templates/modules/app_panel/images/down.png +0 -0
  92. data/appcelerator/templates/modules/app_panel/images/down_hover.png +0 -0
  93. data/appcelerator/templates/modules/app_panel/images/down_onclick.png +0 -0
  94. data/appcelerator/templates/modules/app_panel/images/expanded_headers_12.png +0 -0
  95. data/appcelerator/templates/modules/app_panel/images/expanded_headers_13.gif +0 -0
  96. data/appcelerator/templates/modules/app_panel/images/expanded_headers_15.png +0 -0
  97. data/appcelerator/templates/modules/app_panel/images/expanded_headers_17.png +0 -0
  98. data/appcelerator/templates/modules/app_panel/images/expanded_headers_19.png +0 -0
  99. data/appcelerator/templates/modules/app_panel/images/expanded_headers_52.png +0 -0
  100. data/appcelerator/templates/modules/app_panel/images/expanded_headers_53.gif +0 -0
  101. data/appcelerator/templates/modules/app_panel/images/expanded_headers_55.png +0 -0
  102. data/appcelerator/templates/modules/app_panel/images/expanded_headers_57.png +0 -0
  103. data/appcelerator/templates/modules/app_panel/images/expanded_headers_59.png +0 -0
  104. data/appcelerator/templates/modules/app_panel/images/footer_30.png +0 -0
  105. data/appcelerator/templates/modules/app_panel/images/footer_32.png +0 -0
  106. data/appcelerator/templates/modules/app_panel/images/footer_37.png +0 -0
  107. data/appcelerator/templates/modules/app_panel/images/footer_39.png +0 -0
  108. data/appcelerator/templates/modules/app_panel/images/footer_43.gif +0 -0
  109. data/appcelerator/templates/modules/app_panel/images/footer_72.png +0 -0
  110. data/appcelerator/templates/modules/app_panel/images/footer_75.png +0 -0
  111. data/appcelerator/templates/modules/app_panel/images/footer_77.png +0 -0
  112. data/appcelerator/templates/modules/app_panel/images/footer_79.png +0 -0
  113. data/appcelerator/templates/modules/app_panel/images/footer_93.gif +0 -0
  114. data/appcelerator/templates/modules/app_panel/images/gray_left_tail.png +0 -0
  115. data/appcelerator/templates/modules/app_panel/images/gray_right_tail.png +0 -0
  116. data/appcelerator/templates/modules/app_panel/images/up.png +0 -0
  117. data/appcelerator/templates/modules/app_panel/images/up_hover.png +0 -0
  118. data/appcelerator/templates/modules/app_panel/images/up_onclick.png +0 -0
  119. data/appcelerator/templates/modules/app_panel/images/white_left_tail.png +0 -0
  120. data/appcelerator/templates/modules/app_panel/images/white_right_tail.png +0 -0
  121. data/appcelerator/templates/modules/app_progressbar/app_progressbar.js +1 -0
  122. data/appcelerator/templates/modules/app_progressbar/css/progressbar.css +1 -0
  123. data/appcelerator/templates/modules/app_script/app_script.js +1 -1
  124. data/appcelerator/templates/modules/app_search/app_search.js +1 -0
  125. data/appcelerator/templates/modules/app_search/css/search.css +1 -0
  126. data/appcelerator/templates/modules/app_security/app_security.js +1 -1
  127. data/appcelerator/templates/modules/app_upload/app_upload.js +1 -1
  128. data/appcelerator/templates/proxy_controller.rb +25 -0
  129. data/appcelerator/templates/routes.rb +2 -0
  130. data/appcelerator/templates/{service_broker.rb → service_broker_controller.rb} +0 -0
  131. data/appcelerator/templates/servicetester.html +208 -0
  132. data/appcelerator/templates/test_service.rb +3 -3
  133. data/appcelerator/templates/upload_controller.rb +55 -0
  134. data/bin/appcelerator +51 -30
  135. data/lib/appcelerator.rb +11 -5
  136. data/lib/appcelerator/dispatcher.rb +62 -62
  137. data/lib/appcelerator/service.rb +220 -222
  138. data/lib/appcelerator/service_broker_controller.rb +3 -11
  139. data/lib/appcelerator/servicebroker/inmemory_service_broker.rb +43 -37
  140. data/service/USAGE +1 -0
  141. data/service/templates/service.rb +3 -3
  142. metadata +164 -49
  143. data/appcelerator/appcelerator_generator.rb +0 -195
  144. data/appcelerator/templates/environment.rb +0 -65
  145. data/appcelerator/templates/js/appcelerator.js +0 -20
  146. data/appcelerator/templates/server +0 -4
  147. data/lib/appcelerator/model.rb +0 -94
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Appcelerator SDK
3
+ * Copyright (C) 2006-2007 by Appcelerator, Inc. All Rights Reserved.
4
+ * For more information, please visit http://www.appcelerator.org
5
+ *
6
+ * This program is free software; you can redistribute it and/or modify
7
+ * it under the terms of the GNU General Public License as published by
8
+ * the Free Software Foundation; either version 2 of the License, or
9
+ * (at your option) any later version.
10
+ *
11
+ * This program is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU General Public License along
17
+ * with this program; if not, write to the Free Software Foundation, Inc.,
18
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
+ */
20
+ $$w=window;$$d=document;$$n=navigator;appCompilerIdCache={};var Prototype={Version:"1.6.0",Browser:{IE:!!($$w.attachEvent&&!$$w.opera),Opera:!!$$w.opera,WebKit:$$n.userAgent.indexOf("AppleWebKit/")>-1,Gecko:$$n.userAgent.indexOf("Gecko")>-1&&$$n.userAgent.indexOf("KHTML")==-1,MobileSafari:!!$$n.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!$$d.evaluate,ElementExtensions:!!$$w.HTMLElement,SpecificElementExtensions:$$d.createElement("div").__proto__&&$$d.createElement("div").__proto__!==$$d.createElement("form").__proto__},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(A){return A}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}if(Prototype.Browser.WebKit){Prototype.BrowserFeatures.XPath=false}var Class={create:function(){var E=null,D=$A(arguments);if(Object.isFunction(D[0])){E=D.shift()}function A(){this.initialize.apply(this,arguments)}Object.extend(A,Class.Methods);A.superclass=E;A.subclasses=[];if(E){var B=function(){};B.prototype=E.prototype;A.prototype=new B;E.subclasses.push(A)}for(var C=0;C<D.length;C++){A.addMethods(D[C])}if(!A.prototype.initialize){A.prototype.initialize=Prototype.emptyFunction}A.prototype.constructor=A;return A}};Class.Methods={addMethods:function(G){var C=this.superclass&&this.superclass.prototype;var B=Object.keys(G);if(!Object.keys({toString:true}).length){B.push("toString","valueOf")}for(var A=0,D=B.length;A<D;A++){var F=B[A],E=G[F];if(C&&Object.isFunction(E)&&E.argumentNames().first()=="$super"){var H=E,E=Object.extend((function(I){return function(){return C[I].apply(this,arguments)}})(F).wrap(H),{valueOf:function(){return H},toString:function(){return H.toString()}})}this.prototype[F]=E}return this}};var Abstract={};Object.extend=function(A,C){for(var B in C){A[B]=C[B]}return A};Object.extend(Object,{inspect:function(A){try{if(A===undefined){return"undefined"}if(A===null){return"null"}return A.inspect?A.inspect():A.toString()}catch(B){if(B instanceof RangeError){return"..."}throw B}},toJSON:function(A){var C=typeof A;switch(C){case"undefined":case"function":case"unknown":return ;case"boolean":return A.toString()}if(A===null){return"null"}if(A.toJSON){return A.toJSON()}if(Object.isElement(A)){return }var B=[];for(var E in A){var D=Object.toJSON(A[E]);if(D!==undefined){B.push(E.toJSON()+": "+D)}}return"{"+B.join(", ")+"}"},toQueryString:function(A){return $H(A).toQueryString()},toHTML:function(A){return A&&A.toHTML?A.toHTML():String.interpret(A)},keys:function(A){var B=[];for(var C in A){B.push(C)}return B},values:function(B){var A=[];for(var C in B){A.push(B[C])}return A},clone:function(A){return Object.extend({},A)},isElement:function(A){return A&&A.nodeType==1},isArray:function(A){return A&&A.constructor===Array},isHash:function(A){return A instanceof Hash},isFunction:function(A){return typeof A=="function"},isString:function(A){return typeof A=="string"},isNumber:function(A){return typeof A=="number"},isUndefined:function(A){return typeof A=="undefined"}});Object.extend(Function.prototype,{argumentNames:function(){var A=this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip");return A.length==1&&!A[0]?[]:A},bind:function(){if(arguments.length<2&&arguments[0]===undefined){return this}var A=this,C=$A(arguments),B=C.shift();return function(){return A.apply(B,C.concat($A(arguments)))}},bindAsEventListener:function(){var A=this,C=$A(arguments),B=C.shift();return function(D){return A.apply(B,[D||$$w.event].concat(C))}},curry:function(){if(!arguments.length){return this}var A=this,B=$A(arguments);return function(){return A.apply(this,B.concat($A(arguments)))}},delay:function(){var A=this,B=$A(arguments),C=B.shift()*1000;return $$w.setTimeout(function(){return A.apply(A,B)},C)},wrap:function(B){var A=this;return function(){return B.apply(this,[A.bind(this)].concat($A(arguments)))}},methodize:function(){if(this._methodized){return this._methodized}var A=this;return this._methodized=function(){return A.apply(null,[this].concat($A(arguments)))}}});Function.prototype.defer=Function.prototype.delay.curry(0.01);Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+'Z"'};var Try={these:function(){var C;for(var B=0,D=arguments.length;B<D;B++){var A=arguments[B];try{C=A();break}catch(E){}}return C}};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(A){return String(A).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var PeriodicalExecuter=Class.create({initialize:function(B,A){this.callback=B;this.frequency=A;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},execute:function(){this.callback(this)},stop:function(){if(!this.timer){return }clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute()}finally{this.currentlyExecuting=false}}}});Object.extend(String,{interpret:function(A){return A==null?"":String(A)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,{gsub:function(E,C){var A="",D=this,B;C=arguments.callee.prepareReplacement(C);while(D.length>0){if(B=D.match(E)){A+=D.slice(0,B.index);A+=String.interpret(C(B));D=D.slice(B.index+B[0].length)}else{A+=D,D=""}}return A},sub:function(C,A,B){A=this.gsub.prepareReplacement(A);B=B===undefined?1:B;return this.gsub(C,function(D){if(--B<0){return D[0]}return A(D)})},scan:function(B,A){this.gsub(B,A);return String(this)},truncate:function(B,A){B=B||30;A=A===undefined?"...":A;return this.length>B?this.slice(0,B-A.length)+A:String(this)},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var B=new RegExp(Prototype.ScriptFragment,"img");var A=new RegExp(Prototype.ScriptFragment,"im");return(this.match(B)||[]).map(function(C){return(C.match(A)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var A=arguments.callee;A.text.data=this;return A.div.innerHTML},unescapeHTML:function(){var A=new Element("div");A.innerHTML=this.stripTags();return A.childNodes[0]?(A.childNodes.length>1?$A(A.childNodes).inject("",function(B,C){return B+C.nodeValue}):A.childNodes[0].nodeValue):""},toQueryParams:function(B){var A=this.strip().match(/([^?#]*)(#.*)?$/);if(!A){return{}}return A[1].split(B||"&").inject({},function(E,F){if((F=F.split("="))[0]){var C=decodeURIComponent(F.shift());var D=F.length>1?F.join("="):F[0];if(D!=undefined){D=decodeURIComponent(D)}if(C in E){if(!Object.isArray(E[C])){E[C]=[E[C]]}E[C].push(D)}else{E[C]=D}}return E})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(A){return A<1?"":new Array(A+1).join(this)},camelize:function(){var D=this.split("-"),A=D.length;if(A==1){return D[0]}var C=this.charAt(0)=="-"?D[0].charAt(0).toUpperCase()+D[0].substring(1):D[0];for(var B=1;B<A;B++){C+=D[B].charAt(0).toUpperCase()+D[B].substring(1)}return C},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(B){var A=this.gsub(/[\x00-\x1f\\]/,function(C){var D=String.specialChar[C[0]];return D?D:"\\u00"+C[0].charCodeAt().toPaddedString(2,16)});if(B){return'"'+A.replace(/"/g,'\\"')+'"'}return"'"+A.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(A){return this.sub(A||Prototype.JSONFilter,"#{1}")},isJSON:function(){var A=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(A)},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON()){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())},include:function(A){return this.indexOf(A)>-1},startsWith:function(A){return this.indexOf(A)===0},endsWith:function(A){var B=this.length-A.length;return B>=0&&this.lastIndexOf(A)===B},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)},interpolate:function(A,B){return new Template(this,B).evaluate(A)}});if(Prototype.Browser.WebKit||Prototype.Browser.IE){Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")}})}String.prototype.gsub.prepareReplacement=function(B){if(Object.isFunction(B)){return B}var A=new Template(B);return function(C){return A.evaluate(C)}};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:$$d.createElement("div"),text:$$d.createTextNode("")});with(String.prototype.escapeHTML){div.appendChild(text)}var Template=Class.create({initialize:function(A,B){this.template=A.toString();this.pattern=B||Template.Pattern},evaluate:function(A){if(Object.isFunction(A.toTemplateReplacements)){A=A.toTemplateReplacements()}return this.template.gsub(this.pattern,function(D){if(A==null){return""}var F=D[1]||"";if(F=="\\"){return D[2]}var B=A,G=D[3];var E=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/,D=E.exec(G);if(D==null){return F}while(D!=null){var C=D[1].startsWith("[")?D[2].gsub("\\\\]","]"):D[1];B=B[C];if(null==B||""==D[3]){break}G=G.substring("["==D[3]?D[1].length:D[0].length);D=E.exec(G)}return F+String.interpret(B)}.bind(this))}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable={each:function(C,B){var A=0;C=C.bind(B);try{this._each(function(E){C(E,A++)})}catch(D){if(D!=$break){throw D}}return this},eachSlice:function(D,C,B){C=C?C.bind(B):Prototype.K;var A=-D,E=[],F=this.toArray();while((A+=D)<F.length){E.push(F.slice(A,A+D))}return E.collect(C,B)},all:function(C,B){C=C?C.bind(B):Prototype.K;var A=true;this.each(function(E,D){A=A&&!!C(E,D);if(!A){throw $break}});return A},any:function(C,B){C=C?C.bind(B):Prototype.K;var A=false;this.each(function(E,D){if(A=!!C(E,D)){throw $break}});return A},collect:function(C,B){C=C?C.bind(B):Prototype.K;var A=[];this.each(function(E,D){A.push(C(E,D))});return A},detect:function(C,B){C=C.bind(B);var A;this.each(function(E,D){if(C(E,D)){A=E;throw $break}});return A},findAll:function(C,B){C=C.bind(B);var A=[];this.each(function(E,D){if(C(E,D)){A.push(E)}});return A},grep:function(D,C,B){C=C?C.bind(B):Prototype.K;var A=[];if(Object.isString(D)){D=new RegExp(D)}this.each(function(F,E){if(D.match(F)){A.push(C(F,E))}});return A},include:function(A){if(Object.isFunction(this.indexOf)){if(this.indexOf(A)!=-1){return true}}var B=false;this.each(function(C){if(C==A){B=true;throw $break}});return B},inGroupsOf:function(B,A){A=A===undefined?null:A;return this.eachSlice(B,function(C){while(C.length<B){C.push(A)}return C})},inject:function(A,C,B){C=C.bind(B);this.each(function(E,D){A=C(A,E,D)});return A},invoke:function(B){var A=$A(arguments).slice(1);return this.map(function(C){return C[B].apply(C,A)})},max:function(C,B){C=C?C.bind(B):Prototype.K;var A;this.each(function(E,D){E=C(E,D);if(A==undefined||E>=A){A=E}});return A},min:function(C,B){C=C?C.bind(B):Prototype.K;var A;this.each(function(E,D){E=C(E,D);if(A==undefined||E<A){A=E}});return A},partition:function(D,B){D=D?D.bind(B):Prototype.K;var C=[],A=[];this.each(function(F,E){(D(F,E)?C:A).push(F)});return[C,A]},pluck:function(B){var A=[];this.each(function(C){A.push(C[B])});return A},reject:function(C,B){C=C.bind(B);var A=[];this.each(function(E,D){if(!C(E,D)){A.push(E)}});return A},sortBy:function(B,A){B=B.bind(A);return this.map(function(D,C){return{value:D,criteria:B(D,C)}}).sort(function(F,E){var D=F.criteria,C=E.criteria;return D<C?-1:D>C?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var B=Prototype.K,A=$A(arguments);if(Object.isFunction(A.last())){B=A.pop()}var C=[this].concat(A).map($A);return this.map(function(E,D){return B(C.pluck(D))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any});function $A(C){if(!C){return[]}if(C.toArray){return C.toArray()}var B=C.length,A=new Array(B);while(B--){A[B]=C[B]}return A}if(Prototype.Browser.WebKit){function $A(C){if(!C){return[]}if(!(Object.isFunction(C)&&C=="[object NodeList]")&&C.toArray){return C.toArray()}var B=C.length,A=new Array(B);while(B--){A[B]=C[B]}return A}}Array.from=$A;Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(B){for(var A=0,C=this.length;A<C;A++){B(this[A])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(A){return A!=null})},flatten:function(){return this.inject([],function(B,A){return B.concat(Object.isArray(A)?A.flatten():[A])})},without:function(){var A=$A(arguments);return this.select(function(B){return !A.include(B)})},reverse:function(A){return(A!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(A){return this.inject([],function(D,C,B){if(0==B||(A?D.last()!=C:!D.include(C))){D.push(C)}return D})},intersect:function(A){return this.uniq().findAll(function(B){return A.detect(function(C){return B===C})})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"},toJSON:function(){var A=[];this.each(function(B){var C=Object.toJSON(B);if(C!==undefined){A.push(C)}});return"["+A.join(", ")+"]"}});if(Object.isFunction(Array.prototype.forEach)){Array.prototype._each=Array.prototype.forEach}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(C,A){A||(A=0);var B=this.length;if(A<0){A=B+A}for(;A<B;A++){if(this[A]===C){return A}}return -1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(B,A){A=isNaN(A)?this.length:(A<0?this.length+A:A)+1;var C=this.slice(0,A).reverse().indexOf(B);return(C<0)?C:A-C-1}}Array.prototype.toArray=Array.prototype.clone;function $w(A){if(!Object.isString(A)){return[]}A=A.strip();return A?A.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var E=[];for(var B=0,C=this.length;B<C;B++){E.push(this[B])}for(var B=0,C=arguments.length;B<C;B++){if(Object.isArray(arguments[B])){for(var A=0,D=arguments[B].length;A<D;A++){E.push(arguments[B][A])}}else{E.push(arguments[B])}}return E}}Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(A){$R(0,this,true).each(A);return this},toPaddedString:function(C,B){var A=this.toString(B||10);return"0".times(C-A.length)+A},toJSON:function(){return isFinite(this)?this.toString():"null"}});$w("abs round ceil floor").each(function(A){Number.prototype[A]=Math[A].methodize()});function $H(A){return new Hash(A)}var Hash=Class.create(Enumerable,(function(){if(function(){var C=0,E=function(F){this.key=F};E.prototype.key="foo";for(var D in new E("bar")){C++}return C>1}()){function B(E){var C=[];for(var D in this._object){var F=this._object[D];if(C.include(D)){continue}C.push(D);var G=[D,F];G.key=D;G.value=F;E(G)}}}else{function B(D){for(var C in this._object){var E=this._object[C],F=[C,E];F.key=C;F.value=E;D(F)}}}function A(C,D){if(Object.isUndefined(D)){return C}return C+"="+encodeURIComponent(String.interpret(D))}return{initialize:function(C){this._object=Object.isHash(C)?C.toObject():Object.clone(C)},_each:B,set:function(C,D){return this._object[C]=D},get:function(C){return this._object[C]},unset:function(C){var D=this._object[C];delete this._object[C];return D},toObject:function(){return Object.clone(this._object)},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},index:function(D){var C=this.detect(function(E){return E.value===D});return C&&C.key},merge:function(C){return this.clone().update(C)},update:function(C){return new Hash(C).inject(this,function(D,E){D.set(E.key,E.value);return D})},toQueryString:function(){return this.map(function(E){var D=encodeURIComponent(E.key),C=E.value;if(C&&typeof C=="object"){if(Object.isArray(C)){return C.map(A.curry(D)).join("&")}}return A(D,C)}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(C){return C.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Object.toJSON(this.toObject())},clone:function(){return new Hash(this)}}})());Hash.prototype.toTemplateReplacements=Hash.prototype.toObject;Hash.from=$H;var ObjectRange=Class.create(Enumerable,{initialize:function(C,A,B){this.start=C;this.end=A;this.exclusive=B},_each:function(A){var B=this.start;while(this.include(B)){A(B);B=B.succ()}},include:function(A){if(A<this.start){return false}if(this.exclusive){return A<this.end}return A<=this.end}});var $R=function(C,A,B){return new ObjectRange(C,A,B)};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(A){this.responders._each(A)},register:function(A){if(!this.include(A)){this.responders.push(A)}},unregister:function(A){this.responders=this.responders.without(A)},dispatch:function(D,B,C,A){this.each(function(E){if(Object.isFunction(E[D])){try{E[D].apply(E,[B,C,A])}catch(F){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(A){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:true,evalJS:true};Object.extend(this.options,A||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters)){this.options.parameters=this.options.parameters.toQueryParams()}}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,B,A){$super(A);this.transport=Ajax.getTransport();this.request(B)},request:function(B){this.url=B;this.method=this.options.method;var D=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){D["_method"]=this.method;this.method="post"}this.parameters=D;if(D=Object.toQueryString(D)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+D}else{if(/Konqueror|Safari|KHTML/.test($$n.userAgent)){D+="&_="}}}try{var A=new Ajax.Response(this);if(this.options.onCreate){this.options.onCreate(A)}Ajax.Responders.dispatch("onCreate",this,A);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){this.respondToReadyState.bind(this).defer(1)}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?(this.options.postBody||D):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(C){this.dispatchException(C)}},onStateChange:function(){var A=this.transport.readyState;if(A>1&&!((A==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var E={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,"Accept":"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){E["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&($$n.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){E["Connection"]="close"}}if(typeof this.options.requestHeaders=="object"){var C=this.options.requestHeaders;if(Object.isFunction(C.push)){for(var B=0,D=C.length;B<D;B+=2){E[C[B]]=C[B+1]}}else{$H(C).each(function(F){E[F.key]=F.value})}}for(var A in E){this.transport.setRequestHeader(A,E[A])}},success:function(){var A=this.getStatus();return !A||(A>=200&&A<300)},getStatus:function(){try{return this.transport.status||0}catch(A){return 0}},respondToReadyState:function(A){var C=Ajax.Request.Events[A],B=new Ajax.Response(this);if(C=="Complete"){try{this._complete=true;(this.options["on"+B.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(B,B.headerJSON)}catch(D){this.dispatchException(D)}var E=B.getHeader("Content-type");if(this.options.evalJS=="force"||(this.options.evalJS&&E&&E.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))){this.evalResponse()}}try{(this.options["on"+C]||Prototype.emptyFunction)(B,B.headerJSON);Ajax.Responders.dispatch("on"+C,this,B,B.headerJSON)}catch(D){this.dispatchException(D)}if(C=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},getHeader:function(A){try{return this.transport.getResponseHeader(A)}catch(B){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(A){(this.options.onException||Prototype.emptyFunction)(this,A);Ajax.Responders.dispatch("onException",this,A)}});Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Response=Class.create({initialize:function(C){this.request=C;var D=this.transport=C.transport,A=this.readyState=D.readyState;if((A>2&&!Prototype.Browser.IE)||A==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(D.responseText);this.headerJSON=this._getHeaderJSON()}if(A==4){var B=D.responseXML;this.responseXML=B===undefined?null:B;this.responseJSON=this._getResponseJSON()}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||""}catch(A){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(A){return null}},getResponseHeader:function(A){return this.transport.getResponseHeader(A)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var A=this.getHeader("X-JSON");if(!A){return null}A=decodeURIComponent(escape(A));try{return A.evalJSON(this.request.options.sanitizeJSON)}catch(B){this.request.dispatchException(B)}},_getResponseJSON:function(){var A=this.request.options;if(!A.evalJSON||(A.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json"))){return null}try{return this.transport.responseText.evalJSON(A.sanitizeJSON)}catch(B){this.request.dispatchException(B)}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,A,C,B){this.container={success:(A.success||A),failure:(A.failure||(A.success?null:A))};B=B||{};var D=B.onComplete;B.onComplete=(function(E,F){this.updateContent(E.responseText);if(Object.isFunction(D)){D(E,F)}}).bind(this);$super(C,B)},updateContent:function(D){var C=this.container[this.success()?"success":"failure"],A=this.options;if(!A.evalScripts){D=D.stripScripts()}if(C=$(C)){if(A.insertion){if(Object.isString(A.insertion)){var B={};B[A.insertion]=D;C.insert(B)}else{A.insertion(C,D)}}else{C.update(D)}}if(this.success()){if(this.onComplete){this.onComplete.bind(this).defer()}}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,A,C,B){$super(B);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=A;this.url=C;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(A){if(this.options.decay){this.decay=(A.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=A.responseText}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});function $(B){if(arguments.length>1){for(var A=0,D=[],C=arguments.length;A<C;A++){D.push($(arguments[A]))}return D}if(Object.isString(B)){B=$$d.getElementById(B)}return Element.extend(B)}if(Prototype.BrowserFeatures.XPath){$$d._getElementsByXPath=function(F,A){var C=[];var E=$$d.evaluate(F,$(A)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var B=0,D=E.snapshotLength;B<D;B++){C.push(Element.extend(E.snapshotItem(B)))}return C}}if(!$$w.Node){var Node={}}if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12})}(function(){var A=this.Element;this.Element=function(D,C){C=C||{};D=D.toLowerCase();var B=Element.cache;if(Prototype.Browser.IE&&C.name){D="<"+D+' name="'+C.name+'">';delete C.name;return Element.writeAttribute($$d.createElement(D),C)}if(!B[D]){B[D]=Element.extend($$d.createElement(D))}return Element.writeAttribute(B[D].cloneNode(false),C)};Object.extend(this.Element,A||{})}).call(window);Element.cache={};Element.Methods={visible:function(A){return $(A).style.display!="none"},toggle:function(A){A=$(A);Element[Element.visible(A)?"hide":"show"](A);return A},hide:function(A){$(A).style.display="none";return A},show:function(A){$(A).style.display="";return A},remove:function(A){A=$(A);A.parentNode.removeChild(A);return A},update:function(A,B){A=$(A);if(B&&B.toElement){B=B.toElement()}if(Object.isElement(B)){return A.update().insert(B)}B=Object.toHTML(B);A.innerHTML=B.stripScripts();B.evalScripts.bind(B).defer();return A},replace:function(B,C){B=$(B);if(C&&C.toElement){C=C.toElement()}else{if(!Object.isElement(C)){C=Object.toHTML(C);var A=B.ownerDocument.createRange();A.selectNode(B);C.evalScripts.bind(C).defer();C=A.createContextualFragment(C.stripScripts())}}B.parentNode.replaceChild(C,B);return B},insert:function(C,E){C=$(C);if(Object.isString(E)||Object.isNumber(E)||Object.isElement(E)||(E&&(E.toElement||E.toHTML))){E={bottom:E}}var D,B,A;for(position in E){D=E[position];position=position.toLowerCase();B=Element._insertionTranslations[position];if(D&&D.toElement){D=D.toElement()}if(Object.isElement(D)){B.insert(C,D);continue}D=Object.toHTML(D);A=C.ownerDocument.createRange();B.initializeRange(C,A);B.insert(C,A.createContextualFragment(D.stripScripts()));D.evalScripts.bind(D).defer()}return C},wrap:function(B,C,A){B=$(B);if(Object.isElement(C)){$(C).writeAttribute(A||{})}else{if(Object.isString(C)){C=new Element(C,A)}else{C=new Element("div",C)}}if(B.parentNode){B.parentNode.replaceChild(C,B)}C.appendChild(B);return C},inspect:function(B){B=$(B);var A="<"+B.tagName.toLowerCase();$H({"id":"id","className":"class"}).each(function(F){var E=F.first(),C=F.last();var D=(B[E]||"").toString();if(D){A+=" "+C+"="+D.inspect(true)}});return A+">"},recursivelyCollect:function(A,C){A=$(A);var B=[];while(A=A[C]){if(A.nodeType==1){B.push(Element.extend(A))}}return B},ancestors:function(A){return $(A).recursivelyCollect("parentNode")},descendants:function(A){return $A($(A).getElementsByTagName("*")).each(Element.extend)},firstDescendant:function(A){A=$(A).firstChild;while(A&&A.nodeType!=1){A=A.nextSibling}return $(A)},immediateDescendants:function(A){if(!(A=$(A).firstChild)){return[]}while(A&&A.nodeType!=1){A=A.nextSibling}if(A){return[A].concat($(A).nextSiblings())}return[]},previousSiblings:function(A){return $(A).recursivelyCollect("previousSibling")},nextSiblings:function(A){return $(A).recursivelyCollect("nextSibling")},siblings:function(A){A=$(A);return A.previousSiblings().reverse().concat(A.nextSiblings())},match:function(B,A){if(Object.isString(A)){A=new Selector(A)}return A.match($(B))},up:function(B,D,A){B=$(B);if(arguments.length==1){return $(B.parentNode)}var C=B.ancestors();return D?Selector.findElement(C,D,A):C[A||0]},down:function(B,C,A){B=$(B);if(arguments.length==1){return B.firstDescendant()}var D=B.descendants();return C?Selector.findElement(D,C,A):D[A||0]},previous:function(B,D,A){B=$(B);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(B))}var C=B.previousSiblings();return D?Selector.findElement(C,D,A):C[A||0]},next:function(C,D,B){C=$(C);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(C))}var A=C.nextSiblings();return D?Selector.findElement(A,D,B):A[B||0]},select:function(){var A=$A(arguments),B=$(A.shift());return Selector.findChildElements(B,A)},adjacent:function(){var A=$A(arguments),B=$(A.shift());return Selector.findChildElements(B.parentNode,A).without(B)},identify:function(B){B=$(B);var C=B.readAttribute("id"),A=arguments.callee;if(C){return C}do{C="anonymous_element_"+A.counter++}while($(C));B.writeAttribute("id",C);return C},readAttribute:function(C,A){C=$(C);if(Prototype.Browser.IE){var B=Element._attributeTranslations.read;if(B.values[A]){return B.values[A](C,A)}if(B.names[A]){A=B.names[A]}if(A.include(":")){return(!C.attributes||!C.attributes[A])?null:C.attributes[A].value}}return C.getAttribute(A)},writeAttribute:function(E,C,F){E=$(E);var B={},D=Element._attributeTranslations.write;if(typeof C=="object"){B=C}else{B[C]=F===undefined?true:F}for(var A in B){var C=D.names[A]||A,F=B[A];if(D.values[A]){C=D.values[A](E,F)}if(F===false||F===null){E.removeAttribute(C)}else{if(F===true){E.setAttribute(C,C)}else{E.setAttribute(C,F)}}}return E},getHeight:function(A){return $(A).getDimensions().height},getWidth:function(A){return $(A).getDimensions().width},classNames:function(A){return new Element.ClassNames(A)},hasClassName:function(A,B){if(!(A=$(A))){return }var C=A.className;return(C.length>0&&(C==B||new RegExp("(^|\\s)"+B+"(\\s|$)").test(C)))},addClassName:function(A,B){if(!(A=$(A))){return }if(!A.hasClassName(B)){A.className+=(A.className?" ":"")+B}return A},removeClassName:function(A,B){if(!(A=$(A))){return }A.className=A.className.replace(new RegExp("(^|\\s+)"+B+"(\\s+|$)")," ").strip();return A},toggleClassName:function(A,B){if(!(A=$(A))){return }return A[A.hasClassName(B)?"removeClassName":"addClassName"](B)},cleanWhitespace:function(B){B=$(B);var C=B.firstChild;while(C){var A=C.nextSibling;if(C.nodeType==3&&!/\S/.test(C.nodeValue)){B.removeChild(C)}C=A}return B},empty:function(A){return $(A).innerHTML.blank()},descendantOf:function(D,C){D=$(D),C=$(C);if(D.compareDocumentPosition){return(D.compareDocumentPosition(C)&8)===8}if(D.sourceIndex&&!Prototype.Browser.Opera){var E=D.sourceIndex,B=C.sourceIndex,A=C.nextSibling;if(!A){do{C=C.parentNode}while(!(A=C.nextSibling)&&C.parentNode)}if(A){return(E>B&&E<A.sourceIndex)}}while(D=D.parentNode){if(D==C){return true}}return false},scrollTo:function(A){A=$(A);var B=A.cumulativeOffset();$$w.scrollTo(B[0],B[1]);return A},getStyle:function(B,C){B=$(B);C=C=="float"?"cssFloat":C.camelize();var D=B.style[C];if(!D){var A=$$d.defaultView.getComputedStyle(B,null);D=A?A[C]:null}if(C=="opacity"){return D?parseFloat(D):1}return D=="auto"?null:D},getOpacity:function(A){return $(A).getStyle("opacity")},setStyle:function(B,C){B=$(B);var E=B.style,A;if(Object.isString(C)){B.style.cssText+=";"+C;return C.include("opacity")?B.setOpacity(C.match(/opacity:\s*(\d?\.?\d*)/)[1]):B}for(var D in C){if(D=="opacity"){B.setOpacity(C[D])}else{E[(D=="float"||D=="cssFloat")?(E.styleFloat===undefined?"cssFloat":"styleFloat"):D]=C[D]}}return B},setOpacity:function(A,B){A=$(A);A.style.opacity=(B==1||B==="")?"":(B<0.00001)?0:B;return A},getDimensions:function(C){C=$(C);var G=$(C).getStyle("display");if(G!="none"&&G!=null){return{width:C.offsetWidth,height:C.offsetHeight}}var B=C.style;var F=B.visibility;var D=B.position;var A=B.display;B.visibility="hidden";B.position="absolute";B.display="block";var H=C.clientWidth;var E=C.clientHeight;B.display=A;B.position=D;B.visibility=F;return{width:H,height:E}},makePositioned:function(A){A=$(A);var B=Element.getStyle(A,"position");if(B=="static"||!B){A._madePositioned=true;A.style.position="relative";if($$w.opera){A.style.top=0;A.style.left=0}}return A},undoPositioned:function(A){A=$(A);if(A._madePositioned){A._madePositioned=undefined;A.style.position=A.style.top=A.style.left=A.style.bottom=A.style.right=""}return A},makeClipping:function(A){A=$(A);if(A._overflow){return A}A._overflow=Element.getStyle(A,"overflow")||"auto";if(A._overflow!=="hidden"){A.style.overflow="hidden"}return A},undoClipping:function(A){A=$(A);if(!A._overflow){return A}A.style.overflow=A._overflow=="auto"?"":A._overflow;A._overflow=null;return A},cumulativeOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent}while(B);return Element._returnOffset(C,A)},positionedOffset:function(B){var A=0,D=0;do{A+=B.offsetTop||0;D+=B.offsetLeft||0;B=B.offsetParent;if(B){if(B.tagName=="BODY"){break}var C=Element.getStyle(B,"position");if(C=="relative"||C=="absolute"){break}}}while(B);return Element._returnOffset(D,A)},absolutize:function(B){B=$(B);if(B.getStyle("position")=="absolute"){return }var D=B.positionedOffset();var F=D[1];var E=D[0];var C=B.clientWidth;var A=B.clientHeight;B._originalLeft=E-parseFloat(B.style.left||0);B._originalTop=F-parseFloat(B.style.top||0);B._originalWidth=B.style.width;B._originalHeight=B.style.height;B.style.position="absolute";B.style.top=F+"px";B.style.left=E+"px";B.style.width=C+"px";B.style.height=A+"px";return B},relativize:function(A){A=$(A);if(A.getStyle("position")=="relative"){return }A.style.position="relative";var C=parseFloat(A.style.top||0)-(A._originalTop||0);var B=parseFloat(A.style.left||0)-(A._originalLeft||0);A.style.top=C+"px";A.style.left=B+"px";A.style.height=A._originalHeight;A.style.width=A._originalWidth;return A},cumulativeScrollOffset:function(B){var A=0,C=0;do{A+=B.scrollTop||0;C+=B.scrollLeft||0;B=B.parentNode}while(B);return Element._returnOffset(C,A)},getOffsetParent:function(A){if(A.offsetParent){return $(A.offsetParent)}if(A==$$d.body){return $(A)}while((A=A.parentNode)&&A!=$$d.body){if(Element.getStyle(A,"position")!="static"){return $(A)}}return $($$d.body)},viewportOffset:function(D){var A=0,C=0;var B=D;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==$$d.body&&Element.getStyle(B,"position")=="absolute"){break}}while(B=B.offsetParent);B=D;do{if(!Prototype.Browser.Opera||B.tagName=="BODY"){A-=B.scrollTop||0;C-=B.scrollLeft||0}}while(B=B.parentNode);return Element._returnOffset(C,A)},clonePosition:function(B,D){var A=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});D=$(D);var E=D.viewportOffset();B=$(B);var F=[0,0];var C=null;if(Element.getStyle(B,"position")=="absolute"){C=B.getOffsetParent();F=C.viewportOffset()}if(C==$$d.body){F[0]-=$$d.body.offsetLeft;F[1]-=$$d.body.offsetTop}if(A.setLeft){B.style.left=(E[0]-F[0]+A.offsetLeft)+"px"}if(A.setTop){B.style.top=(E[1]-F[1]+A.offsetTop)+"px"}if(A.setWidth){B.style.width=D.offsetWidth+"px"}if(A.setHeight){B.style.height=D.offsetHeight+"px"}return B}};Element.Methods.identify.counter=1;Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}};if(!$$d.createRange||Prototype.Browser.Opera){Element.Methods.insert=function(E,G){E=$(E);if(Object.isString(G)||Object.isNumber(G)||Object.isElement(G)||(G&&(G.toElement||G.toHTML))){G={bottom:G}}var D=Element._insertionTranslations,F,B,H,C;for(B in G){F=G[B];B=B.toLowerCase();H=D[B];if(F&&F.toElement){F=F.toElement()}if(Object.isElement(F)){H.insert(E,F);continue}F=Object.toHTML(F);C=((B=="before"||B=="after")?E.parentNode:E).tagName.toUpperCase();if(D.tags[C]){var A=Element._getContentFromAnonymousElement(C,F.stripScripts());if(B=="top"||B=="after"){A.reverse()}A.each(H.insert.curry(E))}else{E.insertAdjacentHTML(H.adjacency,F.stripScripts())}F.evalScripts.bind(F).defer()}return E}}if(Prototype.Browser.Opera){Element.Methods._getStyle=Element.Methods.getStyle;Element.Methods.getStyle=function(A,B){switch(B){case"left":case"top":case"right":case"bottom":if(Element._getStyle(A,"position")=="static"){return null}default:return Element._getStyle(A,B)}};Element.Methods._readAttribute=Element.Methods.readAttribute;Element.Methods.readAttribute=function(A,B){if(B=="title"){return A.title}return Element._readAttribute(A,B)}}else{if(Prototype.Browser.IE){$w("positionedOffset getOffsetParent viewportOffset").each(function(A){Element.Methods[A]=Element.Methods[A].wrap(function(D,C){C=$(C);var B=C.getStyle("position");if(B!="static"){return D(C)}C.setStyle({position:"relative"});var E=D(C);C.setStyle({position:B});return E})});Element.Methods.getStyle=function(A,B){A=$(A);B=(B=="float"||B=="cssFloat")?"styleFloat":B.camelize();var C=A.style[B];if(!C&&A.currentStyle){C=A.currentStyle[B]}if(B=="opacity"){if(C=(A.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(C[1]){return parseFloat(C[1])/100}}return 1}if(C=="auto"){if((B=="width"||B=="height")&&(A.getStyle("display")!="none")){return A["offset"+B.capitalize()]+"px"}return null}return C};Element.Methods.setOpacity=function(B,E){function F(G){return G.replace(/alpha\([^\)]*\)/gi,"")}B=$(B);var A=B.currentStyle;if((A&&!A.hasLayout)||(!A&&B.style.zoom=="normal")){B.style.zoom=1}var D=B.getStyle("filter"),C=B.style;if(E==1||E===""){(D=F(D))?C.filter=D:C.removeAttribute("filter");return B}else{if(E<0.00001){E=0}}C.filter=F(D)+"alpha(opacity="+(E*100)+")";return B};Element._attributeTranslations={read:{names:{"class":"className","for":"htmlFor"},values:{_getAttr:function(A,B){return A.getAttribute(B,2)},_getAttrNode:function(A,C){var B=A.getAttributeNode(C);return B?B.value:""},_getEv:function(A,B){var B=A.getAttribute(B);return B?B.toString().slice(23,-2):null},_flag:function(A,B){return $(A).hasAttribute(B)?B:null},style:function(A){return A.style.cssText.toLowerCase()},title:function(A){return A.title}}}};Element._attributeTranslations.write={names:Object.clone(Element._attributeTranslations.read.names),values:{checked:function(A,B){A.checked=!!B},style:function(A,B){A.style.cssText=B?B:""}}};Element._attributeTranslations.has={};$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc").each(function(A){Element._attributeTranslations.write.names[A.toLowerCase()]=A;Element._attributeTranslations.has[A.toLowerCase()]=A});(function(A){Object.extend(A,{href:A._getAttr,src:A._getAttr,type:A._getAttr,action:A._getAttrNode,disabled:A._flag,checked:A._flag,readonly:A._flag,multiple:A._flag,onload:A._getEv,onunload:A._getEv,onclick:A._getEv,ondblclick:A._getEv,onmousedown:A._getEv,onmouseup:A._getEv,onmouseover:A._getEv,onmousemove:A._getEv,onmouseout:A._getEv,onfocus:A._getEv,onblur:A._getEv,onkeypress:A._getEv,onkeydown:A._getEv,onkeyup:A._getEv,onsubmit:A._getEv,onreset:A._getEv,onselect:A._getEv,onchange:A._getEv})})(Element._attributeTranslations.read.values)}else{if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test($$n.userAgent)){Element.Methods.setOpacity=function(A,B){A=$(A);A.style.opacity=(B==1)?0.999999:(B==="")?"":(B<0.00001)?0:B;return A}}else{if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(A,B){A=$(A);A.style.opacity=(B==1||B==="")?"":(B<0.00001)?0:B;if(B==1){if(A.tagName=="IMG"&&A.width){A.width++;A.width--}else{try{var D=$$d.createTextNode(" ");A.appendChild(D);A.removeChild(D)}catch(C){}}}return A};Element.Methods.cumulativeOffset=function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==$$d.body){if(Element.getStyle(B,"position")=="absolute"){break}}B=B.offsetParent}while(B);return Element._returnOffset(C,A)}}}}}if(Prototype.Browser.IE||Prototype.Browser.Opera){Element.Methods.update=function(B,C){B=$(B);if(C&&C.toElement){C=C.toElement()}if(Object.isElement(C)){return B.update().insert(C)}C=Object.toHTML(C);var A=B.tagName.toUpperCase();if(A in Element._insertionTranslations.tags){$A(B.childNodes).each(function(D){B.removeChild(D)});Element._getContentFromAnonymousElement(A,C.stripScripts()).each(function(D){B.appendChild(D)})}else{B.innerHTML=C.stripScripts()}C.evalScripts.bind(C).defer();return B}}if($$d.createElement("div").outerHTML){Element.Methods.replace=function(C,E){C=$(C);if(E&&E.toElement){E=E.toElement()}if(Object.isElement(E)){C.parentNode.replaceChild(E,C);return C}E=Object.toHTML(E);var D=C.parentNode,B=D.tagName.toUpperCase();if(Element._insertionTranslations.tags[B]){var F=C.next();var A=Element._getContentFromAnonymousElement(B,E.stripScripts());D.removeChild(C);if(F){A.each(function(G){D.insertBefore(G,F)})}else{A.each(function(G){D.appendChild(G)})}}else{C.outerHTML=E.stripScripts()}E.evalScripts.bind(E).defer();return C}}Element._returnOffset=function(B,C){var A=[B,C];A.left=B;A.top=C;return A};Element._getContentFromAnonymousElement=function(C,B){var D=new Element("div"),A=Element._insertionTranslations.tags[C];D.innerHTML=A[0]+B+A[1];A[2].times(function(){D=D.firstChild});return $A(D.childNodes)};Element._insertionTranslations={before:{adjacency:"beforeBegin",insert:function(A,B){A.parentNode.insertBefore(B,A)},initializeRange:function(B,A){A.setStartBefore(B)}},top:{adjacency:"afterBegin",insert:function(A,B){A.insertBefore(B,A.firstChild)},initializeRange:function(B,A){A.selectNodeContents(B);A.collapse(true)}},bottom:{adjacency:"beforeEnd",insert:function(A,B){A.appendChild(B)}},after:{adjacency:"afterEnd",insert:function(A,B){A.parentNode.insertBefore(B,A.nextSibling)},initializeRange:function(B,A){A.setStartAfter(B)}},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}};(function(){this.bottom.initializeRange=this.top.initializeRange;Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD})}).call(Element._insertionTranslations);Element.Methods.Simulated={hasAttribute:function(A,C){C=Element._attributeTranslations.has[C]||C;var B=$(A).getAttributeNode(C);return B&&B.specified}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&$$d.createElement("div").__proto__){$$w.HTMLElement={};$$w.HTMLElement.prototype=$$d.createElement("div").__proto__;Prototype.BrowserFeatures.ElementExtensions=true}Element.extend=(function(){if(Prototype.BrowserFeatures.SpecificElementExtensions){return Prototype.K}var A={},B=Element.Methods.ByTag;var C=Object.extend(function(F){if(!F||F._extendedByPrototype||F.nodeType!=1||F==window){return F}var D=Object.clone(A),E=F.tagName,H,G;if(B[E]){Object.extend(D,B[E])}for(H in D){G=D[H];if(Object.isFunction(G)&&!(H in F)){F[H]=G.methodize()}}F._extendedByPrototype=Prototype.emptyFunction;return F},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(A,Element.Methods);Object.extend(A,Element.Methods.Simulated)}}});C.refresh();return C})();Element.hasAttribute=function(A,B){if(A.hasAttribute){return A.hasAttribute(B)}return Element.Methods.Simulated.hasAttribute(A,B)};Element.addMethods=function(C){var I=Prototype.BrowserFeatures,D=Element.Methods.ByTag;if(!C){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{"FORM":Object.clone(Form.Methods),"INPUT":Object.clone(Form.Element.Methods),"SELECT":Object.clone(Form.Element.Methods),"TEXTAREA":Object.clone(Form.Element.Methods)})}if(arguments.length==2){var B=C;C=arguments[1]}if(!B){Object.extend(Element.Methods,C||{})}else{if(Object.isArray(B)){B.each(H)}else{H(B)}}function H(F){F=F.toUpperCase();if(!Element.Methods.ByTag[F]){Element.Methods.ByTag[F]={}}Object.extend(Element.Methods.ByTag[F],C)}function A(L,K,F){F=F||false;for(var N in L){var M=L[N];if(!Object.isFunction(M)){continue}if(!F||!(N in K)){K[N]=M.methodize()}}}function E(L){var F;var K={"OPTGROUP":"OptGroup","TEXTAREA":"TextArea","P":"Paragraph","FIELDSET":"FieldSet","UL":"UList","OL":"OList","DL":"DList","DIR":"Directory","H1":"Heading","H2":"Heading","H3":"Heading","H4":"Heading","H5":"Heading","H6":"Heading","Q":"Quote","INS":"Mod","DEL":"Mod","A":"Anchor","IMG":"Image","CAPTION":"TableCaption","COL":"TableCol","COLGROUP":"TableCol","THEAD":"TableSection","TFOOT":"TableSection","TBODY":"TableSection","TR":"TableRow","TH":"TableCell","TD":"TableCell","FRAMESET":"FrameSet","IFRAME":"IFrame"};if(K[L]){F="HTML"+K[L]+"Element"}if(window[F]){return window[F]}F="HTML"+L+"Element";if(window[F]){return window[F]}F="HTML"+L.capitalize()+"Element";if(window[F]){return window[F]}window[F]={};window[F].prototype=$$d.createElement(L).__proto__;return window[F]}if(I.ElementExtensions){A(Element.Methods,HTMLElement.prototype);A(Element.Methods.Simulated,HTMLElement.prototype,true)}if(I.SpecificElementExtensions){for(var J in Element.Methods.ByTag){var G=E(J);if(Object.isUndefined(G)){continue}A(D[J],G.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh){Element.extend.refresh()}Element.cache={}};$$d.viewport={getDimensions:function(){var A={};$w("width height").each(function(C){var B=C.capitalize();A[C]=self["inner"+B]||($$d.documentElement["client"+B]||$$d.body["client"+B])});return A},getWidth:function(){return this.getDimensions().width},getHeight:function(){return this.getDimensions().height},getScrollOffsets:function(){return Element._returnOffset($$w.pageXOffset||$$d.documentElement.scrollLeft||$$d.body.scrollLeft,$$w.pageYOffset||$$d.documentElement.scrollTop||$$d.body.scrollTop)}};var Selector=Class.create({initialize:function(A){this.expression=A.strip();this.compileMatcher()},compileMatcher:function(){if(Prototype.BrowserFeatures.XPath&&!(/(\[[\w-]*?:|:checked)/).test(this.expression)){return this.compileXPathMatcher()}var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return }this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(Object.isFunction(c[i])?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var E=this.expression,F=Selector.patterns,B=Selector.xpath,D,A;if(Selector._cache[E]){this.xpath=Selector._cache[E];return }this.matcher=[".//*"];while(E&&D!=E&&(/\S/).test(E)){D=E;for(var C in F){if(A=E.match(F[C])){this.matcher.push(Object.isFunction(B[C])?B[C](A):new Template(B[C]).evaluate(A));E=E.replace(A[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath},findElements:function(A){A=A||document;if(this.xpath){return $$d._getElementsByXPath(this.xpath,A)}return this.matcher(A)},match:function(H){this.tokens=[];var L=this.expression,A=Selector.patterns,E=Selector.assertions;var B,D,F;while(L&&B!==L&&(/\S/).test(L)){B=L;for(var I in A){D=A[I];if(F=L.match(D)){if(E[I]){this.tokens.push([I,Object.clone(F)]);L=L.replace(F[0],"")}else{return this.findElements(document).include(H)}}}}var K=true,C,J;for(var I=0,G;G=this.tokens[I];I++){C=G[0],J=G[1];if(!Selector.assertions[C](H,J)){K=false;break}}return K},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}});Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(A){if(A[1]=="*"){return""}return"[local-name()='"+A[1].toLowerCase()+"' or local-name()='"+A[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:"[@#{1}]",attr:function(A){A[3]=A[5]||A[6];return new Template(Selector.xpath.operators[A[2]]).evaluate(A)},pseudo:function(A){var B=Selector.xpath.pseudos[A[1]];if(!B){return""}if(Object.isFunction(B)){return B(A)}return new Template(Selector.xpath.pseudos[A[1]]).evaluate(A)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]","empty":"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]","checked":"[@checked]","disabled":"[@disabled]","enabled":"[not(@disabled)]","not":function(B){var H=B[6],G=Selector.patterns,A=Selector.xpath,E,B,C;var F=[];while(H&&E!=H&&(/\S/).test(H)){E=H;for(var D in G){if(B=H.match(G[D])){C=Object.isFunction(A[D])?A[D](B):new Template(A[D]).evaluate(B);F.push("("+C.substring(1,C.length-1)+")");H=H.replace(B[0],"");break}}}return"[not("+F.join(" and ")+")]"},"nth-child":function(A){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",A)},"nth-last-child":function(A){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",A)},"nth-of-type":function(A){return Selector.xpath.pseudos.nth("position() ",A)},"nth-last-of-type":function(A){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",A)},"first-of-type":function(A){A[6]="1";return Selector.xpath.pseudos["nth-of-type"](A)},"last-of-type":function(A){A[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](A)},"only-of-type":function(A){var B=Selector.xpath.pseudos;return B["first-of-type"](A)+B["last-of-type"](A)},nth:function(E,C){var F,G=C[6],B;if(G=="even"){G="2n+0"}if(G=="odd"){G="2n+1"}if(F=G.match(/^(\d+)$/)){return"["+E+"= "+F[1]+"]"}if(F=G.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(F[1]=="-"){F[1]=-1}var D=F[1]?Number(F[1]):1;var A=F[2]?Number(F[2]):0;B="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(B).evaluate({fragment:E,a:D,b:A})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c); c = false;',className:'n = h.className(n, r, "#{1}", c); c = false;',id:'n = h.id(n, r, "#{1}", c); c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}"); c = false;',attr:function(A){A[3]=(A[5]||A[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(A)},pseudo:function(A){if(A[6]){A[6]=A[6].replace(/"/g,'\\"')}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(A)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s)|(?=:))/,attrPresence:/^\[([\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/},assertions:{tagName:function(A,B){return B[1].toUpperCase()==A.tagName.toUpperCase()},className:function(A,B){return Element.hasClassName(A,B[1])},id:function(A,B){return A.id===B[1]},attrPresence:function(A,B){return Element.hasAttribute(A,B[1])},attr:function(B,C){var A=Element.readAttribute(B,C[1]);return Selector.operators[C[2]](A,C[3])}},handlers:{concat:function(B,A){for(var C=0,D;D=A[C];C++){B.push(D)}return B},mark:function(A){for(var B=0,C;C=A[B];B++){C._counted=true}return A},unmark:function(A){for(var B=0,C;C=A[B];B++){C._counted=undefined}return A},index:function(A,D,G){A._counted=true;if(D){for(var B=A.childNodes,E=B.length-1,C=1;E>=0;E--){var F=B[E];if(F.nodeType==1&&(!G||F._counted)){F.nodeIndex=C++}}}else{for(var E=0,C=1,B=A.childNodes;F=B[E];E++){if(F.nodeType==1&&(!G||F._counted)){F.nodeIndex=C++}}}},unique:function(B){if(B.length==0){return B}var D=[],E;for(var C=0,A=B.length;C<A;C++){if(!(E=B[C])._counted){E._counted=true;D.push(Element.extend(E))}}return Selector.handlers.unmark(D)},descendant:function(A){var D=Selector.handlers;for(var C=0,B=[],E;E=A[C];C++){D.concat(B,E.getElementsByTagName("*"))}return B},child:function(A){var F=Selector.handlers;for(var E=0,D=[],G;G=A[E];E++){for(var B=0,C=[],H;H=G.childNodes[B];B++){if(H.nodeType==1&&H.tagName!="!"){D.push(H)}}}return D},adjacent:function(A){for(var C=0,B=[],E;E=A[C];C++){var D=this.nextElementSibling(E);if(D){B.push(D)}}return B},laterSibling:function(A){var D=Selector.handlers;for(var C=0,B=[],E;E=A[C];C++){D.concat(B,Element.nextSiblings(E))}return B},nextElementSibling:function(A){while(A=A.nextSibling){if(A.nodeType==1){return A}}return null},previousElementSibling:function(A){while(A=A.previousSibling){if(A.nodeType==1){return A}}return null},tagName:function(B,A,E,H){E=E.toUpperCase();var D=[],F=Selector.handlers;if(B){if(H){if(H=="descendant"){for(var C=0,G;G=B[C];C++){F.concat(D,G.getElementsByTagName(E))}return D}else{B=this[H](B)}if(E=="*"){return B}}for(var C=0,G;G=B[C];C++){if(G.tagName.toUpperCase()==E){D.push(G)}}return D}else{return A.getElementsByTagName(E)}},id:function(B,A,H,F){var G=$(H),D=Selector.handlers;if(!G){return[]}if(!B&&A==document){return[G]}if(B){if(F){if(F=="child"){for(var C=0,E;E=B[C];C++){if(G.parentNode==E){return[G]}}}else{if(F=="descendant"){for(var C=0,E;E=B[C];C++){if(Element.descendantOf(G,E)){return[G]}}}else{if(F=="adjacent"){for(var C=0,E;E=B[C];C++){if(Selector.handlers.previousElementSibling(G)==E){return[G]}}}else{B=D[F](B)}}}}for(var C=0,E;E=B[C];C++){if(E==G){return[G]}}return[]}return(G&&Element.descendantOf(G,A))?[G]:[]},className:function(B,A,C,D){if(B&&D){B=this[D](B)}return Selector.handlers.byClassName(B,A,C)},byClassName:function(C,B,F){if(!C){C=Selector.handlers.descendant([B])}var H=" "+F+" ";for(var E=0,D=[],G,A;G=C[E];E++){A=G.className;if(A.length==0){continue}if(A==F||(" "+A+" ").include(H)){D.push(G)}}return D},attrPresence:function(C,B,A){if(!C){C=B.getElementsByTagName("*")}var E=[];for(var D=0,F;F=C[D];D++){if(Element.hasAttribute(F,A)){E.push(F)}}return E},attr:function(A,H,G,I,B){if(!A){A=H.getElementsByTagName("*")}var J=Selector.operators[B],D=[];for(var E=0,C;C=A[E];E++){var F=Element.readAttribute(C,G);if(F===null){continue}if(J(F,I)){D.push(C)}}return D},pseudo:function(B,C,E,A,D){if(B&&D){B=this[D](B)}if(!B){B=A.getElementsByTagName("*")}return Selector.pseudos[C](B,E,A)}},pseudos:{"first-child":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(Selector.handlers.previousElementSibling(E)){continue}C.push(E)}return C},"last-child":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(Selector.handlers.nextElementSibling(E)){continue}C.push(E)}return C},"only-child":function(B,G,A){var E=Selector.handlers;for(var D=0,C=[],F;F=B[D];D++){if(!E.previousElementSibling(F)&&!E.nextElementSibling(F)){C.push(F)}}return C},"nth-child":function(B,C,A){return Selector.pseudos.nth(B,C,A)},"nth-last-child":function(B,C,A){return Selector.pseudos.nth(B,C,A,true)},"nth-of-type":function(B,C,A){return Selector.pseudos.nth(B,C,A,false,true)},"nth-last-of-type":function(B,C,A){return Selector.pseudos.nth(B,C,A,true,true)},"first-of-type":function(B,C,A){return Selector.pseudos.nth(B,"1",A,false,true)},"last-of-type":function(B,C,A){return Selector.pseudos.nth(B,"1",A,true,true)},"only-of-type":function(B,D,A){var C=Selector.pseudos;return C["last-of-type"](C["first-of-type"](B,D,A),D,A)},getIndices:function(B,A,C){if(B==0){return A>0?[A]:[]}return $R(1,C).inject([],function(D,E){if(0==(E-A)%B&&(E-A)/B>=0){D.push(E)}return D})},nth:function(A,L,N,K,C){if(A.length==0){return[]}if(L=="even"){L="2n+0"}if(L=="odd"){L="2n+1"}var J=Selector.handlers,I=[],B=[],E;J.mark(A);for(var H=0,D;D=A[H];H++){if(!D.parentNode._counted){J.index(D.parentNode,K,C);B.push(D.parentNode)}}if(L.match(/^\d+$/)){L=Number(L);for(var H=0,D;D=A[H];H++){if(D.nodeIndex==L){I.push(D)}}}else{if(E=L.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(E[1]=="-"){E[1]=-1}var O=E[1]?Number(E[1]):1;var M=E[2]?Number(E[2]):0;var P=Selector.pseudos.getIndices(O,M,A.length);for(var H=0,D,F=P.length;D=A[H];H++){for(var G=0;G<F;G++){if(D.nodeIndex==P[G]){I.push(D)}}}}}J.unmark(A);J.unmark(B);return I},"empty":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(E.tagName=="!"||(E.firstChild&&!E.innerHTML.match(/^\s*$/))){continue}C.push(E)}return C},"not":function(A,D,I){var G=Selector.handlers,J,C;var H=new Selector(D).findElements(I);G.mark(H);for(var F=0,E=[],B;B=A[F];F++){if(!B._counted){E.push(B)}}G.unmark(H);return E},"enabled":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(!E.disabled){C.push(E)}}return C},"disabled":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(E.disabled){C.push(E)}}return C},"checked":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(E.checked){C.push(E)}}return C}},operators:{"=":function(B,A){return B==A},"!=":function(B,A){return B!=A},"^=":function(B,A){return B.startsWith(A)},"$=":function(B,A){return B.endsWith(A)},"*=":function(B,A){return B.include(A)},"~=":function(B,A){return(" "+B+" ").include(" "+A+" ")},"|=":function(B,A){return("-"+B.toUpperCase()+"-").include("-"+A.toUpperCase()+"-")}},matchElements:function(F,G){var E=new Selector(G).findElements(),D=Selector.handlers;D.mark(E);for(var C=0,B=[],A;A=F[C];C++){if(A._counted){B.push(A)}}D.unmark(E);return B},findElement:function(B,C,A){if(Object.isNumber(C)){A=C;C=false}return Selector.matchElements(B,C||"*")[A||0]},findChildElements:function(E,G){var H=G.join(","),G=[];H.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(I){G.push(I[1].strip())});var D=[],F=Selector.handlers;for(var C=0,B=G.length,A;C<B;C++){A=new Selector(G[C].strip());F.concat(D,A.findElements(E))}return(B>1)?F.unique(D):D}});function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(A){$(A).reset();return A},serializeElements:function(G,B){if(typeof B!="object"){B={hash:!!B}}else{if(B.hash===undefined){B.hash=true}}var C,F,A=false,E=B.submit;var D=G.inject({},function(H,I){if(!I.disabled&&I.name){C=I.name;F=$(I).getValue();if(F!=null&&(I.type!="submit"||(!A&&E!==false&&(!E||C==E)&&(A=true)))){if(C in H){if(!Object.isArray(H[C])){H[C]=[H[C]]}H[C].push(F)}else{H[C]=F}}}return H});return B.hash?D:Object.toQueryString(D)}};Form.Methods={serialize:function(B,A){return Form.serializeElements(Form.getElements(B),A)},getElements:function(A){return $A($(A).getElementsByTagName("*")).inject([],function(B,C){if(Form.Element.Serializers[C.tagName.toLowerCase()]){B.push(Element.extend(C))}return B})},getInputs:function(G,C,D){G=$(G);var A=G.getElementsByTagName("input");if(!C&&!D){return $A(A).map(Element.extend)}for(var E=0,H=[],F=A.length;E<F;E++){var B=A[E];if((C&&B.type!=C)||(D&&B.name!=D)){continue}H.push(Element.extend(B))}return H},disable:function(A){A=$(A);Form.getElements(A).invoke("disable");return A},enable:function(A){A=$(A);Form.getElements(A).invoke("enable");return A},findFirstElement:function(B){var C=$(B).getElements().findAll(function(D){return"hidden"!=D.type&&!D.disabled});var A=C.findAll(function(D){return D.hasAttribute("tabIndex")&&D.tabIndex>=0}).sortBy(function(D){return D.tabIndex}).first();return A?A:C.find(function(D){return["input","select","textarea"].include(D.tagName.toLowerCase())})},focusFirstElement:function(A){A=$(A);A.findFirstElement().activate();return A},request:function(B,A){B=$(B),A=Object.clone(A||{});var D=A.parameters,C=B.readAttribute("action")||"";if(C.blank()){C=$$w.location.href}A.parameters=B.serialize(true);if(D){if(Object.isString(D)){D=D.toQueryParams()}Object.extend(A.parameters,D)}if(B.hasAttribute("method")&&!A.method){A.method=B.method}return new Ajax.Request(C,A)}};Form.Element={focus:function(A){$(A).focus();return A},select:function(A){$(A).select();return A}};Form.Element.Methods={serialize:function(A){A=$(A);if(!A.disabled&&A.name){var B=A.getValue();if(B!=undefined){var C={};C[A.name]=B;return Object.toQueryString(C)}}return""},getValue:function(A){A=$(A);var B=A.tagName.toLowerCase();return Form.Element.Serializers[B](A)},setValue:function(A,B){A=$(A);var C=A.tagName.toLowerCase();Form.Element.Serializers[C](A,B);return A},clear:function(A){$(A).value="";return A},present:function(A){return $(A).value!=""},activate:function(A){A=$(A);try{A.focus();if(A.select&&(A.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(A.type))){A.select()}}catch(B){}return A},disable:function(A){A=$(A);A.blur();A.disabled=true;return A},enable:function(A){A=$(A);A.disabled=false;return A}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(A,B){switch(A.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(A,B);default:return Form.Element.Serializers.textarea(A,B)}},inputSelector:function(A,B){if(B===undefined){return A.checked?A.value:null}else{A.checked=!!B}},textarea:function(A,B){if(B===undefined){return A.value}else{A.value=B}},select:function(D,A){if(A===undefined){return this[D.type=="select-one"?"selectOne":"selectMany"](D)}else{var C,F,G=!Object.isArray(A);for(var B=0,E=D.length;B<E;B++){C=D.options[B];F=this.optionValue(C);if(G){if(F==A){C.selected=true;return }}else{C.selected=A.include(F)}}}},selectOne:function(B){var A=B.selectedIndex;return A>=0?this.optionValue(B.options[A]):null},selectMany:function(D){var A,E=D.length;if(!E){return null}for(var C=0,A=[];C<E;C++){var B=D.options[C];if(B.selected){A.push(this.optionValue(B))}}return A},optionValue:function(A){return Element.extend(A).hasAttribute("value")?A.value:A.text}};Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,A,B,C){$super(C,B);this.element=$(A);this.lastValue=this.getValue()},execute:function(){var A=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(A)?this.lastValue!=A:String(this.lastValue)!=String(A)){this.callback(this.element,A);this.lastValue=A}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=Class.create({initialize:function(A,B){this.element=$(A);this.callback=B;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(A){if(A.type){switch(A.type.toLowerCase()){case"checkbox":case"radio":Event.observe(A,"click",this.onElementEvent.bind(this));break;default:Event.observe(A,"change",this.onElementEvent.bind(this));break}}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});if(!$$w.Event){var Event={}}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{},relatedTarget:function(B){var A;switch(B.type){case"mouseover":A=B.fromElement;break;case"mouseout":A=B.toElement;break;default:return null}return Element.extend(A)}});Event.Methods=(function(){var A;if(Prototype.Browser.IE){var B={0:1,1:4,2:2};A=function(D,C){return D.button==B[C]}}else{if(Prototype.Browser.WebKit){A=function(D,C){switch(C){case 0:return D.which==1&&!D.metaKey;case 1:return D.which==1&&D.metaKey;default:return false}}}else{A=function(D,C){return D.which?(D.which===C+1):(D.button===C)}}}return{isLeftClick:function(C){return A(C,0)},isMiddleClick:function(C){return A(C,1)},isRightClick:function(C){return A(C,2)},element:function(D){var C=Event.extend(D).target;return Element.extend(C.nodeType==Node.TEXT_NODE?C.parentNode:C)},findElement:function(D,E){var C=Event.element(D);return C.match(E)?C:C.up(E)},pointer:function(C){return{x:C.pageX||(C.clientX+($$d.documentElement.scrollLeft||$$d.body.scrollLeft)),y:C.pageY||(C.clientY+($$d.documentElement.scrollTop||$$d.body.scrollTop))}},pointerX:function(C){return Event.pointer(C).x},pointerY:function(C){return Event.pointer(C).y},stop:function(C){Event.extend(C);C.preventDefault();C.stopPropagation();C.stopped=true}}})();Event.extend=(function(){var A=Object.keys(Event.Methods).inject({},function(B,C){B[C]=Event.Methods[C].methodize();return B});if(Prototype.Browser.IE){Object.extend(A,{stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}});return function(B){if(!B){return false}if(B._extendedByPrototype){return B}B._extendedByPrototype=Prototype.emptyFunction;var C=Event.pointer(B);Object.extend(B,{target:B.srcElement,relatedTarget:Event.relatedTarget(B),pageX:C.x,pageY:C.y});return Object.extend(B,A)}}else{Event.prototype=Event.prototype||$$d.createEvent("HTMLEvents").__proto__;Object.extend(Event.prototype,A);return Prototype.K}})();Object.extend(Event,(function(){var B=Event.cache;function C(J){if(J._eventID){return J._eventID}arguments.callee.id=arguments.callee.id||1;return J._eventID=++arguments.callee.id}function G(J){if(J&&J.include(":")){return"dataavailable"}return J}function A(J){return B[J]=B[J]||{}}function F(L,J){var K=A(L);return K[J]=K[J]||[]}function H(K,J,L){var O=C(K);var N=F(O,J);if(N.pluck("handler").include(L)){return false}var M=function(P){if(!Event||!Event.extend||(P.eventName&&P.eventName!=J)){return false}Event.extend(P);L.call(K,P)};M.handler=L;N.push(M);return M}function I(M,J,K){var L=F(M,J);return L.find(function(N){return N.handler==K})}function D(M,J,K){var L=A(M);if(!L[J]){return false}L[J]=L[J].without(I(M,J,K))}function E(){for(var K in B){for(var J in B[K]){B[K][J]=null}}}if($$w.attachEvent){$$w.attachEvent("onunload",E)}return{observe:function(L,J,M){L=$(L);var K=G(J);var N=H(L,J,M);if(!N){return L}if(L.addEventListener){L.addEventListener(K,N,false)}else{L.attachEvent("on"+K,N)}return L},stopObserving:function(L,J,M){L=$(L);var O=C(L),K=G(J);if(!M&&J){F(O,J).each(function(P){L.stopObserving(J,P.handler)});return L}else{if(!J){Object.keys(A(O)).each(function(P){L.stopObserving(P)});return L}}var N=I(O,J,M);if(!N){return L}if(L.removeEventListener){L.removeEventListener(K,N,false)}else{L.detachEvent("on"+K,N)}D(O,J,M);return L},fire:function(L,K,J){L=$(L);if(L==document&&$$d.createEvent&&!L.dispatchEvent){L=$$d.documentElement}if($$d.createEvent){var M=$$d.createEvent("HTMLEvents");M.initEvent("dataavailable",true,true)}else{var M=$$d.createEventObject();M.eventType="ondataavailable"}M.eventName=K;M.memo=J||{};if($$d.createEvent){L.dispatchEvent(M)}else{L.fireEvent(M.eventType,M)}return M}}})());Object.extend(Event,Event.Methods);Element.addMethods({fire:Event.fire,observe:Event.observe,stopObserving:Event.stopObserving});Object.extend(document,{fire:Element.Methods.fire.methodize(),observe:Element.Methods.observe.methodize(),stopObserving:Element.Methods.stopObserving.methodize()});(function(){var C,B=false;function A(){if(B){return }if(C){$$w.clearInterval(C)}$$d.fire("dom:loaded");B=true}if($$d.addEventListener){if(Prototype.Browser.WebKit){C=$$w.setInterval(function(){if(/loaded|complete/.test($$d.readyState)){A()}},0);Event.observe(window,"load",A)}else{$$d.addEventListener("DOMContentLoaded",A,false)}}else{$$d.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");$("__onDOMContentLoaded").onreadystatechange=function(){if(this.readyState=="complete"){this.onreadystatechange=null;A()}}}})();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(A,B){return Element.insert(A,{before:B})},Top:function(A,B){return Element.insert(A,{top:B})},Bottom:function(A,B){return Element.insert(A,{bottom:B})},After:function(A,B){return Element.insert(A,{after:B})}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=$$w.pageXOffset||$$d.documentElement.scrollLeft||$$d.body.scrollLeft||0;this.deltaY=$$w.pageYOffset||$$d.documentElement.scrollTop||$$d.body.scrollTop||0},within:function(B,A,C){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(B,A,C)}this.xcomp=A;this.ycomp=C;this.offset=Element.cumulativeOffset(B);return(C>=this.offset[1]&&C<this.offset[1]+B.offsetHeight&&A>=this.offset[0]&&A<this.offset[0]+B.offsetWidth)},withinIncludingScrolloffsets:function(B,A,D){var C=Element.cumulativeScrollOffset(B);this.xcomp=A+C[0]-this.deltaX;this.ycomp=D+C[1]-this.deltaY;this.offset=Element.cumulativeOffset(B);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+B.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+B.offsetWidth)},overlap:function(B,A){if(!B){return 0}if(B=="vertical"){return((this.offset[1]+A.offsetHeight)-this.ycomp)/A.offsetHeight}if(B=="horizontal"){return((this.offset[0]+A.offsetWidth)-this.xcomp)/A.offsetWidth}},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(A){Position.prepare();return Element.absolutize(A)},relativize:function(A){Position.prepare();return Element.relativize(A)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(B,C,A){A=A||{};return Element.clonePosition(C,B,A)}};if(!$$d.getElementsByClassName){$$d.getElementsByClassName=function(B){function A(C){return C.blank()?null:"[contains(concat(' ', @class, ' '), ' "+C+" ')]"}B.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(C,E){E=E.toString().strip();var D=/\s/.test(E)?$w(E).map(A).join(""):A(E);return D?$$d._getElementsByXPath(".//*"+D,C):[]}:function(E,F){F=F.toString().strip();var G=[],H=(/\s/.test(F)?$w(F):null);if(!H&&!F){return G}var C=$(E).getElementsByTagName("*");F=" "+F+" ";for(var D=0,J,I;J=C[D];D++){if(J.className&&(I=" "+J.className+" ")&&(I.include(F)||(H&&H.all(function(K){return !K.toString().blank()&&I.include(" "+K+" ")})))){G.push(Element.extend(J))}}return G};return function(D,C){return $(C||$$d.body).getElementsByClassName(D)}}(Element.Methods)}Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(A){this.element=$(A)},_each:function(A){this.element.className.split(/\s+/).select(function(B){return B.length>0})._each(A)},set:function(A){this.element.className=A},add:function(A){if(this.include(A)){return }this.set($A(this).concat(A).join(" "))},remove:function(A){if(!this.include(A)){return }this.set($A(this).without(A).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);Element.addMethods();var Scriptaculous={Version:"1.8.0",require:function(A){$$d.write('<script type="text/javascript" src="'+A+'"><\/script>')},REQUIRED_PROTOTYPE:"1.6.0",load:function(){function A(B){var C=B.split(".");return parseInt(C[0])*100000+parseInt(C[1])*1000+parseInt(C[2])}if((typeof Prototype=="undefined")||(typeof Element=="undefined")||(typeof Element.Methods=="undefined")||(A(Prototype.Version)<A(Scriptaculous.REQUIRED_PROTOTYPE))){throw ("script.aculo.us requires the Prototype JavaScript framework >= "+Scriptaculous.REQUIRED_PROTOTYPE)}$A($$d.getElementsByTagName("script")).findAll(function(B){return(B.src&&B.src.match(/scriptaculous\.js(\?.*)?$/))}).each(function(C){var D=C.src.replace(/scriptaculous\.js(\?.*)?$/,"");var B=C.src.match(/\?.*load=([a-z,]*)/);(B?B[1]:"builder,effects,dragdrop,controls,slider,sound").split(",").each(function(E){Scriptaculous.require(D+E+".js")})})}};Scriptaculous.load();String.prototype.parseColor=function(){var A="#";if(this.slice(0,4)=="rgb("){var C=this.slice(4,this.length-1).split(",");var B=0;do{A+=parseInt(C[B]).toColorPart()}while(++B<3)}else{if(this.slice(0,1)=="#"){if(this.length==4){for(var B=1;B<4;B++){A+=(this.charAt(B)+this.charAt(B)).toLowerCase()}}if(this.length==7){A=this.toLowerCase()}}}return(A.length==7?A:(arguments[0]||this))};Element.collectTextNodes=function(A){return $A($(A).childNodes).collect(function(B){return(B.nodeType==3?B.nodeValue:(B.hasChildNodes()?Element.collectTextNodes(B):""))}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(A,B){return $A($(A).childNodes).collect(function(C){return(C.nodeType==3?C.nodeValue:((C.hasChildNodes()&&!Element.hasClassName(C,B))?Element.collectTextNodesIgnoreClass(C,B):""))}).flatten().join("")};Element.setContentZoom=function(A,B){A=$(A);A.setStyle({fontSize:(B/100)+"em"});if(Prototype.Browser.WebKit){$$w.scrollBy(0,0)}return A};Element.getInlineOpacity=function(A){return $(A).style.opacity||""};Element.forceRerendering=function(A){try{A=$(A);var C=$$d.createTextNode(" ");A.appendChild(C);A.removeChild(C)}catch(B){}};var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},Transitions:{linear:Prototype.K,sinoidal:function(A){return(-Math.cos(A*Math.PI)/2)+0.5},reverse:function(A){return 1-A},flicker:function(A){var A=((-Math.cos(A*Math.PI)/4)+0.75)+Math.random()/4;return A>1?1:A},wobble:function(A){return(-Math.cos(A*Math.PI*(9*A))/2)+0.5},pulse:function(B,A){A=A||5;return(((B%(1/A))*A).round()==0?((B*A*2)-(B*A*2).floor()):1-((B*A*2)-(B*A*2).floor()))},spring:function(A){return 1-(Math.cos(A*4.5*Math.PI)*Math.exp(-A*6))},none:function(A){return 0},full:function(A){return 1}},DefaultOptions:{duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(A){var B="position:relative";if(Prototype.Browser.IE){B+=";zoom:1"}A=$(A);$A(A.childNodes).each(function(C){if(C.nodeType==3){C.nodeValue.toArray().each(function(D){A.insertBefore(new Element("span",{style:B}).update(D==" "?String.fromCharCode(160):D),C)});Element.remove(C)}})},multiple:function(B,C){var E;if(((typeof B=="object")||Object.isFunction(B))&&(B.length)){E=B}else{E=$(B).childNodes}var A=Object.extend({speed:0.1,delay:0},arguments[2]||{});var D=A.delay;$A(E).each(function(G,F){new C(G,Object.extend(A,{delay:F*A.speed+D}))})},PAIRS:{"slide":["SlideDown","SlideUp"],"blind":["BlindDown","BlindUp"],"appear":["Appear","Fade"]},toggle:function(B,C){B=$(B);C=(C||"appear").toLowerCase();var A=Object.extend({queue:{position:"end",scope:(B.id||"global"),limit:1}},arguments[2]||{});Effect[B.visible()?Effect.PAIRS[C][1]:Effect.PAIRS[C][0]](B,A)}};Effect.DefaultOptions.transition=Effect.Transitions.sinoidal;Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[];this.interval=null},_each:function(A){this.effects._each(A)},add:function(B){var C=new Date().getTime();var A=Object.isString(B.options.queue)?B.options.queue:B.options.queue.position;switch(A){case"front":this.effects.findAll(function(D){return D.state=="idle"}).each(function(D){D.startOn+=B.finishOn;D.finishOn+=B.finishOn});break;case"with-last":C=this.effects.pluck("startOn").max()||C;break;case"end":C=this.effects.pluck("finishOn").max()||C;break}B.startOn+=C;B.finishOn+=C;if(!B.options.queue.limit||(this.effects.length<B.options.queue.limit)){this.effects.push(B)}if(!this.interval){this.interval=setInterval(this.loop.bind(this),15)}},remove:function(A){this.effects=this.effects.reject(function(B){return B==A});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var C=new Date().getTime();for(var B=0,A=this.effects.length;B<A;B++){this.effects[B]&&this.effects[B].loop(C)}}});Effect.Queues={instances:$H(),get:function(A){if(!Object.isString(A)){return A}return this.instances.get(A)||this.instances.set(A,new Effect.ScopedQueue())}};Effect.Queue=Effect.Queues.get("global");Effect.Base=Class.create({position:null,start:function(options){function codeForEvent(options,eventName){return((options[eventName+"Internal"]?"this.options."+eventName+"Internal(this);":"")+(options[eventName]?"this.options."+eventName+"(this);":""))}if(options&&options.transition===false){options.transition=Effect.Transitions.linear}this.options=Object.extend(Object.extend({},Effect.DefaultOptions),options||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.fromToDelta=this.options.to-this.options.from;this.totalTime=this.finishOn-this.startOn;this.totalFrames=this.options.fps*this.options.duration;eval('this.render = function(pos){ if (this.state=="idle"){this.state="running";'+codeForEvent(this.options,"beforeSetup")+(this.setup?"this.setup();":"")+codeForEvent(this.options,"afterSetup")+'};if (this.state=="running"){pos=this.options.transition(pos)*'+this.fromToDelta+"+"+this.options.from+";this.position=pos;"+codeForEvent(this.options,"beforeUpdate")+(this.update?"this.update(pos);":"")+codeForEvent(this.options,"afterUpdate")+"}}");this.event("beforeStart");if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).add(this)}},loop:function(C){if(C>=this.startOn){if(C>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");if(this.finish){this.finish()}this.event("afterFinish");return }var B=(C-this.startOn)/this.totalTime,A=(B*this.totalFrames).round();if(A>this.currentFrame){this.render(B);this.currentFrame=A}}},cancel:function(){if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).remove(this)}this.state="finished"},event:function(A){if(this.options[A+"Internal"]){this.options[A+"Internal"](this)}if(this.options[A]){this.options[A](this)}},inspect:function(){var A=$H();for(property in this){if(!Object.isFunction(this[property])){A.set(property,this[property])}}return"#<Effect:"+A.inspect()+",options:"+$H(this.options).inspect()+">"}});Effect.Parallel=Class.create(Effect.Base,{initialize:function(A){this.effects=A||[];this.start(arguments[1])},update:function(A){this.effects.invoke("render",A)},finish:function(A){this.effects.each(function(B){B.render(1);B.cancel();B.event("beforeFinish");if(B.finish){B.finish(A)}B.event("afterFinish")})}});Effect.Tween=Class.create(Effect.Base,{initialize:function(C,F,E){C=Object.isString(C)?$(C):C;var B=$A(arguments),D=B.last(),A=B.length==5?B[3]:null;this.method=Object.isFunction(D)?D.bind(C):Object.isFunction(C[D])?C[D].bind(C):function(G){C[D]=G};this.start(Object.extend({from:F,to:E},A||{}))},update:function(A){this.method(A)}});Effect.Event=Class.create(Effect.Base,{initialize:function(){this.start(Object.extend({duration:0},arguments[0]||{}))},update:Prototype.emptyFunction});Effect.Opacity=Class.create(Effect.Base,{initialize:function(B){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}var A=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(A)},update:function(A){this.element.setOpacity(A)}});Effect.Move=Class.create(Effect.Base,{initialize:function(B){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}var A=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(A)},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");if(this.options.mode=="absolute"){this.options.x=this.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop}},update:function(A){this.element.setStyle({left:(this.options.x*A+this.originalLeft).round()+"px",top:(this.options.y*A+this.originalTop).round()+"px"})}});Effect.MoveBy=function(B,A,C){return new Effect.Move(B,Object.extend({x:C,y:A},arguments[3]||{}))};Effect.Scale=Class.create(Effect.Base,{initialize:function(B,C){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}var A=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:C},arguments[2]||{});this.start(A)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(B){this.originalStyle[B]=this.element.style[B]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var A=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(B){if(A.indexOf(B)>0){this.fontSize=parseFloat(A);this.fontSizeType=B}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box"){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}if(!this.dims){this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}},update:function(A){var B=(this.options.scaleFrom/100)+(this.factor*A);if(this.options.scaleContent&&this.fontSize){this.element.setStyle({fontSize:this.fontSize*B+this.fontSizeType})}this.setDimensions(this.dims[0]*B,this.dims[1]*B)},finish:function(A){if(this.restoreAfterFinish){this.element.setStyle(this.originalStyle)}},setDimensions:function(A,D){var E={};if(this.options.scaleX){E.width=D.round()+"px"}if(this.options.scaleY){E.height=A.round()+"px"}if(this.options.scaleFromCenter){var C=(A-this.dims[0])/2;var B=(D-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){E.top=this.originalTop-C+"px"}if(this.options.scaleX){E.left=this.originalLeft-B+"px"}}else{if(this.options.scaleY){E.top=-C+"px"}if(this.options.scaleX){E.left=-B+"px"}}}this.element.setStyle(E)}});Effect.Highlight=Class.create(Effect.Base,{initialize:function(B){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}var A=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(A)},setup:function(){if(this.element.getStyle("display")=="none"){this.cancel();return }this.oldStyle={};if(!this.options.keepBackgroundImage){this.oldStyle.backgroundImage=this.element.getStyle("background-image");this.element.setStyle({backgroundImage:"none"})}if(!this.options.endcolor){this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")}if(!this.options.restorecolor){this.options.restorecolor=this.element.getStyle("background-color")}this._base=$R(0,2).map(function(A){return parseInt(this.options.startcolor.slice(A*2+1,A*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(A){return parseInt(this.options.endcolor.slice(A*2+1,A*2+3),16)-this._base[A]}.bind(this))},update:function(A){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(B,C,D){return B+((this._base[D]+(this._delta[D]*A)).round().toColorPart())}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=function(D){var C=arguments[1]||{},B=$$d.viewport.getScrollOffsets(),E=$(D).cumulativeOffset(),A=($$w.height||$$d.body.scrollHeight)-$$d.viewport.getHeight();if(C.offset){E[1]+=C.offset}return new Effect.Tween(null,B.top,E[1]>A?A:E[1],C,function(F){scrollTo(B.left,F.round())})};Effect.Fade=function(C){C=$(C);var A=C.getInlineOpacity();var B=Object.extend({from:C.getOpacity()||1,to:0,afterFinishInternal:function(D){if(D.options.to!=0){return }D.element.hide().setStyle({opacity:A})}},arguments[1]||{});return new Effect.Opacity(C,B)};Effect.Appear=function(B){B=$(B);var A=Object.extend({from:(B.getStyle("display")=="none"?0:B.getOpacity()||0),to:1,afterFinishInternal:function(C){C.element.forceRerendering()},beforeSetup:function(C){C.element.setOpacity(C.options.from).show()}},arguments[1]||{});return new Effect.Opacity(B,A)};Effect.Puff=function(B){B=$(B);var A={opacity:B.getInlineOpacity(),position:B.getStyle("position"),top:B.style.top,left:B.style.left,width:B.style.width,height:B.style.height};return new Effect.Parallel([new Effect.Scale(B,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(B,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(C){Position.absolutize(C.effects[0].element)},afterFinishInternal:function(C){C.effects[0].element.hide().setStyle(A)}},arguments[1]||{}))};Effect.BlindUp=function(A){A=$(A);A.makeClipping();return new Effect.Scale(A,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(B){B.element.hide().undoClipping()}},arguments[1]||{}))};Effect.BlindDown=function(B){B=$(B);var A=B.getDimensions();return new Effect.Scale(B,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:A.height,originalWidth:A.width},restoreAfterFinish:true,afterSetup:function(C){C.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(C){C.element.undoClipping()}},arguments[1]||{}))};Effect.SwitchOff=function(B){B=$(B);var A=B.getInlineOpacity();return new Effect.Appear(B,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(C){new Effect.Scale(C.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(D){D.element.makePositioned().makeClipping()},afterFinishInternal:function(D){D.element.hide().undoClipping().undoPositioned().setStyle({opacity:A})}})}},arguments[1]||{}))};Effect.DropOut=function(B){B=$(B);var A={top:B.getStyle("top"),left:B.getStyle("left"),opacity:B.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(B,{x:0,y:100,sync:true}),new Effect.Opacity(B,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(C){C.effects[0].element.makePositioned()},afterFinishInternal:function(C){C.effects[0].element.hide().undoPositioned().setStyle(A)}},arguments[1]||{}))};Effect.Shake=function(D){D=$(D);var B=Object.extend({distance:20,duration:0.5},arguments[1]||{});var E=parseFloat(B.distance);var C=parseFloat(B.duration)/10;var A={top:D.getStyle("top"),left:D.getStyle("left")};return new Effect.Move(D,{x:E,y:0,duration:C,afterFinishInternal:function(F){new Effect.Move(F.element,{x:-E*2,y:0,duration:C*2,afterFinishInternal:function(G){new Effect.Move(G.element,{x:E*2,y:0,duration:C*2,afterFinishInternal:function(H){new Effect.Move(H.element,{x:-E*2,y:0,duration:C*2,afterFinishInternal:function(I){new Effect.Move(I.element,{x:E*2,y:0,duration:C*2,afterFinishInternal:function(J){new Effect.Move(J.element,{x:-E,y:0,duration:C,afterFinishInternal:function(K){K.element.undoPositioned().setStyle(A)}})}})}})}})}})}})};Effect.SlideDown=function(C){C=$(C).cleanWhitespace();var A=C.down().getStyle("bottom");var B=C.getDimensions();return new Effect.Scale(C,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:$$w.opera?0:1,scaleMode:{originalHeight:B.height,originalWidth:B.width},restoreAfterFinish:true,afterSetup:function(D){D.element.makePositioned();D.element.down().makePositioned();if($$w.opera){D.element.setStyle({top:""})}D.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(D){D.element.down().setStyle({bottom:(D.dims[0]-D.element.clientHeight)+"px"})},afterFinishInternal:function(D){D.element.undoClipping().undoPositioned();D.element.down().undoPositioned().setStyle({bottom:A})}},arguments[1]||{}))};Effect.SlideUp=function(C){C=$(C).cleanWhitespace();var A=C.down().getStyle("bottom");var B=C.getDimensions();return new Effect.Scale(C,$$w.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:B.height,originalWidth:B.width},restoreAfterFinish:true,afterSetup:function(D){D.element.makePositioned();D.element.down().makePositioned();if($$w.opera){D.element.setStyle({top:""})}D.element.makeClipping().show()},afterUpdateInternal:function(D){D.element.down().setStyle({bottom:(D.dims[0]-D.element.clientHeight)+"px"})},afterFinishInternal:function(D){D.element.hide().undoClipping().undoPositioned();D.element.down().undoPositioned().setStyle({bottom:A})}},arguments[1]||{}))};Effect.Squish=function(A){return new Effect.Scale(A,$$w.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(B){B.element.makeClipping()},afterFinishInternal:function(B){B.element.hide().undoClipping()}})};Effect.Grow=function(C){C=$(C);var B=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});var A={top:C.style.top,left:C.style.left,height:C.style.height,width:C.style.width,opacity:C.getInlineOpacity()};var G=C.getDimensions();var H,F;var E,D;switch(B.direction){case"top-left":H=F=E=D=0;break;case"top-right":H=G.width;F=D=0;E=-G.width;break;case"bottom-left":H=E=0;F=G.height;D=-G.height;break;case"bottom-right":H=G.width;F=G.height;E=-G.width;D=-G.height;break;case"center":H=G.width/2;F=G.height/2;E=-G.width/2;D=-G.height/2;break}return new Effect.Move(C,{x:H,y:F,duration:0.01,beforeSetup:function(I){I.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(I){new Effect.Parallel([new Effect.Opacity(I.element,{sync:true,to:1,from:0,transition:B.opacityTransition}),new Effect.Move(I.element,{x:E,y:D,sync:true,transition:B.moveTransition}),new Effect.Scale(I.element,100,{scaleMode:{originalHeight:G.height,originalWidth:G.width},sync:true,scaleFrom:$$w.opera?1:0,transition:B.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(J){J.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(J){J.effects[0].element.undoClipping().undoPositioned().setStyle(A)}},B))}})};Effect.Shrink=function(C){C=$(C);var B=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});var A={top:C.style.top,left:C.style.left,height:C.style.height,width:C.style.width,opacity:C.getInlineOpacity()};var F=C.getDimensions();var E,D;switch(B.direction){case"top-left":E=D=0;break;case"top-right":E=F.width;D=0;break;case"bottom-left":E=0;D=F.height;break;case"bottom-right":E=F.width;D=F.height;break;case"center":E=F.width/2;D=F.height/2;break}return new Effect.Parallel([new Effect.Opacity(C,{sync:true,to:0,from:1,transition:B.opacityTransition}),new Effect.Scale(C,$$w.opera?1:0,{sync:true,transition:B.scaleTransition,restoreAfterFinish:true}),new Effect.Move(C,{x:E,y:D,sync:true,transition:B.moveTransition})],Object.extend({beforeStartInternal:function(G){G.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(G){G.effects[0].element.hide().undoClipping().undoPositioned().setStyle(A)}},B))};Effect.Pulsate=function(C){C=$(C);var B=arguments[1]||{};var A=C.getInlineOpacity();var E=B.transition||Effect.Transitions.sinoidal;var D=function(F){return E(1-Effect.Transitions.pulse(F,B.pulses))};D.bind(E);return new Effect.Opacity(C,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(F){F.element.setStyle({opacity:A})}},B),{transition:D}))};Effect.Fold=function(B){B=$(B);var A={top:B.style.top,left:B.style.left,width:B.style.width,height:B.style.height};B.makeClipping();return new Effect.Scale(B,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(C){new Effect.Scale(B,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(D){D.element.hide().undoClipping().setStyle(A)}})}},arguments[1]||{}))};Effect.Morph=Class.create(Effect.Base,{initialize:function(C){this.element=$(C);if(!this.element){throw (Effect._elementDoesNotExistError)}var A=Object.extend({style:{}},arguments[1]||{});if(!Object.isString(A.style)){this.style=$H(A.style)}else{if(A.style.include(":")){this.style=A.style.parseStyle()}else{this.element.addClassName(A.style);this.style=$H(this.element.getStyles());this.element.removeClassName(A.style);var B=this.element.getStyles();this.style=this.style.reject(function(D){return D.value==B[D.key]});A.afterFinishInternal=function(D){D.element.addClassName(D.options.style);D.transforms.each(function(E){D.element.style[E.style]=""})}}}this.start(A)},setup:function(){function A(B){if(!B||["rgba(0, 0, 0, 0)","transparent"].include(B)){B="#ffffff"}B=B.parseColor();return $R(0,2).map(function(C){return parseInt(B.slice(C*2+1,C*2+3),16)})}this.transforms=this.style.map(function(G){var F=G[0],E=G[1],D=null;if(E.parseColor("#zzzzzz")!="#zzzzzz"){E=E.parseColor();D="color"}else{if(F=="opacity"){E=parseFloat(E);if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}}else{if(Element.CSS_LENGTH.test(E)){var C=E.match(/^([\+\-]?[0-9\.]+)(.*)$/);E=parseFloat(C[1]);D=(C.length==3)?C[2]:null}}}var B=this.element.getStyle(F);return{style:F.camelize(),originalValue:D=="color"?A(B):parseFloat(B||0),targetValue:D=="color"?A(E):E,unit:D}}.bind(this)).reject(function(B){return((B.originalValue==B.targetValue)||(B.unit!="color"&&(isNaN(B.originalValue)||isNaN(B.targetValue))))})},update:function(A){var D={},B,C=this.transforms.length;while(C--){D[(B=this.transforms[C]).style]=B.unit=="color"?"#"+(Math.round(B.originalValue[0]+(B.targetValue[0]-B.originalValue[0])*A)).toColorPart()+(Math.round(B.originalValue[1]+(B.targetValue[1]-B.originalValue[1])*A)).toColorPart()+(Math.round(B.originalValue[2]+(B.targetValue[2]-B.originalValue[2])*A)).toColorPart():(B.originalValue+(B.targetValue-B.originalValue)*A).toFixed(3)+(B.unit===null?"":B.unit)}this.element.setStyle(D,true)}});Effect.Transform=Class.create({initialize:function(A){this.tracks=[];this.options=arguments[1]||{};this.addTracks(A)},addTracks:function(A){A.each(function(B){B=$H(B);var C=B.values().first();this.tracks.push($H({ids:B.keys().first(),effect:Effect.Morph,options:{style:C}}))}.bind(this));return this},play:function(){return new Effect.Parallel(this.tracks.map(function(A){var D=A.get("ids"),C=A.get("effect"),B=A.get("options");var E=[$(D)||$$(D)].flatten();return E.map(function(F){return new C(F,Object.extend({sync:true},B))})}).flatten(),this.options)}});Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex");Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;String.__parseStyleElement=$$d.createElement("div");String.prototype.parseStyle=function(){var B,A=$H();if(Prototype.Browser.WebKit){B=new Element("div",{style:this}).style}else{String.__parseStyleElement.innerHTML='<div style="'+this+'"></div>';B=String.__parseStyleElement.childNodes[0].style}Element.CSS_PROPERTIES.each(function(C){if(B[C]){A.set(C,B[C])}});if(Prototype.Browser.IE&&this.include("opacity")){A.set("opacity",this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1])}return A};if($$d.defaultView&&$$d.defaultView.getComputedStyle){Element.getStyles=function(B){var A=$$d.defaultView.getComputedStyle($(B),null);return Element.CSS_PROPERTIES.inject({},function(C,D){C[D]=A[D];return C})}}else{Element.getStyles=function(B){B=$(B);var A=B.currentStyle,C;C=Element.CSS_PROPERTIES.inject({},function(E,D){E.set(D,A[D]);return E});if(!C.opacity){C.set("opacity",B.getOpacity())}return C}}Effect.Methods={morph:function(A,B){A=$(A);new Effect.Morph(A,Object.extend({style:B},arguments[2]||{}));return A},visualEffect:function(C,E,B){C=$(C);var D=E.dasherize().camelize(),A=D.charAt(0).toUpperCase()+D.substring(1);new Effect[A](C,B);return C},highlight:function(B,A){B=$(B);new Effect.Highlight(B,A);return B}};$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(A){Effect.Methods[A]=function(C,B){C=$(C);Effect[A.charAt(0).toUpperCase()+A.substring(1)](C,B);return C}});$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(A){Effect.Methods[A]=Element[A]});Element.addMethods(Effect.Methods);if(Object.isUndefined(Effect)){throw ("dragdrop.js requires including script.aculo.us' effects.js library")}var Droppables={drops:[],remove:function(A){this.drops=this.drops.reject(function(B){return B.element==$(A)})},add:function(B){B=$(B);var A=Object.extend({greedy:true,hoverclass:null,tree:false},arguments[1]||{});if(A.containment){A._containers=[];var C=A.containment;if(Object.isArray(C)){C.each(function(D){A._containers.push($(D))})}else{A._containers.push($(C))}}if(A.accept){A.accept=[A.accept].flatten()}Element.makePositioned(B);A.element=B;this.drops.push(A)},findDeepestChild:function(A){deepest=A[0];for(i=1;i<A.length;++i){if(Element.isParent(A[i].element,deepest.element)){deepest=A[i]}}return deepest},isContained:function(B,A){var C;if(A.tree){C=B.treeNode}else{C=B.parentNode}return A._containers.detect(function(D){return C==D})},isAffected:function(A,C,B){return((B.element!=C)&&((!B._containers)||this.isContained(C,B))&&((!B.accept)||(Element.classNames(C).detect(function(D){return B.accept.include(D)})))&&Position.within(B.element,A[0],A[1]))},deactivate:function(A){if(A.hoverclass){Element.removeClassName(A.element,A.hoverclass)}this.last_active=null},activate:function(A){if(A.hoverclass){Element.addClassName(A.element,A.hoverclass)}this.last_active=A},show:function(A,C){if(!this.drops.length){return }var B,D=[];this.drops.each(function(E){if(Droppables.isAffected(A,C,E)){D.push(E)}});if(D.length>0){B=Droppables.findDeepestChild(D)}if(this.last_active&&this.last_active!=B){this.deactivate(this.last_active)}if(B){Position.within(B.element,A[0],A[1]);if(B.onHover){B.onHover(C,B.element,Position.overlap(B.overlap,B.element))}if(B!=this.last_active){Droppables.activate(B)}}},fire:function(B,A){if(!this.last_active){return }Position.prepare();if(this.isAffected([Event.pointerX(B),Event.pointerY(B)],A,this.last_active)){if(this.last_active.onDrop){this.last_active.onDrop(A,this.last_active.element,B);return true}}},reset:function(){if(this.last_active){this.deactivate(this.last_active)}}};var Draggables={drags:[],observers:[],register:function(A){if(this.drags.length==0){this.eventMouseUp=this.endDrag.bindAsEventListener(this);this.eventMouseMove=this.updateDrag.bindAsEventListener(this);this.eventKeypress=this.keyPress.bindAsEventListener(this);Event.observe(document,"mouseup",this.eventMouseUp);Event.observe(document,"mousemove",this.eventMouseMove);Event.observe(document,"keypress",this.eventKeypress)}this.drags.push(A)},unregister:function(A){this.drags=this.drags.reject(function(B){return B==A});if(this.drags.length==0){Event.stopObserving(document,"mouseup",this.eventMouseUp);Event.stopObserving(document,"mousemove",this.eventMouseMove);Event.stopObserving(document,"keypress",this.eventKeypress)}},activate:function(A){if(A.options.delay){this._timeout=setTimeout(function(){Draggables._timeout=null;$$w.focus();Draggables.activeDraggable=A}.bind(this),A.options.delay)}else{$$w.focus();this.activeDraggable=A}},deactivate:function(){this.activeDraggable=null},updateDrag:function(A){if(!this.activeDraggable){return }var B=[Event.pointerX(A),Event.pointerY(A)];if(this._lastPointer&&(this._lastPointer.inspect()==B.inspect())){return }this._lastPointer=B;this.activeDraggable.updateDrag(A,B)},endDrag:function(A){if(this._timeout){clearTimeout(this._timeout);this._timeout=null}if(!this.activeDraggable){return }this._lastPointer=null;this.activeDraggable.endDrag(A);this.activeDraggable=null},keyPress:function(A){if(this.activeDraggable){this.activeDraggable.keyPress(A)}},addObserver:function(A){this.observers.push(A);this._cacheObserverCallbacks()},removeObserver:function(A){this.observers=this.observers.reject(function(B){return B.element==A});this._cacheObserverCallbacks()},notify:function(B,A,C){if(this[B+"Count"]>0){this.observers.each(function(D){if(D[B]){D[B](B,A,C)}})}if(A.options[B]){A.options[B](A,C)}},_cacheObserverCallbacks:function(){["onStart","onEnd","onDrag"].each(function(A){Draggables[A+"Count"]=Draggables.observers.select(function(B){return B[A]}).length})}};var Draggable=Class.create({initialize:function(B){var C={handle:false,reverteffect:function(F,E,D){var G=Math.sqrt(Math.abs(E^2)+Math.abs(D^2))*0.02;new Effect.Move(F,{x:-D,y:-E,duration:G,queue:{scope:"_draggable",position:"end"}})},endeffect:function(E){var D=Object.isNumber(E._opacity)?E._opacity:1;new Effect.Opacity(E,{duration:0.2,from:0.7,to:D,queue:{scope:"_draggable",position:"end"},afterFinish:function(){Draggable._dragging[E]=false}})},zindex:1000,revert:false,quiet:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,snap:false,delay:0};if(!arguments[1]||Object.isUndefined(arguments[1].endeffect)){Object.extend(C,{starteffect:function(D){D._opacity=Element.getOpacity(D);Draggable._dragging[D]=true;new Effect.Opacity(D,{duration:0.2,from:D._opacity,to:0.7})}})}var A=Object.extend(C,arguments[1]||{});this.element=$(B);if(A.handle&&Object.isString(A.handle)){this.handle=this.element.down("."+A.handle,0)}if(!this.handle){this.handle=$(A.handle)}if(!this.handle){this.handle=this.element}if(A.scroll&&!A.scroll.scrollTo&&!A.scroll.outerHTML){A.scroll=$(A.scroll);this._isScrollChild=Element.childOf(this.element,A.scroll)}Element.makePositioned(this.element);this.options=A;this.dragging=false;this.eventMouseDown=this.initDrag.bindAsEventListener(this);Event.observe(this.handle,"mousedown",this.eventMouseDown);Draggables.register(this)},destroy:function(){Event.stopObserving(this.handle,"mousedown",this.eventMouseDown);Draggables.unregister(this)},currentDelta:function(){return([parseInt(Element.getStyle(this.element,"left")||"0"),parseInt(Element.getStyle(this.element,"top")||"0")])},initDrag:function(A){if(!Object.isUndefined(Draggable._dragging[this.element])&&Draggable._dragging[this.element]){return }if(Event.isLeftClick(A)){var C=Event.element(A);if((tag_name=C.tagName.toUpperCase())&&(tag_name=="INPUT"||tag_name=="SELECT"||tag_name=="OPTION"||tag_name=="BUTTON"||tag_name=="TEXTAREA")){return }var B=[Event.pointerX(A),Event.pointerY(A)];var D=Position.cumulativeOffset(this.element);this.offset=[0,1].map(function(E){return(B[E]-D[E])});Draggables.activate(this);Event.stop(A)}},startDrag:function(B){this.dragging=true;if(!this.delta){this.delta=this.currentDelta()}if(this.options.zindex){this.originalZ=parseInt(Element.getStyle(this.element,"z-index")||0);this.element.style.zIndex=this.options.zindex}if(this.options.ghosting){this._clone=this.element.cloneNode(true);this.element._originallyAbsolute=(this.element.getStyle("position")=="absolute");if(!this.element._originallyAbsolute){Position.absolutize(this.element)}this.element.parentNode.insertBefore(this._clone,this.element)}if(this.options.scroll){if(this.options.scroll==window){var A=this._getWindowScroll(this.options.scroll);this.originalScrollLeft=A.left;this.originalScrollTop=A.top}else{this.originalScrollLeft=this.options.scroll.scrollLeft;this.originalScrollTop=this.options.scroll.scrollTop}}Draggables.notify("onStart",this,B);if(this.options.starteffect){this.options.starteffect(this.element)}},updateDrag:function(event,pointer){if(!this.dragging){this.startDrag(event)}if(!this.options.quiet){Position.prepare();Droppables.show(pointer,this.element)}Draggables.notify("onDrag",this,event);this.draw(pointer);if(this.options.change){this.options.change(this)}if(this.options.scroll){this.stopScrolling();var p;if(this.options.scroll==window){with(this._getWindowScroll(this.options.scroll)){p=[left,top,left+width,top+height]}}else{p=Position.page(this.options.scroll);p[0]+=this.options.scroll.scrollLeft+Position.deltaX;p[1]+=this.options.scroll.scrollTop+Position.deltaY;p.push(p[0]+this.options.scroll.offsetWidth);p.push(p[1]+this.options.scroll.offsetHeight)}var speed=[0,0];if(pointer[0]<(p[0]+this.options.scrollSensitivity)){speed[0]=pointer[0]-(p[0]+this.options.scrollSensitivity)}if(pointer[1]<(p[1]+this.options.scrollSensitivity)){speed[1]=pointer[1]-(p[1]+this.options.scrollSensitivity)}if(pointer[0]>(p[2]-this.options.scrollSensitivity)){speed[0]=pointer[0]-(p[2]-this.options.scrollSensitivity)}if(pointer[1]>(p[3]-this.options.scrollSensitivity)){speed[1]=pointer[1]-(p[3]-this.options.scrollSensitivity)}this.startScrolling(speed)}if(Prototype.Browser.WebKit){$$w.scrollBy(0,0)}Event.stop(event)},finishDrag:function(B,E){this.dragging=false;if(this.options.quiet){Position.prepare();var D=[Event.pointerX(B),Event.pointerY(B)];Droppables.show(D,this.element)}if(this.options.ghosting){if(!this.element._originallyAbsolute){Position.relativize(this.element)}delete this.element._originallyAbsolute;Element.remove(this._clone);this._clone=null}var F=false;if(E){F=Droppables.fire(B,this.element);if(!F){F=false}}if(F&&this.options.onDropped){this.options.onDropped(this.element)}Draggables.notify("onEnd",this,B);var A=this.options.revert;if(A&&Object.isFunction(A)){A=A(this.element)}var C=this.currentDelta();if(A&&this.options.reverteffect){if(F==0||A!="failure"){this.options.reverteffect(this.element,C[1]-this.delta[1],C[0]-this.delta[0])}}else{this.delta=C}if(this.options.zindex){this.element.style.zIndex=this.originalZ}if(this.options.endeffect){this.options.endeffect(this.element)}Draggables.deactivate(this);Droppables.reset()},keyPress:function(A){if(A.keyCode!=Event.KEY_ESC){return }this.finishDrag(A,false);Event.stop(A)},endDrag:function(A){if(!this.dragging){return }this.stopScrolling();this.finishDrag(A,true);Event.stop(A)},draw:function(A){var F=Position.cumulativeOffset(this.element);if(this.options.ghosting){var C=Position.realOffset(this.element);F[0]+=C[0]-Position.deltaX;F[1]+=C[1]-Position.deltaY}var E=this.currentDelta();F[0]-=E[0];F[1]-=E[1];if(this.options.scroll&&(this.options.scroll!=window&&this._isScrollChild)){F[0]-=this.options.scroll.scrollLeft-this.originalScrollLeft;F[1]-=this.options.scroll.scrollTop-this.originalScrollTop}var D=[0,1].map(function(G){return(A[G]-F[G]-this.offset[G])}.bind(this));if(this.options.snap){if(Object.isFunction(this.options.snap)){D=this.options.snap(D[0],D[1],this)}else{if(Object.isArray(this.options.snap)){D=D.map(function(G,H){return(G/this.options.snap[H]).round()*this.options.snap[H]}.bind(this))}else{D=D.map(function(G){return(G/this.options.snap).round()*this.options.snap}.bind(this))}}}var B=this.element.style;if((!this.options.constraint)||(this.options.constraint=="horizontal")){B.left=D[0]+"px"}if((!this.options.constraint)||(this.options.constraint=="vertical")){B.top=D[1]+"px"}if(B.visibility=="hidden"){B.visibility=""}},stopScrolling:function(){if(this.scrollInterval){clearInterval(this.scrollInterval);this.scrollInterval=null;Draggables._lastScrollPointer=null}},startScrolling:function(A){if(!(A[0]||A[1])){return }this.scrollSpeed=[A[0]*this.options.scrollSpeed,A[1]*this.options.scrollSpeed];this.lastScrolled=new Date();this.scrollInterval=setInterval(this.scroll.bind(this),10)},scroll:function(){var current=new Date();var delta=current-this.lastScrolled;this.lastScrolled=current;if(this.options.scroll==window){with(this._getWindowScroll(this.options.scroll)){if(this.scrollSpeed[0]||this.scrollSpeed[1]){var d=delta/1000;this.options.scroll.scrollTo(left+d*this.scrollSpeed[0],top+d*this.scrollSpeed[1])}}}else{this.options.scroll.scrollLeft+=this.scrollSpeed[0]*delta/1000;this.options.scroll.scrollTop+=this.scrollSpeed[1]*delta/1000}Position.prepare();Droppables.show(Draggables._lastPointer,this.element);Draggables.notify("onDrag",this);if(this._isScrollChild){Draggables._lastScrollPointer=Draggables._lastScrollPointer||$A(Draggables._lastPointer);Draggables._lastScrollPointer[0]+=this.scrollSpeed[0]*delta/1000;Draggables._lastScrollPointer[1]+=this.scrollSpeed[1]*delta/1000;if(Draggables._lastScrollPointer[0]<0){Draggables._lastScrollPointer[0]=0}if(Draggables._lastScrollPointer[1]<0){Draggables._lastScrollPointer[1]=0}this.draw(Draggables._lastScrollPointer)}if(this.options.change){this.options.change(this)}},_getWindowScroll:function(w){var T,L,W,H;with(w.document){if(w.$$d.documentElement&&documentElement.scrollTop){T=documentElement.scrollTop;L=documentElement.scrollLeft}else{if(w.$$d.body){T=body.scrollTop;L=body.scrollLeft}}if(w.innerWidth){W=w.innerWidth;H=w.innerHeight}else{if(w.$$d.documentElement&&documentElement.clientWidth){W=documentElement.clientWidth;H=documentElement.clientHeight}else{W=body.offsetWidth;H=body.offsetHeight}}}return{top:T,left:L,width:W,height:H}}});Draggable._dragging={};var SortableObserver=Class.create({initialize:function(B,A){this.element=$(B);this.observer=A;this.lastValue=Sortable.serialize(this.element)},onStart:function(){this.lastValue=Sortable.serialize(this.element)},onEnd:function(){Sortable.unmark();if(this.lastValue!=Sortable.serialize(this.element)){this.observer(this.element)}}});var Sortable={SERIALIZE_RULE:/^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,sortables:{},_findRootElement:function(A){while(A.tagName.toUpperCase()!="BODY"){if(A.id&&Sortable.sortables[A.id]){return A}A=A.parentNode}},options:function(A){A=Sortable._findRootElement($(A));if(!A){return }return Sortable.sortables[A.id]},destroy:function(A){var B=Sortable.options(A);if(B){Draggables.removeObserver(B.element);B.droppables.each(function(C){Droppables.remove(C)});B.draggables.invoke("destroy");delete Sortable.sortables[B.element.id]}},create:function(C){C=$(C);var B=Object.extend({element:C,tag:"li",dropOnEmpty:false,tree:false,treeTag:"ul",overlap:"vertical",constraint:"vertical",containment:C,handle:false,only:false,delay:0,hoverclass:null,ghosting:false,quiet:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,format:this.SERIALIZE_RULE,elements:false,handles:false,onChange:Prototype.emptyFunction,onUpdate:Prototype.emptyFunction},arguments[1]||{});this.destroy(C);var A={revert:true,quiet:B.quiet,scroll:B.scroll,scrollSpeed:B.scrollSpeed,scrollSensitivity:B.scrollSensitivity,delay:B.delay,ghosting:B.ghosting,constraint:B.constraint,handle:B.handle};if(B.starteffect){A.starteffect=B.starteffect}if(B.reverteffect){A.reverteffect=B.reverteffect}else{if(B.ghosting){A.reverteffect=function(F){F.style.top=0;F.style.left=0}}}if(B.endeffect){A.endeffect=B.endeffect}if(B.zindex){A.zindex=B.zindex}var D={overlap:B.overlap,containment:B.containment,tree:B.tree,hoverclass:B.hoverclass,onHover:Sortable.onHover};var E={onHover:Sortable.onEmptyHover,overlap:B.overlap,containment:B.containment,hoverclass:B.hoverclass};Element.cleanWhitespace(C);B.draggables=[];B.droppables=[];if(B.dropOnEmpty||B.tree){Droppables.add(C,E);B.droppables.push(C)}(B.elements||this.findElements(C,B)||[]).each(function(H,F){var G=B.handles?$(B.handles[F]):(B.handle?$(H).select("."+B.handle)[0]:H);B.draggables.push(new Draggable(H,Object.extend(A,{handle:G})));Droppables.add(H,D);if(B.tree){H.treeNode=C}B.droppables.push(H)});if(B.tree){(Sortable.findTreeElements(C,B)||[]).each(function(F){Droppables.add(F,E);F.treeNode=C;B.droppables.push(F)})}this.sortables[C.id]=B;Draggables.addObserver(new SortableObserver(C,B.onUpdate))},findElements:function(B,A){return Element.findChildren(B,A.only,A.tree?true:false,A.tag)},findTreeElements:function(B,A){return Element.findChildren(B,A.only,A.tree?true:false,A.treeTag)},onHover:function(E,D,A){if(Element.isParent(D,E)){return }if(A>0.33&&A<0.66&&Sortable.options(D).tree){return }else{if(A>0.5){Sortable.mark(D,"before");if(D.previousSibling!=E){var B=E.parentNode;E.style.visibility="hidden";D.parentNode.insertBefore(E,D);if(D.parentNode!=B){Sortable.options(B).onChange(E)}Sortable.options(D.parentNode).onChange(E)}}else{Sortable.mark(D,"after");var C=D.nextSibling||null;if(C!=E){var B=E.parentNode;E.style.visibility="hidden";D.parentNode.insertBefore(E,C);if(D.parentNode!=B){Sortable.options(B).onChange(E)}Sortable.options(D.parentNode).onChange(E)}}}},onEmptyHover:function(E,G,H){var I=E.parentNode;var A=Sortable.options(G);if(!Element.isParent(G,E)){var F;var C=Sortable.findElements(G,{tag:A.tag,only:A.only});var B=null;if(C){var D=Element.offsetSize(G,A.overlap)*(1-H);for(F=0;F<C.length;F+=1){if(D-Element.offsetSize(C[F],A.overlap)>=0){D-=Element.offsetSize(C[F],A.overlap)}else{if(D-(Element.offsetSize(C[F],A.overlap)/2)>=0){B=F+1<C.length?C[F+1]:null;break}else{B=C[F];break}}}}G.insertBefore(E,B);Sortable.options(I).onChange(E);A.onChange(E)}},unmark:function(){if(Sortable._marker){Sortable._marker.hide()}},mark:function(B,A){var D=Sortable.options(B.parentNode);if(D&&!D.ghosting){return }if(!Sortable._marker){Sortable._marker=($("dropmarker")||Element.extend($$d.createElement("DIV"))).hide().addClassName("dropmarker").setStyle({position:"absolute"});$$d.getElementsByTagName("body").item(0).appendChild(Sortable._marker)}var C=Position.cumulativeOffset(B);Sortable._marker.setStyle({left:C[0]+"px",top:C[1]+"px"});if(A=="after"){if(D.overlap=="horizontal"){Sortable._marker.setStyle({left:(C[0]+B.clientWidth)+"px"})}else{Sortable._marker.setStyle({top:(C[1]+B.clientHeight)+"px"})}}Sortable._marker.show()},_tree:function(E,B,F){var D=Sortable.findElements(E,B)||[];for(var C=0;C<D.length;++C){var A=D[C].id.match(B.format);if(!A){continue}var G={id:encodeURIComponent(A?A[1]:null),element:E,parent:F,children:[],position:F.children.length,container:$(D[C]).down(B.treeTag)};if(G.container){this._tree(G.container,B,G)}F.children.push(G)}return F},tree:function(D){D=$(D);var C=this.options(D);var B=Object.extend({tag:C.tag,treeTag:C.treeTag,only:C.only,name:D.id,format:C.format},arguments[1]||{});var A={id:null,parent:null,children:[],container:D,position:0};return Sortable._tree(D,B,A)},_constructIndex:function(B){var A="";do{if(B.id){A="["+B.position+"]"+A}}while((B=B.parent)!=null);return A},sequence:function(B){B=$(B);var A=Object.extend(this.options(B),arguments[1]||{});return $(this.findElements(B,A)||[]).map(function(C){return C.id.match(A.format)?C.id.match(A.format)[1]:""})},setSequence:function(B,C){B=$(B);var A=Object.extend(this.options(B),arguments[2]||{});var D={};this.findElements(B,A).each(function(E){if(E.id.match(A.format)){D[E.id.match(A.format)[1]]=[E,E.parentNode]}E.parentNode.removeChild(E)});C.each(function(E){var F=D[E];if(F){F[1].appendChild(F[0]);delete D[E]}})},serialize:function(C){C=$(C);var B=Object.extend(Sortable.options(C),arguments[1]||{});var A=encodeURIComponent((arguments[1]&&arguments[1].name)?arguments[1].name:C.id);if(B.tree){return Sortable.tree(C,arguments[1]).children.map(function(D){return[A+Sortable._constructIndex(D)+"[id]="+encodeURIComponent(D.id)].concat(D.children.map(arguments.callee))}).flatten().join("&")}else{return Sortable.sequence(C,arguments[1]).map(function(D){return A+"[]="+encodeURIComponent(D)}).join("&")}}};Element.isParent=function(B,A){if(!B.parentNode||B==A){return false}if(B.parentNode==A){return true}return Element.isParent(B.parentNode,A)};Element.findChildren=function(D,B,A,C){if(!D.hasChildNodes()){return null}C=C.toUpperCase();if(B){B=[B].flatten()}var E=[];$A(D.childNodes).each(function(G){if(G.tagName&&G.tagName.toUpperCase()==C&&(!B||(Element.classNames(G).detect(function(H){return B.include(H)})))){E.push(G)}if(A){var F=Element.findChildren(G,B,A,C);if(F){E.push(F)}}});return(E.length>0?E.flatten():[])};Element.offsetSize=function(A,B){return A["offset"+((B=="vertical"||B=="height")?"Height":"Width")]};var Resizeable=Class.create();Resizeable.prototype={initialize:function(B){var A=Object.extend({top:6,bottom:6,left:6,right:6,minHeight:0,minWidth:0,zindex:1000,resize:null},arguments[1]||{});this.element=$(B);this.handle=this.element;Element.makePositioned(this.element);this.options=A;this.active=false;this.resizing=false;this.currentDirection="";this.eventMouseDown=this.startResize.bindAsEventListener(this);this.eventMouseUp=this.endResize.bindAsEventListener(this);this.eventMouseMove=this.update.bindAsEventListener(this);this.eventCursorCheck=this.cursor.bindAsEventListener(this);this.eventKeypress=this.keyPress.bindAsEventListener(this);this.registerEvents()},destroy:function(){Event.stopObserving(this.handle,"mousedown",this.eventMouseDown);this.unregisterEvents()},registerEvents:function(){Event.observe(document,"mouseup",this.eventMouseUp);Event.observe(document,"mousemove",this.eventMouseMove);Event.observe(document,"keypress",this.eventKeypress);Event.observe(this.handle,"mousedown",this.eventMouseDown);Event.observe(this.element,"mousemove",this.eventCursorCheck)},unregisterEvents:function(){},startResize:function(C){if(Event.isLeftClick(C)){var D=Event.element(C);if(D.tagName&&(D.tagName=="INPUT"||D.tagName=="SELECT"||D.tagName=="BUTTON"||D.tagName=="TEXTAREA")){return }var A=this.directions(C);if(A.length>0){this.active=true;var B=Position.cumulativeOffset(this.element);this.startTop=B[1];this.startLeft=B[0];this.startWidth=parseInt(Element.getStyle(this.element,"width"));this.startHeight=parseInt(Element.getStyle(this.element,"height"));this.startX=C.clientX+$$d.body.scrollLeft+$$d.documentElement.scrollLeft;this.startY=C.clientY+$$d.body.scrollTop+$$d.documentElement.scrollTop;this.currentDirection=A;Event.stop(C)}}},finishResize:function(A,B){this.active=false;this.resizing=false;if(this.options.zindex){this.element.style.zIndex=this.originalZ}if(this.options.resize){this.options.resize(this.element)}},keyPress:function(A){if(this.active){if(A.keyCode==Event.KEY_ESC){this.finishResize(A,false);Event.stop(A)}}},endResize:function(A){if(this.active&&this.resizing){this.finishResize(A,true);Event.stop(A)}this.active=false;this.resizing=false},draw:function(E){var G=[Event.pointerX(E),Event.pointerY(E)];var C=this.element.style;if(this.currentDirection.indexOf("n")!=-1){var B=this.startY-G[1];var F=Element.getStyle(this.element,"margin-top")||"0";var A=this.startHeight+B;if(A>this.options.minHeight){C.height=A+"px";C.top=(this.startTop-B-parseInt(F))+"px"}}if(this.currentDirection.indexOf("w")!=-1){var B=this.startX-G[0];var F=Element.getStyle(this.element,"margin-left")||"0";var D=this.startWidth+B;if(D>this.options.minWidth){C.left=(this.startLeft-B-parseInt(F))+"px";C.width=D+"px"}}if(this.currentDirection.indexOf("s")!=-1){var A=this.startHeight+G[1]-this.startY;if(A>this.options.minHeight){C.height=A+"px"}}if(this.currentDirection.indexOf("e")!=-1){var D=this.startWidth+G[0]-this.startX;if(D>this.options.minWidth){C.width=D+"px"}}if(C.visibility=="hidden"){C.visibility=""}},between:function(C,A,B){return(C>=A&&C<B)},directions:function(B){var D=[Event.pointerX(B),Event.pointerY(B)];var A=Position.cumulativeOffset(this.element);var C="";if(this.between(D[1]-A[1],0,this.options.top)){C+="n"}if(this.between((A[1]+this.element.offsetHeight)-D[1],0,this.options.bottom)){C+="s"}if(this.between(D[0]-A[0],0,this.options.left)){C+="w"}if(this.between((A[0]+this.element.offsetWidth)-D[0],0,this.options.right)){C+="e"}return C},cursor:function(A){var B=this.directions(A);if(B.length>0){B+="-resize"}else{B=""}this.element.style.cursor=B},update:function(B){if(this.active){if(!this.resizing){var A=this.element.style;this.resizing=true;if(Element.getStyle(this.element,"position")==""){A.position="relative"}if(this.options.zindex){this.originalZ=parseInt(Element.getStyle(this.element,"z-index")||0);A.zIndex=this.options.zindex}}this.draw(B);if($$n.appVersion.indexOf("AppleWebKit")>0){$$w.scrollBy(0,0)}Event.stop(B);return false}}};var Appcelerator={};Appcelerator.Util={};Appcelerator.Browser={};Appcelerator.Compiler={};Appcelerator.Config={};Appcelerator.Core={};Appcelerator.Localization={};Appcelerator.Validator={};Appcelerator.Decorator={};Appcelerator.Module={};$$AU=Appcelerator.Util;$$AC=Appcelerator.Compiler;$$AD=Appcelerator.Decorator;$$AL=Appcelerator.Localization;$$AM=Appcelerator.Module;$$AR=Appcelerator.Core;$$AV=Appcelerator.Validator;$$AF=Appcelerator.Config;$$AB=Appcelerator.Browser;Appcelerator.Version={major:parseInt("2"),minor:parseInt("0"),revision:parseInt("2"),toString:function(){return this.major+"."+this.minor+"."+this.revision}};Appcelerator.LicenseType="GNU Public License, version 2.0 (GPL)";Appcelerator.Copyright="Copyright (c) 2006-2007 by Appcelerator, Inc. All Rights Reserved.";Appcelerator.LicenseMessage="Appcelerator is licensed under "+Appcelerator.LicenseType;Appcelerator.Parameters=$H({});(function(){if($$w.AppceleratorConfig){Appcelerator.Config=$$w.AppceleratorConfig}else{Appcelerator.Config["cookie_check"]=false;Appcelerator.Config["browser_check"]=true;Appcelerator.Config["hide_body"]=false}var E=null;$A($$d.getElementsByTagName("script")).findAll(function(M){if(M.src&&M.src.match(/appcelerator(-debug){0,1}\.js(\?.*)?$/)){E=M.src;return true}return false}).each(function(M){Appcelerator.Parameters=$H(M.src.toQueryParams())});var L=$$w.$$d.location.href.lastIndexOf("/");if(L==$$w.$$d.location.href.length-1){Appcelerator.DocumentPath=$$w.$$d.location.href}else{Appcelerator.DocumentPath=$$w.$$d.location.href.substr(0,L);if(Appcelerator.DocumentPath.substring(Appcelerator.DocumentPath.length-1)!="/"){Appcelerator.DocumentPath=Appcelerator.DocumentPath+"/"}}if(E){L=E.lastIndexOf("/");E=E.substring(0,L);if(E!=Appcelerator.DocumentPath+"js"){L=E.lastIndexOf("/");var B=E.substring(0,L+1);if(B){Appcelerator.DocumentPath=B}}}else{Appcelerator.ScriptNotFound=true}Appcelerator.SciptPath=Appcelerator.DocumentPath+"js/";Appcelerator.ImagePath=Appcelerator.DocumentPath+"images/";Appcelerator.StylePath=Appcelerator.DocumentPath+"css/";Appcelerator.ContentPath=Appcelerator.DocumentPath+"content/";Appcelerator.ModulePath=Appcelerator.DocumentPath+"modules/";Appcelerator.Parameters.merge($$w.location.href.toQueryParams());if(Appcelerator.Parameters["instanceid"]){Appcelerator.instanceid=Appcelerator.Parameters["instanceid"]}else{Appcelerator.instanceid=Math.round(9999*Math.random())+"-"+Math.round(999*Math.random())}Appcelerator.TEMPLATE_VARS={rootPath:Appcelerator.DocumentPath,scriptPath:Appcelerator.ScriptPath,imagePath:Appcelerator.ImagePath,cssPath:Appcelerator.StylePath,contentPath:Appcelerator.DocumentPath+"content",modulePath:Appcelerator.DocumentPath+"modules",instanceid:Appcelerator.instanceid};var A=$$n.userAgent.toLowerCase();$$AB.isPreCompiler=(A.indexOf("Appcelerator Compiler")>-1);$$AB.isOpera=(A.indexOf("opera")>-1);$$AB.isSafari=(A.indexOf("safari")>-1);$$AB.isSafari2=false;$$AB.isIE=($$w.ActiveXObject);$$AB.isIE6=false;$$AB.isIE7=false;if($$AB.isIE){var H=$$n.appVersion.split("MSIE");var J=parseFloat(H[1]);$$AB.isIE6=J>=6&&J<7;$$AB.isIE7=J>=7&&J<8}if($$AB.isSafari){var C=RegExp("( applewebkit/)([^ ]+)").exec(A);if(C[2]>400&&C[2]<500){$$AB.isSafari2=true}}$$AB.isGecko=!$$AB.isSafari&&(A.indexOf("gecko")>-1);$$AB.isCamino=$$AB.isGecko&&A.indexOf("camino")>-1;$$AB.isFirefox=$$AB.isGecko&&(A.indexOf("firefox")>-1||A.indexOf("minefield")>-1||$$AB.isCamino);$$AB.isIPhone=$$AB.isSafari&&A.indexOf("iphone")>-1;$$AB.isMozilla=$$AB.isGecko&&A.indexOf("mozilla/")>-1;$$AB.isWebkit=$$AB.isMozilla&&$$AB.isGecko&&A.indexOf("applewebkit")>0;$$AB.isSeamonkey=$$AB.isMozilla&&A.indexOf("seamonkey")>-1;$$AB.isWindows=false;$$AB.isMac=false;$$AB.isLinux=false;$$AB.isSunOS=false;if(A.indexOf("windows")!=-1||A.indexOf("win32")!=-1){$$AB.isWindows=true}else{if(A.indexOf("macintosh")!=-1||A.indexOf("mac os x")!=-1){$$AB.isMac=true}else{if(A.indexOf("linux")!=-1){$$AB.isLinux=true}else{if(A.indexOf("sunos")!=-1){$$AB.isSunOS=true}}}}$$AB.isFlash=false;$$AB.flashVersion=0;if($$AB.isIE){try{var F=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");var G=F.GetVariable("$version");var L=G.indexOf(" ");var K=G.substring(L+1).split(",");var J=K[0];$$AB.flashVersion=parseInt(J);$$AB.isFlash=true}catch(I){}}else{var D=$$n.plugins&&$$n.plugins.length;if(D){D=$$n.plugins["Shockwave Flash"]||$$n.plugins["Shockwave Flash 2.0"];if(D){if(D.description){var G=D.description;$$AB.flashVersion=parseInt(G.charAt(G.indexOf(".")-1));$$AB.isFlash=true}else{$$AB.flashVersion=7;$$AB.isFlash=true}}}else{D=($$n.mimeTypes&&$$n.mimeTypes["application/x-shockwave-flash"]&&$$n.mimeTypes["application/x-shockwave-flash"].enabledPlugin)?$$n.mimeTypes["application/x-shockwave-flash"].enabledPlugin:0;if(D&&D.description){$$AB.isFlash=true;$$AB.flashVersion=parseInt(D.description.substring(D.description.indexOf(".")-1))}}}$$AB.isBrowserSupported=false;["Firefox","IE6","IE7","Safari","Camino","Opera","Webkit","Seamonkey"].each(function(M){if(Appcelerator.Browser["is"+M]===true){$$AB.isBrowserSupported=true;throw $break}});$$AB.unsupportedBrowserMessage="<h1>Browser Upgrade Required</h1><p>We're sorry, but your browser version is not supported by this application.</p><p>This application requires a modern browser, such as <a href='http://www.getfirefox.com'>Firefox 2.0+</a>, <a href='http://www.apple.com/safari/'>Safari 2.0+</a>, <a href='http://www.microsoft.com/windows/products/winfamily/ie/default.mspx'>Internet Explorer 6.0+</a> or <a href='http://www.opera.com'>Opera 9.0+</a>.</p><p>Your browser reported: <font face='courier'>"+A+"</font></p>";$$AB.upgradePath=Appcelerator.DocumentPath+"upgrade.html";$$AB.autocheckBrowserSupport=true;$$AB.autoReportStats=true})();$$AR.usedModules={};$$AR.modules=[];$$AR.fetching={};$$AR.HeadElement=$$d.getElementsByTagName("head")[0];$$AR.require=function(A,D){A=A.replace(":","_");$$AR.usedModules[A]=true;var B=$$AR.modules[A];if(!B){var C=Appcelerator.ModulePath+A+"/"+A+".js";$$AR.loadJS(C,D)}else{if(typeof D=="function"){D()}}};$$AR.loadJS=function(C,B){var D=$$AR.fetching[C];if(D){if(B){D.push(B)}return }if(B){$$AR.fetching[C]=[B]}var A=$$d.createElement("script");A.setAttribute("type","text/javascript");A.setAttribute("src",C);A.onerror=function(E){$E("Error loading "+C+"\n Exception: "+Object.getExceptionDetail(E))};$$AR.HeadElement.appendChild(A)};$$AR.widgets={};$$AR.widgets_css={};$$AR.loadModuleCSS=function(B,F){B=B.replace(":","_");var J=Appcelerator.ModulePath+B+"/css/"+F;var E=$$AR.widgets_css[J];if(!E){var I=$$d.createElement("link");I.setAttribute("type","text/css");I.setAttribute("rel","stylesheet");I.setAttribute("href",J);$$AC.setElementId(I,"css_"+B);var C=null;for(var H=0;H<$$AR.HeadElement.childNodes.length;H++){var D=$$AR.HeadElement.childNodes[H];if(D.nodeType==1&&D.nodeName=="LINK"){var A=D.getAttribute("href");var G=D.getAttribute("type");if(A&&G&&G.indexOf("css")>0){C=D;break}}}if(C){$$AR.HeadElement.insertBefore(I,C)}else{$$AR.HeadElement.appendChild(I)}$$AR.widgets_css[J]=B}};$$AR.registerModule=function(A,B){A=A.replace(":","_");$$AR.modules[A]=B;if(B.isWidget){var D=B.getWidgetName().toLowerCase();if($$AR.widgets[D]){throw"duplicate widget name detected: "+D}$$AR.widgets[D]=B}if(typeof (B.setPath)=="function"){var E=Appcelerator.ModulePath+A+"/";B.setPath(E)}if(B.onUnload){$$w.observe(window,"unload",B.onUnload)}var E=Appcelerator.ModulePath+A+"/"+A+".js";var C=$$AR.fetching[E];if(C){for(var F=0;F<C.length;F++){C[F]()}}delete $$AR.fetching[E]};if($$AB.isIE){$$AR.registerModuleWithJSInIE=function(D,F,H,A){var E=H[A];D=D.replace(":","_");var G=Appcelerator.ModulePath+D+"/js/"+E;var B=$$d.createElement("script");B.setAttribute("type","text/javascript");B.setAttribute("src",G);B.onerror=function(I){$E("Error loading "+G+"\n Exception: "+Object.getExceptionDetail(I))};var C=false;B.onreadystatechange=function(){switch(this.readyState){case"loaded":case"complete":break;default:return }if(C){return }C=true;this.onreadystatechange=null;A=A+1;if(A==H.length){$$AR.registerModule(D,F)}else{$$AR.registerModuleWithJSInIE(D,F,H,A)}};$$AR.HeadElement.appendChild(B)}}$$AR.registerModuleWithJS=function(B,D,C){if($$AB.isIE){$$AR.registerModuleWithJSInIE(B,D,C,0);return }var A={count:C.length};var I=function(){A.count--;if(A.count==0){$$AR.registerModule(B,D)}};for(var G=0;G<C.length;G++){var E=C[G];B=B.replace(":","_");var J=Appcelerator.ModulePath+B+"/js/"+E;var H=$$d.createElement("script");H.setAttribute("type","text/javascript");H.setAttribute("src",J);H.onerror=function(K){$E("Error loading "+J+"\n Exception: "+Object.getExceptionDetail(K))};if($$AB.isSafari2){setTimeout(function(){I()},1000)}else{var F=false;H.onload=I;H.onreadystatechange=function(){switch(this.readyState){case"loaded":case"complete":break;default:return }if(F){return }F=true;this.onreadystatechange=null;I()}}$$AR.HeadElement.appendChild(H)}};$$AR.onloaders=[];$$AR.onunloaders=[];$$AR.onload=function(A,B){if(B){$$AR.onloaders.unshift(A)}else{$$AR.onloaders.push(A)}};$$AR.onunload=function(A){$$AR.onunloaders.push(A)};$$AR.onloadInvoker=function(){var A=new Date().getTime();for(var B=0;B<$$AR.onloaders.length;B++){$$AR.onloaders[B]()}$$AR.onloaders=null;Logger.info("Appcelerator v"+Appcelerator.Version+" ... loaded in "+(new Date().getTime()-A)+" ms");Logger.info(Appcelerator.Copyright);Logger.info(Appcelerator.LicenseMessage);Logger.info("More App. Less Code.")};$$AR.onunloadInvoker=function(){for(var A=0;A<$$AR.onunloaders.length;A++){$$AR.onunloaders[A]()}$$AR.onunloaders=null};Event.observe(window,"load",$$AR.onloadInvoker);Event.observe(window,"unload",$$AR.onunloadInvoker);$$AR.onload(function(){if($$AB.autocheckBrowserSupport&&!$$AB.isBrowserSupported&&Appcelerator.Config["browser_check"]){$$d.body.style.display="none";try{new Ajax.Request($$AB.upgradePath,{asynchronous:true,method:"get",onFailure:function(B){$$d.open();$$d.write("<html><head><meta http-equiv='pragma' content='no-cache'></head><body>"+$$AB.unsupportedBrowserMessage+"</body></html>");$$d.close();$$d.body.style.display=""},onSuccess:function(B){$$d.open();$$d.write(B.responseText);$$d.close();$$d.body.style.display=""}})}catch(A){$$d.open();$$d.write("<html><head><meta http-equiv='pragma' content='no-cache'></head><body>"+$$AB.unsupportedBrowserMessage+"</body></html>");$$d.close();$$d.body.style.display=""}}});var APPCELERATOR_DEBUG=$$w.location.href.indexOf("debug=1")>0||Appcelerator.Parameters["debug"]=="1";var Logger=Class.create();var _logAppender=null;var _logEnabled=true;if(typeof (log4javascript)!="undefined"){log4javascript.setEnabled(APPCELERATOR_DEBUG);var _log=log4javascript.getLogger("main");if(APPCELERATOR_DEBUG){_logAppender=new log4javascript.PopUpAppender()}if(_logAppender!=null){var _popUpLayout=new log4javascript.PatternLayout("%d{HH:mm:ss} %-5p - %m%n");_logAppender.setLayout(_popUpLayout);_log.addAppender(_logAppender);_logAppender.setThreshold(APPCELERATOR_DEBUG?log4javascript.Level.DEBUG:log4javascript.Level.WARN)}Logger.infoEnabled=_logEnabled&&_logAppender;Logger.warnEnabled=_logEnabled&&_logAppender;Logger.errorEnabled=_logEnabled&&_logAppender;Logger.fatalEnabled=_logEnabled&&_logAppender;Logger.traceEnabled=_logEnabled&&APPCELERATOR_DEBUG&&_logAppender;Logger.debugEnabled=_logEnabled&&APPCELERATOR_DEBUG&&_logAppender}else{_logAppender=true;_logEnabled=_logEnabled&&typeof (console)!="undefined";_log={console:function(A,C){try{if(console&&console[A]){console[A](C)}}catch(B){}},debug:function(A){if(APPCELERATOR_DEBUG){this.console("debug",A)}},info:function(A){this.console("info",A)},error:function(A){this.console("error",A)},warn:function(A){this.console("warn",A)},trace:function(A){if(APPCELERATOR_DEBUG){this.console("debug",A)}},fatal:function(A){this.console("error",A)}};Logger.infoEnabled=_logEnabled&&console.info;Logger.warnEnabled=_logEnabled&&console.warn;Logger.errorEnabled=_logEnabled&&console.error;Logger.fatalEnabled=_logEnabled&&console.error;Logger.traceEnabled=_logEnabled&&APPCELERATOR_DEBUG&&console.debug;Logger.debugEnabled=_logEnabled&&APPCELERATOR_DEBUG&&console.debug}Logger.info=function(A){if(Logger.infoEnabled){_log.info(A)}};Logger.warn=function(A){if(Logger.warnEnabled){_log.warn(A)}};Logger.debug=function(A){if(Logger.debugEnabled){_log.debug(A)}};Logger.error=function(A){if(Logger.errorEnabled){_log.error(A)}};Logger.trace=function(A){if(Logger.traceEnabled){_log.trace(A)}};Logger.fatal=function(A){if(Logger.fatalEnabled){_log.fatal(A)}};function $D(){if(Logger.debugEnabled){var A=$A(arguments);var B=(A.length>1)?A.join(" "):A[0];Logger.debug(B)}}function $E(){if(Logger.errorEnabled){var A=$A(arguments);var B=(A.length>1)?A.join(" "):A[0];Logger.error(B)}}if(typeof err=="undefined"){var err={println:function(A){console.log(A)}}}if(typeof out=="undefined"){var out={println:function(A){console.log(A)}}}Object.extend(String.prototype,{trim:function(){return this.replace(/^\s+/g,"").replace(/\s+$/g,"")},startsWith:function(A){if(A.length<=this.length){return this.substring(0,A.length)==A}return false},toFunction:function(dontPreProcess){var str=this.trim();if(str.length==0){return Prototype.emptyFunction}if(!dontPreProcess){if(str.match(/^function\(/)){str="return "+String.unescapeXML(this)+"()"}else{if(!str.match(/return/)){str="return "+String.unescapeXML(this)}else{if(str.match(/^return function/)){str=String.unescapeXML(this)+" ();"}}}}var code="var f = function(){ var args = $A(arguments); "+str+"}; f;";var func=eval(code);if(typeof (func)=="function"){return func}throw Error("code was not a function: "+this)},toFunctionString:function(B){var C=this.trim();var A="var functionString_"+B+" = function(){ var args = $A(arguments); "+C+"}; functionString_"+B+"();";return A}});String.escapeXML=function(B){var C="";for(var D=0;D<B.length;D++){var A=B.charAt(D);if(A=='"'){C+="&quot;"}else{if(A=="&"){C+="&amp;"}else{if(A==">"){C+="&gt;"}else{if(A=="<"){C+="&lt;"}else{if(A=="'"){C+="&apos;"}else{C+=A}}}}}}return C};String.unescapeXML=function(B){if(!B){return null}var A=B.replace(/&lt;/g,"<");A=A.replace(/&gt;/g,">");A=A.replace(/&apos;/g,"'");A=A.replace(/&amp;/g,"&");A=A.replace(/&quot;/g,'"');return A};var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";String.prototype.encode64=function(){var C=this;var A="";var J,H,F;var I,G,E,D;var B=0;do{J=C.charCodeAt(B++);H=C.charCodeAt(B++);F=C.charCodeAt(B++);I=J>>2;G=((J&3)<<4)|(H>>4);E=((H&15)<<2)|(F>>6);D=F&63;if(isNaN(H)){E=D=64}else{if(isNaN(F)){D=64}}A=A+keyStr.charAt(I)+keyStr.charAt(G)+keyStr.charAt(E)+keyStr.charAt(D)}while(B<C.length);return A};String.prototype.decode64=function(){var A="";var J,H,F;var I,G,E,D;var B=0;var C=this;C=C.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{I=keyStr.indexOf(C.charAt(B++));G=keyStr.indexOf(C.charAt(B++));E=keyStr.indexOf(C.charAt(B++));D=keyStr.indexOf(C.charAt(B++));J=(I<<2)|(G>>4);H=((G&15)<<4)|(E>>2);F=((E&3)<<6)|D;A=A+String.fromCharCode(J);if(E!=64){A=A+String.fromCharCode(H)}if(D!=64){A=A+String.fromCharCode(F)}}while(B<C.length);return A};String.stringValue=function(A){if(A){return'"'+A.replace(/"/g,'\\"')+'"'}else{return null}};Object.setNestedProperty=function(E,G,D){var A=G.split(".");var F=E;var C=null;var B=null;A.each(function(H){B=H;if(F[H]){C=F;F=F[H]}else{C=F;F=F[H]={}}});C[B]=D;return E};Object.getNestedProperty=function(C,E,B){if(C!=null&&E!=null){var A=E.split(".");if(A.length!=-1){var D=C;A.each(function(F){if(null!=D[F]){D=D[F]}else{D=null;throw $break}});return D==null?B:D}else{return C[E]==null?B:C[E]}}return B};Object.copy=function(E,B){if(B){for(var D in B){var C=B[D];var A=typeof (C);switch(A){case"string":case"number":case"boolean":case"object":case"array":E[D]=C;break}}}return E};Object.evalWithinScope=function(code,scope){if(code=="{}"){return{}}var func=eval('var f = function(){return eval("('+code+')")}; f;');return func.call(scope)};Object.getExceptionDetail=function(D,C){if(!D){return"No Exception Object"}if(typeof (D)=="string"){return"message: "+D}if($$AB.isIE){return"message: "+D.message+", location: "+D.location||D.number||0}else{var B=0;try{B=D.lineNumber||0}catch(A){}return"message: "+(D.message||D)+", location: "+B+", stack: "+(C?"<code>":"")+(D.stack||"not specified")+(C?"</code>":"")}};$$AU.DateTime=Class.create();$$AU.DateTime={ONE_SECOND:1000,ONE_MINUTE:60000,ONE_HOUR:3600000,ONE_DAY:86400000,ONE_WEEK:604800000,ONE_MONTH:18748800000,ONE_YEAR:31536000000,timeFormat:function(C){var F="";var D=0;for(var G=0,A=C.length;G<A;G++){var B=C.charAt(G);switch(B){case",":case" ":F="";break;case"m":if(G+1<A){var E=C.charAt(G+1);if(E=="s"){D+=parseInt(F);G++}}else{D+=parseInt(F)*this.ONE_MINUTE}F="";break;case"s":D+=parseInt(F)*this.ONE_SECOND;F="";break;case"h":D+=parseInt(F)*this.ONE_HOUR;F="";break;case"d":D+=parseInt(F)*this.ONE_DAY;F="";break;case"w":D+=parseInt(F)*this.ONE_WEEK;F="";break;case"y":D+=parseInt(F)*this.ONE_YEAR;F="";break;default:F+=B;break}}if(F.length>0){D+=parseInt(F)}return D},getDurationNoFormat:function(E,B){B=B||new Date();var D=B.getTime()-E.getTime();var A=0;var C=0;var F=0;if(D>this.ONE_HOUR){A=Math.round(D/this.ONE_HOUR);D=D-(this.ONE_HOUR*A)}if(D==this.ONE_HOUR){A=1;D=D-this.ONE_HOUR}if(D>this.ONE_MINUTE){C=Math.round(D/this.ONE_MINUTE);D=D-(this.ONE_MINUTE*C)}if(D==this.ONE_MINUTE){C=1;D=D-this.ONE_MINUTE}if(D>this.ONE_SECOND){F=Math.round(D/this.ONE_SECOND);D=D-(this.ONE_SECOND*F)}if(D==this.ONE_SECOND){F=1}if(F<10){F="0"+F}if(A>0){return A+":"+C+":"+F}if(C>0){return C+":"+F}if(F>0){return"0:"+F}else{return":00"}},getDuration:function(C,A){A=A||new Date();var B=A.getTime()-C.getTime();return this.toDuration(B)},toDuration:function(B){B=B||0;if(B<0){return"0"}else{if(B<this.ONE_SECOND){var A=Math.round(B/this.ONE_SECOND);return A+" ms"}else{if(B==this.ONE_SECOND){return"1 second"}else{if(B<this.ONE_MINUTE){var A=Math.round(B/this.ONE_SECOND);return A+" second"+(A>1?"s":"")}}}}if(B==this.ONE_MINUTE){return"1 minute"}else{if(B==this.ONE_HOUR){return"1 hour"}else{if(B<this.ONE_HOUR){var A=Math.round(B/this.ONE_MINUTE);return A+" minute"+(A>1?"s":"")}else{if(B>this.ONE_HOUR&&B<this.ONE_DAY){var A=Math.round(B/this.ONE_HOUR);return A+" hour"+(A>1?"s":"")}else{if(B==this.ONE_DAY){return"1 day"}else{if(B>this.ONE_DAY&&B<this.ONE_YEAR){if(B>this.ONE_MONTH){var A=Math.round(B/this.ONE_MONTH);return A+" month"+(A>1?"s":"")}else{if(B>this.ONE_WEEK){var A=Math.round(B/this.ONE_WEEK);return A+" week"+(A>1?"s":"")}else{var A=Math.round(B/this.ONE_DAY);return A+" day"+(A>1?"s":"")}}}else{if(B==this.ONE_YEAR){return"1 year"}else{var A=Math.round(B/this.ONE_DAY);return A+" years"}}}}}}}},friendlyDiff:function(D,A,B){if(!D){return null}A=A||new Date();var E=A.getTime()-D.getTime();if(E<=this.ONE_MINUTE){if(B){return"a few secs ago"}return"a few seconds ago"}else{if(E<this.ONE_HOUR){var C=Math.round(E/this.ONE_MINUTE);if(C<10){if(B){return"a few mins ago"}return"a few minutes ago"}if(B){return C+" min"+(C>1?"s":"")+" ago"}return C+" minute"+(C>1?"s":"")+" ago"}else{if(E==this.ONE_HOUR){return"an hour ago"}else{if(E<this.ONE_DAY){var C=Math.round(E/this.ONE_HOUR);return C+" hour"+(C>1?"s":"")+" ago"}else{if(E==this.ONE_DAY){return"yesterday"}else{if(E>this.ONE_DAY&&E<this.ONE_YEAR){if(E>this.ONE_MONTH){var C=Math.round(E/this.ONE_MONTH);return C+" month"+(C>1?"s":"")+" ago"}else{if(E>this.ONE_WEEK){var C=Math.round(E/this.ONE_WEEK);return C+" week"+(C>1?"s":"")+" ago"}else{var C=Math.round(E/this.ONE_DAY);if(C==1){return"yesterday"}return C+" day"+(C>1?"s":"")+" ago"}}}else{if(E>this.ONE_YEAR){if(B){return">1 year ago"}return"more than a year ago"}}}}}}}return E},getMonthIntValue:function(A){switch(A){case"Jan":return 0;case"Feb":return 1;case"Mar":return 2;case"Apr":return 3;case"May":return 4;case"Jun":return 5;case"Jul":return 6;case"Aug":return 7;case"Sep":return 8;case"Oct":return 9;case"Nov":return 10;case"Dec":return 11}},intval:function(A){if(A){if(A.charAt(0)=="0"){A=A.substring(1)}return parseInt(A)}return 0},getFriendlyDate:function(B,C){var D=Object.extend({today:"",yesterday:"",past:"",lowercase:false},C||"");B=B||new Date();var A=typeof (B)=="string"?$$AU.DateTime.parseRFC2822Date(B):B;if($$AU.DateTime.isToday(A)){return D["today"]+$$AU.DateTime.get12HourTime(A)}else{if($$AU.DateTime.isYesterday(A)){return D["yesterday"]+(D["lowercase"]?"yesterday":"Yesterday")}}return D["past"]+A.getDay()+" "+$$AU.DateTime.getShortMonthName(A)},isToday:function(B){var A=new Date();return(A.getFullYear()==B.getFullYear()&&A.getMonth()==B.getMonth()&&A.getDay()==B.getDay())},isYesterday:function(B){var A=new Date();return(A.getFullYear()==B.getFullYear()&&A.getMonth()==B.getMonth()&&A.getDay()-1==B.getDay())},getShortMonthName:function(A){var B=A.getMonth();switch(B){case 0:return"Jan";case 1:return"Feb";case 2:return"Mar";case 3:return"Apr";case 4:return"May";case 5:return"Jun";case 6:return"Jul";case 7:return"Aug";case 8:return"Sep";case 9:return"Oct";case 10:return"Nov";case 11:return"Dec"}},get12HourTime:function(F,I,E){var B=F;if(B==null){B=new Date()}var D=B.getHours();var G=(D==0)?12:D;var H="AM";if(D>=12){G=(D==12)?12:(D-12);H="PM"}var C=B.getMinutes();var J=B.getSeconds();G+=":"+(C<10?"0":"")+C;if(I){G+=":"+(J<10?"0":"")+J}if(E){var A=B.getMilliseconds();G+="."+(A<10?"0":"")+A}G+=" "+H;return G},getShortDateTime:function(B){if(B&&typeof (B)=="string"){B=this.parseJavaDate(B)}var A=B||new Date();return this.getShortMonthName(A)+" "+A.getDate()+" "+this.get12HourTime(A)},parseInt:function(A){if(A){if(A.charAt(0)=="0"){return this.parseInt(A.substring(1))}return parseInt(A)}return 0},parseJavaDate:function(G){if(!G||G==""){return null}var H=parseInt(G.substring(0,4));var F=this.parseInt(G.substring(5,7))-1;var I=this.parseInt(G.substring(8,10));var D=this.parseInt(G.substring(11,13));var C=this.parseInt(G.substring(14,16));var A=this.parseInt(G.substring(17,19));var E=this.parseInt(G.substring(20));var B=new Date();B.setFullYear(H);B.setMonth(F);B.setDate(I);B.setHours(D);B.setMinutes(C);B.setSeconds(A);B.setMilliseconds(E);return B},parseRFC2822Date:function(G){var H=G.split(" ");var J=this.intval(H[1]);var F=H[2];var I=H[3];var L=H[4].split(":");var C=this.intval(L[0]);var D=this.intval(L[1]);var E=this.intval(L[2]);var B=this.intval(H[5].substring(0,3));var A=0;if(B<0){A=C-(B)}else{A=C+(B)}if(A>23){A=A-24;J+=1}else{if(A<0){A=24-A;J-=1}}var K=new Date();K.setUTCDate(J);K.setUTCMonth(this.getMonthIntValue(F));K.setUTCFullYear(I);K.setUTCHours(A,D,E);return K}};Appcelerator.ServerConfig={};$$AU.ServerConfig=Class.create();$$AU.ServerConfig.listeners=[];$$AU.ServerConfig.addConfigListener=function(A){if($$AU.ServerConfig.listeners){$$AU.ServerConfig.listeners.push(A)}else{A()}};$$AU.ServerConfig.load=function(){if($$w.location.href.indexOf("file:/")==-1){var A=Appcelerator.DocumentPath+"appcelerator.xml";new Ajax.Request(A,{asynchronous:true,method:"get",onSuccess:function(E){var F=E.responseXML.documentElement;var C=F.childNodes;for(var H=0;H<C.length;H++){var B=C[H];if(B.nodeType==$$AU.Dom.ELEMENT_NODE){var G=B.nodeName.toLowerCase();var D={};var J=$$AU.Dom.getText(B);var I=new Template(J,/(^|.|\r|\n)(@\{(.*?)\})/);D.path=I.evaluate(Appcelerator.TEMPLATE_VARS);D.value=D.path;$$AU.Dom.eachAttribute(B,function(L,K){D[L]=K},["id"],true);Appcelerator.ServerConfig[G]=D}}$$AU.ServerConfig.loadComplete()},onFailure:function(B){$E("Failed to load configuration from "+A);$$AU.ServerConfig.loadComplete()}})}else{$$AU.ServerConfig.loadComplete()}};$$AU.ServerConfig.loadComplete=function(){$$AU.ServerConfig.listeners.each(function(A){try{A()}catch(B){$E("error calling server config listener = "+A+", Exception = "+Object.getExceptionDetail(B))}});$$AU.ServerConfig.listeners=null};$$AR.onload($$AU.ServerConfig.load);$$AC.compileOnLoad=true;$$AC.isInterpretiveMode=true;$$AC.isCompiledMode=false;$$AC.compiledCode="";$$AC.compiledDocument=null;$$AC.compiledJS=null;$$AC.compiledAttributeListeners=[];$$AC.delayBeforeLoadingMessage=250;$$AC.POSITION_REMOVE=-1;$$AC.POSITION_REPLACE=0;$$AC.POSITION_TOP=1;$$AC.POSITION_BOTTOM=2;$$AC.POSITION_BEFORE=3;$$AC.POSITION_AFTER=4;$$AC.POSITION_BODY_TOP=5;$$AC.POSITION_BODY_BOTTOM=6;$$AC.POSITION_HEAD_TOP=7;$$AC.POSITION_HEAD_BOTTOM=8;$$AC.nextId=0;$$AC.functionId=1;$$AC.getAndEnsureId=function(A){if(!A.id){A.id=$$AC.generateId()}appCompilerIdCache[A.id]=A;return A.id};$$AC.setElementId=function(A,B){delete appCompilerIdCache[B];A.id=B;appCompilerIdCache[A.id]=A};$$AC.removeElementId=function(A){delete appCompilerIdCache[A]};function $(B){if(arguments.length>1){for(var A=0,D=[],C=arguments.length;A<C;A++){D.push($(arguments[A]))}return D}if(Object.isString(B)){var E=B;B=appCompilerIdCache[E];if(!B){B=$$d.getElementById(E)}}return Element.extend(B)}$$AC.generateId=function(){return"app_"+($$AC.nextId++)};$$AC.attributeProcessors={"*":[]};$$AC.registerAttributeProcessor=function(C,D,E){if(typeof C=="string"){C=C||"*";var B=$$AC.attributeProcessors[C];if(!B){B=[];$$AC.attributeProcessors[C]=B}B.push([D,E])}else{for(var G=0,A=C.length;G<A;G++){var F=C[G]||"*";var B=$$AC.attributeProcessors[F];if(!B){B=[];$$AC.attributeProcessors[F]=B}B.push([D,E])}}};$$AC.forwardToAttributeListener=function(C,H,G){for(var B=0;B<H.length;B++){var D=H[B];var A=D[0];var F=D[1];var E=C.getAttribute(A);if(E){if($$AC.isCompiledMode){$$AC.compiledAttributeListeners.push([C.id,A,G,B])}else{F.handle(C,A,E)}}}};$$AC.delegateToAttributeListeners=function(A){var B=$$AC.getTagname(A);var C=$$AC.attributeProcessors[B];if(C&&C.length>0){$$AC.forwardToAttributeListener(A,C,B)}C=$$AC.attributeProcessors["*"];if(C&&C.length>0){$$AC.forwardToAttributeListener(A,C,"*")}};$$AC.containerProcessors=[];$$AC.addContainerProcessor=function(A){$$AC.containerProcessors.push(A)};$$AC.removeContainerProcessor=function(A){$$AC.containerProcessors.remove(A)};$$AC.delegateToContainerProcessors=function(C,B){if($$AC.containerProcessors.length>0){for(var F=0,A=$$AC.containerProcessors.length;F<A;F++){var D=$$AC.containerProcessors[F];var E=D.process(C,B);if(E){B=E}}}return B};$$AC.automatedIDRegex=/^a[0-9]+$/;$$AC.checkLoadState=function(A){if(A.pending==0&&A.scanned){if(typeof (A.onfinish)=="function"){A.onfinish(code)}if(typeof (A.onafterfinish)=="function"){A.onafterfinish()}}};$$AC.dynamicCompile=function(A){setTimeout(function(){var B=$$AC.createCompilerState();$$AC.compileElement(A,B);B.scanned=true;$$AC.checkLoadState(B)},0)};$$AC.createCompilerState=function(){return{pending:0,code:"",scanned:false}};$$AC.onbeforecompileListeners=[];$$AC.oncompileListeners=[];$$AC.beforeDocumentCompile=function(A){$$AC.onbeforecompileListeners.push(A)};$$AC.afterDocumentCompile=function(A){$$AC.oncompileListeners.push(A)};$$AC.compileDocument=function(B){if($$AC.onbeforecompileListeners){for(var E=0;E<$$AC.onbeforecompileListeners.length;E++){$$AC.onbeforecompileListeners[E]()}delete $$AC.onbeforecompileListeners}var A=$$d.body;var D=A.style.visibility||"visible";if(Appcelerator.Config["hide_body"]){A.style.visibility="hidden"}if(!$$d.body.id||$$AC.automatedIDRegex.test($$d.body.id)){$$AC.setElementId($$d.body,"app_body")}var C=$$AC.createCompilerState();$$AC.compileElement(A,C);C.scanned=true;C.onafterfinish=function(F){setTimeout(function(){if(typeof (B)=="function"){B()}if(D!=A.style.visibility){A.style.visibility=D}$$AC.compileDocumentOnFinish()},0)};$$AC.checkLoadState(C)};$$AC.compileDocumentOnFinish=function(){if($$AC.oncompileListeners){for(var A=0;A<$$AC.oncompileListeners.length;A++){$$AC.oncompileListeners[A]()}delete $$AC.oncompileListeners}$MQ("l:app.compiled")};$$AC.compileInterceptors=[];$$AC.addCompilationInterceptor=function(A){$$AC.compileInterceptors.push(A)};$$AC.onPrecompile=function(B){if($$AC.compileInterceptors.length>0){for(var D=0,A=$$AC.compileInterceptors.length;D<A;D++){var C=$$AC.compileInterceptors[D];if(C.onPrecompile(B)==false){return false}}}return true};$$AC.compileElement=function(E,A){$$AC.getAndEnsureId(E);$$AC.determineScope(E);if(typeof (A)=="undefined"){throw"compileElement called without state for "+E.id}$$AC.onPrecompile(E);if($$AC.isInterpretiveMode){E.compiled=1}var J=E.getAttribute("compile")||"true";if(J=="false"){if($$AC.isCompiledMode){E.removeAttribute("compile")}return }var B=$$AC.getTagname(E);if(B.indexOf(":")>0){E.style.originalDisplay=E.style.display||"block";if($$AC.isCompiledMode){var H=$$AC.compileWidget(E,A);var C="(function()";C+="{";C+='$$AR.require("'+B+'",function()';C+="{"+H+"});";C+="})();";$$AC.compiledCode+=C}else{E.style.display="none";A.pending+=1;setTimeout(function(){$$AR.require(B,function(){$$AC.compileWidget(E,A);A.pending-=1;$$AC.checkLoadState(A)})},0)}}else{$$AC.delegateToAttributeListeners(E);var I=[];for(var F=0,D=E.childNodes.length;F<D;F++){I.push(E.childNodes[F])}for(var F=0,G=I.length;F<G;F++){if(I[F]&&I[F].nodeType==1){$$AC.compileElement(I[F],A)}}}};$$AC.destroy=function(C,B){B=B==null?true:B;if(C.trashcan&&C.trashcan.length>0){for(var F=0,A=C.trashcan.length;F<A;F++){try{C.trashcan[F]()}catch(E){}}try{delete C.trashcan;C.trashcan=null}catch(E){}}if(B){if(C.childNodes&&C.childNodes.length>0){for(var F=0,A=C.childNodes.length;F<A;F++){var D=C.childNodes[F];if(D&&D.nodeType&&D.nodeType==1){try{$$AC.destroy(D,true)}catch(E){}}}}}};$$AC.addTrash=function(B,A){if(!B.trashcan){B.trashcan=[]}B.trashcan.push(A)};$$AC.getJsonTemplateVar=function(A,D,B){var C=Object.getNestedProperty(A,D,B);if(typeof (C)=="object"){C=Object.toJSON(C);C=C.replace(/"/g,"&quot;")}return C};$$AC.templateRE=/#\{(.*?)\}/g;$$AC.compileTemplate=function(html,htmlonly,varname){varname=varname==null?"f":varname;var fn=function(m,name,format,args){return"', jtv(values,'"+name+"','#{"+name+"}'),'"};var body="var "+varname+" = function(values){ var jtv = $$AC.getJsonTemplateVar; return ['"+html.replace(/(\r\n|\n)/g,"").replace(/\t/g," ").replace(/'/g,"\\'").replace($$AC.templateRE,fn)+"'].join('');};"+(htmlonly?"":varname);var result=htmlonly?body:eval(body);return result};$$AC.tagNamespaces=[];if($$AB.isIE){$$AC.tagNamespaces.push("app")}else{for(var x=0;x<$$d.documentElement.attributes.length;x++){var attr=$$d.documentElement.attributes[x];var name=attr.name;var value=attr.value;var idx=name.indexOf(":");if(idx>0){$$AC.tagNamespaces.push(name.substring(idx+1))}}}$$AC.removeHtmlPrefix=function(A){if($$AB.isIE){A=A.gsub(/<\?xml:namespace(.*?)\/>/i,"")}return A.gsub(/html:/i,"").gsub(/><\/img>/i,"/>")};$$AC.specialMagicParseHtml=function(A,C){var B=A;for(var D=0;D<$$AC.tagNamespaces.length;D++){B=$$AC.specialMagicParseTagSet(B,$$AC.tagNamespaces[D])}return B};$$AC.specialMagicParseTagSet=function(G,H){var Q="<"+H+":";var E="</"+H+":";var N=G.indexOf(Q);if(N<0){return $$AC.removeHtmlPrefix(G)}var D=$$AC.removeHtmlPrefix(G.substring(0,N));var K=N+Q.length;var J=G.indexOf(">",K);var B=G.indexOf(" ",K);if(B<0||J<B){B=J}var C=G.substring(K,B);var P=E+C+">";while(true){var M=G.indexOf(P,K);var F=G.indexOf(">",K);var L=G.indexOf(">",M);var I=G.substring(F+1,M);var A=I.indexOf(Q+C);if(A!=-1){K=M+P.length;continue}var O=G.substring(N,M+P.length);if($$AB.isIE){O=$$AC.removeHtmlPrefix(O)}D+=O;break}D+=$$AC.specialMagicParseHtml(G.substring(L+1),H);return D};$$AC.copyAttributes=function(B,A){$$AU.Dom.eachAttribute(B,function(E,G,F,D,C){if(F){A.setAttribute(E,G)}},["style","class","id"])};$$AC.getHtml=function(B,C){C=(C==null)?true:C;var A=B.innerHTML||$$AU.Dom.getText(B);return $$AC.convertHtml(A,C)};$$AC.convertHtml=function(A,B){if(A.indexOf("#%7B")!=-1){A=A.gsub("#%7B","#{").gsub("%7D","}")}A=A.gsub(/\\\"/,"&quot;");if(B){return(A!=null)?$$AC.specialMagicParseHtml(A):""}else{return A}};$$AC.getWidgetHTML=function(A,B){return $$AC.getHtml(A,B)};$$AC.isHTMLTag=function(B){if($$AB.isIE){return B.scopeName=="HTML"||!B.tagUrn}var A=$$AC.getTagName(B,true);return !A.startsWith("app:")};$$AC.getTagname=function(A){if(!A){throw"element cannot be null"}if(A.nodeType!=1){throw"node: "+A.nodeName+" is not an element, was nodeType: "+A.nodeType+", type="+(typeof A)}if($$AB.isIE){if(A.scopeName&&A.tagUrn){return A.scopeName+":"+A.nodeName.toLowerCase()}}if($$AC.isInterpretiveMode){return A.nodeName.toLowerCase()}return String(A.nodeName.toLowerCase())};$$AC.addEventListener=function(C,D,E,B){var A=function(){var G=$A(arguments);$D("on "+C.id+"."+D+" => invoking action "+E);return E.apply({data:{}},G)};var F=B>0?(function(){var H=$A(arguments);var G=function(){return A.apply(A,H)};setTimeout(G,B)}):A;Event.observe(C,D,F,false);$$AC.addTrash(C,function(){Event.stopObserving(C,D,F)})};$$AC.installChangeListener=function(A,B){setTimeout(function(){var E=A.getAttribute("type")||"text";var D=$$AC.getTagname(A);if(D=="select"||D=="textarea"){E=D}switch(E){case"radio":case"checkbox":$$AC.addEventListener(A,"click",B);break;case"select":$$AC.addEventListener(A,"change",B);break;case"input":case"textarea":default:if($$AB.isIE){$$AC.addEventListener(A,"keyup",B);var C=function(){return $$AC.executeAfter(B,100)};$$AC.addEventListener(A,"paste",C)}else{if(E=="file"){$$AC.addEventListener(A,"change",B)}else{if($$AB.isSafari&&E=="textarea"){$$AC.addEventListener(A,"keyup",B)}else{$$AC.addEventListener(A,"keyup",B)}}}break}},0)};$$AC.ElementFunctions={};$$AC.getFunction=function(C,A){var E=(typeof C=="string")?C:C.id;var B=E+"_"+A;var D=$$AC.ElementFunctions[B];if(D){return D}C=$(E);if(C){return C[A]}return null};$$AC.attachFunction=function(C,A,D){var E=(typeof C=="string")?C:C.id;var B=E+"_"+A;$$AC.ElementFunctions[B]=D};$$AC.executeFunction=function(D,B,A,G){G=(G==null)?false:G;A=(A==null)?[]:A;var H=(typeof D=="string")?D:D.id;D=$(H);var C=H+"_"+B;var E=$$AC.ElementFunctions[C];if(E){switch(A.length){case 0:return E();case 1:return E(A[0]);case 2:return E(A[0],A[1]);case 3:return E(A[0],A[1],A[2]);case 4:return E(A[0],A[1],A[2],A[3]);case 5:return E(A[0],A[1],A[2],A[3],A[4]);case 6:return E(A[0],A[1],A[2],A[3],A[4],A[5]);case 7:return E(A[0],A[1],A[2],A[3],A[4],A[5],A[6]);default:throw"too many arguments - only 8 supported currently for method: "+B+", you invoked with "+A.length+", args was: "+Object.toJSON(A)}}if(D){var E=D[B];var F=typeof (E);if(E&&(F=="function"||($$AB.isIE&&F=="object"))){return D[B]()}}else{if(G){throw"element with ID: "+H+" doesn't have a function named: "+B}}};$$AC.compileWidget=function(D,H){var Y=$$AC.getTagname(D);var C=$$AR.widgets[Y];var M="";if(C){if($$AC.isInterpretiveMode&&C.flashRequired){var G=C.flashVersion||9;var S=null;if(!$$AB.isFlash){S="Flash version "+G+" or greater is required"}else{if($$AB.flashVersion<G){S="Flash version "+G+" or greater is required. Your version is: "+$$AB.flashVersion}}if(S){S=S+'. <a href="http://www.adobe.com/products/flashplayer/" target="_NEW">Download Flash Now</a>';var L='<div class="flash_error" style="border:1px solid #c00;padding:5px;background-color:#fcc;text-align:center;margin:5px;">'+S+"</div>";new Insertion.Before(D,L);Element.remove(D);return }}var Q=$$AC.getAndEnsureId(D);var N=C.getAttributes();var V={};for(var T=0;T<N.length;T++){var S=false;(function(){var Z=N[T];var a=D.getAttribute(Z.name)||Z.defaultValue;if(!a&&!Z.optional){$$AC.handleElementException(D,null,'required attribute "'+Z.name+'" not defined for '+Q);S=true}V[Z.name]=a})();if(S){return }}V["id"]=Q;var P=null;if(C.getActions){P=C.getActions();for(var W=0;W<P.length;W++){$$AC.buildCustomAction(P[W])}}if(!$$AC.isCompiledMode){if(C.dontParseOnAttributes){if(!C.dontParseOnAttributes()){$$AC.parseOnAttribute(D)}}else{$$AC.parseOnAttribute(D)}}var B=null;try{B=C.buildWidget(D,V,H)}catch(R){$$AC.handleElementException(D,R,"building widget "+D.id);return }if(D.id!=Q){$$AC.removeElementId(Q);Q=D.id}var J=false;if(B){var X=B.position||$$AC.POSITION_REPLACE;var U=X==$$AC.POSITION_REMOVE;if(!U){var L=B.presentation;if(L!=null){$$AC.setElementId(D,Q+"_widget");L='<div id="'+Q+'_temp" style="margin:0;padding:0;display:none">'+L+"</div>";if($$AB.isIE){L='<?xml:namespace prefix = app ns = "http://www.appcelerator.org" /> '+L}J=true;switch(X){case $$AC.POSITION_REPLACE:new Insertion.Before(D,L);U=true;break;case $$AC.POSITION_TOP:new Insertion.Top(D,L);break;case $$AC.POSITION_BOTTOM:new Insertion.Bottom(D,L);break;case $$AC.POSITION_BEFORE:new Insertion.Before(D,L);break;case $$AC.POSITION_AFTER:new Insertion.After(D,L);break;case $$AC.POSITION_BODY_TOP:new Insertion.Top($$d.body,L);break;case $$AC.POSITION_BODY_BOTTOM:new Insertion.Bottom($$d.body,L);break;case $$AC.POSITION_HEAD_TOP:new Insertion.Top($$AR.HeadElement,L);break;case $$AC.POSITION_HEAD_BOTTOM:new Insertion.Bottom($$AR.HeadElement,L);break}}}var A=null;if(J){A=$(Q+"_temp");if(!A){A=D.ownerDocument.getElementById(Q+"_temp")}$$AC.delegateToContainerProcessors(D,A)}var K=Q;if(U){if($$AC.isCompiledMode){K=$$AC.generateId();var I='<div id="'+K+'" '+$$AU.Dom.getAttributesString(D,["style","id"])+' style="margin:0;padding:0;display:none"/>';new Insertion.Before(D,I);M+='$$AC.parseOnAttribute($("'+K+'"));'}$$AC.removeElementId(Q);Element.remove(D)}if(J&&A&&!$(Q)){$$AC.setElementId(A,Q)}if(P){for(var W=0;W<P.length;W++){var F=P[W];var E=C[F];if(!E){throw"couldn't find method named: "+F+" for module = "+C}if($$AC.isCompiledMode){var O=Object.toJSON(V).gsub('\\\\\\"','\\\\\\"').gsub("\\'","\\'");M+="(function(){ var f = function(id,m,data,scope)";M+="{";M+="try";M+="{";M+='var module = $$AR.widgets["'+Y+'"];';M+='var method = module["'+F+'"];';M+='method("'+Q+"\",'"+O+"'.evalJSON(),data,scope);";M+="}";M+="catch (e) {";M+='$E("Error executing '+F+" in module "+C.toString()+'. Error "+Object.getExceptionDetail(e)+", stack="+e.stack);';M+="}";M+="};";M+='$$AC.attachFunction("'+K+'","'+F+'",f);})();'}else{(function(){var b=P[W];var Z=C[F];var a=function(k,d,h,g){try{Z(k,V,h,g)}catch(j){$E("Error executing "+b+" in module "+C.toString()+". Error "+Object.getExceptionDetail(j)+", stack="+j.stack)}};$$AC.attachFunction(Q,b,a)})()}}}if(B.compile){if($$AC.isCompiledMode){var O=Object.toJSON(V).gsub('\\\\\\"','\\\\\\"').gsub("\\'","\\'");M+="(function(){try";M+="{";M+='var module = $$AR.widgets["'+Y+'"];';if(A){M+="module.compileWidget('"+O+"'.evalJSON(),$(\""+A.id+'"));'}else{M+="module.compileWidget('"+O+"'.evalJSON(),null);"}M+="}";M+="catch (exxx) {";M+='$$AC.handleElementException($("'+Q+'"), exxx, "compiling widget '+Q+", type "+D.nodeName+'");';M+="return;";M+="}})();"}else{try{C.compileWidget(V,A)}catch(R){$$AC.handleElementException($(Q),R,"compiling widget "+Q+", type "+D.nodeName);return }}}if(J&&B.wire&&A){if($$AC.isCompiledMode){M+='$$AC.dynamicCompile($("'+A+'"));'}else{$$AC.compileElement(A,H)}}if($$AC.isCompiledMode){M+="$$AB.fixImageIssues();"}else{$$AB.fixImageIssues()}if(A){A.style.display=""}}}else{if(D.style&&D.style.display!=D.style.originalDisplay){D.style.display=D.style.originalDisplay}}return M};$$AC.determineScope=function(A){var B=A.getAttribute("scope");if(!B){var C=A.parentNode;if(C){B=C.scope}if(!B){B="appcelerator"}}if($$AC.isCompiledMode){$$AC.scopeMap[A.id]=B}A.scope=B};$$AC.parseOnAttribute=function(B){var A=B.getAttribute("on");if(A){$$AC.compileExpression(B,A,false);return true}return false};$$AC.parseExpression=function(K){K=K.gsub("\n"," ");K=K.gsub("\r"," ");K=K.gsub("\t"," ");K=K.trim();var U=[];var N=$$AC.smartSplit(K," or ");for(var R=0,P=N.length;R<P;R++){var J=N[R].trim();var I=J.indexOf(" then ");if(I<=0){throw"syntax error: expected 'then' for expression: "+J}var O=J.substring(0,I);var E=null;var M=J.substring(I+6);var D=-1;if(M.indexOf("[")){var G=$$AC.smartSplit(M,"else");if(G.length>1){D=G[0].length}else{D=G[0].length+1}}else{D=M.indexOf("else")}var T=5;if(D==-1){D=M.indexOf("otherwise");T=10}var L=null;if(D>0){L=M.substring(0,D-1);E=M.substring(D+T)}else{L=M}var A=E||L;var H=null;var Q=A.indexOf(" if expr[");if(Q!=-1){var V=A.substring(Q+9);var B=V.indexOf("]");if(B==-1){throw"error in if expression, missing end parenthesis at: "+L}H=V.substring(0,B);if(E){E=A.substring(0,Q)}else{L=A.substring(0,Q)}A=V.substring(B+2)}var S=0;var C=A.indexOf("after ");if(C!=-1){var F=A.substring(C+6);S=$$AU.DateTime.timeFormat(F);if(!H){if(E){E=A.substring(0,C-1)}else{L=A.substring(0,C-1)}}}U.push([null,O,L,E,S,H])}return U};$$AC.compileExpression=function(C,D,A){var G=$$AC.parseExpression(D);for(var B=0;B<G.length;B++){var F=G[B];$D("compiling condition=["+F[1]+"], action=["+F[2]+"], elseAction=["+F[3]+"], delay=["+F[4]+"], ifCond=["+F[5]+"]");F[0]=C;var E=$$AC.handleCondition.apply(this,F);if(!E){throw"syntax error: unknown condition type: "+F[1]+" for "+D}}};$$AC.customConditions=[];$$AC.registerCustomCondition=function(A){$$AC.customConditions.push(A)};$$AC.handleCondition=function(F,A,D,I,G,E){for(var H=0;H<$$AC.customConditions.length;H++){var B=$$AC.customConditions[H];var C=B.apply(B,[F,A,D,I,G,E]);if(C){return true}}return false};$$AC.parameterRE=/(.*?)\[(.*)?\]/i;$$AC.expressionRE=/^expr\((.*?)\)$/;$$AC.customActions={};$$AC.registerCustomAction=function(A,C){var B={build:function(G,E,F){var D="try {";D+=C.build(G,E,F);D+="; ";D+='$$AC.publishEvent("'+G+'","'+E+'");';D+="}";D+="catch(exxx){";D+='$$AC.handleElementException($("'+G+'"),exxx,"Executing:'+E+'");';D+="}";return D}};if(C.parseParameters){B.parseParameters=C.parseParameters}$$AC.customActions[A]=B};$$AC.properCase=function(A){return A.charAt(0).toUpperCase()+A.substring(1)};$$AC.smartSplit=function(C,B){var E=C.split(B);if(E.length==1){return E}var G=[];var D=null;for(var F=0;F<E.length;F++){var A=E[F];if(!D&&A.indexOf("[")>=0&&A.indexOf("]")==-1){if(D){D+=B+A}else{D=A}}else{if(D&&A.indexOf("]")==-1){D+=B+A}else{if(D){G.push(D+B+A);D=null}else{G.push(A)}}}}return G};$$AC.makeConditionalAction=function(E,D,C,A){var B=null;if(C){B="if ("+C+") { "+$$AC.makeAction(E,D,A)+" } "}else{B=$$AC.makeAction(E,D,A)}return B.toFunction(true)};$$AC.makeAction=function(B,P,C){var J="";var H=$$AC.smartSplit(P," and ");for(var N=0,M=H.length;N<M;N++){var O=H[N].trim();var I=O.startsWith("remote:")||O.startsWith("r:");var E=!I&&(O.startsWith("local:")||O.startsWith("l:"));var D=$$AC.parameterRE.exec(O);var G=D!=null?$$AC.getParameters(D[2],(I||E)):null;var F=D!=null?D[1]:O;if(E||I){G=(G||{});if(E&&G["id"]==null){G["id"]=B}if(C){for(var A in C){G[A]=C[A]}}J+='$$AC.fireServiceBrokerMessage("'+B+'","'+F+'",'+Object.toJSON(G)+", this);"}else{var K=$$AC.customActions[F];if(!K){throw"syntax error: unknown action: "+F+" for "+B}var L=K.parseParameters;if(L&&typeof (L)=="function"){G=L(B,F,D?D[2]||O:O)}J+=K.build(B,F,G)}if(N+1<M){J+="; "}}return J};$$AC.convertMessageType=function(A){return A.replace(/^r:/,"remote:").replace(/^l:/,"local:")};$$AC.getMessageType=function(B){var A=$$AC.parameterRE.exec(B);return $$AC.convertMessageType(A&&A.length>0?A[1]:B)};$$AC.fireServiceBrokerMessage=function(D,B,A,C){setTimeout(function(){var I=A||{};var J=$(D);var Q=null;var P=null;if(J){Q=J.getAttribute("fieldset");P=J.scope}for(var F in I){I[F]=$$AC.getEvaluatedValue(I[F],I,C)}var N=B.startsWith("local:")||B.startsWith("l:");if(Q){var K=$$AC.fieldSets[Q];if(K&&K.length>0){for(var M=0,L=K.length;M<L;M++){var H=K[M];var O=$(H);var E=O.name||H;if(null==I[E]){if(O.type=="radio"&&!O.checked){continue}var G=$$AC.getInputFieldValue(O,true,N);var R=typeof (G);if(G!=null&&R=="object"||G.length>0||R=="boolean"){I[E]=G}else{I[E]=""}}}}}if(N&&I["id"]==null){I["id"]=D}if(!P||P=="*"){P="appcelerator"}$MQ(B,I,P)},0)};$$AC.getElementValue=function(A,B){A=$(A);B=(B==null)?true:B;switch($$AC.getTagname(A)){case"input":return $$AC.getInputFieldValue(A,true);case"img":return A.src;case"form":return"";default:if(A.value!=undefined){return A.value}return A.innerHTML}};$$AC.getInputFieldValue=function(F,H,C){C=C==null?true:C;H=(H==null)?false:H;var D=F.getAttribute("type")||"text";var B=Form.Element.Methods.getValue(F);switch(D){case"checkbox":return(B=="on"||B=="checked");case"password":if(!C){var A=F.getAttribute("hash");if(A){var E="";A.split(",").each(function(J){var I=$(A);if(I){E+=$$AC.getInputFieldValue(I,false,true)}});var G=$$AU.MD5.hex_md5(B+E);return{"hash":G,"auth":$$AU.MD5.hex_md5(G+$$AU.Cookie.GetCookie("appcelerator-auth"))}}}}return $$AC.formatValue(B,!H)};$$AC.getKeyValue=function(A){if(!A){return null}if(A.charAt(0)=="$"){return A}else{if($$AC.expressionRE.test(A)){return A}}return $$AC.formatValue(A,false)};$$AC.getEvaluatedValue=function(G,D,H){if(G&&typeof (G)=="string"){if(G.charAt(0)=="$"){var C=G.substring(1);var A=$(C);if(A){return $$AC.getElementValue(A,true)}}else{var E=$$AC.expressionRE.exec(G);if(E){var F=E[1];var B=F.toFunction();return B.call(D)}if(H){var I=Object.getNestedProperty(H,G,null);if(I){return I}}if(D){return Object.getNestedProperty(D,G,G)}}}return G};$$AC.formatValue=function(C,A){A=(A==null)?true:A;if(C!=null){var B=typeof (C);if(B=="boolean"||B=="array"||B=="object"){return C}if(C=="true"||C=="false"){return C=="true"}if(C.charAt(0)=="'"&&A){return C}if(C.charAt(0)=='"'){C=C.substring(1,C.length-1)}if(A){return"'"+C+"'"}return C}return""};$$AC.dequote=function(A){if(A&&typeof A=="string"){if(A.charAt(0)=="'"||A.charAt(0)=='"'){A=A.substring(1)}if(A.charAt(A.length-1)=="'"||A.charAt(A.length-1)=='"'){A=A.substring(0,A.length-1)}}return A};$$AC.convertInt=function(A){if(A.charAt(0)=="0"){if(A.length==1){return 0}return $$AC.convertInt(A.substring(1))}return parseInt(A)};$$AC.convertFloat=function(A){return parseFloat(A)};$$AC.numberRe=/^[-+]{0,1}[0-9]+$/;$$AC.floatRe=/^[0-9]*[\.][0-9]*[f]{0,1}$/;$$AC.booleanRe=/^(true|false)$/;$$AC.quotedRe=/^['"]{1}|['"]{1}$/;$$AC.jsonRe=/^\{(.*)?\}$/;var STATE_LOOKING_FOR_VARIABLE_BEGIN=0;var STATE_LOOKING_FOR_VARIABLE_END=1;var STATE_LOOKING_FOR_VARIABLE_VALUE_MARKER=2;var STATE_LOOKING_FOR_VALUE_BEGIN=3;var STATE_LOOKING_FOR_VALUE_END=4;var STATE_LOOKING_FOR_VALUE_AS_JSON_END=5;$$AC.decodeParameterValue=function(C,B){var E=null;if(C!=null&&C.length>0&&!B){var A=$$AC.jsonRe.exec(C);if(A){E=String(A[0]).evalJSON()}if(!E){var D=$$AC.quotedRe.test(C);if(D){E=$$AC.dequote(C)}else{if($$AC.floatRe.test(C)){E=$$AC.convertFloat(C)}else{if($$AC.numberRe.test(C)){E=$$AC.convertInt(C)}else{if($$AC.booleanRe.test(C)){E=(C=="true")}else{E=C}}}}}}if(C=="null"||E=="null"){return null}return E==null?C:E};$$AC.parameterSeparatorRE=/[=:]+/;$$AC.getParameters=function(K,L){if(K==null||K.length==0){return L?{}:[]}if(!$$AC.parameterSeparatorRE.test(K)){if(L){return{key:K,value:null}}else{return[{key:K,value:null}]}}var C=0;var G="";var M=null;var E=L?{}:[];var B=false,I=false;for(var J=0,H=K.length;J<H;J++){var A=K.charAt(J);var D=true;switch(A){case'"':case"'":switch(C){case STATE_LOOKING_FOR_VARIABLE_BEGIN:quoted=true;D=false;C=STATE_LOOKING_FOR_VARIABLE_END;B=A=='"';I=A=="'";break;case STATE_LOOKING_FOR_VARIABLE_END:var F=K.charAt(J-1);if(B&&A=="'"||I&&A=='"'){}else{if(F!="\\"){C=STATE_LOOKING_FOR_VARIABLE_VALUE_MARKER;D=false;M=G.trim();G=""}}break;case STATE_LOOKING_FOR_VALUE_BEGIN:D=false;B=A=='"';I=A=="'";C=STATE_LOOKING_FOR_VALUE_END;break;case STATE_LOOKING_FOR_VALUE_END:var F=K.charAt(J-1);if(B&&A=="'"||I&&A=='"'){}else{if(F!="\\"){C=STATE_LOOKING_FOR_VARIABLE_BEGIN;D=false;if(L){E[M]=$$AC.decodeParameterValue(G,B||I)}else{E.push({key:M,value:$$AC.decodeParameterValue(G,B||I)})}M=null;B=false,I=false;G=""}}break}break;case"=":case":":switch(C){case STATE_LOOKING_FOR_VARIABLE_END:D=false;C=STATE_LOOKING_FOR_VALUE_BEGIN;M=G.trim();G="";break;case STATE_LOOKING_FOR_VARIABLE_VALUE_MARKER:D=false;C=STATE_LOOKING_FOR_VALUE_BEGIN;break}break;case",":switch(C){case STATE_LOOKING_FOR_VARIABLE_BEGIN:D=false;C=STATE_LOOKING_FOR_VARIABLE_BEGIN;break;case STATE_LOOKING_FOR_VALUE_END:if(!B&&!I){C=STATE_LOOKING_FOR_VARIABLE_BEGIN;D=false;if(L){E[M]=$$AC.decodeParameterValue(G,B||I)}else{E.push({key:M,value:$$AC.decodeParameterValue(G,B||I)})}M=null;B=false,I=false;G=""}break}break;case" ":break;case"\n":case"\t":case"\r":D=false;break;case"{":switch(C){case STATE_LOOKING_FOR_VALUE_BEGIN:C=STATE_LOOKING_FOR_VALUE_AS_JSON_END}break;case"}":if(C==STATE_LOOKING_FOR_VALUE_AS_JSON_END){C=STATE_LOOKING_FOR_VARIABLE_BEGIN;D=false;G+="}";if(L){E[M]=$$AC.decodeParameterValue(G,B||I)}else{E.push({key:M,value:$$AC.decodeParameterValue(G,B||I)})}M=null;B=false,I=false;G=""}break;default:switch(C){case STATE_LOOKING_FOR_VARIABLE_BEGIN:C=STATE_LOOKING_FOR_VARIABLE_END;break;case STATE_LOOKING_FOR_VALUE_BEGIN:C=STATE_LOOKING_FOR_VALUE_END;break}}if(D){G+=A}if(J+1==H&&M){G=G.strip();if(L){E[M]=$$AC.decodeParameterValue(G,B||I)}else{E.push({key:M,value:$$AC.decodeParameterValue(G,B||I)})}}}return E};$$AC.publishEvent=function(A,B){};$$AC.executeAfter=function(D,A,B){var C=(B!=null)?function(){D.call(B)}:D;if(A>0){setTimeout(C,A)}else{C()}};$$AC.handleElementException=function(C,F,B){var E=false;if(!C){var H=$$AC.generateId();new Insertion.Bottom($$d.body,'<div id="'+H+'"></div>');E=true;C=$(H)}var A=C?$$AC.getTagname(C):$$d.body;var G="<strong>Appcelerator Processing Error:</strong><div>Element ("+A+") with ID: "+(C.id||C)+" has an exception: <div>"+Object.getExceptionDetail(F,true)+"</div><div>in <code>"+(B||"unknown")+"</code></div></div>";$E(G);switch(A){case"input":case"textbox":C.value=C.id;E=true;break;case"select":C.options.length=0;C.options[0]=new Option(C.id,C.id);E=true;break;case"img":C.src=Appcelerator.ImagePath+"/warning.png";E=true;break;case"a":$$AC.setHTML(C,C.id);E=true;break;case"script":E=true;break}if(A.indexOf(":")>0){E=true}if(E){$$AC.removeElementId(H);Element.remove(C);var H=$$AC.generateId();new Insertion.Bottom($$d.body,'<div style="2px dotted #900"><img src="'+Appcelerator.ImagePath+'warning.png"/> <span id="'+H+'"></span></div>');C=$(H);var D=C.parentNode;D.style.display="block";D.style.visibility="visible";D.style.color="black";D.style.margin="0px auto";D.style.padding="5px";D.style.border="1px solid #c00";D.style.zIndex="9999";D.style.opacity="1.0";D.style.backgroundColor="#fcc"}$$AC.setHTML(C,G)};$$AC.fieldSets={};$$AC.addFieldSet=function(C,D){D=(D==null)?false:D;var B=C.getAttribute("fieldset");if(B){var A=$$AC.fieldSets[B];if(!A){A=[];$$AC.fieldSets[B]=A}if(false==D){$D("adding = "+C.id+" to field = "+B+", values="+Object.toJSON(A));A.push(C.id)}return A}return null};$$AC.CSSAttributes=["color","cursor","font","font-family","font-weight","border","border-right","border-bottom","border-left","border-top","border-color","border-style","border-width","background","background-color","background-attachment","background-position","position","display","visibility","overflow","opacity","filter","top","left","right","bottom","width","height","margin","margin-left","margin-right","margin-bottom","margin-top","padding","padding-left","padding-right","padding-bottom","padding-top"];$$AC.isCSSAttribute=function(C){if(C=="style"){return true}for(var F=0,A=$$AC.CSSAttributes.length;F<A;F++){if($$AC.CSSAttributes[F]==C){return true}var D=$$AC.CSSAttributes[F];var B=D.indexOf("-");if(B>0){var E=D.substring(0,B)+D.substring(B+1).capitalize();if(E==C){return true}}}return false};$$AC.convertCSSAttribute=function(B){var A=B.indexOf("-");if(A>0){var C=B.substring(0,A)+B.substring(A+1).capitalize();return C}return B};$$AU.ServerConfig.addConfigListener(function(){if($$AC.compileOnLoad){for(var B in Event.Methods){delete Object.prototype[B]}var A;if($$AC.isCompiledMode){A=$$AU.ServerConfig.outputCompiledDocument}else{A=Prototype.K}$$AC.compileDocument(A)}});$$AU.ServerConfig.outputCompiledDocument=function(){if($$AC.isCompiledMode){var E="";var K=$$w.$$d.createElement("meta");K.setAttribute("name","generator");K.setAttribute("content","Appcelerator "+Appcelerator.Version);$$AR.HeadElement.appendChild(K);K=$$w.$$d.createElement("meta");K.setAttribute("name","license");K.setAttribute("content",Appcelerator.LicenseMessage);$$AR.HeadElement.appendChild(K);var J=$$w.$$d.createElement("script");J.setAttribute("src","js/"+appcelerator_app_js);J.setAttribute("type","text/javascript");$$AR.HeadElement.appendChild(J);var B=null;var G=["$$AC.compileOnLoad=false;","$$AR.onload(function(){","function setScope(id,scope){var e = $(id); if (e) e.scope = scope;}"];for(var D in $$AC.scopeMap){var L=$$AC.scopeMap[D];if(typeof (L)=="string"){G.push('setScope("'+D+'","'+L+'");')}}if($$AC.compiledCode){G.push($$AC.compiledCode)}G.push("var attributeProcessors = $$AC.attributeProcessors;");G.push("function handleListener(elementId, attributeName, tagname, handlerIndex) {");G.push("var element = $(elementId); var value = element.getAttribute(attributeName);");G.push("attributeProcessors[tagname][handlerIndex][1].handle(element,attributeName,value);}");var H=$$AC.compiledAttributeListeners;for(D=0;D<H.length;D++){G.push('handleListener("'+H[D].join('","')+'");')}G.push("$$AC.compileDocumentOnFinish();");G.push("});");B=G.join("");if($$AC.compressor){B=$$AC.compressor.compress(B)}$$AR.HeadElement.getElementsByTagName("*").each(function(N){if(N.nodeType==1&&$$AC.automatedIDRegex.test(N.id)){N.removeAttribute("id")}});if($$AC.automatedIDRegex.test($$AR.HeadElement.id)){$$AR.HeadElement.removeAttribute("id")}if($$AC.automatedIDRegex.test($$AR.HeadElement.parentNode.id)){$$AR.HeadElement.parentNode.removeAttribute("id")}var F={};$$d.getElementsByTagName("link").each(function(N){if(N.id){F[N.id]=N}});for(var M in $$AR.widgets_css){var C=$$AR.widgets_css[M];if(typeof C=="string"&&$$AR.usedModules[C]){delete F["css_"+C]}}for(var A in F){if(A&&typeof (A)=="string"&&A.indexOf("css_")!=-1){var I=F[A];I.parentNode.removeChild(I)}}E+=$$AU.Dom.getText($$w.$$d.documentElement,false,null,true,true);$$AC.compiledJS=B;$$AC.compiledDocument=E}};$$AC.setHTML=function(B,A){$(B).innerHTML=A;if($$AB.isIE6){setTimeout($$AB.fixImageIssues,0)}};$$AU.Dom={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12,eachAttribute:function(B,F,J,E){E=E==null?true:E;J=J||[];if(B.attributes){var A=B.attributes;for(var I=0,G=A.length;I<G;I++){var K=A[I];if(K&&K.value!=null&&E==K.specified){var H=typeof (K);if(K.value.startsWith("function()")){continue}if(H=="function"||H=="native"||K.name.match(/_moz\-/)){continue}if(J.length>0){var L=false;for(var D=0,C=J.length;D<C;D++){if(J[D]==K.name){L=true;break}}if(L){continue}}F(K.name,K.value,K.specified,I,A.length)}}return I>0}return false},getTagAttribute:function(B,E,A,D){try{var C=B.getElementsByTagName(E)[0].getAttribute(A);if(null!=C){return C}}catch(F){}return D},each:function(D,B,C){if(typeof (D)=="array"){D.each(function(H){if(H.nodeType==B){C(H)}})}else{if(typeof (D)=="object"||typeof (D)=="function"&&$$n.userAgent.match(/WebKit/i)){for(var G=0,A=D.length;G<A;G++){var F=D[G];if(typeof F.nodeType!="undefined"&&F.nodeType==B){try{C(F)}catch(E){if(E==$break){break}else{if(E!=$continue){throw E}}}}}}else{throw ("unsupported dom nodelist type: "+typeof (D))}}},getText:function(D,E,F,K,A){var J=[];var C=D.childNodes;var G=C?C.length:0;for(var H=0;H<G;H++){var B=C[H];if(F){B=F(B)}if(B.nodeType==this.COMMENT_NODE){if(!A){J.push("<!-- "+B.nodeValue+" -->")}continue}if(B.nodeType==this.ELEMENT_NODE){J.push(this.toXML(B,true,null,null,E,K,A))}else{if(B.nodeType==this.TEXT_NODE){var I=B.nodeValue;if(I){J.push(I);if(K){J.push("\n")}}}else{if(B.nodeValue==null){J.push(this.toXML(B,true,null,null,E,K,A))}else{J.push(B.nodeValue||"")}}}}return J.join("")},hasAttribute:function(D,F,B){if(!D.hasAttribute){if(D.attributes){for(var E=0,A=D.attributes.length;E<A;E++){var C=D.attributes[E];if(C&&C.specified){if(B&&C.name==F||!B&&C.name.toLowerCase()==F.toLowerCase()){return true}}}}return false}else{return D.hasAttribute(F)}},getAttribute:function(D,F,B){if(B){return D.getAttribute(F)}else{for(var E=0,A=D.attributes.length;E<A;E++){var C=D.attributes[E];if(C&&C.specified){if(C.name.toLowerCase()==F.toLowerCase()){return C.value}}}return null}},toXML:function(I,H,N,C,D,P,B){N=(N||I.nodeName.toLowerCase());var E=[];E.push("<"+N);if(C){E.push(" id='"+C+"' ")}if(I.attributes){var M=0;var A=I.attributes;for(var L=0,F=A.length;L<F;L++){var O=A[L];if(O&&O.value!=null&&O.specified){var K=typeof (O);if(O.value&&O.value.startsWith("function()")){continue}if(K=="function"||K=="native"||O.name.match(/_moz\-/)){continue}if(C!=null&&O.name=="id"){continue}if($$AB.isIE&&!D&&O.name=="style"&&I.style&&I.style.cssText){var J=I.style.cssText;E.push(' style="'+J+'"');M++;continue}var G=String.escapeXML(O.value);E.push(" "+O.name+'="'+G+'"');M++}}}E.push(">");if(H&&I.childNodes&&I.childNodes.length>0){E.push("\n");E.push(this.getText(I,D,null,P,B))}E.push("</"+N+">"+(P?"\n":""));return E.join("")},getAndRemoveAttribute:function(B,A){var C=B.getAttribute(A);if(C){B.removeAttribute(A)}return C},getAttributesString:function(B,C){var A="";this.eachAttribute(B,function(D,E){if(false==(C&&C.indexOf(D)>-1)){A+=D+'="'+String.escapeXML(E||"")+'" '}},null,true);return A},createElement:function(B,A){var C=$$d.createElement(B);if(A){if(A["parent"]){A["parent"].appendChild(C)}if(A["className"]){C.className=A["className"]}if(A["html"]){C.innerHTML=A["html"]}if(A["children"]){A["children"].each(function(D){C.appendChild(D)})}}return C}};try{if(typeof (DOMNodeList)=="object"){DOMNodeList.prototype.length=DOMNodeList.prototype.getLength}if(typeof (DOMNode)=="object"){DOMNode.prototype.childNodes=DOMNode.prototype.getChildNodes;DOMNode.prototype.parentNode=DOMNode.prototype.getParentNode;DOMNode.prototype.nodeType=DOMNode.prototype.getNodeType;DOMNode.prototype.nodeName=DOMNode.prototype.getNodeName;DOMNode.prototype.nodeValue=DOMNode.prototype.getNodeValue}}catch(e){}$$AU.Cookie=Class.create();$$AU.Cookie={toString:function(){return"[$$AU.Cookie]"},getCookieVal:function(B){var A=$$d.cookie.indexOf(";",B);if(A==-1){A=$$d.cookie.length}return unescape($$d.cookie.substring(B,A))},GetCookie:function(D){var B=escape(D)+"=";var F=B.length;var A=$$d.cookie.length;var E=0;while(E<A){var C=E+F;var H=$$d.cookie.substring(E,C);if(H==B){var G=this.getCookieVal(C);if(G!=null&&G!=""){$D(this,"GetCookie",D+"="+G);return G}else{$D(this,"GetCookie",D+"=null");return null}}E=$$d.cookie.indexOf(" ",E)+1;if(E==0){break}}$D(this,"GetCookie",D+"=null");return null},SetCookie:function(B,H){var G=this.SetCookie.arguments;var E=this.SetCookie.arguments.length;var D=(E>2)?G[2]:null;var I=(E>3)?G[3]:null;var F=(E>4)?G[4]:null;var A=(E>5)?G[5]:false;var C=escape(B)+"="+escape(H)+((D==null)?"":("; expires="+D.toGMTString()))+((I==null)?"":("; path="+I))+((F==null)?"":("; domain="+F))+((A)?"; secure":"");$D(this,"SetCookie",C);$$d.cookie=C},DeleteCookie:function(){var D=new Date();D.setTime(D.getTime()+(-1*24*60*60*1000));var A="; expires="+D.toGMTString();var C=$A(arguments);var B=this;C.each(function(E){$D(B,"DeleteCookie",E);$$d.cookie=E+"="+A+"; path=/";$$d.cookie=E+"="+A+";"})},HasCookie:function(A){return this.GetCookie(A)!=null}};if($$w.location.protocol!="file:"){(function(){if(Appcelerator.Config["cookie_check"]){$$AU.Cookie.SetCookie("CookieCheck","1");var A=$$AU.Cookie.GetCookie("CookieCheck");if(!A){$$w.location=Appcelerator.DocumentPath+"upgrade_cookies.html"}else{$$AU.Cookie.DeleteCookie("CookieCheck")}}})()}$$AU.ServiceBroker={DEBUG:false,init:false,instanceid:Appcelerator.instanceid,serverPath:Appcelerator.DocumentPath+"servicebroker",interceptors:[],messageQueue:[],localMessageQueue:[],localTimer:null,localTimerPoll:10,initQueue:[],timer:null,time:null,serverDown:false,poll:false,fetching:false,localDirectListeners:{},remoteDirectListeners:{},localPatternListeners:[],remotePatternListeners:[],devmode:($$w.location.href.indexOf("devmode=1")>0),disabled:this.devmode||($$w.location.href.indexOf("file:/")==0)||Appcelerator.Parameters.get("mbDisabled")=="1",remoteDisabled:this.disabled||Appcelerator.Parameters.get("remoteDisabled")=="1",marshaller:"xml/json",transport:"appcelerator",multiplex:true,toString:function(){return"[ServiceBroker]"},addInterceptor:function(A){$D(this.toString()+" Adding interceptor: "+A);this.interceptors.push(A)},removeInterceptor:function(A){$D(this.toString()+"Removing interceptor: "+A);this.interceptors.remove(A)},convertType:function(A){if(A.startsWith("l:")){return A.replace(/^l:/,"local:")}if(A.startsWith("r:")){return A.replace(/^r:/,"remote:")}return A},addListenerByType:function(I,H){I=this.convertType(I.trim());var G=I.indexOf(":");var E=(G!=-1)?(I.substring(0,G)):"both";var D=(G!=-1)?I.substring(G+1):I;var F=D.charAt(0)=="~";if(E=="local"||E=="both"){var C=null;if(F){this.localPatternListeners.push([H,new RegExp(D.substring(1))]);var B=H["_removePatternListenerArrays"];if(!B){B=[];H["_removePatternListenerArrays"]=B}B.push(this.localPatternListeners)}else{C=this.localDirectListeners[D];if(!C){C=[];this.localDirectListeners[D]=C}var A=H["_removeListenerArrays"];if(!A){A=[];H["_removeListenerArrays"]=A}A.push(C);C.push(H)}}if(E=="remote"||E=="both"){var C=null;if(F){this.remotePatternListeners.push([H,new RegExp(D.substring(1))]);var B=H["_removePatternListenerArrays"];if(!B){B=[];H["_removePatternListenerArrays"]=B}B.push(this.remotePatternListeners)}else{C=this.remoteDirectListeners[D];if(!C){C=[];this.remoteDirectListeners[D]=C}var A=H["_removeListenerArrays"];if(!A){A=[];H["_removeListenerArrays"]=A}A.push(C);C.push(H)}}},addListener:function(F){var D=new Date().getTime();var C=F["accept"];if(!C){alert("add listener problem, callback incorrect and has no accept function\n"+F);return }var B=C.call(F);if(B.length==1){this.addListenerByType(B[0],F)}else{for(var E=0,A=B.length;E<A;E++){this.addListenerByType(B[E],F)}}if(this.DEBUG){$D(this.toString()+" Added listener: "+F+" ("+(new Date().getTime()-D)+" ms)")}},removeListener:function(J){var A=new Date().getTime();var C=J["_removeListenerArrays"];if(C&&C.length>0){for(var H=0,E=C.length;H<E;H++){C[H].remove(J)}delete J["_removeListenerArrays"]}var D=J["_removePatternListenerArrays"];if(D&&D.length>0){for(var H=0,E=D.length;H<E;H++){var G=D[H];if(G&&G.length>0){var K=null;for(var I=0,B=G.length;I<B;I++){var F=G[I];if(F[0]==J){K=F;break}}if(K){G.remove(K)}}}}if(this.DEBUG){$D(this.toString()+" Removed listener: "+J+" ("+(new Date().getTime()-A)+" ms)")}},triggerComplete:function(){this.compileComplete=true;this.runInitQueue();this.startLocalTimer()},triggerConfig:function(){this.configComplete=true;this.runInitQueue()},runInitQueue:function(){if(this.compileComplete&&this.configComplete){this.init=true;if(this.initQueue&&this.initQueue.length>0){for(var A=0;A<this.initQueue.length;A++){this.queue(this.initQueue[A][0],this.initQueue[A][1])}this.initQueue=null}}},queue:function(B,M){if(!$$AU.ServiceBroker.init){$D(B.type+" will be queued, not yet initialized");this.initQueue.push([B,M]);return }var J=B["type"];if(!J){throw"type must be specified on the message"}J=this.convertType(J);var O=B["scope"]||"appcelerator";var H=B["version"]||"1.0";if(this.interceptors.length>0){var D=true;for(var I=0,G=this.interceptors.length;I<G;I++){var F=this.interceptors[I];var C=F["interceptQueue"];if(C){var P=C.apply(F,[B,M,J,O,H]);if(this.DEBUG){$D(self.toString()+" Invoked interceptor: "+F+", returned: "+P+" for message: "+J)}if(P!=null&&!P){D=false;break}}}if(!D){$D(this+" interceptor squashed event: "+B["type"]);return }}var K=J.indexOf(":");var L=K!=-1?J.substring(0,K):"local";var A=K!=-1?J.substring(K+1):J;B["type"]=A;var E=(B["data"])?B["data"]:{};var N=null;switch(typeof (E)){case"object":case"array":N=Object.toJSON(E);break;default:N=E.toString();break}E.toString=function(){return N};$D(this+" message queued: "+A+", data: "+N+", version: "+H+", scope: "+O);switch(L){case"remote":if(this.messageQueue){if(!this.devmode&&!this.remoteDisabled){this.messageQueue.push([B,M,O,H]);this.startTimer(B["immediate"]||false)}}else{$E(this+" message:"+A+" ignored since we don't have a messageQueue!")}break}this.localMessageQueue.push([A,E,L,O,H])},dispatch:function(B){var P=B.requestid;var L=B.type;var F=B.datatype;var N=B.scope;var E=B.data;if(this.interceptors.length>0){var D=true;for(var K=0,H=this.interceptors.length;K<H;K++){var G=this.interceptors[K];var C=G["interceptDispatch"];if(C){var O=C.apply(G,[P,L,B,F,N]);if(O!=null&&!O){D=false;break}}}if(!D){return }}var I=this.remoteDirectListeners[L];if(I&&I.length>0){for(var K=0,H=I.length;K<H;K++){this.sendToListener(I[K],L,E,F,"remote",N)}}if(this.remotePatternListeners.length>0){for(var K=0,H=this.remotePatternListeners.length;K<H;K++){var M=this.remotePatternListeners[K];var A=M[0];var J=M[1];if(J.test(L)){this.sendToListener(A,L,E,F,"remote",N)}}}},sendToListener:function(C,K,B,F,L,M){if(this.interceptors.length>0){var E=true;for(var J=0,H=this.interceptors.length;J<H;J++){var G=this.interceptors[J];var D=G["interceptSendToListener"];if(D){var N=D.apply(G,[C,K,B,F,L,M]);if(N!=null&&!N){E=false;break}}}if(!E){return }}var A=C["acceptScope"];if(A){if(!A(M)){return }}$D(this.toString()+" forwarding "+K+" to "+C+", direction:"+L+", datatype:"+F+", data: "+B);try{C["onMessage"].apply(C,[K,B,F,L,M])}catch(I){$E("Unhandled Exception dispatching:"+K+", "+B+", to listener:"+C+", "+Object.getExceptionDetail(I))}return true},XML_REGEXP:/^<(.*)>$/,deliver:function(C){if(this.messageQueue==null){$E(this.toString()+", deliver called but no message queue");return }if(this.remoteDisabled){return }var E=$$AU.ServiceBrokerMarshaller[this.marshaller];if(!E){$E(this+" - no marshaller defined, will not send message to remote endpoint");this.remoteDisabled=true;return }var F=$$AU.ServiceBrokerTransportHandler[this.transport];if(!F){$E(this+" - no transport handler defined, will not send message to remote endpoint");this.remoteDisabled=true;return }this.fetching=true;var J=E.serialize(this.messageQueue,this.multiplex);var H=J.postBody;var I=J.contentType;var G=F.prepare(this,C,H,I);if(this.multiplex){this.messageQueue.clear()}else{if(this.messageQueue.length>0){this.messageQueue.removeAt(0)}}var B=G.url;var A=G.method;var D=G.postBody;var I=G.contentType;this.sendRequest(B,A,D,I,E,0);if(!this.multiplex&&this.messageQueue.length>0){this.deliver.defer()}},sendRequest:function(C,G,A,F,D,E){E=E+1;if(E>3){B.fetching=false;$E("too many attempts sending a re-authorization request.");return }var B=this;new Ajax.Request(C,{asynchronous:true,method:G,postBody:A,contentType:F,evalJSON:false,evalJS:false,onComplete:function(){B.fetching=false},onSuccess:function(H){(function(){B.fetching=false;B.startTimer(false);if(H&&H.status&&H.status>=200&&H.status<300){if(B.serverDown){B.serverDown=false;var J=new Date().getTime()-B.serverDownStarted;if(Logger.infoEnabled){Logger.info("["+$$AU.DateTime.get12HourTime(new Date(),true,true)+"] "+B.toString()+" Server is UP at "+B.serverPath)}B.queue({type:"local:appcelerator.servicebroker.server.up",data:{path:this.serverPath,downtime:J}})}var I=parseInt(H.getResponseHeader("Content-Length")||"1");var M=H.getResponseHeader("Content-Type")||"unknown";if(I>0){var K=D.deserialize(H,parseInt(I),M);if(K&&K.length>0){for(var L=0;L<K.length;L++){B.dispatch(K[L])}}}}}).defer()},onFailure:function(J,I){if(J.status==400){var H=J.getResponseHeader("X-Failed-Retry");if(!H){Logger.warn("Failed authentication, will retry 1 more time");B.sendRequest(C,G,A,F,D,E);return }}if(J.status==406){B.sendRequest(C,G,A,F,D,E);return }B.fetching=false;if(J.status>=500||J.status==404){B.serverDown=true;B.serverDownStarted=new Date().getTime();Logger.warn(B.toString()+" Server is DOWN at "+B.serverPath);B.queue({type:"local:appcelerator.servicebroker.server.down",data:{path:B.serverPath}})}else{$E(B.toString()+" Failure: "+J.status+" "+J.statusText)}B.startTimer(false)},onException:function(L,H){var K=new String(H);var I=true;var J=true;B.fetching=false;if(K.indexOf("NS_ERROR_NOT_AVAILABLE")!=-1&&K.indexOf("nsIXMLHttpRequest.status")!=-1){I=false}if(K.indexOf("NS_ERROR_FILE_NOT_FOUND")!=-1){J=false}if(I){$E(B.toString()+" Exception: "+K)}if(J){B.startTimer(false)}}})},destroy:function(){this.cancelTimer();this.cancelLocalTimer();if(this.messageQueue){this.messageQueue.clear()}if(this.localMessageQueue){this.localMessageQueue.clear()}this.messageQueue=null;this.time=null;if(this.localDirectListeners){for(var B in this.localDirectListeners){var A=this.localDirectListeners[B];if(Object.isArray(A)){A.clear()}}this.localDirectListeners=null}if(this.remoteDirectListeners){for(var B in this.remoteDirectListeners){var A=this.remoteDirectListeners[B];if(Object.isArray(A)){A.clear()}}this.remoteDirectListeners=null}if(this.localPatternListeners){this.localPatternListeners.clear()}this.localPatternListeners=null;if(this.remotePatternListeners){this.remotePatternListeners.clear()}this.remotePatternListeners=null},cancelLocalTimer:function(){if(this.locaTimer){clearInterval(this.locaTimer);this.locaTimer=0}},cancelTimer:function(){if(this.timer){clearTimeout(this.timer);this.timer=0}},onServiceBrokerInvalidContentType:function(A){if(Logger.fatalEnabled){Logger.fatal(this+", received an invalid content type ("+(A||"none")+"), probably need to re-login, redirecting to landing page")}},onServiceBrokerInvalidLogin:function(){if(Logger.fatalEnabled){Logger.fatal(this+", received an invalid credentials, probably need to re-login, redirecting to landing page")}},startLocalTimer:function(){this.localTimer=setInterval(function(){var E=this.localMessageQueue;if(E&&E.length){var N=E[E.length-1];var A=N[0];var D=N[1];var K=N[2];var M=N[3];var G=N[4];var C=this.remoteDirectListeners[A];var L=this.remotePatternListeners;if(C){for(var I=0,F=C.length;I<F;I++){this.sendToListener(C[I],A,D,"JSON",K,M,G)}}if(L){for(var I=0,F=L.length;I<F;I++){var J=L[I];var B=J[0];var H=J[1];if(H.test(A)){this.sendToListener(B,A,D,"JSON",K,M,G)}}}C=this.localDirectListeners[A];L=this.localPatternListeners;if(C){for(var I=0,F=C.length;I<F;I++){this.sendToListener(C[I],A,D,"JSON",K,M,G)}}if(L){for(var I=0,F=L.length;I<F;I++){var J=L[I];var B=J[0];var H=J[1];if(H.test(A)){this.sendToListener(B,A,D,"JSON",K,M,G)}}}E.remove(N)}}.bind(this),this.localTimerPoll)},startTimer:function(D){if(!this.init){$D(this.toString()+" - startTimer called but not running yet");return }if(this.disabled){return }this.cancelTimer();if(this.messageQueue){if(!this.poll){if(this.messageQueue.length>0&&!this.fetching){this.emptyQueueHits=0;this.deliver(true);return }return }if(D&&!this.fetching){this.emptyQueueHits=0;this.deliver(D);return }var B=new Date().getTime();if(this.time){if(this.messageQueue.length>0&&B-this.time>=150&&!this.fetching){this.emptyQueueHits=0;this.deliver(false);return }}this.time=B;var A=this;var C=this.downServerPoll;if(!this.serverDown){if(this.messageQueue.length>1){C=this.moreThanOneEntryQueuePoll;this.emptyQueueHits=0}else{if(this.messageQueue.length>0){C=this.oneEntryQueuePoll;this.emptyQueueHits=0}else{C=Math.min(this.emptyQueuePollMax,this.emptyQueuePoll+(this.emptyQueueHits*this.emptyQueueDecay));this.emptyQueueHits++}}}this.timer=setTimeout(function(){if(!A.fetching){A.deliver(false)}},C)}else{$E(toString()+" startTimer called and we have no message queue")}},maxWaitPollTime:200,maxWaitPollTimeWhenSending:0,moreThanOneEntryQueuePoll:50,oneEntryQueuePoll:200,emptyQueuePoll:2000,emptyQueuePollMax:30000,emptyQueueDecay:500,emptyQueueHits:0,downServerPoll:10000};function $MQ(C,D,B,A){$$AU.ServiceBroker.queue({type:C,data:D||{},scope:B,version:A||"1.0"})}function $MQL(B,E,D,A){var C={accept:function(){if(Object.isArray(B)){return B}return[B]},acceptScope:function(F){if(D){return D=="*"||F==D}return true},onMessage:function(H,I,G,J,F){E.apply(E,[H,I,G,J,F])}};$$AU.ServiceBroker.addListener(C);if(A){$$AC.addTrash(A,function(){$$AU.ServiceBroker.removeListener(C)})}return C}$$AU.ServiceBrokerMarshaller={};$$AU.ServiceBrokerMarshaller["xml/json"]={currentRequestId:1,jsonify:function(G){var E=this.currentRequestId++;var D=G[2];var A=G[3];var C="JSON";var F=G[0]["data"];var B="<message requestid='"+E+"' type='"+G[0]["type"]+"' datatype='"+C+"' scope='"+D+"' version='"+A+"'>";B+="<![CDATA["+Object.toJSON(F)+"]]>";B+="</message>";return B},serialize:function(I,A){var D=null;if(I.length>0){D="";var B=new Date();var G=B.getTime();D="<?xml version='1.0'?>\n";var C=B.getTimezoneOffset()/60;var E=$$AU.IdleManager.getIdleTimeInMS();D+="<request version='1.0' idle='"+E+"' timestamp='"+G+"' tz='"+C+"'>\n";if(A){for(var H=0,F=I.length;H<F;H++){D+=this.jsonify(I[H])}}else{D+=this.jsonify(I[0])}D+="</request>"}return{"postBody":D,"contentType":"text/xml"}},deserialize:function(D,B,L){if(D.status==202){return null}if(L.indexOf("text/xml")==-1){$E(this+", invalid content type: "+L+", excepted: text/xml");return null}var G=D.responseXML;if(!G){return null}var C=G.documentElement.childNodes;var K=null;if(C&&C.length>0){K=[];for(var J=0;J<C.length;J++){var A=C.item(J);if(A.nodeType==$$AU.Dom.ELEMENT_NODE){var O=A.getAttribute("requestid");try{var I=A.getAttribute("type");var F=A.getAttribute("datatype");var N=A.getAttribute("scope")||"appcelerator";var E,M;try{M=$$AU.Dom.getText(A);E=M.evalJSON();E.toString=function(){return Object.toJSON(this)}}catch(H){$E("Error received evaluating: "+M+" for type: "+I+", error: "+Object.getExceptionDetail(H));return }$D(this.toString()+" received remote message, type:"+I+",data:"+E);K.push({type:I,data:E,datatype:F,scope:N,requestid:O})}catch(H){$E(this+" - Error in dispatch of message. "+Object.getExceptionDetail(H))}}}}return K}};function jsonParameterEncode(A,B,E){switch(typeof (B)){case"string":case"number":case"boolean":E.push(A+"="+encodeURIComponent(B));break;case"array":case"object":if(Object.isArray(B)){for(var D=0;D<B.length;D++){jsonParameterEncode(A+"."+D,B[D],E)}}else{for(var C in B){jsonParameterEncode(A+"."+C,B[C],E)}}break;case"function":break;default:E.push(encodeURIComponent(A)+"=");break}}function jsonToQueryParams(B){var C=[];for(var A in B){var D=B[A];jsonParameterEncode(A,D,C)}return C.join("&")}function json_encode_xml(C,A){var E={};var D=A[C.nodeName];if(D){if(Object.isArray(D)){D.push(E)}else{A[C.nodeName]=[D,E]}}else{A[C.nodeName]=E}$$AU.Dom.eachAttribute(C,function(G,H){E[G]=H});var B=false;$$AU.Dom.each(C.childNodes,$$AU.Dom.ELEMENT_NODE,function(G){json_encode_xml(G,E);B=true});if(!B){var F=$$AU.Dom.getText(C);A[C.nodeName]=F}}$$AU.ServiceBrokerMarshaller["application/x-www-form-urlencoded"]={currentRequestId:1,parameterize:function(G){var D=this.currentRequestId++;var C=G[2];var A=G[3];var B="JSON";var E=G[0]["data"];var F="$messagetype="+G[0]["type"]+"&$requestid="+D+"&$datatype="+B+"&$scope="+C+"&$version="+A;if(E){F+="&"+jsonToQueryParams(E)}return F},serialize:function(D,C){var B=null;if(D.length>0){B="";if(C){for(var E=0,A=D.length;E<A;E++){B+=this.parameterize(D[E])}}else{B+=this.parameterize(D[0])}}return{"postBody":B,"contentType":"application/x-www-form-urlencoded"}},deserialize:function(A,B,C){if(A.status==202){return null}if(C.indexOf("/json")==-1){$E(this+", invalid content type: "+C+", excepted json mimetype");return null}return[A.responseText.evalJSON(true)]}};$$AU.ServiceBrokerTransportHandler={};$$AU.ServiceBrokerTransportHandler["appcelerator"]={prepare:function(G,C,F,I){var E=Appcelerator.ServerConfig["sessionid"].value||"JSESSIONID";var H=$$AU.Cookie.GetCookie(E);var D=(H)?$$AU.MD5.hex_md5(H+G.instanceid):"";var J="?maxwait="+((!C&&F)?G.maxWaitPollTime:G.maxWaitPollTimeWhenSending)+"&instanceid="+G.instanceid+"&auth="+D+"&ts="+new Date().getTime();var B=G.serverPath+J;var A=F?"post":"get";return{"url":B,"method":A,"postBody":F||"","contentType":I}}};$$AU.ServiceBrokerInterceptor=Class.create();Object.extend($$AU.ServiceBrokerInterceptor.prototype,{initialize:function(){},toString:function(){return"[$$AU.ServiceBrokerInterceptor]"},interceptQueue:function(A,B){return true},interceptDispatch:function(C,B,D,A){return true},interceptSendToListener:function(C,B,D,A){return true}});if($$AU.ServiceBroker.disabled||$$AU.ServiceBroker.remoteDisabled){$$AU.ServiceBroker.triggerConfig();Logger.warn("[ServiceBroker] remote delivery of messages is disabled")}else{$$AU.ServerConfig.addConfigListener(function(){var A=Appcelerator.ServerConfig["servicebroker"];if(!A||A["disabled"]=="true"){$$AU.ServiceBroker.disabled=true;$$AU.ServiceBroker.remoteDisabled=true;$$AU.ServiceBroker.triggerConfig();Logger.warn("[ServiceBroker] remote delivery of messages is disabled");return }$$AU.ServiceBroker.serverPath=A.value;$$AU.ServiceBroker.poll=(A.poll=="true");$$AU.ServiceBroker.multiplex=A.multiplex?(A.multiplex=="true"):true;$$AU.ServiceBroker.transport=A.transport||$$AU.ServiceBroker.transport;$$AU.ServiceBroker.marshaller=A.marshaller||$$AU.ServiceBroker.marshaller;$$AU.ServiceBroker.triggerConfig();$$AU.ServiceBroker.startTimer();Logger.info("ServiceBroker ready")});if($$w.parent==null||$$w.parent==window){var screenHeight=screen.height;var screenWidth=screen.width;var colorDepth=screen.colorDepth||-1;$$AR.onload(function(){if($$AB.autoReportStats){var A=$$AB.isWindows?"win":$$AB.isMac?"mac":$$AB.isLinux?"linux":$$AB.isSunOS?"sunos":"unknown";var B={"userAgent":$$n.userAgent,"flash":$$AB.isFlash,"flashver":$$AB.flashVersion,"screen":{"height":screenHeight,"width":screenWidth,"color":colorDepth},"os":A,"referrer":$$d.referrer,"path":$$w.location.href,"cookies":($$d.cookie||"").split(";").collect(function(D){var C=D.split("=");return C&&C.length>0?{name:C[0],value:C[1]}:{name:null,value:null}})};$MQ("remote:appcelerator.status.report",B)}})}}$$AR.onunload($$AU.ServiceBroker.destroy.bind($$AU.ServiceBroker));$$AC.afterDocumentCompile(function(){$$AU.ServiceBroker.triggerComplete()});$$AC.registerCustomAction("show",{build:function(E,B,D){if(D&&D.length>0){var C=D[0];var A=C.key;return"Element.show('"+A+"')"}else{return"Element.show('"+E+"')"}}});$$AC.registerCustomAction("hide",{build:function(E,B,D){if(D&&D.length>0){var C=D[0];var A=C.key;return"Element.hide('"+A+"')"}else{return"Element.hide('"+E+"')"}}});$$AC.registerCustomAction("visible",{build:function(E,B,D){if(D&&D.length>0){var C=D[0];var A=C.key;return"Element.setStyle('"+A+"',{visibility:'visible'})"}else{return"Element.setStyle('"+E+"',{visibility:'visible'})"}}});$$AC.registerCustomAction("hidden",{build:function(E,B,D){if(D&&D.length>0){var C=D[0];var A=C.key;return"Element.setStyle('"+A+"',{visibility:'hidden'})"}else{return"Element.setStyle('"+E+"',{visibility:'hidden'})"}}});$$AC.registerCustomAction("effect",{build:function(H,D,G){if(G&&G.length>0){var E=G[0];var B=E.key;var F=E.value?","+E.value:"";var A=B.dasherize().camelize();A=A.charAt(0).toUpperCase()+A.substring(1);if(!Effect[A]){throw"syntax error: unsupported effect type: "+A}var C="Element.visualEffect('"+H+"','"+A+"'"+F+")";return C}else{throw"syntax error: effect action must have parameters"}}});$$AC.registerCustomAction("toggle",{build:function(H,C,G){if(G&&G.length>0){var E=G[0];var A=E.key;var F=E.value;var B=null;if(A=="class"){B='if (Element.hasClassName("'+H+'","'+F+'")) Element.removeClassName("'+H+'","'+F+'"); else Element.addClassName("'+H+'","'+F+'")'}else{if($$AC.isCSSAttribute(A)){A=$$AC.convertCSSAttribute(A);switch(A){case"display":case"visibility":var D="";if(!F){F=(A=="display")?"block":"visible"}switch(F){case"inline":D="none";break;case"block":D="none";break;case"none":D="block";break;case"hidden":D="visible";break;case"visible":D="hidden";break}B='var a = Element.getStyle("'+H+'","'+A+'"); if (a!="'+D+'") Element.setStyle("'+H+'",{"'+A+'":"'+D+'"}); else Element.setStyle("'+H+'",{"'+A+'":"'+F+'"})';break;default:B='var a = Element.getStyle("'+H+'","'+A+'"); if (a) Element.setStyle("'+H+'",{"'+A+'":""}); else Element.setStyle("'+H+'",{"'+A+'":"'+F+'"})';break}}else{B='var a = $("'+H+'"); if (!a) throw "no element with ID: '+H+'"; var v = a.getAttribute("'+A+'"); if (v) a.removeAttribute("'+A+'"); else a.setAttribute("'+A+'","'+F+'")'}}return B}else{throw"syntax error: toggle action must have parameters"}}});$$AC.generateSetter=function(A){return'$$AC.getEvaluatedValue("'+A+'",this.data||{})'};var addsetBuilder={build:function(G,D,F){if(F.length==0){throw"syntax error: expected parameter key:value for action: "+D}var E=F[0];var A=E.key;var C=E.value;if($$AC.isCSSAttribute(A)){A=$$AC.convertCSSAttribute(A);return"Element.setStyle('"+G+"',{'"+A+"':"+$$AC.generateSetter(C)+"})"}else{if(A=="class"){if(D=="set"){return"$('"+G+"').className = "+$$AC.generateSetter(C)}return"Element.addClassName('"+G+"',"+$$AC.generateSetter(C)+")"}else{if(A.startsWith("style")){return"$('"+G+"')."+A+"="+$$AC.generateSetter(C)}var B='var e = $("'+G+'"); if (!e) throw "syntax error: element with ID: '+G+" doesn't exist\";";B+="var isOperaSetIframe = "+$$AB.isOpera+" && e.nodeName=='IFRAME' && '"+A+"'=='src';";B+="if (e.nodeName=='IFRAME' && '"+A+"'=='src'){";B+="var onload=e.getAttribute('onloaded');";B+="if (onload){";B+="$$AU.IFrame.monitor(e,function(){$MQ(onload,{},e.scope);});";B+="}";B+="}";B+='if (e["'+A+'"]!=null){';switch(A){case"checked":case"selected":case"disabled":B+="e."+A+" = ('true' == ''+"+$$AC.generateSetter(C)+")";break;default:B+="if(isOperaSetIframe) {e.location.href="+$$AC.generateSetter(C)+"; }";B+="else { e."+A+" = "+$$AC.generateSetter(C)+"; }"}B+="} else {";B+="e.setAttribute('"+A+"',"+$$AC.generateSetter(C)+")";B+="}";return B}}}};$$AC.registerCustomAction("add",addsetBuilder);$$AC.registerCustomAction("set",addsetBuilder);$$AC.registerCustomAction("remove",{build:function(F,C,E){if(E.length==0){throw"syntax error: expected parameter key:value for action: "+C}var D=E[0];var A=D.key;var B=D.value;switch(A){case"class":return"Element.removeClassName('"+F+"',"+$$AC.formatValue(B)+")";default:return"$('"+F+"').removeAttribute('"+A+"')"}}});$$AC.registerCustomAction("statechange",{build:function(F,C,E){if(E.length==0){throw"syntax error: expected parameter key:value for action: "+C}var D=E[0];var A=D.key;var B=D.value;return'$$AC.StateMachine.fireStateMachineChange("'+A+'","'+B+'",true,true,false)'}});var scriptBuilderAction={parseParameters:function(C,A,B){return B},build:function(C,A,B){return B}};$$AC.registerCustomAction("javascript",scriptBuilderAction);$$AC.registerCustomAction("function",scriptBuilderAction);$$AC.registerCustomAction("script",scriptBuilderAction);$$AC.findParameter=function(C,A){if(C){if(C[A]){return C[A]}else{if(C.length>0){for(var D=0;D<C.length;D++){var B=C[D];if(B.key==A){return B.value}}}}}return null};$$AC.buildActionFunction=function(G,F,E,A){var D=$$AC.findParameter(E,"id")||G;var B="";var C="";if(A){B='try{ var e=$("'+D+'"); if (e && !e.disabled && Element.showing(e)) ';C="}catch(xxx_){}"}return B+'$$AC.executeFunction("'+D+'","'+F+'",["'+D+'","'+F+'",this.data,this.scope])'+C};$$AC.registerCustomAction("selectOption",{build:function(G,E,F){if(F.length==0){throw"syntax error: expected parameter property for action: "+E}var A=$(G);if(!A.options){throw"syntax error: selectOption must apply to a select tag"}var B=F[0].key;var D=F[0].value||B;if(D=="$null"){D=""}var C='var selectedValue = Object.getNestedProperty(this.data, "'+B+'","'+D+'");';C+=' var targetSelect = $("'+G+'");';C+=" for (var j=0;j<targetSelect.options.length;j++)";C+=" {";C+=" if (targetSelect.options[j].value == selectedValue)";C+=" {";C+=" targetSelect.selectedIndex = j;";C+=" return;";C+=" }";C+=" }";return C}});var ResetAction={build:function(A,F,E){var I=$$AC.findParameter(E,"id")||A;var H=$(I);var B=false;var C=null;var G='$("'+I+'")';var D="";var J='""';switch($$AC.getTagname(H)){case"input":case"textarea":D="value";B=true;break;case"select":D="selectedIndex";J="0";B=true;break;case"img":D="src";break;case"a":D="href";J="#";break;case"form":return'Form.reset("'+I+'"); Form.Methods.getInputs("'+I+'").each(function(i){$$AC.executeFunction(i,"revalidate");});';default:D="innerHTML";break}C=G+"."+D+"="+J;if(B){C+="; $$AC.executeFunction("+G+',"revalidate");'}return C}};$$AC.registerCustomAction("clear",ResetAction);$$AC.registerCustomAction("reset",ResetAction);var ResetFormAction={build:function(G,D,F){var E=$$AC.findParameter(F,"id")||G;var A=$(E);var C=null;var B=null;switch($$AC.getTagname(A)){case"form":B='$("'+E+'")';break;case"input":case"select":case"textarea":default:B='$("'+E+'").form';break}C=B+".reset()";return C}};$$AC.registerCustomAction("clearform",ResetFormAction);$$AC.registerCustomAction("popup",{re:/([+|-]{0,1})([0-9])+/,getPosition:function(B){var C={value:"0",relative:true};var A=this.re.exec(B);if(A){C.relative=(A[1]=="+"||A[1]=="-");C.value=B}return C},build:function(B,F,E){var H=B;var I="0",D="0";var L=true,C=true;var M="appear";if(E&&E.length>0){var G=E[0];if(E.length==1){if(G.key=="id"){H=G.value}else{H=G.key}}else{for(var J=0;J<E.length;J++){var G=E[J];switch(G.key){case"id":H=G.value;break;case"x":var K=this.getPosition(G.value);I=K.value;L=K.relative;break;case"y":var K=this.getPosition(G.value);D=K.value;C=K.relative;break;case"effect":M=G.value;break}}}}var A="var event = args[0]; var x = Event.pointerX(event); var y = Event.pointerY(event);"+((L)?"x+="+I:"x="+I)+";"+((L)?"y+="+D:"y="+D)+';Element.setStyle("'+H+'",{top:(y||0)+"px",left:(x||0)+"px"}); setTimeout(function(){ Element.ensureVisible("'+H+'"); },50); '+((!M||M=="")?'Element.show("'+H+'"); ':'Element.visualEffect("'+H+'","'+M+'"); ');return A}});$$AC.registerCustomAction("value",{parseParameters:function(C,A,B){return B},build:function(P,U,J){var E=P;var T=false;var D=null;var d=J;var Z=false;var Y=J;if(J.charAt(0)=='"'||J.charAt(0)=="'"){D=J}else{d=$$AC.getParameters(J,false);for(var b=0,X=d.length;b<X;b++){var K=d[b];if(d.length==1&&null==K.value&&K.key.charAt(0)=="$"){E=K.key;T=true}else{if(K.key=="id"){if(K.value!=null){E=K.value;T=true}else{T=false}}else{if(K.key=="append"){Z=K.value==true||K.value=="true"}else{if(K.key=="value"){if(K.value=="expr("){var W=J.indexOf("expr(");var R=J.lastIndexOf(")");Y=J.substring(W,R+1)}else{Y=K.value}}}}}}var V=$$AC.expressionRE.exec(Y);if(V){D="(function(){ return "+V[1]+" }).call(this);"}else{if(d[0].key.charAt(0)=="$"){D='$$AC.getElementValue($("'+d[0].key.substring(1)+'"))'}else{var h=d[0].key;var N=d[0].value||h;if(N=="$null"){N=""}D='Object.getNestedProperty(this.data, "'+h+'","'+N+'")'}}if(D==null){if(E.charAt(0)=="$"){E=E.substring(1)}var g=$(E);if(!g){throw"syntax error: couldn't find target with ID: "+E+" for value action"}D='$$AC.getElementValue($("'+E+'"))'}}var B=$(P);var L="";var a='$("'+P+'")';var S="";var O="";var I=false;switch($$AC.getTagname(B)){case"input":I=true;var F=B.getAttribute("type")||"text";switch(F){case"password":case"hidden":case"text":S="value";break;case"checkbox":S="checked";Z=false;O="==true || "+D+"=='true'";break;case"button":case"submit":S="value";break}break;case"textarea":I=true;S="value";break;case"select":var A="";var H=$$AC.findParameter(d,"property");var G=$$AC.findParameter(d,"row");var Q=$$AC.findParameter(d,"value");var M=$$AC.findParameter(d,"text");if(!H){throw"required parameter named 'property' not found in value parameter list"}if(!Q){throw"required parameter named 'value' not found in value parameter list"}if(!M){M=Q}A="var ar = "+$$AC.generateSetter(H)+"; ";A+="var s = "+a+";";if(!Z){A+="s.options.length = 0;"}A+="if (ar) {";A+="for (var c=0;c<ar.length;c++){";if(G){A+=' var row = Object.getNestedProperty(ar[c],"'+G+'");'}else{A+=" var row = ar[c];"}A+=" if (row){";A+=' s.options[s.options.length] = new Option(Object.getNestedProperty(row,"'+M+'"),Object.getNestedProperty(row,"'+Q+'"));';A+=" }";A+="}";A+="}";A+=I?'; $$AC.executeFunction(s,"revalidate");':"";return A;case"div":case"span":case"p":case"a":case"h1":case"h2":case"h3":case"h4":case"h5":case"td":case"code":case"li":case"blockquote":S="innerHTML";break;case"img":Z=false;S="src";break;default:throw"syntax error: "+B.nodeName+" not supported for value action"}var C=I?"; $$AC.executeFunction("+a+',"revalidate");':"";$D("built expression=> "+a+"."+S+"="+D+O+C);var L="";if(Z){L="var value_"+B.id+" = "+a+"."+S+";";L+=a+"."+S+" = value_"+B.id+" + "+D+O}else{L=a+"."+S+"="+D+O}L+=C;return L}});var GenericActionFunction=Class.create();Object.extend(GenericActionFunction.prototype,{initialize:function(A){this.checkenabled=A},build:function(C,A,B){return $$AC.buildActionFunction(C,A,B,this.checkenabled)}});$$AC.GenericFunctions=[["execute",false],["enable",false],["disable",false],["focus",true],["blur",true],["select",false],["selected",false],["unselect",false],["click",false],["submit",false]];for(var c=0,len=$$AC.GenericFunctions.length;c<len;c++){var gf=$$AC.GenericFunctions[c];var f=new GenericActionFunction(gf[1]);$$AC.registerCustomAction(gf[0],f)}$$AC.buildCustomAction=function(A){var C=$$AC.customActions[A];if(!C){var B=new GenericActionFunction(false);$$AC.registerCustomAction(A,B)}};$$AC.registerCustomAction("history",{build:function(E,B,D){if(D&&D.length>0){var C=D[0];var A=C.key;return'Appcelerator.History.go("'+A+'");'}else{throw"required parameter for history action"}}});Object.extend(Array.prototype,{remove:function(C){var A=[];for(var B=0;B<this.length;B++){if(this[B]!=C){A.push(this[B])}}this.clear();for(var B=0;B<A.length;B++){this.push(A[B])}return A}});$$AC.registerCustomCondition(function(E,B,C,I,F,D){var G=null;switch(B){case"dragstart":G="onStart";break;case"drag":G="onDrag";break;case"dragend":G="onEnd";break;case"dragover":if(!E.getAttribute("droppable")){throw"dragover condition only applies to elements that have droppable attribute"}if(!E.hoverListeners){E.hoverListeners=[]}var J=$$AC.makeConditionalAction(E.id,C,D);E.hoverListeners.push({onHover:function(K){$$AC.executeAfter(J,F,{id:E.id,dragged:K.id})}});return true;case"drop":if(!E.getAttribute("droppable")){throw"drop condition only applies to elements that have droppable attribute"}if(!E.dropListeners){E.dropListeners=[]}var J=$$AC.makeConditionalAction(E.id,C,D);E.dropListeners.push({onDrop:function(K){$$AC.executeAfter(J,F,{id:E.id,dropped:K.id})}});return true}if(G){var A=E.id;var J=$$AC.makeConditionalAction(E.id,C,D);var H={};H[G]=function(L,K){if(K.element.id==A){$$AC.executeAfter(J,F,{id:A})}};Draggables.addObserver(H);$$AC.addTrash(E,function(){Draggables.removeObserver(E)});return true}return false});$$AC.registerCustomCondition(function(E,B,C,I,F,D){switch(B){case"enter":case"enter!":if($$AC.getTagname(E)!="form"){throw"invalid condition: "+B+" on element of type: "+E.tagName+", only supported on form elements"}var A=E.id;var K=$$AC.makeConditionalAction(A,C,D,{id:A});var C=function(L){$$AC.executeAfter(K,F,{id:A});if(B=="enter!"){Event.stop(Event.getEvent(L))}};var G=Form.Methods.getInputs(E);for(var H=0;H<G.length;H++){var J=G[H];$$AC.getAndEnsureId(J);$$AU.KeyManager.installHandler($$AU.KeyManager.KEY_ENTER,J,C);$$AC.addTrash(J,function(){$$AU.KeyManager.removeHandler($$AU.KeyManager.KEY_ENTER,J)})}return true}return false});$$AC.Events=["click","focus","blur","dblclick","mousedown","mouseout","mouseover","mousemove","change","scroll","keyup","keypress","keydown","contextmenu","mousewheel","input","paste"];$$AC.actionId=0;$$AC.isEventSelector=function(B){if(B.charAt(B.length-1)=="!"){B=B.substring(0,B.length-1)}for(var C=0,A=$$AC.Events.length;C<A;C++){if(B==$$AC.Events[C]){return true}if(B.indexOf($$AC.Events[C])!=-1){return B.indexOf(":")==-1&&B.indexOf("[")==-1}}return false};$$AC.registerCustomCondition(function(I,D,G,O,K,H){if(!$$AC.isEventSelector(D)){return false}if(O){throw"syntax error: 'else' action not supported on event conditions for: "+D}var E=false;if(D.charAt(D.length-1)=="!"){E=true;D=D.substring(0,D.length-1)}var J=D.indexOf(".");var A=D,M=I.id,C=false;if(J>0){var F=D.substring(0,J);switch(F){case"this":M=I.id;break;case"parent":M=I.parentNode.id;break;case"down":case"after":case"next":case"sibling":case"next-sibling":M=I.nextSibling.id;break;case"before":case"up":case"prev-sibling":case"previous-sibling":M=I.previousSibling.id;break;case"child":case"children":C=true;break;case"window":M="window";break;case"body":M=$$d.body.id;break;default:M=F}A=D.substring(J+1)}if($$AC.getTagname(I)=="select"&&A=="change"&&(C||M==I.id)){var L=function(T){var U=I.options[I.selectedIndex||0];var S=U;if(Element.isDisabled(S)||Element.isDisabled(S.parentNode)){return }var R=$$AC.makeConditionalAction(I.id,G,H,{value:U.value,text:U.text});R();if(E){Event.stop(T);return false}};$$AC.addEventListener(I,A,L,K)}else{if(C){for(var N=0;N<I.childNodes.length;N++){(function(){var T=I.childNodes[N];if(T.nodeType==1){$$AC.getAndEnsureId(T);$D("adding listener to "+T.id+" for event: "+A);var S=function(Y){var X=T;if(Element.isDisabled(X)||Element.isDisabled(X.parentNode)){return }var W=$$AC.makeConditionalAction($$AC.getAndEnsureId(T),G,H);var U=W,V=$A(arguments);return U.apply(this,[Y||$$w.event].concat(V))};var R=S;if(E){R=function(U){S(U);Event.stop(U);return false}}$$AC.addEventListener(T,A,R,K)}})()}}else{if(Object.isString(M)){M=M=="window"?window:$(M)}if(!M){throw"syntax error: target not found for "+D}$D("adding listener to "+M+", name: "+M.nodeName+", id: "+M.id+" for event: "+A);var P=$$AC.makeConditionalAction(M.id,G,H);var Q={id:M.id};var B=function(U){var T=$(Q.id);if(Element.isDisabled(T)||Element.isDisabled(T.parentNode)){return }var R=P,S=$A(arguments);return R.apply(Q,[U||$$w.event].concat(S))};var L=B;if(E){L=function(R){B(R);Event.stop(R);return false}}$$AC.addEventListener(M,A,L,K)}}return true});$$AC.registerCustomCondition(function(G,C,E,J,H,F){if(C.startsWith("history:")){var A=G.id;var D=C.substring(8);var K=$$AC.makeConditionalAction(A,E,F);var I=J?$$AC.makeConditionalAction(A,J,null):null;var B="==";if(D.charAt(0)=="!"){D=D.substring(1);B="!="}D=D.length==0||D=="_none_"||D==="null"?null:D;Appcelerator.History.onChange(function(N,M,L){switch(B){case"==":if(N==D){$$AC.executeAfter(K,H,{data:M})}else{if(I){$$AC.executeAfter(I,H,{data:M})}}break;case"!=":if(N!=D){$$AC.executeAfter(K,H,{data:M})}else{if(I){$$AC.executeAfter(I,H,{data:M})}}break}});return true}return false});$$AC.registerCustomCondition(function(G,B,E,K,H,F){if(B.startsWith("local:")||B.startsWith("l:")||B.startsWith("remote:")||B.startsWith("r:")){var A=G.id;var C=$$AC.parameterRE.exec(B);var I=(C?C[1]:B);var D=C?C[2]:null;var L=$$AC.makeConditionalAction(A,E,F);var J=(K?$$AC.makeConditionalAction(A,K,null):null);return $$AC.MessageAction.makeMBListener(G,I,L,D,H,J)}return null});$$AC.MessageAction={};$$AC.MessageAction.onMessage=function(B,R,E,P,A,H,K,Q,N){var G=true;var C=H?H.evalJSON():null;if(C){for(var O=0,M=C.length;O<M;O++){var J=C[O];var I=J.key.charAt(J.key.length-1)=="!";var L=I?J.key.substring(0,J.key.length-1):J.key;var D=$$AC.getEvaluatedValue(L,R);if(I){if(D==J.value){G=false;break}}else{if(null==D||D!=J.value){G=false;break}}}}var F={type:B,datatype:E,direction:P,data:R,scope:A};if(G){$$AC.executeAfter(K,Q,F)}else{if(N){$$AC.executeAfter(N,Q,F)}}};$$AC.MessageAction.makeMBListener=function(D,G,C,B,F,H){var A=B?$$AC.getParameters(B,false):null;var E=A?G.indexOf("["):0;if(E>0){G=G.substring(0,E)}var I=(A)?Object.toJSON(A):null;$MQL(G,function(L,M,K,N,J){$$AC.MessageAction.onMessage(L,M,K,N,J,I,C,F,H)},D.scope,D);return true};$$AC.registerCustomCondition(function(D,G,F,A,B,E){if(G=="resize"){if(!D.getAttribute("resizable")){throw"resize condition only applies to elements that have resizable attribute"}if(!D.resizeListeners){D.resizeListeners=[]}var C=$$AC.makeConditionalAction(D.id,F,E);D.resizeListeners.push({onResize:function(H){$$AC.executeAfter(C,B,{id:D.id})}});return true}return false});$$AC.Selected={};$$AC.Selected.makeSelectedListener=function(C,G,E,A,B,D){var F=$$AC.getAndEnsureId(C);$$AC.attachFunction(C,"selected",function(K,L,H){if(K){var J=$$AC.makeConditionalAction(F,E,D,{count:L,unselect:H});$$AC.executeAfter(J,B,{count:L,id:F,unselect:H})}else{if(A){var I=$$AC.makeConditionalAction(F,A,null,{count:L,unselect:H});$$AC.executeAfter(I,B,{count:L,id:F,unselect:H})}}})};$$AC.registerCustomCondition(function(C,H,E,A,B,D){switch(H){case"selected":Element.addClassName(C,"app_selectable");$$AC.Selected.makeSelectedListener(C,H,E,A,B,D);break;case"parent.selected":Element.addClassName(C,"app_selectable");$$AC.Selected.makeSelectedListener(C.parentNode,H,E,A,B,D);break;case"children.selected":case"child.selected":Element.addClassName(C,"app_selectgroup");for(var G=0;G<C.childNodes.length;G++){var F=C.childNodes[G];if(F.nodeType==1){Element.addClassName(F,"app_selectable");$$AC.Selected.makeSelectedListener(F,H,E,A,B,D)}}break;default:return false}return true});$$AC.StateMachine={};$$AC.StateMachine.APP_STATES={};$$AC.StateMachine.CompiledStateConditionCache={};$$AC.StateMachine.isStateCondition=function(A){return $$AC.parameterRE.test(A)};$$AC.registerCustomCondition(function(A,O,N,D,S,J){if(!$$AC.StateMachine.isStateCondition(O)){return false}var M=A.id;var K=O.split(" ");var O="";var E=[];for(var R=0,P=K.length;R<P;R++){var C=K[R].trim();if(C.length==0){continue}switch(C){case"and":O+=" && ";continue;case"||":case"&&":O+=" "+C+" ";continue;default:break}var I="";if(C.charAt(0)=="!"){I="!";C=C.substring(1)}else{if(C.startsWith("not ")){I="!";C=C.substring(4)}}var G=$$AC.parameterRE.exec(C);var L=G[1];var B=G[2];E.push([L,B]);O+=I+'$$AC.StateMachine.isStateValid("'+L+'","'+B+'")'}var H=$$AC.makeConditionalAction(M,N,J);var Q=(D?$$AC.makeConditionalAction(M,D,null):null);var F=$$AC.StateMachine.CompiledStateConditionCache[O];if(!F){F=O.toFunction();$$AC.StateMachine.CompiledStateConditionCache[O]=F;$D("compiled state => "+O)}for(var R=0,P=E.length;R<P;R++){var L=E[R][0];var B=E[R][1];$D("adding state change listener for "+L+"["+B+"]");$$AC.StateMachine.registerStateListener(L,function(V,U,W){var T=F();$D("statemachine: "+V+"["+U+"] logic returned => "+T);if(T){$$AC.executeAfter(H,S)}else{if(Q){$$AC.executeAfter(Q,S)}}});$$AC.StateMachine.addOnLoadStateCheck(L)}return true});$$AC.StateMachine.isStateMachine=function(A){return $$AC.StateMachine.APP_STATES[A]!=null};$$AC.StateMachine.isStateValid=function(B,C){var A=$$AC.StateMachine.APP_STATES[B];if(A){if(A.active){return(C=="*"||A.states["state_"+C]==true)}}return false};$$AC.StateMachine.disableStateMachine=function(B){var C=$$AC.StateMachine.getActiveState(B,true);var A=$$AC.StateMachine.APP_STATES[B];if(A){A.active=false;A.init=true;$D("disable state machine="+B+"["+C+"]");if(C){$$AC.StateMachine.fireStateMachineChange(B,C,false)}A.activeState=C}};$$AC.StateMachine.enableStateMachine=function(B){var A=$$AC.StateMachine.APP_STATES[B];if(A){A.active=true;A.init=true;var C=A.activeState;$D("enable state machine="+B+"["+C+"]");if(C){A.activeState=null;$$AC.StateMachine.fireStateMachineChange(B,C,true,true)}}};$$AC.StateMachine.addState=function(C,D,B){var A=$$AC.StateMachine.APP_STATES[C];if(!A){A=$$AC.StateMachine.createStateMachine(C)}A.states["state_"+D]=B};$$AC.StateMachine.createStateMachine=function(B){var A={"states":{},"listeners":[],"active":true,"activeState":null,"init":false};$$AC.StateMachine.APP_STATES[B]=A;return A};$$AC.StateMachine.registerStateListener=function(B,C){var A=$$AC.StateMachine.APP_STATES[B];if(!A){A=$$AC.StateMachine.createStateMachine(B)}A.listeners.push(C)};$$AC.StateMachine.unregisterStateListener=function(C,D){var B=$$AC.StateMachine.APP_STATES[C];if(B){var A=B.indexOf(D);if(A>=0){B.removeAt(A);return true}}return false};$$AC.StateMachine.getActiveState=function(B,D){var A=$$AC.StateMachine.APP_STATES[B];if(A&&(A.active||D==true)){if(A.activeState!=null){return A.activeState}for(var C in A.states){if(C.startsWith("state_")){if(true==A.states[C]){return C.substring(6)}}}}return null};$$AC.StateMachine.fireStateMachineChange=function(H,A,J,C,K){$D("fireStateMachineChange => "+H+"["+A+"] = "+J+", force="+(C==true)+",init="+K);var F=$$AC.StateMachine.APP_STATES[H];if(F){var B=false;for(var L in F.states){if(L.startsWith("state_")){if(A==L.substring(6)){var E=F.states[L];if(K==true||C==true||J==null||E==null||(E!=null&&E!=J)){F.states[L]=J;F.activeState=J?L.substring(6):null;B=true;$D("setting "+H+"["+A+"]=>"+J+", current="+E+",m.activeState="+F.activeState)}}else{if(J!=null&&J==true){F.states[L]=false;B=true;$D("setting "+H+"["+L.substring(6)+"]=>false")}}}}$D("setting activeState = "+F.activeState+" for "+H);F.init=true;B=C==true?true:B;if(B&&F.listeners.length>0){for(var I=0,G=F.listeners.length;I<G;I++){var D=F.listeners[I];D.apply(D,[H,A,J])}}}};$$AC.StateMachine.addOnLoadStateCheck=function(A){if($$AC.StateMachine.initialStateInit){if($$AC.StateMachine.initialStateInit.indexOf(A)<0){$$AC.StateMachine.initialStateInit.push(A)}}};$$AC.StateMachine.resetOnStateListeners=function(){if(!$$AC.StateMachine.initialStateLoaders){$$AC.StateMachine.initialStateLoaders=[];$$AC.StateMachine.initialStateInit=[]}};$$AC.StateMachine.fireOnStateListeners=function(){if($$AC.StateMachine.initialStateLoaders&&$$AC.StateMachine.initialStateLoaders.length>0){var C=[];for(var F=0,A=$$AC.StateMachine.initialStateLoaders.length;F<A;F++){var E=$$AC.StateMachine.initialStateLoaders[F];$D("firing initial state change = "+E[0]+"["+E[1]+"]");$$AC.StateMachine.fireStateMachineChange(E[0],E[1],true,false,true);C.push(E[0])}if($$AC.StateMachine.initialStateInit&&$$AC.StateMachine.initialStateInit.length>0){for(var F=0;F<$$AC.StateMachine.initialStateInit.length;F++){var B=$$AC.StateMachine.initialStateInit[F];if(C.indexOf(B)<0){var D=$$AC.StateMachine.getActiveState(B);if(D){$$AC.StateMachine.fireStateMachineChange(B,D,true,true,false);C.push(B)}}}}}$$AC.StateMachine.initialStateLoaders=null;$$AC.StateMachine.initialStateInit=null};$$AC.StateMachine.re=/[\s\n\r]+or[\s\n\r]+/;$$AC.StateMachine.compileStateCondition=function(B,L){var A={"name":B,"states":{},"types":[]};if(L){var K=L.split($$AC.StateMachine.re);for(var J=0,G=K.length;J<G;J++){var C=K[J];var E=$$AC.parameterRE.exec(C);var I=$$AC.convertMessageType(E?E[1]:C);var D=E?E[2]:null;var M=D?$$AC.getParameters(D,false):null;var H=M?$$AC.StateMachine.compileMessageConditionExpression(M):null;var F=A.states[I];if(!F){A.types.push(I);F=[];A.states[I]=F}F.push(H||"1==1")}}return A};$$AC.StateMachine.compileMessageConditionExpression=function(D){var C="";for(var H=0,A=D.length;H<A;H++){var G=D[H];var E=null;var F="==";var B=G.key;if(B.endsWith("!")){F="!=";B=B.substring(0,B.length-1)}switch(typeof (G.value)){case"string":E='"'+G.value+'"';break;case"number":case"boolean":E=G.value;break}C+='Object.getNestedProperty(this.data,"'+B+'")'+F+E;if(H+1<A){C+=" && "}}return C};$$AC.StateMachine.buildConditions=function(E){var H={};for(var I=0,G=E.length;I<G;I++){var B=E[I];for(var K=0,C=B.types.length;K<C;K++){var J=B.types[K];var D=H[J];if(!D){D=[];D.push('case "'+J+'": { ');H[J]=D}var L=B.states[J];D.push("if ("+L.join(" || ")+') return "'+B.name+'";')}}var A=[];var F=[];for(var J in H){F.push(J);var D=H[J];A.push(D.join("")+"break; } ")}return{types:F.uniq(),code:"switch(this.messagetype) { "+A.join("")+" default: return null; } "}};$$AC.StateMachine.initialStateLoaders=[];$$AC.StateMachine.initialStateInit=[];$$AC.afterDocumentCompile($$AC.StateMachine.fireOnStateListeners);Object.extend(Appcelerator.Decorator,{invalidImage:Appcelerator.ImagePath+"warning.png",validImage:Appcelerator.ImagePath+"confirm.png",toString:function(){return"[Appcelerator.Decorator]"},defaultDecorator:function(A,B){},decoratorId:0,checkInvalid:function(C,D,A,E,B){if(A){var G=$(A);if(G){if(B){if(D){$$AC.setHTML(G,'<img src="'+$$AD.validImage+'"/> <span class="success_color">'+E+"</span>");$$AC.dynamicCompile(G)}}else{if(!D){$$AC.setHTML(G,'<img src="'+$$AD.invalidImage+'" style="position:relative;top:3px"/> '+E);$$AC.dynamicCompile(G)}Element.setStyle(A,{visibility:(D?"hidden":"visible")})}}}else{var F="decorate_"+C.id;var G=$(F);if(!G){new Insertion.After(C.id,'<span id="'+F+'" style="font-size:11px;color:#ff0000"></span>');G=$(F)}if(B){$$AC.setHTML(G,'<img src="'+$$AD.validImage+'"/> <span class="success_color">'+E+"</span>");$$AC.dynamicCompile(G)}else{if(!D){$$AC.setHTML(G,'<img src="'+$$AD.invalidImage+'" style="position:relative;top:3px"/> '+E);$$AC.dynamicCompile(G)}Element.setStyle(F,{visibility:(D?"hidden":"visible")})}}},custom:function(B,C,A){if(!A){throw"invalid custom decorator, decoratorId attribute must be specified"}var D=$(A);if(!D){throw"invalid custom decorator, decorator with ID: "+A+" not found"}if(!C){if(D.style.display=="none"){D.style.display=""}if(D.style.visibility=="hidden"){D.style.visibility=""}}else{if(D.style.display!="none"){D.style.display="none"}if(D.style.visibility!="hidden"){D.style.visibility="hidden"}}},termsAccepted:function(B,C,A){this.checkInvalid(B,C,A,"must accept terms and conditions")},required:function(B,C,A){this.checkInvalid(B,C,A,"required")},email:function(B,C,A){this.checkInvalid(B,C,A,"enter a valid email address")},date:function(B,C,A){this.checkInvalid(B,C,A,"invalid date")},number:function(B,C,A){this.checkInvalid(B,C,A,"invalid number")},fullname:function(B,C,A){this.checkInvalid(B,C,A,"enter first and last name")},alphanumeric:function(B,C,A){this.checkInvalid(B,C,A,"enter an alphanumeric value")},noSpaces:function(B,C,A){this.checkInvalid(B,C,A,"value must contain no spaces")},password:function(B,C,A){this.checkInvalid(B,C,A,"password must be at least 6 characters")},url:function(B,C,A){this.checkInvalid(B,C,A,"enter a valid URL")},checked:function(B,C,A){this.checkInvalid(B,C,A,"item must be checked")},wholenumber:function(B,C,A){this.checkInvalid(B,C,A,"enter a whole number")},length:function(D,E,B){if(!E){var C=D.getAttribute("validatorMinLength")||"0";var A=D.getAttribute("validatorMaxLength")||"999999";this.checkInvalid(D,E,B,"value must be between "+C+"-"+A+" characters")}else{this.checkInvalid(D,E,B,D.value.length+" characters",true)}}});$MQL("appcelerator.download",function(I,D,E,J){var A=D["name"];var H=D["ticket"];var G=Appcelerator.ServerConfig["download"];var B=G?G.path:Appcelerator.DocumentPath+"/download";var C=$$AU.UUID.generateNewId();B=B+"?ticket="+encodeURIComponent(H)+"&name="+encodeURIComponent(A)+"&reqid="+C;var F='<iframe id="'+C+'" src="'+B+'" height="1" width="1" style="position:absolute;left:-400px;top:-400px;height:1px;width:1px;"></iframe>';new Insertion.Bottom($$d.body,F)});Element.getDocumentSize=function(){var E,A;var D,B;if($$w.innerHeight&&$$w.scrollMaxY){E=$$d.body.scrollWidth;A=$$w.innerHeight+$$w.scrollMaxY}else{if($$d.body.scrollHeight>$$d.body.offsetHeight){E=$$d.body.scrollWidth;A=$$d.body.scrollHeight}else{E=$$d.body.offsetWidth;A=$$d.body.offsetHeight}}var C,F;if(self.innerHeight){C=self.innerWidth;F=self.innerHeight}else{if($$d.documentElement&&$$d.documentElement.clientHeight){C=$$d.documentElement.clientWidth;F=$$d.documentElement.clientHeight}else{if($$d.body){C=$$d.body.clientWidth;F=$$d.body.clientHeight}}}if(A<F){D=F}else{D=A}if(E<C){B=C}else{B=E}return[B,D,C,F]};Element.getPageScroll=function(){var A;if(self.pageYOffset){A=self.pageYOffset}else{if($$d.documentElement&&$$d.documentElement.scrollTop){A=$$d.documentElement.scrollTop}else{if($$d.body){A=$$d.body.scrollTop}}}return A};Element.getCenteredTopPosition=function(B,A){var C=Element.getDimensions(B);var D=Element.getDimensions(A).width;return(C.height-D)/2};Element.center=function(A,B,I){var E=$(B);var F=Element.getDimensions(A);var C=F.width;var J=F.height;var H=Element.getDimensions(B).width;var D=(C-H)/2;E.style.position="absolute";E.style.left=D+"px";E.style.right=D+C+"px";if(I){E.style.top=I+"px"}else{var G=E.offsetHeight||parseInt(E.style.height)||200;E.style.top=(J-G)/2+"px"}};Element.findParentForm=function(A){var B=null;Element.ancestors(A).each(function(C){if(C.nodeName=="FORM"){B=C;throw $break}});return B};Element.showing=function(A,B){if(!Element.visible(A)){return false}B=B||A.ancestors();var C=true;B.each(function(D){if(!Element.visible(D)){C=false;throw $break}});return C};Element.findNonShowingAncestor=function(A,B){if(!Element.visible(A)){return A}B=B||A.ancestors();var C=null;B.each(function(D){if(!Element.visible(D)){C=D;throw $break}});return C};Element.setHeight=function(A,B){A=$(A);A.style.height=B+"px"};Element.setWidth=function(B,A){B=$(B);B.style.width=A+"px"};Element.setTop=function(B,A){B=$(B);B.style.top=A+"px"};Element.isVisible=function(A){return A.style.visibility!="hidden"&&A.style.display!="none"};Element.ensureVisible=function(D){D=$(D);Position.prepare();var H=Position.cumulativeOffset(D);var F=Element.getDocumentSize();var I=Element.getPageScroll();var A=I+F[3];var B=H[1]>=I+25;var E=H[1]<=A-25;var C=(B&&E);if(!C){var G=Math.max(0,H[1]-30);$$w.scrollTo(0,G)}};Element.isDisabled=function(A){A=$(A);return(A&&(A.disabled||A.getAttribute("disabled")=="true"))};Object.extend(Event,{getEvent:function(A){A=A||$$w.event;return A?typeof (A.inspect)=="function"?A:Event.extend(A):null},isEventObject:function(A){A=this.getEvent(A);if(A){if(typeof (A.cancelBubble)!="undefined"&&typeof (A.qualifier)!="undefined"){return true}if(typeof (A.stopPropagation)!="undefined"&&typeof (A.preventDefault)!="undefined"){return true}}return false},getKeyCode:function(B){var A;if(B){if(typeof (B.keyCode)!="undefined"){A=B.keyCode}else{if(typeof (B.which)!="undefined"){A=B.which}}}else{A=$$w.event.keyCode}return A},isKey:function(B,A){return Event.getKeyCode(B)==A},isEscapeKey:function(A){return Event.isKey(A,Event.KEY_ESC)||Event.isKey(A,A.DOM_VK_ESCAPE)},isEnterKey:function(A){return Event.isKey(A,Event.KEY_RETURN)||Event.isKey(A,A.DOM_VK_ENTER)},isSpaceBarKey:function(A){return Event.isKey(A,Event.KEY_SPACEBAR)||Event.isKey(A,A.DOM_VK_SPACE)},isPageUpKey:function(A){return Event.isKey(A,Event.KEY_PAGEUP)||Event.isKey(A,A.DOM_VK_PAGE_UP)},isPageDownKey:function(A){return Event.isKey(A,Event.KEY_PAGEDOWN)||Event.isKey(A,A.DOM_VK_PAGE_DOWN)},isHomeKey:function(A){return Event.isKey(A,Event.KEY_HOME)||Event.isKey(A,A.DOM_VK_HOME)},isEndKey:function(A){return Event.isKey(A,Event.KEY_END)||Event.isKey(A,A.DOM_VK_END)},isDeleteKey:function(A){return Event.isKey(A,Event.KEY_DELETE)||Event.isKey(A,A.DOM_VK_DELETE)},isLeftKey:function(A){return Event.isKey(A,Event.KEY_LEFT)||Event.isKey(A,A.DOM_VK_LEFT)},isRightKey:function(A){return Event.isKey(A,Event.KEY_RIGHT)||Event.isKey(A,A.DOM_VK_RIGHT)},KEY_SPACEBAR:0,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_END:35,KEY_HOME:36,KEY_DELETE:46});Appcelerator.History={};Appcelerator.History.changeListeners=[];Appcelerator.History.currentState=false;Appcelerator.History.onChange=function(A){Appcelerator.History.changeListeners.push(A)};Appcelerator.History.go=function(A){$$d.location.hash=A};Appcelerator.History.fireChange=function(C){if(C&&C.charAt(0)=="#"){C=C.substring(1)}if(C===""){C=null}if(Appcelerator.History.currentState!=C){Appcelerator.History.currentState=C;var B={state:C};for(var D=0;D<Appcelerator.History.changeListeners.length;D++){var A=Appcelerator.History.changeListeners[D];A(C,B)}}};if($$AB.isIE){Appcelerator.History.loadIE=function(){var C=$$d.createElement("iframe");C.id="app_hist_frame";C.style.position="absolute";C.style.left="-10px";C.style.top="-10px";C.style.width="1px";C.style.height="1px";$$d.body.appendChild(C);var E=$("app_hist_frame");var A=null;var D=null;var B=false;setInterval(function(){var G=E.contentWindow.document;if(!G){return }A=G.getElementById("state");var H=$$d.location.hash;if(H!==B){B=H;G.open();G.write('<html><body><div id="state">'+H+"</div></body></html>");G.close();Appcelerator.History.fireChange(H)}else{if(A){var F=A.innerText;if(D!=F){D=F;if(F==null||F===""){if($$d.location.hash){B="#";$$d.location.hash="";Appcelerator.History.fireChange("#")}}else{if(F!=$$d.location.hash){$$d.location.hash=F;Appcelerator.History.fireChange($$d.location.hash)}}}}else{if(B){B=false}}}},50)}}$$AC.afterDocumentCompile(function(){if($$AB.isIE){Appcelerator.History.loadIE()}else{if($$AC.isCompiledMode){return }else{counter=history.length;hash=null;setInterval(function(){var A;var B;A=$$d.location.hash;B=history.length;if(A!==hash){hash=A;counter=B;Appcelerator.History.fireChange(A)}else{if(B!==counter){hash=A;counter=B;Appcelerator.History.fireChange(A)}}},50)}}});$$AU.IdleManager=Class.create();$$AU.IdleManager={IDLE_TIME:60000,timestamp:null,activeListeners:[],idleListeners:[],idle:false,started:false,install:function(){if(this.started){return }this.started=true;this.event=this.onActivity.bind(this);this.timestamp=new Date().getTime();Event.observe($$w.document,"keypress",this.event,false);Event.observe($$w.document,"mousemove",this.event,false);var A=this;Event.observe(window,"unload",function(){Event.stopObserving($$w.document,"keypress",A.event,false);Event.stopObserving($$w.document,"mousemove",A.event,false);A.event=null},false);this.startTimer()},startTimer:function(){this.stopTimer();this.timer=setInterval(this.onTimer.bind(this),500)},stopTimer:function(){if(this.timer){clearInterval(this.timer);this.timer=0}},onTimer:function(){if(this.isIdle()){this.stopTimer();this.idle=true;if(this.idleListeners.length>0){this.idleListeners.each(function(A){A.call(A)})}}},registerIdleListener:function(A){$$AU.IdleManager.install();this.idleListeners.push(A)},unregisterIdleListener:function(A){this.idleListeners.remove(A)},registerActiveListener:function(A){$$AU.IdleManager.install();this.activeListeners.push(A)},unregisterActiveListener:function(A){this.activeListeners.remove(A)},isIdle:function(){return this.getIdleTimeInMS()>=this.IDLE_TIME},getIdleTimeInMS:function(){return(new Date().getTime()-this.timestamp)},onActivity:function(){this.timestamp=new Date().getTime();if(this.idle){this.idle=false;if(this.activeListeners.length>0){this.activeListeners.each(function(A){A.call(A)})}this.startTimer()}return true}};if($$AB.isIE6){try{$$d.execCommand("BackgroundImageCache",false,true)}catch(e){}$$AB.buildIEImage=function(F,B,J,A){var G=(F.id)?"id='"+F.id+"' ":"";var I=(F.className)?"class='"+F.className+"' ":"";var E=(F.title)?"title='"+F.title+"' ":"title='"+F.alt+"' ";var H="display:inline-block;"+F.style.cssText;if(F.align=="left"){H="float:left;"+H}if(F.align=="right"){H="float:right;"+H}if(F.parentElement&&F.parentElement.href){H="cursor:hand;"+H}var C="<img "+G+I+E;var D="width:"+B+"px; height:"+J+"px;";C+=' style="'+D+H+";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+(A||F.src)+"', sizingMethod='image');\" src='"+Appcelerator.ImagePath+"blank_1x1.gif' />";return C};$$d.getElementsByTagNameNS=function(G,B){var C=$A($$d.getElementsByTagName("*"));if(G=="http://www.w3.org/1999/xhtml"){G=""}var E=[];for(var F=0,A=C.length;F<A;F++){var D=C[F];if(D.tagUrn==G&&(B=="*"||D.nodeName==B)){E.push(D)}}return E};$$AB.fixBackgroundPNG=function(B){if(B.style.backgroundImage.indexOf("blank_1x1.gif")>0){B.style.backgroundImage=""}B.style.filter="";var A=B.currentStyle.backgroundImage;var D=A.substring(5,A.length-2);var C=B.currentStyle.backgroundRepeat=="no-repeat"?"image":"scale";B.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+D+"', sizingMethod='"+C+"')";B.style.backgroundImage="url("+Appcelerator.ImagePath+"blank_1x1.gif)"}}$$AB.fixImage=function(C,F){C=$(C);F=F||C.src;if($$AB.isIE6&&F){var B=F.toUpperCase();if(B.substring(B.length-3,B.length)=="PNG"&&C.getAttribute("on")==null){var A=C.height,D=C.width;if(!A||!D){var E=new Image();E.onload=function(){C.outerHTML=$$AB.buildIEImage(C,E.width,E.height,F.trim())};E.src=F}else{C.outerHTML=$$AB.buildIEImage(C,D,A,F.trim())}}}};$$AB.fixImageIssues=function(){if($$AB.isIE6){for(var A=$$d.all.length-1,B=null;(B=$$d.all[A]);A--){if(B.currentStyle.backgroundImage.match(/(\.png)|(blank_1x1\.gif)/i)!=null){$$AB.fixBackgroundPNG(B)}else{if(B.nodeName=="IMG"){$$AB.fixImage(B)}}}}};$$AR.onload($$AB.fixImageIssues);$$AU.IFrame={fetch:function(D,C,B,A){setTimeout(function(){A=(A==null)?false:A;var E="frame_"+new Date().getTime()+"_"+Math.round(Math.random()*99);var H=$$d.createElement("iframe");$$AC.setElementId(H,E);if(!$$AB.isFirefox){H.setAttribute("name",E)}H.setAttribute("src",Appcelerator.DocumentPath+D);H.style.position="absolute";H.style.width=H.style.height=H.borderWidth="1px";H.style.left="-50px";H.style.top="-50px";var G=$$d.body.appendChild(H);if($$w.frames&&$$w.frames[E]){G=$$w.frames[E]}G.name=E;var F={iframe:G,frameid:E,onload:C,removeOnLoad:(B==null)?true:B,src:D,copyContent:A};if(!$$AB.isFirefox){setTimeout($$AU.IFrame.checkIFrame.bind(F),10)}else{G.onload=$$AU.IFrame.doIFrameLoad.bind(F)}},0)},monitor:function(C,B){var A={iframe:C,frameid:C.id,onload:B,removeOnLoad:false};if(!$$AB.isFirefox){setTimeout($$AU.IFrame.checkIFrame.bind(A),10)}else{C.onload=$$AU.IFrame.doIFrameLoad.bind(A)}},doIFrameLoad:function(){var C=this.iframe.contentDocument||this.iframe.document;var A=C.documentElement.getElementsByTagName("body")[0];if($$AB.isSafari&&$$AB.isWindows&&A.childNodes.length==0){$$AU.IFrame.fetch(this.src,this.onload,this.removeOnLoad);return }if(this.copyContent){var E=$$d.createElement("div");$$AU.IFrame.loadStyles(C.documentElement);var D=$$d.createElement("div");D.innerHTML=A.innerHTML;E.appendChild(D);this.onload(E)}else{this.onload(A)}if(this.removeOnLoad){var B=this.frameid;if($$AB.isFirefox){setTimeout(function(){Element.remove(B)},50)}else{Element.remove(B)}}},checkIFrame:function(){var B=this.iframe.contentDocument||this.iframe.document;var A=B.readyState;if(A=="complete"||(!$$d.getElementById&&A=="interactive")){$$AU.IFrame.doIFrameLoad.call(this)}else{setTimeout($$AU.IFrame.checkIFrame.bind(this),10)}},loadStyles:function(B){for(var A=0;A<B.childNodes.length;A++){var E=B.childNodes[A];if(E.nodeName=="STYLE"){if($$AB.isIE){var C=$$d.createStyleSheet();C.cssText=E.styleSheet.cssText}else{var C=$$d.createElement("style");C.setAttribute("type","text/css");try{C.appendChild($$d.createTextNode(E.innerHTML))}catch(F){C.cssText=E.innerHTML}$$AR.HeadElement.appendChild(C)}}else{if(E.nodeName=="LINK"){var D=$$d.createElement("link");D.setAttribute("type",E.type);D.setAttribute("rel",E.rel);D.setAttribute("href",E.getAttribute("href"));$$AR.HeadElement.appendChild(D)}}$$AU.IFrame.loadStyles(E)}}};$$AU.EventBroadcaster=Class.create();Object.extend($$AU.EventBroadcaster.prototype,{listeners:[],addListener:function(A){this.listeners.push(A)},removeListener:function(A){if(!this.listeners){return false}return this.listeners.remove(A)},dispose:function(){if(this.listeners){this.listeners.clear()}},fireEvent:function(){if(!this.listeners||this.listeners.length==0){$D(this+" not firing event: registered no listeners");return }var B=$A(arguments);if(undefined==B||0==B.length){throw"fire event not correct for "+this+", requires at least a event name parameter"}var A=B.shift();var C=A.charAt(0).toUpperCase();var D="on"+C+A.substring(1);$D(this+" firing event: "+D+", listeners: "+this.listeners.length);this.listeners.each(function(F){var E=F[D];if(E){E.apply(F,B)}else{if(typeof (F)=="function"){F.apply(F,B)}}})}});$$AU.KeyManager=Class.create();Object.extend($$AU.KeyManager,{monitors:[],KEY_ENTER:1,KEY_ESCAPE:2,KEY_SPACEBAR:3,disabled:false,installed:false,toString:function(){return"[$$AU.KeyManager]"},disable:function(){this.disabled=true},enable:function(){this.disabled=false},install:function(){this.installed=true;this.keyPressFunc=this.onkeypress.bindAsEventListener(this);$$d.body.onkeypress=this.keyPressFunc;$$AR.onunload(this.dispose.bind(this))},dispose:function(){$$d.body.onkeypress=null;this.keyPressFunc=null;var A=this;this.monitors.each(function(B){A.removeHandler(B[0],B[1])});this.monitors=null},removeHandler:function(H,A){if(A){var C=A["_focusHandler_"+H];var B=A["_blurHandler_"+H];if(C){Event.stopObserving(A,"focus",C,false);try{delete A["_focusHandler_"+H]}catch(I){}}if(B){Event.stopObserving(A,"blur",B,false);try{delete A["_blurHandler_"+H]}catch(I){}}}if(this.monitors.length>0){var J=null;for(var F=0,D=this.monitors.length;F<D;F++){var G=this.monitors[F];if(G[0]==H&&G[1]==A){J=G;break}}if(J){this.monitors.remove(J)}}},installHandler:function(D,C,E){if(!this.installed){this.install.bind(this)}var B=this;this.removeHandler(D,C);var G=[D,C,E];if(C){var A=function(H){H=Event.getEvent(H);C.focused=true;B.monitors.remove(G);B.monitors.push(G);return true};var F=function(H){H=Event.getEvent(H);C.focused=false;B.monitors.remove(G);return true};C["_focusHandler_"+D]=A;C["_blurHandler_"+D]=F;Event.observe(C,"focus",A,false);Event.observe(C,"blur",F,false)}else{this.monitors.push(G)}},onkeypress:function(E){if(this.monitors.length>0&&!this.disabled){E=Event.getEvent(E);var C=false;for(var F=0,B=this.monitors.length;F<B;F++){var A=this.monitors[F];if((Event.isEnterKey(E)&&A[0]==$$AU.KeyManager.KEY_ENTER)||(Event.isEscapeKey(E)&&A[0]==$$AU.KeyManager.KEY_ESCAPE)||(Event.isSpaceBarKey(E)&&A[0]==$$AU.KeyManager.KEY_SPACEBAR)){var D=Event.element(E);if(A[1]==null||D==A[1]){A[2](E);C=true;break}}}if(C){Event.stop(E);return false}}return true}});$$AR.onload($$AU.KeyManager.install.bind($$AU.KeyManager));$$AL.currentLanguage="en";$$AL.LanguageMap={};$$AL.addLanguageBundle=function(C,A,B){B=B==null?$H():typeof (B.get)=="function"?B:$H(B);$$AL.LanguageMap["language_"+C]={"map":B,"display":A}};$$AL.updateLanguageBundle=function(D,B,C){C=C==null?$H():typeof (C.get)=="function"?C:$H(C);var A=$$AL.LanguageMap["language_"+D];if(!A){$$AL.addLanguageBundle(D,B,C)}else{A.map=A.map.merge(C)}};$$AL.getLanguages=function(){var B=[];for(var A in $$AL.LanguageMap){if(A.startsWith("language_")){B.push({id:A.substring(9),name:$$AL.LanguageMap[A].display})}}return B};$$AL.set=function(A,B,D){D=(D==null)?$$AL.currentLanguage:D;var C=$$AL.LanguageMap["language_"+D];if(!C){throw"language bundle not found for language: "+D}C.set(A,B)};$$AL.get=function(B,D,E){E=(E==null)?$$AL.currentLanguage:E;var A=$$AL.LanguageMap["language_"+E];if(A&&A.map){var C=A.map.get(B);return C||D}return D};$$AL.compiledTemplates={};$$AL.getWithFormat=function(B,D,F,A){F=(F==null)?$$AL.currentLanguage:F;var E=B+":"+F;var G=$$AL.compiledTemplates[E];if(!G){var C=$$AL.get(B,D,F);G=$$AC.compileTemplate(C);$$AL.compiledTemplates[E]=G}return G.call(G,A)};$$AL.supportedTags=["div","span","input","a","td","select","option","li","h1","h2","h3","h4","ol","legend"];$$AL.registerTag=function(A){if($$AL.supportedTags.indexOf(A)==-1){$$AL.supportedTags.push(A)}};$$AL.unregisterTag=function(A){var B=$$AL.supportedTags.indexOf(A);if(B!=-1){$$AL.supportedTags.removeAt(B)}};$$AL.addLanguageBundle("en","English",{});$$AU.MD5={hexcase:0,b64pad:"",chrsz:8,hex_md5:function(A){return this.binl2hex(this.core_md5(this.str2binl(A),A.length*this.chrsz))},b64_md5:function(A){return this.binl2b64(this.core_md5(this.str2binl(A),A.length*this.chrsz))},str_md5:function(A){return this.binl2str(this.core_md5(this.str2binl(A),A.length*this.chrsz))},hex_hmac_md5:function(A,B){return this.binl2hex(this.core_hmac_md5(A,B))},b64_hmac_md5:function(A,B){return this.binl2b64(this.core_hmac_md5(A,B))},str_hmac_md5:function(A,B){return this.binl2str(this.core_hmac_md5(A,B))},md5_vm_test:function(){return this.hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"},core_md5:function(K,F){K[F>>5]|=128<<((F)%32);K[(((F+64)>>>9)<<4)+14]=F;var J=1732584193;var I=-271733879;var H=-1732584194;var G=271733878;for(var C=0;C<K.length;C+=16){var E=J;var D=I;var B=H;var A=G;J=this.md5_ff(J,I,H,G,K[C+0],7,-680876936);G=this.md5_ff(G,J,I,H,K[C+1],12,-389564586);H=this.md5_ff(H,G,J,I,K[C+2],17,606105819);I=this.md5_ff(I,H,G,J,K[C+3],22,-1044525330);J=this.md5_ff(J,I,H,G,K[C+4],7,-176418897);G=this.md5_ff(G,J,I,H,K[C+5],12,1200080426);H=this.md5_ff(H,G,J,I,K[C+6],17,-1473231341);I=this.md5_ff(I,H,G,J,K[C+7],22,-45705983);J=this.md5_ff(J,I,H,G,K[C+8],7,1770035416);G=this.md5_ff(G,J,I,H,K[C+9],12,-1958414417);H=this.md5_ff(H,G,J,I,K[C+10],17,-42063);I=this.md5_ff(I,H,G,J,K[C+11],22,-1990404162);J=this.md5_ff(J,I,H,G,K[C+12],7,1804603682);G=this.md5_ff(G,J,I,H,K[C+13],12,-40341101);H=this.md5_ff(H,G,J,I,K[C+14],17,-1502002290);I=this.md5_ff(I,H,G,J,K[C+15],22,1236535329);J=this.md5_gg(J,I,H,G,K[C+1],5,-165796510);G=this.md5_gg(G,J,I,H,K[C+6],9,-1069501632);H=this.md5_gg(H,G,J,I,K[C+11],14,643717713);I=this.md5_gg(I,H,G,J,K[C+0],20,-373897302);J=this.md5_gg(J,I,H,G,K[C+5],5,-701558691);G=this.md5_gg(G,J,I,H,K[C+10],9,38016083);H=this.md5_gg(H,G,J,I,K[C+15],14,-660478335);I=this.md5_gg(I,H,G,J,K[C+4],20,-405537848);J=this.md5_gg(J,I,H,G,K[C+9],5,568446438);G=this.md5_gg(G,J,I,H,K[C+14],9,-1019803690);H=this.md5_gg(H,G,J,I,K[C+3],14,-187363961);I=this.md5_gg(I,H,G,J,K[C+8],20,1163531501);J=this.md5_gg(J,I,H,G,K[C+13],5,-1444681467);G=this.md5_gg(G,J,I,H,K[C+2],9,-51403784);H=this.md5_gg(H,G,J,I,K[C+7],14,1735328473);I=this.md5_gg(I,H,G,J,K[C+12],20,-1926607734);J=this.md5_hh(J,I,H,G,K[C+5],4,-378558);G=this.md5_hh(G,J,I,H,K[C+8],11,-2022574463);H=this.md5_hh(H,G,J,I,K[C+11],16,1839030562);I=this.md5_hh(I,H,G,J,K[C+14],23,-35309556);J=this.md5_hh(J,I,H,G,K[C+1],4,-1530992060);G=this.md5_hh(G,J,I,H,K[C+4],11,1272893353);H=this.md5_hh(H,G,J,I,K[C+7],16,-155497632);I=this.md5_hh(I,H,G,J,K[C+10],23,-1094730640);J=this.md5_hh(J,I,H,G,K[C+13],4,681279174);G=this.md5_hh(G,J,I,H,K[C+0],11,-358537222);H=this.md5_hh(H,G,J,I,K[C+3],16,-722521979);I=this.md5_hh(I,H,G,J,K[C+6],23,76029189);J=this.md5_hh(J,I,H,G,K[C+9],4,-640364487);G=this.md5_hh(G,J,I,H,K[C+12],11,-421815835);H=this.md5_hh(H,G,J,I,K[C+15],16,530742520);I=this.md5_hh(I,H,G,J,K[C+2],23,-995338651);J=this.md5_ii(J,I,H,G,K[C+0],6,-198630844);G=this.md5_ii(G,J,I,H,K[C+7],10,1126891415);H=this.md5_ii(H,G,J,I,K[C+14],15,-1416354905);I=this.md5_ii(I,H,G,J,K[C+5],21,-57434055);J=this.md5_ii(J,I,H,G,K[C+12],6,1700485571);G=this.md5_ii(G,J,I,H,K[C+3],10,-1894986606);H=this.md5_ii(H,G,J,I,K[C+10],15,-1051523);I=this.md5_ii(I,H,G,J,K[C+1],21,-2054922799);J=this.md5_ii(J,I,H,G,K[C+8],6,1873313359);G=this.md5_ii(G,J,I,H,K[C+15],10,-30611744);H=this.md5_ii(H,G,J,I,K[C+6],15,-1560198380);I=this.md5_ii(I,H,G,J,K[C+13],21,1309151649);J=this.md5_ii(J,I,H,G,K[C+4],6,-145523070);G=this.md5_ii(G,J,I,H,K[C+11],10,-1120210379);H=this.md5_ii(H,G,J,I,K[C+2],15,718787259);I=this.md5_ii(I,H,G,J,K[C+9],21,-343485551);J=this.safe_add(J,E);I=this.safe_add(I,D);H=this.safe_add(H,B);G=this.safe_add(G,A)}return Array(J,I,H,G)},md5_cmn:function(F,C,B,A,E,D){return this.safe_add(this.bit_rol(this.safe_add(this.safe_add(C,F),this.safe_add(A,D)),E),B)},md5_ff:function(C,B,G,F,A,E,D){return this.md5_cmn((B&G)|((~B)&F),C,B,A,E,D)},md5_gg:function(C,B,G,F,A,E,D){return this.md5_cmn((B&F)|(G&(~F)),C,B,A,E,D)},md5_hh:function(C,B,G,F,A,E,D){return this.md5_cmn(B^G^F,C,B,A,E,D)},md5_ii:function(C,B,G,F,A,E,D){return this.md5_cmn(G^(B|(~F)),C,B,A,E,D)},core_hmac_md5:function(C,F){var E=this.str2binl(C);if(E.length>16){E=this.core_md5(E,C.length*this.chrsz)}var A=Array(16),D=Array(16);for(var B=0;B<16;B++){A[B]=E[B]^909522486;D[B]=E[B]^1549556828}var G=this.core_md5(A.concat(this.str2binl(F)),512+F.length*this.chrsz);return this.core_md5(D.concat(G),512+128)},safe_add:function(A,D){var C=(A&65535)+(D&65535);var B=(A>>16)+(D>>16)+(C>>16);return(B<<16)|(C&65535)},bit_rol:function(A,B){return(A<<B)|(A>>>(32-B))},str2binl:function(D){var C=Array();var A=(1<<this.chrsz)-1;for(var B=0;B<D.length*this.chrsz;B+=this.chrsz){C[B>>5]|=(D.charCodeAt(B/this.chrsz)&A)<<(B%32)}return C},binl2str:function(C){var D="";var A=(1<<this.chrsz)-1;for(var B=0;B<C.length*32;B+=this.chrsz){D+=String.fromCharCode((C[B>>5]>>>(B%32))&A)}return D},binl2hex:function(C){var B=this.hexcase?"0123456789ABCDEF":"0123456789abcdef";var D="";for(var A=0;A<C.length*4;A++){D+=B.charAt((C[A>>2]>>((A%4)*8+4))&15)+B.charAt((C[A>>2]>>((A%4)*8))&15)}return D},binl2b64:function(D){var C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var F="";for(var B=0;B<D.length*4;B+=3){var E=(((D[B>>2]>>8*(B%4))&255)<<16)|(((D[B+1>>2]>>8*((B+1)%4))&255)<<8)|((D[B+2>>2]>>8*((B+2)%4))&255);for(var A=0;A<4;A++){if(B*8+A*6>D.length*32){F+=this.b64pad}else{F+=C.charAt((E>>6*(3-A))&63)}}}return F}};$$AC.registerAttributeProcessor(["div","input","button"],"activators",{handle:function(B,A,I){if(I&&(B.nodeName=="DIV"||B.getAttribute("type")=="button"||B.nodeName=="BUTTON")){$$AC.addFieldSet(B,true);var E=I.split(",");if(E.length>0){var D=function(){var L=true;for(var N=0,K=E.length;N<K;N++){var M=$(E[N]);var J=M.validatorValid;if(!J){L=false;break}}B.setAttribute("disabled",!L);B.disabled=!L;if(B.disabled&&B.onActivatorsDisable){B.onActivatorsDisable()}if(!B.disabled&&B.onActivatorsEnable){B.onActivatorsEnable()}};for(var G=0,F=E.length;G<F;G++){var C=E[G];var H=$(C);if(!H){throw"syntax error: invalid field: "+C+" specified for activator on field: "+B.id}if(!$$AC.getFunction(H,"addValidationListener")){throw"syntax error: non-validator field: "+C+" specified for activator on field: "+B.id}$$AC.executeFunction(H,"addValidationListener",[D])}D()}}}});$$AC.registerAttributeProcessor("div","draggable",{handle:function(B,C,D){if(D&&D!="false"){var A=D=="true"?{}:D.evalJSON();var E=new Draggable(B.id,A);$$AC.addTrash(B,function(){E.destroy()})}}});$$AC.registerAttributeProcessor("div","droppable",{handle:function(B,C,D){if(D&&D!="false"){var A=D=="true"?{}:D.evalJSON();A.onHover=function(G){var F=B.hoverListeners;if(F&&F.length>0){for(var H=0;H<F.length;H++){var E=F[H];E.onHover(G)}}};A.onDrop=function(G){var F=B.dropListeners;if(F&&F.length>0){for(var H=0;H<F.length;H++){var E=F[H];E.onDrop(G)}}};Droppables.add(B.id,A);$$AC.addTrash(B,function(){Droppables.remove(B)})}}});$$AC.registerAttributeProcessor(["textarea","input","select"],"fieldset",{handle:function(A,B,C){if(C&&A.getAttribute("type")!="button"){$$AC.addFieldSet(A,false)}var D=A.getAttribute("autocomplete");if(!D){A.setAttribute("autocomplete","off")}}});$$AC.Image={};if($$AB.isIE6){$$AC.registerAttributeProcessor("img","src",{handle:function(A,B,C){if(C){$$AB.fixImage(A,C)}}})}$$AC.registerAttributeProcessor("img","srcexpr",{handle:function(img,attribute,value){if(value){img.src=eval(String.unescapeXML(value));if($$AB.isIE6){$$AB.fixImage(img,img.src)}}}});$$AL.AttributeProcessor={handle:function(B,C,D){if(D){var A=$$AL.get(D);if(!A){Logger.error("couldn't find localization key for "+D);return }switch($$AC.getTagname(B)){case"select":B.options.length=0;for(var F=0;F<A.length;F++){var E=A[F];B.options[B.options.length]=new Option(E.value,E.id)}break;case"option":if(typeof A=="object"){B.text=A.value;B.value=A.id}else{B.value=B.text=A}break;case"input":B.value=A;break;default:B.innerHTML=A;break}}}};$$AR.onload(function(){$$AC.registerAttributeProcessor($$AL.supportedTags,"langid",$$AL.AttributeProcessor)},true);$$AC.registerAttributeProcessor("*","on",{handle:function(A,B,C){if(C){$$AC.parseOnAttribute(A)}}});$$AC.registerAttributeProcessor(["div","img","table"],"resizable",{handle:function(B,C,D){if(D&&D!="false"){var A=D=="true"?{}:D.evalJSON();A.resize=function(G){var F=B.resizeListeners;if(F&&F.length>0){for(var H=0;H<F.length;H++){var E=F[H];E.onResize(G)}}};B.resizable=new Resizeable(B.id,A);$$AC.addTrash(B,function(){B.resizable.destroy()})}}});$$AC.SelectableGroups={};$$AC.addContainerProcessor({process:function(C,A){var B=C.getAttribute("selectable");if(B){A.setAttribute("selectable",B)}}});$$AC.wireSelectable=function(B,L){B=$(B);var R=L;var G=false;var H=R.split(",");if(H.length>1){G=H[1]=="multiselect"}var I=B.id;var D=B.getAttribute("supressAutoStyles")=="true";var Q=$$AC.SelectableGroups[R];if(!Q){var F=G?[]:null;Q={selected:F,members:[]};$$AC.SelectableGroups[R]=Q}var M=function(T,U,V,S){V=V||0;if(!D){if(U){T.setAttribute("selected","true");Element.addClassName(T,"selected")}else{T.removeAttribute("selected");Element.removeClassName(T,"selected")}}$$AC.executeFunction(T,"selected",[U,V,S])};for(var P=0,N=B.childNodes.length;P<N;P++){var C=B.childNodes[P];if(C&&C.nodeType&&C.nodeType==1){var K=$$AC.getAndEnsureId(C);Q.members.push(K);var A={};A.element=C;C.app_selectable=true;var J=function(X,b){X=Event.getEvent(X);var Y=this.element;if(X){var a=Event.element(X);if(a==this.element){if(X._selectedEventSeen){return }X._selectedEventSeen=true}else{var U=a.parentNode;while(U&&U!=$$d.body){if(U.app_selectable){Y=U;if(X._selectedEventSeen){return }if(Y==Q.selected){return }X._selectedEventSeen=true;break}else{U=U.parentNode}}}}b=b!=null?b==true:false;var S=false;var V=b;var T=(!b&&Q.selected&&Q.selected!=Y);if(Q.selected||(b&&!Q.selected)){if(G){var Z=Q.selected.indexOf(Y.id);if(Z>=0){V=true;M(Y,false,Q.selected.length-1,V);Q.selected.removeAt(Z);S=true;return }}else{var a=Q.selected;M(Q.selected,false,T?1:0,true);S=true;Q.selected=null;if(a==Y){return }}}if(!b){var W=1;if(G){Q.selected.push(Y.id);W=Q.selected.length}else{Q.selected=Y}M(Y,true,W,false);S=true}else{if(!S){var Z=Q.selected.indexOf(Y.id);if(Z>=0){M(Y,false,Q.selected.length-1,V);Q.selected.removeAt(Z);S=true;return }Logger.warn("not removed on unselected "+Y.id+",current="+Q.selected.join(","))}}};var O=J.bind(A);var E=function(){J.apply(this,[null,true])}.bind(A);$$AC.attachFunction(C,"unselect",E);Event.observe(C,"click",O,false);$$AC.addTrash(C,function(){J.apply(this,[null,true]);Q.members.remove(this.element.id);Event.stopObserving(this.element,"click",O)}.bind(A))}}};$$AC.registerAttributeProcessor(["div","ul","ol","tr"],"selectable",{handle:function(A,B,C){if(C){$$AC.wireSelectable(A,C)}}});$$AC.registerAttributeProcessor(["div","ul","ol"],"sortable",{handle:function(B,C,D){if(D&&D!="false"){var A=D=="true"?{}:D.evalJSON();if(!A.tag){Element.cleanWhitespace(B);var E=B.down();if(E){A.tag=$$AC.getTagname(E)}}Sortable.create(B.id,A);$$AC.addTrash(B,function(){Sortable.destroy(B)})}}});$$AC.registerAttributeProcessor(["textarea","input","select"],"validator",{handle:function(H,B,J){if(J&&H.getAttribute("type")!="button"){var G=Appcelerator.Validator[J];if(!G){throw"syntax error: validator specified is not registered: "+J}var G=Appcelerator.Validator[J];var J=$$AC.getInputFieldValue(H,true,true);H.validatorValid=G(J,H)||false;var D=H.getAttribute("decorator");var F=null,K=null;if(D){F=Appcelerator.Decorator[D];if(!F){throw"syntax error: decorator specified is not registered: "+D}K=F?H.getAttribute("decoratorId"):null}var A=null;var E=0;var C=function(){E=0;$$AC.executeFunction(H,"revalidate")};$$AC.installChangeListener(H,function(){if(A){clearTimeout(A);A=null}if(E++<10){A=setTimeout(C,100)}else{C()}return true});var I=[];$$AC.attachFunction(H,"revalidate",function(){var O=$$AC.getInputFieldValue(H,true,true);var M=G(O,H);var Q=M==H.validatorValid;H.validatorValid=M;if(F){F.apply(Appcelerator.Decorator,[H,H.validatorValid,K])}if(Q){return M}if(I.length>0){for(var P=0,L=I.length;P<L;P++){var N=I[P];N.apply(N,[H,H.validatorValid])}}return H.validatorValid});$$AC.attachFunction(H,"removeValidationListener",function(M){var L=I.indexOf(M);if(L>=0){I.removeAt(L)}});$$AC.attachFunction(H,"addValidationListener",function(L){I.push(L)});$$AC.addTrash(H,function(){I=null});$$AC.executeFunction(H,"revalidate")}}});$$AU.UUID={dateSeed:new Date().getTime(),generateNewId:function(){var B=Math.round(9999999999*Math.random());var A=Math.round(9999999999*Math.random());var C=Math.round(this.dateSeed*Math.random());return B+"-"+A+"-"+C}};Object.extend(Appcelerator.Validator,{toString:function(){return"[Appcelerator.Validator]"},uniqueId:0,required:function(A){if(null==A){return false}if(typeof (A)=="boolean"){return A}A=""+A;return A.trim().length>0},EMAIL_REGEXP:/^([a-zA-Z0-9_.+-])+@[a-zA-Z0-9-]+[\.]([a-zA-Z0-9]{2,6})([\.][a-zA-Z0-9]{2,6}){0,1}$/,email_optional:function(A){if(!A||A.trim().length==0){return true}return $$AV.EMAIL_REGEXP.test(A)},email:function(A){return $$AV.EMAIL_REGEXP.test(A)},fullname_optional:function(A){if(!A||A.trim().length==0){return true}return $$AV.fullname(A)},fullname:function(A){return((A.split(" ")).length>1)},noSpaces_optional:function(A){if(!A){return true}return $$AV.noSpaces(A)},noSpaces:function(A){if(!$$AV.required(A)){return false}return A.indexOf(" ")==-1},password_optional:function(A){if(!A||A.trim().length==0){return true}return $$AV.password(A)},password:function(A){return(A.length>=6)},decimal_regexp:/^[-]?([1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|\.[0-9]{1,2})$/,number:function(A){if(!A||A.trim().length==0||A<0){return false}return $$AV.decimal_regexp.test(A)},number_optional:function(A){if(!A||A.trim().length==0){return true}return $$AV.number(A)},wholenumber_optional:function(A){if(!A||A.trim().length==0){return true}return $$AV.wholenumber(A)},wholenumber:function(B){if(!B||B<0){return false}for(var A=0;A<B.length;A++){var C=B.charAt(A);if(((C<"0")||(C>"9"))){return false}}return true},uri_regexp:/(ftp|http|https|file):(\/){1,2}(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,url_optional:function(A){if(!A||A.trim().length==0){return true}return $$AV.url(A)},url:function(A){return $$AV.uri_regexp.test(A)},checked:function(A){return A||A=="on"},length:function(E,D){if(E){try{var C=parseInt(D.getAttribute("validatorMinLength")||"1");var A=parseInt(D.getAttribute("validatorMaxLength")||"999999");var B=E.length;return B>=C&&B<=A}catch(F){}}return false},ALPHANUM_REGEX:/^[0-9a-zA-Z]+$/,alphanumeric_optional:function(B,A){if(!B||B.trim().length==0){return true}return $$AV.ALPHANUM_REGEX.test(B)==true},alphanumeric:function(B,A){return $$AV.ALPHANUM_REGEX.test(B)==true},dtCh:"/",minYear:1900,maxYear:2100,stripCharsInBag:function(C,D){var B;var A="";for(B=0;B<C.length;B++){var E=C.charAt(B);if(D.indexOf(E)==-1){A+=E}}return A},daysInFebruary:function(A){return(((A%4==0)&&((!(A%100==0))||(A%400==0)))?29:28)},DaysArray:function(B){for(var A=1;A<=B;A++){this[A]=31;if(A==4||A==6||A==9||A==11){this[A]=30}if(A==2){this[A]=29}}return this},date_optional:function(A){if(!A||A.trim().length==0){return true}return $$AV.date(A)},date:function(I){var A=$$AV.DaysArray(12);var H=I.indexOf($$AV.dtCh);var G=I.indexOf($$AV.dtCh,H+1);var F=I.substring(0,H);var B=I.substring(H+1,G);var C=I.substring(G+1);strYr=C;if(B.charAt(0)=="0"&&B.length>1){B=B.substring(1)}if(F.charAt(0)=="0"&&F.length>1){F=F.substring(1)}for(var E=1;E<=3;E++){if(strYr.charAt(0)=="0"&&strYr.length>1){strYr=strYr.substring(1)}}month=parseInt(F);day=parseInt(B);year=parseInt(strYr);if(H==-1||G==-1){return false}if(F.length<1||month<1||month>12){return false}if(B.length<1||day<1||day>31||(month==2&&day>$$AV.daysInFebruary(year))||day>A[month]){return false}if(C.length!=4||year==0||year<$$AV.minYear||year>$$AV.maxYear){return false}var D=month+"/"+day+"/"+year;if(I.indexOf(Appcelerator.dtCh,G+1)!=-1||$$AV.number($$AV.stripCharsInBag(D,$$AV.dtCh))==false){return false}return true}})
@@ -0,0 +1 @@
1
+ Appcelerator.Module.Box={getName:function(){return"appcelerator box"},getDescription:function(){return"box widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Nolan Wright"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:box"},getAttributes:function(){return[{name:"mode",optional:false,description:"Vertical or horizontal alignment"},{name:"width",optional:true,defaultValue:"100%"},{name:"verticalAlign",optional:true,defaultValue:"top"},{name:"cellpadding",optional:true,defaultValue:"0"}]},buildWidget:function(E,L){var H=L["mode"];var A=L["width"];var C=L["verticalAlign"];var F=L["cellpadding"];var G='<div style="width:'+A+";";G+="margin-top:"+parseInt(Element.getStyle(E,"margin-top")||E.getAttribute("margin")||0)+"px;";G+="margin-bottom:"+parseInt(Element.getStyle(E,"margin-bottom")||E.getAttribute("margin")||0)+"px;";G+="margin-left:"+parseInt(Element.getStyle(E,"margin-left")||E.getAttribute("margin")||0)+"px;";G+="margin-right:"+parseInt(Element.getStyle(E,"margin-right")||E.getAttribute("margin")||0)+"px;";G+="padding-top:"+parseInt(Element.getStyle(E,"padding-top")||E.getAttribute("padding")||0)+"px;";G+="padding-bottom:"+parseInt(Element.getStyle(E,"padding-bottom")||E.getAttribute("padding")||0)+"px;";G+="padding-left:"+parseInt(Element.getStyle(E,"padding-left")||E.getAttribute("padding")||0)+"px;";G+="padding-right:"+parseInt(Element.getStyle(E,"padding-right")||E.getAttribute("padding")||0)+"px;";G+="border-top:"+(Element.getStyle(E,"border-top")||E.getAttribute("border")||"none")+";";G+="border-bottom:"+(Element.getStyle(E,"border-bottom")||E.getAttribute("border")||"none")+";";G+="border-left:"+(Element.getStyle(E,"border-left")||E.getAttribute("border")||"none")+";";G+="border-right:"+(Element.getStyle(E,"border-right")||E.getAttribute("border")||"none")+";";G+="background-color:"+(Element.getStyle(E,"background-color")||E.getAttribute("background-color")||"transparent")+";";G+='">';G+='<table border="1" width="100%" cellspacing="0" cellpadding="0">';if(Appcelerator.Browser.isIE){var K=E.innerHTML;K=Appcelerator.Compiler.specialMagicParseHtml(K);E.innerHTML=K}if(H=="vertical"){for(var J=0,I=E.childNodes.length;J<I;J++){var B=E.childNodes[J];if(B.nodeType==1){G+="<tr>";var D="";if(B.getAttribute("width")){D=' width="'+B.getAttribute("width")+'" '}if(F){G+="<td "+D+' valign="'+C+'" style="padding:'+F+'">'}else{G+="<td "+D+' valign="'+C+'">'}if(Appcelerator.Browser.isIE){G+=B.outerHTML}else{G+=Appcelerator.Util.Dom.toXML(B,true,Appcelerator.Compiler.getTagname(B))}G+="</td></tr>"}}}else{if(H=="horizontal"){G+="<tr>";for(var J=0,I=E.childNodes.length;J<I;J++){var B=E.childNodes[J];if(B.nodeType==1){var D="";if(B.getAttribute("width")){D=' width="'+B.getAttribute("width")+'" '}if(F){G+="<td "+D+' valign="'+C+'" style="padding:'+F+'">'}else{G+="<td "+D+' valign="'+C+'" >'}if(Appcelerator.Browser.isIE){G+=B.outerHTML}else{G+=Appcelerator.Util.Dom.toXML(B,true,Appcelerator.Compiler.getTagname(B))}G+="</td>"}}G+="</tr>"}}G+="</table></div>";return{"presentation":Appcelerator.Compiler.specialMagicParseHtml(G),"position":Appcelerator.Compiler.POSITION_REPLACE,"wire":true}}};Appcelerator.Core.registerModule("app:box",Appcelerator.Module.Box)
@@ -0,0 +1 @@
1
+ Appcelerator.Module.Button={getName:function(){return"appcelerator button"},getDescription:function(){return"button widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Hamed Hashemi"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:button"},getActions:function(){return["enable","disable"]},getAttributes:function(){return[{name:"on",optional:true},{name:"width",optional:true,defaultValue:200},{name:"disabled",optional:true,defaultValue:"false"},{name:"corner",optional:true,defaultValue:"round"},{name:"color",optional:true,defaultValue:"dark"},{name:"icon",optional:true,defaultValue:""},{name:"fieldset",optional:true},{name:"activators",optional:true}]},dontParseOnAttributes:function(){return true},compileWidget:function(H){var A=H["id"];var E=$(A);var B=$(A+"_left");var I=$(A+"_middle");var G=$(A+"_right");var F=H["corner"];var C=H["color"];var D="";if(H["disabled"]=="true"){$(A).disabled=true;D="_disabled"}E.onmouseover=function(){if(H["disabled"]!="true"){B.className="button_"+C+"_"+F+"_left_over";I.className="button_"+C+"_"+F+"_middle_over button_"+C+"_text";G.className="button_"+C+"_"+F+"_right_over";if(Appcelerator.Browser.isIE6){Appcelerator.Browser.fixBackgroundPNG(B);Appcelerator.Browser.fixBackgroundPNG(I);Appcelerator.Browser.fixBackgroundPNG(G)}}};E.onmouseout=function(){if(H["disabled"]!="true"){B.className="button_"+C+"_"+F+"_left";I.className="button_"+C+"_"+F+"_middle button_"+C+"_text";G.className="button_"+C+"_"+F+"_right";if(Appcelerator.Browser.isIE6){Appcelerator.Browser.fixBackgroundPNG(B);Appcelerator.Browser.fixBackgroundPNG(I);Appcelerator.Browser.fixBackgroundPNG(G)}}};E.onmousedown=function(){if(H["disabled"]!="true"){B.className="button_"+C+"_"+F+"_left_press";I.className="button_"+C+"_"+F+"_middle_press button_"+C+"_text";G.className="button_"+C+"_"+F+"_right_press";if(Appcelerator.Browser.isIE6){Appcelerator.Browser.fixBackgroundPNG(B);Appcelerator.Browser.fixBackgroundPNG(I);Appcelerator.Browser.fixBackgroundPNG(G)}}};E.onmouseup=function(){if(H["disabled"]!="true"){B.className="button_"+C+"_"+F+"_left_over";I.className="button_"+C+"_"+F+"_middle_over button_"+C+"_text";G.className="button_"+C+"_"+F+"_right_over";if(Appcelerator.Browser.isIE6){Appcelerator.Browser.fixBackgroundPNG(B);Appcelerator.Browser.fixBackgroundPNG(I);Appcelerator.Browser.fixBackgroundPNG(G)}}};if(H["activators"]){E.onActivatorsDisable=function(){Appcelerator.Module.Button.disable(A,H)};E.onActivatorsEnable=function(){Appcelerator.Module.Button.enable(A,H)}}},enable:function(A,I,D,J,F){var A=I["id"];var E=$(A);var C=I["color"];var G=I["corner"];var B=$(A+"_left");var K=$(A+"_middle");var H=$(A+"_right");I["disabled"]="";B.className="button_"+C+"_"+G+"_left";K.className="button_"+C+"_"+G+"_middle button_"+C+"_text";H.className="button_"+C+"_"+G+"_right";E.className="button_widget";if(Appcelerator.Browser.isIE6){Appcelerator.Browser.fixBackgroundPNG(B);Appcelerator.Browser.fixBackgroundPNG(K);Appcelerator.Browser.fixBackgroundPNG(H)}$(A).disabled=false},disable:function(A,I,D,J,F){var A=I["id"];var E=$(A);var G=I["corner"];var C=I["color"];var B=$(A+"_left");var K=$(A+"_middle");var H=$(A+"_right");I["disabled"]="true";B.className="button_"+C+"_"+G+"_left_disabled";K.className="button_"+C+"_"+G+"_middle_disabled button_"+C+"_text_disabled";H.className="button_"+C+"_"+G+"_right_disabled";E.className="button_widget_disabled";if(Appcelerator.Browser.isIE6){Appcelerator.Browser.fixBackgroundPNG(B);Appcelerator.Browser.fixBackgroundPNG(K);Appcelerator.Browser.fixBackgroundPNG(H)}$(A).disabled=true},buildWidget:function(C,H){var G=Appcelerator.Compiler.getHtml(C);var F=H["corner"];var A=H["color"];var E=H["icon"];if(H["icon"]!=""){E="button_icon_"+H["icon"]}var D="";if(H["disabled"]=="true"){D="_disabled"}var B='<button class="button_widget'+D+'" id="'+C.id+'" style="width:'+H["width"]+'px" on="'+H["on"]+'"';if(H["fieldset"]){B+=' fieldset="'+H["fieldset"]+'"'}if(H["activators"]){B+=' activators="'+H["activators"]+'"'}B+=">";B+='<table class="button_table" border="0" cellpadding="0" cellspacing="0" width="100%">';B+="<tr>";B+='<td class="button_'+A+"_"+F+"_left"+D+'" id="'+C.id+'_left">';B+="</td>";B+='<td class="button_'+A+"_"+F+"_middle"+D+" button_"+A+"_text"+D+'" id="'+C.id+'_middle" align="middle">';B+='<div align="center"><table cellpadding="0" cellspacing="0" border="0"><tr><td><div style="margin-right: 10px">'+G+"</div></td>";B+='<td class="'+E+'"/></td></tr></table></div></td>';B+='<td class="button_'+A+"_"+F+"_right"+D+'" id="'+C.id+'_right">';B+="</td>";B+="</tr>";B+="</table>";B+="</button>";return{"presentation":B,"position":Appcelerator.Compiler.POSITION_REPLACE,"compile":true,"wire":true}}};Appcelerator.Core.loadModuleCSS("app:button","button.css");Appcelerator.Core.registerModule("app:button",Appcelerator.Module.Button)
@@ -0,0 +1 @@
1
+ .button_table{padding:0;margin:0;}.button_widget{border:none;background:none;cursor:pointer;}.button_widget_disabled{border:none;background:none;cursor:normal;}.button_dark_text,.button_dark_text_disabled,.button_light_text,.button_light_text_disabled{font-family:Tahoma;font-weight:bold;font-size:12px;padding-left:7px;padding-right:7px;padding-bottom:1px;}.button_dark_text{color:#f7f7f7;}.button_dark_text_disabled{color:#efefef;}.button_light_text{color:#727272;}.button_light_text_disabled{color:#939393;}.button_dark_round_left{background-image:url('../images/dark_round_left.png');height:32px;width:9px;}.button_dark_round_middle{background-image:url('../images/dark_round_middle.png');background-repeat:repeat-x;}.button_dark_round_right{background-image:url('../images/dark_round_right.png');height:32px;width:9px;}.button_dark_round_left_over{background-image:url('../images/dark_round_left_over.png');height:32px;width:9px;}.button_dark_round_middle_over{background-image:url('../images/dark_round_middle_over.png');background-repeat:repeat-x;}.button_dark_round_right_over{background-image:url('../images/dark_round_right_over.png');height:32px;width:9px;}.button_dark_round_left_press{background-image:url('../images/dark_round_left_press.png');height:32px;width:9px;}.button_dark_round_middle_press{background-image:url('../images/dark_round_middle_press.png');background-repeat:repeat-x;}.button_dark_round_right_press{background-image:url('../images/dark_round_right_press.png');height:32px;width:9px;}.button_dark_round_left_disabled{background-image:url('../images/dark_round_left_disabled.png');height:32px;width:9px;}.button_dark_round_middle_disabled{background-image:url('../images/dark_round_middle_disabled.png');background-repeat:repeat-x;}.button_dark_round_right_disabled{background-image:url('../images/dark_round_right_disabled.png');height:32px;width:9px;}.button_dark_square_left{background-image:url('../images/dark_square_left.png');height:32px;width:9px;}.button_dark_square_middle{background-image:url('../images/dark_square_middle.png');background-repeat:repeat-x;}.button_dark_square_right{background-image:url('../images/dark_square_right.png');height:32px;width:9px;}.button_dark_square_left_over{background-image:url('../images/dark_square_left_over.png');height:32px;width:9px;}.button_dark_square_middle_over{background-image:url('../images/dark_square_middle_over.png');background-repeat:repeat-x;}.button_dark_square_right_over{background-image:url('../images/dark_square_right_over.png');height:32px;width:9px;}.button_dark_square_left_press{background-image:url('../images/dark_square_left_press.png');height:32px;width:9px;}.button_dark_square_middle_press{background-image:url('../images/dark_square_middle_press.png');background-repeat:repeat-x;}.button_dark_square_right_press{background-image:url('../images/dark_square_right_press.png');height:32px;width:9px;}.button_dark_square_left_disabled{background-image:url('../images/dark_square_left_disabled.png');height:32px;width:9px;}.button_dark_square_middle_disabled{background-image:url('../images/dark_square_middle_disabled.png');background-repeat:repeat-x;}.button_dark_square_right_disabled{background-image:url('../images/dark_square_right_disabled.png');height:32px;width:9px;}.button_light_round_left{background-image:url('../images/light_round_left.png');height:32px;width:9px;}.button_light_round_middle{background-image:url('../images/light_round_middle.png');background-repeat:repeat-x;}.button_light_round_right{background-image:url('../images/light_round_right.png');height:32px;width:9px;}.button_light_round_left_over{background-image:url('../images/light_round_left_over.png');height:32px;width:9px;}.button_light_round_middle_over{background-image:url('../images/light_round_middle_over.png');background-repeat:repeat-x;}.button_light_round_right_over{background-image:url('../images/light_round_right_over.png');height:32px;width:9px;}.button_light_round_left_press{background-image:url('../images/light_round_left_press.png');height:32px;width:9px;}.button_light_round_middle_press{background-image:url('../images/light_round_middle_press.png');background-repeat:repeat-x;}.button_light_round_right_press{background-image:url('../images/light_round_right_press.png');height:32px;width:9px;}.button_light_round_left_disabled{background-image:url('../images/light_round_left_disabled.png');height:32px;width:9px;}.button_light_round_middle_disabled{background-image:url('../images/light_round_middle_disabled.png');background-repeat:repeat-x;}.button_light_round_right_disabled{background-image:url('../images/light_round_right_disabled.png');height:32px;width:9px;}.button_light_square_left{background-image:url('../images/light_square_left.png');height:32px;width:9px;}.button_light_square_middle{background-image:url('../images/light_square_middle.png');background-repeat:repeat-x;}.button_light_square_right{background-image:url('../images/light_square_right.png');height:32px;width:9px;}.button_light_square_left_over{background-image:url('../images/light_square_left_over.png');height:32px;width:9px;}.button_light_square_middle_over{background-image:url('../images/light_square_middle_over.png');background-repeat:repeat-x;}.button_light_square_right_over{background-image:url('../images/light_square_right_over.png');height:32px;width:9px;}.button_light_square_left_press{background-image:url('../images/light_square_left_press.png');height:32px;width:9px;}.button_light_square_middle_press{background-image:url('../images/light_square_middle_press.png');background-repeat:repeat-x;}.button_light_square_right_press{background-image:url('../images/light_square_right_press.png');height:32px;width:9px;}.button_light_square_left_disabled{background-image:url('../images/light_square_left_disabled.png');height:32px;width:9px;}.button_light_square_middle_disabled{background-image:url('../images/light_square_middle_disabled.png');background-repeat:repeat-x;}.button_light_square_right_disabled{background-image:url('../images/light_square_right_disabled.png');height:32px;width:9px;}.button_icon_add_green{background-repeat:no-repeat;background-image:url('../images/icon_add_green.png');height:17px;width:17px;}.button_icon_add_gray{background-repeat:no-repeat;background-image:url('../images/icon_add_gray.png');height:17px;width:17px;}.button_icon_delete_red{background-repeat:no-repeat;background-image:url('../images/icon_delete_red.png');height:17px;width:17px;}.button_icon_delete_gray{background-repeat:no-repeat;background-image:url('../images/icon_delete_gray.png');height:17px;width:17px;}.button_icon_edit_yellow{background-repeat:no-repeat;background-image:url('../images/icon_edit_yellow.png');height:17px;width:17px;}.button_icon_edit_gray{background-repeat:no-repeat;background-image:url('../images/icon_edit_gray.png');height:17px;width:17px;}.button_icon_save_blue{background-repeat:no-repeat;background-image:url('../images/icon_save_blue.png');height:17px;width:17px;}.button_icon_save_gray{background-repeat:no-repeat;background-image:url('../images/icon_save_gray.png');height:17px;width:17px;}
@@ -1 +1 @@
1
- Appcelerator.Module.Calendar={calendarCount:0,getName:function(){return"appcelerator calendar"},getDescription:function(){return"calendar widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Nolan Wright"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:calendar"},getAttributes:function(){return[{name:"on",optional:true,description:"May be used to execute the calendar."},{name:"inputId",optional:true},{name:"elementId",optional:true},{name:"minDate",optional:true},{name:"title",optional:true,defaultValue:""}]},execute:function(E,A,D,C,B){Element.show($(A["name"]))},compileWidget:function(I){var H=I["inputId"];var F=I["elementId"];var C=I["minDate"];var G=I["title"];var A="app_calendar_"+this.calendarCount++;var B=I["id"];var A=I["name"];var E=null;if(F){E=$(F)}else{E=$(H)}YAHOO.namespace("appcelerator.calendar");var D=$(A);if(C){YAHOO.appcelerator.calendar[A]=new YAHOO.widget.Calendar(A+"_cal",A,{close:false,mindate:C,title:G})}else{YAHOO.appcelerator.calendar[A]=new YAHOO.widget.Calendar(A+"_cal",A,{close:true,title:G})}YAHOO.appcelerator.calendar[A].render();YAHOO.appcelerator.calendar[A].selectEvent.subscribe(function(M,K,P){var O=K[0];var J=O[0];var L=J[0];var N=J[1];var J=J[2];if(H){E.value=N+"/"+J+"/"+L;Appcelerator.Compiler.executeFunction(E,"revalidate")}else{E.innerHTML=N+"/"+J+"/"+L}Element.hide(D)},YAHOO.appcelerator.calendar[A],true)},buildWidget:function(B,C){if(!C["inputId"]&&!C["elementId"]){throw"inputId or elementId is required"}C["name"]="app_calendar_"+Appcelerator.Module.Calendar.calendarCount++;var A='<div style="position:absolute;z-index:1000;display:none" id="'+C["name"]+'"></div>';return{"position":Appcelerator.Compiler.POSITION_REPLACE,"presentation":A,"functions":["execute"],"compile":true}}};Appcelerator.Core.registerModuleWithJS("app:calendar",Appcelerator.Module.Calendar,["yahoo.js","event.js","dom.js","calendar.js"]);Appcelerator.Core.loadModuleCSS("app:calendar","calendar.css")
1
+ Appcelerator.Module.Calendar={calendarCount:0,getName:function(){return"appcelerator calendar"},getDescription:function(){return"calendar widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Nolan Wright"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:calendar"},getActions:function(){return["execute"]},getAttributes:function(){return[{name:"on",optional:true,description:"May be used to execute the calendar."},{name:"inputId",optional:true},{name:"elementId",optional:true},{name:"minDate",optional:true},{name:"title",optional:true,defaultValue:""}]},execute:function(E,A,D,C,B){Element.show($(A["name"]))},compileWidget:function(I){var H=I["inputId"];var F=I["elementId"];var C=I["minDate"];var G=I["title"];var A="app_calendar_"+this.calendarCount++;var B=I["id"];var A=I["name"];var E=null;if(F){E=$(F)}else{E=$(H)}YAHOO.namespace("appcelerator.calendar");var D=$(A);if(C){YAHOO.appcelerator.calendar[A]=new YAHOO.widget.Calendar(A+"_cal",A,{close:false,mindate:C,title:G})}else{YAHOO.appcelerator.calendar[A]=new YAHOO.widget.Calendar(A+"_cal",A,{close:true,title:G})}YAHOO.appcelerator.calendar[A].render();YAHOO.appcelerator.calendar[A].selectEvent.subscribe(function(M,K,P){var O=K[0];var J=O[0];var L=J[0];var N=J[1];var J=J[2];if(H){E.value=N+"/"+J+"/"+L;Appcelerator.Compiler.executeFunction(E,"revalidate")}else{E.innerHTML=N+"/"+J+"/"+L}Element.hide(D)},YAHOO.appcelerator.calendar[A],true)},buildWidget:function(B,C){if(!C["inputId"]&&!C["elementId"]){throw"inputId or elementId is required"}C["name"]="app_calendar_"+Appcelerator.Module.Calendar.calendarCount++;var A='<div style="position:absolute;z-index:1000;display:none" id="'+C["name"]+'"></div>';return{"position":Appcelerator.Compiler.POSITION_REPLACE,"presentation":A,"compile":true}}};Appcelerator.Core.registerModuleWithJS("app:calendar",Appcelerator.Module.Calendar,["yahoo.js","event.js","dom.js","calendar.js"]);Appcelerator.Core.loadModuleCSS("app:calendar","calendar.css")
@@ -1 +1 @@
1
- Appcelerator.Module.Chart={flashRequired:true,flashVersion:8,getName:function(){return"appcelerator chart"},getDescription:function(){return"chart widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Amro Mousa"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:chart"},getAttributes:function(){return[{name:"on",optional:true,description:"Used to display the chart."},{name:"type",optional:true,defaultValue:""},{name:"title",optional:true,defaultValue:""},{name:"color",optional:true,defaultValue:"#477398"},{name:"angle",optional:true,defaultValue:"15"},{name:"thickness",optional:true,defaultValue:"15"},{name:"width",optional:true,defaultValue:"400"},{name:"height",optional:true,defaultValue:"360"},{name:"chartMode",optional:true,defaultValue:"clustered"},{name:"barOrientation",optional:true,defaultValue:"400"},{name:"rotateXAxisLabel",optional:true,defaultValue:"vertical"},{name:"rotateYAxisLabel",optional:true,defaultValue:"false"},{name:"legend",optional:true,defaultValue:"false"},{name:"brightness_step",optional:true,defaultValue:"15"},{name:"textSize",optional:true,defaultValue:"11"},{name:"property",optional:true,defaultValue:""},{name:"chartTitles",optional:true,defaultValue:""},{name:"fillAlpha",optional:true,defaultValue:"30"},{name:"indicator",optional:true,defaultValue:"false"},{name:"marginTop",optional:true,defaultValue:"50"},{name:"marginLeft",optional:true,defaultValue:"50"},{name:"marginRight",optional:true,defaultValue:"50"},{name:"marginBottom",optional:true,defaultValue:"50"},{name:"legendHighlight",optional:true,defaultValue:"true"},{name:"backgroundColor",optional:true,defaultValue:"true"},{name:"marginTop",optional:true,defaultValue:"#FFFFFF"}]},buildWidget:function(B,C){var A='<div id="'+B.id+'"></div>';return{"presentation":A,"position":Appcelerator.Compiler.POSITION_REPLACE,"parameters":C,"functions":["execute"]}},execute:function(Z,d,k){var o=d["type"];var V=d["title"];var S=d["color"];var L=d["angle"];var K=d["thickness"];var A=d["width"];var D=d["height"];var b=d["chartMode"];var O=d["barOrientation"];var E=d["rotateXAxisLabel"];var P=d["rotateYAxisLabel"];var G=d["legend"];var c=d["brightness_step"];var m=d["property"];var X=d["chartTitles"];var T=d["textSize"];var I=d["fillAlpha"];var Y=d["indicator"];var e=d["marginTop"];var F=d["marginLeft"];var n=d["marginRight"];var W=d["marginBottom"];var Q=d["legendHighlight"];var U=d["oneBalloon"];var B=d["backgroundColor"];if(O.toLowerCase()!="vertical"&&O.toLowerCase()!="horizontal"){O=Object.getNestedProperty(k,O)||"vertical"}if(O.toLowerCase()=="horizontal"){O="bar"}else{O="column"}if(E.toLowerCase()=="true"){E=90}else{E=0}if(P.toLowerCase()=="true"){P=90}else{P=0}if(m){array=Object.getNestedProperty(k,m)||[];d["data"]=array}else{array=[]}if(V!=""){var l=Object.getNestedProperty(k,V);if(l==null){l="*[No Title]*"}if(l!="*[No Title]*"){V=l}}var R="";for(var j=0,M=array.length;j<M;j++){R+=array[j]["name"]+","+array[j]["value"]+"\n"}if(o.toLowerCase()!="bar"&&o.toLowerCase()!="pie"&&o.toLowerCase()!="line"&&o.toLowerCase()!=""){o=Object.getNestedProperty(k,o)||""}if(o.toLowerCase()=="bar"&&(b.toLowerCase()!="clustered"&&b.toLowerCase()!="stacked"&&b.toLowerCase()!="100% stacked")){b=Object.getNestedProperty(k,b)||"clustered"}if(o.toLowerCase()=="line"&&(b.toLowerCase()!="line"&&b.toLowerCase()!="stacked"&&b.toLowerCase()!="100% stacked")){b=Object.getNestedProperty(k,b)||"line"}if(G.toLowerCase()!="true"&&G.toLowerCase()!="false"){G=Object.getNestedProperty(k,G)||"false"}var f=S.split(",");if(f.length>1&&o.toLowerCase()=="pie"){f=S;S="";c=""}else{if(f.length==1&&o.toLowerCase()=="pie"){f=""}}if(f.length>1&&o.toLowerCase()=="bar"){S=f[0]}var h="";if(o.toLowerCase()=="bar"||o.toLowerCase()=="line"){titleArray=Object.getNestedProperty(k,X)||[];d["titleArray"]=titleArray;var N="";if(o.toLowerCase()=="bar"){N='<graph gid="{COL_NUM}"><type>column</type><title>{COL_TITLE}</title><color>{COL_COLOR}</color><alpha></alpha><data_labels><![CDATA[]]></data_labels><fill_alpha>'+I+"</fill_alpha></graph>"}else{if(o.toLowerCase()=="line"){N="<graph><axis>left</axis><title>{COL_TITLE}</title><color>{COL_COLOR}</color><color_hover>FF0000</color_hover><fill_alpha>"+I+"</fill_alpha><balloon_text><![CDATA[{COL_TITLE} {value}]]></balloon_text></graph>"}}var a="";for(var j=0,M=titleArray.length;j<M;j++){a+=N.gsub("{COL_NUM}",j.toString()).gsub("{COL_TITLE}",titleArray[j]["title"]).gsub("{COL_COLOR}",f[j]||"")}if(titleArray.length==0){if(o.toLowerCase()=="bar"){chartTitles='<graph gid="0"><type>column</type><title></title><color>'+S+"</color><alpha></alpha><data_labels><![CDATA[]]></data_labels><fill_alpha>"+I+"</fill_alpha><width></width><bullet></bullet><bullet_size></bullet_size><bullet_color></bullet_color><gradient_fill_colors></gradient_fill_colors></graph>"}else{(o.toLowerCase()=="line")}chartTitles="<graph><axis>left</axis><title></title><color>"+S+"</color><color_hover>#FF0000</color_hover><fill_alpha>"+I+"</fill_alpha><balloon_text><![CDATA[]]></balloon_text></graph>"}else{chartTitles=a}var C=(titleArray.length>0)?"{title}":"{series}";if(b.toLowerCase()=="stacked"){h="<balloon_text><![CDATA["+C+": {value}]]></balloon_text>"}else{if(b.toLowerCase()=="100% stacked"){h="<balloon_text><![CDATA["+C+": {percents}%]]></balloon_text>"}else{if(b.toLowerCase()=="clustered"){h="<balloon_text><![CDATA["+C+": {value}]]></balloon_text>"}else{if(b.toLowerCase()=="line"){h="<balloon_text><![CDATA["+C+": {value}]]></balloon_text>"}}}}}var g=G?Math.floor(D*0.06):0;var J=D-g;var H;if(o.toLowerCase()=="pie"){H=new SWFObject(Appcelerator.DocumentPath+"swf/ampie.swf","ampie",A,D,"8","#FFFFFF");H.addVariable("chart_settings",escape("<settings><width/><height/><data_type>csv</data_type><csv_separator>,</csv_separator><skip_rows>0</skip_rows><font>Arial</font><text_size>"+T+"</text_size><text_color>#000000</text_color><decimals_separator>.</decimals_separator><thousands_separator>,</thousands_separator><redraw/><reload_data_interval/><add_time_stamp>false</add_time_stamp><precision>2</precision><export_image_file/><exclude_invisible/><pie><x/><y></y><radius>90</radius><inner_radius>30</inner_radius><height>"+K+"</height><angle>"+L+"</angle><outline_color/><outline_alpha/><!-- main color --><base_color>"+S+"</base_color><brightness_step>"+c+"</brightness_step><colors>"+f+"</colors><link_target/><alpha/></pie><animation><start_time>2</start_time><start_effect>strong</start_effect><start_radius/><start_alpha>0</start_alpha><pull_out_on_click/><pull_out_time>1.5</pull_out_time><pull_out_effect>Bounce</pull_out_effect><pull_out_radius/><pull_out_only_one/></animation><data_labels><radius/><text_color/><text_size/><max_width>140</max_width><show><![CDATA[{title}: {percents}%]]></show><show_lines/><line_color/><line_alpha/><hide_labels_percent>3</hide_labels_percent></data_labels><group><percent/><color/><title/><url/><description/><pull_out/></group><background><color>"+B+"</color><alpha>100</alpha><border_color/><border_alpha/><file/></background><balloon><enabled/><color/><alpha>80</alpha><text_color/><text_size/><show><![CDATA[{title}: {percents}%]]></show></balloon><legend><enabled>"+G+"</enabled><x/><y/><width/><color>#FFFFFF</color><max_columns/><alpha>0</alpha><border_color>#000000</border_color><border_alpha>0</border_alpha><text_color/><text_size/><spacing>5</spacing><margins>0</margins><key><size>16</size><border_color/></key></legend><strings><no_data/><export_as_image/><collecting_data/></strings><labels><label><x>0</x><y>10</y><rotate>false</rotate><width/><align>center</align><text_color/><text_size>"+T+"</text_size><text>"+V+"</text></label></labels></settings>"))}else{if(o.toLowerCase()=="bar"){H=new SWFObject(Appcelerator.DocumentPath+"swf/amcolumn.swf","amcolumn",A,D,"8","#FFFFFF");H.addVariable("chart_settings",escape("<settings><type>"+O+"</type><width></width><height>"+J+"</height><data_type>csv</data_type><csv_separator>,</csv_separator><skip_rows>0</skip_rows><font>Arial</font><text_size>"+T+"</text_size><text_color>#000000</text_color><decimals_separator>.</decimals_separator><thousands_separator>,</thousands_separator><redraw>false</redraw><reload_data_interval>0</reload_data_interval><add_time_stamp>false</add_time_stamp><precision>2</precision><depth>"+K+"</depth><angle>"+L+"</angle><export_image_file></export_image_file><column><type>"+b+"</type><width>60</width><spacing>1</spacing><grow_time>1</grow_time><grow_effect>strong</grow_effect><alpha>100</alpha><border_color>#FFFFFF</border_color><border_alpha></border_alpha><data_labels><![CDATA[]]></data_labels><data_labels_text_color></data_labels_text_color><data_labels_text_size></data_labels_text_size><data_labels_position></data_labels_position>"+h+"<link_target></link_target><gradient></gradient></column><line><connect></connect><width></width><alpha></alpha><fill_alpha>"+I+"</fill_alpha><bullet></bullet><bullet_size></bullet_size><data_labels><![CDATA[{value}]]></data_labels><data_labels_text_color></data_labels_text_color><data_labels_text_size></data_labels_text_size><balloon_text><![CDATA[{value}]]></balloon_text><link_target></link_target></line><background><color>"+B+"</color><alpha>100</alpha><border_color></border_color><border_alpha></border_alpha><file></file></background><plot_area><color></color><alpha></alpha><margins><left>"+F+"</left><top>"+e+"</top><right>"+n+"</right><bottom>"+W+"</bottom></margins></plot_area><grid><category><color>#000000</color><alpha>5</alpha><dashed>true</dashed><dash_length>5</dash_length></category><value><color>#000000</color><alpha>5</alpha><dashed>false</dashed><dash_length>5</dash_length><approx_count>10</approx_count></value></grid><values><category><enabled>true</enabled><frequency>1</frequency><rotate>"+E+"</rotate><color></color><text_size>"+T+"</text_size></category><value><enabled>true</enabled><min>0</min><max></max><frequency>1</frequency><rotate>"+P+"</rotate><skip_first>true</skip_first><skip_last>false</skip_last><color></color><text_size>"+T+"</text_size><unit></unit><unit_position>right</unit_position><integers_only></integers_only></value></values><axes><category><color>#000000</color><alpha>100</alpha><width>1</width><tick_length>7</tick_length></category><value><color>#000000</color><alpha>100</alpha><width>1</width><tick_length>7</tick_length></value></axes><balloon><enabled>true</enabled><color></color><alpha>80</alpha><text_color></text_color><text_size>"+T+"</text_size></balloon><legend><enabled>"+G+"</enabled><x></x><y>"+Math.floor(D*0.95)+"</y><width></width><color>#FFFFFF</color><alpha>0</alpha><border_color>#000000</border_color><border_alpha>0</border_alpha><text_color></text_color><text_size>"+T+"</text_size><spacing>5</spacing><margins>0</margins><key><size>16</size><border_color></border_color></key></legend><strings><no_data></no_data><export_as_image></export_as_image><collecting_data></collecting_data></strings><labels><label><x>0</x><y>5</y><rotate></rotate><width></width><align>center</align><text_color></text_color><text_size>"+T+"</text_size><text><![CDATA["+V+"]]></text></label></labels><graphs>"+chartTitles+"</graphs></settings>"))}else{if(o.toLowerCase()=="line"){H=new SWFObject(Appcelerator.DocumentPath+"swf/amline.swf","amline",A,D,"8","#FFFFFF");H.addVariable("chart_settings",escape("<settings> <width></width><height>"+J+"</height><data_type>csv</data_type> <type>"+b+"</type> <csv_separator>,</csv_separator> <skip_rows></skip_rows> <font></font> <text_size>"+T+"</text_size> <text_color></text_color> <decimals_separator>.</decimals_separator> <thousands_separator>,</thousands_separator> <redraw></redraw><reload_data_interval></reload_data_interval> <add_time_stamp></add_time_stamp><connect></connect> <hide_bullets_count></hide_bullets_count> <export_image_file></export_image_file><link_target></link_target><background> <color>"+B+"</color> <alpha>100</alpha> <border_color></border_color> <border_alpha></border_alpha> <file></file></background><plot_area> <color></color> <alpha></alpha> <border_color></border_color> <border_alpha></border_alpha> <margins> <left>"+F+"</left> <top>"+e+"</top> <right>"+n+"</right> <bottom>"+W+"</bottom> </margins> </plot_area><scroller> <enabled></enabled> <y></y> <color></color> <alpha></alpha> <bg_color></bg_color> <bg_alpha></bg_alpha> <height></height> </scroller><grid> <x> <enabled></enabled> <color></color><alpha>5</alpha><dashed>true</dashed><dash_length>5</dash_length> <approx_count>10</approx_count> </x> <y_left> <enabled></enabled> <color></color> <alpha>5</alpha><dashed></dashed><dash_length></dash_length> <approx_count></approx_count> </y_left> <y_right> <enabled></enabled> <color></color> <alpha>5</alpha><dashed></dashed><dash_length></dash_length> <approx_count></approx_count> </y_right> </grid><values> <x> <enabled>true</enabled> <rotate>"+E+"</rotate> <frequency></frequency> <skip_first></skip_first> <skip_last></skip_last> <color></color> <text_size>"+T+"</text_size> </x> <y_left> <enabled>true</enabled> <rotate>"+P+"</rotate> <min></min> <max></max> <strict_min_max></strict_min_max> <frequency></frequency> <skip_first></skip_first> <skip_last></skip_last> <color></color> <text_size>"+T+"</text_size> <unit></unit> <unit_position></unit_position> <integers_only></integers_only> </y_left> <y_right> <enabled></enabled> <rotate>"+P+"</rotate> <min></min> <max></max> <strict_min_max></strict_min_max> <frequency></frequency> <skip_first></skip_first> <skip_last></skip_last> <color></color> <text_size>"+T+"</text_size> <unit></unit> <unit_position></unit_position> <integers_only></integers_only> </y_right> </values><axes> <x> <color></color> <alpha></alpha> <width></width> <tick_length></tick_length> </x> <y_left> <color></color> <alpha></alpha> <width></width> <tick_length></tick_length> </y_left> <y_right> <color></color> <alpha></alpha> <width></width> <tick_length></tick_length> </y_right> </axes><indicator> <enabled>"+Y+"</enabled> <zoomable></zoomable> <color></color> <line_alpha></line_alpha> <selection_color></selection_color> <selection_alpha></selection_alpha> <x_balloon_enabled></x_balloon_enabled> <x_balloon_text_color></x_balloon_text_color> <y_balloon_text_size>"+T+"</y_balloon_text_size> <y_balloon_on_off>"+Q+"</y_balloon_on_off> <one_y_balloon>"+U+"</one_y_balloon> </indicator><legend><enabled>"+G+"</enabled> <x></x> <y>"+Math.floor(D*0.95)+"</y> <width></width> <max_columns></max_columns> <color></color> <alpha></alpha> <border_color></border_color> <border_alpha></border_alpha> <text_color></text_color> <text_color_hover></text_color_hover> <text_size>"+T+"</text_size> <spacing>5</spacing> <margins></margins> <graph_on_off>false</graph_on_off> <key> <size></size> <border_color></border_color> <key_mark_color></key_mark_color> </key> <values> <enabled></enabled> <width></width> <align></align> <text><![CDATA[]]></text> </values> </legend><zoom_out_button> <x></x> <y></y> <color></color> <alpha></alpha> <text_color></text_color> <text_color_hover></text_color_hover> <text_size>"+T+"</text_size> <text></text> </zoom_out_button><help> <button> <x></x> <y></y> <color></color> <alpha></alpha> <text_color></text_color> <text_color_hover></text_color_hover> <text_size>"+T+"</text_size> <text></text> </button> <balloon> <color></color> <alpha></alpha> <width></width> <text_color></text_color> <text_size>"+T+"</text_size> <text><![CDATA[]]></text> </balloon> </help><strings> <no_data></no_data> <export_as_image></export_as_image> <error_in_data_file></error_in_data_file> <collecting_data></collecting_data> <wrong_zoom_value></wrong_zoom_value> </strings><labels><label> <x></x> <y>5</y> <rotate></rotate> <width></width> <align>center</align> <text_color></text_color> <text_size>"+T+"</text_size> <text> <![CDATA["+V+"]]> </text> </label></labels> <graphs>"+chartTitles+"</graphs></settings>"))}else{throw ('Appcelerator Chart Error: type must be set to either "pie", "bar", "line" or a valid value passed via the incoming property message; "'+o+'" is not a valid chart type.')}}}if(H!=null){H.addVariable("path",Appcelerator.DocumentPath+"swf/");H.addVariable("chart_data",escape(R));H.addVariable("preloader_color","#FFFFFF");H.write(Z)}}};Appcelerator.Core.registerModuleWithJS("app:chart",Appcelerator.Module.Chart,["swfobject.js"])
1
+ Appcelerator.Module.Chart={flashRequired:true,flashVersion:8,getName:function(){return"appcelerator chart"},getDescription:function(){return"chart widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Amro Mousa"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:chart"},getActions:function(){return["execute"]},getAttributes:function(){return[{name:"on",optional:true,description:"Used to display the chart."},{name:"type",optional:true,defaultValue:""},{name:"title",optional:true,defaultValue:""},{name:"color",optional:true,defaultValue:"#477398"},{name:"angle",optional:true,defaultValue:"15"},{name:"thickness",optional:true,defaultValue:"15"},{name:"width",optional:true,defaultValue:"400"},{name:"height",optional:true,defaultValue:"360"},{name:"chartMode",optional:true,defaultValue:"clustered"},{name:"barOrientation",optional:true,defaultValue:"400"},{name:"rotateXAxisLabel",optional:true,defaultValue:"vertical"},{name:"rotateYAxisLabel",optional:true,defaultValue:"false"},{name:"legend",optional:true,defaultValue:"false"},{name:"brightness_step",optional:true,defaultValue:"15"},{name:"textSize",optional:true,defaultValue:"11"},{name:"property",optional:true,defaultValue:""},{name:"chartTitles",optional:true,defaultValue:""},{name:"fillAlpha",optional:true,defaultValue:"30"},{name:"indicator",optional:true,defaultValue:"false"},{name:"marginTop",optional:true,defaultValue:"50"},{name:"marginLeft",optional:true,defaultValue:"50"},{name:"marginRight",optional:true,defaultValue:"50"},{name:"marginBottom",optional:true,defaultValue:"50"},{name:"legendHighlight",optional:true,defaultValue:"true"},{name:"backgroundColor",optional:true,defaultValue:"#FFFFFF"},{name:"innerRadius",optional:true,defaultValue:"30"}]},buildWidget:function(B,C){var A='<div id="'+B.id+'"></div>';return{"presentation":A,"position":Appcelerator.Compiler.POSITION_REPLACE,"parameters":C}},execute:function(a,e,l){var p=e["type"];var W=e["title"];var T=e["color"];var N=e["angle"];var L=e["thickness"];var A=e["width"];var E=e["height"];var c=e["chartMode"];var P=e["barOrientation"];var F=e["rotateXAxisLabel"];var Q=e["rotateYAxisLabel"];var H=e["legend"];var d=e["brightness_step"];var n=e["property"];var Y=e["chartTitles"];var U=e["textSize"];var J=e["fillAlpha"];var Z=e["indicator"];var f=e["marginTop"];var G=e["marginLeft"];var o=e["marginRight"];var X=e["marginBottom"];var R=e["legendHighlight"];var V=e["oneBalloon"];var C=e["backgroundColor"];var B=e["innerRadius"];if(P.toLowerCase()!="vertical"&&P.toLowerCase()!="horizontal"){P=Object.getNestedProperty(l,P)||"vertical"}if(P.toLowerCase()=="horizontal"){P="bar"}else{P="column"}if(F.toLowerCase()=="true"){F=90}else{F=0}if(Q.toLowerCase()=="true"){Q=90}else{Q=0}if(n){array=Object.getNestedProperty(l,n)||[];e["data"]=array}else{array=[]}if(W!=""){var m=Object.getNestedProperty(l,W);if(m==null){m="*[No Title]*"}if(m!="*[No Title]*"){W=m}}var S="";for(var k=0,O=array.length;k<O;k++){S+=array[k]["name"]+","+array[k]["value"]+"\n"}if(p.toLowerCase()!="bar"&&p.toLowerCase()!="pie"&&p.toLowerCase()!="line"&&p.toLowerCase()!=""){p=Object.getNestedProperty(l,p)||""}if(p.toLowerCase()=="bar"&&(c.toLowerCase()!="clustered"&&c.toLowerCase()!="stacked"&&c.toLowerCase()!="100% stacked")){c=Object.getNestedProperty(l,c)||"clustered"}if(p.toLowerCase()=="line"&&(c.toLowerCase()!="line"&&c.toLowerCase()!="stacked"&&c.toLowerCase()!="100% stacked")){c=Object.getNestedProperty(l,c)||"line"}if(H.toLowerCase()!="true"&&H.toLowerCase()!="false"){H=Object.getNestedProperty(l,H)||"false"}var g=T.split(",");if(g.length>1&&p.toLowerCase()=="pie"){g=T;T="";d=""}else{if(g.length==1&&p.toLowerCase()=="pie"){g=""}}if(g.length>1&&p.toLowerCase()=="bar"){T=g[0]}var j="";if(p.toLowerCase()=="bar"||p.toLowerCase()=="line"){titleArray=Object.getNestedProperty(l,Y)||[];e["titleArray"]=titleArray;var M="";if(p.toLowerCase()=="bar"){M='<graph gid="{COL_NUM}"><type>column</type><title>{COL_TITLE}</title><color>{COL_COLOR}</color><alpha></alpha><data_labels><![CDATA[]]></data_labels><fill_alpha>'+J+"</fill_alpha></graph>"}else{if(p.toLowerCase()=="line"){M="<graph><axis>left</axis><title>{COL_TITLE}</title><color>{COL_COLOR}</color><color_hover>FF0000</color_hover><fill_alpha>"+J+"</fill_alpha><balloon_text><![CDATA[{COL_TITLE} {value}]]></balloon_text></graph>"}}var b="";for(var k=0,O=titleArray.length;k<O;k++){b+=M.gsub("{COL_NUM}",k.toString()).gsub("{COL_TITLE}",titleArray[k]["title"]).gsub("{COL_COLOR}",g[k]||"")}if(titleArray.length==0){if(p.toLowerCase()=="bar"){chartTitles='<graph gid="0"><type>column</type><title></title><color>'+T+"</color><alpha></alpha><data_labels><![CDATA[]]></data_labels><fill_alpha>"+J+"</fill_alpha><width></width><bullet></bullet><bullet_size></bullet_size><bullet_color></bullet_color><gradient_fill_colors></gradient_fill_colors></graph>"}else{(p.toLowerCase()=="line")}chartTitles="<graph><axis>left</axis><title></title><color>"+T+"</color><color_hover>#FF0000</color_hover><fill_alpha>"+J+"</fill_alpha><balloon_text><![CDATA[]]></balloon_text></graph>"}else{chartTitles=b}var D=(titleArray.length>0)?"{title}":"{series}";if(c.toLowerCase()=="stacked"){j="<balloon_text><![CDATA["+D+": {value}]]></balloon_text>"}else{if(c.toLowerCase()=="100% stacked"){j="<balloon_text><![CDATA["+D+": {percents}%]]></balloon_text>"}else{if(c.toLowerCase()=="clustered"){j="<balloon_text><![CDATA["+D+": {value}]]></balloon_text>"}else{if(c.toLowerCase()=="line"){j="<balloon_text><![CDATA["+D+": {value}]]></balloon_text>"}}}}}var h=H?Math.floor(E*0.06):0;var K=E-h;var I;if(p.toLowerCase()=="pie"){I=new SWFObject(Appcelerator.DocumentPath+"swf/ampie.swf","ampie",A,E,"8","#FFFFFF");I.addVariable("chart_settings",escape("<settings><width/><height/><data_type>csv</data_type><csv_separator>,</csv_separator><skip_rows>0</skip_rows><font>Arial</font><text_size>"+U+"</text_size><text_color>#000000</text_color><decimals_separator>.</decimals_separator><thousands_separator>,</thousands_separator><redraw/><reload_data_interval/><add_time_stamp>false</add_time_stamp><precision>2</precision><export_image_file/><exclude_invisible/><pie><x/><y></y><radius>90</radius><inner_radius>"+B+"</inner_radius><height>"+L+"</height><angle>"+N+"</angle><outline_color/><outline_alpha/><!-- main color --><base_color>"+T+"</base_color><brightness_step>"+d+"</brightness_step><colors>"+g+"</colors><link_target/><alpha/></pie><animation><start_time>2</start_time><start_effect>strong</start_effect><start_radius/><start_alpha>0</start_alpha><pull_out_on_click/><pull_out_time>1.5</pull_out_time><pull_out_effect>Bounce</pull_out_effect><pull_out_radius/><pull_out_only_one/></animation><data_labels><radius/><text_color/><text_size/><max_width>140</max_width><show><![CDATA[{title}: {percents}%]]></show><show_lines/><line_color/><line_alpha/><hide_labels_percent>3</hide_labels_percent></data_labels><group><percent/><color/><title/><url/><description/><pull_out/></group><background><color>"+C+"</color><alpha>100</alpha><border_color/><border_alpha/><file/></background><balloon><enabled/><color/><alpha>80</alpha><text_color/><text_size/><show><![CDATA[{title}: {percents}%]]></show></balloon><legend><enabled>"+H+"</enabled><x/><y/><width/><color>#FFFFFF</color><max_columns/><alpha>0</alpha><border_color>#000000</border_color><border_alpha>0</border_alpha><text_color/><text_size/><spacing>5</spacing><margins>0</margins><key><size>16</size><border_color/></key></legend><strings><no_data/><export_as_image/><collecting_data/></strings><labels><label><x>0</x><y>10</y><rotate>false</rotate><width/><align>center</align><text_color/><text_size>"+U+"</text_size><text>"+W+"</text></label></labels></settings>"))}else{if(p.toLowerCase()=="bar"){I=new SWFObject(Appcelerator.DocumentPath+"swf/amcolumn.swf","amcolumn",A,E,"8","#FFFFFF");I.addVariable("chart_settings",escape("<settings><type>"+P+"</type><width></width><height>"+K+"</height><data_type>csv</data_type><csv_separator>,</csv_separator><skip_rows>0</skip_rows><font>Arial</font><text_size>"+U+"</text_size><text_color>#000000</text_color><decimals_separator>.</decimals_separator><thousands_separator>,</thousands_separator><redraw>false</redraw><reload_data_interval>0</reload_data_interval><add_time_stamp>false</add_time_stamp><precision>2</precision><depth>"+L+"</depth><angle>"+N+"</angle><export_image_file></export_image_file><column><type>"+c+"</type><width>60</width><spacing>1</spacing><grow_time>1</grow_time><grow_effect>strong</grow_effect><alpha>100</alpha><border_color>#FFFFFF</border_color><border_alpha></border_alpha><data_labels><![CDATA[]]></data_labels><data_labels_text_color></data_labels_text_color><data_labels_text_size></data_labels_text_size><data_labels_position></data_labels_position>"+j+"<link_target></link_target><gradient></gradient></column><line><connect></connect><width></width><alpha></alpha><fill_alpha>"+J+"</fill_alpha><bullet></bullet><bullet_size></bullet_size><data_labels><![CDATA[{value}]]></data_labels><data_labels_text_color></data_labels_text_color><data_labels_text_size></data_labels_text_size><balloon_text><![CDATA[{value}]]></balloon_text><link_target></link_target></line><background><color>"+C+"</color><alpha>100</alpha><border_color></border_color><border_alpha></border_alpha><file></file></background><plot_area><color></color><alpha></alpha><margins><left>"+G+"</left><top>"+f+"</top><right>"+o+"</right><bottom>"+X+"</bottom></margins></plot_area><grid><category><color>#000000</color><alpha>5</alpha><dashed>true</dashed><dash_length>5</dash_length></category><value><color>#000000</color><alpha>5</alpha><dashed>false</dashed><dash_length>5</dash_length><approx_count>10</approx_count></value></grid><values><category><enabled>true</enabled><frequency>1</frequency><rotate>"+F+"</rotate><color></color><text_size>"+U+"</text_size></category><value><enabled>true</enabled><min>0</min><max></max><frequency>1</frequency><rotate>"+Q+"</rotate><skip_first>true</skip_first><skip_last>false</skip_last><color></color><text_size>"+U+"</text_size><unit></unit><unit_position>right</unit_position><integers_only></integers_only></value></values><axes><category><color>#000000</color><alpha>100</alpha><width>1</width><tick_length>7</tick_length></category><value><color>#000000</color><alpha>100</alpha><width>1</width><tick_length>7</tick_length></value></axes><balloon><enabled>true</enabled><color></color><alpha>80</alpha><text_color></text_color><text_size>"+U+"</text_size></balloon><legend><enabled>"+H+"</enabled><x></x><y>"+Math.floor(E*0.95)+"</y><width></width><color>#FFFFFF</color><alpha>0</alpha><border_color>#000000</border_color><border_alpha>0</border_alpha><text_color></text_color><text_size>"+U+"</text_size><spacing>5</spacing><margins>0</margins><key><size>16</size><border_color></border_color></key></legend><strings><no_data></no_data><export_as_image></export_as_image><collecting_data></collecting_data></strings><labels><label><x>0</x><y>5</y><rotate></rotate><width></width><align>center</align><text_color></text_color><text_size>"+U+"</text_size><text><![CDATA["+W+"]]></text></label></labels><graphs>"+chartTitles+"</graphs></settings>"))}else{if(p.toLowerCase()=="line"){I=new SWFObject(Appcelerator.DocumentPath+"swf/amline.swf","amline",A,E,"8","#FFFFFF");I.addVariable("chart_settings",escape("<settings> <width></width><height>"+K+"</height><data_type>csv</data_type> <type>"+c+"</type> <csv_separator>,</csv_separator> <skip_rows></skip_rows> <font></font> <text_size>"+U+"</text_size> <text_color></text_color> <decimals_separator>.</decimals_separator> <thousands_separator>,</thousands_separator> <redraw></redraw><reload_data_interval></reload_data_interval> <add_time_stamp></add_time_stamp><connect></connect> <hide_bullets_count></hide_bullets_count> <export_image_file></export_image_file><link_target></link_target><background> <color>"+C+"</color> <alpha>100</alpha> <border_color></border_color> <border_alpha></border_alpha> <file></file></background><plot_area> <color></color> <alpha></alpha> <border_color></border_color> <border_alpha></border_alpha> <margins> <left>"+G+"</left> <top>"+f+"</top> <right>"+o+"</right> <bottom>"+X+"</bottom> </margins> </plot_area><scroller> <enabled></enabled> <y></y> <color></color> <alpha></alpha> <bg_color></bg_color> <bg_alpha></bg_alpha> <height></height> </scroller><grid> <x> <enabled></enabled> <color></color><alpha>5</alpha><dashed>true</dashed><dash_length>5</dash_length> <approx_count>10</approx_count> </x> <y_left> <enabled></enabled> <color></color> <alpha>5</alpha><dashed></dashed><dash_length></dash_length> <approx_count></approx_count> </y_left> <y_right> <enabled></enabled> <color></color> <alpha>5</alpha><dashed></dashed><dash_length></dash_length> <approx_count></approx_count> </y_right> </grid><values> <x> <enabled>true</enabled> <rotate>"+F+"</rotate> <frequency></frequency> <skip_first></skip_first> <skip_last></skip_last> <color></color> <text_size>"+U+"</text_size> </x> <y_left> <enabled>true</enabled> <rotate>"+Q+"</rotate> <min></min> <max></max> <strict_min_max></strict_min_max> <frequency></frequency> <skip_first></skip_first> <skip_last></skip_last> <color></color> <text_size>"+U+"</text_size> <unit></unit> <unit_position></unit_position> <integers_only></integers_only> </y_left> <y_right> <enabled></enabled> <rotate>"+Q+"</rotate> <min></min> <max></max> <strict_min_max></strict_min_max> <frequency></frequency> <skip_first></skip_first> <skip_last></skip_last> <color></color> <text_size>"+U+"</text_size> <unit></unit> <unit_position></unit_position> <integers_only></integers_only> </y_right> </values><axes> <x> <color></color> <alpha></alpha> <width></width> <tick_length></tick_length> </x> <y_left> <color></color> <alpha></alpha> <width></width> <tick_length></tick_length> </y_left> <y_right> <color></color> <alpha></alpha> <width></width> <tick_length></tick_length> </y_right> </axes><indicator> <enabled>"+Z+"</enabled> <zoomable></zoomable> <color></color> <line_alpha></line_alpha> <selection_color></selection_color> <selection_alpha></selection_alpha> <x_balloon_enabled></x_balloon_enabled> <x_balloon_text_color></x_balloon_text_color> <y_balloon_text_size>"+U+"</y_balloon_text_size> <y_balloon_on_off>"+R+"</y_balloon_on_off> <one_y_balloon>"+V+"</one_y_balloon> </indicator><legend><enabled>"+H+"</enabled> <x></x> <y>"+Math.floor(E*0.95)+"</y> <width></width> <max_columns></max_columns> <color></color> <alpha></alpha> <border_color></border_color> <border_alpha></border_alpha> <text_color></text_color> <text_color_hover></text_color_hover> <text_size>"+U+"</text_size> <spacing>5</spacing> <margins></margins> <graph_on_off>false</graph_on_off> <key> <size></size> <border_color></border_color> <key_mark_color></key_mark_color> </key> <values> <enabled></enabled> <width></width> <align></align> <text><![CDATA[]]></text> </values> </legend><zoom_out_button> <x></x> <y></y> <color></color> <alpha></alpha> <text_color></text_color> <text_color_hover></text_color_hover> <text_size>"+U+"</text_size> <text></text> </zoom_out_button><help> <button> <x></x> <y></y> <color></color> <alpha></alpha> <text_color></text_color> <text_color_hover></text_color_hover> <text_size>"+U+"</text_size> <text></text> </button> <balloon> <color></color> <alpha></alpha> <width></width> <text_color></text_color> <text_size>"+U+"</text_size> <text><![CDATA[]]></text> </balloon> </help><strings> <no_data></no_data> <export_as_image></export_as_image> <error_in_data_file></error_in_data_file> <collecting_data></collecting_data> <wrong_zoom_value></wrong_zoom_value> </strings><labels><label> <x></x> <y>5</y> <rotate></rotate> <width></width> <align>center</align> <text_color></text_color> <text_size>"+U+"</text_size> <text> <![CDATA["+W+"]]> </text> </label></labels> <graphs>"+chartTitles+"</graphs></settings>"))}else{throw ('Appcelerator Chart Error: type must be set to either "pie", "bar", "line" or a valid value passed via the incoming property message; "'+p+'" is not a valid chart type.')}}}if(I!=null){I.addVariable("path",Appcelerator.DocumentPath+"swf/");I.addVariable("chart_data",escape(S));I.addVariable("preloader_color","#FFFFFF");I.write(a)}}};Appcelerator.Core.registerModuleWithJS("app:chart",Appcelerator.Module.Chart,["swfobject.js"])
@@ -1 +1 @@
1
- Appcelerator.Module.Content={getName:function(){return"appcelerator content"},getDescription:function(){return"content widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Jeff Haynie"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:content"},getAttributes:function(){return[{name:"on",optional:true,description:"May be used to execute/load the content."},{name:"src",optional:false,description:"The source for the content file to load."},{name:"args",optional:true,description:"Used to replace text in the content file."},{name:"lazy",optional:true,defaultValue:"false",description:"Indicates whether the content file should be lazy loaded."},{name:"reload",optional:true,defaultValue:"false",description:"Indicates whether the content file should be refetched and reloaded on every execute. If false, execute will do nothing if already executed."},{name:"onload",optional:true,description:"Fire this message when content file is loaded."},{name:"onfetch",optional:true,description:"Fire this message when content file is fetched but before being loaded."}]},execute:function(D,A,C,B){if(!A["reload"]){if(!$(D).fetched&&!A["fetched"]){Appcelerator.Module.Content.fetch(D,A["src"],A["args"],A["onload"],A["onfetch"]);$(D).fetched=true}}else{Appcelerator.Module.Content.fetch(D,A["src"],A["args"],A["onload"],A["onfetch"])}},compileWidget:function(A){if(!(A["lazy"]=="true")){Appcelerator.Module.Content.fetch(A["id"],A["src"],A["args"],A["onload"],A["onfetch"]);A["fetched"]=true}},buildWidget:function(A,B,C){B["reload"]=(B["reload"]=="true");return{"position":Appcelerator.Compiler.POSITION_REPLACE,"presentation":"","compile":true,"functions":B["on"]?["execute"]:null}},fetch:function(D,E,B,C,A){D=$(D);D.style.visibility="hidden";Appcelerator.Util.IFrame.fetch(E,function(J){if(A){$MQ(A,{"src":E,"args":B})}var H=D.getAttribute("scope")||D.scope;J.setAttribute("scope",H);J.scope=H;Appcelerator.Compiler.getAndEnsureId(J);var I=Appcelerator.Compiler.createCompilerState();var G="<div>"+J.innerHTML+"</div>";if(B){var F=Appcelerator.Compiler.compileTemplate(G);G=F(B.evalJSON())}D.innerHTML=G;I.onafterfinish=function(){D.style.visibility="visible";if(C){$MQ(C,{"src":E,"args":B})}};Appcelerator.Compiler.compileElement(D.firstChild,I,false);I.scanned=true;Appcelerator.Compiler.checkLoadState(I)},true,true)}};Appcelerator.Core.registerModule("app:content",Appcelerator.Module.Content)
1
+ Appcelerator.Module.Content={getName:function(){return"appcelerator content"},getDescription:function(){return"content widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Jeff Haynie"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:content"},getActions:function(){return["execute"]},getAttributes:function(){return[{name:"on",optional:true,description:"May be used to execute/load the content."},{name:"src",optional:false,description:"The source for the content file to load."},{name:"args",optional:true,description:"Used to replace text in the content file."},{name:"lazy",optional:true,defaultValue:"false",description:"Indicates whether the content file should be lazy loaded."},{name:"reload",optional:true,defaultValue:"false",description:"Indicates whether the content file should be refetched and reloaded on every execute. If false, execute will do nothing if already executed."},{name:"onload",optional:true,description:"Fire this message when content file is loaded."},{name:"onfetch",optional:true,description:"Fire this message when content file is fetched but before being loaded."}]},execute:function(D,A,C,B){if(!A["reload"]){if(!$(D).fetched&&!A["fetched"]){Appcelerator.Module.Content.fetch(D,A["src"],A["args"],A["onload"],A["onfetch"]);$(D).fetched=true}}else{Appcelerator.Module.Content.fetch(D,A["src"],A["args"],A["onload"],A["onfetch"])}},compileWidget:function(A){if(!(A["lazy"]=="true")){Appcelerator.Module.Content.fetch(A["id"],A["src"],A["args"],A["onload"],A["onfetch"]);A["fetched"]=true}},buildWidget:function(A,B,C){B["reload"]=(B["reload"]=="true");return{"position":Appcelerator.Compiler.POSITION_REPLACE,"presentation":"","compile":true}},fetch:function(D,E,B,C,A){D=$(D);D.style.visibility="hidden";Appcelerator.Util.IFrame.fetch(E,function(J){if(A){$MQ(A,{"src":E,"args":B})}var H=D.getAttribute("scope")||D.scope;J.setAttribute("scope",H);J.scope=H;Appcelerator.Compiler.getAndEnsureId(J);var I=Appcelerator.Compiler.createCompilerState();var G="<div>"+J.innerHTML+"</div>";if(B){var F=Appcelerator.Compiler.compileTemplate(G);G=F(B.evalJSON())}D.innerHTML=G;I.onafterfinish=function(){D.style.visibility="visible";if(C){$MQ(C,{"src":E,"args":B})}};Appcelerator.Compiler.compileElement(D.firstChild,I,false);I.scanned=true;Appcelerator.Compiler.checkLoadState(I)},true,true)}};Appcelerator.Core.registerModule("app:content",Appcelerator.Module.Content)
@@ -1 +1 @@
1
- Appcelerator.Module.Datatable={modulePath:null,setPath:function(A){this.modulePath=A},getName:function(){return"appcelerator datatable"},getDescription:function(){return"datatable widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Amro Mousa"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:datatable"},createDataTable:function(id,pagination_direction){var on_array=[];var parameterMap=$(id).parameterMap;var scope=parameterMap["scope"];var wire=parameterMap["wire"];var sort=parameterMap["sort"];var rowEvenClass=parameterMap["rowEvenClass"];var rowOddClass=parameterMap["rowOddClass"];var width=parameterMap["width"];var add_spacers_to_header=parameterMap["add_spacers_to_header"];var header_array=parameterMap["header_array"];var array=parameterMap["array"];var pagination=parameterMap["pagination"];var maxRows=parseInt(parameterMap["maxRows"]);if(pagination=="true"&&!pagination_direction){pagination_direction="forward";maxRows=maxRows==0?10:maxRows}if(pagination=="false"){maxRows=maxRows==0?array.length:maxRows}parameterMap["maxRows"]=maxRows;var html="";var table_open='<table cellspacing="0" border="0" width="'+width+'">';var table_close="</table>";var table_header_content="";var table_data_content="";var arrow_up_img='<img src="'+Appcelerator.Module.Datatable.modulePath+'images/arrow_up.png" title="sort ascending" style="position:relative;top:-1px; left: 2px;" />';var arrow_down_img='<img src="'+Appcelerator.Module.Datatable.modulePath+'images/arrow_down.png" title="sort ascending" style="position:relative;top:-1px; left: 2px;" />';var spacer_img='<img src="'+Appcelerator.Module.Datatable.modulePath+'images/arrow_spacer.png" title="sort ascending" style="position:relative;top:-1px; left: 2px;" />';if(add_spacers_to_header){for(var i=0,len=header_array.length;i<len;i++){header_array[i]["cell"]=header_array[i]["cell"].replace(arrow_up_img,"");header_array[i]["cell"]=header_array[i]["cell"].replace(arrow_down_img,"");header_array[i]["cell"]=header_array[i]["cell"].replace(spacer_img,"");header_array[i]["cell"]+=spacer_img}}for(var x=0,len=header_array.length;x<len;x++){var header_info=header_array[x];var hclass=header_info["class"];if(hclass==""||hclass==null){hclass="table_cell_header"}var or="";if(header_info["on"]!=""){or=" or "}var sort_string="";if(sort=="client"){sort_string="click then script[Appcelerator.Module.Datatable.sortDataTableClient("+x+",'"+id+"')]"}else{if(sort=="server"){sort_string="click then script[Appcelerator.Module.Datatable.sortDataTableServer("+x+",'"+id+"')]";if(parameterMap["current_server_sort_column"]==header_info["property"]){if(!parameterMap["sortBy"][parameterMap["current_server_sort_column"]]){header_array[x]["cell"]=header_array[x]["cell"].replace(spacer_img,"");header_array[x]["cell"]+=arrow_up_img}else{header_array[x]["cell"]=header_array[x]["cell"].replace(spacer_img,"");header_array[x]["cell"]+=arrow_down_img}}}else{sort_string=""}}var hw=header_info["width"];var td='<td id="'+id+"_header_"+x+'" align="'+header_info["align"]+'" '+(hw?'width="'+hw+'"':"")+' class="'+hclass+'"><span>'+header_info["cell"]+"</span></td>";if(sort_string!=""){var header_on_expression=header_info["on"]+or+sort_string;on_array.push({"id":id+"_header_"+x,"on":header_on_expression})}table_header_content+=td}table_header_content='<tr class="table_row_header">'+table_header_content+"</tr>";var x=0;var length=maxRows;if(pagination=="true"){if(pagination_direction=="forward"){if($(id).initialLoad){x=$(id).position;$(id).initialLoad=false}else{x=$(id).position+maxRows>=array.length?$(id).position:$(id).position+maxRows}length=x+maxRows>array.length?array.length:x+maxRows}else{if($(id).position-maxRows<0){x=0;length=maxRows>array.length?array.length:maxRows}else{x=$(id).position-maxRows;length=x+maxRows>array.length?array.length:x+maxRows}}$(id).position=x}var xrun=x;for(;xrun<length;xrun++){table_data_content+='<tr class="table_row">';for(var h=0,lenH=header_array.length;h<lenH;h++){var cell_class=(xrun%2==0)?rowEvenClass:rowOddClass;if(cell_class==""){cell_class="table_cell"}var column_property_name=header_array[h]["property"];var cell_value=(array[xrun][column_property_name]||"");var td='<td align="'+header_array[h]["align"]+'" class="'+cell_class+'"><span>'+cell_value.toString().escapeHTML()+"</span></td>";table_data_content+=td}table_data_content+="</tr>"}html=table_open+table_header_content+table_data_content+table_close;var myidback=id+"_pagination_back";var myidforward=id+"_pagination_forward";if(pagination=="true"){var pag_html="";var myid="'"+id+"'";var forward='"forward"';var backward="'backward'";pag_html='<div style="padding-bottom: 5px;"><a class="pagination_links" id="'+myidback+'"><img style="border: 0;" src="'+Appcelerator.Module.Datatable.modulePath+'images/resultset_previous.png"/></a>&nbsp;<a class="pagination_links" id="'+myidforward+'"><img style="border: 0;" src="'+Appcelerator.Module.Datatable.modulePath+'images/resultset_next.png"/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Showing '+(x+1)+"-"+(length)+" of "+array.length+"</div>";html=pag_html+html}Appcelerator.Compiler.setHTML(id,html);if(pagination=="true"){$(myidback).onclick=function(){Appcelerator.Module.Datatable.createDataTable(id,"backward")}.bind(this);$(myidforward).onclick=function(){Appcelerator.Module.Datatable.createDataTable(id,"forward")}.bind(this);$(myidback).onmousedown=function(){Appcelerator.Module.Datatable.paginateContinuously(id,"backward")}.bind(this);$(myidforward).onmousedown=function(){Appcelerator.Module.Datatable.paginateContinuously(id,"forward")}.bind(this);$(myidback).onmouseup=function(){Appcelerator.Module.Datatable.stopContinuousPagination(id)}.bind(this);$(myidforward).onmouseup=function(){Appcelerator.Module.Datatable.stopContinuousPagination(id)}.bind(this);$(myidback).onmouseout=function(){Appcelerator.Module.Datatable.stopContinuousPagination(id)}.bind(this);$(myidforward).onmouseout=function(){Appcelerator.Module.Datatable.stopContinuousPagination(id)}.bind(this)}var on_run_array=[];for(var i=0,len=on_array.length;i<len;i++){on_run_array.push(Appcelerator.Compiler.compileExpression($(on_array[i]["id"]),on_array[i]["on"],false))}eval(on_run_array.join(";"))},compileWidget:function(B,A){},paginateContinuously:function(C,A){var B=function(){if(A=="forward"){Appcelerator.Module.Datatable.createDataTable(C,"forward")}else{Appcelerator.Module.Datatable.createDataTable(C,"backward")}};$(C).paginationInterval=setInterval(B,250)},stopContinuousPagination:function(A){clearInterval($(A).paginationInterval)},sortDataTableClient:function(L,C){var A=$(C).parameterMap;var E=A["header_array"];var M=A["array"];var F=E[L]["property"];$(C).position=0;$(C).initialLoad=true;var H=true;for(var O=0,K=M.length;O<K;O++){var I=(M[O][F]||"");if(isNaN(parseFloat(I))){H=false}}if(A["sortBy"]==null){A["sortBy"]={};A["sortBy"][F]=false}A["sortBy"][F]=!A["sortBy"][F];if(H){var P=function B(S,R){var U=S[F];var T=R[F];return(A["sortBy"][F]==true)?parseFloat(U)-parseFloat(T):parseFloat(T)-parseFloat(U)};M.sort(P)}else{var J=function B(T,R){var U=T[F].toLowerCase();var S=R[F].toLowerCase();return(A["sortBy"][F]==true)?(S<U)-(U<S):(U<S)-(S<U)};M.sort(J)}var Q='<img src="'+Appcelerator.Module.Datatable.modulePath+'images/arrow_up.png" title="sort ascending" style="position:relative;top:-1px; left: 2px;" />';var D='<img src="'+Appcelerator.Module.Datatable.modulePath+'images/arrow_down.png" title="sort ascending" style="position:relative;top:-1px; left: 2px;" />';var N='<img src="'+Appcelerator.Module.Datatable.modulePath+'images/arrow_spacer.png" title="sort ascending" style="position:relative;top:-1px; left: 2px;" />';for(var G=0,K=E.length;G<K;G++){E[G]["cell"]=E[G]["cell"].replace(Q,"");E[G]["cell"]=E[G]["cell"].replace(D,"");E[G]["cell"]=E[G]["cell"].replace(N,"");E[G]["cell"]+=N}if(!A["sortBy"][F]){E[L]["cell"]=E[L]["cell"].replace(N,"");E[L]["cell"]+=Q}else{E[L]["cell"]=E[L]["cell"].replace(N,"");E[L]["cell"]+=D}A["add_spacers_to_header"]=false;Appcelerator.Module.Datatable.createDataTable(C)},sortDataTableServer:function(C,G){var A=$(G).parameterMap;var E=A["header_array"];var F=A["array"];var B=E[C]["property"];if(A["sortBy"]==null){A["sortBy"]={};A["sortBy"][B]=false}A["sortBy"][B]=!A["sortBy"][B];A["current_server_sort_column"]=B;var D="";if(A["sortBy"][B]){D="desc"}else{D="asc"}$MQ(A["sortRequest"],{"property":B,"direction":D},A["scope"])},execute:function(F,A,D,C){var B=A["property"];var E;$(F).position=0;$(F).initialLoad=true;if(B){E=Object.getNestedProperty(D,B)||[]}A["array"]=E;A["scope"]=C;$(F).parameterMap=A;Appcelerator.Module.Datatable.createDataTable(F)},getAttributes:function(){return[{name:"on",optional:true,description:"Used to populate the data table."},{name:"wire",optional:true,defaultValue:""},{name:"sort",optional:true,defaultValue:"client",description:"Valid values are 'client', 'server', and 'off.'"},{name:"sortRequest",optional:true,defaultValue:"",description:"Message to be sent when the sort mode is 'server' and a column header is clicked."},{name:"rowEvenClass",optional:true,defaultValue:""},{name:"rowOddClass",optional:true,defaultValue:""},{name:"width",optional:true,defaultValue:"100%",description:"Width % of entire table."},{name:"property",optional:true,defaultValue:""},{name:"pagination",optional:true,defaultValue:"false"},{name:"maxRows",optional:true,defaultValue:0}]},buildWidget:function(D,E){var B=document.createElement("div");B.innerHTML=D.innerHTML.replace(/<HEADER/gi,"<div").replace(/<\/HEADER/gi,"</div");var G=B.childNodes;var H=[];for(var C=0,A=G.length;C<A;C++){if(G[C].nodeName.toLowerCase()=="div"){var F={};header_langid=G[C].getAttribute("langid")||"";if(header_langid==""){F["cell"]=Appcelerator.Compiler.getHtml(G[C],true)}else{F["cell"]=Appcelerator.Localization.get(header_langid)}F["on"]=G[C].getAttribute("on")||"";F["class"]=G[C].className||"";F["property"]=G[C].getAttribute("property")||"";F["align"]=G[C].getAttribute("align")||"";H.push(F)}}E["header_array"]=H;E["add_spacers_to_header"]=true;return{"presentation":"","position":Appcelerator.Compiler.POSITION_REPLACE,"compile":true,"parameters":E,"functions":["execute"]}}};Appcelerator.Core.registerModule("app:datatable",Appcelerator.Module.Datatable);Appcelerator.Core.loadModuleCSS("app:datatable","datatable.css")
1
+ Appcelerator.Module.Datatable={modulePath:null,setPath:function(A){this.modulePath=A},getName:function(){return"appcelerator datatable"},getDescription:function(){return"datatable widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Amro Mousa"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:datatable"},getActions:function(){return["execute"]},createDataTable:function(id,pagination_direction){var on_array=[];var parameterMap=$(id).parameterMap;var scope=parameterMap["scope"];var wire=parameterMap["wire"];var sort=parameterMap["sort"];var rowEvenClass=parameterMap["rowEvenClass"];var rowOddClass=parameterMap["rowOddClass"];var width=parameterMap["width"];var add_spacers_to_header=parameterMap["add_spacers_to_header"];var header_array=parameterMap["header_array"];var array=parameterMap["array"];var pagination=parameterMap["pagination"];var maxRows=parseInt(parameterMap["maxRows"]);if(pagination=="true"&&!pagination_direction){pagination_direction="forward";maxRows=maxRows==0?10:maxRows}if(pagination=="false"){maxRows=maxRows==0?array.length:maxRows}parameterMap["maxRows"]=maxRows;var html="";var table_open='<table cellspacing="0" border="0" width="'+width+'">';var table_close="</table>";var table_header_content="";var table_data_content="";var arrow_up_img='<img src="'+Appcelerator.Module.Datatable.modulePath+'images/arrow_up.png" title="sort ascending" style="position:relative;top:-1px; left: 2px;" />';var arrow_down_img='<img src="'+Appcelerator.Module.Datatable.modulePath+'images/arrow_down.png" title="sort ascending" style="position:relative;top:-1px; left: 2px;" />';var spacer_img='<img src="'+Appcelerator.Module.Datatable.modulePath+'images/arrow_spacer.png" title="sort ascending" style="position:relative;top:-1px; left: 2px;" />';if(add_spacers_to_header){for(var i=0,len=header_array.length;i<len;i++){header_array[i]["cell"]=header_array[i]["cell"].replace(arrow_up_img,"");header_array[i]["cell"]=header_array[i]["cell"].replace(arrow_down_img,"");header_array[i]["cell"]=header_array[i]["cell"].replace(spacer_img,"");header_array[i]["cell"]+=spacer_img}}for(var x=0,len=header_array.length;x<len;x++){var header_info=header_array[x];var hclass=header_info["class"];if(hclass==""||hclass==null){hclass="table_cell_header"}var or="";if(header_info["on"]!=""){or=" or "}var sort_string="";if(sort=="client"){sort_string="click then script[Appcelerator.Module.Datatable.sortDataTableClient("+x+",'"+id+"')]"}else{if(sort=="server"){sort_string="click then script[Appcelerator.Module.Datatable.sortDataTableServer("+x+",'"+id+"')]";if(parameterMap["current_server_sort_column"]==header_info["property"]){if(!parameterMap["sortBy"][parameterMap["current_server_sort_column"]]){header_array[x]["cell"]=header_array[x]["cell"].replace(spacer_img,"");header_array[x]["cell"]+=arrow_up_img}else{header_array[x]["cell"]=header_array[x]["cell"].replace(spacer_img,"");header_array[x]["cell"]+=arrow_down_img}}}else{sort_string=""}}var hw=header_info["width"];var td='<td id="'+id+"_header_"+x+'" align="'+header_info["align"]+'" '+(hw?'width="'+hw+'"':"")+' class="'+hclass+'"><span>'+header_info["cell"]+"</span></td>";if(sort_string!=""){var header_on_expression=header_info["on"]+or+sort_string;on_array.push({"id":id+"_header_"+x,"on":header_on_expression})}table_header_content+=td}table_header_content='<tr class="table_row_header">'+table_header_content+"</tr>";var x=0;var length=maxRows;if(pagination=="true"){if(pagination_direction=="forward"){if($(id).initialLoad){x=$(id).position;$(id).initialLoad=false}else{x=$(id).position+maxRows>=array.length?$(id).position:$(id).position+maxRows}length=x+maxRows>array.length?array.length:x+maxRows}else{if($(id).position-maxRows<0){x=0;length=maxRows>array.length?array.length:maxRows}else{x=$(id).position-maxRows;length=x+maxRows>array.length?array.length:x+maxRows}}$(id).position=x}var xrun=x;for(;xrun<length;xrun++){table_data_content+='<tr class="table_row">';for(var h=0,lenH=header_array.length;h<lenH;h++){var cell_class=(xrun%2==0)?rowEvenClass:rowOddClass;if(cell_class==""){cell_class="table_cell"}var column_property_name=header_array[h]["property"];var cell_value=(array[xrun][column_property_name]||"");var td='<td align="'+header_array[h]["align"]+'" class="'+cell_class+'"><span>'+cell_value.toString().escapeHTML()+"</span></td>";table_data_content+=td}table_data_content+="</tr>"}html=table_open+table_header_content+table_data_content+table_close;var myidback=id+"_pagination_back";var myidforward=id+"_pagination_forward";if(pagination=="true"){var pag_html="";var myid="'"+id+"'";var forward='"forward"';var backward="'backward'";pag_html='<div style="padding-bottom: 5px;"><a class="pagination_links" id="'+myidback+'"><img style="border: 0;" src="'+Appcelerator.Module.Datatable.modulePath+'images/resultset_previous.png"/></a>&nbsp;<a class="pagination_links" id="'+myidforward+'"><img style="border: 0;" src="'+Appcelerator.Module.Datatable.modulePath+'images/resultset_next.png"/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Showing '+(x+1)+"-"+(length)+" of "+array.length+"</div>";html=pag_html+html}Appcelerator.Compiler.setHTML(id,html);if(pagination=="true"){$(myidback).onclick=function(){Appcelerator.Module.Datatable.createDataTable(id,"backward")}.bind(this);$(myidforward).onclick=function(){Appcelerator.Module.Datatable.createDataTable(id,"forward")}.bind(this);$(myidback).onmousedown=function(){Appcelerator.Module.Datatable.paginateContinuously(id,"backward")}.bind(this);$(myidforward).onmousedown=function(){Appcelerator.Module.Datatable.paginateContinuously(id,"forward")}.bind(this);$(myidback).onmouseup=function(){Appcelerator.Module.Datatable.stopContinuousPagination(id)}.bind(this);$(myidforward).onmouseup=function(){Appcelerator.Module.Datatable.stopContinuousPagination(id)}.bind(this);$(myidback).onmouseout=function(){Appcelerator.Module.Datatable.stopContinuousPagination(id)}.bind(this);$(myidforward).onmouseout=function(){Appcelerator.Module.Datatable.stopContinuousPagination(id)}.bind(this)}var on_run_array=[];for(var i=0,len=on_array.length;i<len;i++){on_run_array.push(Appcelerator.Compiler.compileExpression($(on_array[i]["id"]),on_array[i]["on"],false))}eval(on_run_array.join(";"))},compileWidget:function(B,A){},paginateContinuously:function(C,A){var B=function(){if(A=="forward"){Appcelerator.Module.Datatable.createDataTable(C,"forward")}else{Appcelerator.Module.Datatable.createDataTable(C,"backward")}};$(C).paginationInterval=setInterval(B,250)},stopContinuousPagination:function(A){clearInterval($(A).paginationInterval)},sortDataTableClient:function(L,C){var A=$(C).parameterMap;var E=A["header_array"];var M=A["array"];var F=E[L]["property"];$(C).position=0;$(C).initialLoad=true;var H=true;for(var O=0,K=M.length;O<K;O++){var I=(M[O][F]||"");if(isNaN(parseFloat(I))){H=false}}if(A["sortBy"]==null){A["sortBy"]={};A["sortBy"][F]=false}A["sortBy"][F]=!A["sortBy"][F];if(H){var P=function B(S,R){var U=S[F];var T=R[F];return(A["sortBy"][F]==true)?parseFloat(U)-parseFloat(T):parseFloat(T)-parseFloat(U)};M.sort(P)}else{var J=function B(T,R){var U=T[F].toLowerCase();var S=R[F].toLowerCase();return(A["sortBy"][F]==true)?(S<U)-(U<S):(U<S)-(S<U)};M.sort(J)}var Q='<img src="'+Appcelerator.Module.Datatable.modulePath+'images/arrow_up.png" title="sort ascending" style="position:relative;top:-1px; left: 2px;" />';var D='<img src="'+Appcelerator.Module.Datatable.modulePath+'images/arrow_down.png" title="sort ascending" style="position:relative;top:-1px; left: 2px;" />';var N='<img src="'+Appcelerator.Module.Datatable.modulePath+'images/arrow_spacer.png" title="sort ascending" style="position:relative;top:-1px; left: 2px;" />';for(var G=0,K=E.length;G<K;G++){E[G]["cell"]=E[G]["cell"].replace(Q,"");E[G]["cell"]=E[G]["cell"].replace(D,"");E[G]["cell"]=E[G]["cell"].replace(N,"");E[G]["cell"]+=N}if(!A["sortBy"][F]){E[L]["cell"]=E[L]["cell"].replace(N,"");E[L]["cell"]+=Q}else{E[L]["cell"]=E[L]["cell"].replace(N,"");E[L]["cell"]+=D}A["add_spacers_to_header"]=false;Appcelerator.Module.Datatable.createDataTable(C)},sortDataTableServer:function(C,G){var A=$(G).parameterMap;var E=A["header_array"];var F=A["array"];var B=E[C]["property"];if(A["sortBy"]==null){A["sortBy"]={};A["sortBy"][B]=false}A["sortBy"][B]=!A["sortBy"][B];A["current_server_sort_column"]=B;var D="";if(A["sortBy"][B]){D="desc"}else{D="asc"}$MQ(A["sortRequest"],{"property":B,"direction":D},A["scope"])},execute:function(F,A,D,C){var B=A["property"];var E;$(F).position=0;$(F).initialLoad=true;if(B){E=Object.getNestedProperty(D,B)||[]}A["array"]=E;A["scope"]=C;$(F).parameterMap=A;Appcelerator.Module.Datatable.createDataTable(F)},getAttributes:function(){return[{name:"on",optional:true,description:"Used to populate the data table."},{name:"wire",optional:true,defaultValue:""},{name:"sort",optional:true,defaultValue:"client",description:"Valid values are 'client', 'server', and 'off.'"},{name:"sortRequest",optional:true,defaultValue:"",description:"Message to be sent when the sort mode is 'server' and a column header is clicked."},{name:"rowEvenClass",optional:true,defaultValue:""},{name:"rowOddClass",optional:true,defaultValue:""},{name:"width",optional:true,defaultValue:"100%",description:"Width % of entire table."},{name:"property",optional:true,defaultValue:""},{name:"pagination",optional:true,defaultValue:"false"},{name:"maxRows",optional:true,defaultValue:0}]},buildWidget:function(D,E){var B=document.createElement("div");B.innerHTML=D.innerHTML.replace(/<HEADER/gi,"<div").replace(/<\/HEADER/gi,"</div");var G=B.childNodes;var H=[];for(var C=0,A=G.length;C<A;C++){if(G[C].nodeName.toLowerCase()=="div"){var F={};header_langid=G[C].getAttribute("langid")||"";if(header_langid==""){F["cell"]=Appcelerator.Compiler.getHtml(G[C],true)}else{F["cell"]=Appcelerator.Localization.get(header_langid)}F["on"]=G[C].getAttribute("on")||"";F["class"]=G[C].className||"";F["property"]=G[C].getAttribute("property")||"";F["align"]=G[C].getAttribute("align")||"";H.push(F)}}E["header_array"]=H;E["add_spacers_to_header"]=true;return{"presentation":"","position":Appcelerator.Compiler.POSITION_REPLACE,"compile":true,"parameters":E}}};Appcelerator.Core.registerModule("app:datatable",Appcelerator.Module.Datatable);Appcelerator.Core.loadModuleCSS("app:datatable","datatable.css")
@@ -0,0 +1 @@
1
+ Appcelerator.Module.Http={getName:function(){return"appcelerator http"},getDescription:function(){return"http widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Hamed Hashemi"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:http"},getAttributes:function(){return[{name:"on",optional:false,description:"Used to execute posts/gets"},{name:"response",optional:true,description:"Response message when success"},{name:"error",optional:true,description:"Message to fire when errors received"}]},getActions:function(){return["post","get"]},post:function(E,D,C,B,A){Appcelerator.Module.Http.performFetch(D,C,"post")},get:function(E,D,C,B,A){Appcelerator.Module.Http.performFetch(D,C,"get")},performFetch:function(params,data,method){var uri=params["uri"][method];var response=uri["response"]||params["response"];var error=uri["error"]||params["error"];var property=uri["property"];var methodParams=uri["args"];var responseRegex=uri["responseRegex"];if(!methodParams&&property){var array=Object.getNestedProperty(data,property);if(array){methodParams=Object.toJSON(array[0])}}var compiled=eval(uri["uri"]+"; init_"+params["id"]);var uriLink=compiled(data).trim();if(uriLink.startsWith("http://")){var uriStrip=uriLink.match("http://[^/]*");var currentStrip=window.location.href.match("http://[^/]*");if(currentStrip&&uriStrip&&(uriStrip[0].toLowerCase()!=currentStrip[0].toLowerCase())){var proxy=Appcelerator.ServerConfig["proxy"];if(proxy){uriLink=proxy.value+"?url="+encodeURIComponent(uriLink)}}}$D("app:http sending request to "+uriLink+" with params "+methodParams);new Ajax.Request(uriLink,{method:method,parameters:methodParams,onSuccess:function(result){contentType=result.getResponseHeader("Content-Type");if(result.status==200){var json_result={};$D("app:http onSuccess doing "+method+" to "+uriLink+", status = "+result.status+", contentType = "+contentType+", text = "+result.responseText);if(contentType.indexOf("/xml")>0){json_encode_xml(result.responseXML.documentElement,json_result)}else{if(contentType.indexOf("/json")>0||contentType.indexOf("/plain")>0||contentType.indexOf("/javascript")>0){var text=result.responseText.trim();if(responseRegex){var re=new RegExp(responseRegex);var match=re.exec(text);if(match&&match.length>1){text=match[1]}}json_result=text.evalJSON()}else{$E("app: http onSuccess received invalid content type = "+contentType);return }}if(response){$MQ(response,json_result)}}},onException:function(resp,ex){var msg=new String(ex);$E("app:http onException doing "+method+" to "+msg);if(error){$MQ(error,{msg:msg})}},onFailure:function(result,json){$E("app:http onFailure doing "+method+" to "+uriLink+", status = "+result.status+", text = "+result.statusText);if(error){$MQ(error,{msg:result.statusText})}}})},buildWidget:function(B,D){var A={};if(Appcelerator.Browser.isIE){var C=B.innerHTML;C=C.replace(/<URI/g,"<APP:URI").replace(/\/URI>/g,"/APP:URI>");B.innerHTML=C}for(var E=0;E<B.childNodes.length;E++){(function(){var G=B.childNodes[E];if(G.nodeType==1&&G.nodeName=="URI"){uriLink=Appcelerator.Compiler.compileTemplate(G.getAttribute("uri"),true,"init_"+B.id);var F={uri:uriLink,response:G.getAttribute("response"),args:G.getAttribute("args"),property:G.getAttribute("property"),error:G.getAttribute("error"),responseRegex:G.getAttribute("responseRegex")};A[G.getAttribute("method")]=F}})()}D["uri"]=A;return{"presentation":"","position":Appcelerator.Compiler.POSITION_REPLACE}}};Appcelerator.Core.registerModule("app:http",Appcelerator.Module.Http)
@@ -0,0 +1 @@
1
+ Appcelerator.Module.If={getName:function(){return"appcelerator if"},getDescription:function(){return"if widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Hamed Hashemi"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:if"},getAttributes:function(){return[{name:"expr",optional:false,description:"The javascript expression to execute"}]},compileWidget:function(params){var id=params["id"];if(eval(Appcelerator.Module.If.generateConditional(params["ifcond"]["cond"]))){$(id).innerHTML=params["ifcond"]["code"];Appcelerator.Compiler.dynamicCompile($(id))}else{for(var c=0;c<params["elseifconds"].length;c++){var condition=params["elseifconds"][c];if(eval(Appcelerator.Module.If.generateConditional(condition["cond"]))){$(id).innerHTML=condition.code;Appcelerator.Compiler.dynamicCompile($(id));return }}var elsecond=params["elsecond"];if(elsecond){$(id).innerHTML=elsecond.code;Appcelerator.Compiler.dynamicCompile($(id))}}},uniqueFunctionId:0,generateConditional:function(A){Appcelerator.Module.If.uniqueFunctionId++;var B="app_if_function_"+Appcelerator.Module.If.uniqueFunctionId;var A="var "+B+" = function () { if ("+A+")";A+="{ return true; }";A+="else { return false; }};";A+=B+"();";return A},buildWidget:function(B,F){var E={code:"",cond:F["expr"]};var A=[];var D;if(Appcelerator.Browser.isIE){var C=B.innerHTML;C=C.replace(/<ELSEIF/g,"<APP:ELSEIF").replace(/\/ELSEIF>/g,"/APP:ELSEIF>");C=C.replace(/<ELSE/g,"<APP:ELSE").replace(/\/ELSE>/g,"/APP:ELSE>");B.innerHTML=C}for(var G=0;G<B.childNodes.length;G++){(function(){var J,H;var I=B.childNodes[G];if(I.nodeType==1&&I.nodeName=="ELSEIF"){if(D){throw ("syntax error: elseif after an else detected.")}A.push({code:Appcelerator.Compiler.getHtml(I),cond:I.getAttribute("expr")})}else{if(I.nodeType==1&&I.nodeName=="ELSE"){if(D){throw ("syntax error: more than one else statement detected.")}D={code:Appcelerator.Compiler.getHtml(I)}}else{if(I.nodeType==1){if(D||A.length>0){throw ("syntax error: html code after an else or elseif detected.")}E["code"]+=Appcelerator.Compiler.convertHtml(Appcelerator.Util.Dom.toXML(I,true),true)}else{if(I.nodeType==3){var K=I.nodeValue.trim();if((D||A.length>0)&&K.length>0){throw ("Html code after an else or elseif detected.")}E["code"]+=K}}}}})()}F["ifcond"]=E;F["elseifconds"]=A;F["elsecond"]=D;return{"presentation":"","position":Appcelerator.Compiler.POSITION_REPLACE,"compile":true}}};Appcelerator.Core.registerModule("app:if",Appcelerator.Module.If)
@@ -1 +1 @@
1
- Appcelerator.Module.Iterator={getName:function(){return"appcelerator iterator"},getDescription:function(){return"iterator widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Jeff Haynie"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:iterator"},execute:function(id,parameterMap,data,scope){var compiled=parameterMap["compiled"];var propertyName=parameterMap["property"];var table=parameterMap["table"];var width=parameterMap["width"];var headers=parameterMap["headers"];var selectable=parameterMap["selectable"];var array=null;if(!compiled){compiled=eval(parameterMap["template"]+"; init_"+id);parameterMap["compiled"]=compiled}if(propertyName){array=Object.getNestedProperty(data,propertyName)||[]}var html="";if(!array){html=compiled(data)}else{if(table){html+='<table width="'+width+'" cellspacing="'+parameterMap["cellspacing"]+'"><tr>';headers.each(function(h){html+="<th>"+h+"</th>"});html+="</tr>"}for(var c=0,len=array.length;c<len;c++){var o=array[c];o["iterator_index"]=c;o["iterator_length"]=len;o["iterator_odd_even"]=(c%2==0)?"even":"odd";if(table){if(o["iterator_odd_even"]=="odd"){html+='<tr class="'+parameterMap["rowOddClassName"]+'">'}else{html+='<tr class="'+parameterMap["rowEvenClassName"]+'">'}}for(idx in o){if(typeof o[idx]=="string"){o[idx]=o[idx].replace(/'/,"\u2019")}}html+=compiled(o);if(table){html+="</tr>"}}if(table){html+="</table>"}}var element=$(id);if(selectable){element.setAttribute("selectable",selectable)}element.innerHTML=html;Appcelerator.Compiler.dynamicCompile(element)},getAttributes:function(){return[{name:"on",optional:false,description:"Used to execute the iterator"},{name:"rowEvenClassName",optional:true},{name:"rowOddClassName",optional:true},{name:"property",optional:false},{name:"table",optional:true,defaultValue:"false"},{name:"width",optional:true,defaultValue:"100%"},{name:"headers",optional:true,defaultValue:","},{name:"cellspacing",optional:true,defaultValue:"0"},{name:"selectable",optional:true}]},buildWidget:function(A,B){B["template"]=Appcelerator.Compiler.compileTemplate(Appcelerator.Compiler.getHtml(A),true,"init_"+A.id);B["table"]=B["table"]=="true";if(B["table"]){B["headers"]=B["headers"].split(",")}return{"presentation":"","position":Appcelerator.Compiler.POSITION_REPLACE,"parameters":B,"functions":["execute"],"wire":true}}};Appcelerator.Core.registerModule("app:iterator",Appcelerator.Module.Iterator)
1
+ Appcelerator.Module.Iterator={getName:function(){return"appcelerator iterator"},getDescription:function(){return"iterator widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Jeff Haynie"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:iterator"},getActions:function(){return["execute"]},execute:function(id,parameterMap,data,scope){var compiled=parameterMap["compiled"];var propertyName=parameterMap["property"];var items=parameterMap["items"];var table=parameterMap["table"];var width=parameterMap["width"];var headers=parameterMap["headers"];var selectable=parameterMap["selectable"];var array=null;if(!compiled){compiled=eval(parameterMap["template"]+"; init_"+id);parameterMap["compiled"]=compiled}if(items){data=items.evalJSON()||[]}if(propertyName){array=Object.getNestedProperty(data,propertyName)||[]}else{array=data}var html="";if(!array){html=compiled(data)}else{if(table){html+='<table width="'+width+'" cellspacing="'+parameterMap["cellspacing"]+'"><tr>';headers.each(function(h){html+="<th>"+h+"</th>"});html+="</tr>"}for(var c=0,len=array.length;c<len;c++){var o=array[c];if(typeof o!="object"){o={"iterator_value":o}}o["iterator_index"]=c;o["iterator_length"]=len;o["iterator_odd_even"]=(c%2==0)?"even":"odd";if(table){if(o["iterator_odd_even"]=="odd"){html+='<tr class="'+parameterMap["rowOddClassName"]+'">'}else{html+='<tr class="'+parameterMap["rowEvenClassName"]+'">'}}for(idx in o){if(typeof o[idx]=="string"){o[idx]=o[idx].replace(/'/,"\u2019")}}html+=compiled(o);if(table){html+="</tr>"}}if(table){html+="</table>"}}var element=$(id);if(selectable){element.setAttribute("selectable",selectable)}element.innerHTML=html;Appcelerator.Compiler.dynamicCompile(element)},getAttributes:function(){return[{name:"on",optional:true,description:"Used to execute the iterator"},{name:"items",optional:true,description:"Literal (or template-replaced) JSON array to iterate over"},{name:"property",optional:true},{name:"rowEvenClassName",optional:true},{name:"rowOddClassName",optional:true},{name:"table",optional:true,defaultValue:"false"},{name:"width",optional:true,defaultValue:"100%"},{name:"headers",optional:true,defaultValue:","},{name:"cellspacing",optional:true,defaultValue:"0"},{name:"selectable",optional:true}]},compileWidget:function(A){this.execute(A["id"],A,null,"")},buildWidget:function(A,B){B["template"]=Appcelerator.Compiler.compileTemplate(Appcelerator.Compiler.getHtml(A),true,"init_"+A.id);B["table"]=B["table"]=="true";if(B["table"]){B["headers"]=B["headers"].split(",")}var C=!!(!B["on"]&&B["items"]);return{"presentation":"","position":Appcelerator.Compiler.POSITION_REPLACE,"parameters":B,"wire":true,"compile":C}}};Appcelerator.Core.registerModule("app:iterator",Appcelerator.Module.Iterator)
@@ -1 +1 @@
1
- Appcelerator.Module.Message={getName:function(){return"appcelerator message"},getDescription:function(){return"message widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Jeff Haynie"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:message"},execute:function(E,A,D,C,B){Appcelerator.Module.Message.sendMessage(A)},getAttributes:function(){return[{name:"on",optional:true,description:"May be used to express when the message should be fired (executed)."},{name:"name",optional:false,description:"The name of the message to be fired."},{name:"args",optional:true,description:"The arguement payload of the message."},{name:"version",optional:true,description:"The version attached to the message."},{name:"interval",optional:true,description:"Indicates that an interval (in milliseconds) that the message will continously be fired."}]},buildWidget:function(G,D){var F=D["name"];var E=D["args"];var B=D["version"];var A=D["on"];E=E?String.unescapeXML(E):null;var C=D["interval"];var H={args:E,name:F,scope:G.scope,interval:C,version:B};if(A){return{"position":Appcelerator.Compiler.POSITION_REMOVE,"functions":["execute"],"parameters":H}}else{Appcelerator.Module.Message.sendMessage(H);return{"position":Appcelerator.Compiler.POSITION_REMOVE}}},sendMessage:function(E){var A=E.name;var H=E.args;var G=E.version;var I=E.scope;var C=E.interval;if(H&&H!="null"){var F=Object.evalWithinScope(H,window)}$MQ(A,F,I,G);if(C!=null){var D=parseInt(C);if(D>0){var B=setInterval(function(){if(H&&H!="null"){F=Object.evalWithinScope(H,window)}$MQ(A,F,I,G)},D)}}}};Appcelerator.Core.registerModule("app:message",Appcelerator.Module.Message)
1
+ Appcelerator.Module.Message={getName:function(){return"appcelerator message"},getDescription:function(){return"message widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Jeff Haynie"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:message"},execute:function(E,A,D,C,B){Appcelerator.Module.Message.sendMessage(A)},getActions:function(){return["execute"]},getAttributes:function(){return[{name:"on",optional:true,description:"May be used to express when the message should be fired (executed)."},{name:"name",optional:false,description:"The name of the message to be fired."},{name:"args",optional:true,description:"The arguement payload of the message."},{name:"version",optional:true,description:"The version attached to the message."},{name:"interval",optional:true,description:"Indicates that an interval (in milliseconds) that the message will continously be fired."}]},buildWidget:function(G,D){var F=D["name"];var E=D["args"];var B=D["version"];var A=D["on"];E=E?String.unescapeXML(E):null;var C=D["interval"];var H={args:E,name:F,scope:G.scope,interval:C,version:B};if(A){return{"position":Appcelerator.Compiler.POSITION_REMOVE,"parameters":H}}else{Appcelerator.Module.Message.sendMessage(H);return{"position":Appcelerator.Compiler.POSITION_REMOVE}}},sendMessage:function(E){var A=E.name;var H=E.args;var G=E.version;var I=E.scope;var C=E.interval;if(H&&H!="null"){var F=Object.evalWithinScope(H,window)}$MQ(A,F,I,G);if(C!=null){var D=parseInt(C);if(D>0){var B=setInterval(function(){if(H&&H!="null"){F=Object.evalWithinScope(H,window)}$MQ(A,F,I,G)},D)}}}};Appcelerator.Core.registerModule("app:message",Appcelerator.Module.Message)
@@ -1 +1 @@
1
- Appcelerator.Module.Modaldialog={getName:function(){return"appcelerator modaldialog"},getDescription:function(){return"modaldialog widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Jeff Haynie"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:modaldialog"},execute:function(id,parameterMap,data,scope){var compiled=parameterMap["compiled"];var propertyName=parameterMap["property"];var array=null;if(!compiled){compiled=eval(parameterMap["template"]+"; init_"+id);parameterMap["compiled"]=compiled}if(propertyName){array=Object.getNestedProperty(data,propertyName)||[]}var html="";if(!array||array.length==0){html=compiled(data)}else{html=compiled(array[0])}html='<div scope="'+(scope||element.scope)+'">'+html+"</div>";var overlay=$("overlay");var overlaydata=$("overlay_data");overlaydata.innerHTML=html;Appcelerator.Compiler.dynamicCompile(overlaydata);var arrayPageSize=Element.getDocumentSize();overlay.style.height=arrayPageSize[3]+250+"px";Element.show(overlay);var dataTop=0;if(!parameterMap["top"]){var arrayPageScroll=Element.getPageScroll();var dataTop=Math.min(80,arrayPageScroll+(arrayPageSize[3]/5));$D("modaldialog: dataTop="+dataTop+",arrayPageScroll="+arrayPageScroll+",arrayPageSize[3]="+arrayPageSize[3])}else{dataTop=parseInt(parameterMap["top"])}overlaydata.style.top=dataTop+"px";Element.show(overlaydata)},getAttributes:function(){return[{name:"on",optional:false,description:"Used to show the modal dialog"},{name:"property",optional:true},{name:"top",optional:true}]},buildWidget:function(D,E,G){var A="l:appcelerator.modaldialog.hide";var C=$("overlay");if(!C){var B='<div id="overlay" style="display: none" on="'+A+' then hide" scope="*"></div>';new Insertion.Bottom(document.body,B);C=$("overlay");C.modaldialog_compiled=1;Appcelerator.Compiler.compileElement(C,G)}else{if(!C.modaldialog_compiled){C.setAttribute("scope","*");C.setAttribute("on",A+" then hide");Appcelerator.Compiler.compileElement(C,G);C.modaldialog_compiled=1}}var H=$("overlay_data");if(!H){var F='<div on="'+A+' then hide" class="overlay_data" id="overlay_data" style="display: none" scope="*"></div>';new Insertion.Bottom(document.body,F);H=$("overlay_data");Appcelerator.Compiler.compileElement(H,G)}E["template"]=Appcelerator.Compiler.compileTemplate(Appcelerator.Compiler.getWidgetHTML(D),true,"init_"+D.id);return{"position":Appcelerator.Compiler.POSITION_REMOVE,"functions":["execute"],"parameters":E,"wire":true}}};Appcelerator.Core.registerModule("app:modaldialog",Appcelerator.Module.Modaldialog);Appcelerator.Core.loadModuleCSS("app:modaldialog","modaldialog.css")
1
+ Appcelerator.Module.Modaldialog={getName:function(){return"appcelerator modaldialog"},getDescription:function(){return"modaldialog widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Jeff Haynie"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:modaldialog"},getActions:function(){return["execute"]},execute:function(id,parameterMap,data,scope){var compiled=parameterMap["compiled"];var propertyName=parameterMap["property"];var array=null;if(!compiled){compiled=eval(parameterMap["template"]+"; init_"+id);parameterMap["compiled"]=compiled}if(propertyName){array=Object.getNestedProperty(data,propertyName)||[]}var html="";if(!array||array.length==0){html=compiled(data)}else{html=compiled(array[0])}html='<div scope="'+(scope||element.scope)+'">'+html+"</div>";var overlay=$("overlay");var overlaydata=$("overlay_data");overlaydata.innerHTML=html;Appcelerator.Compiler.dynamicCompile(overlaydata);var arrayPageSize=Element.getDocumentSize();overlay.style.height=arrayPageSize[3]+250+"px";Element.show(overlay);var dataTop=0;if(!parameterMap["top"]){var arrayPageScroll=Element.getPageScroll();var dataTop=Math.min(80,arrayPageScroll+(arrayPageSize[3]/5));$D("modaldialog: dataTop="+dataTop+",arrayPageScroll="+arrayPageScroll+",arrayPageSize[3]="+arrayPageSize[3])}else{dataTop=parseInt(parameterMap["top"])}overlaydata.style.top=dataTop+"px";Element.show(overlaydata)},getAttributes:function(){return[{name:"on",optional:false,description:"Used to show the modal dialog"},{name:"property",optional:true},{name:"top",optional:true}]},buildWidget:function(D,E,G){var A="l:appcelerator.modaldialog.hide";var C=$("overlay");if(!C){var B='<div id="overlay" style="display: none" on="'+A+' then hide" scope="*"></div>';new Insertion.Bottom(document.body,B);C=$("overlay");C.modaldialog_compiled=1;Appcelerator.Compiler.compileElement(C,G)}else{if(!C.modaldialog_compiled){C.setAttribute("scope","*");C.setAttribute("on",A+" then hide");Appcelerator.Compiler.compileElement(C,G);C.modaldialog_compiled=1}}var H=$("overlay_data");if(!H){var F='<div on="'+A+' then hide" class="overlay_data" id="overlay_data" style="display: none" scope="*"></div>';new Insertion.Bottom(document.body,F);H=$("overlay_data");Appcelerator.Compiler.compileElement(H,G)}E["template"]=Appcelerator.Compiler.compileTemplate(Appcelerator.Compiler.getWidgetHTML(D),true,"init_"+D.id);return{"position":Appcelerator.Compiler.POSITION_REMOVE,"parameters":E,"wire":true}}};Appcelerator.Core.registerModule("app:modaldialog",Appcelerator.Module.Modaldialog);Appcelerator.Core.loadModuleCSS("app:modaldialog","modaldialog.css")
@@ -0,0 +1 @@
1
+ Appcelerator.Module.Panel={modulePath:null,setPath:function(A){this.modulePath=A},getName:function(){return"appcelerator panel"},getDescription:function(){return"script panel"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Tejus Parikh"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:panel"},dontParseOnAttributes:function(){return true},getActions:function(){return["toggle","shade","unshade","close"]},getAttributes:function(){return[{name:"header_text",optional:true,description:"The text that should be displayed in the header. Setting a value implies a header will be shown"},{name:"color",optional:true,description:"The color scheme of the widget. Supported schemes: light_gray, dark_gray"},{name:"rounded",optional:true,description:"Set to true for rounded corners"},{name:"close",optional:true,description:"Set to true to display a close button"},{name:"shade",optional:true,description:"Set to true to enable shade/unshade. Setting this implies the header will be shown"},{name:"on",optional:true,description:"Set to enable the widget to listen to events"},{name:"draggable",optional:true,description:"Set to enable draging"},{name:"resizable",optional:true,description:"Set to enable the widget to be resized"},{name:"tail",optional:true,description:"Set to right or left to show a tail under the box (speech bubble)"},{name:"width",optional:true,description:"Width of the dialog box"},{name:"height",optional:true,description:"Height for the dialog box"},{name:"userClass",optional:true,description:"Additional classes for the dialog"}]},toggle:function(E,C,D,B,A){if($(E).hasClassName("shade")){unshade(E)}else{shade(E)}},close:function(E,C,D,B,A){$(E).style.display="none";$MQ("l:"+E+".closed")},shade:function(F,D,E,C,A){var B=$(F+"_shade");if(B){B.style.display="none";$(F+"_unshade").style.display="block";$(F).firstDescendant().addClassName("shade");$MQ("l:"+F+".shaded")}},unshade:function(F,D,E,C,A){var B=$(F+"_shade");if(B){$(F+"_unshade").style.display="none";$(F+"_shade").style.display="block";$(F).firstDescendant().removeClassName("shade");$MQ("l:"+F+".unshaded")}},compileWidget:function(E){var F=E["id"];var C=$(F+"_shade");var A=$(F+"_unshade");var B=$(F+"_close");var D=false;if(typeof E["height"]!="undefined"){$(F).style.height=E["height"];D=true}if(typeof E["width"]!="undefined"){$(F).style.width=E["width"];D=true}if(typeof E["userClass"]!="undefined"){D=true}if(Appcelerator.Browser.isIE6&&!D){$(F+"_content").style.marginRight="1px"}if(Appcelerator.Browser.isIE7&&D&&typeof E["tail"]!="undefined"){$(F).style.marginBottom="50px"}if(null!=B){Event.observe(B,"mouseover",function(){B.className="app_panel_button close_button_hover"});Event.observe(B,"mouseout",function(){B.className="app_panel_button close_button"});Event.observe(B,"mousedown",function(){B.className="app_panel_button close_button_onclick"});Event.observe(B,"mouseup",function(){B.className="app_panel_button close_button"});Event.observe(B,"click",function(G){Appcelerator.Module.Panel.close(F)})}if(null!=C){Event.observe(C,"mouseover",function(){C.className="app_panel_button shade_button_hover"});Event.observe(C,"mouseout",function(){C.className="app_panel_button shade_button"});Event.observe(C,"mousedown",function(){C.className="app_panel_button shade_button_onclick"});Event.observe(C,"mouseup",function(){C.className="app_panel_button shade_button"});Event.observe(C,"click",function(G){Appcelerator.Module.Panel.shade(F)})}if(null!=A){Event.observe(A,"mouseover",function(){A.className="app_panel_button unshade_button_hover"});Event.observe(A,"mouseout",function(){A.className="app_panel_button unshade_button"});Event.observe(A,"mousedown",function(){A.className="app_panel_button unshade_button_onclick"});Event.observe(A,"mouseup",function(){A.className="app_panel_button unshade_button"});Event.observe(A,"click",function(G){Appcelerator.Module.Panel.unshade(F)})}},buildWidget:function(G,N){var O="AP_DGRP";var I=N["header_text"];var A=N["shade"]=="true";var F="collapsed";var C=N["close"]=="true";var K=N["tail"];if(typeof I!="undefined"||A){F=""}if(typeof I=="undefined"){I=""}var E="light_gray";if(N["color"]){E=N["color"]}var D=N["rounded"]=="true";if("dark_gray"==E){O=(D)?"AP_DGRP":"AP_DGSP"}else{if("light_gray"==E){O=(D)?"AP_LGRP":"AP_LGSP"}}var B="";if(C&&F=="collapsed"){B="extra_padding"}var M=Appcelerator.Compiler.getHtml(G);var J=[];var H=[];var L="";if(typeof N["userClass"]!="undefined"){L=N["userClass"]}J.push('<div class="app_panel '+O+" "+L+'" id="'+G.id+'"');if(typeof N["on"]!="undefined"){J.push(' on="'+N["on"]+'"')}if(typeof N["draggable"]!="undefined"){J.push(' draggable="'+N["draggable"]+'"')}if(typeof N["resizable"]!="undefined"){J.push(' resizable="'+N["resizable"]+'"')}J.push(">");var H=[];H.push(J.join(" "));H.push('<div class="app_panel_container '+F+'">');H.push('<div class="panel_header_container"> <div class="panel_hl"> </div> <div class="panel_hr"> </div>');H.push('<div class="panel_hc">');if(C||A){H.push("<div class='button_panel'>");if(A){H.push('<div id="'+G.id+'_unshade" class="app_panel_button unshade_button"><span>unshade</span></div>');H.push('<div id="'+G.id+'_shade" class="app_panel_button shade_button"><span>shade</span></div>')}if(C){H.push('<div id="'+G.id+'_close" class="app_panel_button close_button"><span>close</span></div>')}H.push("</div>")}H.push('<div class="panel_header">');H.push("<h3>"+I+"</h3>");H.push("</div>");H.push("</div> </div>");H.push('<div class="ap_body"> ');H.push('<div id="'+G.id+'_content" class="panel_content_container '+B+'">');H.push('<div class="panel_cl"></div>');H.push('<div class="panel_cr"></div>');H.push('<div class="panel_cc">');H.push('<div class="panel_body" >');H.push(M);H.push("</div>");H.push("</div>");H.push("</div>");H.push('<div class="panel_footer_container"> <div class="panel_fl"> </div> <div class="panel_fr"> </div> <div class="panel_fc"> </div>');if(typeof K!="undefined"){H.push('<div class="panel_tail">');H.push('<div class="tail_'+K+'">');H.push("</div>");H.push("</div>")}H.push("</div>");H.push("</div>");H.push("</div>");H.push("</div>");return{"presentation":H.join(" "),"position":Appcelerator.Compiler.POSITION_REPLACE,"compile":true,"wire":true}}};Appcelerator.Core.registerModule("app:panel",Appcelerator.Module.Panel);Appcelerator.Core.loadModuleCSS("app:panel","panel.css");if(Appcelerator.Browser.isIE7){Appcelerator.Core.loadModuleCSS("app:panel","panel_ie7.css")}
@@ -0,0 +1,24 @@
1
+ <html>
2
+ <head>
3
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
4
+ <title>App Panel Test</title>
5
+ <link href="css/panel_div.css" type="text/css" rel="stylesheet" />
6
+ </head>
7
+ <body id="app_panel_texdt" onload="">
8
+ <div class="app_panel AP_LGRP">
9
+ <div class="app_panel_container">
10
+ <div class="panel_hl">
11
+ <div class="panel_hr">
12
+ <div class="panel_hc">
13
+ <div class="ap_header">
14
+ I am the header
15
+ </div>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ <div class="ap_body">
20
+ </div>
21
+ </div>
22
+ </div>
23
+ </body>
24
+ </html>
@@ -0,0 +1 @@
1
+ .app_panel{position:relative;clear:both;}.app_panel .app_panel_container{position:relative;height:100%;}.app_panel .ap_body{height:100%;}.app_panel .panel_hl{position:absolute;top:0;left:0;height:36px;width:6px;padding-left:6px;background-repeat:no-repeat;background-position:top left;}.app_panel .panel_hc{margin-left:6px;margin-right:6px;height:36px;background-repeat:repeat-x;padding:0;}.app_panel .panel_hr{position:absolute;top:0;right:0;height:36px;width:6px;padding-right:6px;background-repeat:no-repeat;background-position:top right;}.app_panel .panel_header{padding:7px 0;height:22px;overflow:hidden;}.app_panel .panel_header_container{position:relative;}.app_panel h3{font-weight:bold;font-family:Tahoma,sans-serif;padding:0 0 0 10px;font-size:14px;margin:0;color:#545454;}.app_panel .collapsed .panel_hl,.app_panel .collapsed .panel_hc,.app_panel .collapsed .panel_hr{padding-bottom:0;height:6px;}* html .app_panel .panel_hl{left:-6px;}.app_panel .panel_cl{background-color:black;position:relative;float:left;height:100%;padding-left:6px;background-repeat:repeat-y;background-position:bottom left;}.app_panel .panel_cc{background-repeat:repeat;padding:0;height:inherit;}.app_panel .panel_cr{position:absolute;position:relative;float:right;right:0;height:100%;padding-right:6px;background-repeat:repeat-y;background-position:bottom right;}.app_panel .panel_content_container{height:100%;}.app_panel .panel_body{padding:6px 15px 6px 15px;height:100%;}* html .app_panel .panel_body{padding-left:7px;padding-right:7px;}.app_panel .panel_fl{position:absolute;top:0;left:0;height:6px;width:6px;background-repeat:no-repeat;background-position:top left;}.app_panel .panel_fc{height:6px;background-repeat:repeat-x;padding:0;margin-left:6px;margin-right:6px;}.app_panel .panel_fr{position:absolute;top:0;right:0;height:6px;width:6px;padding-right:6px;background-repeat:no-repeat;background-position:top right;}.app_panel .panel_footer_container{position:relative;}* html .app_panel .panel_fl{left:-6px;}* html .app_panel .panel_fc{margin-bottom:-4px;}.app_panel .tail_left,.app_panel .tail_right{width:46px;height:38px;position:relative;top:-1px;z-index:1000;}.app_panel .tail_left{float:left;left:25px;}.app_panel .tail_right{float:right;right:25px;}* html .app_panel .tail_left,* html .app_panel .tail_right{top:-5px;}.app_panel .button_panel{position:absolute;top:5px;right:10px;position:absolute;z-index:1000;}.app_panel .app_panel_button{height:21px;width:21px;position:relative;float:left;margin-left:5px;cursor:pointer;}.app_panel .app_panel_button span{display:none;}.app_panel .close_button{background:url(../images/close.png);}.app_panel .close_button_hover{background:url(../images/close_hover.png);}.app_panel .close_button_onclick{background:url(../images/close_onclick.png);}.app_panel .shade_button{background:url(../images/up.png);}.app_panel .shade_button_hover{background:url(../images/up_hover.png);}.app_panel .shade_button_onclick{background:url(../images/up_onclick.png);}.app_panel .unshade_button{background:url(../images/down.png);display:none;}.app_panel .unshade_button_hover{background:url(../images/down_hover.png);}.app_panel .unshade_button_onclick{background:url(../images/down_onclick.png);}.app_panel .shade .ap_body{display:none;}.app_panel .extra_padding{padding-top:23px;}.AP_DGSP .collapsed .panel_hl{background-image:url(../images/collapsed_headers_12.png);}.AP_DGSP .collapsed .panel_hc{background-image:url(../images/collapsed_headers_13.gif);}.AP_DGSP .collapsed .panel_hr{background-image:url(../images/collapsed_headers_15.png);}.AP_DGSP .collapsed .panel_header{display:none;}.AP_DGSP .panel_hl{background-image:url(../images/expanded_headers_12.png);}.AP_DGSP .panel_hc{background-image:url(../images/expanded_headers_13.gif);}.AP_DGSP .panel_hr{background-image:url(../images/expanded_headers_15.png);}.AP_DGSP .panel_content_container{background:#e9e9e9;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;}.AP_DGSP .panel_cl{background:#e9e9e9;}.AP_DGSP .panel_cc{background:#e9e9e9;}.AP_DGSP .panel_cr{background:#e9e9e9;}.AP_DGSP .panel_fl{background-image:url(../images/footer_30.png);}.AP_DGSP .panel_fc{background-image:url(../images/footer_43.gif);}.AP_DGSP .panel_fr{background-image:url(../images/footer_32.png);}.AP_DGRP .collapsed .panel_hl{background-image:url(../images/collapsed_headers_17.png);}.AP_DGRP .collapsed .panel_hc{background-image:url(../images/collapsed_headers_13.gif);}.AP_DGRP .collapsed .panel_hr{background-image:url(../images/collapsed_headers_19.png);}.AP_DGRP .collapsed .panel_header{display:none;}.AP_DGRP .panel_hl{background-image:url(../images/expanded_headers_17.png);}.AP_DGRP .panel_hc{background-image:url(../images/expanded_headers_13.gif);}.AP_DGRP .panel_hr{background-image:url(../images/expanded_headers_19.png);}.AP_DGRP .panel_content_container{background:#e9e9e9;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;}.AP_DGRP .panel_cl{background:#e9e9e9;}.AP_DGRP .panel_cc{background:#e9e9e9;}.AP_DGRP .panel_cr{background:#e9e9e9;}.AP_DGRP .panel_fl{background-image:url(../images/footer_37.png);}.AP_DGRP .panel_fc{background-image:url(../images/footer_43.gif);}.AP_DGRP .panel_fr{background-image:url(../images/footer_39.png);}.AP_DGRP .tail_right{background-image:url(../images/gray_left_tail.png);}.AP_DGSP .tail_right{background-image:url(../images/gray_left_tail.png);}.AP_DGRP .tail_left{background-image:url(../images/gray_right_tail.png);}.AP_DGSP .tail_left{background-image:url(../images/gray_right_tail.png);}.AP_LGSP .collapsed .panel_hl{background-image:url(../images/collapsed_headers_62.png);}.AP_LGSP .collapsed .panel_hc{background-image:url(../images/collapsed_headers_63.gif);}.AP_LGSP .collapsed .panel_hr{background-image:url(../images/collapsed_headers_65.png);}.AP_LGSP .collapsed .panel_header{display:none;}.AP_LGSP .panel_hl{background-image:url(../images/expanded_headers_52.png);}.AP_LGSP .panel_hc{background-image:url(../images/expanded_headers_53.gif);}.AP_LGSP .panel_hr{background-image:url(../images/expanded_headers_55.png);}.AP_LGSP .panel_content_container{background:white;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;}.AP_LGSP .panel_cl{background:white;}.AP_LGSP .panel_cc{background:white;}.AP_LGSP .panel_cr{background:white;}.AP_LGSP .panel_fl{background-image:url(../images/footer_72.png);}.AP_LGSP .panel_fc{background-image:url(../images/footer_93.gif);}.AP_LGSP .panel_fr{background-image:url(../images/footer_75.png);}.AP_LGRP .collapsed .panel_hl{background-image:url(../images/collapsed_headers_67.png);}.AP_LGRP .collapsed .panel_hc{background-image:url(../images/collapsed_headers_63.gif);}.AP_LGRP .collapsed .panel_hr{background-image:url(../images/collapsed_headers_69.png);}.AP_LGRP .collapsed .panel_header{display:none;}.AP_LGRP .panel_hl{background-image:url(../images/expanded_headers_57.png);}.AP_LGRP .panel_hc{background-image:url(../images/expanded_headers_53.gif);}.AP_LGRP .panel_hr{background-image:url(../images/expanded_headers_59.png);}.AP_LGRP .panel_content_container{background:white;border-left:1px solid #cdcdcd;border-right:1px solid #cdcdcd;}.AP_LGRP .panel_cl{background:white;}.AP_LGRP .panel_cc{background:white;}.AP_LGRP .panel_cr{background:white;}.AP_LGRP .panel_fl{background-image:url(../images/footer_77.png);}.AP_LGRP .panel_fc{background-image:url(../images/footer_93.gif);}.AP_LGRP .panel_fr{background-image:url(../images/footer_79.png);}.AP_LGRP .tail_right{background-image:url(../images/white_left_tail.png);}.AP_LGSP .tail_right{background-image:url(../images/white_left_tail.png);}.AP_LGRP .tail_left{background-image:url(../images/white_right_tail.png);}.AP_LGSP .tail_left{background-image:url(../images/white_right_tail.png);}
@@ -0,0 +1 @@
1
+ .app_panel .panel_body{padding:0;margin:3px 15px 3px 15px;height:100%;}
@@ -0,0 +1 @@
1
+ Appcelerator.Module.ProgressBar={getName:function(){return"appcelerator progressbar"},getDescription:function(){return"progressbar widget"},setPath:function(A){this.modulePath=A},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Martin Robinson"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:progressbar"},execute:function(D,A,C,B){},compileWidget:function(F){var A=F["id"];var B=F["animate"];var G=$(A);var E=$(A+"_progressbar_border");var D=$(A+"_progressbar_fill");Appcelerator.Compiler.addTrash(G,function(){});var I=F["message"];if(I){I=Appcelerator.Compiler.convertMessageType(I);var H=F["property"];var C={accept:function(){return[I]},acceptScope:function(J){return G.scope=="*"||G.scope==J},onMessage:function(J,M,K,O){try{$D("received message = "+O+":"+J+",data="+Object.toJSON(M));var L=H?Object.getNestedProperty(M,H):M;L=Math.max(0,L);L=Math.min(100,L);if(B=="true"){$(A+"_progressbar_fill").morph("width: "+L+"%")}else{D.style.width=L+"%"}}catch(N){Appcelerator.Compiler.handleElementException(G,N)}}};Appcelerator.Util.ServiceBroker.addListener(C)}},getAttributes:function(){return[{name:"borderClassName",optional:true,defaultValue:""},{name:"fillClassName",optional:true,defaultValue:""},{name:"width",optional:true,defaultValue:"500px"},{name:"height",optional:true,defaultValue:"30px"},{name:"message",optional:true},{name:"property",optional:true},{name:"animate",optional:true,defaultValue:"true"}]},buildWidget:function(G,K){var I=K["borderClassName"];var E=K["fillClassName"];var C=K["width"];var L=K["height"];var B=G.id;var H="";var D='"width: '+C+"; height: "+L+'"';var F='"'+B+'_progressbar_border"';H+="<div style="+D+" id="+F;if(I!=""){H+=' class="'+I+'">'}else{H+=' class="progressbar_border">'}var A='"height: 100%; width: 0%;"';var J='"'+B+'_progressbar_fill"';H+="<div style="+A+" id="+J;if(E!=""){H+=' class="'+E+'">'}else{H+=' class="progressbar_fill">'}H+="</div></div>";K["id"]=G.id;return{"presentation":H,"position":Appcelerator.Compiler.POSITION_REPLACE,"compile":true,"wire":true}}};Appcelerator.Core.registerModule("app:progressbar",Appcelerator.Module.ProgressBar);Appcelerator.Core.loadModuleCSS("app:progressbar","progressbar.css")
@@ -0,0 +1 @@
1
+ .progressbar_border{border:inset medium gray;height:20px;width:500px;}.progressbar_fill{background:gray;}
@@ -1 +1 @@
1
- Appcelerator.Module.Script={getName:function(){return"appcelerator script"},getDescription:function(){return"script widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Jeff Haynie"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:script"},getAttributes:function(){return[{name:"on",optional:true,description:"May be used to execute the script's content."}]},execute:function(G,A,F,D,B){var E=A["code"];var C=E.toFunction(true);if(C==true){return }C.call({data:F||{},scope:D,version:B})},compileWidget:function(params){window.eval(params["code"])},buildWidget:function(A,C){var B=Appcelerator.Compiler.getHtml(A);B=B.replace(/\/\*.*\*\//g,"");if(B&&B.trim().length>0){C["code"]=String.unescapeXML(B);if(C["on"]){return{"position":Appcelerator.Compiler.POSITION_REMOVE,"functions":["execute"]}}else{return{"position":Appcelerator.Compiler.POSITION_REMOVE,"compile":true}}}return{"position":Appcelerator.Compiler.POSITION_REMOVE}}};Appcelerator.Core.registerModule("app:script",Appcelerator.Module.Script)
1
+ Appcelerator.Module.Script={getName:function(){return"appcelerator script"},getDescription:function(){return"script widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Jeff Haynie"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:script"},getActions:function(){return["execute"]},getAttributes:function(){return[{name:"on",optional:true,description:"May be used to execute the script's content."}]},execute:function(G,A,F,D,B){var E=A["code"];var C=E.toFunction(true);if(C==true){return }C.call({data:F||{},scope:D,version:B})},compileWidget:function(params){window.eval(params["code"])},buildWidget:function(A,C){var B=Appcelerator.Compiler.getHtml(A);B=B.replace(/\/\*.*\*\//g,"");if(B&&B.trim().length>0){C["code"]=String.unescapeXML(B);if(C["on"]){return{"position":Appcelerator.Compiler.POSITION_REMOVE}}else{return{"position":Appcelerator.Compiler.POSITION_REMOVE,"compile":true}}}return{"position":Appcelerator.Compiler.POSITION_REMOVE}}};Appcelerator.Core.registerModule("app:script",Appcelerator.Module.Script)
@@ -0,0 +1 @@
1
+ Appcelerator.Module.Search={getName:function(){return"appcelerator search"},getDescription:function(){return"search widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Hamed Hashemi"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:search"},getAttributes:function(){return[{name:"request",optional:false,description:"Request message being sent to search"},{name:"response",optional:false,description:"Response message for search results"},{name:"selected",optional:false,description:"Message sent when the user has selected an option"},{name:"key",optional:true,defaultValue:"key",description:"Parameter name used in the request for the query"},{name:"property",optional:true,defaultValue:"result",description:"Property in the response used for the results"},{name:"resultId",optional:true,defaultValue:"id",description:"Property to use from the result to send selected message when using complex results"},{name:"inputWidth",optional:true,defaultValue:"200",description:"Width of the input field"},{name:"resultWidth",optional:true,defaultValue:"220",description:"Width of the results"},{name:"delay",optional:true,defaultValue:200,description:"Delay before firing request message"},{name:"indicator",optional:true,description:"Indicator id to show or hide"},{name:"activeClass",optional:true,defaultValue:"search_result_active",description:"Active class for selecting search results"},{name:"inactiveClass",optional:true,defaultValue:"search_result_inactive",description:"Inactive class for selecting search results"},{name:"fieldset",optional:true,description:"Fieldset applied to the input element"},{name:"name",optional:true,description:"Name applied to the input element"}]},compileWidget:function(params){var id=params["id"];var input=$(id);var request=params["request"];var response=params["response"];var selected=params["selected"];var elementScope=params["scope"];var key=params["key"];var property=params["property"];var activeClass=params["activeClass"];var inactiveClass=params["inactiveClass"];var select=$(id+"_select");var resultId=params["resultId"];var delay=params["delay"];var indicator=params["indicator"];var hideResults=params["hideResults"];var compiled=null;if(params["template"]){compiled=eval(params["template"]+"; init_"+id)}var listener={accept:function(){return[response]},acceptScope:function(scope){return elementScope=="*"||scope==elementScope},onMessage:function(t,data,datatype,direction){if(indicator){Element.hide(indicator)}var value=property?Object.getNestedProperty(data,property):data;Appcelerator.Compiler.destroy(select);while(select.hasChildNodes()){select.removeChild(select.firstChild)}var selectableData=[];for(var i=0;i<value.length;i++){(function(){var optionId=Appcelerator.Compiler.generateId();var optionValue=value[i];var optionCode='<div id="'+optionId+'" style="width: 100%" class="search_result_inactive">';if(compiled){for(idx in optionValue){if(typeof optionValue[idx]=="string"){optionValue[idx]=optionValue[idx].replace(/'/,"\u2019")}}optionCode+=compiled(optionValue)}else{optionCode+=optionValue}optionCode+="</div>";new Insertion.Bottom(select,optionCode);var option=$(optionId);option.onclick=function(event){if(compiled){$MQ(selected,{value:optionValue[resultId]})}else{$MQ(selected,{value:optionValue});input.value=optionValue}};option.onmouseover=function(){for(var i=0;i<select.selectableData.length;i++){Element.addClassName($(select.selectableData[i].id),inactiveClass);Element.removeClassName($(select.selectableData[i].id),activeClass)}Element.removeClassName(this,inactiveClass);Element.addClassName(this,activeClass)};option.onmouseout=function(){Element.addClassName(this,inactiveClass);Element.removeClassName(this,activeClass)};selectableData.push({id:optionId,value:optionValue})})()}select.selectedIndex=-1;select.selectableData=selectableData;Appcelerator.Compiler.dynamicCompile(select);if(select.selectableData.length>0){Effect.Appear(id+"_results",{duration:0.5})}}};Appcelerator.Util.ServiceBroker.addListener(listener);var selectFunction=function(){(function(){if(select.selectedIndex>=0){var selected=select.selectableData[select.selectedIndex];if(selected){if(!compiled){input.value=selected.value}for(var i=0;i<select.selectableData.length;i++){Element.addClassName($(select.selectableData[i].id),inactiveClass);Element.removeClassName($(select.selectableData[i].id),activeClass)}Element.removeClassName($(selected.id),inactiveClass);Element.addClassName($(selected.id),activeClass)}}else{for(var i=0;i<select.selectableData.length;i++){Element.addClassName($(select.selectableData[i].id),inactiveClass);Element.removeClassName($(select.selectableData[i].id),activeClass)}}})()};var timer=null;var keystrokeCount=0;var timerFunc=function(){if(indicator){Element.show(indicator)}keystrokeCount=0;var payload={};payload[key]=input.value;$MQ(request,payload)};input.onkeydown=function(event){(function(){event=event||window.event;switch(event.keyCode){case Event.KEY_TAB:case Event.KEY_LEFT:case Event.KEY_RIGHT:case Event.KEY_ESC:Effect.Fade(id+"_results",{duration:0.5});Event.stop(event);return ;case Event.KEY_RETURN:Effect.Fade(id+"_results",{duration:0.5});if(select.selectableData&&select.selectedIndex>=0){if(compiled){$MQ(selected,{value:select.selectableData[select.selectedIndex].value[resultId]})}else{$MQ(selected,{value:select.selectableData[select.selectedIndex].value})}}Event.stop(event);return ;case Event.KEY_UP:if(select.selectableData&&select.selectableData.length>0){Effect.Appear(id+"_results",{duration:0.5});select.selectedIndex--;if(select.selectedIndex<0){select.selectedIndex=select.selectableData.length-1}selectFunction()}Event.stop(event);return ;case Event.KEY_DOWN:if(select.selectableData&&select.selectableData.length>0){Effect.Appear(id+"_results",{duration:0.5});select.selectedIndex++;if(select.selectedIndex>select.selectableData.length-1){select.selectedIndex=0}selectFunction()}Event.stop(event);return }if(timer){clearTimeout(timer);timer=null}if(keystrokeCount++<10){timer=setTimeout(timerFunc,delay)}else{timerFunc()}})()};input.onblur=function(event){setTimeout(function(){Effect.Fade(id+"_results",{duration:0.5})},100)};input.onfocus=function(event){if(input.value.length>0&&select.selectableData&&select.selectableData.length>0){Effect.Appear(id+"_results",{duration:0.5})}}},buildWidget:function(B,C){C["scope"]=B.scope;if(B.innerHTML.strip().length>0){C["template"]=Appcelerator.Compiler.compileTemplate(Appcelerator.Compiler.getHtml(B),true,"init_"+B.id)}var A='<div style="position: relative">';A+='<table style="padding: 0; margin: 0" cellpadding="0" cellspacing="0"><tr><td><input type="text" id="'+B.id+'" style="width: '+C["inputWidth"]+'px" ';if(C["fieldset"]){A+=' fieldset="'+C["fieldset"]+'" '}if(C["name"]){A+=' name="'+C["name"]+'" '}A+="/></td></tr>";A+='<tr><td><div style="display:none;z-index:2;position:absolute;" id="'+B.id+'_results" on="'+C["selected"]+' then hide">';A+='<div id="'+B.id+'_select" style="width: '+C["resultWidth"]+'px; border: 1px #000 solid; cursor: pointer;"></div></div></td></tr></table>';A+="</div>";return{"position":Appcelerator.Compiler.POSITION_REPLACE,"presentation":A,"wire":true,"compile":true}}};Appcelerator.Core.registerModule("app:search",Appcelerator.Module.Search);Appcelerator.Core.loadModuleCSS("app:search","search.css")
@@ -0,0 +1 @@
1
+ .search_result_active{background-color:#FEFFE4;}.search_result_inactive{background-color:#FFF;}
@@ -1 +1 @@
1
- Appcelerator.Module.Security={eventReceived:null,getName:function(){return"appcelerator security"},getDescription:function(){return"security widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Jeff Haynie"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:security"},execute:function(E,A,D,C,B){Appcelerator.Module.Security.securityCode=A["code"].toFunction(true);Appcelerator.Module.Security.eventReceived={data:D,scope:C,version:B};Appcelerator.Module.Security.executeSecurity()},getAttributes:function(){return[{name:"on",optional:true,description:"May be used to execute the widget"}]},executeSecurity:function(){$$("*[security]").each(function(B){Appcelerator.Module.Security.eventReceived.element=B;Appcelerator.Module.Security.eventReceived.roles=Appcelerator.Module.Security.eventReceived.element.getAttribute("security").split(",");var A=Appcelerator.Module.Security.securityCode.call(Appcelerator.Module.Security.eventReceived);if(A!=true){B.style.display="none";B.setAttribute("_compilerRemoved","true")}});$$("*[_compilerRemoved]").each(function(A){Element.remove(A)})},buildWidget:function(A,C){var B=Appcelerator.Compiler.getHtml(A);if(B&&B.trim().length>0){if(C["on"]){C["code"]=String.unescapeXML(B);return{"position":Appcelerator.Compiler.POSITION_REMOVE,"parameters":C,"functions":["execute"]}}else{return{"position":Appcelerator.Compiler.POSITION_REMOVE,"presentation":"Error: security widget requires on attribute to execute"}}}return{"position":Appcelerator.Compiler.POSITION_REPLACE,"presentation":"Error: security widget requires code inside tag for implementation"}}};Appcelerator.Core.registerModule("app:security",Appcelerator.Module.Security)
1
+ Appcelerator.Module.Security={eventReceived:null,getName:function(){return"appcelerator security"},getDescription:function(){return"security widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Jeff Haynie"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:security"},execute:function(E,A,D,C,B){Appcelerator.Module.Security.securityCode=A["code"].toFunction(true);Appcelerator.Module.Security.eventReceived={data:D,scope:C,version:B};Appcelerator.Module.Security.executeSecurity()},getActions:function(){return["execute"]},getAttributes:function(){return[{name:"on",optional:true,description:"May be used to execute the widget"}]},executeSecurity:function(){$$("*[security]").each(function(B){Appcelerator.Module.Security.eventReceived.element=B;Appcelerator.Module.Security.eventReceived.roles=Appcelerator.Module.Security.eventReceived.element.getAttribute("security").split(",");var A=Appcelerator.Module.Security.securityCode.call(Appcelerator.Module.Security.eventReceived);if(A!=true){B.style.display="none";B.setAttribute("_compilerRemoved","true")}});$$("*[_compilerRemoved]").each(function(A){Element.remove(A)})},buildWidget:function(A,C){var B=Appcelerator.Compiler.getHtml(A);if(B&&B.trim().length>0){if(C["on"]){C["code"]=String.unescapeXML(B);return{"position":Appcelerator.Compiler.POSITION_REMOVE,"parameters":C}}else{return{"position":Appcelerator.Compiler.POSITION_REMOVE,"presentation":"Error: security widget requires on attribute to execute"}}}return{"position":Appcelerator.Compiler.POSITION_REPLACE,"presentation":"Error: security widget requires code inside tag for implementation"}}};Appcelerator.Core.registerModule("app:security",Appcelerator.Module.Security)
@@ -1 +1 @@
1
- Appcelerator.Module.Upload={getName:function(){return"appcelerator upload"},getDescription:function(){return"upload widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Jeff Haynie"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:upload"},execute:function(D,A,C,B){Appcelerator.Module.Template.fetch(D,A["src"],A["args"])},compileWidget:function(F){var H=F["id"];var E=Form.Methods.getElements(H+"_form");if(E&&E.length>0){for(var G=0,A=E.length;G<A;G++){var D=E[G];var C=D.getAttribute("name");if(!C){D.setAttribute("name",D.id)}}}var B=Appcelerator.ServerConfig["upload"];$(H+"_form").action=B.value},getAttributes:function(){return[{name:"on",optional:true},{name:"maxsize",optional:true},{name:"service",optional:true}]},buildWidget:function(D,J,A){var C=Appcelerator.Compiler.getHtml(D,true);var I=D.id+"_target";var H=J["service"];var G=J["on"];var B=G?('on="'+G+'"'):"";var F=J["maxsize"];if(H&&H.indexOf(":")>0){H=H.split(":")[1]}var E='<form method="POST" id="'+D.id+'_form" enctype="multipart/form-data" target="'+I+'" '+B+">";if(F){E+='<input type="hidden" name="MAX_FILE_SIZE" value="'+F+'"/>'}E+="<input type='hidden' name='instanceid' value='"+Appcelerator.instanceid+"'/>";E+="<input type='hidden' name='type' value='"+H+"'/>";E+="<input type='hidden' name='callback' value='r:appcelerator.ping'/>";E+=C;E+="</form>";new Insertion.Bottom(document.body,'<iframe name="'+I+'" id="'+I+'" width="1" height="1" src="about:blank" style="position:absolute;top:-400px;left:-400px;width:1px;height:1px;"></iframe>');J["id"]=id;return{"position":Appcelerator.Compiler.POSITION_REPLACE,"presentation":E,"compile":true,"wire":true}}};Appcelerator.Core.registerModule("app:upload",Appcelerator.Module.Upload)
1
+ Appcelerator.Module.Upload={getName:function(){return"appcelerator upload"},getDescription:function(){return"upload widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Jeff Haynie"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:upload"},execute:function(D,A,C,B){Appcelerator.Module.Template.fetch(D,A["src"],A["args"])},compileWidget:function(F){var H=F["id"];var E=Form.Methods.getElements(H+"_form");if(E&&E.length>0){for(var G=0,A=E.length;G<A;G++){var D=E[G];var C=D.getAttribute("name");if(!C){D.setAttribute("name",D.id)}}}var B=Appcelerator.ServerConfig["upload"];$(H+"_form").action=B.value},getAttributes:function(){return[{name:"on",optional:true},{name:"maxsize",optional:true},{name:"service",optional:true}]},buildWidget:function(D,J,A){var C=Appcelerator.Compiler.getHtml(D,true);var I=D.id+"_target";var H=J["service"];var G=J["on"];var B=G?('on="'+G+'"'):"";var F=J["maxsize"];if(H&&H.indexOf(":")>0){H=H.split(":")[1]}var E='<form method="POST" id="'+D.id+'_form" enctype="multipart/form-data" target="'+I+'" '+B+">";if(F){E+='<input type="hidden" name="MAX_FILE_SIZE" value="'+F+'"/>'}E+="<input type='hidden' name='instanceid' value='"+Appcelerator.instanceid+"'/>";E+="<input type='hidden' name='type' value='"+H+"'/>";E+="<input type='hidden' name='callback' value='r:appcelerator.ping'/>";E+=C;E+="</form>";new Insertion.Bottom(document.body,'<iframe name="'+I+'" id="'+I+'" width="1" height="1" src="about:blank" style="position:absolute;top:-400px;left:-400px;width:1px;height:1px;"></iframe>');return{"position":Appcelerator.Compiler.POSITION_REPLACE,"presentation":E,"compile":true,"wire":true}}};Appcelerator.Core.registerModule("app:upload",Appcelerator.Module.Upload)
@@ -0,0 +1,25 @@
1
+ require 'base64'
2
+
3
+ class ProxyController < ApplicationController
4
+
5
+ def index
6
+ url = params['url'] if params
7
+ if url
8
+ if url.index('://') == -1
9
+ url = Base64.decode64(url)
10
+ end
11
+ if request.post?
12
+ uri = URI.parse(url)
13
+ req = Net::HTTP::Post.new(uri.to_s)
14
+ req.body = request.raw_post
15
+ res = Net::HTTP.new(uri.host, uri.port).start {|http| http.request(req) }
16
+ else
17
+ res = Net::HTTP.get_response(URI.parse(url))
18
+ end
19
+ res.each_header do |key,value|
20
+ response.headers[key]=value unless key =~ /(transfer-encoding|set-cookie)/
21
+ end
22
+ render :inline => res.body
23
+ end
24
+ end
25
+ end
@@ -15,4 +15,6 @@ ActionController::Routing::Routes.draw do |map|
15
15
 
16
16
  # Install the appcelerator servicebroker
17
17
  map.connect 'servicebroker', :controller => 'service_broker', :action => 'dispatch'
18
+ map.connect ':controller/:action/:id.:format'
19
+ map.connect ':controller/:action/:id'
18
20
  end
@@ -0,0 +1,208 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xmlns:app="http://www.appcelerator.org">
4
+ <head>
5
+ <noscript><meta http-equiv="refresh" content="0;upgrade_script.html"/></noscript>
6
+ <title>Appcelerator&trade; Service Tester</title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
8
+ <link rel="shortcut icon" href="images/favicon.ico"/>
9
+ <script src="javascripts/appcelerator.js" type="text/javascript"></script>
10
+ <style>
11
+ *
12
+ {
13
+ margin:0; padding:0;
14
+ }
15
+ body
16
+ {
17
+ background-color: #717171;
18
+ color: #fff;
19
+ font-family: tahoma,arial,helvetica;
20
+ }
21
+ img
22
+ {
23
+ border: 0;
24
+ }
25
+ #header
26
+ {
27
+ background-image: url(images/appcelerator_gray_header.png);
28
+ background-repeat: repeat-x;
29
+ background-color: #717171;
30
+ height: 55px;
31
+ position:relative;
32
+ margin:0;
33
+ padding:0;
34
+ }
35
+ #logo
36
+ {
37
+ height: 53px;
38
+ position:absolute;
39
+ right:15px;
40
+ top:0px;
41
+ }
42
+ #title
43
+ {
44
+ position:absolute;
45
+ left:20px;
46
+ top:15px;
47
+ font-size:24px;
48
+ color:#770000;
49
+ }
50
+ #form
51
+ {
52
+ margin:20px;
53
+ padding:10px;
54
+ font-size:14px;
55
+ }
56
+ #footer
57
+ {
58
+ position:absolute;
59
+ bottom:5px;
60
+ left:20px;
61
+ color:#aaa;
62
+ font-size:11px;
63
+ }
64
+ #intro
65
+ {
66
+ font-size:18px;
67
+ margin-bottom:25px;
68
+ color:#111;
69
+ }
70
+ #messagetype
71
+ {
72
+ width:400px;
73
+ font-family:courier;
74
+ font-size:14px;
75
+ }
76
+ #version
77
+ {
78
+ width:30px;
79
+ font-family:courier;
80
+ font-size:14px;
81
+ }
82
+ #scopename
83
+ {
84
+ width:150px;
85
+ font-family:courier;
86
+ font-size:14px;
87
+ }
88
+ #messageargs
89
+ {
90
+ width:100%;
91
+ height:80px;
92
+ font-family:courier;
93
+ font-size:14px;
94
+ }
95
+ #trace
96
+ {
97
+ margin-top:10px;
98
+ }
99
+ #trace textarea
100
+ {
101
+ width:100%;
102
+ font-family:courier;
103
+ font-size:12px;
104
+ }
105
+ div
106
+ {
107
+ margin-top:5px;
108
+ margin-bottom:5px;
109
+ }
110
+ #trace div
111
+ {
112
+ margin:0;
113
+ padding:0;
114
+ margin-bottom:5px;
115
+ }
116
+ .noteBox
117
+ {
118
+ margin:0px auto;
119
+ padding: 5px;
120
+ border-style: solid;
121
+ border-width: 1px;
122
+ border-color: #F0C000;
123
+ background-color: #FFFFCE;
124
+ }
125
+ </style>
126
+ </head>
127
+
128
+ <body style="visibility:hidden" on="l:app.compiled then visible">
129
+
130
+ <div id="header">
131
+ <div id="logo"><a href="http://www.appcelerator.org" title="Appcelerator"><img src="images/appcelerator_gray_logo_small.png"/></a></div>
132
+ <div id="title">Appcelerator Service Tester</div>
133
+ </div>
134
+
135
+ <div id="form">
136
+
137
+ <div id="intro">
138
+ This utility will allow you to test Appcelerator Universal Client&trade; connectivity with
139
+ Appcelerator Services.
140
+ </div>
141
+
142
+ <form>
143
+ <div>
144
+ Type in a service:
145
+ <input id="messagetype" fieldset="myform" type="text" validator="required" value="remote:app.test.message.request"/>
146
+ Version: <input id="version" type="text" value="1.0"/>
147
+ Scope: <input id="scopename" type="text" value="appcelerator"/>
148
+ </div>
149
+ <div>
150
+ <div style="float:right"><input type="button" value="Clear" on="click then clear[id=messageargs]"/></div>
151
+ <div>Optionally, you can specify arguments below. You can also specify JSON as the data payload.</div>
152
+ <div><textarea name="message" id="messageargs">Hello,world</textarea></div>
153
+ </div>
154
+ <div>
155
+ <input type="button" fieldset="myform" on="click then l:send.test.message"
156
+ activators="messagetype" value="Invoke Service"/>
157
+ </div>
158
+ <div style="height:30px;">
159
+ <div style="display:none;color:#222;" class="noteBox" id="messagebox"
160
+ on="r:app.test.message.response then effect[appear] or
161
+ r:app.test.message.response then effect[fade] after 5s" scope="*">
162
+ <img src="images/confirm.png" alt="*"/><span>&nbsp;&nbsp;</span><span
163
+ on="remote:app.test.message.response then value[message]"></span>
164
+ </div>
165
+ </div>
166
+ <div id="trace">
167
+ <div style="float:right"><input type="button" value="Clear" on="click then clear[id=tracelog]"/></div>
168
+ <div>Message Trace Log</div>
169
+ <textarea id="tracelog" readonly="true" rows="8" scope="*"
170
+ on="r:~.* then value[append=true,value=expr('[' + Appcelerator.Util.DateTime.get12HourTime() + '] ' + this.direction+':' + this.type + ' => ' + this.data+'\n')]"></textarea>
171
+ </div>
172
+
173
+ </form>
174
+
175
+ <div id="footer">
176
+ <p>For more information, documentation and demos, please visit the <a href="http://www.appcelerator.org">Appcelerator Developer Community</a>.</p>
177
+ <p>Appcelerator&trade; is Copyright &copy; 2007 by Appcelerator, Inc. All Rights Reserved.</p>
178
+ </div>
179
+
180
+ <app:script on="local:send.test.message then execute" style="display:none">
181
+ try
182
+ {
183
+ var type = $("messagetype").value;
184
+ var args = $('messageargs');
185
+ var value = args.value;
186
+ var data = {};
187
+ if (value.charAt(0)=='{')
188
+ {
189
+ data = value.evalJSON();
190
+ }
191
+ else
192
+ {
193
+ data = {message:value};
194
+ }
195
+ var scope = $('scopename').value;
196
+ var version = $('version').value;
197
+ $MQ(type, data, scope, version);
198
+ }
199
+ catch (e)
200
+ {
201
+ Logger.error ('Oops! Error received: '+e+'\n'+(e.stack||'no stack trace available'));
202
+ alert ('Oops! Error received: '+e+'\n'+(e.stack||'no stack trace available'));
203
+ }
204
+ </app:script>
205
+
206
+ </div>
207
+ </body>
208
+ </html>