aw-2-5-2.js
上传用户:q2283699q
上传日期:2022-05-17
资源大小:10704k
文件大小:144k
源码类别:

Ftp客户端

开发平台:

Visual C++

  1.  AW.UI.Controllers.Changes=(function(){function item(v,i){this.getItem(i).refresh()}function view(indices){var pos=[];for(var i=0;i<indices.length;i++){pos[indices[i]]=i}this.setViewPosition(pos);this.refresh()}function selection(mode){switch(mode){case "single":this.setController("selection",AW.UI.Controllers.Single);break;case "multi":this.setController("selection",AW.UI.Controllers.Multi);break}}return{onItemTextChanged:item,onItemImageChanged:item,onItemValueChanged:item,onItemLinkChanged:item,onItemTooltipChanged:item,onItemStateChanged:item,onViewIndicesChanged:view,onSelectionModeChanged:selection}})();
  2.  AW.UI.Controllers.State=(function(){function itemSelected(value,index){this.calculateItemState(index);var i,a=this.getSelectedItems();for(i=0;i<a.length;i++){if(a[i]==index){if(!value){a=a.concat();a.splice(i,1);this.setSelectedItems(a)}return}}if(value){a=a.concat(index);this.setSelectedItems(a)}}var select=[],unselect=[];function selectedItems1(a){var b=this.getSelectedItems();var i,before={},after={};select=[];unselect=[];for(i=0;i<b.length;i++){before[b[i]]=true}for(i=0;i<a.length;i++){after[a[i]]=true}for(i=0;i<b.length;i++){if(!after[b[i]]){unselect.push(b[i])}}for(i=0;i<a.length;i++){if(!before[a[i]]){select.push(a[i])}}}function selectedItems2(){var i;for(i=0;i<unselect.length;i++){if(this.getItemSelected(unselect[i])){this.setItemSelected(false,unselect[i])}}for(i=0;i<select.length;i++){if(!this.getItemSelected(select[i])){this.setItemSelected(true,select[i])}}}var current;function currentItem1(){current=this.getCurrentItem()}function currentItem2(index){this.calculateItemState(current);var e1=this.getItem(current).getContent("box/text").element();if(e1 && index !=current){e1.tabIndex=-1}e1=null;this.calculateItemState(index);var e2=this.getItem(index).getContent("box/text").element();if(e2 && e2.focus && !AW.opera && !AW.$popup){e2.tabIndex=this.getTabIndex();e2.focus()}e2=null}return{onItemSelectedChanged:itemSelected,onCurrentItemChanging:currentItem1,onCurrentItemChanged:currentItem2,onSelectedItemsChanging:selectedItems1,onSelectedItemsChanged:selectedItems2}})();
  3.  AW.UI.Controllers.Single={onKeyHome:"selectFirstItem",onKeyEnd:"selectLastItem",onKeyUp:"selectPreviousItem",onKeyDown:"selectNextItem",onKeyLeft:"selectPreviousItem",onKeyRight:"selectNextItem",onKeyPageUp:"selectPreviousPage",onKeyPageDown:"selectNextPage",onItemClicked:"selectClickedItem"};
  4.  AW.UI.Controllers.Multi={onKeyHome:"selectFirstItem",onKeyEnd:"selectLastItem",onKeyUp:"selectPreviousItem",onKeyDown:"selectNextItem",onKeyPageUp:"selectPreviousPage",onKeyPageDown:"selectNextPage",onKeyCtrlHome:"gotoFirstItem",onKeyCtrlEnd:"gotoLastItem",onKeyCtrlUp:"gotoPreviousItem",onKeyCtrlDown:"gotoNextItem",onKeyCtrlPageUp:"gotoPreviousPage",onKeyCtrlPageDown:"gotoNextPage",onKeyCtrlSpace:"toggleCurrentItem",onKeySpace:"toggleCurrentItem",onItemClicked:"toggleClickedItem"};
  5.  AW.UI.Controllers.Checked={onKeyHome:"gotoFirstItem",onKeyEnd:"gotoLastItem",onKeyUp:"gotoPreviousItem",onKeyDown:"gotoNextItem",onKeySpace:"toggleCurrentItem"};
  6.  AW.UI.ImageText=AW.System.Control.subclass();AW.UI.ImageText.create=function(){AW.Templates.ImageText.create.call(this);var obj=this.prototype;var _super=this.superclass.prototype;obj.setClass("templates","");obj.setClass("ui","imagetext");obj.setClass("item","control");obj.setClass("text","expand");function _tabIndex(){return this.getTabProperty("index")}if(AW.ie || AW.gecko){obj.getContent("box/text").setAttribute("tabIndex",_tabIndex)}obj.refresh=function(){if(this.getContent("box/text").element()){this.refreshClasses();this.refreshStyles();this.refreshAttributes();this.getContent("box/image").refreshClasses();this.getContent("box/text").refreshAttributes();this.getContent("box/text").refreshContents();if(this.getContent("data")){this.getContent("data").refreshAttributes()}}else{_super.refresh.call(this)}};var _refresh=function(){this.refresh()};var itemController={onControlTextChanged:_refresh,onControlImageChanged:_refresh,onControlValueChanged:_refresh,onControlLinkChanged:_refresh,onControlTooltipChanged:_refresh,onControlStateChanged:_refresh};obj.setController("item",itemController);obj.setEvent("onactivate",function(event){var e=this.getContent("box/text").element();if(e && event.srcElement !=e){this.setTimeout(function(){if(this.$active){e.setActive()}})}});if(AW.safari || AW.opera || AW.konqueror){var focus=new AW.HTML.SPAN;focus.setTag("a");focus.setClass("control","focus");focus.setAttribute("tabIndex",function(){return this.getTabProperty("index")});if(AW.safari){focus.setAttribute("href","#")}if(AW.opera){focus.setContent("html","&nbsp;")}obj.setContent("focus",focus)}obj.focus=function(){try{if(this.getControlDisabled()){return}if(AW.safari || AW.opera || AW.konqueror){this.getContent("focus").element().focus();return}this.getContent("box/text").element().focus()}catch(err){}};obj.onControlDisabledChanged=function(value){this.setClass("disabled",value?"control":null);this.setAttribute("disabled",value?true:null);this.getContent("box/text").setAttribute("disabled",value?true:null)};obj.setSize=function(width,height){if(typeof(width)!="undefined"){if(AW.ms5 || AW.ms6 || this._textClass !="expand"){this.setStyle("width",width - AW.dx+"px")}else{if(AW.ff2 || AW.ff15 || AW.ff1){this.setStyle("min-width",width+"px")}else if(AW.opera && opera.version()< 9.5 && this._uiClass=="button"){this.setStyle("min-width",width - 8+"px")}else{this.setStyle("min-width",width - AW.dx+"px")}if(AW.ms7 || AW.ms8){this.getContent("box").setStyle("min-width",width - AW.dx+"px")}}}if(typeof(height)!="undefined"){this.setStyle("height",height - AW.dy+"px")}}};
  7.  AW.UI.Label=AW.UI.ImageText.subclass();AW.UI.Label.create=function(){var obj=this.prototype;obj.setClass("ui","label");obj.setTabIndex(-1)};
  8.  AW.UI.Group=AW.UI.ImageText.subclass();AW.UI.Group.create=function(){var obj=this.prototype;obj.setTag("fieldset");obj.setClass("ui","group");obj.setClass("text","normal");obj.setTabIndex(-1);var box=obj.getContent("box");box.setTag("legend");box.setClass("item","legend")};
  9.  AW.UI.Button=AW.UI.ImageText.subclass();AW.UI.Button.create=function(){var obj=this.prototype;obj.setClass("ui","button");var _click=function(event){if(!this.getControlDisabled()){this.raiseEvent("onClick",event)}};obj.setController("button",{onControlClicked:_click,onKeySpace:_click,onKeyEnter:_click});AW._addMouseEvents(obj,"button")};
  10.  AW.UI.Link=AW.UI.ImageText.subclass();AW.UI.Link.create=function(){AW.Templates.Link.create.call(this);var obj=this.prototype;obj.setClass("ui","link");obj.getContent("box").setTag("span")};
  11.  AW.UI.Input=AW.UI.ImageText.subclass();AW.UI.Input.create=function(){var obj=this.prototype;obj.setClass("ui","input");obj.setClass("input","box");obj.setClass("text","");var text=new AW.HTML.INPUT;text.setClass("item","text");text.setAttribute("type","text");text.setAttribute("value",function(){return this.getControlProperty("text")});text.setAttribute("tabIndex",function(){return this.getTabProperty("index")});obj.setContent("box/text",text);var _edit=function(){this.setTimeout(function(){if(this.$active){this.startEdit()}})};var _validate=function(){AW._commitEdit()};var _cancel=function(event){AW._cancelEdit();AW.setReturnValue(event,false)};var _refresh=function(){this.refresh()};var _text=function(){var e=this.getContent("box/text").element();var text=this.getControlProperty("text");if(e && e.value !=text){if(AW.ie){var r=document.selection.createRange();r.collapse();r.select()}e.value=text}if(this.getContent("data")){e=this.getContent("data").element();if(e){e.value=this.getControlData()}}};var itemController={onKeyEnter:_validate,onKeyEscape:_cancel,onControlActivated:_edit,onControlTextChanged:_text,onControlValueChanged:_text,onControlDataChanged:_text,onControlImageChanged:_refresh,onControlLinkChanged:_refresh,onControlTooltipChanged:_refresh,onControlStateChanged:_refresh};obj.setController("item",itemController);if(AW.safari || AW.opera || AW.konqueror){obj.setContent("focus","")}obj.focus=function(){try{if(this.getControlDisabled()){return}this.getContent("box/text").element().focus()}catch(err){}}};
  12.  AW.UI.Password=AW.UI.Input.subclass();AW.UI.Password.create=function(){var obj=this.prototype;obj.getContent("box/text").setAttribute("type","password")};
  13.  AW.UI.List=AW.System.Control.subclass();AW.UI.List.create=function(){var obj=this.prototype;var _super=this.superclass.prototype;obj.setClass("ui","list");obj.setClass("list","control");obj.setClass("flow","vertical");obj.setClass("text","normal");var box=new AW.HTML.SPAN;box.setClass("list","box");if(AW.gecko){box.setAttribute("tabIndex","-1")}if(AW.ie && AW.strict){box.setStyle("width","expression(this.parentElement.offsetWidth-4)")}box.setContent("html",function(){return this.getLayout()});obj.setContent("box",box);var UI=AW.UI.Controllers;obj.setController("list",UI.List);obj.setController("actions",UI.Actions);obj.setController("changes",UI.Changes);obj.setController("selection",UI.Single);obj.setController("state",UI.State);obj.defineTemplate("layout",function(){return this.getScroll()});obj.defineTemplate("scroll",function(){return this.getView()});obj.defineTemplate("view",new AW.Templates.List);obj.defineTemplate("item",new AW.Templates.ImageText);function value(i){var text=this.getItemText(i);var format=this.getItemFormat(i);return format?format.textToValue(text):text}function count(){return this.getItemCount()}function position(i){return Number(i)}var models={item:{count:0,text:"",image:"",link:"",value:value,format:"",tooltip:"",state:"",selected:false},view:{count:count,position:position,offset:0,expanded:false},selection:{mode:"single"},current:{item:0}};obj.defineModel("item",models.item);obj.defineModel("view",models.view);obj.defineModel("current",models.current);obj.defineModel("selected",{});obj.defineModel("selection",models.selection);obj.defineModel("state",{});obj.defineViewProperty("indices","",true);obj.defineSelectedProperty("items",[],true);obj.calculateItemState=function(i){var state="";if(this.getCurrentItem()==i){state="current"}if(this.getItemSelected(i)){state="selected"}if(this.getItemState(i)!=state){this.setItemState(state,i)}};obj.toString=function(){if(AW.ie || AW.gecko){this.setTimeout(function(){try{var i=this.getCurrentItem();var t=this.getTabIndex();this.getItem(i).getContent("box/text").element().tabIndex=t}catch(err){}})}return _super.toString.call(this)};if(AW.safari || AW.opera || AW.konqueror){var focus=new AW.HTML.SPAN;focus.setTag("a");focus.setClass("control","focus");focus.setAttribute("tabIndex",function(){return this.getTabProperty("index")});if(AW.safari){focus.setAttribute("href","#")}if(AW.opera){focus.setContent("html","&nbsp;")}obj.setContent("focus",focus)}obj.focus=function(){try{if(this.getControlDisabled()){return}if(AW.safari || AW.opera || AW.konqueror){this.getContent("focus").element().focus();return}var i=this.getCurrentItem();this.getItem(i).getContent("box/text").element().focus()}catch(err){}};obj.onControlDisabledChanged=function(value){this.setClass("disabled",value?"control":null);this.setAttribute("disabled",value?true:null)}};
  14.  AW.UI.Tabs=AW.UI.List.subclass();AW.UI.Tabs.create=function(){var obj=this.prototype;obj.setClass("ui","tabs");obj.setClass("text","expand");obj.setClass("flow","horizontal");if(AW.opera){obj.setController("repaint",{onCurrentItemChanged:function(){var n=document.createElement("div");var e=this.element();var p=e.parentNode;p.insertBefore(n,e);p.removeChild(n)}})}};
  15.  AW.UI.Combo=AW.UI.List.subclass();AW.UI.Combo.create=function(){AW.UI.ImageText.create.call(this);AW.UI.Input.create.call(this);AW.Templates.Combo.create.call(this);var obj=this.prototype;obj.setClass("ui","combo");obj.setClass("input","");obj.defineTemplate("popup",new AW.Templates.Frame);obj.onCurrentItemChanged=function(i){var text=this.getItemText(i);this.setControlText(text);this.hidePopup()};obj.setController("selection",{onKeyUp:"selectPreviousItem",onKeyDown:"selectNextItem",onItemClicked:"selectClickedItem"})};
  16.  AW.UI.CheckBox=AW.UI.ImageText.subclass();AW.UI.CheckBox.create=function(){AW.Templates.CheckBox.create.call(this);var obj=this.prototype;obj.setClass("ui","checkbox");obj.setControlProperty("value",false);obj.setEvent("onclick","");var _toggle=function(){if(!this.getControlDisabled()){this.setControlValue(!this.getControlValue())}};obj.setController("checkbox",{onKeySpace:_toggle,onControlClicked:_toggle})};AW.UI.Checkbox=AW.UI.CheckBox;
  17.  AW.UI.CheckedList=AW.UI.List.subclass();AW.UI.CheckedList.create=function(){var obj=this.prototype;obj.setClass("ui","checkedlist");obj.setItem(new AW.Templates.CheckedItem);obj.setController("selection",AW.UI.Controllers.Checked)};
  18.  AW.UI.Radio=AW.UI.CheckedList.subclass();AW.UI.Radio.create=function(){var obj=this.prototype;obj.setClass("ui","radio");obj.setItem(new AW.Templates.Radio);obj.setSelectionMode("single")};
  19.  AW.Grid.Controllers.Size=(function(){var initFlag=false;function init(){initFlag=true;try{var height=this.getContent("box/sample").element().offsetHeight;var i,ii,n=this.getColumnCount(),a=this.getColumnIndices();var hrow=this.$extended?0:undefined;var width=[];for(i=0;i<n;i++){ii=a?a[i]:i;width[ii]=this.getHeader(ii,hrow).element().offsetWidth}var w=this.getScroll().element().offsetWidth;var h=this.getScroll().element().offsetHeight;var left=this.getScrollLeft();var top=this.getScrollTop();this.getScroll().adjustSize();this.getScroll().setStyle("visibility","inherit");this._startUpdate();this.setRowHeight(height);this.setColumnWidth(width);this.setContentWidth(w,"total");this.setContentHeight(h,"total");this.setScrollLeft(left);this.setScrollTop(top);this._endUpdate()}catch(err){}try{this.getScroll().setStyle("visibility","inherit");this.setTimeout(function(){this.getRows().refresh()})}catch(err){}initFlag=false}function setStyle(selector,attribute,value){try{if(AW.safari && document.styleSheets.length===0){window.setTimeout(function(){setStyle(selector,attribute,value)},100);return}var i,ss=document.styleSheets[document.styleSheets.length-1];var rules=AW.getRules(ss);if(AW.safari){selector=selector.toLowerCase()}for(i=rules.length-1;i>=0;i--){if(rules[i].selectorText==selector){rules[i].style[attribute]=value;return}}AW.addRule(ss,selector,attribute+":"+value)}catch(err){}}return{paint:init,onColumnWidthChanged:function(width,column){if(initFlag){return}if(typeof(width)=="object"){if(this.element()){this.element().innerHTML=""}var i,a=[];for(i in width){if(!a[i]){setStyle("#"+this.getId()+" .aw-column-"+i,"width",(width[i] - AW.dx)+"px")}}if(this.element()){this.refresh()}return}if(AW.ie && this.getView().element()){this.getView().element().firstChild.className+=""}if(column===undefined){setStyle("#"+this.getId()+" .aw-grid-cell","width",(width - AW.dx)+"px");setStyle("#"+this.getId()+" .aw-grid-header","width",(width - AW.dx)+"px");setStyle("#"+this.getId()+" .aw-grid-footer","width",(width - AW.dx)+"px")}else{setStyle("#"+this.getId()+" .aw-column-"+column,"width",(width - AW.dx)+"px")}},onSelectorWidthChanged:function(width){setStyle("#"+this.getId()+" .aw-row-selector","width",(width - AW.dx)+"px")},onRowHeightChanged:function(height){if(initFlag){return}setStyle("#"+this.getId()+" .aw-grid-row","height",(height - AW.dy)+"px");setStyle("#"+this.getId()+" .aw-grid-row","lineHeight",height+"px")}}})();
  20.  AW.Grid.Controllers.Cell=(function(){function refresh(value,col,row){this.getCell(col,row).refresh()}function refreshClasses(value,col,row){this.getCell(col,row).refreshClasses()}function cellData(val,col,row){function dataToText(i,j){var data=this.getCellData(i,j);var format=this.getCellFormat(i,j);return format?format.dataToText(data):data}function dataToValue(i,j){var data=this.getCellData(i,j);var format=this.getCellFormat(i,j);return format?format.dataToValue(data):data}this.setCellText(dataToText,col,row);this.setCellValue(dataToValue,col,row)}function tooltip(event,col,row){var e=this.getCell(col,row).element();var s=this.getCellTooltip(col,row);if(e){e.setAttribute("title",s)}e=null}function calcState(v,i,j){this.calculateCellState(i,j)}return{onCellMouseOver:tooltip,onCellSelectedChanged:calcState,onCellDataChanged:cellData,onCellTextChanged:refresh,onCellLinkChanged:refresh,onCellImageChanged:refresh,onCellValueChanged:refresh,onCellStateChanged:refreshClasses}})();
  21.  AW.Grid.Controllers.Edit=(function(){function startEdit(event){if(AW._edit){return}var s;if(event && event.type=="keypress"){if(event.keyCode==27 || event.keyCode==13){return}s=String.fromCharCode(event.keyCode || event.charCode)}if(this.startCellEdit(s)){AW.setReturnValue(event,false)}}function startOrEnd(event){if(!AW._edit){this.startCellEdit()}else{this.endCellEdit()}AW.setReturnValue(event,false)}function endEdit(event){this.endCellEdit();AW.setReturnValue(event,false)}function cancelEdit(event){this.cancelCellEdit();this.endCellEdit();AW.setReturnValue(event,false)}return{onKeyF2:startEdit,onCellDoubleClicked:startEdit,onKeyPress:startEdit,onKeyEnter:startOrEnd,onKeyEscape:cancelEdit,editCurrentCell:startEdit}})();
  22.  AW.Grid.Controllers.Row=(function(){function refresh(value,row){this.getRow(row).refreshClasses()}function addRow(row){var count=this.getRowCount();var a=this.getRowIndices();if(count<2){this.refresh();return}var prev=a[count-2];var i,e;if(!this.$extended){e=this.getRow(prev).element();if(e){AW.setOuterHTML(e,this.getRow(prev).toString()+this.getRow(row).toString())}e=null}else{for(i=0;i<3;i++){e=this.getRow(prev,i).element();if(e){AW.setOuterHTML(e,this.getRow(prev,i).toString()+this.getRow(row,i).toString())}e=null}}this.raiseEvent("adjustScrollHeight")}function removeRow(row){var i,e;if(!this.$extended){e=this.getRow(row).element();if(e){AW.setOuterHTML(e,"")}e=null}else{for(i=0;i<3;i++){e=this.getRow(row,i).element();if(e){AW.setOuterHTML(e,"")}e=null}}this.raiseEvent("adjustScrollHeight")}function calcRowState(v,i){this.calculateRowState(i)}return{onRowAdded:addRow,onRowDeleted:removeRow,onRowSelectedChanged:calcRowState,onRowStateChanged:refresh}})();
  23.  AW.Grid.Controllers.View={onRowIndicesChanged:function(indices){var positions=[];for(var i=0;i<indices.length;i++){positions[indices[i]]=i}this.setRowPosition(positions);this.refresh()},onColumnIndicesChanged:function(indices){var positions=[];for(var i=0;i<indices.length;i++){positions[indices[i]]=i}this.setColumnPosition(positions);this.setColumnCount(indices.length);this.refresh()}};
  24.  AW.Grid.Controllers.Navigation=(function(){var serial=1;function syncSelected(){serial=serial % 1000+1;var s=serial;if(!this._columnsSelected || this._columnsSelected.$ !==this){this._columnsSelected={$:this}}if(!this._rowsSelected || this._rowsSelected.$ !==this){this._rowsSelected={$:this}}var cc=this._columnsSelected;var rr=this._rowsSelected;var mode=this.getCurrentSelection();var cols=this.getSelectedColumns();var rows=this.getSelectedRows();var i,j,col,row,ext={$:1};if(mode=="cell"){var added=[],unchanged=[],removed=[];for(i=0;i<cols.length;i++){col=cols[i];(cc[col]?unchanged:added).push(col);cc[col]=s}for(col in cc){if(cc[col] && cc[col] !==s && !ext[col]){delete cc[col];removed.push(col)}}for(i=0;i<rows.length;i++){row=rows[i];if(!rr[row]){rr[row]=s;for(j=0;j<unchanged.length;j++){col=unchanged[j];this.setCellSelected(true,col,row)}for(j=0;j<added.length;j++){col=added[j];this.setCellSelected(true,col,row)}}else{rr[row]=s;for(j=0;j<added.length;j++){col=added[j];this.setCellSelected(true,col,row)}for(j=0;j<removed.length;j++){col=removed[j];this.setCellSelected(false,col,row)}}}for(row in rr){if(rr[row] && rr[row] !==s && !ext[row]){delete rr[row];for(j=0;j<unchanged.length;j++){col=unchanged[j];this.setCellSelected(false,col,row)}for(j=0;j<removed.length;j++){col=removed[j];this.setCellSelected(false,col,row)}}}}else{for(i=0;i<rows.length;i++){row=rows[i];if(!rr[row]){rr[row]=s;this.setRowSelected(true,row)}else{rr[row]=s}}for(row in rr){if(rr[row] && rr[row] !==s && !ext[row]){delete rr[row];this.setRowSelected(false,row)}}}}function syncRow(value,row){if(!this._rowsSelected ||(!this._rowsSelected[row])!=(!value)){var i,rows=this.getSelectedRows().concat();if(value){rows.push(row)}else{for(i=0;i<rows.length;i++){if(rows[i]==row){rows.splice(i--,1)}}}this.setSelectedRows(rows)}}var Grid=AW.Grid.Controllers;return{onSelectedColumnsChanged:syncSelected,onSelectedRowsChanged:syncSelected,onRowSelectedChanged:syncRow,onSelectionModeChanged:function(mode){switch(mode){case "none":this.setController("selection",{});this.setController("edit",{});this.setCurrentSelection("none");break;case "single-cell":this.setController("selection",Grid.SingleCell);this.setController("edit",Grid.Edit);this.setCurrentSelection("cell");break;case "single-row":this.setController("selection",Grid.SingleRow);this.setController("edit",{});this.setCurrentSelection("row");break;case "multi-cell":this.setController("selection",Grid.MultiCell);this.setController("edit",Grid.Edit);this.setCurrentSelection("cell");break;case "multi-row":this.setController("selection",Grid.MultiRow);this.setController("edit",{});this.setCurrentSelection("row");break;case "multi-row-marker":this.setController("selection",Grid.MultiRowMarker);this.setController("edit",{});this.setCurrentSelection("row");var checkbox=new AW.Templates.CheckedItem;this.setCell(checkbox,0);break}}}})();
  25.  AW.Grid.Controllers.Sort={doSort:function(src,index,header){if(this.$edit){return}if(!(header=="0" || typeof(header)=="undefined")){return}var format=this.getCellFormat(index);function compare(values,pos,dir){var greater=1,less=-1;if(dir=="descending"){greater=-1;less=1}var equal=function(i,j){var a=pos[i];var b=pos[j];if(a > b){return 1}if(a < b){return -1}return 0};var error=function(){return 0};var types={"undefined":0,"boolean":1,"number":2,"string":3,"object":4,"function":5};if(format){return format.comparator(values,greater,less,equal,error)}else if("".localeCompare){return function(i,j){try{var a=values[i],b=values[j],x,y;if(typeof(a)!=typeof(b)){x=types[typeof(a)];y=types[typeof(b)];if(x > y){return greater}if(x < y){return less}}else if(typeof(a)=="number"){if(a > b){return greater}if(a < b){return less}return equal(i,j)}else{return(greater *((""+a).localeCompare(b)))|| equal(i,j)}}catch(e){return error(i,j,e)}}}else{return function(i,j){try{var a=values[i],b=values[j],x,y;if(typeof(a)!=typeof(b)){x=types[typeof(a)];y=types[typeof(b)];if(x > y){return greater}if(x < y){return less}}else{if(a > b){return greater}if(a < b){return less}}return equal(i,j)}catch(e){return error(i,j,e)}}}}var direction=this.getSortDirection(index);if(direction !="ascending"){direction="ascending"}else{direction="descending"}if(src=="ascending" || src=="descending"){direction=src}var i,value={},pos={};var offset=this.getRowOffset();var count=this.getRowCount();var rows=this.getRowIndices();if(!rows){rows=[];for(i=0;i<count;i++){rows[i]=i+offset}}else{rows=rows.slice(offset,offset+count)}for(i=0;i<rows.length;i++){value[rows[i]]=this.getCellValue(index,rows[i]);pos[rows[i]]=i}rows.sort(compare(value,pos,direction));var a=[];for(i=0;i<offset;i++){a[i]=i}rows=a.concat(rows);var old=this.getSortColumn();if(old !=-1){this.setSortDirection("",old)}this.setSortColumn(index);this.setSortDirection(direction,index);this.setRowIndices(rows)},onHeaderClicked:function(src,index,header){if(this.$active){AW.Grid.Controllers.Sort.doSort.call(this,src,index,header)}}};
  26.  AW.Grid.Controllers.Overflow=(function(){function calcWidth(){var i,a=this.getColumnIndices();var left=0,lc=this.$extended?this.getFixedLeft():0;var center=0,cc=this.getColumnCount();var right=0,rc=this.$extended?this.getFixedRight():0;left=this.getSelectorVisible()?this.getSelectorWidth():left;if(!this.$extended){center=left;left=0}for(i=0;i<lc;i++){left+=this.getColumnWidth(a?a[i]:i)}for(i=lc;i<cc-rc;i++){center+=this.getColumnWidth(a?a[i]:i)}for(i=cc-rc;i<cc;i++){right+=this.getColumnWidth(a?a[i]:i)}var total=left+center+right;if(total !=this.getScrollWidth()){this.setScrollWidth(total)}if(left !=this.getContentWidth("left")){this.setContentWidth(left,"left")}if(right !=this.getContentWidth("right")){this.setContentWidth(right,"right")}}function calcHeight(){if(!this.getScrollWidth()){calcWidth.call(this)}var i,a,count;var headers=0;count=this.$extended?this.getHeaderCount():1;a=this.getHeaderIndices();if(this.getHeaderVisible()){for(i=0;i<count;i++){headers+=this.getHeaderHeight(a?a[i]:i)}}var rows=this.getRowHeight()* this.getRowCount();var footers=0;count=this.$extended?this.getFooterCount():1;a=this.getFooterIndices();if(this.getFooterVisible()){for(i=0;i<count;i++){footers+=this.getFooterHeight(a?a[i]:i)}}var total=headers+rows+footers;if(total !=this.getScrollHeight()){this.setScrollHeight(total)}if(headers !=this.getContentHeight("top")){this.setContentHeight(headers,"top")}if(footers !=this.getContentHeight("bottom")){this.setContentHeight(footers,"bottom")}}function calcBars(){var s,x,y;var l=this.getScrollLeft();var t=this.getScrollTop();var w=this.getScrollWidth();var h=this.getScrollHeight();var ww=this.getContentWidth("total");var hh=this.getContentHeight("total");if(!ww || !hh){return}if(w <=ww && h <=hh){s="none";x=0;y=0}else if(w <=ww - AW.sx){s="vertical";x=AW.sx;y=0}else if(h <=hh - AW.sy){s="horizontal";x=0;y=AW.sy}else{s="both";x=AW.sx;y=AW.sy}if(this.getScrollBars()!=s){this.setScrollBars(s)}if(w - l < ww - x){var ll=Math.max(0,w - ww+x);if(ll !=l){this.setScrollLeft(ll)}}if(h - t < hh - y){var tt=Math.max(0,h - hh+y);if(tt !=t){this.setScrollTop(tt)}}var cw=ww - x - this.getContentWidth("left")- this.getContentWidth("right");var ch=hh - y - this.getContentHeight("top")- this.getContentHeight("bottom");if(cw !=this.getContentWidth("center")){this.setContentWidth(cw,"center")}if(ch !=this.getContentHeight("center")){this.setContentHeight(ch,"center")}}return{onColumnWidthChanged:calcWidth,onColumnCountChanged:calcWidth,onSelectorWidthChanged:calcWidth,onSelectorVisibleChanged:calcWidth,onRowHeightChanged:calcHeight,onRowCountChanged:calcHeight,onHeaderVisibleChanged:calcHeight,onHeaderHeightChanged:calcHeight,onHeaderCountChanged:calcHeight,onFooterVisibleChanged:calcHeight,onFooterHeightChanged:calcHeight,onFooterCountChanged:calcHeight,onScrollWidthChanged:calcBars,onScrollHeightChanged:calcBars,onContentWidthChanged:calcBars,onContentHeightChanged:calcBars}})();
  27.  AW.Grid.Controllers.Scroll=(function(){return{onScrollLeftChanged:function(x){var e=this.getScroll().getContent("box").element();if(e){e.scrollLeft=x}},onScrollTopChanged:function(y){var e=this.getScroll().getContent("box").element();if(e){e.scrollTop=y}},onScrollWidthChanged:function(w){this.getScroll().getContent("box/spacer").setStyle("width",w+"px")},onScrollHeightChanged:function(h){this.getScroll().getContent("box/spacer").setStyle("height",h+"px")},onScrollBarsChanged:function(bars){this.getScroll().setClass("scrollbars",bars)}}})();
  28.  AW.Grid.Controllers.Content={onScrollLeftChanged:function(x){this.getView().changeScrollLeft(x)},onScrollTopChanged:function(y){this.getView().changeScrollTop(y)},onContentWidthChanged:function(width,panel){this.getView().changePanelWidth(width,panel)},onContentHeightChanged:function(height,panel){this.getView().changePanelHeight(height,panel)}};
  29.  AW.Grid.Controllers.Virtual=(function(){var oldScrollTop,oldScrollLeft,scrollTime=new Date();function calcVirtual(dir){if(!this.getVirtualMode()){return}dir=dir || 0;var scrollTop=this.getScrollTop();var scrollLeft=this.getScrollLeft();var totalHeight=this.getContentHeight("center");var totalWidth=this.getContentWidth("center");if(!totalHeight || !totalWidth){return}var delta1=dir < 0?10:1;var delta2=dir > 0?10:1;var rowCount=this.getRowCount();var rowOffset=this.getRowOffset();var rowHeight=this.getRowHeight();var firstRow=Math.floor(scrollTop/rowHeight);var lastRow=Math.floor((scrollTop+totalHeight)/rowHeight);var start=Math.max(0,Math.min(rowCount - 1,firstRow - delta1));var end=Math.max(0,Math.min(rowCount - 1,lastRow+delta2));var rvScroll=start * rowHeight;var rvOffset=start+rowOffset;var rvCount=Math.min(rowCount,end-start+1);var i,ii;var columnCount=this.getColumnCount();var columnOffset=this.getColumnOffset();var columnIndices=this.getColumnIndices();if(this.$extended){columnCount -=this.getFixedLeft()+this.getFixedRight();columnOffset+=this.getFixedLeft()}else if(this.getSelectorVisible()){scrollLeft -=this.getSelectorWidth()}var w=0,wp=0,ww;for(i=0;i<columnCount;i++){ii=columnIndices?columnIndices[i+columnOffset]:i+columnOffset;ww=this.getColumnWidth(ii);if(w+ww > scrollLeft){break}wp=w;w+=ww}var k=i?i-1:0;for(i=k;i<columnCount;i++){ii=columnIndices?columnIndices[i+columnOffset]:i+columnOffset;w+=this.getColumnProperty("width",ii);if(w > totalWidth+scrollLeft){break}}this._startUpdate();this.setRowVirtualScroll(rvScroll);this.setRowVirtualOffset(rvOffset);this.setRowVirtualCount(rvCount);this.setColumnVirtualScroll(wp);this.setColumnVirtualOffset(columnOffset+k);this.setColumnVirtualCount(Math.min(i+2,columnCount)- k);this._endUpdate()}function startVirtual(dir){var s=++this._scrollSerial;scrollTime=new Date();var wait=function(){if(s==this._scrollSerial){if((new Date())- scrollTime > 200 || !AW._scrollWait){calcVirtual.call(this,dir);this.getRows().refreshVirtual()}else{this.setTimeout(wait,20)}}};this.setTimeout(wait,50)}return{paint:function(){calcVirtual.call(this)},onControlRefreshing:function(){calcVirtual.call(this)},onScrollLeftChanging:function(){oldScrollLeft=this.getScrollLeft()},onScrollTopChanging:function(){oldScrollTop=this.getScrollTop()},onScrollLeftChanged:function(scrollLeft){if(this.getVirtualMode()&& scrollLeft !=oldScrollLeft){AW._scrollWait=true;startVirtual.call(this)}},onScrollTopChanged:function(scrollTop){if(this.getVirtualMode()&& scrollTop !=oldScrollTop){AW._scrollWait=true;if(Math.abs(scrollTop - oldScrollTop)> this.getScrollHeight()/5){AW._scrollWait=false}var dir=scrollTop > oldScrollTop?1:-1;startVirtual.call(this,dir)}},onCurrentRowChanged:function(i){var current=this.getCurrentRow();var scroll=this.getScrollProperty("top");var height=this.getRowProperty("height");var top=(this.getRowPosition(current)-this.getRowOffset())* height;var bottom=top+height;var max=this.getContentHeight("center");if(!max){return}if(top < scroll){this.setScrollTop(top)}if(max+scroll < bottom){this.setScrollTop(bottom - max)}if(AW.ie && this.element()){var h=this.element().offsetHeight}},onCurrentColumnChanged:function(index){var scroll=this.getScrollProperty("left");var col=this.getColumnPosition(index);var max=this.getContentWidth("center");if(!max){return}var i,a=this.getColumnIndices();var lw=0,lc=this.$extended?this.getFixedLeft():0;var mw=0,c=this.getColumnCount();var rw=0,rc=this.$extended?this.getFixedRight():0;lw=this.getSelectorVisible()?this.getSelectorWidth():lw;if(!this.$extended){mw=lw;lw=0}for(i=0;i<lc;i++){lw+=this.getColumnWidth(a?a[i]:i)}for(i=lc;i<Math.min(col,c-rc-1);i++){mw+=this.getColumnWidth(a?a[i]:i)}for(i=c-rc;i<c;i++){rw+=this.getColumnWidth(a?a[i]:i)}if(!col){mw=0}if(mw < scroll){this.setScrollLeft(mw);return}var right=mw+this.getColumnWidth(index);if(max+scroll < right){this.setScrollLeft(right - max)}}}})();
  30.  AW.Grid.Controllers.Grid={onRowsTemplateChanged:function(rows){rows.mapTemplate("item","row");rows.mapModel("view","row")},onRowTemplateChanged:function(row){row.setClass("grid","row");row.setClass("row",function(){return this.$0});row.setClass("rows",function(){return this.getRowProperty("state")|| "normal"});row.setClass("alternate",function(){return this.getRowProperty("position")% 2?"odd":"even"});row.mapTemplate("item",function(i){return this.$owner.getCell(i,this.$0)});row.mapTemplate("selector",function(){return this.$owner.getSelector(this.$0)});row.mapModel("view","column")},onCellTemplateChanged:function(cell){cell.setAttribute("title","");cell.setClass("grid","cell");cell.setClass("column",function(){return this.$0});cell.setClass("cells",function(){return this.getControlProperty("state")|| "normal"});cell.mapModel("control","cell");cell.getStateProperty=function(p){return this.$owner.getRowProperty(p,this.$1)};cell.setStateProperty=function(p,v){this.$owner.setRowProperty(p,v,this.$1)}},onHeadersTemplateChanged:function(headers){headers.setClass("grid","headers");headers.setClass("header",function(){return this.$0 || "0"});headers.setStyle("height",function(){return this.getHeaderProperty("height")- AW.dy+"px"});headers.getContent("end").setClass("grid","header");headers.mapTemplate("item",function(i){return this.$owner.getHeader(i,this.$0)+this.$owner.getSeparator(i,this.$0)});headers.mapTemplate("selector",function(){return this.$owner.getTopSelector(this.$0)+(this.$owner.getSelectorResizable()&& !this.$0?this.$owner.getSeparator("selector"):"")});headers.mapModel("view","column");headers._raiseEvents=false},onFootersTemplateChanged:function(footers){footers.setClass("grid","footers");footers.setClass("footer",function(){return this.$0 || "0"});footers.setStyle("height",function(){return this.getFooterProperty("height")- AW.dy+"px"});footers.mapTemplate("item",function(i){return this.$owner.getFooter(i,this.$0)});footers.mapTemplate("selector","bottomSelector");footers.mapModel("view","column");footers._raiseEvents=false},onHeaderTemplateChanged:function(header){header.setClass("grid","header");header.setClass("column",function(){return this.$0});header.mapModel("control","header");header.getStateProperty=function(p){return this.$owner.getColumnProperty(p,this.$0)};header.setStateProperty=function(p,v){this.$owner.setColumnProperty(p,v,this.$0)}},onFooterTemplateChanged:function(footer){footer.setClass("grid","footer");footer.setClass("column",function(){return this.$0});footer.mapModel("control","footer")},onSelectorTemplateChanged:function(selector){selector.setClass("row","selector");selector.mapModel("control","selector");selector.mapModel("state","row")},onTopSelectorTemplateChanged:function(selector){selector.setClass("grid","header");selector.setClass("row","selector");selector.mapModel("control","top")},onBottomSelectorTemplateChanged:function(selector){selector.setClass("row","selector");selector.mapModel("control","bottom")},onViewTemplateChanged:function(view){view.mapModel("panel","content");view.mapTemplate("panel",function(i){switch(i){case "top":return this.getHeaders();case "center":return this.getRows();case "bottom":return this.getFooters()}})},onScrollTemplateChanged:function(scroll){scroll.setStyle("visibility","hidden")},onPopupTemplateChanged:function(popup){popup.onItemClicked=function(event,i){try{var s=this.getItemText(i);this.$owner.setCellText(s,this.$0,this.$1);AW.$popup.hidePopup()}catch(e){}}}};
  31.  AW.Grid.Controllers.Extended={onViewTemplateChanged:function(view){view.mapModel("panel","content");view.mapTemplate("panel",function(i,j){switch(i){case "top":return this.$owner.getTop(j);case "center":return this.$owner.getRows(j);case "bottom":return this.$owner.getBottom(j)}})},onTopTemplateChanged:function(top){top.mapTemplate("item","headers");top.mapModel("view","header")},onBottomTemplateChanged:function(bottom){bottom.mapTemplate("item","footers");bottom.mapModel("view","footer")}};
  32.  AW.Grid.Controllers.SingleCell=(function(){var cc=["getCurrentColumn","getFirstColumn","getPreviousColumn","getNextColumn","getLastColumn"];var rr=["getCurrentRow","getFirstRow","getPreviousRow","getNextRow","getLastRow","getPageUpRow","getPageDownRow"];function kb(i,j){return function(event){var col=this[cc[i]]();var row=this[rr[j]]();this.selectCell(col,row);AW.setReturnValue(event,false)}}function ms(){return function(event,col,row){this.selectCell(col,row)}}return{onKeyCtrlUp:kb(0,1),onKeyUp:kb(0,2),onKeyDown:kb(0,3),onKeyCtrlDown:kb(0,4),onKeyPageUp:kb(0,5),onKeyPageDown:kb(0,6),onKeyCtrlLeft:kb(1,0),onKeyLeft:kb(2,0),onKeyRight:kb(3,0),onKeyCtrlRight:kb(4,0),onKeyHome:kb(1,0),onKeyEnd:kb(4,0),onKeyCtrlHome:kb(1,1),onKeyCtrlEnd:kb(4,4),onCellClicking:ms()}})();
  33.  AW.Grid.Controllers.SingleRow=(function(){var rr=["getCurrentRow","getFirstRow","getPreviousRow","getNextRow","getLastRow","getPageUpRow","getPageDownRow"];function kb(i){return function(event){var row=this[rr[i]]();this.selectRow(row);AW.setReturnValue(event,false)}}function ms(){return function(event,row){this.selectRow(row)}}return{onKeyHome:kb(1),onKeyUp:kb(2),onKeyDown:kb(3),onKeyEnd:kb(4),onKeyCtrlHome:kb(1),onKeyCtrlEnd:kb(4),onKeyPageUp:kb(5),onKeyPageDown:kb(6),onRowClicking:ms()}})();
  34.  AW.Grid.Controllers.MultiCell=(function(){var cc=["getCurrentColumn","getFirstColumn","getPreviousColumn","getNextColumn","getLastColumn"];var rr=["getCurrentRow","getFirstRow","getPreviousRow","getNextRow","getLastRow","getPageUpRow","getPageDownRow"];function kb(i,j,mode){return function(event){var col=this[cc[i]]();var row=this[rr[j]]();this.selectCell(col,row,mode);AW.setReturnValue(event,false)}}function ms(mode){return function(event,col,row){if(event.button==2 && this.getCellSelected(col,row)){return}this.selectCell(col,row,mode);if(AW.gecko && mode){try{window.getSelection().collapseToEnd()}catch(err){}}}}return{onKeyCtrlUp:kb(0,1),onKeyUp:kb(0,2),onKeyDown:kb(0,3),onKeyCtrlDown:kb(0,4),onKeyPageUp:kb(0,5),onKeyPageDown:kb(0,6),onKeyCtrlLeft:kb(1,0),onKeyLeft:kb(2,0),onKeyRight:kb(3,0),onKeyCtrlRight:kb(4,0),onKeyHome:kb(1,0),onKeyEnd:kb(4,0),onKeyCtrlHome:kb(1,1),onKeyCtrlEnd:kb(4,4),onKeyShiftUp:kb(0,2,1),onKeyShiftDown:kb(0,3,1),onKeyShiftPageUp:kb(0,5,1),onKeyShiftPageDown:kb(0,6,1),onKeyShiftLeft:kb(2,0,1),onKeyShiftRight:kb(3,0,1),onCellClicking:ms(),onCellShiftClicking:ms(1)}})();
  35.  AW.Grid.Controllers.MultiRow=(function(){var rr=["getCurrentRow","getFirstRow","getPreviousRow","getNextRow","getLastRow","getPageUpRow","getPageDownRow"];function kb(i,mode){return function(event){var row=this[rr[i]]();this.selectRow(row,mode);AW.setReturnValue(event,false)}}function ms(mode){return function(event,row){if(event.button==2 && this.getRowSelected(row)){return}this.selectRow(row,mode);if(AW.gecko && mode){try{window.getSelection().collapseToEnd()}catch(err){}}}}return{onKeyHome:kb(1),onKeyUp:kb(2),onKeyDown:kb(3),onKeyEnd:kb(4),onKeyCtrlHome:kb(1),onKeyCtrlEnd:kb(4),onKeyPageUp:kb(5),onKeyPageDown:kb(6),onKeyShiftHome:kb(1,1),onKeyShiftUp:kb(2,1),onKeyShiftDown:kb(3,1),onKeyShiftEnd:kb(4,1),onKeyCtrlShiftHome:kb(1,1),onKeyCtrlShiftEnd:kb(4,1),onKeyShiftPageUp:kb(5,1),onKeyShiftPageDown:kb(6,1),onRowClicking:ms(),onRowShiftClicking:ms(1),onRowCtrlClicking:ms(2)}})();
  36.  AW.Grid.Controllers.MultiRowMarker=(function(){var rr=["getCurrentRow","getFirstRow","getPreviousRow","getNextRow","getLastRow","getPageUpRow","getPageDownRow"];function kb(i,mode){return function(event){var row=this[rr[i]]();this.selectRow(row,mode);AW.setReturnValue(event,false)}}function refresh(v,i){this.getRow(i).refresh()}return{onKeyHome:kb(1,3),onKeyUp:kb(2,3),onKeyDown:kb(3,3),onKeyEnd:kb(4,3),onKeyPageUp:kb(5,3),onKeyPageDown:kb(6,3),onRowSelectedChanged:refresh}})();
  37.  AW.Grid.Separator=AW.System.Template.subclass();AW.Grid.Separator.create=function(){var obj=this.prototype;obj.setClass("grid","separator");obj.setClass("resizable",function(){return this.getColumnProperty("resizable")?true:false});obj._raiseEvents=true;obj.setEvent("onmousedown",function(event){if(!this.getColumnProperty("resizable")){return false}var start=event.screenX;var self=this;var width=self.element().previousSibling.offsetWidth;var scroll=self.element().parentNode.parentNode.scrollLeft;function doResize(event){var w=width+event.screenX - start;w=w > 9?w:9;self.element().previousSibling.style.width=(w - AW.dx)+"px"}function endResize(event){var w=width+event.screenX - start;w=w > 9?w:9;var e=AW.opera?window:self.element();AW.detachEvent(e,"onmousemove",doResize);AW.detachEvent(e,"onmouseup",endResize);AW.detachEvent(e,"onlosecapture",endResize);AW.releaseCapture(e);AW.ignoreMouse=false;e=self.element();if(AW.gecko){try{e.parentNode.parentNode.scrollLeft=scroll;e.parentNode.focus()}catch(err){}}var id=e.previousSibling.id;if(id.match("header")){self.$owner.setColumnProperty("width",w,self.$0)}else if(id.match("topSelector")){self.$owner.setSelectorProperty("width",w)}e.previousSibling.style.width="";e=null}var e=AW.opera?window:self.element();AW.setCapture(e);AW.attachEvent(e,"onmousemove",doResize);AW.attachEvent(e,"onmouseup",endResize);AW.attachEvent(e,"onlosecapture",endResize);e=null;event.cancelBubble=true;AW.ignoreMouse=true;if(AW.opera || AW.konqueror){event.preventDefault();return false}})};
  38.  AW.Grid.Header=AW.Templates.ImageText.subclass();AW.Grid.Header.create=function(){var obj=this.prototype;var _super=this.superclass.prototype;function _direction(){return this.getSortProperty("direction")|| "none"}obj.setClass("sort",_direction);var sort=new AW.HTML.SPAN;sort.setClass("grid","sort");obj.setContent("box/text/sort",sort);obj.element=function(){if(typeof(this.$1)=="undefined" && this.$owner && this.$owner.$extended){return _super.element.call(this.$owner.getHeader(this.$0,0))}else{return _super.element.call(this)}}};
  39.  AW.Grid.Row=AW.System.Template.subclass();AW.Grid.Row.create=function(){var obj=this.prototype;var _super=this.superclass.prototype;obj.setTag("span");obj.setClass("templates","list");obj.setClass("text","normal");if(AW.gecko){obj.setAttribute("tabIndex","-1")}obj.setContent("selector",function(){return(!this.$1 || this.$1=="left")&& this.getSelectorProperty("visible")?this.getSelector():""});var span=AW.HTML.SPAN;var start=new span;start.setClass("row","start");start.setStyle("width",function(){if((!this.$1 || this.$1=="center")&& this.$name=="row" && this.getVirtualProperty("mode")){return this.getViewProperty("virtualScroll")+"px"}return 0});obj.setContent("start",start);obj.setContent("items",function(){var i,ii,a=[];var virtual=this.getVirtualProperty("mode");var indices=this.getViewProperty("indices");var offset,count;if(virtual &&(!this.$1 || this.$1=="center")&& this.$name=="row"){count=this.getViewProperty("virtualCount");offset=this.getViewProperty("virtualOffset")}else{count=this.getViewProperty("count");offset=this.getViewProperty("offset")}var clone=this.$owner.$clone;this.$owner.$clone=false;for(i=0;i<count;i++){ii=indices?indices[i+offset]:i+offset;a[i]=this.getItem(ii).toString()}this.$owner.$clone=clone;return a.join("")});var space=new span;var box=new span;space.setClass("item","template");space.setClass("grid","cell");space.setClass("column","space");box.setClass("item","box");space.setContent("box",box);obj.setContent("end",space);obj.refreshVirtual1=function(h,a){var i,ii;var se=this.getContent("start").element();var ee=this.getContent("end").element();se.style.width=this.getViewProperty("virtualScroll")+"px";for(i=h.start1;i<h.start2;i++){se.parentNode.removeChild(se.nextSibling)}for(i=h.end1;i>h.end2;i--){ee.parentNode.removeChild(ee.previousSibling)}var indices=this.getViewProperty("indices");var clone=this.$owner.$clone;this.$owner.$clone=false;for(i=h.start1-1;i>=h.start2;i--){ii=indices?indices[i]:i;a.push(this.getItem(ii).toString())}for(i=h.end1+1;i<=h.end2;i++){ii=indices?indices[i]:i;a.push(this.getItem(ii).toString())}this.$owner.$clone=clone;se=null;ee=null};obj.refreshVirtual2=function(h,p){var i;var se=this.getContent("start").element();var ee=this.getContent("end").element();for(i=h.start1-1;i>=h.start2;i--){se.parentNode.insertBefore(p.firstChild,se.nextSibling)}for(i=h.end1+1;i<=h.end2;i++){ee.parentNode.insertBefore(p.firstChild,ee)}se=null;ee=null};var rf=obj.refresh;obj.refresh=function(){if(typeof(this.$1)=="undefined" && this.$owner.$extended){rf.call(this.$owner.getRow(this.$0,"left"));rf.call(this.$owner.getRow(this.$0,"center"));rf.call(this.$owner.getRow(this.$0,"right"))}else{rf.call(this)}};var rc=obj.refreshClasses;obj.refreshClasses=function(){if(typeof(this.$1)=="undefined" && this.$owner.$extended){rc.call(this.$owner.getRow(this.$0,"left"));rc.call(this.$owner.getRow(this.$0,"center"));rc.call(this.$owner.getRow(this.$0,"right"))}else{rc.call(this)}};AW._addMouseEvents(obj);function extendEvent(name){var f=obj[name];obj[name]=function(){if(this.$owner.$extended){f.call(this.$owner.getRow(this.$0,"left"));f.call(this.$owner.getRow(this.$0,"center"));f.call(this.$owner.getRow(this.$0,"right"))}else{f.call(this)}}}extendEvent("onMouseOver");extendEvent("onMouseOut");extendEvent("onMouseDown");extendEvent("onMouseUp")};
  40.  AW.Grid.Rows=AW.Templates.List.subclass();AW.Grid.Rows.create=function(){var obj=this.prototype;var _super=this.superclass.prototype;obj.setClass("grid","view");var init=new AW.System.HTML;init.setTag("marquee");init.setClass("grid","init");init.setAttribute("behavior","slide");init.setEvent("onstart",waitInit);init.setEvent("onresize",waitInit);obj.setContent("init",AW.ie?init:"");function initialize(){if(AW.ie){var e=this.getContent("init").element();if(e){e.parentNode.removeChild(e);e=null}this.setContent("init","")}if(this.$owner._initialized){return}this.$owner._initialized=true;this.setTimeout(function(){this.raiseEvent("paint")})}function waitInit(){var e=this.element();if((e && e.offsetWidth && e.offsetHeight)|| this.$owner._initialized){initialize.call(this)}else{this.setTimeout(waitInit,1000)}e=null}obj.setContent("items",function(){if(!this.$owner._initialized){if(!AW.ie){this.setTimeout(waitInit,100)}return ""}var i,ii,a=[];var virtual=this.getVirtualProperty("mode");var indices=this.getViewProperty("indices");var count,offset;if(virtual){count=this.getViewProperty("virtualCount");offset=this.getViewProperty("virtualOffset")}else{count=this.getViewProperty("count");offset=this.getViewProperty("offset")}var clone=this.$owner.$clone;this.$owner.$clone=false;for(i=0;i<count;i++){ii=indices?indices[i+offset]:i+offset;a[i]=this.getItem(ii).toString()}this.$owner.$clone=clone;return a.join("")});var span=AW.HTML.SPAN;var top=new span;top.setClass("view","top");top.setStyle("height",function(){return this.getVirtualProperty("mode")?this.getViewProperty("virtualScroll")+"px":0});obj.setContent("start",top);var space=new span;var box=new span;space.setClass("item","template");space.setClass("row","selector");space.setClass("selector","space");box.setClass("item","box");space.setContent("box",box);obj.setContent("end",space);obj.refresh=function(){if(this.$owner && this.$owner.$active){this.$owner.focus()}if(typeof(this.$0)=="undefined" && this.$owner.$extended){_super.refresh.call(this.$owner.getRows("left"));_super.refresh.call(this.$owner.getRows("center"));_super.refresh.call(this.$owner.getRows("right"))}else{_super.refresh.call(this)}};obj.refreshVirtual=function(){if(this.$owner && this.$owner.$active){this.$owner.focus()}var undef;var panel=this.$owner.$extended?"center":undef;var se=this.getRows(panel).getContent("start").element();var ee=this.getRows(panel).getContent("end").element();if(!se || !ee || se.nextSibling==ee){se=null;ee=null;return this.refresh()}var si=AW.object(se.nextSibling.id).$0;var ei=AW.object(ee.previousSibling.id).$0;var start1=this.getRowProperty("position",si);var end1=this.getRowProperty("position",ei);var start2=this.getRowProperty("virtualOffset");var end2=start2+this.getRowProperty("virtualCount")- 1;var h={};se=this.getRow(si,panel).getContent("start").element();ee=this.getRow(si,panel).getContent("end").element();if(!se || !ee || se.nextSibling==ee){se=null;ee=null;return this.refresh()}si=AW.object(se.nextSibling.id).$0;ei=AW.object(ee.previousSibling.id).$0;h.start1=this.getColumnProperty("position",si);h.end1=this.getColumnProperty("position",ei);h.start2=this.getColumnProperty("virtualOffset");h.end2=h.start2+this.getColumnProperty("virtualCount")- 1;if(start2 > end1 || end2 < start1 || h.start2 > h.end1 || h.end2 < h.start1){se=null;ee=null;return this.refresh()}var i,ii,j;var indices=this.getRowProperty("indices");var panels=this.$owner.$extended?["left","center","right"]:[undef];for(j=0;j<panels.length;j++){panel=panels[j];se=this.getRows(panel).getContent("start").element();ee=this.getRows(panel).getContent("end").element();se.style.height=this.getRowProperty("virtualScroll")+"px";for(i=start1;i<start2;i++){se.parentNode.removeChild(se.nextSibling)}for(i=end1;i>end2;i--){ee.parentNode.removeChild(ee.previousSibling)}}var a=[];var p=document.createElement("span");var start3=Math.max(start1,start2);var end3=Math.min(end1,end2);panel=this.$owner.$extended?"center":undef;if(h.start1 !=h.start2 || h.end1 !=h.end2){for(i=start3;i<=end3;i++){ii=indices?indices[i]:i;this.getRow(ii,panel).refreshVirtual1(h,a)}p.innerHTML=a.join("");for(i=start3;i<=end3;i++){ii=indices?indices[i]:i;this.getRow(ii,panel).refreshVirtual2(h,p)}}for(j=0;j<panels.length;j++){panel=panels[j];se=this.getRows(panel).getContent("start").element();ee=this.getRows(panel).getContent("end").element();var k=0;a=[];var clone=this.$owner.$clone;this.$owner.$clone=false;for(i=start1-1;i>=start2;i--){ii=indices?indices[i]:i;a[k++]=this.getRow(ii,panel).toString()}for(i=end1+1;i<=end2;i++){ii=indices?indices[i]:i;a[k++]=this.getRow(ii,panel).toString()}this.$owner.$clone=clone;p.innerHTML=a.join("");for(i=start1-1;i>=start2;i--){se.parentNode.insertBefore(p.firstChild,se.nextSibling)}for(i=end1+1;i<=end2;i++){ee.parentNode.insertBefore(p.firstChild,ee)}se=null;ee=null}p=null}};
  41.  AW.Grid.Control=AW.System.Control.subclass();AW.Grid.Control.create=function(){var obj=this.prototype;var _super=this.superclass.prototype;obj.setClass("grid","control");obj.setClass("selectors",function(){return this.getSelectorVisible()?"visible":"hidden"});var focus=new AW.HTML.TEXTAREA;focus.setClass("control","focus");focus.setAttribute("tabIndex",function(){return this.getTabProperty("index")});var sample=new AW.HTML.SPAN;sample.setClass("row","sample");sample.setClass("grid","row");var box=new AW.HTML.SPAN;box.setClass("grid","box");box.setContent("focus",focus);box.setContent("html",function(){return this.getLayout()});box.setContent("sample",sample);obj.setContent("box",box);var Grid=AW.Grid.Controllers;obj.setController("size",Grid.Size);obj.setController("cell",Grid.Cell);obj.setController("edit",Grid.Edit);obj.setController("row",Grid.Row);obj.setController("view",Grid.View);obj.setController("navigation",Grid.Navigation);obj.setController("selection",Grid.SingleCell);obj.setController("sort",Grid.Sort);obj.setController("overflow",Grid.Overflow);obj.setController("scroll",Grid.Scroll);obj.setController("content",Grid.Content);obj.setController("virtual",Grid.Virtual);obj.setController("grid",Grid.Grid);obj.defineTemplate("layout",function(){return this.getScrollTemplate()});obj.defineTemplate("scroll",new AW.Scroll.Bars);obj.defineTemplate("view",new AW.Panels.Horizontal);obj.defineTemplate("panel",function(){return ""});obj.defineTemplate("rows",new AW.Grid.Rows);obj.defineTemplate("row",new AW.Grid.Row);obj.defineTemplate("cell",new AW.Templates.Cell);obj.defineTemplate("headers",new AW.Grid.Row);obj.defineTemplate("footers",new AW.Grid.Row);obj.defineTemplate("header",new AW.Grid.Header);obj.defineTemplate("footer",new AW.Templates.ImageText);obj.defineTemplate("separator",new AW.Grid.Separator);obj.defineTemplate("selector",new AW.Templates.ImageText);obj.defineTemplate("topSelector",new AW.Templates.ImageText);obj.defineTemplate("bottomSelector",new AW.Templates.ImageText);obj.defineTemplate("popup",new AW.System.Template);function value(i,j){var text=this.getCellText(i,j);var format=this.getCellFormat(i,j);return format?format.textToValue(text):AW.textToValue(text)}function position(i){return Number(i)}var models={scroll:{left:0,top:0,width:0,height:0,bars:"both"},cell:{text:"",image:"",link:"",value:value,data:"",format:"",tooltip:"",state:"",selected:false,editable:false},header:{text:"",image:"",link:"",value:value,data:"",format:"",tooltip:"",state:"",count:1,offset:0,height:20,visible:true},selector:{text:"",image:"",link:"",value:value,data:"",format:"",tooltip:"",state:"",width:20,resizable:false,visible:false},top:{text:"",image:"",link:"",value:value,data:"",format:"",tooltip:"",state:""},column:{offset:0,count:0,position:position,state:"",selected:false,resizable:true,width:100,virtualOffset:0,virtualCount:0,virtualScroll:0},row:{offset:0,count:0,position:position,state:"",selected:false,height:18,virtualOffset:0,virtualCount:0,virtualScroll:0},current:{row:0,column:0,selection:"cell"},selected:{},selection:{mode:"rows",multiple:false},sort:{column:-1,direction:""},fixed:{left:1,right:0},virtual:{mode:true,top:0},content:{width:0,height:0}};obj.defineModel("scroll",models.scroll);obj.defineModel("cell",models.cell);obj.defineModel("header",models.header);obj.defineModel("footer",models.header);obj.defineModel("selector",models.selector);obj.defineModel("top",models.top);obj.defineModel("bottom",models.top);obj.defineModel("column",models.column);obj.defineModel("row",models.row);obj.defineModel("current",models.current);obj.defineModel("selected",models.selected);obj.defineModel("selection",models.selection);obj.defineModel("sort",models.sort);obj.defineModel("virtual",models.virtual);obj.defineModel("content",models.content);obj.defineModel("panel",models.content);obj.defineModel("fixed",models.fixed);obj.defineColumnProperty("indices","",true);obj.defineRowProperty("indices","",true);obj.defineHeaderProperty("indices","",true);obj.defineFooterProperty("indices","",true);obj.defineSelectedProperty("rows",[],true);obj.defineSelectedProperty("columns",[],true);obj.setFooterVisible(false);obj.setContentWidth(100,"left");obj.setContentHeight(20,"top");obj.getFirstColumn=function(){var p=this.getColumnOffset();var a=this.getColumnIndices();return a?a[p]:p};obj.getLastColumn=function(){var p=this.getColumnOffset()+this.getColumnCount()- 1;var a=this.getColumnIndices();return a?a[p]:p};obj.getNextColumn=function(){var i=this.getCurrentColumn();var p=Math.min(this.getColumnPosition(i)+1,this.getColumnOffset()+this.getColumnCount()- 1);var a=this.getColumnIndices();return a?a[p]:p};obj.getPreviousColumn=function(){var i=this.getCurrentColumn();var p=Math.max(this.getColumnPosition(i)- 1,this.getColumnOffset());var a=this.getColumnIndices();return a?a[p]:p};obj.getFirstRow=function(){var p=this.getRowOffset();var a=this.getRowIndices();return a?a[p]:p};obj.getLastRow=function(){var p=this.getRowOffset()+this.getRowCount()- 1;var a=this.getRowIndices();return a?a[p]:p};obj.getNextRow=function(){var i=this.getCurrentRow();var p=Math.min(this.getRowPosition(i)+1,this.getRowOffset()+this.getRowCount()- 1);var a=this.getRowIndices();return a?a[p]:p};obj.getPreviousRow=function(){var i=this.getCurrentRow();var p=Math.max(this.getRowPosition(i)- 1,this.getRowOffset());var a=this.getRowIndices();return a?a[p]:p};obj.getPageUpRow=function(){var i=this.getCurrentRow();var p=Math.max(this.getRowPosition(i)- 10,this.getRowOffset());var a=this.getRowIndices();return a?a[p]:p};obj.getPageDownRow=function(){var i=this.getCurrentRow();var p=Math.min(this.getRowPosition(i)+10,this.getRowOffset()+this.getRowCount()- 1);var a=this.getRowIndices();return a?a[p]:p};obj.selectRow=function(row,mode){if(this.$edit){this.focus()}if(this.$edit){return}this._startUpdate();if(this.getCurrentSelection()!="row"){this.setCurrentSelection("row")}var start,end,i,a;var rr=this.getSelectedRows();if(!mode){if(rr.length !=1 || rr[0] !=row){this.setSelectedRows([row])}}else if(mode==1){if(!rr.length){this.setSelectedRows([row])}else{start=this.getRowPosition(rr[0]);end=this.getRowPosition(row);a=this.getRowIndices();rr=[];if(start < end){for(i=start;i <=end;i++){rr.push(a?a[i]:i)}}else{for(i=start;i >=end;i--){rr.push(a?a[i]:i)}}this.setSelectedRows(rr)}}else if(mode==2){this.setRowSelected(!this.getRowSelected(row),row)}if(row!=this.getCurrentRow()){this.setCurrentRow(row)}this._endUpdate()};obj.selectCell=function(col,row,mode){if(this.$edit){this.focus()}if(this.$edit){return}this._startUpdate();if(this.getCurrentSelection()!="cell"){this.setCurrentSelection("cell")}var start,end,i,a;var cc=this.getSelectedColumns();var rr=this.getSelectedRows();if(!mode){if(cc.length !=1 || cc[0] !=col){this.setSelectedColumns([col])}if(rr.length !=1 || rr[0] !=row){this.setSelectedRows([row])}}else if(mode==1){if(!cc.length){this.setSelectedColumns([col])}else{start=this.getColumnPosition(cc[0]);end=this.getColumnPosition(col);a=this.getColumnIndices();cc=[];if(start < end){for(i=start;i <=end;i++){cc.push(a?a[i]:i)}}else{for(i=start;i >=end;i--){cc.push(a?a[i]:i)}}this.setSelectedColumns(cc)}if(!rr.length){this.setSelectedRows([row])}else{start=this.getRowPosition(rr[0]);end=this.getRowPosition(row);a=this.getRowIndices();rr=[];if(start < end){for(i=start;i <=end;i++){rr.push(a?a[i]:i)}}else{for(i=start;i >=end;i--){rr.push(a?a[i]:i)}}this.setSelectedRows(rr)}}if(col!=this.getCurrentColumn()){this.setCurrentColumn(col)}if(row!=this.getCurrentRow()){this.setCurrentRow(row)}this._endUpdate()};obj.calculateRowState=function(i){var state="";if(this.getCurrentRow()==i){state="current"}if(this.getRowSelected(i)){state="selected"}this.setRowState(state,i)};obj.calculateCellState=function(i,j){var state="";if(this.getCurrentColumn()==i && this.getCurrentRow()==j){state="current"}if(this.getCellSelected(i,j)){state="selected"}this.setCellState(state,i,j)};obj.startCellEdit=function(text){if(this.$edit){return}var c=this.getCurrentColumn();var r=this.getCurrentRow();if(!this.getCellEditable(c,r)){return}var cell=this.getCell(c,r);return AW._startEdit(cell,text)};obj.cancelCellEdit=function(){AW._cancelEdit();this.focus();return !AW._edit};obj.endCellEdit=function(){this.focus();return !AW._edit};box.setEvent("onactivate",function(event){try{if(event.srcElement.tagName=="SPAN"){var src=AW.object(event.srcElement.id,true);if(src && src.setController && src !==this){return}var target=this;function onfocus(event){event.srcElement.detachEvent("onfocus",onfocus);target.focus();target=null}event.srcElement.attachEvent("onfocus",onfocus)}}catch(err){}});focus.setEvent("onbeforedeactivate",function(event){try{if(this.getView().element().contains(event.toElement)&& event.toElement.tagName=="SPAN"){var src=AW.object(event.toElement.id,true);if(src && src.setController && src !==this){return}event.returnValue=false;event.cancelBubble=true}}catch(err){}});focus.setEvent("onselectstart",function(event){if(AW.ie){event.cancelBubble=true}else{event.stopPropagation()}});focus.setEvent("onbeforecopy",function(event){if(AW.safari){expandFocus.call(this,false)}});obj.getSelectedText=function(){var c,r,a,text=[];var cols=this.getSelectedColumns();var rows=this.getSelectedRows();if(this.getCurrentSelection()=="row"){cols=[];var count=this.getColumnCount();var indices=this.getColumnIndices();for(c=0;c<count;c++){cols[c]=indices?indices[c]:c}}for(r=0;r<rows.length;r++){a=[];for(c=0;c<cols.length;c++){a[c]=this.getCellText(cols[c],rows[r])}text[r]=a.join("t")}return text.join("rn")};focus.setEvent("oncut",function(event){var txt=this.getSelectedText();if(AW.ie){window.clipboardData.setData("Text",txt);event.returnValue=false}else{var e=this.getContent("box/focus").element();e.value=txt;e.select()}this.startCellEdit("")});focus.setEvent("oncopy",function(event){var txt=this.getSelectedText();if(AW.ie){window.clipboardData.setData("Text",txt);event.returnValue=false}else{var e=this.getContent("box/focus").element();e.value=txt;e.select()}});focus.setEvent("onpaste",function(event){var txt;if(AW.ie){txt=window.clipboardData.getData("Text");event.returnValue=false}else if(AW.safari){txt=event.clipboardData.getData('text/plain');event.preventDefault();event.stopPropagation()}else{return}this.startCellEdit(txt)});obj.setEvent("oncontextmenu",function(event){if(AW.safari){expandFocus.call(this,true)}if(AW.ffx){expandFocus.call(this,false);return ffCopy.call(this)}this.focus()});function ffCopy(){if(!AW._edit){var e=this.getContent("box/focus").element();e.value=this.getSelectedText();e.select();e.focus()}}if(AW.gecko){obj.setController("copypaste",{onKeyCtrlC:AW.ffx?ffCopy:null,onCellMouseUp:function(event){if(event.button==2){expandFocus.call(this,true);if(AW.ff3 && !AW._edit){this.getContent("box/focus").element().select()}this.setTimeout(function(){expandFocus.call(this,false)})}}})}function expandFocus(on){try{var e=this.getContent("box/focus").element();e.style.zIndex=on?1:0;e.style.width=on?"100%":"1px";e.style.height=on?"100%":"1px";e=null}catch(err){}}obj.focus=function(){try{if(this.getControlDisabled()){return}var e=this.getContent("box/focus").element();e.value=" ";if(AW.opera){e.focus()}else{e.select()}e=null}catch(err){}};obj.refresh=function(){var x=this.getScrollLeft();var y=this.getScrollTop();this.raiseEvent("onControlRefreshing");_super.refresh.call(this);this.getScroll().setStyle("visibility","hidden");this.setScrollLeft(x);this.setScrollTop(y);this.getScroll().setStyle("visibility","inherit");this.raiseEvent("onControlRefreshed")};obj.addRow=function(row){if(this.raiseEvent("onRowAdding",row)){return}var i,count=this.getRowCount();var a=this.getRowIndices();if(typeof(row)=="undefined"){row=count}if(this._cellModel && this._cellModel.addRow){this._cellModel.addRow(row)}if(!a){a=[];for(i=0;i<count;i++){a[i]=i}}a.push(row);var refresh=this.refresh;this.refresh=function(){};this.setRowIndices(a);this.setRowCount(count+1);this.setCurrentRow(row);this.setSelectedRows([row]);this.refresh=refresh;this.raiseEvent("onRowAdded",row)};obj.deleteRow=function(row){if(this.raiseEvent("onRowDeleting",row)){return}if(this._cellModel && this._cellModel.deleteRow){this._cellModel.deleteRow(row)}var i,count=this.getRowCount();var a=this.getRowIndices();if(!a){a=[];for(i=0;i<count;i++){a[i]=i}i=row}else{i=this.getRowPosition(row)}a.splice(i,1);var refresh=this.refresh;this.refresh=function(){};this.setRowIndices(a);this.setRowCount(count-1);this.setCurrentRow(i>0?a[i-1]:-1);this.setSelectedRows(i>0?[a[i-1]]:[]);this.refresh=refresh;this.raiseEvent("onRowDeleted",row)};obj.sort=function(column,direction){this.raiseEvent("doSort",direction,column)};var setCellModel=obj.setCellModel;obj.setCellModel=function(model){setCellModel.call(this,model);function dataToText(i,j){var data=this.getCellData(i,j);var format=this.getCellFormat(i,j);return format?format.dataToText(data):data}function dataToValue(i,j){var data=this.getCellData(i,j);var format=this.getCellFormat(i,j);return format?format.dataToValue(data):data}this.setCellText(dataToText);this.setCellValue(dataToValue)};obj.onControlDisabledChanged=function(value){this.setClass("disabled",value?"control":null);this.setAttribute("disabled",value?true:null)};obj._scrollSerial=0};AW.UI.Grid=AW.Grid.Control;
  42.  AW.Grid.Extended=AW.Grid.Control.subclass();AW.Grid.Extended.create=function(){var obj=this.prototype;obj.$extended=true;obj.setController("extended",AW.Grid.Controllers.Extended);obj.setView(new AW.Panels.Grid);obj.defineTemplate("top",new AW.Templates.List);obj.defineTemplate("bottom",new AW.Templates.List);var splitColumns=function(p,j){var left=this.$owner._fixedLeft,right=this.$owner._fixedRight;var i=this.$1;switch(p){case "count":if(i=="left"){return left}if(i=="center"){return this.$owner.getColumnProperty("count")- left - right}if(i=="right"){return right}return 0;case "offset":if(i=="left"){return 0}if(i=="center"){return left}if(i=="right"){return this.$owner.getColumnProperty("count")- right}return 0;default:return this.$owner.getColumnProperty(p,j)}};obj.getHeaders().mapModel("view",splitColumns);obj.getFooters().mapModel("view",splitColumns);obj.getRow().mapModel("view",splitColumns)};
  43.  AW.Tree.Item=AW.Templates.ImageText.subclass();AW.Tree.Item.create=function(){var obj=this.prototype;obj.setClass("tree",function(){return this.getViewProperty("count")?"folder":"leaf"});obj.setClass("expanded",function(){return this.getViewProperty("expanded")?"true":"false"});var sign=new AW.HTML.SPAN;sign.setClass("tree","sign");sign.setEvent("onclick",function(){this.raiseEvent("onTreeSignClicked")});obj.setContent("box/sign",sign)};
  44.  AW.Tree.View=AW.System.Template.subclass();AW.Tree.View.create=function(){var obj=this.prototype;obj.setTag("span");obj.setClass("tree","view");obj.setContent("start",function(){return this.$0?this.getItem():""});obj.setContent("items",function(){if(this.$0 && !this.getViewProperty("expanded")){return ""}var i,ii,a=[];var count=this.getViewProperty("count");var offset=this.getViewProperty("offset");var indices=this.getViewProperty("indices");var clone=this.$owner.$clone;this.$owner.$clone=false;for(i=0;i<count;i++){ii=indices?indices[i+offset]:i+offset;a[i]=this.getView(ii).toString()}this.$owner.$clone=clone;return a.join("")});obj.setContent("end","")};
  45.  AW.Tree.Group=AW.System.Template.subclass();AW.Tree.Group.create=function(){var obj=this.prototype;obj.setTag("span");obj.setClass("tree","view");obj.setContent("start",function(){return this.$0?this.getItem():""});obj.setContent("items",function(){if(this.$0 && !this.getViewProperty("expanded")){return ""}else{return this.getView()}});obj.setContent("end","")};
  46.  AW.Tree.Control=AW.UI.List.subclass();AW.Tree.Control.create=function(){var obj=this.prototype;obj.defineTemplate("group",new AW.Tree.Group);obj.setItem(new AW.Tree.Item);obj.setScroll(function(){return this.getGroup(0)});obj.getView().mapTemplate("item",function(i){return this.$owner.getGroup(i)});obj.defineViewProperty("expanded",false);obj.onTreeSignClicked=function(src,i){if(this.getViewIndices(i)){this.setViewExpanded(!this.getViewExpanded(i),i)}};obj.onViewExpandedChanged=function(e,i){this.getGroup(i).refresh()}};AW.UI.Tree=AW.Tree.Control;
  47.  AW.HTTP.Request=AW.System.Model.subclass();AW.HTTP.Request.create=function(){var obj=this.prototype;obj.defineProperty("URL");obj.defineProperty("async",true);obj.defineProperty("requestMethod","GET");obj.defineProperty("requestData","");obj.defineProperty("responseText",function(){return this._http?this._http.responseText:""});obj.defineProperty("responseXML",function(){return this._http?this._http.responseXML:""});obj.defineProperty("username",null);obj.defineProperty("password",null);obj.setNamespace=function(name,value){this._namespaces+=" xmlns:"+name+"=""+value+"""};obj._namespaces="";obj.setParameter=function(name,value){this["_"+name+"Parameter"]=value;if((this._parameters+" ").indexOf(" "+name+" ")< 0){this._parameters+=" "+name}};obj._parameters="";obj.setRequestHeader=function(name,value){this["_"+name+"Header"]=value;if((this._headers+" ").indexOf(" "+name+" ")< 0){this._headers+=" "+name}};obj._headers="";obj.setRequestHeader("Content-Type","application/x-www-form-urlencoded");obj.getResponseHeader=function(name){return this._http?this._http.getResponseHeader(name):""};obj.request=function(){var self=this;this._ready=false;var i,j,name,value,data="",params=this._parameters.split(" ");for(i=1;i<params.length;i++){name=params[i];value=this["_"+name+"Parameter"];if(typeof value=="function"){value=value()}if(typeof value=="object" && value.constructor==Array){for(j=0;j<value.length;j++){data+=encodeURIComponent(name)+"="+encodeURIComponent(value[j])+"&"}}else{data+=encodeURIComponent(name)+"="+encodeURIComponent(value)+"&"}}var URL=this._URL;if((this._requestMethod !="POST")&& data){URL+="?"+data;data=null}this._http=AW.createXMLHttpRequest();this._http.open(this._requestMethod,URL,this._async,this._username,this._password);var headers=this._headers.split(" ");for(i=1;i<headers.length;i++){name=headers[i];value=this["_"+name+"Header"];if(typeof value=="function"){value=value()}this._http.setRequestHeader(name,value)}this._http.send(data);if(this._async){this.setTimeout(wait,200)}else{returnResult()}function wait(){if(self._http.readyState==4){self._ready=true;returnResult()}else{self.setTimeout(wait,200)}}function returnResult(){var xml=self._http.responseXML;if(xml && xml.firstChild && xml.hasChildNodes()&& !(xml.firstChild && xml.firstChild.nodeName=="parsererror")&& !(xml.firstChild && xml.firstChild.firstChild && xml.firstChild.firstChild.firstChild && xml.firstChild.firstChild.firstChild.nodeName=="parsererror")){self.response(xml);xml=null;return}xml=null;self.response(self._http.responseText)}};obj.response=function(result){if(this.$owner){this.$owner.refresh()}};obj.isReady=function(){return this._ready}};
  48.  AW.CSV.Table=AW.HTTP.Request.subclass();AW.CSV.Table.create=function(){var obj=this.prototype;obj.response=function(text){this._rows=text.split(/r*n/);if(!this._rows[this._rows.length-1]){this._rows.pop()}this._data=[];if(this.$owner){this.$owner.clearScrollModel();this.$owner.clearSelectedModel();this.$owner.clearSortModel();this.$owner.clearRowModel();this.$owner.setRowCount(this.getCount());this.$owner.refresh()}};obj._rows=[];obj._data=[];obj.getCount=function(){return this._rows.length};obj.getData=function(c,r){if(!this._data[r]){if(!this._rows[r]){return ""}this._data[r]=this._rows[r].replace(x1,s1).replace(x2,s2).split(s3)}return this._data[r][c] || ""};var x1=/(([^,t"]*)|"(([^"]|"")*)")(,|t|$)/g;var x2=/""/g;var s1="$2$3x01";var s2=""";var s3="x01"};
  49.  AW.XML.Table=AW.HTTP.Request.subclass();AW.XML.Table.create=function(){var obj=this.prototype;obj.response=function(xml){this.setXML(xml);if(this.$owner){this.$owner.clearScrollModel();this.$owner.clearSelectedModel();this.$owner.clearSortModel();this.$owner.clearRowModel();this.$owner.setRowCount(this.getCount());this.$owner.refresh()}};obj.defineProperty("XML");obj.setXML=function(xml){if(!xml.nodeType){var s=""+xml;xml=new ActiveXObject("MSXML2.DOMDocument");xml.loadXML(s)}xml.setProperty("SelectionLanguage","XPath");if(this._namespaces){xml.setProperty("SelectionNamespaces",this._namespaces)}this._xml=xml;this._data=this._xml.selectSingleNode(this._dataPath);this._items=this._data?this._data.selectNodes(this._itemPath):null;this._ready=true};if(!AW.ie){obj.setXML=function(xml){if(!xml.nodeType){var parser=new DOMParser;xml=parser.parseFromString(""+xml,"text/xml")}else if(xml.nodeName=="XML" && xml.ownerDocument==document){var node=document.evaluate("*",xml,null,9,null).singleNodeValue;xml=document.implementation.createDocument("","",null);xml.appendChild(node)}namespaces={};var a=this._namespaces.split(" xmlns:");for(var i=1;i<a.length;i++){var s=a[i].split("=");namespaces[s[0]]=s[1].replace(/"/g,"")}this._ns={lookupNamespaceURI:function(prefix){return namespaces[prefix]}};this._xml=xml;this._data=xml.evaluate(this._dataPath,this._xml,this._ns,9,null).singleNodeValue;this._items=this._data?xml.evaluate(this._itemPath,this._data,this._ns,7,null):null;this._ready=true}}obj.getXML=function(){return this._xml};obj._dataPath="*";obj._itemPath="*";obj._valuePath="*";obj._valuesPath=[];obj._formats=[];obj.setColumns=function(array){this._valuesPath=array};obj.setRows=function(xpath){this._itemPath=xpath};obj.setTable=function(xpath){this._dataPath=xpath};obj.getCount=function(){if(!this._items){return 0}return AW.ie?this._items.length:this._items.snapshotLength};obj.getData=function(i,j){var node=this.getNode(i,j);return node?(AW.ie?node.text:node.textContent):""};obj.getNode=function(j,i){if(!this._items || !this._items[i]){return null}if(this._valuesPath[j]){return this._items[i].selectSingleNode(this._valuesPath[j])}else{return this._items[i].selectNodes(this._valuePath)[j]}};if(!AW.ie){obj.getNode=function(c,r){if(!this._items){return null}var row=this._items.snapshotItem(r);if(!row){return null}if(this._valuesPath[c]){return row.ownerDocument.evaluate(this._valuesPath[c],row,this._ns,9,null).singleNodeValue}else{return row.ownerDocument.evaluate(this._valuePath,row,this._ns,7,null).snapshotItem(c)}}}};
  50.  document.documentElement.className+=AW._htmlClasses;