configurationengine/source/scripts/tests/testdata/generate/expected_report.html
changeset 3 e7e0ae78773e
parent 0 2e8eeb919028
equal deleted inserted replaced
2:87cfa131b535 3:e7e0ae78773e
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
     2 <html lang="en">
     2 <html lang="en">
     3 <head>
     3 <head>
       
     4     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
     4     <title>ConE generation report</title>
     5     <title>ConE generation report</title>
     5     <style type="text/css">
     6     <style type="text/css">
     6         body {
     7         body {
     7             font-family: Nokia Standard Multiscript, Tahoma, Verdana, Arial;
     8             font-family: Nokia Standard Multiscript, Tahoma, Verdana, Arial;
     8             font-size: 0.8em;
     9             font-size: 0.8em;
   108             border-style: solid; 
   109             border-style: solid; 
   109             vertical-align: top;
   110             vertical-align: top;
   110             font: Tahoma, Verdana, Arial;
   111             font: Tahoma, Verdana, Arial;
   111             _font-size: 0.8em;
   112             _font-size: 0.8em;
   112         }
   113         }
   113 
   114         div.popup  {
       
   115             background-color: #f9fafd;
       
   116             font: #595a5f Tahoma, Verdana, Arial bold;
       
   117             font-size: 0.8em;
       
   118             border-top: 1px #9d9da1;
       
   119             border-bottom: 1px #9d9da1;
       
   120         }
       
   121         div.floater  {
       
   122             text-align: left; 
       
   123             width: 50%; 
       
   124             float: left;
       
   125         }
       
   126         div.floater-right  {
       
   127             text-align: right; 
       
   128             width: 50%; 
       
   129             float: right;
       
   130         }
       
   131         table.log {
       
   132             word-wrap: break-word;
       
   133             border: 1px #EBEBEB;
       
   134             padding: 5px;
       
   135             border-style: solid; 
       
   136             vertical-align: top;
       
   137             font: #595a5f Tahoma, Verdana, Arial;
       
   138             font-size: 0.8em;
       
   139         }
   114         .currentValue {
   140         .currentValue {
   115             background-color: #e8f2fe;
   141             background-color: #e8f2fe;
   116         }
   142         }
   117     </style>
   143     </style>
       
   144     <script language="javascript" type="text/javascript">
       
   145     //<![CDATA[
       
   146     /*------------------------------------------------------------------------
       
   147 	- HTML Table Filter Generator v1.9.6
       
   148 	- By Max Guglielmi (tablefilter.free.fr)
       
   149 	- Licensed under the MIT License
       
   150 --------------------------------------------------------------------------
       
   151 Copyright (c) 2009 Max Guglielmi
       
   152 
       
   153 Permission is hereby granted, free of charge, to any person obtaining
       
   154 a copy of this software and associated documentation files (the
       
   155 "Software"), to deal in the Software without restriction, including
       
   156 without limitation the rights to use, copy, modify, merge, publish,
       
   157 distribute, sublicense, and/or sell copies of the Software, and to
       
   158 permit persons to whom the Software is furnished to do so, subject to
       
   159 the following conditions:
       
   160 
       
   161 The above copyright notice and this permission notice shall be included
       
   162 in all copies or substantial portions of the Software.
       
   163 
       
   164 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
       
   165 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
       
   166 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
       
   167 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
       
   168 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
       
   169 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
       
   170 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
       
   171 --------------------------------------------------------------------------
       
   172 	- Special credit to: 
       
   173 	Cedric Wartel, cnx.claude@free.fr, Florent Hirchy, Váry Péter, 
       
   174 	Anthony Maes, Nuovella Williams, Fuggerbit, Venkata Seshagiri Rao 
       
   175 	Raya for active contribution and inspiration
       
   176 ------------------------------------------------------------------------*/
       
   177 
       
   178 function setFilterGrid(id)
       
   179 /*====================================================
       
   180 	- Sets filters grid bar
       
   181 	- Calls TF Constructor and generates grid bar
       
   182 	- Params:
       
   183 			- id: table id (string)
       
   184 			- refRow (optional): row index (number)
       
   185 			- config (optional): configuration 
       
   186 			object (literal object)
       
   187 =====================================================*/
       
   188 {
       
   189 	if( arguments.length==0 ) return;
       
   190 	eval( 'tf_'+id+' = new TF(arguments[0],arguments[1],arguments[2])' );
       
   191 	eval( 'tf_'+id+'.AddGrid();' );
       
   192 }
       
   193 
       
   194 /*===BEGIN removable section===========================
       
   195 	- Unobtrusive grid bar generation using 
       
   196 	'filterable' class
       
   197 	- If you don't use it you can remove safely this 
       
   198 	section
       
   199 /*=====================================================*/
       
   200 tf_addEvent(window, 'load', initFilterGrid);
       
   201 
       
   202 function initFilterGrid()
       
   203 {
       
   204 	if (!document.getElementsByTagName) return;
       
   205 	var tbls = tf_Tag(document,'table'), config;
       
   206 	for (var i=0; i<tbls.length; i++)
       
   207 	{
       
   208 		var cTbl = tbls[i], cTblId = cTbl.getAttribute('id');
       
   209 		if( tf_hasClass(cTbl,'filterable') && cTblId )
       
   210 		{
       
   211 			if( tf_isObj(cTblId+'_config') )
       
   212 				config = eval(cTblId+'_config');
       
   213 			else
       
   214 				config = undefined;
       
   215 			setFilterGrid( cTblId,config );
       
   216 		}
       
   217 	}// for i
       
   218 }
       
   219 /*===END removable section===========================*/
       
   220 
       
   221 var TF = function( id )
       
   222 /*====================================================
       
   223 	- TF object constructor
       
   224 	- Params:
       
   225 			- id: table id (string)
       
   226 			- refRow (optional): row index (number)
       
   227 			- config (optional): configuration 
       
   228 			object (literal object)
       
   229 =====================================================*/
       
   230 {
       
   231 	if( arguments.length==0 ) return;
       
   232 		
       
   233 	this.id = id;
       
   234 	this.tbl = tf_Id(id);
       
   235 	this.startRow = undefined;
       
   236 	this.refRow = null;
       
   237 	this.headersRow = null;
       
   238 	this.fObj = null;
       
   239 	this.nbFilterableRows = null;
       
   240 	this.nbRows = null;
       
   241 	this.nbCells = null;
       
   242 	this.hasGrid = false;
       
   243 	
       
   244 	if(this.tbl != null && this.tbl.nodeName.tf_LCase() == 'table' && this.GetRowsNb())
       
   245     {
       
   246 		if(arguments.length>1)
       
   247         {
       
   248             for(var i=0; i<arguments.length; i++)
       
   249             {
       
   250                 var argtype = typeof arguments[i];
       
   251                
       
   252                 switch(argtype.tf_LCase())
       
   253                 {
       
   254                     case 'number':
       
   255                         this.startRow = arguments[i];
       
   256                     break;
       
   257                     case 'object':
       
   258                         this.fObj = arguments[i];
       
   259                     break;
       
   260                 }//switch                           
       
   261             }//for
       
   262         }//if
       
   263 		
       
   264 		var f = this.fObj;
       
   265 		
       
   266 		/*** filter types ***/
       
   267 		this.fltTypeInp =			'input';
       
   268 		this.fltTypeSlc =			'select';
       
   269 		this.fltTypeMulti =			'multiple';
       
   270 		this.fltTypeCheckList =		'checklist';
       
   271 		this.fltTypeNone =			'none';
       
   272 		
       
   273 		/*** filters' grid properties ***/
       
   274 		this.fltGrid = 				f!=undefined && f.grid==false ? false : true; //enables/disables filter grid
       
   275 		
       
   276 		/*** Grid layout ***/
       
   277 		this.gridLayout = 			f!=undefined && f.grid_layout ? true : false; //enables/disables grid layout (fixed headers)
       
   278 		this.gridWidth =			f!=undefined && f.grid_width!=undefined ? f.grid_width : null; //defines grid width
       
   279 		this.gridHeight =			f!=undefined && f.grid_height!=undefined ? f.grid_height : null; //defines grid height
       
   280 		this.gridMainContCssClass = f!=undefined && f.grid_cont_css_class!=undefined //defines css class for main container
       
   281 										? f.grid_cont_css_class : 'grd_Cont';
       
   282 		this.gridContCssClass =		f!=undefined && f.grid_tbl_cont_css_class!=undefined //defines css class for div containing table
       
   283 										? f.grid_tbl_cont_css_class : 'grd_tblCont';
       
   284 		this.gridHeadContCssClass = f!=undefined && f.grid_tblHead_cont_css_class!=undefined //defines css class for div containing headers' table
       
   285 										? f.grid_tblHead_cont_css_class : 'grd_headTblCont';
       
   286 		this.gridInfDivCssClass =	f!=undefined && f.grid_inf_grid_css_class!=undefined //defines css class for div containing rows counter, paging etc.
       
   287 										? f.grid_inf_grid_css_class : 'grd_inf';
       
   288 		this.gridHeadRowIndex =		f!=undefined && f.grid_headers_row_index!=undefined //defines which row contains column headers
       
   289 										? f.grid_headers_row_index : 0; 
       
   290 		this.gridHeadRows =			f!=undefined && f.grid_headers_rows!=undefined //array of headers row indexes to be placed in header table
       
   291 										? f.grid_headers_rows : [0];
       
   292 		this.gridEnableFilters =	f!=undefined && f.grid_enable_default_filters!=undefined 
       
   293 										? f.grid_enable_default_filters : true; //generate filters in table headers
       
   294 		this.gridDefaultColWidth =	f!=undefined && f.grid_default_col_width!=undefined 
       
   295 										? f.grid_default_col_width : '100px'; //default col width						
       
   296 		this.gridEnableColResizer =	f!=undefined && f.grid_enable_cols_resizer!=undefined 
       
   297 										? f.grid_enable_cols_resizer : true; //enables/disables columns resizer
       
   298 		this.hasGridWidthsRow =		false; //flag indicating if the grid has an additional row for column widths (IE<=7)
       
   299 		this.gridColElms =			[];
       
   300 		this.sourceTblHtml = 		this.tbl.outerHTML; //original table html												
       
   301 		/*** ***/
       
   302 								
       
   303 		this.filtersRowIndex =		f!=undefined && f.filters_row_index!=undefined //defines in which row filters grid bar is generated
       
   304 										? f.filters_row_index>1 ? 1 : f.filters_row_index : 0;
       
   305 		this.fltCellTag =			f!=undefined && f.filters_cell_tag!=undefined //defines tag of the cells containing filters (td/th)
       
   306 										? (f.filters_cell_tag!='th' ? 'td' : 'th') : 'td';		
       
   307 		this.fltIds = 				[]; //stores filters ids
       
   308 		this.searchArgs =			null; //stores filters values
       
   309 		this.tblData =				[]; //stores table data
       
   310 		this.validRowsIndex =		null; //stores valid rows indexes (rows visible upon filtering)
       
   311 		this.fltGridEl =			null; //stores filters row element
       
   312 		this.isFirstLoad =			true; //is first load boolean 
       
   313 		this.infDiv =				null; //container div for paging elements, reset btn etc.
       
   314 		this.lDiv =					null; //div for rows counter
       
   315 		this.rDiv =					null; //div for reset button and results per page select
       
   316 		this.mDiv =					null; //div for paging elements
       
   317 		this.contDiv =				null; //table container div for fixed headers (IE only)
       
   318 		this.infDivCssClass =		f!=undefined && f.inf_div_css_class!=undefined	//defines css class for div containing
       
   319 										? f.inf_div_css_class : 'inf';				//paging elements, rows counter etc.
       
   320 		this.lDivCssClass =			f!=undefined && f.left_div_css_class!=undefined	//defines css class for left div 
       
   321 										? f.left_div_css_class : 'ldiv';
       
   322 		this.rDivCssClass =			f!=undefined && f.right_div_css_class!=undefined //defines css class for right div 
       
   323 										? f.right_div_css_class : 'rdiv';
       
   324 		this.mDivCssClass =			f!=undefined && f.middle_div_css_class!=undefined //defines css class for mid div 
       
   325 										? f.middle_div_css_class : 'mdiv';
       
   326 		this.contDivCssClass =		f!=undefined && f.content_div_css_class!=undefined 
       
   327 										? f.content_div_css_class : 'cont';	//table container div css class
       
   328 		
       
   329 		/*** filters' grid appearance ***/
       
   330 		this.fltsRowCssClass =		f!=undefined && f.flts_row_css_class!=undefined //defines css class for filters row
       
   331 										? f.flts_row_css_class : 'fltrow';		
       
   332 		this.alternateBgs =			f!=undefined && f.alternate_rows ? true : false; //enables/disbles rows alternating bg colors
       
   333 		this.hasColWidth =			f!=undefined && f.col_width ? true : false; //defines widths of columns
       
   334 		this.colWidth =				f!=undefined && this.hasColWidth ? f.col_width : null;
       
   335 		this.fixedHeaders =			f!=undefined && f.fixed_headers ? true : false; //enables/disables fixed headers
       
   336 		this.tBodyH = 				f!=undefined && f.tbody_height ? f.tbody_height : 200; //tbody height if fixed headers enabled
       
   337 		this.fltCssClass =			f!=undefined && f.flt_css_class!=undefined //defines css class for filters
       
   338 										? f.flt_css_class : 'flt';
       
   339 		this.fltMultiCssClass =		f!=undefined && f.flt_multi_css_class!=undefined //defines css class for multiple selects filters
       
   340 										? f.flt_multi_css_class : 'flt_multi';
       
   341 		this.fltSmallCssClass =		f!=undefined && f.flt_small_css_class!=undefined //defines css class for filters
       
   342 										? f.flt_small_css_class : 'flt_s';
       
   343 		this.singleFltCssClass =	f!=undefined && f.single_flt_css_class!=undefined //defines css class for single-filter
       
   344 										? f.single_flt_css_class : 'single_flt';	
       
   345 		this.isStartBgAlternate =	true;
       
   346 		this.rowBgEvenCssClass =	f!=undefined && f.even_row_css_class!=undefined //defines css class for even rows
       
   347 										? f.even_row_css_class :'even';
       
   348 		this.rowBgOddCssClass =		f!=undefined && f.odd_row_css_class!=undefined //defines css class for odd rows
       
   349 										? f.odd_row_css_class :'odd';
       
   350 		
       
   351 		/*** filters' grid behaviours ***/
       
   352 		this.enterKey =				f!=undefined && f.enter_key==false ? false : true; //enables/disables enter key
       
   353 		this.isModFilterFn = 		f!=undefined && f.mod_filter_fn ? true : false; //enables/disables alternative fn call		
       
   354 		this.modFilterFn =			this.isModFilterFn ? f.mod_filter_fn : null;// used by tf_DetectKey fn
       
   355 		this.onBeforeFilter =		f!=undefined && tf_isFn(f.on_before_filter) //calls function before filtering starts
       
   356 										? f.on_before_filter : null;
       
   357 		this.onAfterFilter =		f!=undefined && tf_isFn(f.on_after_filter) //calls function after filtering
       
   358 										? f.on_after_filter : null;								
       
   359 		this.matchCase =			f!=undefined && f.match_case ? true : false; //enables/disables case sensitivity
       
   360 		this.exactMatch =			f!=undefined && f.exact_match ? true : false; //enables/disbles exact match for search
       
   361 		this.refreshFilters =		f!=undefined && f.refresh_filters ? true : false; //refreshes drop-down lists upon validation
       
   362 		this.activeFlt =			null; //stores active filter element
       
   363 		this.activeFilterId =		null; //id of active filter
       
   364 		this.hasColOperation =		f!=undefined && f.col_operation ? true : false; //enables/disbles column operation(sum,mean)
       
   365 		this.colOperation =			null;
       
   366 		this.hasVisibleRows = 		f!=undefined && f.rows_always_visible ? true : false; //enables always visible rows
       
   367 		this.visibleRows =			this.hasVisibleRows ? f.rows_always_visible : [];//array containing always visible rows
       
   368 		this.searchType =			f!=undefined && f.search_type!=undefined //defines search type: include or exclude
       
   369 										? f.search_type : 'include';
       
   370 		this.isExternalFlt =		f!=undefined && f.external_flt_grid ? true : false; //enables/disables external filters generation
       
   371 		this.externalFltTgtIds =	f!=undefined && f.external_flt_grid_ids!=undefined //array containing ids of external elements containing filters
       
   372 										? f.external_flt_grid_ids : null;
       
   373 		this.externalFltEls =		[]; //stores filters elements if isExternalFlt is true		
       
   374 		this.execDelay =			f!=undefined && f.exec_delay ? parseInt(f.exec_delay) : 100; //delays filtering process if loader true
       
   375 		this.status =				f!=undefined && f.status ? true : false; //enables/disables status messages
       
   376 		this.onFiltersLoaded =		f!=undefined && tf_isFn(f.on_filters_loaded) //calls function when filters grid loaded
       
   377 										? f.on_filters_loaded : null;
       
   378 		this.singleSearchFlt =		f!=undefined && f.single_search_filter ? true : false; //enables/disables single filter search
       
   379 		this.onRowValidated =		f!=undefined && tf_isFn(f.on_row_validated) //calls function after row is validated
       
   380 									 	? f.on_row_validated : null;
       
   381 		this.customCellDataCols =	f!=undefined && f.custom_cell_data_cols ? f.custom_cell_data_cols : []; //array defining columns for customCellData event 	
       
   382 		this.customCellData =		f!=undefined && tf_isFn(f.custom_cell_data) //calls custom function for retrieving cell data
       
   383 									 	? f.custom_cell_data : null;																
       
   384 		
       
   385 		/*** selects customisation and behaviours ***/
       
   386 		this.displayAllText =		f!=undefined && f.display_all_text!=undefined ? f.display_all_text : ''; //defines 1st option text
       
   387 		this.onSlcChange = 			f!=undefined && f.on_change==false ? false : true; //enables/disables onChange event on combo-box 
       
   388 		this.sortSlc =				f!=undefined && f.sort_select==false ? false : true; //enables/disables select options sorting
       
   389 		this.isSortNumAsc =			f!=undefined && f.sort_num_asc ? true : false; //enables/disables ascending numeric options sorting
       
   390 		this.sortNumAsc =			this.isSortNumAsc ? f.sort_num_asc : null;
       
   391 		this.isSortNumDesc =		f!=undefined && f.sort_num_desc ? true : false; //enables/disables descending numeric options sorting
       
   392 		this.sortNumDesc =			this.isSortNumDesc ? f.sort_num_desc : null;
       
   393 		this.slcFillingMethod =		f!=undefined && f.slc_filling_method!=undefined //sets select filling method: 'innerHTML' or 
       
   394 										? f.slc_filling_method : 'createElement';	//'createElement'
       
   395 		this.fillSlcOnDemand =		f!=undefined && f.fill_slc_on_demand ? true : false; //enabled selects are populated on demand
       
   396 		this.activateSlcTooltip =	f!=undefined && f.activate_slc_tooltip!=undefined //IE only, tooltip text appearing on select 
       
   397 										? f.activate_slc_tooltip : 'Click to activate'; // before it is populated
       
   398 		this.multipleSlcTooltip =	f!=undefined && f.multiple_slc_tooltip!=undefined //tooltip text appearing on multiple select 
       
   399 										? f.multiple_slc_tooltip : 'Use Ctrl key for multiple selections';
       
   400 		this.hasCustomSlcOptions =	f!=undefined && f.custom_slc_options &&
       
   401 										(typeof f.custom_slc_options).tf_LCase() == 'object' 
       
   402 										? true : false;	
       
   403 		this.customSlcOptions =		f!=undefined && f.custom_slc_options!=undefined
       
   404 										? f.custom_slc_options : null;
       
   405 		this.onBeforeOperation =	f!=undefined && tf_isFn(f.on_before_operation) //calls function before col operation
       
   406 										? f.on_before_operation : null;
       
   407 		this.onAfterOperation =		f!=undefined && tf_isFn(f.on_after_operation) //calls function after col operation
       
   408 										? f.on_after_operation : null;
       
   409 		
       
   410 		/*** checklist customisation and behaviours ***/
       
   411 		this.checkListDiv = 		[]; //checklist container div
       
   412 		this.checkListDivCssClass = f!=undefined && f.div_checklist_css_class!=undefined 
       
   413 										? f.div_checklist_css_class : 'div_checklist'; //defines css class for div containing checklist filter
       
   414 		this.checkListCssClass =	f!=undefined && f.checklist_css_class!=undefined //defines css class for checklist filters
       
   415 										? f.checklist_css_class : 'flt_checklist';
       
   416 		this.checkListItemCssClass = f!=undefined && f.checklist_item_css_class!=undefined //defines css class for checklist item (li)
       
   417 										? f.checklist_item_css_class : 'flt_checklist_item';
       
   418 		this.checkListSlcItemCssClass = f!=undefined && f.checklist_selected_item_css_class!=undefined //defines css class for selected checklist item (li)
       
   419 										? f.checklist_selected_item_css_class : 'flt_checklist_slc_item';								
       
   420 		this.activateCheckListTxt =	f!=undefined && f.activate_checklist_text!=undefined //Load on demand text 
       
   421 										? f.activate_checklist_text : 'Click to load data';
       
   422 		
       
   423 		/*** Filter operators ***/
       
   424 		this.orOperator =			f!=undefined && f.or_operator!=undefined ? f.or_operator : '||';
       
   425 		this.anOperator =			f!=undefined && f.and_operator!=undefined ? f.and_operator : '&&';
       
   426 		this.grOperator = 			f!=undefined && f.greater_operator!=undefined ? f.greater_operator : '>';
       
   427 		this.lwOperator =			f!=undefined && f.lower_operator!=undefined ? f.lower_operator : '<';
       
   428 		this.leOperator =			f!=undefined && f.lower_equal_operator!=undefined ? f.lower_equal_operator : '<=';
       
   429 		this.geOperator =			f!=undefined && f.greater_equal_operator!=undefined ? f.greater_equal_operator : '>=';
       
   430 		this.dfOperator =			f!=undefined && f.different_operator!=undefined ? f.different_operator : '!';
       
   431 		this.lkOperator =			f!=undefined && f.like_operator!=undefined ? f.like_operator : '*';
       
   432 		this.eqOperator =			f!=undefined && f.equal_operator!=undefined ? f.equal_operator : '=';
       
   433 		this.stOperator =			f!=undefined && f.start_with_operator!=undefined ? f.start_with_operator : '{';
       
   434 		this.enOperator =			f!=undefined && f.end_with_operator!=undefined ? f.end_with_operator : '}';
       
   435 		this.curExp =				f!=undefined && f.cur_exp!=undefined ? f.cur_exp : '^[¥£€$]';
       
   436 		this.separator = 			f!=undefined && f.separator!=undefined ? f.separator : ',';
       
   437 		
       
   438 		/*** rows counter ***/
       
   439 		this.rowsCounter = 			f!=undefined && f.rows_counter ? true : false; //show/hides rows counter
       
   440 		this.rowsCounterTgtId =		f!=undefined && f.rows_counter_target_id!=undefined //id of custom container element
       
   441 										? f.rows_counter_target_id : null;
       
   442 		this.rowsCounterDiv =		null; //element containing tot nb rows
       
   443 		this.rowsCounterSpan =		null; //element containing tot nb rows label
       
   444 		this.rowsCounterText =		f!=undefined && f.rows_counter_text!=undefined
       
   445 										? f.rows_counter_text : 'Rows: '; //defines rows counter text
       
   446 		this.totRowsCssClass =		f!=undefined && f.tot_rows_css_class!=undefined //defines css class rows counter
       
   447 										? f.tot_rows_css_class : 'tot';		
       
   448 		
       
   449 		/*** status bar ***/
       
   450 		this.statusBar =			f!=undefined && f.status_bar ? true : false; //show/hides status bar
       
   451 		this.statusBarTgtId =		f!=undefined && f.status_bar_target_id!=undefined //id of custom container element
       
   452 										? f.status_bar_target_id : null;
       
   453 		this.statusBarDiv =			null; //element containing status bar label
       
   454 		this.statusBarSpan =		null; //status bar
       
   455 		this.statusBarSpanText =	null; //status bar label
       
   456 		this.statusBarText =		f!=undefined && f.status_bar_text!=undefined
       
   457 										? f.status_bar_text : ''; //defines status bar text
       
   458 		this.statusBarCssClass =	f!=undefined && f.status_bar_css_class!=undefined //defines css class status bar
       
   459 										? f.status_bar_css_class : 'status';
       
   460 		this.statusBarCloseDelay =	250; //delay for status bar clearing			
       
   461 		
       
   462 		/*** loader ***/
       
   463 		this.loader =				f!=undefined && f.loader ? true : false; //enables/disables loader
       
   464 		this.loaderTgtId =			f!=undefined && f.loader_target_id!=undefined //id of container element
       
   465 										? f.loader_target_id : null;
       
   466 		this.loaderDiv =			null; //div containing loader
       
   467 		this.loaderText =			f!=undefined && f.loader_text!=undefined ? f.loader_text : 'Loading...'; //defines loader text
       
   468 		this.loaderHtml =			f!=undefined && f.loader_html!=undefined ? f.loader_html : null; //defines loader innerHtml
       
   469 		this.loaderCssClass = 		f!=undefined && f.loader_css_class!=undefined //defines css class for loader div
       
   470 										? f.loader_css_class : 'loader';
       
   471 		this.loaderCloseDelay =		200; //delay for hiding loader
       
   472 		this.onShowLoader =			f!=undefined && tf_isFn(f.on_show_loader) //calls function before loader is displayed
       
   473 										? f.on_show_loader : null;
       
   474 		this.onHideLoader =			f!=undefined && tf_isFn(f.on_hide_loader) //calls function after loader is closed
       
   475 										? f.on_hide_loader : null;					
       
   476 		
       
   477 		/*** validation - reset buttons/links ***/
       
   478 		this.displayBtn =			f!=undefined && f.btn ? true : false; //show/hides filter's validation button
       
   479 		this.btnText =				f!=undefined && f.btn_text!=undefined ? f.btn_text : 'go'; //defines validation button text
       
   480 		this.btnCssClass =			f!=undefined && f.btn_css_class!=undefined //defines css class for validation button
       
   481 										? f.btn_css_class : 'btnflt';
       
   482 		this.btnReset = 			f!=undefined && f.btn_reset ? true : false; //show/hides reset link
       
   483 		this.btnResetTgtId =		f!=undefined && f.btn_reset_target_id!=undefined //id of container element
       
   484 										? f.btn_reset_target_id : null;
       
   485 		this.btnResetEl =			null; //reset button element
       
   486 		this.btnResetText =			f!=undefined && f.btn_reset_text!=undefined ? f.btn_reset_text : 'Reset'; //defines reset text
       
   487 		this.btnResetHtml = 		f!=undefined && f.btn_reset_html!=undefined ? f.btn_reset_html : null; //defines reset button innerHtml
       
   488 		this.btnResetCssClass =		f!=undefined && f.btn_reset_css_class!=undefined //defines css class for reset button
       
   489 										? f.btn_reset_css_class :'reset';
       
   490 		
       
   491 		/*** paging ***/
       
   492 		this.paging =				f!=undefined && f.paging ? true : false; //enables/disables table paging
       
   493 		this.pagingTgtId =			f!=undefined && f.paging_target_id!=undefined //id of container element
       
   494 										? f.paging_target_id : null;		
       
   495 		this.pagingLength =			f!=undefined && f.paging_length!=undefined ? f.paging_length : 10; //defines table paging length
       
   496 		this.hasResultsPerPage =	f!=undefined && f.results_per_page ? true : false; //enables/disables results per page drop-down
       
   497 		this.resultsPerPageTgtId =	f!=undefined && f.results_per_page_target_id!=undefined //id of container element
       
   498 										? f.results_per_page_target_id : null;	
       
   499 		this.resultsPerPage =		null; //stores results per page text and values			
       
   500 		this.pagingSlc =			null; //stores paging select element
       
   501 		this.isPagingRemoved =		false; //indicates if paging elements were previously removed
       
   502 		this.pgSlcCssClass =		f!=undefined && f.paging_slc_css_class!=undefined
       
   503 										? f.paging_slc_css_class :'pgSlc'; //css class for paging select element
       
   504 		this.pgInpCssClass =		f!=undefined && f.paging_inp_css_class!=undefined
       
   505 										? f.paging_inp_css_class :'pgNbInp'; //css class for paging input element
       
   506 		this.resultsPerPageSlc =	null; //results per page select element
       
   507 		this.resultsSlcCssClass =	f!=undefined && f.results_slc_css_class!=undefined
       
   508 										? f.results_slc_css_class :'rspg'; //defines css class for results per page select
       
   509 		this.resultsSpanCssClass =	f!=undefined && f.results_span_css_class!=undefined
       
   510 										? f.results_span_css_class :'rspgSpan'; //css class for label preceding results per page select
       
   511 		this.nbVisibleRows	=		0; //nb visible rows
       
   512 		this.nbHiddenRows =			0; //nb hidden rows
       
   513 		this.startPagingRow =		0; //1st row index of current page
       
   514 		this.nbPages = 				0; //total nb of pages
       
   515 		this.currentPageNb =		1; //current page nb
       
   516 		this.btnNextPageText = 		f!=undefined && f.btn_next_page_text!=undefined
       
   517 										? f.btn_next_page_text : '>'; //defines next page button text
       
   518 		this.btnPrevPageText =		f!=undefined && f.btn_prev_page_text!=undefined
       
   519 										? f.btn_prev_page_text : '<'; //defines previous page button text
       
   520 		this.btnLastPageText =		f!=undefined && f.btn_last_page_text!=undefined
       
   521 										? f.btn_last_page_text : '>|'; //defines last page button text
       
   522 		this.btnFirstPageText =		f!=undefined && f.btn_first_page_text!=undefined
       
   523 										? f.btn_first_page_text : '|<' ; //defines first page button text
       
   524 		this.btnNextPageHtml =		f!=undefined && f.btn_next_page_html!=undefined
       
   525 										? f.btn_next_page_html : null; //defines next page button html
       
   526 		this.btnPrevPageHtml =		f!=undefined && f.btn_prev_page_html!=undefined
       
   527 										? f.btn_prev_page_html : null; //defines previous page button html
       
   528 		this.btnFirstPageHtml =		f!=undefined && f.btn_first_page_html!=undefined
       
   529 										? f.btn_first_page_html : null; //defines last page button html
       
   530 		this.btnLastPageHtml =		f!=undefined && f.btn_last_page_html!=undefined
       
   531 										? f.btn_last_page_html : null; //defines previous page button html
       
   532 		this.btnPageCssClass =		f!=undefined && f.paging_btn_css_class!=undefined
       
   533 										? f.paging_btn_css_class :'pgInp'; //css class for paging buttons (previous,next,etc.)
       
   534 		this.nbPgSpanCssClass = 	f!=undefined && f.nb_pages_css_class!=undefined
       
   535 										? f.nb_pages_css_class :'nbpg'; //css class for span containing tot nb of pages
       
   536 		this.hasPagingBtns =		f!=undefined && f.paging_btns==false ? false : true; //enables/disables paging buttons
       
   537 		this.pagingBtnEvents =		null; //stores paging buttons events
       
   538 		this.pageSelectorType =		f!=undefined && f.page_selector_type!=undefined
       
   539 										? f.page_selector_type : this.fltTypeSlc; //defines previous page button html		
       
   540 		
       
   541 		/*** webfx sort adapter ***/
       
   542 		this.sort =					f!=undefined && f.sort ? true : false; //enables/disables default table sorting
       
   543 		this.isSortEnabled =		false; //indicates if sort is set (used in tfAdapter.sortabletable.js)
       
   544 		this.sorted =				false; //indicates if tables was sorted
       
   545 		this.sortConfig =			f!=undefined && f.sort_config!=undefined 
       
   546 										? f.sort_config : {};
       
   547 		this.sortConfig.name =		f!=undefined && f.sort_config!=undefined && f.sort_config.name
       
   548 										? f.sort_config.name : 'sortabletable';
       
   549 		this.sortConfig.src =		f!=undefined && f.sort_config!=undefined && f.sort_config.src
       
   550 										? f.sort_config.src : 'sortabletable.js';
       
   551 		this.sortConfig.adapterSrc =f!=undefined && f.sort_config!=undefined && f.sort_config.adapter_src
       
   552 										? f.sort_config.adapter_src : 'tfAdapter.sortabletable.js';
       
   553 		this.sortConfig.initialize =f!=undefined && f.sort_config!=undefined && f.sort_config.initialize
       
   554 										? f.sort_config.initialize
       
   555 										: function(o){ if(o.SetSortTable) o.SetSortTable(); };
       
   556 		this.sortConfig.sortTypes =	f!=undefined && f.sort_config!=undefined && f.sort_config.sort_types
       
   557 										? f.sort_config.sort_types : [];
       
   558 		this.sortConfig.sortCol =	f!=undefined && f.sort_config!=undefined && f.sort_config.sort_col!=undefined
       
   559 										? f.sort_config.sort_col : null;
       
   560 		this.sortConfig.asyncSort =	f!=undefined && f.sort_config!=undefined && f.sort_config.async_sort
       
   561 										? true : false;
       
   562 		this.sortConfig.triggerIds =f!=undefined && f.sort_config!=undefined && f.sort_config.sort_trigger_ids
       
   563 										? f.sort_config.sort_trigger_ids : [];									
       
   564 		
       
   565 		/*** onkeyup event ***/
       
   566 		this.onKeyUp =				f!=undefined && f.on_keyup ? true : false; //enables/disables onkeyup event, table is filtered when user stops typing
       
   567 		this.onKeyUpDelay =			f!=undefined && f.on_keyup_delay!=undefined ? f.on_keyup_delay : 900; //onkeyup delay timer (msecs)
       
   568 		this.isUserTyping = 		null; //typing indicator
       
   569 		this.onKeyUpTimer = 		undefined;		
       
   570 		
       
   571 		/*** keyword highlighting ***/
       
   572 		this.highlightKeywords = 	f!=undefined && f.highlight_keywords ? true : false; //enables/disables keyword highlighting
       
   573 		this.highlightCssClass =	f!=undefined && f.highlight_css_class!=undefined //defines css class for highlighting
       
   574 										? f.highlight_css_class : 'keyword';	
       
   575 		
       
   576 		/*** data types ***/
       
   577 		this.defaultDateType =		f!=undefined && f.default_date_type!=undefined //defines default date type (european DMY)
       
   578 										? f.default_date_type : 'DMY';
       
   579 		this.thousandsSeparator =	f!=undefined && f.thousands_separator!=undefined //defines default thousands separator 
       
   580 										? f.thousands_separator : ','; //US = ',' EU = '.'
       
   581 		this.decimalSeparator = 	f!=undefined && f.decimal_separator!=undefined //defines default decimal separator 
       
   582 										? f.decimal_separator : '.'; //US & javascript = '.' EU = ','
       
   583 		this.hasColNbFormat = 		f!=undefined && f.col_number_format ? true : false; //enables number format per column
       
   584 		this.colNbFormat = 			f!=undefined && this.hasColNbFormat ? f.col_number_format : null; //array containing columns nb formats
       
   585 		this.hasColDateType = 		f!=undefined && f.col_date_type ? true : false; //enables date type per column
       
   586 		this.colDateType =			f!=undefined && this.hasColDateType ? f.col_date_type : null; //array containing columns date type
       
   587 		
       
   588 		/*** status messages ***/
       
   589 		this.msgFilter =			f!=undefined && f.msg_filter!=undefined //filtering
       
   590 										? f.msg_filter : 'Filtering data...'; 
       
   591 		this.msgPopulate =			f!=undefined && f.msg_populate!=undefined //populating drop-downs
       
   592 										? f.msg_populate : 'Populating filter...'; 
       
   593 		this.msgPopulateCheckList =	f!=undefined && f.msg_populate_checklist!=undefined //populating drop-downs
       
   594 										? f.msg_populate_checklist : 'Populating list...'; 
       
   595 		this.msgChangePage =		f!=undefined && f.msg_change_page!=undefined //changing paging page
       
   596 										? f.msg_change_page : 'Collecting paging data...';
       
   597 		this.msgClear =				f!=undefined && f.msg_clear!=undefined //clearing filters
       
   598 										? f.msg_clear : 'Clearing filters...';
       
   599 		this.msgChangeResults =		f!=undefined && f.msg_change_results!=undefined //changing nb results/page
       
   600 										? f.msg_change_results : 'Changing results per page...';
       
   601 		this.msgResetValues =		f!=undefined && f.msg_reset_grid_values!=undefined //re-setting grid values
       
   602 										? f.msg_reset_grid_values : 'Re-setting filters values...';
       
   603 		this.msgResetPage =			f!=undefined && f.msg_reset_page!=undefined //re-setting page
       
   604 										? f.msg_reset_page : 'Re-setting page...';
       
   605 		this.msgResetPageLength =	f!=undefined && f.msg_reset_page_length!=undefined //re-setting page length
       
   606 										? f.msg_reset_page_length : 'Re-setting page length...';
       
   607 		this.msgSort =				f!=undefined && f.msg_sort!=undefined //table sorting
       
   608 										? f.msg_sort : 'Sorting data...';
       
   609 		this.msgLoadExtensions =	f!=undefined && f.msg_load_extensions!=undefined //table sorting
       
   610 										? f.msg_load_extensions : 'Loading extensions...';			
       
   611 
       
   612 		/*** ids prefixes ***/
       
   613 		this.prfxFlt =				'flt'; //filters (inputs - selects)
       
   614 		this.prfxValButton =		'btn'; //validation button
       
   615 		this.prfxInfDiv =			'inf_'; //container div for paging elements, rows counter etc.
       
   616 		this.prfxLDiv =				'ldiv_'; //left div
       
   617 		this.prfxRDiv =				'rdiv_'; //right div
       
   618 		this.prfxMDiv =				'mdiv_'; //middle div
       
   619 		this.prfxContentDiv =		'cont_'; //table container if fixed headers enabled
       
   620 		this.prfxCheckListDiv =		'chkdiv_'; //checklist filter container div
       
   621 		this.prfxSlcPages =			'slcPages_'; //pages select
       
   622 		this.prfxSlcResults = 		'slcResults_'; //results per page select
       
   623 		this.prfxSlcResultsTxt =	'slcResultsTxt_'; //label preciding results per page select	
       
   624 		this.prfxBtnNextSpan =		'btnNextSpan_'; //span containing next page button
       
   625 		this.prfxBtnPrevSpan =		'btnPrevSpan_'; //span containing previous page button
       
   626 		this.prfxBtnLastSpan =		'btnLastSpan_'; //span containing last page button
       
   627 		this.prfxBtnFirstSpan =		'btnFirstSpan_'; //span containing first page button
       
   628 		this.prfxBtnNext =			'btnNext_'; //next button
       
   629 		this.prfxBtnPrev =			'btnPrev_'; //previous button
       
   630 		this.prfxBtnLast =			'btnLast_'; //last button
       
   631 		this.prfxBtnFirst =			'btnFirst_'; //first button
       
   632 		this.prfxPgSpan =			'pgspan_'; //span for tot nb pages
       
   633 		this.prfxPgBeforeSpan =		'pgbeforespan_'; //span preceding pages select (contains 'Page')
       
   634 		this.prfxPgAfterSpan =		'pgafterspan_'; //span following pages select (contains ' of ')
       
   635 		this.prfxCounter =			'counter_'; //rows counter div
       
   636 		this.prfxTotRows =			'totrows_span_'; //nb displayed rows label
       
   637 		this.prfxTotRowsTxt =		'totRowsTextSpan_'; //label preceding nb rows label
       
   638 		this.prfxResetSpan =		'resetspan_'; //span containing reset button
       
   639 		this.prfxLoader =			'load_'; //loader div
       
   640 		this.prfxStatus =			'status_'; //status bar div
       
   641 		this.prfxStatusSpan =		'statusSpan_'; //status bar label
       
   642 		this.prfxStatusTxt =		'statusText_';//text preceding status bar label
       
   643 		this.prfxCookieFltsValues =	'tf_flts_'; //filter values cookie
       
   644 		this.prfxCookiePageNb =		'tf_pgnb_'; //page nb cookie
       
   645 		this.prfxCookiePageLen = 	'tf_pglen_'; //page length cookie
       
   646 		this.prfxMainTblCont =		'gridCont_'; //div containing grid elements if grid_layout true
       
   647 		this.prfxTblCont =			'tblCont_'; //div containing table if grid_layout true
       
   648 		this.prfxHeadTblCont = 		'tblHeadCont_'; //div containing headers table if grid_layout true
       
   649 		this.prfxHeadTbl =			'tblHead_';	//headers' table if grid_layout true
       
   650 		this.prfxGridFltTd =		'_td_'; //id of td containing the filter if grid_layout true
       
   651 		this.prfxGridTh =			'tblHeadTh_'; //id of th containing column header if grid_layout true				
       
   652 
       
   653 		/*** cookies ***/
       
   654 		this.hasStoredValues =		false;
       
   655 		this.rememberGridValues =	f!=undefined && f.remember_grid_values ? true : false; //remembers filters values on page load
       
   656 		this.fltsValuesCookie =		this.prfxCookieFltsValues + this.id; //cookie storing filter values
       
   657 		this.rememberPageNb =		this.paging && f!=undefined && f.remember_page_number
       
   658 										? true : false; //remembers page nb on page load	
       
   659 		this.pgNbCookie =			this.prfxCookiePageNb + this.id; //cookie storing page nb
       
   660 		this.rememberPageLen =		this.paging && f!=undefined && f.remember_page_length
       
   661 										? true : false; //remembers page length on page load
       
   662 		this.pgLenCookie =			this.prfxCookiePageLen + this.id; //cookie storing page length
       
   663 		this.cookieDuration =		f!=undefined && f.set_cookie_duration 
       
   664 										? parseInt(f.set_cookie_duration) :100000; //cookie duration
       
   665 		
       
   666 		/*** extensions ***/
       
   667 		this.hasExtensions =		f!=undefined && f.extensions ? true : false; //imports external script
       
   668 		this.extensions =			(this.hasExtensions) ? f.extensions : null;
       
   669 
       
   670 		/***(deprecated: backward compatibility) ***/
       
   671 		this.hasBindScript =		f!=undefined && f.bind_script ? true : false; //imports external script
       
   672 		this.bindScript =			(this.hasBindScript) ? f.bind_script : null;
       
   673 		
       
   674 		/*** TF events ***/
       
   675 		var o = this;
       
   676 		this.Evt = {
       
   677 			name: {
       
   678 				filter: 'Filter',
       
   679 				populateselect: 'Populate',
       
   680 				populatechecklist: 'PopulateCheckList',
       
   681 				changepage: 'ChangePage',
       
   682 				clear: 'Clear',
       
   683 				changeresultsperpage: 'ChangeResults',
       
   684 				resetvalues: 'ResetValues',
       
   685 				resetpage: 'ResetPage',
       
   686 				resetpagelength: 'ResetPageLength',
       
   687 				sort: 'Sort',
       
   688 				loadextensions: 'LoadExtensions'			
       
   689 			},
       
   690 			_DetectKey: function(e)
       
   691 			/*====================================================
       
   692 				- common fn that detects return key for a given
       
   693 				element (onkeypress for inputs)
       
   694 			=====================================================*/
       
   695 			{
       
   696 				if(!o.enterKey) return;
       
   697 				var evt=(e)?e:(window.event)?window.event:null;
       
   698 				if(evt)
       
   699 				{
       
   700 					var key=(evt.charCode)?evt.charCode:
       
   701 						((evt.keyCode)?evt.keyCode:((evt.which)?evt.which:0));
       
   702 					if(key=='13')
       
   703 					{
       
   704 						o.Filter();
       
   705 					} else { 
       
   706 						o.isUserTyping = true;
       
   707 						window.clearInterval(o.onKeyUpTimer);
       
   708 						o.onKeyUpTimer = undefined; 
       
   709 					}
       
   710 				}//if evt
       
   711 			},
       
   712 			_OnKeyUp: function(e)
       
   713 			/*====================================================
       
   714 				- onkeyup event for text filters 
       
   715 				(onKeyUp property)
       
   716 			=====================================================*/
       
   717 			{
       
   718 				if(!o.onKeyUp) return;
       
   719 				var evt=(e)?e:(window.event)?window.event:null;
       
   720 				var key=(evt.charCode)?evt.charCode:
       
   721 						((evt.keyCode)?evt.keyCode:((evt.which)?evt.which:0));
       
   722 				o.isUserTyping = false;
       
   723 				
       
   724 				if( key!=13 && key!=9 && key!=27 && key!=38 && key!=40 )
       
   725 				{
       
   726 					function filter()
       
   727 					{
       
   728 						window.clearInterval(o.onKeyUpTimer);
       
   729 						o.onKeyUpTimer = undefined;
       
   730 						if( !o.isUserTyping )
       
   731 						{
       
   732 							o.Filter();
       
   733 							o.isUserTyping = null;			
       
   734 						}
       
   735 					}
       
   736 					if(o.onKeyUpTimer==undefined)
       
   737 						o.onKeyUpTimer = window.setInterval( filter, o.onKeyUpDelay );
       
   738 				} else { 
       
   739 					window.clearInterval(o.onKeyUpTimer); 
       
   740 					o.onKeyUpTimer = undefined; 
       
   741 				}
       
   742 			},
       
   743 			_OnKeyDown: function(e)
       
   744 			/*====================================================
       
   745 				- onkeydown event for input filters 
       
   746 				(onKeyUp property)
       
   747 			=====================================================*/
       
   748 			{
       
   749 				if(!o.onKeyUp) return;
       
   750 				o.isUserTyping = true;
       
   751 			},
       
   752 			_OnInpBlur: function(e)
       
   753 			/*====================================================
       
   754 				- onblur event for input filters (onKeyUp property)
       
   755 			=====================================================*/
       
   756 			{
       
   757 				if(!o.onKeyUp) return;
       
   758 				o.isUserTyping = false; 
       
   759 				window.clearInterval(o.onKeyUpTimer);
       
   760 			},
       
   761 			_OnInpFocus: function()
       
   762 			/*====================================================
       
   763 				- onfocus event for input filters
       
   764 			=====================================================*/
       
   765 			{
       
   766 				o.activeFilterId=this.getAttribute('id');
       
   767 				o.activeFlt = tf_Id(o.activeFilterId);
       
   768 			},
       
   769 			_OnSlcFocus: function()
       
   770 			/*====================================================
       
   771 				- onfocus event for select filters
       
   772 			=====================================================*/
       
   773 			{
       
   774 				o.activeFilterId = this.getAttribute('id');
       
   775 				o.activeFlt = tf_Id(o.activeFilterId);
       
   776 				if(o.fillSlcOnDemand && this.getAttribute('filled') == '0')
       
   777 				{// select is populated when element has focus
       
   778 					var ct = this.getAttribute('ct');
       
   779 					o.PopulateSelect(ct);
       
   780 					if(!tf_isIE) this.setAttribute('filled','1');
       
   781 				}
       
   782 			},
       
   783 			_OnSlcChange: function()
       
   784 			/*====================================================
       
   785 				- onchange event for select filters
       
   786 			=====================================================*/
       
   787 			{
       
   788 				if(o.onSlcChange) o.Filter();
       
   789 			},
       
   790 			_OnSlcBlur: function()
       
   791 			/*====================================================
       
   792 				- onblur event for select filters
       
   793 			=====================================================*/
       
   794 			{
       
   795 			},
       
   796 			_OnCheckListClick: function()
       
   797 			/*====================================================
       
   798 				- onclick event for checklist filters
       
   799 			=====================================================*/
       
   800 			{
       
   801 				if(o.fillSlcOnDemand && this.getAttribute('filled') == '0')
       
   802 				{
       
   803 					var ct = this.getAttribute('ct');
       
   804 					o.PopulateCheckList(ct);
       
   805 					o.checkListDiv[ct].onclick = null;
       
   806 					o.checkListDiv[ct].title = '';
       
   807 				}
       
   808 			},
       
   809 			_OnCheckListFocus: function()
       
   810 			/*====================================================
       
   811 				- onclick event for checklist filter container
       
   812 			=====================================================*/
       
   813 			{
       
   814 				o.activeFilterId = this.firstChild.getAttribute('id');
       
   815 				o.activeFlt = tf_Id(o.activeFilterId);
       
   816 			},
       
   817 			_OnBtnClick: function()
       
   818 			/*====================================================
       
   819 				- onclick event for validation button 
       
   820 				(btn property)
       
   821 			=====================================================*/
       
   822 			{
       
   823 				o.Filter();
       
   824 			},
       
   825 			_OnSlcPagesChange: function()
       
   826 			/*====================================================
       
   827 				- onchange event for paging select
       
   828 			=====================================================*/
       
   829 			{
       
   830 				if(o.Evt._Paging._OnSlcPagesChangeEvt)
       
   831 					o.Evt._Paging._OnSlcPagesChangeEvt();
       
   832 				o.ChangePage();
       
   833 				this.blur();
       
   834 				//ie only: blur is not enough...
       
   835 				if(this.parentNode && tf_isIE)
       
   836 					this.parentNode.focus();
       
   837 			},
       
   838 			_OnSlcPagesChangeEvt: null, //used by sort adapter
       
   839 			_OnSlcResultsChange: function()
       
   840 			/*====================================================
       
   841 				- onchange event for results per page select
       
   842 			=====================================================*/
       
   843 			{
       
   844 				o.ChangeResultsPerPage();
       
   845 				this.blur();
       
   846 				//ie only: blur is not enough...
       
   847 				if(this.parentNode && tf_isIE) 
       
   848 					this.parentNode.focus();
       
   849 			},
       
   850 			_Paging: {// paging buttons events
       
   851 				slcIndex: function(){ 
       
   852 					return (o.pageSelectorType==o.fltTypeSlc) 
       
   853 						? o.pagingSlc.options.selectedIndex 
       
   854 						: parseInt(o.pagingSlc.value)-1;
       
   855 				},
       
   856 				nbOpts: function(){ 
       
   857 					return (o.pageSelectorType==o.fltTypeSlc) 
       
   858 					? parseInt(o.pagingSlc.options.length)-1 
       
   859 					: (o.nbPages-1);
       
   860 				},
       
   861 				next: function(){
       
   862 					if(o.Evt._Paging.nextEvt) o.Evt._Paging.nextEvt();
       
   863 					var nextIndex = (o.Evt._Paging.slcIndex()<o.Evt._Paging.nbOpts()) 
       
   864 						? o.Evt._Paging.slcIndex()+1 : 0;
       
   865 					o.ChangePage(nextIndex);
       
   866 				},
       
   867 				nextEvt: null, //used by sort adapter
       
   868 				prev: function(){
       
   869 					if(o.Evt._Paging.prevEvt) o.Evt._Paging.prevEvt();
       
   870 					var prevIndex = o.Evt._Paging.slcIndex()>0 
       
   871 						? o.Evt._Paging.slcIndex()-1 : o.Evt._Paging.nbOpts();
       
   872 					o.ChangePage(prevIndex);
       
   873 				},
       
   874 				prevEvt: null, //used by sort adapter
       
   875 				last: function(){
       
   876 					if(o.Evt._Paging.lastEvt) o.Evt._Paging.lastEvt();
       
   877 					o.ChangePage(o.Evt._Paging.nbOpts());
       
   878 				},
       
   879 				lastEvt: null, //used by sort adapter
       
   880 				first: function(){
       
   881 					if(o.Evt._Paging.firstEvt)  o.Evt._Paging.firstEvt();
       
   882 					o.ChangePage(0);
       
   883 				},
       
   884 				firstEvt: null, //used by sort adapter
       
   885 				_detectKey: function(e)
       
   886 				{
       
   887 					var evt=(e)?e:(window.event)?window.event:null;
       
   888 					if(evt)
       
   889 					{
       
   890 						var key=(evt.charCode)?evt.charCode:
       
   891 							((evt.keyCode)?evt.keyCode:((evt.which)?evt.which:0));
       
   892 						if(key=='13'){ 
       
   893 							if(o.sorted){ o.Filter(); o.ChangePage(o.Evt._Paging.slcIndex()); }
       
   894 							else o.ChangePage();								
       
   895 							this.blur(); 
       
   896 						}
       
   897 					}//if evt
       
   898 				}
       
   899 			},
       
   900 			_EnableSlc: function()
       
   901 			/*====================================================
       
   902 				- onclick event slc parent node (enables filters)
       
   903 				IE only
       
   904 			=====================================================*/
       
   905 			{
       
   906 				this.firstChild.disabled = false;							
       
   907 				this.firstChild.focus();							
       
   908 				this.onclick = null;
       
   909 			},
       
   910 			_Clear: function()
       
   911 			/*====================================================
       
   912 				- clears filters
       
   913 			=====================================================*/
       
   914 			{
       
   915 				o.ClearFilters();
       
   916 			},
       
   917 			_EnableSort: function()
       
   918 			/*====================================================
       
   919 				- enables table sorting
       
   920 			=====================================================*/
       
   921 			{
       
   922 				if(tf_isImported(o.sortConfig.adapterSrc))
       
   923 					o.sortConfig.initialize.call(null,o);
       
   924 				else
       
   925 					o.IncludeFile(
       
   926 						o.sortConfig.name+'_adapter',
       
   927 						o.sortConfig.adapterSrc,
       
   928 						function(){ o.sortConfig.initialize.call(null,o); }
       
   929 					);
       
   930 			}
       
   931 		};
       
   932 		
       
   933 		/*** TF extensions ***/
       
   934 		this.Ext = {
       
   935 			list: {},
       
   936 			add: function(extName, extDesc, extPath, extCallBack)
       
   937 			{
       
   938 				var file = extPath.split('/')[extPath.split('/').length-1];
       
   939 				var re = new RegExp(file);
       
   940 				var path = extPath.replace(re,'');
       
   941 				o.Ext.list[extName] = { 
       
   942 					name: extName,
       
   943 					description: extDesc,
       
   944 					file: file,
       
   945 					path: path,
       
   946 					callback: extCallBack
       
   947 				};
       
   948 			}
       
   949 		};
       
   950 		
       
   951     }//if tbl!=null		
       
   952 }
       
   953 
       
   954 TF.prototype = {
       
   955 	
       
   956 	AddGrid: function()
       
   957 	/*====================================================
       
   958 		- adds row with filtering grid bar and sets grid 
       
   959 		behaviours and layout
       
   960 	=====================================================*/
       
   961 	{
       
   962 		if(this.hasGrid) return;
       
   963 		this.refRow = this.startRow==undefined ? 2 : (this.startRow+1);
       
   964 		if(this.gridLayout) this.refRow = this.startRow==undefined ? 0 : this.startRow;
       
   965 		this.headersRow = (this.filtersRowIndex==0) ? 1 : 0;
       
   966 		try{ this.nbCells = this.GetCellsNb(this.refRow) }
       
   967 		catch(e){ this.nbCells = this.GetCellsNb(0) }
       
   968 
       
   969 		var f = this.fObj==undefined ? {} : this.fObj;
       
   970 		var n = (this.singleSearchFlt) ? 1 : this.nbCells, inpclass;
       
   971 		
       
   972 		if(this.gridLayout)
       
   973 		{
       
   974 			this.isExternalFlt = true;
       
   975 			this.SetGridLayout();
       
   976 			//Once grid generated 1st filterable row is 0 again
       
   977 			this.refRow = (tf_isIE || tf_isIE7) ? (this.refRow+1) : 0;
       
   978 		}
       
   979 		
       
   980 		if(this.loader) this.SetLoader();
       
   981 	
       
   982 		if(this.hasResultsPerPage)
       
   983 		{ 
       
   984 			this.resultsPerPage = f['results_per_page']!=undefined   
       
   985 				? f['results_per_page'] : this.resultsPerPage;
       
   986 			if(this.resultsPerPage.length<2)
       
   987 				this.hasResultsPerPage = false;
       
   988 			else
       
   989 				this.pagingLength = this.resultsPerPage[1][0];
       
   990 		}
       
   991 		
       
   992 		if(!this.fltGrid)
       
   993 		{//filters grid is not genetared
       
   994 			this.refRow = (this.refRow-1);
       
   995 			if(this.gridLayout) this.refRow = 0;
       
   996 			this.nbFilterableRows = this.GetRowsNb();
       
   997 			this.nbVisibleRows = this.nbFilterableRows;
       
   998 			this.nbRows = this.nbFilterableRows;
       
   999 		} else {
       
  1000 			if(this.isFirstLoad)
       
  1001 			{
       
  1002 				if(!this.gridLayout){
       
  1003 					var fltrow;
       
  1004 					var thead = tf_Tag(this.tbl,'thead');
       
  1005 					if( thead.length>0 )
       
  1006 						fltrow = thead[0].insertRow(this.filtersRowIndex);
       
  1007 					else
       
  1008 						fltrow = this.tbl.insertRow(this.filtersRowIndex);
       
  1009 					
       
  1010 					if(this.fixedHeaders) this.SetFixedHeaders();
       
  1011 					
       
  1012 					fltrow.className = this.fltsRowCssClass;
       
  1013 					//Disable for grid_layout
       
  1014 					if( this.isExternalFlt && !this.gridLayout ) fltrow.style.display = 'none';
       
  1015 				}
       
  1016 				
       
  1017 				this.nbFilterableRows = this.GetRowsNb();
       
  1018 				this.nbVisibleRows = this.nbFilterableRows;
       
  1019 				this.nbRows = this.tbl.rows.length;
       
  1020 				
       
  1021 				for(var i=0; i<n; i++)// this loop adds filters
       
  1022 				{
       
  1023 					var fltcell = tf_CreateElm(this.fltCellTag);
       
  1024 					if(this.singleSearchFlt) fltcell.colSpan = this.nbCells;
       
  1025 					if(!this.gridLayout) fltrow.appendChild( fltcell );
       
  1026 					inpclass = (i==n-1 && this.displayBtn) ? this.fltSmallCssClass : this.fltCssClass;
       
  1027 					
       
  1028 					if( this['col'+i]==undefined )
       
  1029 						this['col'+i] = (f['col_'+i]==undefined) 
       
  1030 							? this.fltTypeInp : f['col_'+i].tf_LCase();
       
  1031 							
       
  1032 					if(this.singleSearchFlt)
       
  1033 					{//only 1 input for single search
       
  1034 						this['col'+i] = this.fltTypeInp;
       
  1035 						inpclass = this.singleFltCssClass;
       
  1036 					}
       
  1037 	
       
  1038 					if(this['col'+i]==this.fltTypeSlc || this['col'+i]==this.fltTypeMulti)
       
  1039 					{//selects					
       
  1040 						var slc = tf_CreateElm( this.fltTypeSlc,
       
  1041 							['id',this.prfxFlt+i+'_'+this.id],
       
  1042 							['ct',i],['filled','0'] );
       
  1043 						if(this['col'+i]==this.fltTypeMulti)
       
  1044 						{
       
  1045 							slc.multiple = this.fltTypeMulti;
       
  1046 							slc.title = this.multipleSlcTooltip;
       
  1047 						}
       
  1048 						slc.className = (this['col'+i].tf_LCase()==this.fltTypeSlc) 
       
  1049 							? inpclass : this.fltMultiCssClass;// for ie<=6
       
  1050 						
       
  1051 						if( this.isExternalFlt && this.externalFltTgtIds && tf_Id(this.externalFltTgtIds[i]) )
       
  1052 						{//filter is appended in desired element
       
  1053 							tf_Id( this.externalFltTgtIds[i] ).appendChild(slc);
       
  1054 							this.externalFltEls.push(slc);
       
  1055 						} else {
       
  1056 							fltcell.appendChild(slc);
       
  1057 						}
       
  1058 						
       
  1059 						this.fltIds.push(this.prfxFlt+i+'_'+this.id);
       
  1060 						
       
  1061 						if(!this.fillSlcOnDemand) this.PopulateSelect(i);
       
  1062 						
       
  1063 						slc.onkeypress = this.Evt._DetectKey;
       
  1064 						slc.onchange = this.Evt._OnSlcChange;
       
  1065 						slc.onfocus = this.Evt._OnSlcFocus;
       
  1066 						slc.onblur = this.Evt._OnSlcBlur;
       
  1067 						
       
  1068 						if(this.fillSlcOnDemand)
       
  1069 						{//1st option is created here since PopulateSelect isn't invoked
       
  1070 							var opt0 = tf_CreateOpt(this.displayAllText,'');
       
  1071 							slc.appendChild( opt0 );						
       
  1072 						}
       
  1073 						
       
  1074 						/* 	Code below for IE: it prevents select options to
       
  1075 							slide out before select it-self is populated.
       
  1076 							This is an unexpeted behavior for users since at
       
  1077 							1st click options are empty. Work around: 
       
  1078 							select is disabled and by clicking on element 
       
  1079 							(parent td), users enable drop-down and select is
       
  1080 							populated at same time.  */
       
  1081 						if( this.fillSlcOnDemand && tf_isIE)
       
  1082 						{
       
  1083 							slc.disabled = true;
       
  1084 							slc.title = this.activateSlcTooltip;
       
  1085 							slc.parentNode.onclick = this.Evt._EnableSlc;
       
  1086 							if( this['col'+i]==this.fltTypeMulti)
       
  1087 								this.__deferMultipleSelection(slc,0);
       
  1088 						}
       
  1089 					}
       
  1090 					
       
  1091 					else if( this['col'+i]==this.fltTypeCheckList )
       
  1092 					{// checklist
       
  1093 						var divCont = tf_CreateElm('div',
       
  1094 										['id',this.prfxCheckListDiv+i+'_'+this.id],
       
  1095 										['ct',i],['filled','0'] );
       
  1096 						divCont.className = this.checkListDivCssClass;
       
  1097 						
       
  1098 						if( this.isExternalFlt && this.externalFltTgtIds 
       
  1099 							&& tf_Id(this.externalFltTgtIds[i]) )
       
  1100 						{//filter is appended in desired element
       
  1101 							tf_Id( this.externalFltTgtIds[i] ).appendChild(divCont);
       
  1102 							this.externalFltEls.push(divCont);
       
  1103 						} else {
       
  1104 							fltcell.appendChild(divCont);
       
  1105 						}
       
  1106 						
       
  1107 						this.checkListDiv[i] = divCont;
       
  1108 						this.fltIds.push(this.prfxFlt+i+'_'+this.id);
       
  1109 						if(!this.fillSlcOnDemand) this.PopulateCheckList(i);
       
  1110 						
       
  1111 						divCont.onclick = this.Evt._OnCheckListFocus;
       
  1112 						
       
  1113 						if(this.fillSlcOnDemand)
       
  1114 						{
       
  1115 							divCont.onclick = this.Evt._OnCheckListClick;
       
  1116 							divCont.appendChild(tf_CreateText(this.activateCheckListTxt));
       
  1117 						}
       
  1118 					}
       
  1119 					
       
  1120 					else
       
  1121 					{
       
  1122 						var inptype;
       
  1123 						(this['col'+i]==this.fltTypeInp) ? inptype='text' : inptype='hidden';//show/hide input	
       
  1124 						var inp = tf_CreateElm( this.fltTypeInp,['id',this.prfxFlt+i+'_'+this.id],['type',inptype],['ct',i] );					
       
  1125 						inp.className = inpclass;// for ie<=6
       
  1126 						inp.onfocus = this.Evt._OnInpFocus;
       
  1127 						
       
  1128 						if( this.isExternalFlt && this.externalFltTgtIds && tf_Id(this.externalFltTgtIds[i]) )
       
  1129 						{//filter is appended in desired element
       
  1130 							tf_Id( this.externalFltTgtIds[i] ).appendChild(inp);
       
  1131 							this.externalFltEls.push(inp);
       
  1132 						} else {
       
  1133 							fltcell.appendChild(inp);
       
  1134 						}
       
  1135 						
       
  1136 						this.fltIds.push(this.prfxFlt+i+'_'+this.id);
       
  1137 						
       
  1138 						inp.onkeypress = this.Evt._DetectKey;
       
  1139 						inp.onkeydown = this.Evt._OnKeyDown;
       
  1140 						inp.onkeyup = this.Evt._OnKeyUp;
       
  1141 						inp.onblur = this.Evt._OnInpBlur;
       
  1142 						
       
  1143 						if(this.rememberGridValues)
       
  1144 						{
       
  1145 							var flts = tf_ReadCookie(this.fltsValuesCookie); //reads the cookie
       
  1146 							var reg = new RegExp(',','g');
       
  1147 							var flts_values = flts.split(reg); //creates an array with filters' values
       
  1148 							if (flts_values[i]!=' ')
       
  1149 								this.SetFilterValue(i,flts_values[i],false);					
       
  1150 						}
       
  1151 					}
       
  1152 					
       
  1153 					if(i==n-1 && this.displayBtn)// this adds validation button
       
  1154 					{
       
  1155 						var btn = tf_CreateElm( this.fltTypeInp,['id',this.prfxValButton+i+'_'+this.id],
       
  1156 												['type','button'], ['value',this.btnText] );
       
  1157 						btn.className = this.btnCssClass;
       
  1158 						
       
  1159 						if( this.isExternalFlt && this.externalFltTgtIds && tf_Id(this.externalFltTgtIds[i]) ) 
       
  1160 						//filter is appended in desired element
       
  1161 							tf_Id( this.externalFltTgtIds[i] ).appendChild(btn);
       
  1162 						else
       
  1163 							fltcell.appendChild(btn);
       
  1164 						
       
  1165 						btn.onclick = this.Evt._OnBtnClick;				
       
  1166 					}//if
       
  1167 					
       
  1168 				}// for i
       
  1169 				
       
  1170 			} else {
       
  1171 				this.__resetGrid();			
       
  1172 			}//if isFirstLoad
       
  1173 		}//if this.fltGrid
       
  1174 		
       
  1175 		/* Filter behaviours */
       
  1176 		if(this.rowsCounter) this.SetRowsCounter();
       
  1177 		if(this.statusBar) this.SetStatusBar();
       
  1178 		if(this.fixedHeaders && !this.isFirstLoad) this.SetFixedHeaders();
       
  1179 		if(this.paging)	this.SetPaging();
       
  1180 		if(this.hasResultsPerPage && this.paging) this.SetResultsPerPage();
       
  1181 		if(this.btnReset) this.SetResetBtn();
       
  1182 		
       
  1183 		if(this.hasColWidth && !this.gridLayout) this.SetColWidths();
       
  1184 		
       
  1185 		if( this.alternateBgs && this.isStartBgAlternate )
       
  1186 			this.SetAlternateRows(); //1st time only if no paging and rememberGridValues
       
  1187 		
       
  1188 		if(this.hasColOperation && this.fltGrid)
       
  1189 		{
       
  1190 			this.colOperation = f.col_operation;
       
  1191 			this.SetColOperation();
       
  1192 		}
       
  1193 		
       
  1194 		if(this.sort) this.SetSort();
       
  1195 		
       
  1196 		/* Deprecated Loads external script */
       
  1197 		if(this.hasBindScript)
       
  1198 		{
       
  1199 			if(this.bindScript['src']!=undefined)
       
  1200 			{
       
  1201 				var scriptPath = this.bindScript['src'];
       
  1202 				var scriptName = (this.bindScript['name']!=undefined)
       
  1203 									? this.bindScript['name'] : '';
       
  1204 				this.IncludeFile(scriptName,scriptPath,this.bindScript['target_fn']);
       
  1205 			}
       
  1206 		}//if bindScript
       
  1207 		/* */
       
  1208 		
       
  1209 		this.isFirstLoad = false;
       
  1210 		this.hasGrid = true;
       
  1211 		
       
  1212 		if( this.rememberGridValues ||
       
  1213 			this.rememberPageLen ||
       
  1214 			this.rememberPageNb )
       
  1215 			this.ResetValues();
       
  1216 		
       
  1217 		this.ShowLoader('none');
       
  1218 		
       
  1219 		if(this.onFiltersLoaded)
       
  1220 			this.onFiltersLoaded.call(null,this);
       
  1221 
       
  1222 		/* Loads extensions */
       
  1223 		this.LoadExtensions();
       
  1224 		/* */
       
  1225 	},// AddGrid
       
  1226 	
       
  1227 	EvtManager: function( evt,s )
       
  1228 	/*====================================================
       
  1229 		- TF events manager
       
  1230 		- Params: 
       
  1231 			- event name (string)
       
  1232 			- config object (optional literal object)
       
  1233 	=====================================================*/
       
  1234 	{
       
  1235 		var o = this;
       
  1236 		var slcIndex = (s!=undefined && s.slcIndex!=undefined) ? s.slcIndex : null;
       
  1237 		var slcExternal = (s!=undefined && s.slcExternal!=undefined) ? s.slcExternal : false;
       
  1238 		var slcId = (s!=undefined && s.slcId!=undefined) ? s.slcId : null;
       
  1239 		var pgIndex = (s!=undefined && s.pgIndex!=undefined) ? s.pgIndex : null;
       
  1240 		function efx(){
       
  1241 			if(evt!=undefined)
       
  1242 			switch( evt )
       
  1243 			{
       
  1244 				case o.Evt.name.filter:
       
  1245 					(o.isModFilterFn) 
       
  1246 						? o.modFilterFn.call(null,o)
       
  1247 						: o._Filter();
       
  1248 				break;
       
  1249 				case o.Evt.name.populateselect:
       
  1250 					(o.refreshFilters) 
       
  1251 						? o._PopulateSelect(slcIndex,true) 
       
  1252 						: o._PopulateSelect(slcIndex,false,slcExternal,slcId);
       
  1253 				break;
       
  1254 				case o.Evt.name.populatechecklist:
       
  1255 					o._PopulateCheckList(slcIndex,slcExternal,slcId);
       
  1256 				break;
       
  1257 				case o.Evt.name.changepage:
       
  1258 					o._ChangePage(pgIndex);
       
  1259 				break;
       
  1260 				case o.Evt.name.clear:
       
  1261 					o._ClearFilters(); 
       
  1262 					o._Filter();
       
  1263 				break;
       
  1264 				case o.Evt.name.changeresultsperpage:
       
  1265 					o._ChangeResultsPerPage();
       
  1266 				break;
       
  1267 				case o.Evt.name.resetvalues:
       
  1268 					o._ResetValues();					
       
  1269 					o._Filter();
       
  1270 				break;
       
  1271 				case o.Evt.name.resetpage:
       
  1272 					o._ResetPage(o.pgNbCookie);
       
  1273 				break;
       
  1274 				case o.Evt.name.resetpagelength:
       
  1275 					o._ResetPageLength(o.pgLenCookie);
       
  1276 				break;
       
  1277 				case o.Evt.name.sort:
       
  1278 					void(0);
       
  1279 				break;
       
  1280 				case o.Evt.name.loadextensions:
       
  1281 					o._LoadExtensions();
       
  1282 				break;
       
  1283 				default: //to be used by extensions events when needed
       
  1284 					o['_'+evt].call(null,o,s);
       
  1285 				break;
       
  1286 			}
       
  1287 			o.StatusMsg('');
       
  1288 			o.ShowLoader('none');
       
  1289 		}
       
  1290 		
       
  1291 		if(this.loader || this.status || this.statusBar)
       
  1292 		{
       
  1293 			this.ShowLoader('');
       
  1294 			this.StatusMsg(o['msg'+evt]);
       
  1295 			window.setTimeout(efx,this.execDelay);
       
  1296 		} else efx();
       
  1297 	},
       
  1298 	
       
  1299 	LoadExtensions: function()
       
  1300 	{
       
  1301 		this.EvtManager(this.Evt.name.loadextensions);
       
  1302 	},
       
  1303 	
       
  1304 	_LoadExtensions: function()
       
  1305 	/*====================================================
       
  1306 		- loads TF extensions
       
  1307 	=====================================================*/
       
  1308 	{
       
  1309 		if(!this.hasExtensions) return;
       
  1310 		if((typeof this.extensions.name).tf_LCase() == 'object' && 
       
  1311 				(typeof this.extensions.src).tf_LCase() == 'object')
       
  1312 		{
       
  1313 			var ext = this.extensions;
       
  1314 			for(var e=0; e<ext.name.length; e++)
       
  1315 			{
       
  1316 				var extPath = ext.src[e];
       
  1317 				var extName = ext.name[e];
       
  1318 				var extInit = (ext.initialize && ext.initialize[e]) ? ext.initialize[e] : null;
       
  1319 				var extDesc = (ext.description && ext.description[e] ) ? ext.description[e] : null;
       
  1320 				
       
  1321 				//Registers extension 
       
  1322 				this.Ext.add(extName, extDesc, extPath, extInit);
       
  1323 				
       
  1324 				if(tf_isImported(extPath) && extInit)
       
  1325 				{
       
  1326 					try{ extInit.call(null,this); }
       
  1327 					catch(e){
       
  1328 						var o = this;
       
  1329 						function fn(){extInit.call(null,o);}
       
  1330 						if(!tf_isIE) tf_addEvent(window,'load',fn); 
       
  1331 						else{
       
  1332 							function testReady(){
       
  1333 								if (document.readyState == "complete") 
       
  1334 								{
       
  1335 									fn(); clearInterval(s);
       
  1336 								}
       
  1337 							}
       
  1338 							var s = setInterval(testReady,10);
       
  1339 						}		
       
  1340 					}
       
  1341 				}
       
  1342 				else
       
  1343 					this.IncludeFile(extName,extPath,extInit);
       
  1344 			}
       
  1345 		}
       
  1346 	},
       
  1347 	
       
  1348 	RemoveGrid: function()
       
  1349 	/*====================================================
       
  1350 		- removes a filter grid
       
  1351 	=====================================================*/
       
  1352 	{
       
  1353 		if( this.fltGrid && this.hasGrid )
       
  1354 		{
       
  1355 			var row = this.tbl.rows;
       
  1356 			
       
  1357 			this.RemovePaging();
       
  1358 			this.RemoveStatusBar();
       
  1359 			this.RemoveRowsCounter();
       
  1360 			this.RemoveResetBtn();
       
  1361 			this.RemoveResultsPerPage();
       
  1362 			this.RemoveExternalFlts();
       
  1363 			this.RemoveFixedHeaders();
       
  1364 			this.RemoveTopDiv();
       
  1365 			this.UnhighlightAll();
       
  1366 			this.RemoveSort();
       
  1367 			this.RemoveLoader();
       
  1368 			
       
  1369 			for(var j=this.refRow; j<this.nbRows; j++)
       
  1370 			{//this loop shows all rows and removes validRow attribute			
       
  1371 				row[j].style.display = '';
       
  1372 				try
       
  1373 				{ 
       
  1374 					if( row[j].hasAttribute('validRow') ) 
       
  1375 						row[j].removeAttribute('validRow');
       
  1376 				} //ie<=6 doesn't support hasAttribute method
       
  1377 				catch(e){
       
  1378 					for( var x = 0; x < row[j].attributes.length; x++ ) 
       
  1379 					{
       
  1380 						if( row[j].attributes[x].nodeName.tf_LCase()=='validrow' ) 
       
  1381 							row[j].removeAttribute('validRow');
       
  1382 					}//for x
       
  1383 				}//catch(e)
       
  1384 				
       
  1385 				//removes alterning colors
       
  1386 				this.RemoveRowBg(j);
       
  1387 				
       
  1388 			}//for j
       
  1389 	
       
  1390 			if(this.fltGrid && !this.gridLayout)
       
  1391 			{
       
  1392 				this.fltGridEl = row[this.filtersRowIndex];			
       
  1393 				this.tbl.deleteRow(this.filtersRowIndex);
       
  1394 			}
       
  1395 			this.activeFlt = null;
       
  1396 			this.isStartBgAlternate = true;
       
  1397 			this.hasGrid = false;
       
  1398 			this.RemoveGridLayout();
       
  1399 	
       
  1400 		}//if this.fltGrid
       
  1401 	},
       
  1402 	
       
  1403 	SetGridLayout: function()
       
  1404 	/*====================================================
       
  1405 		- generates a grid with fixed headers
       
  1406 	=====================================================*/
       
  1407 	{
       
  1408 		if(!this.gridLayout) return;
       
  1409 		if(!this.hasColWidth){// in case column widths are not set default width 100px
       
  1410 			this.colWidth = [];
       
  1411 			for(var k=0; k<this.nbCells; k++){
       
  1412 				var colW, cell = this.tbl.rows[this.gridHeadRowIndex].cells[k];
       
  1413 				if(cell.width!='') colW = cell.width;
       
  1414 				else if(cell.style.width!='') colW = parseInt(cell.style.width);
       
  1415 				else colW = this.gridDefaultColWidth;
       
  1416 				this.colWidth[k] = colW;
       
  1417 			}
       
  1418 			this.hasColWidth = true;
       
  1419 		}
       
  1420 		this.SetColWidths(this.gridHeadRowIndex);
       
  1421 		
       
  1422 		var tblW;//initial table width
       
  1423 		if(this.tbl.width!='') tblW = this.tbl.width;
       
  1424 		else if(this.tbl.style.width!='') tblW = parseInt(this.tbl.style.width);
       
  1425 		else tblW = this.tbl.clientWidth;
       
  1426 		
       
  1427 		//Main container: it will contain all the elements
       
  1428 		this.tblMainCont = tf_CreateElm('div',['id', this.prfxMainTblCont + this.id]);
       
  1429 		this.tblMainCont.className = this.gridMainContCssClass;
       
  1430 		if(this.gridWidth) this.tblMainCont.style.width = this.gridWidth;
       
  1431 		this.tbl.parentNode.insertBefore(this.tblMainCont, this.tbl);
       
  1432 		
       
  1433 		//Table container: div wrapping content table
       
  1434 		this.tblCont = tf_CreateElm('div',['id', this.prfxTblCont + this.id]);
       
  1435 		this.tblCont.className = this.gridContCssClass;
       
  1436 		if(this.gridWidth) this.tblCont.style.width = this.gridWidth;
       
  1437 		if(this.gridHeight) this.tblCont.style.height = this.gridHeight;
       
  1438 		this.tbl.parentNode.insertBefore(this.tblCont, this.tbl);
       
  1439 		var t = this.tbl.parentNode.removeChild(this.tbl);
       
  1440 		this.tblCont.appendChild(t);
       
  1441 		
       
  1442 		//In case table width is expressed in %
       
  1443 		if(this.tbl.style.width == '')
       
  1444 			this.tbl.style.width = (this.__containsStr('%',tblW) 
       
  1445 									? this.tbl.clientWidth : tblW) + 'px';
       
  1446 
       
  1447 		var d = this.tblCont.parentNode.removeChild(this.tblCont);
       
  1448 		this.tblMainCont.appendChild(d);
       
  1449 		
       
  1450 		//Headers table container: div wrapping headers table
       
  1451 		this.headTblCont = tf_CreateElm('div',['id', this.prfxHeadTblCont + this.id]);
       
  1452 		this.headTblCont.className = this.gridHeadContCssClass;
       
  1453 		if(this.gridWidth) this.headTblCont.style.width = this.gridWidth;		
       
  1454 		
       
  1455 		//Headers table
       
  1456 		this.headTbl = tf_CreateElm('table',['id', this.prfxHeadTbl + this.id]);
       
  1457 		var tH = tf_CreateElm('tHead'); //IE<7 needs it
       
  1458 		
       
  1459 		//1st row should be headers row, ids are added if not set
       
  1460 		//Those ids are used by the sort feature
       
  1461 		var hRow = this.tbl.rows[this.gridHeadRowIndex];
       
  1462 		var sortTriggers = [];
       
  1463 		for(var n=0; n<this.nbCells; n++){
       
  1464 			var cell = hRow.cells[n];
       
  1465 			var thId = cell.getAttribute('id');
       
  1466 			if(!thId || thId==''){ 
       
  1467 				thId = this.prfxGridTh+n+'_'+this.id 
       
  1468 				cell.setAttribute('id', thId);
       
  1469 			}
       
  1470 			sortTriggers.push(thId);
       
  1471 		}
       
  1472 		
       
  1473 		//Filters row is created
       
  1474 		var filtersRow = tf_CreateElm('tr');
       
  1475 		if(this.gridEnableFilters && this.fltGrid){
       
  1476 			this.externalFltTgtIds = [];
       
  1477 			for(var j=0; j<this.nbCells; j++)
       
  1478 			{
       
  1479 				var fltTdId = this.prfxFlt+j+ this.prfxGridFltTd +this.id;
       
  1480 				var c = tf_CreateElm(this.fltCellTag, ['id', fltTdId]);
       
  1481 				filtersRow.appendChild(c);
       
  1482 				this.externalFltTgtIds[j] = fltTdId;
       
  1483 			}
       
  1484 		} 
       
  1485 		//Headers row are moved from content table to headers table
       
  1486 		for(var i=0; i<this.gridHeadRows.length; i++)
       
  1487 		{
       
  1488 			var headRow = this.tbl.rows[this.gridHeadRows[0]];			
       
  1489 			tH.appendChild(headRow);
       
  1490 		}
       
  1491 		this.headTbl.appendChild(tH);
       
  1492 		if(this.filtersRowIndex == 0) tH.insertBefore(filtersRow,hRow);
       
  1493 		if(this.filtersRowIndex == 1) tH.appendChild(filtersRow);
       
  1494 		
       
  1495 		this.headTblCont.appendChild(this.headTbl);
       
  1496 		this.tblCont.parentNode.insertBefore(this.headTblCont, this.tblCont);
       
  1497 		
       
  1498 		//THead needs to be removed in content table for sort feature
       
  1499 		var thead = tf_Tag(this.tbl,'thead');
       
  1500 		if( thead.length>0 ) this.tbl.removeChild(thead[0]);
       
  1501 
       
  1502 		//Headers table style
       
  1503 		this.headTbl.style.width = this.tbl.style.width;
       
  1504 		this.headTbl.style.tableLayout = 'fixed';
       
  1505 		this.tbl.style.tableLayout = 'fixed';
       
  1506 		this.headTbl.cellPadding = this.tbl.cellPadding;
       
  1507 		this.headTbl.cellSpacing = this.tbl.cellSpacing;
       
  1508 		
       
  1509 		//Headers container width
       
  1510 		this.headTblCont.style.width = this.tblCont.clientWidth+'px';
       
  1511 		
       
  1512 		//content table without headers needs col widths to be reset
       
  1513 		this.SetColWidths();
       
  1514 		
       
  1515 		this.tbl.style.width = '';		
       
  1516 		if(tf_isIE || tf_isIE7)	this.headTbl.style.width = '';
       
  1517 		
       
  1518 		//scroll synchronisation
       
  1519 		var o = this; //TF object
       
  1520 		this.tblCont.onscroll = function(){
       
  1521 			o.headTblCont.scrollLeft = this.scrollLeft;
       
  1522 			var _o = this; //this = scroll element
       
  1523 			//New pointerX calc taking into account scrollLeft
       
  1524 			if(!o.isPointerXOverwritten){
       
  1525 				try{					
       
  1526 					TF.Evt.pointerX = function(e)
       
  1527 					{
       
  1528 						e = e || window.event;
       
  1529 						var scrollLeft = tf_StandardBody().scrollLeft + _o.scrollLeft;
       
  1530 						return (e.pageX + _o.scrollLeft) || (e.clientX + scrollLeft);
       
  1531 					}					
       
  1532 					o.isPointerXOverwritten = true;
       
  1533 				} catch(ee) {
       
  1534 					o.isPointerXOverwritten = false;
       
  1535 				}
       
  1536 			}
       
  1537 		}
       
  1538 
       
  1539 		/*** Default behaviours activation ***/
       
  1540 		var f = this.fObj==undefined ? {} : this.fObj;
       
  1541 		
       
  1542 		//Sort is enabled if not specified in config object
       
  1543 		if(f.sort != false){
       
  1544 			this.sort = true;
       
  1545 			this.sortConfig.asyncSort = true;
       
  1546 			this.sortConfig.triggerIds = sortTriggers;
       
  1547 		}
       
  1548 		
       
  1549 		if(this.gridEnableColResizer){
       
  1550 			if(!this.hasExtensions){
       
  1551 				this.extensions = {
       
  1552 					name:['ColumnsResizer'],
       
  1553 					src:['TFExt_ColsResizer/TFExt_ColsResizer.js'], 
       
  1554 					description:['Columns Resizing'],
       
  1555 					initialize:[function(o){o.SetColsResizer('ColumnsResizer');}]
       
  1556 				}
       
  1557 				this.hasExtensions = true;
       
  1558 			} else {
       
  1559 				if(!this.__containsStr('colsresizer',this.extensions.src.toString().tf_LCase())){
       
  1560 					this.extensions.name.push('ColumnsResizer');
       
  1561 					this.extensions.src.push('TFExt_ColsResizer/TFExt_ColsResizer.js');
       
  1562 					this.extensions.description.push('Columns Resizing');
       
  1563 					this.extensions.initialize.push(function(o){o.SetColsResizer('ColumnsResizer');});
       
  1564 				}  
       
  1565 			}
       
  1566 		}
       
  1567 		
       
  1568 		//Default columns resizer properties for grid layout
       
  1569 		f.col_resizer_cols_headers_table = this.headTbl.getAttribute('id');
       
  1570 		f.col_resizer_cols_headers_index = this.gridHeadRowIndex;
       
  1571 		f.col_resizer_width_adjustment = 0;
       
  1572 		f.col_enable_text_ellipsis = false;
       
  1573 		
       
  1574 		//Cols generation for all browsers excepted IE<=7
       
  1575 		o.tblHasColTag = (tf_Tag(o.tbl,'col').length > 0) ? true : false;
       
  1576 		if(!tf_isIE && !tf_isIE7){
       
  1577 			//Col elements are enough to keep column widths after sorting and filtering
       
  1578 			function createColTags(o)
       
  1579 			{
       
  1580 				if(!o) return;
       
  1581 				for(var k=(o.nbCells-1); k>=0; k--)
       
  1582 				{
       
  1583 					var col = tf_CreateElm( 'col', ['id', o.id+'_col_'+k]);
       
  1584 					o.tbl.firstChild.parentNode.insertBefore(col,o.tbl.firstChild);
       
  1585 					col.style.width = o.colWidth[k];
       
  1586 					o.gridColElms[k] = col;
       
  1587 				}
       
  1588 				o.tblHasColTag = true;
       
  1589 			}
       
  1590 			if(!o.tblHasColTag) createColTags(o);
       
  1591 			else{
       
  1592 				var cols = tf_Tag(o.tbl,'col');
       
  1593 				for(var i=0; i<o.nbCells; i++){
       
  1594 					cols[i].setAttribute('id', o.id+'_col_'+i);
       
  1595 					cols[i].style.width = o.colWidth[i];
       
  1596 					o.gridColElms.push(cols[i]);
       
  1597 				}
       
  1598 			}
       
  1599 		}
       
  1600 		
       
  1601 		//IE <= 7 needs an additional row for widths as col element width is not enough...
       
  1602 		if(tf_isIE || tf_isIE7){
       
  1603 			var tbody = tf_Tag(o.tbl,'tbody'), r;
       
  1604 			if( tbody.length>0 ) r = tbody[0].insertRow(0);
       
  1605 			else r = o.tbl.insertRow(0);
       
  1606 			r.style.height = '0px';
       
  1607 			for(var i=0; i<o.nbCells; i++){
       
  1608 				var col = tf_CreateElm('td', ['id', o.id+'_col_'+i]);
       
  1609 				col.style.width = o.colWidth[i];
       
  1610 				o.tbl.rows[1].cells[i].style.width = '';
       
  1611 				r.appendChild(col);
       
  1612 				o.gridColElms.push(col);
       
  1613 			}
       
  1614 			this.hasGridWidthsRow = true;
       
  1615 			//Data table row with widths expressed
       
  1616 			o.leadColWidthsRow = o.tbl.rows[0];
       
  1617 			o.leadColWidthsRow.setAttribute('validRow','false');
       
  1618 			
       
  1619 			var beforeSortFn = tf_isFn(f.on_before_sort) ? f.on_before_sort : null;
       
  1620 			f.on_before_sort = function(o,colIndex){
       
  1621 				o.leadColWidthsRow.setAttribute('validRow','false');
       
  1622 				if(beforeSortFn!=null) beforeSortFn.call(null,o,colIndex);
       
  1623 			} 
       
  1624 			
       
  1625 			var afterSortFn = tf_isFn(f.on_after_sort) ? f.on_after_sort : null;
       
  1626 			f.on_after_sort = function(o,colIndex){
       
  1627 				if(o.leadColWidthsRow.rowIndex != 0){
       
  1628 					var r = o.leadColWidthsRow;
       
  1629 					if( tbody.length>0 )
       
  1630 						tbody[0].moveRow(o.leadColWidthsRow.rowIndex, 0);
       
  1631 					else o.tbl.moveRow(o.leadColWidthsRow.rowIndex, 0);
       
  1632 				}
       
  1633 				if(afterSortFn!=null) afterSortFn.call(null,o,colIndex);
       
  1634 			}	
       
  1635 		}
       
  1636 		
       
  1637 		var afterColResizedFn = tf_isFn(f.on_after_col_resized) ? f.on_after_col_resized : null;
       
  1638 		f.on_after_col_resized = function(o,colIndex){
       
  1639 			if(colIndex==undefined) return;
       
  1640 			var w = o.crWColsRow.cells[colIndex].style.width;
       
  1641 			var col = o.gridColElms[colIndex];
       
  1642 			col.style.width = w;
       
  1643 			
       
  1644 			var thCW = o.crWColsRow.cells[colIndex].clientWidth;
       
  1645 			var tdCW = o.crWRowDataTbl.cells[colIndex].clientWidth;
       
  1646 			
       
  1647 			if(tf_isIE || tf_isIE7)
       
  1648 				o.tbl.style.width = o.headTbl.clientWidth+'px';
       
  1649 			
       
  1650 			if(thCW != tdCW && !tf_isIE && !tf_isIE7)
       
  1651 				o.headTbl.style.width = o.tbl.clientWidth+'px'; 
       
  1652 			
       
  1653 			if(afterColResizedFn!=null) afterColResizedFn.call(null,o,colIndex);			
       
  1654 		}	
       
  1655 		
       
  1656 		if(this.tbl.clientWidth != this.headTbl.clientWidth)
       
  1657 			this.tbl.style.width = this.headTbl.clientWidth+'px';
       
  1658 	},
       
  1659 	
       
  1660 	RemoveGridLayout: function()
       
  1661 	{
       
  1662 		if(!this.gridLayout) return;		
       
  1663 		var t = this.tbl.parentNode.removeChild(this.tbl);
       
  1664 		this.tblMainCont.parentNode.insertBefore(t, this.tblMainCont);
       
  1665 		this.tblMainCont.parentNode.removeChild( this.tblMainCont );
       
  1666 		this.tblMainCont = null;
       
  1667 		this.headTblCont = null;
       
  1668 		this.headTbl = null;
       
  1669 		this.tblCont = null;
       
  1670 		//TO DO: alternative solution for Firefox
       
  1671 		this.tbl.outerHTML = this.sourceTblHtml;
       
  1672 		this.tbl = tf_Id(this.id);
       
  1673 		this.isFirstLoad = true;
       
  1674 		this.activeFlt = null;
       
  1675 		this.isStartBgAlternate = true;
       
  1676 		this.hasGrid = false;
       
  1677 	},
       
  1678 	
       
  1679 	SetTopDiv: function()
       
  1680 	/*====================================================
       
  1681 		- Generates div above table where paging,
       
  1682 		reset button, rows counter label etc. are placed
       
  1683 	=====================================================*/
       
  1684 	{
       
  1685 		if( this.infDiv!=null ) return;
       
  1686 	
       
  1687 		/*** container div ***/
       
  1688 		var infdiv = tf_CreateElm( 'div',['id',this.prfxInfDiv+this.id] );
       
  1689 		infdiv.className = this.infDivCssClass;// setAttribute method doesn't seem to work on ie<=6
       
  1690 		if(this.fixedHeaders && this.contDiv)
       
  1691 			this.contDiv.parentNode.insertBefore(infdiv, this.contDiv);
       
  1692 		else if(this.gridLayout){
       
  1693 			this.tblMainCont.appendChild(infdiv);
       
  1694 			infdiv.className = this.gridInfDivCssClass;
       
  1695 		}
       
  1696 		else
       
  1697 			this.tbl.parentNode.insertBefore(infdiv, this.tbl);
       
  1698 		this.infDiv = tf_Id( this.prfxInfDiv+this.id );
       
  1699 		
       
  1700 		/*** left div containing rows # displayer ***/
       
  1701 		var ldiv = tf_CreateElm( 'div',['id',this.prfxLDiv+this.id] );
       
  1702 		ldiv.className = this.lDivCssClass;/*'ldiv'*/;
       
  1703 		infdiv.appendChild(ldiv);
       
  1704 		this.lDiv = tf_Id( this.prfxLDiv+this.id );		
       
  1705 		
       
  1706 		/*** 	right div containing reset button 
       
  1707 				+ nb results per page select 	***/	
       
  1708 		var rdiv = tf_CreateElm( 'div',['id',this.prfxRDiv+this.id] );
       
  1709 		rdiv.className = this.rDivCssClass/*'rdiv'*/;
       
  1710 		infdiv.appendChild(rdiv);
       
  1711 		this.rDiv = tf_Id( this.prfxRDiv+this.id );
       
  1712 		
       
  1713 		/*** mid div containing paging elements ***/
       
  1714 		var mdiv = tf_CreateElm( 'div',['id',this.prfxMDiv+this.id] );
       
  1715 		mdiv.className = this.mDivCssClass/*'mdiv'*/;						
       
  1716 		infdiv.appendChild(mdiv);
       
  1717 		this.mDiv = tf_Id( this.prfxMDiv+this.id );
       
  1718 	},
       
  1719 	
       
  1720 	RemoveTopDiv: function()
       
  1721 	/*====================================================
       
  1722 		- Removes div above table where paging,
       
  1723 		reset button, rows counter label etc. are placed
       
  1724 	=====================================================*/
       
  1725 	{
       
  1726 		if( this.infDiv==null ) return;
       
  1727 		this.infDiv.parentNode.removeChild( this.infDiv );
       
  1728 		this.infDiv = null;
       
  1729 	},
       
  1730 	
       
  1731 	SetFixedHeaders: function()
       
  1732 	/*====================================================
       
  1733 		- CSS solution making headers fixed
       
  1734 	=====================================================*/
       
  1735 	{
       
  1736 		if((!this.hasGrid && !this.isFirstLoad) || !this.fixedHeaders) return;
       
  1737 		if(this.contDiv) return;	
       
  1738 		var thead = tf_Tag(this.tbl,'thead');
       
  1739 		if( thead.length==0 ) return;
       
  1740 		var tbody = tf_Tag(this.tbl,'tbody');	
       
  1741 		if( tbody[0].clientHeight!=0 ) 
       
  1742 		{//firefox returns tbody height
       
  1743 			//previous values
       
  1744 			this.prevTBodyH = tbody[0].clientHeight;
       
  1745 			this.prevTBodyOverflow = tbody[0].style.overflow;
       
  1746 			this.prevTBodyOverflowX = tbody[0].style.overflowX;
       
  1747 			
       
  1748 			tbody[0].style.height = this.tBodyH+'px';
       
  1749 			tbody[0].style.overflow = 'auto';
       
  1750 			tbody[0].style.overflowX = 'hidden';
       
  1751 		} else { //IE returns 0
       
  1752 			// cont div is added to emulate fixed headers behaviour
       
  1753 			var contDiv = tf_CreateElm( 'div',['id',this.prfxContentDiv+this.id] );
       
  1754 			contDiv.className = this.contDivCssClass;
       
  1755 			this.tbl.parentNode.insertBefore(contDiv, this.tbl);
       
  1756 			contDiv.appendChild(this.tbl);
       
  1757 			this.contDiv = tf_Id(this.prfxContentDiv+this.id);
       
  1758 			//prevents headers moving during window scroll (IE)
       
  1759 			this.contDiv.style.position = 'relative';
       
  1760 			
       
  1761 			var theadH = 0;
       
  1762 			var theadTr = tf_Tag(thead[0],'tr');	
       
  1763 			for(var i=0; i<theadTr.length; i++)
       
  1764 			{//css below emulates fixed headers on IE<=6
       
  1765 				theadTr[i].style.cssText += 'position:relative; ' +
       
  1766 											'top:expression(offsetParent.scrollTop);';
       
  1767 				theadH += parseInt(theadTr[i].clientHeight);
       
  1768 			}
       
  1769 			
       
  1770 			this.contDiv.style.height = (this.tBodyH+theadH)+'px';
       
  1771 			
       
  1772 			var tfoot = tf_Tag(this.tbl,'tfoot');
       
  1773 			if( tfoot.length==0 ) return;
       
  1774 			
       
  1775 			var tfootTr = tf_Tag(tfoot[0],'tr');
       
  1776 				
       
  1777 			for(var j=0; j<tfootTr.length; j++)//css below emulates fixed footer on IE<=6
       
  1778 				tfootTr[j].style.cssText += 'position:relative; overflow-x: hidden; ' +
       
  1779 											'top: expression(parentNode.parentNode.offsetHeight >= ' +
       
  1780 											'offsetParent.offsetHeight ? 0 - parentNode.parentNode.offsetHeight + '+ 
       
  1781 											'offsetParent.offsetHeight + offsetParent.scrollTop : 0);';		
       
  1782 		}	
       
  1783 	},
       
  1784 	
       
  1785 	RemoveFixedHeaders: function()
       
  1786 	/*====================================================
       
  1787 		- Removes fixed headers
       
  1788 	=====================================================*/
       
  1789 	{
       
  1790 		if(!this.hasGrid || !this.fixedHeaders ) return;
       
  1791 		if( this.contDiv )//IE additional div
       
  1792 		{
       
  1793 			this.contDiv.parentNode.insertBefore(this.tbl, this.contDiv);
       
  1794 			this.contDiv.parentNode.removeChild( this.contDiv );
       
  1795 			this.contDiv = null;
       
  1796 			var thead = tf_Tag(this.tbl,'thead');
       
  1797 			if( thead.length==0 ) return;
       
  1798 			var theadTr = tf_Tag(thead[0],'tr');
       
  1799 			if( theadTr.length==0 ) return;
       
  1800 			for(var i=0; i<theadTr.length; i++)
       
  1801 				theadTr[i].style.cssText = '';
       
  1802 			var tfoot = tf_Tag(this.tbl,'tfoot');
       
  1803 			if( tfoot.length==0 ) return;		
       
  1804 			var tfootTr = tf_Tag(tfoot[0],'tr');	
       
  1805 			for(var j=0; j<tfootTr.length; j++)
       
  1806 			{
       
  1807 				tfootTr[j].style.position = 'relative';
       
  1808 				tfootTr[j].style.top = '';
       
  1809 				tfootTr[j].style.overeflowX = '';
       
  1810 			}
       
  1811 		} else {
       
  1812 			var tbody = tf_Tag(this.tbl,'tbody');
       
  1813 			if( tbody.length==0 ) return;
       
  1814 			tbody[0].style.height = this.prevTBodyH+'px';
       
  1815 			tbody[0].style.overflow = this.prevTBodyOverflow;
       
  1816 			tbody[0].style.overflowX = this.prevTBodyOverflowX;
       
  1817 		}
       
  1818 	},
       
  1819 	
       
  1820 	SetPaging: function()
       
  1821 	/*====================================================
       
  1822 		- Generates paging elements:
       
  1823 			- pages drop-down list
       
  1824 			- previous, next, first, last buttons
       
  1825 	=====================================================*/
       
  1826 	{
       
  1827 		if(!this.hasGrid && !this.isFirstLoad) return;
       
  1828 		if(!this.paging || (!this.isPagingRemoved && !this.isFirstLoad)) return;
       
  1829 		var start_row = this.refRow;
       
  1830 		var nrows = this.nbRows;
       
  1831 		this.nbPages = Math.ceil( (nrows-start_row)/this.pagingLength );//calculates page nb
       
  1832 	
       
  1833 		// Paging drop-down list selector
       
  1834 		if(this.pageSelectorType == this.fltTypeSlc)
       
  1835 		{
       
  1836 			var slcPages = tf_CreateElm( this.fltTypeSlc, ['id',this.prfxSlcPages+this.id] );
       
  1837 			slcPages.className = this.pgSlcCssClass;
       
  1838 			slcPages.onchange = this.Evt._OnSlcPagesChange;
       
  1839 		}
       
  1840 		// Paging input selector
       
  1841 		if(this.pageSelectorType == this.fltTypeInp)
       
  1842 		{
       
  1843 			var slcPages = tf_CreateElm( 
       
  1844 				this.fltTypeInp, 
       
  1845 				['id',this.prfxSlcPages+this.id],
       
  1846 				['value',this.currentPageNb]
       
  1847 			);
       
  1848 			slcPages.className = this.pgInpCssClass;
       
  1849 			slcPages.onkeypress = this.Evt._Paging._detectKey;
       
  1850 		}
       
  1851 		
       
  1852 		var btnNextSpan, btnPrevSpan, btnLastSpan, btnFirstSpan;// btns containers
       
  1853 		btnNextSpan = tf_CreateElm('span',['id',this.prfxBtnNextSpan+this.id]);
       
  1854 		btnPrevSpan = tf_CreateElm('span',['id',this.prfxBtnPrevSpan+this.id]);
       
  1855 		btnLastSpan = tf_CreateElm('span',['id',this.prfxBtnLastSpan+this.id]);
       
  1856 		btnFirstSpan = tf_CreateElm('span',['id',this.prfxBtnFirstSpan+this.id]);
       
  1857 		
       
  1858 		if(this.hasPagingBtns)
       
  1859 		{
       
  1860 			if(this.btnNextPageHtml==null)
       
  1861 			{// Next button
       
  1862 				var btn_next = tf_CreateElm( this.fltTypeInp,['id',this.prfxBtnNext+this.id],
       
  1863 					['type','button'],['value',this.btnNextPageText],['title','Next'] );
       
  1864 				btn_next.className = this.btnPageCssClass;
       
  1865 				btn_next.onclick = this.Evt._Paging.next;
       
  1866 				btnNextSpan.appendChild(btn_next);
       
  1867 			} else {
       
  1868 				btnNextSpan.innerHTML = this.btnNextPageHtml;
       
  1869 				btnNextSpan.onclick = this.Evt._Paging.next;
       
  1870 			}
       
  1871 			
       
  1872 			if(this.btnPrevPageHtml==null)
       
  1873 			{// Previous button
       
  1874 				var btn_prev = tf_CreateElm( this.fltTypeInp,['id',this.prfxBtnPrev+this.id],
       
  1875 					['type','button'],['value',this.btnPrevPageText],['title','Previous'] );
       
  1876 				btn_prev.className = this.btnPageCssClass;
       
  1877 				btn_prev.onclick = this.Evt._Paging.prev;
       
  1878 				btnPrevSpan.appendChild(btn_prev);
       
  1879 			} else { 
       
  1880 				btnPrevSpan.innerHTML = this.btnPrevPageHtml;
       
  1881 				btnPrevSpan.onclick = this.Evt._Paging.prev;
       
  1882 			}
       
  1883 			
       
  1884 			if(this.btnLastPageHtml==null)
       
  1885 			{// Last button
       
  1886 				var btn_last = tf_CreateElm( this.fltTypeInp,['id',this.prfxBtnLast+this.id],
       
  1887 					['type','button'],['value',this.btnLastPageText],['title','Last'] );
       
  1888 				btn_last.className = this.btnPageCssClass;
       
  1889 				btn_last.onclick = this.Evt._Paging.last;
       
  1890 				btnLastSpan.appendChild(btn_last);
       
  1891 			} else { 
       
  1892 				btnLastSpan.innerHTML = this.btnLastPageHtml;
       
  1893 				btnLastSpan.onclick = this.Evt._Paging.last;
       
  1894 			}
       
  1895 			
       
  1896 			if(this.btnFirstPageHtml==null)
       
  1897 			{// First button
       
  1898 				var btn_first = tf_CreateElm( this.fltTypeInp,['id',this.prfxBtnFirst+this.id],
       
  1899 					['type','button'],['value',this.btnFirstPageText],['title','First'] );
       
  1900 				btn_first.className = this.btnPageCssClass;
       
  1901 				btn_first.onclick = this.Evt._Paging.first;
       
  1902 				btnFirstSpan.appendChild(btn_first);
       
  1903 			} else { 
       
  1904 				btnFirstSpan.innerHTML = this.btnFirstPageHtml;
       
  1905 				btnFirstSpan.onclick = this.Evt._Paging.first;
       
  1906 			}			
       
  1907 		}//if this.hasPagingBtns
       
  1908 		
       
  1909 		// paging elements (buttons+drop-down list) are added to defined element
       
  1910 		if(this.pagingTgtId==null) this.SetTopDiv();
       
  1911 		var targetEl = ( this.pagingTgtId==null ) ? this.mDiv : tf_Id( this.pagingTgtId );
       
  1912 		
       
  1913 		/***	if paging previously removed this prevents IE memory leak with removeChild 
       
  1914 				used in RemovePaging method. For more info refer to
       
  1915 				http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2840253&SiteID=1	***/
       
  1916 		if ( targetEl.innerHTML!='' ) targetEl.innerHTML = '';
       
  1917 		/*** ***/
       
  1918 		
       
  1919 		targetEl.appendChild(btnPrevSpan);
       
  1920 		targetEl.appendChild(btnFirstSpan);
       
  1921 		
       
  1922 		var pgBeforeSpan = tf_CreateElm( 'span',['id',this.prfxPgBeforeSpan+this.id] );
       
  1923 		pgBeforeSpan.appendChild( tf_CreateText(' Page ') );
       
  1924 		pgBeforeSpan.className = this.nbPgSpanCssClass;
       
  1925 		targetEl.appendChild(pgBeforeSpan);
       
  1926 		targetEl.appendChild(slcPages);
       
  1927 		var pgAfterSpan = tf_CreateElm( 'span',['id',this.prfxPgAfterSpan+this.id] );
       
  1928 		pgAfterSpan.appendChild( tf_CreateText(' of ') );
       
  1929 		pgAfterSpan.className = this.nbPgSpanCssClass;
       
  1930 		targetEl.appendChild(pgAfterSpan)
       
  1931 		var pgspan = tf_CreateElm( 'span',['id',this.prfxPgSpan+this.id] );
       
  1932 		pgspan.className = this.nbPgSpanCssClass;
       
  1933 		pgspan.appendChild( tf_CreateText(' '+this.nbPages+' ') );
       
  1934 		targetEl.appendChild(pgspan);
       
  1935 		targetEl.appendChild(btnLastSpan);
       
  1936 		targetEl.appendChild(btnNextSpan);
       
  1937 	
       
  1938 		this.pagingSlc = tf_Id(this.prfxSlcPages+this.id); //to be easily re-used
       
  1939 		
       
  1940 		// if this.rememberGridValues==true this.SetPagingInfo() is called
       
  1941 		// in ResetGridValues() method
       
  1942 		if( !this.rememberGridValues || this.isPagingRemoved )
       
  1943 			this.SetPagingInfo();
       
  1944 		if( !this.fltGrid )
       
  1945 		{
       
  1946 			this.ValidateAllRows();
       
  1947 			this.SetPagingInfo(this.validRowsIndex);
       
  1948 		}
       
  1949 			
       
  1950 		this.pagingBtnEvents = this.Evt._Paging;
       
  1951 		this.isPagingRemoved = false;
       
  1952 	},
       
  1953 	
       
  1954 	RemovePaging: function()
       
  1955 	/*====================================================
       
  1956 		- Removes paging elements
       
  1957 	=====================================================*/
       
  1958 	{
       
  1959 		if(!this.hasGrid) return;
       
  1960 		if( this.pagingSlc==null ) return;
       
  1961 		var btnNextSpan, btnPrevSpan, btnLastSpan, btnFirstSpan;// btns containers
       
  1962 		var pgBeforeSpan, pgAfterSpan, pgspan;
       
  1963 		btnNextSpan = tf_Id(this.prfxBtnNextSpan+this.id);
       
  1964 		btnPrevSpan = tf_Id(this.prfxBtnPrevSpan+this.id);
       
  1965 		btnLastSpan = tf_Id(this.prfxBtnLastSpan+this.id);
       
  1966 		btnFirstSpan = tf_Id(this.prfxBtnFirstSpan+this.id);
       
  1967 		pgBeforeSpan = tf_Id(this.prfxPgBeforeSpan+this.id);//span containing 'Page' text
       
  1968 		pgAfterSpan = tf_Id(this.prfxPgAfterSpan+this.id);//span containing 'of' text
       
  1969 		pgspan = tf_Id(this.prfxPgSpan+this.id);//span containing nb of pages
       
  1970 		
       
  1971 		this.pagingSlc.parentNode.removeChild(this.pagingSlc);
       
  1972 		
       
  1973 		if( btnNextSpan!=null )
       
  1974 			btnNextSpan.parentNode.removeChild( btnNextSpan );
       
  1975 	
       
  1976 		if( btnPrevSpan!=null )
       
  1977 			btnPrevSpan.parentNode.removeChild( btnPrevSpan );
       
  1978 	
       
  1979 		if( btnLastSpan!=null )
       
  1980 			btnLastSpan.parentNode.removeChild( btnLastSpan );
       
  1981 	
       
  1982 		if( btnFirstSpan!=null )
       
  1983 			btnFirstSpan.parentNode.removeChild( btnFirstSpan );
       
  1984 	
       
  1985 		if( pgBeforeSpan!=null )
       
  1986 			pgBeforeSpan.parentNode.removeChild( pgBeforeSpan );
       
  1987 	
       
  1988 		if( pgAfterSpan!=null )
       
  1989 			pgAfterSpan.parentNode.removeChild( pgAfterSpan );
       
  1990 	
       
  1991 		if( pgspan!=null )
       
  1992 			pgspan.parentNode.removeChild( pgspan );
       
  1993 		
       
  1994 		this.pagingBtnEvents = null;	
       
  1995 		this.pagingSlc = null;
       
  1996 		this.isPagingRemoved = true;
       
  1997 	},
       
  1998 	
       
  1999 	SetRowsCounter: function()
       
  2000 	/*====================================================
       
  2001 		- Generates rows counter label
       
  2002 	=====================================================*/
       
  2003 	{
       
  2004 		if(!this.hasGrid && !this.isFirstLoad) return;
       
  2005 		if( this.rowsCounterSpan!=null ) return;
       
  2006 		var countDiv = tf_CreateElm( 'div',['id',this.prfxCounter+this.id] ); //rows counter container
       
  2007 		countDiv.className = this.totRowsCssClass;
       
  2008 		var countSpan = tf_CreateElm( 'span',['id',this.prfxTotRows+this.id] ); //rows counter label
       
  2009 		var countText = tf_CreateElm( 'span',['id',this.prfxTotRowsTxt+this.id] );
       
  2010 		countText.appendChild( tf_CreateText(this.rowsCounterText) );
       
  2011 		
       
  2012 		// counter is added to defined element
       
  2013 		if(this.rowsCounterTgtId==null) this.SetTopDiv();
       
  2014 		var targetEl = ( this.rowsCounterTgtId==null ) ? this.lDiv : tf_Id( this.rowsCounterTgtId );
       
  2015 		
       
  2016 		//IE only: clears all for sure
       
  2017 		if(this.rowsCounterDiv && tf_isIE)
       
  2018 			this.rowsCounterDiv.outerHTML = '';
       
  2019 		
       
  2020 		if( this.rowsCounterTgtId==null )
       
  2021 		{//default container: 'lDiv'
       
  2022 			countDiv.appendChild(countText);
       
  2023 			countDiv.appendChild(countSpan);
       
  2024 			targetEl.appendChild(countDiv);
       
  2025 		}
       
  2026 		else
       
  2027 		{// custom container, no need to append statusDiv
       
  2028 			targetEl.appendChild(countText);
       
  2029 			targetEl.appendChild(countSpan);
       
  2030 		}
       
  2031 		this.rowsCounterDiv = tf_Id( this.prfxCounter+this.id );
       
  2032 		this.rowsCounterSpan = tf_Id( this.prfxTotRows+this.id );
       
  2033 		
       
  2034 		this.RefreshNbRows();	
       
  2035 	},
       
  2036 	
       
  2037 	RemoveRowsCounter: function()
       
  2038 	/*====================================================
       
  2039 		- Removes rows counter label
       
  2040 	=====================================================*/
       
  2041 	{
       
  2042 		if(!this.hasGrid) return;
       
  2043 		if( this.rowsCounterSpan==null ) return;
       
  2044 		
       
  2045 		if(this.rowsCounterTgtId==null && this.rowsCounterDiv)
       
  2046 		{
       
  2047 			//IE only: clears all for sure
       
  2048 			if(tf_isIE) this.rowsCounterDiv.outerHTML = '';
       
  2049 			else
       
  2050 				this.rowsCounterDiv.parentNode.removeChild( 
       
  2051 					this.rowsCounterDiv
       
  2052 				);
       
  2053 		} else {
       
  2054 			tf_Id( this.rowsCounterTgtId ).innerHTML = '';
       
  2055 		}
       
  2056 		this.rowsCounterSpan = null;
       
  2057 		this.rowsCounterDiv = null;
       
  2058 	},
       
  2059 	
       
  2060 	SetStatusBar: function()
       
  2061 	/*====================================================
       
  2062 		- Generates status bar label
       
  2063 	=====================================================*/
       
  2064 	{
       
  2065 		if(!this.hasGrid && !this.isFirstLoad) return;
       
  2066 		var statusDiv = tf_CreateElm( 'div',['id',this.prfxStatus+this.id] ); //status bar container
       
  2067 		statusDiv.className = this.statusBarCssClass;
       
  2068 		var statusSpan = tf_CreateElm( 'span',['id',this.prfxStatusSpan+this.id] ); //status bar label
       
  2069 		var statusSpanText = tf_CreateElm( 'span',['id',this.prfxStatusTxt+this.id] );//preceding text
       
  2070 		statusSpanText.appendChild( tf_CreateText(this.statusBarText) );
       
  2071 	
       
  2072 		// target element container
       
  2073 		if(this.statusBarTgtId==null) this.SetTopDiv();
       
  2074 		var targetEl = ( this.statusBarTgtId==null ) ? this.lDiv : tf_Id( this.statusBarTgtId );
       
  2075 		
       
  2076 		if(this.statusBarDiv && tf_isIE)
       
  2077 			this.statusBarDiv.outerHTML = '';
       
  2078 		
       
  2079 		if( this.statusBarTgtId==null )
       
  2080 		{//default container: 'lDiv'
       
  2081 			statusDiv.appendChild(statusSpanText);
       
  2082 			statusDiv.appendChild(statusSpan);
       
  2083 			targetEl.appendChild(statusDiv);
       
  2084 		}
       
  2085 		else
       
  2086 		{// custom container, no need to append statusDiv
       
  2087 			targetEl.appendChild(statusSpanText);
       
  2088 			targetEl.appendChild(statusSpan);
       
  2089 		}
       
  2090 
       
  2091 		this.statusBarDiv = tf_Id( this.prfxStatus+this.id );
       
  2092 		this.statusBarSpan = tf_Id( this.prfxStatusSpan+this.id );
       
  2093 		this.statusBarSpanText = tf_Id( this.prfxStatusTxt+this.id );
       
  2094 	},
       
  2095 	
       
  2096 	RemoveStatusBar: function()
       
  2097 	/*====================================================
       
  2098 		- Removes status bar div
       
  2099 	=====================================================*/
       
  2100 	{
       
  2101 		if(!this.hasGrid) return;
       
  2102 		if(this.statusBarDiv)
       
  2103 		{
       
  2104 			this.statusBarDiv.innerHTML = '';
       
  2105 			this.statusBarDiv.parentNode.removeChild( 
       
  2106 				this.statusBarDiv
       
  2107 			);
       
  2108 			this.statusBarSpan = null;
       
  2109 			this.statusBarSpanText = null;
       
  2110 			this.statusBarDiv = null;
       
  2111 		}
       
  2112 	},
       
  2113 	
       
  2114 	SetResultsPerPage: function()
       
  2115 	/*====================================================
       
  2116 		- Generates results per page select + label
       
  2117 	=====================================================*/
       
  2118 	{
       
  2119 		if(!this.hasGrid && !this.isFirstLoad) return;
       
  2120 		if( this.resultsPerPageSlc!=null || this.resultsPerPage==null ) return;
       
  2121 		var slcR = tf_CreateElm( this.fltTypeSlc,['id',this.prfxSlcResults+this.id] );
       
  2122 		slcR.className = this.resultsSlcCssClass;
       
  2123 		var slcRText = this.resultsPerPage[0], slcROpts = this.resultsPerPage[1];
       
  2124 		var slcRSpan = tf_CreateElm( 'span',['id',this.prfxSlcResultsTxt+this.id] );
       
  2125 		slcRSpan.className = this.resultsSpanCssClass;
       
  2126 		
       
  2127 		// results per page select is added to defined element
       
  2128 		if(this.resultsPerPageTgtId==null) this.SetTopDiv();
       
  2129 		var targetEl = ( this.resultsPerPageTgtId==null ) ? this.rDiv : tf_Id( this.resultsPerPageTgtId );
       
  2130 		slcRSpan.appendChild(tf_CreateText(slcRText));
       
  2131 		targetEl.appendChild(slcRSpan);
       
  2132 		targetEl.appendChild(slcR);
       
  2133 		
       
  2134 		this.resultsPerPageSlc = tf_Id(this.prfxSlcResults+this.id);
       
  2135 		
       
  2136 		for(var r=0; r<slcROpts.length; r++)
       
  2137 		{
       
  2138 			var currOpt = new Option(slcROpts[r],slcROpts[r],false,false);
       
  2139 			this.resultsPerPageSlc.options[r] = currOpt;
       
  2140 		}
       
  2141 		slcR.onchange = this.Evt._OnSlcResultsChange;
       
  2142 	},
       
  2143 	
       
  2144 	RemoveResultsPerPage: function()
       
  2145 	/*====================================================
       
  2146 		- Removes results per page select + label
       
  2147 	=====================================================*/
       
  2148 	{
       
  2149 		if(!this.hasGrid) return;
       
  2150 		if( this.resultsPerPageSlc==null || this.resultsPerPage==null ) return;
       
  2151 		var slcR, slcRSpan;
       
  2152 		slcR = this.resultsPerPageSlc;
       
  2153 		slcRSpan = tf_Id( this.prfxSlcResultsTxt+this.id );
       
  2154 		if( slcR!=null )
       
  2155 			slcR.parentNode.removeChild( slcR );
       
  2156 		if( slcRSpan!=null )
       
  2157 			slcRSpan.parentNode.removeChild( slcRSpan );
       
  2158 		this.resultsPerPageSlc = null;
       
  2159 	},
       
  2160 	
       
  2161 	SetResetBtn: function()
       
  2162 	/*====================================================
       
  2163 		- Generates reset button
       
  2164 	=====================================================*/
       
  2165 	{
       
  2166 		if(!this.hasGrid && !this.isFirstLoad) return;
       
  2167 		if( this.btnResetEl!=null ) return;
       
  2168 		var resetspan = tf_CreateElm('span',['id',this.prfxResetSpan+this.id]);
       
  2169 		
       
  2170 		// reset button is added to defined element
       
  2171 		if(this.btnResetTgtId==null) this.SetTopDiv();
       
  2172 		var targetEl = ( this.btnResetTgtId==null ) ? this.rDiv : tf_Id( this.btnResetTgtId );
       
  2173 		targetEl.appendChild(resetspan);
       
  2174 			
       
  2175 		if(this.btnResetHtml==null)
       
  2176 		{	
       
  2177 			var fltreset = tf_CreateElm( 'a', ['href','javascript:void(0);'] );
       
  2178 			fltreset.className = this.btnResetCssClass;
       
  2179 			fltreset.appendChild(tf_CreateText(this.btnResetText));
       
  2180 			resetspan.appendChild(fltreset);
       
  2181 			fltreset.onclick = this.Evt._Clear;
       
  2182 		} else {
       
  2183 			resetspan.innerHTML = this.btnResetHtml;
       
  2184 			var resetEl = resetspan.firstChild;
       
  2185 			resetEl.onclick = this.Evt._Clear;
       
  2186 		}
       
  2187 		this.btnResetEl = tf_Id(this.prfxResetSpan+this.id).firstChild;	
       
  2188 	},
       
  2189 	
       
  2190 	RemoveResetBtn: function()
       
  2191 	/*====================================================
       
  2192 		- Removes reset button
       
  2193 	=====================================================*/
       
  2194 	{
       
  2195 		if(!this.hasGrid) return;
       
  2196 		if( this.btnResetEl==null ) return;
       
  2197 		var resetspan = tf_Id(this.prfxResetSpan+this.id);
       
  2198 		if( resetspan!=null )
       
  2199 			resetspan.parentNode.removeChild( resetspan );
       
  2200 		this.btnResetEl = null;	
       
  2201 	},
       
  2202 	
       
  2203 	RemoveExternalFlts: function()
       
  2204 	/*====================================================
       
  2205 		- removes external filters
       
  2206 	=====================================================*/
       
  2207 	{
       
  2208 		if( !this.isExternalFlt && !this.externalFltTgtIds ) return;
       
  2209 		for(var ct=0; ct<this.externalFltTgtIds.length; ct++ )
       
  2210 			if( tf_Id(this.externalFltTgtIds[ct]) )
       
  2211 				tf_Id(this.externalFltTgtIds[ct]).innerHTML = '';
       
  2212 	},
       
  2213 	
       
  2214 	SetSort: function()
       
  2215 	/*====================================================
       
  2216 		- Sets sorting feature by loading 
       
  2217 		WebFX Sortable Table 1.12 by Erik Arvidsson
       
  2218 		and TF adapter by Max Guglielmi
       
  2219 	=====================================================*/
       
  2220 	{
       
  2221 		if(tf_isImported(this.sortConfig.src))
       
  2222 			this.Evt._EnableSort();
       
  2223 		else
       
  2224 			this.IncludeFile(
       
  2225 				this.sortConfig.name, 
       
  2226 				this.sortConfig.src, 
       
  2227 				this.Evt._EnableSort
       
  2228 			);
       
  2229 	},
       
  2230 	
       
  2231 	RemoveSort: function()
       
  2232 	/*====================================================
       
  2233 		- removes sorting feature
       
  2234 	=====================================================*/
       
  2235 	{
       
  2236 		if(!this.sort) return;
       
  2237 		this.sort = false;
       
  2238 	},
       
  2239 	
       
  2240 	PopulateSelect: function(colIndex,isExternal,extSlcId)
       
  2241 	{ 
       
  2242 		this.EvtManager(
       
  2243 			this.Evt.name.populateselect,
       
  2244 			{ slcIndex:colIndex, slcExternal:isExternal, slcId:extSlcId }
       
  2245 		); 
       
  2246 	},
       
  2247 	_PopulateSelect: function(colIndex,isRefreshed,isExternal,extSlcId)
       
  2248 	/*====================================================
       
  2249 		- populates drop-down filters
       
  2250 	=====================================================*/
       
  2251 	{
       
  2252 		isExternal = (isExternal==undefined) ? false : isExternal;
       
  2253 		var slcId = this.fltIds[colIndex];
       
  2254 		if( tf_Id(slcId)==null && !isExternal ) return;
       
  2255 		if( tf_Id(extSlcId)==null && isExternal ) return;
       
  2256 		var slc = (!isExternal) ? tf_Id(slcId) : tf_Id(extSlcId);
       
  2257 		var o = this, row = this.tbl.rows;
       
  2258 		var fillMethod = this.slcFillingMethod.tf_LCase();
       
  2259 		var optArray = [], slcInnerHtml = '', opt0;
       
  2260 		var isCustomSlc = (this.hasCustomSlcOptions  //custom select test
       
  2261 							&& this.customSlcOptions.cols.tf_Has(colIndex));
       
  2262 		var optTxt = []; //custom selects text
       
  2263 		var activeFlt;
       
  2264 		if(isRefreshed && this.activeFilterId){
       
  2265 			activeFlt = this.activeFilterId.split('_')[0];
       
  2266 			activeFlt = activeFlt.split(this.prfxFlt)[1];
       
  2267 		}
       
  2268 
       
  2269 		/*** remember grid values ***/
       
  2270 		var flts_values = [], fltArr = [];
       
  2271 		if(this.rememberGridValues)
       
  2272 		{
       
  2273 			flts_values = tf_CookieValueArray(this.fltsValuesCookie);			
       
  2274 			fltArr = (flts_values[colIndex]!=undefined) 
       
  2275 						? flts_values[colIndex].split(' '+this.orOperator+' ') 
       
  2276 						: flts_values[colIndex] = [];			
       
  2277 		}
       
  2278 
       
  2279 		for(var k=this.refRow; k<this.nbRows; k++)
       
  2280 		{
       
  2281 			// always visible rows don't need to appear on selects as always valid
       
  2282 			if( this.hasVisibleRows && this.visibleRows.tf_Has(k) && !this.paging ) 
       
  2283 				continue;
       
  2284 
       
  2285 			var cell = tf_Tag(row[k],'td');
       
  2286 			var nchilds = cell.length;
       
  2287 
       
  2288 			if(nchilds == this.nbCells && !isCustomSlc)
       
  2289 			{// checks if row has exact cell #
       
  2290 				for(var j=0; j<nchilds; j++)// this loop retrieves cell data
       
  2291 				{
       
  2292 					if((colIndex==j && !isRefreshed) || 
       
  2293 						(colIndex==j && isRefreshed && ((row[k].style.display == '' && !this.paging) || 
       
  2294 						( this.paging && (!this.validRowsIndex || (this.validRowsIndex && this.validRowsIndex.tf_Has(k)))
       
  2295 							&& ((activeFlt==undefined || activeFlt==colIndex)  || (activeFlt!=colIndex && this.validRowsIndex.tf_Has(k) ))) )))
       
  2296 					{
       
  2297 						var cell_data = this.GetCellData(j, cell[j]);
       
  2298 						var cell_string = cell_data.tf_MatchCase(this.matchCase);//Váry Péter's patch
       
  2299 						// checks if celldata is already in array
       
  2300 						var isMatched = false;
       
  2301 						isMatched = optArray.tf_Has(cell_string,this.matchCase);
       
  2302 						
       
  2303 						if(!isMatched)
       
  2304 							optArray.push(cell_data);						
       
  2305 					}//if colIndex==j
       
  2306 				}//for j
       
  2307 			}//if
       
  2308 		}//for k
       
  2309 		
       
  2310 		//Retrieves custom values
       
  2311 		if(isCustomSlc)
       
  2312 		{
       
  2313 			var customValues = this.__getCustomValues(colIndex);
       
  2314 			optArray = customValues[0];
       
  2315 			optTxt = customValues[1];
       
  2316 		}
       
  2317 		
       
  2318 		if(this.sortSlc && !isCustomSlc)
       
  2319 			optArray.sort(this.matchCase ? null : tf_IgnoreCaseSort);
       
  2320 		
       
  2321 		if(this.sortNumAsc && this.sortNumAsc.tf_Has(colIndex))
       
  2322 		{//asc sort
       
  2323 			try{
       
  2324 				optArray.sort( tf_NumSortAsc ); 
       
  2325 				if(isCustomSlc) optTxt.sort( tf_NumSortAsc );
       
  2326 			} catch(e) {
       
  2327 				optArray.sort(); 
       
  2328 				if(isCustomSlc) optTxt.sort();
       
  2329 			}//in case there are alphanumeric values
       
  2330 		}
       
  2331 		if(this.sortNumDesc && this.sortNumDesc.tf_Has(colIndex))
       
  2332 		{//desc sort
       
  2333 			try{
       
  2334 				optArray.sort( tf_NumSortDesc ); 
       
  2335 				if(isCustomSlc) optTxt.sort( tf_NumSortDesc );
       
  2336 			} catch(e) {
       
  2337 				optArray.sort(); 
       
  2338 				if(isCustomSlc) optTxt.sort();
       
  2339 			}//in case there are alphanumeric values
       
  2340 		}
       
  2341 		
       
  2342 		AddOpts();//populates drop-down
       
  2343 		
       
  2344 		function AddOpt0()
       
  2345 		{// adds 1st option
       
  2346 			if( fillMethod == 'innerhtml' )
       
  2347 				slcInnerHtml += '<option value="">'+o.displayAllText+'</option>';
       
  2348 			else {
       
  2349 				var opt0 = tf_CreateOpt(o.displayAllText,'');			
       
  2350 				slc.appendChild(opt0);
       
  2351 			}
       
  2352 		}
       
  2353 		
       
  2354 		function AddOpts()
       
  2355 		{// populates select
       
  2356 			var slcValue = slc.value;
       
  2357 			slc.innerHTML = '';
       
  2358 			AddOpt0();			
       
  2359 			
       
  2360 			for(var y=0; y<optArray.length; y++)
       
  2361 			{			
       
  2362 				if( fillMethod == 'innerhtml' )
       
  2363 				{
       
  2364 					var slcAttr = '';
       
  2365 					var slcCustomTxt = (isCustomSlc) ? optTxt[y] : optArray[y];
       
  2366 					if( o.fillSlcOnDemand && slcValue==optArray[y] )
       
  2367 						slcAttr = 'selected="selected"';
       
  2368 					slcInnerHtml += '<option value="'+optArray[y]+'" '
       
  2369 										+slcAttr+'>'+slcCustomTxt+'</option>';
       
  2370 				} else {
       
  2371 					var opt;
       
  2372 					//fill select on demand
       
  2373 					if(o.fillSlcOnDemand && slcValue==optArray[y] && o['col'+colIndex]==o.fltTypeSlc)
       
  2374 						opt = tf_CreateOpt( (isCustomSlc) ? optTxt[y] : optArray[y],
       
  2375 											optArray[y],
       
  2376 											true );
       
  2377 					else{
       
  2378 						if( o['col'+colIndex]!=o.fltTypeMulti )
       
  2379 							opt = tf_CreateOpt( (isCustomSlc) ? optTxt[y] : optArray[y],
       
  2380 												optArray[y],
       
  2381 												(flts_values[colIndex]!=' ' && optArray[y]==flts_values[colIndex]) 
       
  2382 												? true : false 	);
       
  2383 						else
       
  2384 						{
       
  2385 							opt = tf_CreateOpt( (isCustomSlc) ? optTxt[y] : optArray[y],
       
  2386 												optArray[y],
       
  2387 												(fltArr.tf_Has(optArray[y].tf_MatchCase(o.matchCase),o.matchCase)) 
       
  2388 												? true : false 	);
       
  2389 						}
       
  2390 					}
       
  2391 					slc.appendChild(opt);
       
  2392 				}
       
  2393 			}// for y
       
  2394 
       
  2395 			if( fillMethod == 'innerhtml' )
       
  2396 				slc.innerHTML += slcInnerHtml;
       
  2397 				
       
  2398 			slc.setAttribute('filled','1');
       
  2399 		}// fn AddOpt
       
  2400 	},
       
  2401 	
       
  2402 	PopulateCheckList: function(colIndex, isExternal, extFltId)
       
  2403 	{
       
  2404 		this.EvtManager(
       
  2405 			this.Evt.name.populatechecklist,
       
  2406 			{ slcIndex:colIndex, slcExternal:isExternal, slcId:extFltId }
       
  2407 		); 
       
  2408 	},
       
  2409 	_PopulateCheckList: function(colIndex, isExternal, extFltId)
       
  2410 	/*====================================================
       
  2411 		- populates checklist filters
       
  2412 	=====================================================*/
       
  2413 	{
       
  2414 		isExternal = (isExternal==undefined) ? false : isExternal;
       
  2415 		var divFltId = this.prfxCheckListDiv+colIndex+'_'+this.id;
       
  2416 		if( tf_Id(divFltId)==null && !isExternal ) return;
       
  2417 		if( tf_Id(extFltId)==null && isExternal ) return;
       
  2418 		var flt = (!isExternal) ? this.checkListDiv[colIndex] : tf_Id(extFltId);
       
  2419 		var ul = tf_CreateElm('ul',['id',this.fltIds[colIndex]],['colIndex',colIndex]);
       
  2420 		ul.className = this.checkListCssClass;
       
  2421 		ul.onchange = this.Evt._OnSlcChange;
       
  2422 		var o = this, row = this.tbl.rows;
       
  2423 		var optArray = [];
       
  2424 		var isCustomSlc = (this.hasCustomSlcOptions  //custom select test
       
  2425 							&& this.customSlcOptions.cols.tf_Has(colIndex));
       
  2426 		var optTxt = []; //custom selects text
       
  2427 		var activeFlt;
       
  2428 		if(this.refreshFilters && this.activeFilterId){
       
  2429 			activeFlt = this.activeFilterId.split('_')[0];
       
  2430 			activeFlt = activeFlt.split(this.prfxFlt)[1];
       
  2431 		}		
       
  2432 		
       
  2433 		for(var k=this.refRow; k<this.nbRows; k++)
       
  2434 		{
       
  2435 			// always visible rows don't need to appear on selects as always valid
       
  2436 			if( this.hasVisibleRows && this.visibleRows.tf_Has(k) && !this.paging ) 
       
  2437 				continue;
       
  2438 
       
  2439 			var cells = tf_Tag(row[k],'td');
       
  2440 			var ncells = cells.length;
       
  2441 
       
  2442 			if(ncells == this.nbCells && !isCustomSlc)
       
  2443 			{// checks if row has exact cell #
       
  2444 				for(var j=0; j<ncells; j++)
       
  2445 				{// this loop retrieves cell data
       
  2446 					if((colIndex==j && !this.refreshFilters) || 
       
  2447 						(colIndex==j && this.refreshFilters && ((row[k].style.display == '' && !this.paging) || 
       
  2448 						( this.paging && ((activeFlt==undefined || activeFlt==colIndex ) ||(activeFlt!=colIndex && this.validRowsIndex.tf_Has(k))) ))))
       
  2449 					{
       
  2450 						var cell_data = this.GetCellData(j, cells[j]);
       
  2451 						var cell_string = cell_data.tf_MatchCase(this.matchCase);//Váry Péter's patch
       
  2452 						// checks if celldata is already in array
       
  2453 						var isMatched = false;
       
  2454 						isMatched = optArray.tf_Has(cell_string,this.matchCase);
       
  2455 						
       
  2456 						if(!isMatched)
       
  2457 							optArray.push(cell_data);
       
  2458 					}
       
  2459 				}
       
  2460 			}
       
  2461 		}
       
  2462 		
       
  2463 		//Retrieves custom values
       
  2464 		if(isCustomSlc)
       
  2465 		{
       
  2466 			var customValues = this.__getCustomValues(colIndex);
       
  2467 			optArray = customValues[0];
       
  2468 			optTxt = customValues[1];
       
  2469 		}
       
  2470 		
       
  2471 		if(this.sortSlc && !isCustomSlc)
       
  2472 			optArray.sort(this.matchCase ? null : tf_IgnoreCaseSort);
       
  2473 		
       
  2474 		if(this.sortNumAsc && this.sortNumAsc.tf_Has(colIndex))
       
  2475 		{//asc sort
       
  2476 			try{
       
  2477 				optArray.sort( tf_NumSortAsc ); 
       
  2478 				if(isCustomSlc) optTxt.sort( tf_NumSortAsc );
       
  2479 			} catch(e) {
       
  2480 				optArray.sort(); 
       
  2481 				if(isCustomSlc) optTxt.sort();
       
  2482 			}//in case there are alphanumeric values
       
  2483 		}
       
  2484 		if(this.sortNumDesc && this.sortNumDesc.tf_Has(colIndex))
       
  2485 		{//desc sort
       
  2486 			try{
       
  2487 				optArray.sort( tf_NumSortDesc ); 
       
  2488 				if(isCustomSlc) optTxt.sort( tf_NumSortDesc );
       
  2489 			} catch(e) {
       
  2490 				optArray.sort(); 
       
  2491 				if(isCustomSlc) optTxt.sort();
       
  2492 			}//in case there are alphanumeric values
       
  2493 		}
       
  2494 
       
  2495 		AddChecks();
       
  2496 			
       
  2497 		function AddCheck0()
       
  2498 		{// adds 1st option
       
  2499 			var li0 = tf_CreateCheckItem(o.fltIds[colIndex]+'_0', '', o.displayAllText);
       
  2500 			li0.className = o.checkListItemCssClass;
       
  2501 			ul.appendChild(li0);
       
  2502 			li0.check.onclick = function(){  
       
  2503 				o.__setCheckListValues(this); 
       
  2504 								
       
  2505 				if(o.refreshFilters){
       
  2506 					//o.activeFilterId = '';
       
  2507 					//o.RefreshFiltersGrid();
       
  2508 				}
       
  2509 				else
       
  2510 				ul.onchange.call(null);
       
  2511 			};
       
  2512 			
       
  2513 			if(tf_isIE)
       
  2514 			{//IE: label looses check capability
       
  2515 				li0.label.onclick = function(){ li0.check.click(); };
       
  2516 			}
       
  2517 		}
       
  2518 		
       
  2519 		function AddChecks()
       
  2520 		{		
       
  2521 			AddCheck0();
       
  2522 			
       
  2523 			var flts_values = [], fltArr = []; //remember grid values
       
  2524 			if(tf_CookieValueByIndex(o.fltsValuesCookie, colIndex)!=undefined)
       
  2525 				fltArr = tf_CookieValueByIndex(o.fltsValuesCookie, colIndex).split(' '+o.orOperator+' ');
       
  2526 
       
  2527 			for(var y=0; y<optArray.length; y++)
       
  2528 			{
       
  2529 				var li = tf_CreateCheckItem(
       
  2530 					o.fltIds[colIndex]+'_'+(y+1), 
       
  2531 					optArray[y], 
       
  2532 					(isCustomSlc) ? optTxt[y] : optArray[y]
       
  2533 				);
       
  2534 				li.className = o.checkListItemCssClass;
       
  2535 				ul.appendChild(li);
       
  2536 				li.check.onclick = function(){ o.__setCheckListValues(this); ul.onchange.call(null); };
       
  2537 				
       
  2538 				/*** remember grid values ***/
       
  2539 				if(o.rememberGridValues)
       
  2540 				{
       
  2541 					if(fltArr.tf_Has(optArray[y].tf_MatchCase(o.matchCase),o.matchCase))
       
  2542 					{
       
  2543 						li.check.checked = true;
       
  2544 						o.__setCheckListValues(li.check);
       
  2545 					}			
       
  2546 				}
       
  2547 				
       
  2548 				if(tf_isIE)
       
  2549 				{//IE: label looses check capability
       
  2550 					li.label.onclick = function(){ this.firstChild.click(); };	
       
  2551 				}
       
  2552 			}
       
  2553 		}
       
  2554 		
       
  2555 		if(this.fillSlcOnDemand)
       
  2556 			flt.innerHTML = '';
       
  2557 		flt.appendChild(ul);
       
  2558 		flt.setAttribute('filled','1');
       
  2559 		
       
  2560 		/*** remember grid values IE only, items remain un-checked ***/
       
  2561 		if(o.rememberGridValues && tf_isIE)
       
  2562 		{
       
  2563 			var slcIndexes = ul.getAttribute('indexes');
       
  2564 			if(slcIndexes != null)
       
  2565 			{
       
  2566 				var indSplit = slcIndexes.split(',');//items indexes
       
  2567 				for(var n=0; n<indSplit.length; n++)
       
  2568 				{
       
  2569 					var cChk = tf_Id(this.fltIds[colIndex]+'_'+indSplit[n]); //checked item
       
  2570 					if(cChk) cChk.checked = true;
       
  2571 				}
       
  2572 			}
       
  2573 		}
       
  2574 	},
       
  2575 	
       
  2576 	Filter: function()
       
  2577 	{
       
  2578 		this.EvtManager(this.Evt.name.filter); 
       
  2579 	},
       
  2580 	_Filter: function()
       
  2581 	/*====================================================
       
  2582 		- Filtering fn
       
  2583 		- retrieves data from each td in every single tr
       
  2584 		and compares to search string for current
       
  2585 		column
       
  2586 		- tr is hidden if all search strings are not 
       
  2587 		found
       
  2588 	=====================================================*/
       
  2589 	{
       
  2590 		if( !this.fltGrid || (!this.hasGrid && !this.isFirstLoad) ) return;
       
  2591 		//invokes eventual onbefore method
       
  2592 		if(this.onBeforeFilter) this.onBeforeFilter.call(null,this);
       
  2593 		var row = this.tbl.rows;	
       
  2594 		f = this.fObj!=undefined ? this.fObj : [];
       
  2595 		var hiddenrows = 0;
       
  2596 		this.validRowsIndex = [];
       
  2597 		var o = this;		
       
  2598 		
       
  2599 		// removes keyword highlighting
       
  2600 		this.UnhighlightAll();
       
  2601 
       
  2602 		// search args re-init
       
  2603 		this.searchArgs = this.GetFiltersValue(); 
       
  2604 		
       
  2605 		var num_cell_data, nbFormat;
       
  2606 		var re_le = new RegExp(this.leOperator), re_ge = new RegExp(this.geOperator);
       
  2607 		var re_l = new RegExp(this.lwOperator), re_g = new RegExp(this.grOperator);
       
  2608 		var re_d = new RegExp(this.dfOperator), re_lk = new RegExp(tf_RegexpEscape(this.lkOperator));
       
  2609 		var re_eq = new RegExp(this.eqOperator), re_st = new RegExp(this.stOperator);
       
  2610 		var re_en = new RegExp(this.enOperator), re_an = new RegExp(this.anOperator);
       
  2611 		var re_cr = new RegExp(this.curExp);
       
  2612 		
       
  2613 		function highlight(str,ok,cell){//keyword highlighting
       
  2614 			if( o.highlightKeywords && ok ){
       
  2615 				str = str.replace(re_lk,'');
       
  2616 				str = str.replace(re_eq,'');
       
  2617 				str = str.replace(re_st,'');
       
  2618 				str = str.replace(re_en,'');
       
  2619 				var w = str;
       
  2620 				if(re_le.test(str) || re_ge.test(str) || re_l.test(str) || re_g.test(str) || re_d.test(str))	
       
  2621 					w = tf_GetNodeText(cell);
       
  2622 				if(w!='')
       
  2623 					tf_HighlightWord( cell,w,o.highlightCssClass );
       
  2624 			}
       
  2625 		}
       
  2626 		
       
  2627 		//looks for search argument in current row
       
  2628 		function hasArg(sA,cell_data,j)
       
  2629 		{
       
  2630 			var occurence;
       
  2631 			//Search arg operator tests
       
  2632 			var hasLO = re_l.test(sA), hasLE = re_le.test(sA);
       
  2633 			var hasGR = re_g.test(sA), hasGE = re_ge.test(sA);
       
  2634 			var hasDF = re_d.test(sA), hasEQ = re_eq.test(sA);
       
  2635 			var hasLK = re_lk.test(sA), hasAN = re_an.test(sA);
       
  2636 			var hasST = re_st.test(sA), hasEN = re_en.test(sA);
       
  2637 			
       
  2638 			//Search arg dates tests
       
  2639 			var isLDate = ( hasLO && tf_isValidDate(sA.replace(re_l,''),dtType) );
       
  2640 			var isLEDate = ( hasLE && tf_isValidDate(sA.replace(re_le,''),dtType) );
       
  2641 			var isGDate = ( hasGR && tf_isValidDate(sA.replace(re_g,''),dtType) );
       
  2642 			var isGEDate = ( hasGE && tf_isValidDate(sA.replace(re_ge,''),dtType) );
       
  2643 			var isDFDate = ( hasDF && tf_isValidDate(sA.replace(re_d,''),dtType) );
       
  2644 			var isEQDate = ( hasEQ && tf_isValidDate(sA.replace(re_eq,''),dtType) );
       
  2645 						
       
  2646 			if( tf_isValidDate(cell_data,dtType) )
       
  2647 			{//dates
       
  2648 				var dte1 = tf_formatDate(cell_data,dtType);
       
  2649 				if(isLDate) 
       
  2650 				{// lower date
       
  2651 					var dte2 = tf_formatDate(sA.replace(re_l,''),dtType);
       
  2652 					occurence = (dte1 < dte2);
       
  2653 				}
       
  2654 				else if(isLEDate) 
       
  2655 				{// lower equal date
       
  2656 					var dte2 = tf_formatDate(sA.replace(re_le,''),dtType);
       
  2657 					occurence = (dte1 <= dte2);
       
  2658 				}
       
  2659 				else if(isGEDate) 
       
  2660 				{// greater equal date
       
  2661 					var dte2 = tf_formatDate(sA.replace(re_ge,''),dtType);
       
  2662 					occurence = (dte1 >= dte2);
       
  2663 				}
       
  2664 				else if(isGDate) 
       
  2665 				{// greater date
       
  2666 					var dte2 = tf_formatDate(sA.replace(re_g,''),dtType);
       
  2667 					occurence = (dte1 > dte2);
       
  2668 				}
       
  2669 				else if(isDFDate) 
       
  2670 				{// different date
       
  2671 					var dte2 = tf_formatDate(sA.replace(re_d,''),dtType);
       
  2672 					occurence = (dte1.toString() != dte2.toString());
       
  2673 				}
       
  2674 				else if(isEQDate) 
       
  2675 				{// equal date
       
  2676 					var dte2 = tf_formatDate(sA.replace(re_eq,''),dtType);
       
  2677 					occurence = (dte1.toString() == dte2.toString());
       
  2678 				}
       
  2679 				else if(re_lk.test(sA)) // searched keyword with * operator doesn't have to be a date
       
  2680 				{// like date
       
  2681 					occurence = o.__containsStr( sA.replace(re_lk,''),cell_data,null,false);
       
  2682 				}
       
  2683 				else if(tf_isValidDate(sA,dtType))
       
  2684 				{
       
  2685 					var dte2 = tf_formatDate(sA,dtType);
       
  2686 					occurence = (dte1.toString() == dte2.toString());
       
  2687 				}
       
  2688 			}
       
  2689 			
       
  2690 			else 
       
  2691 			{						
       
  2692 				//first numbers need to be formated
       
  2693 				if(o.hasColNbFormat && o.colNbFormat[j]!=null)
       
  2694 				{
       
  2695 					num_cell_data = tf_removeNbFormat(cell_data,o.colNbFormat[j]);
       
  2696 					nbFormat = o.colNbFormat[j];
       
  2697 				} else {
       
  2698 					if(o.thousandsSeparator==',' && o.decimalSeparator=='.')
       
  2699 					{
       
  2700 						num_cell_data = tf_removeNbFormat(cell_data,'us');
       
  2701 						nbFormat = 'us';
       
  2702 					} else {
       
  2703 						num_cell_data = tf_removeNbFormat(cell_data,'eu');
       
  2704 						nbFormat = 'eu';
       
  2705 					}
       
  2706 				}
       
  2707 				
       
  2708 				// first checks if there is any operator (<,>,<=,>=,!,*,=,{,})
       
  2709 				if(hasLE) //lower equal
       
  2710 					occurence = num_cell_data <= tf_removeNbFormat(sA.replace(re_le,''),nbFormat);
       
  2711 				
       
  2712 				else if(hasGE) //greater equal
       
  2713 					occurence = num_cell_data >= tf_removeNbFormat(sA.replace(re_ge,''),nbFormat);
       
  2714 				
       
  2715 				else if(hasLO) //lower
       
  2716 					occurence = num_cell_data < tf_removeNbFormat(sA.replace(re_l,''),nbFormat);
       
  2717 					
       
  2718 				else if(hasGR) //greater
       
  2719 					occurence = num_cell_data > tf_removeNbFormat(sA.replace(re_g,''),nbFormat);							
       
  2720 					
       
  2721 				else if(hasDF) //different
       
  2722 					occurence = o.__containsStr( sA.replace(re_d,''),cell_data ) ? false : true;
       
  2723 			
       
  2724 				else if(hasLK) //like
       
  2725 					occurence = o.__containsStr( sA.replace(re_lk,''),cell_data,null,false);
       
  2726 				
       
  2727 				else if(hasEQ) //equal
       
  2728 					occurence = o.__containsStr( sA.replace(re_eq,''),cell_data,null,true);
       
  2729 				
       
  2730 				else if(hasST) //starts with
       
  2731 					occurence = cell_data.indexOf(sA.replace(re_st,''))==0 ? true : false;
       
  2732 				
       
  2733 				else if(hasEN) //ends with
       
  2734 				{
       
  2735 					var searchArg = sA.replace(re_en,'');
       
  2736 					occurence = cell_data.lastIndexOf(searchArg,cell_data.length-1)==(cell_data.length-1)-(searchArg.length-1)
       
  2737 						&& cell_data.lastIndexOf(searchArg,cell_data.length-1) > -1
       
  2738 						? true : false;
       
  2739 				}
       
  2740 				
       
  2741 				else
       
  2742 					occurence = o.__containsStr( sA,cell_data,(f['col_'+j]==undefined) ? this.fltTypeInp : f['col_'+j] );
       
  2743 				
       
  2744 			}//else
       
  2745 			return occurence;
       
  2746 		}//fn
       
  2747 		
       
  2748 		for(var k=this.refRow; k<this.nbRows; k++)
       
  2749 		{
       
  2750 			/*** if table already filtered some rows are not visible ***/
       
  2751 			if(row[k].style.display == 'none') row[k].style.display = '';
       
  2752 					
       
  2753 			var cell = tf_Tag(row[k],'td');
       
  2754 			var nchilds = cell.length;			
       
  2755 			
       
  2756 			// checks if row has exact cell #
       
  2757 			if(nchilds != this.nbCells) continue;
       
  2758 	
       
  2759 			var occurence = [];
       
  2760 			var isRowValid = (this.searchType=='include') ? true : false;
       
  2761 			var singleFltRowValid = false; //only for single filter search
       
  2762 			
       
  2763 			for(var j=0; j<nchilds; j++)
       
  2764 			{// this loop retrieves cell data
       
  2765 				var sA = this.searchArgs[(this.singleSearchFlt) ? 0 : j]; //searched keyword
       
  2766 				var dtType = (this.hasColDateType) ? this.colDateType[j] : this.defaultDateType;
       
  2767 				if(sA=='') continue;
       
  2768 				
       
  2769 				var cell_data = this.GetCellData(j, cell[j]).tf_MatchCase(this.matchCase);
       
  2770 	
       
  2771 				var sAOrSplit = sA.split(this.orOperator);//multiple search parameter operator ||
       
  2772 				var hasMultiOrSA = (sAOrSplit.length>1) ? true : false;//multiple search || parameter boolean
       
  2773 				var sAAndSplit = sA.split('&&');//multiple search parameter operator &&
       
  2774 				var hasMultiAndSA = (sAAndSplit.length>1) ? true : false;//multiple search && parameter boolean
       
  2775 
       
  2776 				if(hasMultiOrSA || hasMultiAndSA)
       
  2777 				{//multiple sarch parameters
       
  2778 					var cS, occur = false;
       
  2779 					var s = (hasMultiOrSA) ? sAOrSplit : sAAndSplit;
       
  2780 					for(var w=0; w<s.length; w++)
       
  2781 					{
       
  2782 						cS = s[w].tf_Trim();
       
  2783 						occur = hasArg(cS,cell_data,j);
       
  2784 						highlight(cS,occur,cell[j]);
       
  2785 						if(hasMultiOrSA && occur) break;
       
  2786 						if(hasMultiAndSA && !occur) break;
       
  2787 					}
       
  2788 					occurence[j] = occur;
       
  2789 				}
       
  2790 				else {//single search parameter		
       
  2791 					occurence[j] = hasArg(sA.tf_Trim(),cell_data,j);
       
  2792 					highlight(sA,occurence[j],cell[j]);
       
  2793 				}//else single param
       
  2794 				
       
  2795 				if(!occurence[j]) isRowValid = (this.searchType=='include') ? false : true;
       
  2796 				if(this.singleSearchFlt && occurence[j]) singleFltRowValid = true;
       
  2797 				
       
  2798 			}//for j
       
  2799 			
       
  2800 			if(this.singleSearchFlt && singleFltRowValid) isRowValid = true;
       
  2801 			
       
  2802 			if(!isRowValid)
       
  2803 			{
       
  2804 				this.SetRowValidation(k,false);
       
  2805 				// always visible rows need to be counted as valid
       
  2806 				if( this.hasVisibleRows && this.visibleRows.tf_Has(k) && !this.paging)
       
  2807 					this.validRowsIndex.push(k);
       
  2808 				else
       
  2809 					hiddenrows++;
       
  2810 			} else {
       
  2811 				this.SetRowValidation(k,true);
       
  2812 				this.validRowsIndex.push(k);
       
  2813 				this.SetRowBg(k,this.validRowsIndex.length);
       
  2814 				if(this.onRowValidated) this.onRowValidated.call(null,this,k);
       
  2815 			}
       
  2816 			
       
  2817 		}// for k
       
  2818 		
       
  2819 		this.nbVisibleRows = this.validRowsIndex.length;
       
  2820 		this.nbHiddenRows = hiddenrows;
       
  2821 		this.isStartBgAlternate = false;
       
  2822 		if( this.rememberGridValues ) this.RememberFiltersValue(this.fltsValuesCookie);
       
  2823 		if(!this.paging) this.ApplyGridProps();//applies filter props after filtering process
       
  2824 		if(this.paging){ 
       
  2825 			this.startPagingRow = 0; 
       
  2826 			this.currentPageNb = 1;
       
  2827 			this.SetPagingInfo(this.validRowsIndex); 
       
  2828 		}//starts paging process
       
  2829 		//invokes eventual onafter function
       
  2830 		if(this.onAfterFilter) this.onAfterFilter.call(null,this);
       
  2831 	},
       
  2832 	
       
  2833 	SetPagingInfo: function( validRows )
       
  2834 	/*====================================================
       
  2835 		- calculates page # according to valid rows
       
  2836 		- refreshes paging select according to page #
       
  2837 		- Calls GroupByPage method
       
  2838 	=====================================================*/
       
  2839 	{
       
  2840 		var row = this.tbl.rows;
       
  2841 		var mdiv = ( this.pagingTgtId==null ) ? this.mDiv : tf_Id( this.pagingTgtId );
       
  2842 		var pgspan = tf_Id(this.prfxPgSpan+this.id);
       
  2843 		
       
  2844 		if( validRows!=undefined ) this.validRowsIndex = validRows;//stores valid rows index
       
  2845 		else 
       
  2846 		{
       
  2847 			this.validRowsIndex = [];//re-sets valid rows index
       
  2848 	
       
  2849 			for(var j=this.refRow; j<this.nbRows; j++)//counts rows to be grouped 
       
  2850 			{
       
  2851 				var isRowValid = row[j].getAttribute('validRow');
       
  2852 				if(isRowValid=='true' || isRowValid==null )
       
  2853 						this.validRowsIndex.push(j);
       
  2854 			}//for j
       
  2855 		}
       
  2856 	
       
  2857 		this.nbPages = Math.ceil( this.validRowsIndex.length/this.pagingLength );//calculates nb of pages
       
  2858 		pgspan.innerHTML = this.nbPages; //refresh page nb span 
       
  2859 		if(this.pageSelectorType==this.fltTypeSlc) 
       
  2860 			this.pagingSlc.innerHTML = '';//select clearing shortcut
       
  2861 		
       
  2862 		if( this.nbPages>0 )
       
  2863 		{
       
  2864 			mdiv.style.visibility = 'visible';
       
  2865 			if(this.pageSelectorType==this.fltTypeSlc)
       
  2866 				for(var z=0; z<this.nbPages; z++)
       
  2867 				{
       
  2868 					var currOpt = new Option((z+1),z*this.pagingLength,false,false);
       
  2869 					this.pagingSlc.options[z] = currOpt;
       
  2870 				}
       
  2871 			else this.pagingSlc.value = this.currentPageNb; //input type
       
  2872 			
       
  2873 		} else {/*** if no results paging select and buttons are hidden ***/
       
  2874 			mdiv.style.visibility = 'hidden';
       
  2875 		}
       
  2876 		this.GroupByPage( this.validRowsIndex );
       
  2877 	},
       
  2878 	
       
  2879 	GroupByPage: function( validRows )
       
  2880 	/*====================================================
       
  2881 		- Displays current page rows
       
  2882 	=====================================================*/
       
  2883 	{
       
  2884 		var row = this.tbl.rows;
       
  2885 		var paging_end_row = parseInt( this.startPagingRow ) + parseInt( this.pagingLength );
       
  2886 		
       
  2887 		if( validRows!=undefined ) this.validRowsIndex = validRows;//stores valid rows index
       
  2888 	
       
  2889 		for(h=0; h<this.validRowsIndex.length; h++)
       
  2890 		{//this loop shows valid rows of current page
       
  2891 			if( h>=this.startPagingRow && h<paging_end_row )
       
  2892 			{
       
  2893 				var r = row[ this.validRowsIndex[h] ];
       
  2894 				if(r.getAttribute('validRow')=='true' || r.getAttribute('validRow')==undefined)
       
  2895 					r.style.display = '';
       
  2896 				this.SetRowBg(this.validRowsIndex[h],h);
       
  2897 			} else {
       
  2898 				row[ this.validRowsIndex[h] ].style.display = 'none';
       
  2899 				this.RemoveRowBg(this.validRowsIndex[h]);
       
  2900 			}
       
  2901 		}
       
  2902 		
       
  2903 		this.nbVisibleRows = this.validRowsIndex.length;
       
  2904 		this.isStartBgAlternate = false;
       
  2905 		this.ApplyGridProps();//re-applies filter behaviours after filtering process
       
  2906 	},
       
  2907 	
       
  2908 	ApplyGridProps: function()
       
  2909 	/*====================================================
       
  2910 		- checks methods that should be called
       
  2911 		after filtering and/or paging process
       
  2912 	=====================================================*/
       
  2913 	{
       
  2914 		if( this.activeFlt && this.activeFlt.nodeName.tf_LCase()==this.fltTypeSlc )
       
  2915 		{// blurs active filter (IE)
       
  2916 			this.activeFlt.blur(); 
       
  2917 			if(this.activeFlt.parentNode) this.activeFlt.parentNode.focus(); 
       
  2918 		}
       
  2919 		
       
  2920 		if( this.visibleRows ) this.SetVisibleRows();//shows rows always visible
       
  2921 		if( this.colOperation ) this.SetColOperation();//makes operation on a col
       
  2922 		if( this.refreshFilters ) this.RefreshFiltersGrid();//re-populates drop-down filters
       
  2923 		var nr = (!this.paging && this.hasVisibleRows) 
       
  2924 					? (this.nbVisibleRows - this.visibleRows.length) : this.nbVisibleRows;
       
  2925 		if( this.rowsCounter ) this.RefreshNbRows( nr );//refreshes rows counter
       
  2926 	},
       
  2927 	
       
  2928 	RefreshNbRows: function(p)
       
  2929 	/*====================================================
       
  2930 		- Shows total number of filtered rows
       
  2931 	=====================================================*/
       
  2932 	{
       
  2933 		if(this.rowsCounterSpan == null) return;
       
  2934 		var totTxt;
       
  2935 		if(!this.paging)
       
  2936 		{
       
  2937 			if(p!=undefined && p!='') totTxt=p;
       
  2938 			else totTxt = (this.nbFilterableRows - this.nbHiddenRows - (this.hasVisibleRows ? this.visibleRows.length : 0) );
       
  2939 		} else {
       
  2940 			var paging_start_row = parseInt(this.startPagingRow)+((this.nbVisibleRows>0) ? 1 : 0);//paging start row
       
  2941 			var paging_end_row = (paging_start_row+this.pagingLength)-1 <= this.nbVisibleRows 
       
  2942 				? (paging_start_row+this.pagingLength)-1 : this.nbVisibleRows;
       
  2943 			totTxt = paging_start_row+'-'+paging_end_row+' / '+this.nbVisibleRows;
       
  2944 		} 
       
  2945 		this.rowsCounterSpan.innerHTML = totTxt;
       
  2946 	},
       
  2947 	
       
  2948 	ChangePage: function( index )
       
  2949 	{
       
  2950 		this.EvtManager(this.Evt.name.changepage,{ pgIndex:index });
       
  2951 	},
       
  2952 	_ChangePage: function( index )
       
  2953 	/*====================================================
       
  2954 		- Changes page
       
  2955 		- Param:
       
  2956 			- index: option index of paging select 
       
  2957 			(numeric value)
       
  2958 	=====================================================*/
       
  2959 	{
       
  2960 		if( !this.paging ) return;
       
  2961 		if( index==undefined ) 
       
  2962 			index = (this.pageSelectorType==this.fltTypeSlc) ? 
       
  2963 				this.pagingSlc.options.selectedIndex : (this.pagingSlc.value-1);
       
  2964 		if( index>=0 && index<=(this.nbPages-1) )
       
  2965 		{
       
  2966 			this.currentPageNb = parseInt(index)+1;
       
  2967 			if(this.pageSelectorType==this.fltTypeSlc)
       
  2968 				this.pagingSlc.options[index].selected = true;
       
  2969 			else
       
  2970 				this.pagingSlc.value = this.currentPageNb;
       
  2971 
       
  2972 			if( this.rememberPageNb ) this.RememberPageNb( this.pgNbCookie );
       
  2973 			this.startPagingRow = (this.pageSelectorType==this.fltTypeSlc)
       
  2974 				? this.pagingSlc.value : (index*this.pagingLength);
       
  2975 			this.GroupByPage();
       
  2976 		}
       
  2977 	},
       
  2978 	
       
  2979 	ChangeResultsPerPage: function()
       
  2980 	{
       
  2981 		this.EvtManager(this.Evt.name.changeresultsperpage);
       
  2982 	},
       
  2983 	_ChangeResultsPerPage: function()
       
  2984 	/*====================================================
       
  2985 		- calculates rows to be displayed in a page
       
  2986 		- method called by nb results per page select
       
  2987 	=====================================================*/
       
  2988 	{
       
  2989 		if( !this.paging ) return;
       
  2990 		var slcR = this.resultsPerPageSlc;
       
  2991 		var slcPagesSelIndex = (this.pageSelectorType==this.fltTypeSlc) 
       
  2992 			? this.pagingSlc.selectedIndex : parseInt(this.pagingSlc.value-1);
       
  2993 		this.pagingLength = parseInt(slcR.options[slcR.selectedIndex].value);
       
  2994 		this.startPagingRow = this.pagingLength*slcPagesSelIndex;
       
  2995 
       
  2996 		if( !isNaN(this.pagingLength) )
       
  2997 		{
       
  2998 			if( this.startPagingRow>=this.nbFilterableRows )
       
  2999 				this.startPagingRow = (this.nbFilterableRows-this.pagingLength);
       
  3000 			this.SetPagingInfo();
       
  3001 
       
  3002 			if(this.pageSelectorType==this.fltTypeSlc)
       
  3003 			{
       
  3004 				var slcIndex = (this.pagingSlc.options.length-1<=slcPagesSelIndex ) 
       
  3005 								? (this.pagingSlc.options.length-1) : slcPagesSelIndex;
       
  3006 				this.pagingSlc.options[slcIndex].selected = true;
       
  3007 			}
       
  3008 			if( this.rememberPageLen ) this.RememberPageLength( this.pgLenCookie );
       
  3009 		}//if isNaN
       
  3010 	},
       
  3011 	
       
  3012 	Sort: function()
       
  3013 	{
       
  3014 		this.EvtManager(this.Evt.name.sort);
       
  3015 	},
       
  3016 	
       
  3017 	GetColValues: function(colindex,num,exclude)
       
  3018 	/*====================================================
       
  3019 		- returns an array containing cell values of
       
  3020 		a column
       
  3021 		- needs following args:
       
  3022 			- column index (number)
       
  3023 			- a boolean set to true if we want only 
       
  3024 			numbers to be returned
       
  3025 			- array containing rows index to be excluded
       
  3026 			from returned values
       
  3027 	=====================================================*/
       
  3028 	{
       
  3029 		if( !this.fltGrid ) return;
       
  3030 		var row = this.tbl.rows;
       
  3031 		var colValues = [];
       
  3032 	
       
  3033 		for(var i=this.refRow; i<this.nbRows; i++)//iterates rows
       
  3034 		{
       
  3035 			var isExludedRow = false;
       
  3036 			if(exclude!=undefined && (typeof exclude).tf_LCase()=='object')
       
  3037 			{ // checks if current row index appears in exclude array
       
  3038 				isExludedRow = exclude.tf_Has(i); //boolean
       
  3039 			}
       
  3040 			var cell = tf_Tag(row[i],'td');
       
  3041 			var nchilds = cell.length;
       
  3042 			
       
  3043 			if(nchilds == this.nbCells && !isExludedRow)
       
  3044 			{// checks if row has exact cell # and is not excluded
       
  3045 				for(var j=0; j<nchilds; j++)// this loop retrieves cell data
       
  3046 				{
       
  3047 					if(j==colindex && row[i].style.display=='' )
       
  3048 					{
       
  3049 						var cell_data = this.GetCellData(j, cell[j]).tf_LCase();
       
  3050 						var nbFormat = this.colNbFormat ? this.colNbFormat[colindex] : null;
       
  3051 						(num) ? colValues.push( tf_removeNbFormat(cell_data,nbFormat) ) 
       
  3052 								: colValues.push( cell_data );
       
  3053 					}//if j==k
       
  3054 				}//for j
       
  3055 			}//if nchilds == this.nbCells
       
  3056 		}//for i
       
  3057 		return colValues;	
       
  3058 	},
       
  3059 	
       
  3060 	GetFilterValue: function(index)
       
  3061 	/*====================================================
       
  3062 		- Returns value of a specified filter
       
  3063 		- Params:
       
  3064 			- index: filter column index (numeric value)
       
  3065 	=====================================================*/
       
  3066 	{
       
  3067 		if( !this.fltGrid ) return;
       
  3068 		var fltValue;
       
  3069 		var flt = tf_Id(this.fltIds[index]);
       
  3070 		if(flt==null) return fltValue='';
       
  3071 		
       
  3072 		if( this['col'+index]!=this.fltTypeMulti && 
       
  3073 			this['col'+index]!=this.fltTypeCheckList )
       
  3074 			fltValue = flt.value;
       
  3075 		else if(this['col'+index] == this.fltTypeMulti)
       
  3076 		{//mutiple select
       
  3077 			fltValue = '';
       
  3078 			for(var j=0; j<flt.options.length; j++) 
       
  3079 				if(flt.options[j].selected)
       
  3080 					fltValue = fltValue.concat(
       
  3081 								flt.options[j].value+' ' +
       
  3082 								this.orOperator + ' '
       
  3083 								);
       
  3084 			//removes last operator ||
       
  3085 			fltValue = fltValue.substr(0,fltValue.length-4);
       
  3086 		}
       
  3087 		else if(this['col'+index]==this.fltTypeCheckList)
       
  3088 		{//checklist
       
  3089 			if(flt.getAttribute('value')!=null)
       
  3090 			{
       
  3091 				fltValue = flt.getAttribute('value');
       
  3092 				//removes last operator ||
       
  3093 				fltValue = fltValue.substr(0,fltValue.length-3);
       
  3094 			} else fltValue = '';
       
  3095 		}			
       
  3096 		return fltValue;
       
  3097 	},
       
  3098 	
       
  3099 	GetFiltersValue: function()
       
  3100 	/*====================================================
       
  3101 		- Returns the value of every single filter
       
  3102 	=====================================================*/
       
  3103 	{
       
  3104 		if( !this.fltGrid ) return;
       
  3105 		var searchArgs = [];
       
  3106 		for(var i=0; i<this.fltIds.length; i++)
       
  3107 			searchArgs.push(
       
  3108 				this.GetFilterValue(i).tf_MatchCase(this.matchCase).tf_Trim()
       
  3109 			);
       
  3110 		return searchArgs;
       
  3111 	},
       
  3112 	
       
  3113 	GetFilterId: function(index)
       
  3114 	/*====================================================
       
  3115 		- Returns filter id of a specified column
       
  3116 		- Params:
       
  3117 			- index: column index (numeric value)
       
  3118 	=====================================================*/
       
  3119 	{
       
  3120 		if( !this.fltGrid ) return;
       
  3121 		return this.fltIds[i];
       
  3122 	},
       
  3123 	
       
  3124 	GetFiltersByType: function(type,bool)
       
  3125 	/*====================================================
       
  3126 		- returns an array containing ids of filters of a 
       
  3127 		specified type (inputs or selects)
       
  3128 		- Note that hidden filters are also returned
       
  3129 		- Needs folllowing args:
       
  3130 			- filter type string ('input','select',
       
  3131 			'multiple')
       
  3132 			- optional boolean: if set true method
       
  3133 			returns column indexes otherwise filters ids
       
  3134 	=====================================================*/
       
  3135 	{
       
  3136 		if( !this.fltGrid ) return;
       
  3137 		var arr = [];
       
  3138 		for(var i=0; i<this.fltIds.length; i++)
       
  3139 		{
       
  3140 			var fltType = this['col'+i];
       
  3141 			if(fltType == type.tf_LCase())
       
  3142 			{
       
  3143 				var a = (bool) ? i : this.fltIds[i];
       
  3144 				arr.push(a);
       
  3145 			}
       
  3146 		}
       
  3147 		return arr;
       
  3148 	},
       
  3149 	
       
  3150 	GetCellsNb: function( rowIndex )
       
  3151 	/*====================================================
       
  3152 		- returns number of cells in a row
       
  3153 		- if rowIndex param is passed returns number of 
       
  3154 		cells of specified row (number)
       
  3155 	=====================================================*/
       
  3156 	{
       
  3157 		var tr = (rowIndex == undefined) ? this.tbl.rows[0] : this.tbl.rows[rowIndex];
       
  3158 		var n = tf_GetChildElms(tr);
       
  3159 		return n.childNodes.length;
       
  3160 	},
       
  3161 	
       
  3162 	GetRowsNb: function()
       
  3163 	/*====================================================
       
  3164 		- returns total nb of filterable rows starting 
       
  3165 		from reference row if defined
       
  3166 	=====================================================*/
       
  3167 	{
       
  3168 		var s = this.refRow==undefined ? 0 : this.refRow;
       
  3169 		var ntrs = this.tbl.rows.length;
       
  3170 		return parseInt(ntrs-s);
       
  3171 	},
       
  3172 	
       
  3173 	GetCellData: function(i, cell)
       
  3174 	/*====================================================
       
  3175 		- returns text content of a given cell
       
  3176 		- Params:
       
  3177 			- i: index of the column (number)
       
  3178 			- cell: td DOM object
       
  3179 	=====================================================*/
       
  3180 	{
       
  3181 		if(i==undefined || cell==null) return "";
       
  3182 		//First checks for customCellData event
       
  3183 		if(this.customCellData && this.customCellDataCols.tf_Has(i))
       
  3184 			return this.customCellData.call(null,this,cell,i);
       
  3185 		else
       
  3186 			return tf_GetNodeText(cell);
       
  3187 	},
       
  3188 	
       
  3189 	GetTableData: function()
       
  3190 	/*====================================================
       
  3191 		- returns an array containing table data:
       
  3192 		[rowindex,[value1,value2,value3...]]
       
  3193 	=====================================================*/
       
  3194 	{
       
  3195 		var row = this.tbl.rows;
       
  3196 		for(var k=this.refRow; k<this.nbRows; k++)
       
  3197 		{
       
  3198 			var rowData, cellData;
       
  3199 			rowData = [k,[]];
       
  3200 			var cells = tf_Tag(row[k],'td');
       
  3201 			for(var j=0; j<cells.length; j++)
       
  3202 			{// this loop retrieves cell data
       
  3203 				var cell_data = this.GetCellData(j, cells[j]);
       
  3204 				rowData[1].push( cell_data );
       
  3205 			}
       
  3206 			this.tblData.push( rowData )
       
  3207 		}
       
  3208 		return this.tblData;
       
  3209 	},
       
  3210 	
       
  3211 	GetFilteredData: function()
       
  3212 	/*====================================================
       
  3213 		- returns an array containing filtered data:
       
  3214 		[rowindex,[value1,value2,value3...]]
       
  3215 	=====================================================*/
       
  3216 	{
       
  3217 		if(!this.validRowsIndex) return [];
       
  3218 		var row = this.tbl.rows;
       
  3219 		var filteredData = [];
       
  3220 		for(var i=0; i<this.validRowsIndex.length; i++)
       
  3221 		{
       
  3222 			var rowData, cellData;
       
  3223 			rowData = [this.validRowsIndex[i],[]];
       
  3224 			var cells = tf_Tag(row[this.validRowsIndex[i]],'td');
       
  3225 			for(var j=0; j<cells.length; j++)
       
  3226 			{
       
  3227 				var cell_data = this.GetCellData(j, cells[j]);
       
  3228 				rowData[1].push( cell_data );
       
  3229 			}
       
  3230 			filteredData.push(rowData);
       
  3231 		}
       
  3232 		return filteredData;
       
  3233 	},
       
  3234 	
       
  3235 	GetFilteredDataCol: function(colIndex)
       
  3236 	/*====================================================
       
  3237 		- returns an array containing filtered data of a
       
  3238 		specified column. 
       
  3239 		- Params:
       
  3240 			- colIndex: index of the column (number)
       
  3241 		- returned array:
       
  3242 		[value1,value2,value3...]
       
  3243 	=====================================================*/
       
  3244 	{
       
  3245 		if(colIndex==undefined) return [];
       
  3246 		var data =  this.GetFilteredData();
       
  3247 		var colData = [];
       
  3248 		for(var i=0; i<data.length; i++)
       
  3249 		{
       
  3250 			var r = data[i];
       
  3251 			var d = r[1]; //cols values of current row
       
  3252 			var c = d[colIndex]; //data of searched column
       
  3253 			colData.push(c);
       
  3254 		}
       
  3255 		return colData;
       
  3256 	},
       
  3257 	
       
  3258 	GetRowDisplay: function(row)
       
  3259 	{
       
  3260 		if( !this.fltGrid && typeof row.tf_LCase!='object' ) return;
       
  3261 		return row.style.display;
       
  3262 	},
       
  3263 	
       
  3264 	SetRowValidation: function( rowIndex,isValid )
       
  3265 	/*====================================================
       
  3266 		- Validates/unvalidates row by setting 'validRow' 
       
  3267 		attribute and shows/hides row
       
  3268 		- Params:
       
  3269 			- rowIndex: index of the row (number)
       
  3270 			- isValid: boolean
       
  3271 	=====================================================*/
       
  3272 	{
       
  3273 		var row = this.tbl.rows[rowIndex];
       
  3274 		if( !row || (typeof isValid).tf_LCase()!='boolean' ) return;
       
  3275 	
       
  3276 		// always visible rows are valid
       
  3277 		if( this.hasVisibleRows && this.visibleRows.tf_Has(rowIndex) && !this.paging )
       
  3278 			isValid = true;
       
  3279 		
       
  3280 		var displayFlag = (isValid) ? '' : 'none';
       
  3281 		var validFlag = (isValid) ? 'true' : 'false';		
       
  3282 		row.style.display = displayFlag;
       
  3283 		
       
  3284 		if( this.paging ) 
       
  3285 			row.setAttribute('validRow',validFlag);
       
  3286 	},
       
  3287 	
       
  3288 	ValidateAllRows: function()
       
  3289 	/*====================================================
       
  3290 		- Validates all filterable rows
       
  3291 	=====================================================*/
       
  3292 	{
       
  3293 		if( !this.hasGrid ) return;
       
  3294 		this.validRowsIndex = [];
       
  3295 		for(var k=this.refRow; k<this.nbFilterableRows; k++)
       
  3296 		{
       
  3297 			this.SetRowValidation(k,true);
       
  3298 			this.validRowsIndex.push(k);
       
  3299 		}
       
  3300 	},
       
  3301 	
       
  3302 	SetFilterValue: function(index,searcharg,doFilter)
       
  3303 	/*====================================================
       
  3304 		- Inserts value in a specified filter
       
  3305 		- Params:
       
  3306 			- index: filter column index (numeric value)
       
  3307 			- searcharg: search string
       
  3308 			- doFilter: optional boolean for multiple
       
  3309 			selects: executes filtering when multiple 
       
  3310 			select populated... IE only!
       
  3311 	=====================================================*/
       
  3312 	{
       
  3313 		if( (!this.fltGrid && !this.isFirstLoad) || tf_Id(this.fltIds[index])==null ) return;
       
  3314 		var slc = tf_Id(this.fltIds[index]);
       
  3315 		var execFilter = (doFilter==undefined) ? true : doFilter;
       
  3316 		searcharg = (searcharg==undefined) ? '' : searcharg;
       
  3317 		
       
  3318 		if( this['col'+index]!=this.fltTypeMulti && 
       
  3319 			this['col'+index]!=this.fltTypeCheckList )
       
  3320 			slc.value = searcharg;
       
  3321 			
       
  3322 		else if(this['col'+index] == this.fltTypeMulti)
       
  3323 		{//multiple selects
       
  3324 			var s = searcharg.split(' '+this.orOperator+' ');
       
  3325 			var ct = 0; //keywords counter
       
  3326 			for(var j=0; j<slc.options.length; j++) 
       
  3327 			{
       
  3328 				if(s=='') slc.options[j].selected = false;
       
  3329 				if(slc.options[j].value=='') slc.options[j].selected = false;
       
  3330 				if(slc.options[j].value!='' && s.tf_Has(slc.options[j].value,true))
       
  3331 				{
       
  3332 					if(tf_isIE)
       
  3333 					{// IE multiple selection work-around
       
  3334 						//when last value reached filtering can be executed
       
  3335 						var filter = (ct==(s.length-1) && execFilter) ? true : false;
       
  3336 						this.__deferMultipleSelection(slc,j,filter);
       
  3337 						ct++;
       
  3338 					}					
       
  3339 					else
       
  3340 						slc.options[j].selected = true;
       
  3341 				}//if
       
  3342 			}//for j
       
  3343 		}
       
  3344 		
       
  3345 		else if(this['col'+index]==this.fltTypeCheckList)
       
  3346 		{//checklist
       
  3347 			searcharg = searcharg.tf_MatchCase(this.matchCase);
       
  3348 			var s = searcharg.split(' '+this.orOperator+' ');
       
  3349 			var fltValue = slc.setAttribute('value','');
       
  3350 			var fltIndex = slc.setAttribute('indexes','');
       
  3351 			for(var k=0; k<tf_Tag(slc,'li').length; k++) 
       
  3352 			{
       
  3353 				var li = tf_Tag(slc,'li')[k];
       
  3354 				var lbl = tf_Tag(li,'label')[0];
       
  3355 				var chk = tf_Tag(li,'input')[0];
       
  3356 				var lblTxt = tf_GetNodeText(lbl).tf_MatchCase(this.matchCase);
       
  3357 				if(lblTxt!='' && s.tf_Has(lblTxt,true))
       
  3358 				{
       
  3359 					chk.checked = true;
       
  3360 					this.__setCheckListValues(chk);
       
  3361 				}
       
  3362 				else{ 
       
  3363 					chk.checked = false;
       
  3364 					this.__setCheckListValues(chk);
       
  3365 				}
       
  3366 			}
       
  3367 		}
       
  3368 	},
       
  3369 
       
  3370 	SetColWidths: function(rowIndex)
       
  3371 	/*====================================================
       
  3372 		- sets coluun widths in pixels
       
  3373 	=====================================================*/
       
  3374 	{
       
  3375 		if( !this.fltGrid || !this.hasColWidth ) return;
       
  3376 		var o = this, rIndex;
       
  3377 		if(rowIndex==undefined) rIndex = this.tbl.rows[0].style.display!='none' ? 0 : 1;
       
  3378 		else rIndex = rowIndex;
       
  3379 		setWidths( this.tbl.rows[rIndex] );
       
  3380 
       
  3381 		function setWidths( row )
       
  3382 		{
       
  3383 			if( !o && (o.nbCells!=o.colWidth.length) ) return;
       
  3384 			if( o.nbCells==row.cells.length )
       
  3385 				for(var k=0; k<o.nbCells; k++)
       
  3386 					row.cells[k].style.width = o.colWidth[k];
       
  3387 		}
       
  3388 	},
       
  3389 	
       
  3390 	SetVisibleRows: function()
       
  3391 	/*====================================================
       
  3392 		- makes a row always visible
       
  3393 		- Note this works only if paging is false
       
  3394 	=====================================================*/
       
  3395 	{
       
  3396 		if( this.hasGrid && this.hasVisibleRows && !this.paging )
       
  3397 		{
       
  3398 			for(var i=0; i<this.visibleRows.length; i++)
       
  3399 			{
       
  3400 				if(this.visibleRows[i]<=this.nbRows)//row index cannot be > nrows
       
  3401 					this.SetRowValidation(this.visibleRows[i],true);
       
  3402 			}//for i
       
  3403 		}//if hasGrid
       
  3404 	},
       
  3405 	
       
  3406 	SetRowBg: function(rIndex,index)
       
  3407 	/*====================================================
       
  3408 		- sets row background color
       
  3409 		- Params:
       
  3410 			- rIndex: row index (numeric value)
       
  3411 			- index: valid row collection index needed to
       
  3412 			calculate bg color
       
  3413 	=====================================================*/
       
  3414 	{
       
  3415 		if(!this.alternateBgs || isNaN(rIndex)) return;
       
  3416 		var rows = this.tbl.rows;
       
  3417 		var i = (index==undefined) ? rIndex : index;
       
  3418 		this.RemoveRowBg(rIndex);
       
  3419 		tf_addClass(
       
  3420 			rows[rIndex],
       
  3421 			(i%2 == 0) ? this.rowBgEvenCssClass : this.rowBgOddCssClass
       
  3422 		);
       
  3423 	},
       
  3424 	
       
  3425 	RemoveRowBg: function(index)
       
  3426 	/*====================================================
       
  3427 		- removes row background color
       
  3428 		- Params:
       
  3429 			- index: row index (numeric value)
       
  3430 	=====================================================*/
       
  3431 	{
       
  3432 		if(isNaN(index)) return;
       
  3433 		var rows = this.tbl.rows;
       
  3434 		tf_removeClass(rows[index],this.rowBgOddCssClass);
       
  3435 		tf_removeClass(rows[index],this.rowBgEvenCssClass);
       
  3436 	},
       
  3437 	
       
  3438 	SetAlternateRows: function()
       
  3439 	/*====================================================
       
  3440 		- alternates row colors for better readability
       
  3441 	=====================================================*/
       
  3442 	{
       
  3443 		if( !this.hasGrid && !this.isFirstLoad ) return;
       
  3444 		var rows = this.tbl.rows;
       
  3445 		var noValidRowsIndex = this.validRowsIndex==null;
       
  3446 		var beginIndex = (noValidRowsIndex) ? this.refRow : 0; //1st index
       
  3447 		var indexLen = (noValidRowsIndex) // nb indexes
       
  3448 			? (this.nbFilterableRows+beginIndex) : this.validRowsIndex.length;
       
  3449 
       
  3450 		for(var j=beginIndex; j<indexLen; j++)//alternates bg color
       
  3451 		{
       
  3452 			var rIndex = (noValidRowsIndex) ? j : this.validRowsIndex[j];
       
  3453 			this.SetRowBg(rIndex);
       
  3454 		}
       
  3455 	},
       
  3456 	
       
  3457 	RemoveAlternateRows: function()
       
  3458 	/*====================================================
       
  3459 		- removes alternate row colors
       
  3460 	=====================================================*/
       
  3461 	{
       
  3462 		if(!this.hasGrid) return;
       
  3463 		var row = this.tbl.rows;
       
  3464 		for(var i=this.refRow; i<this.nbRows; i++)
       
  3465 			this.RemoveRowBg(i);
       
  3466 		this.isStartBgAlternate = true;
       
  3467 	},
       
  3468 	
       
  3469 	SetColOperation: function()
       
  3470 	/*====================================================
       
  3471 		- Calculates values of a column
       
  3472 		- params are stored in 'colOperation' table's
       
  3473 		attribute
       
  3474 			- colOperation['id'] contains ids of elements 
       
  3475 			showing result (array)
       
  3476 			- colOperation['col'] contains index of 
       
  3477 			columns (array)
       
  3478 			- colOperation['operation'] contains operation
       
  3479 			type (array, values: sum, mean)
       
  3480 			- colOperation['write_method'] array defines 
       
  3481 			which method to use for displaying the 
       
  3482 			result (innerHTML, setValue, createTextNode).
       
  3483 			Note that innerHTML is the default value.
       
  3484 			- colOperation['tot_row_index'] defines in 
       
  3485 			which row results are displayed (integers array)
       
  3486 			
       
  3487 		- changes made by nuovella: 
       
  3488 		(1) optimized the routine (now it will only 
       
  3489 		process each column once),
       
  3490 		(2) added calculations for the median, lower and 
       
  3491 		upper quartile.
       
  3492 	=====================================================*/
       
  3493 	{
       
  3494 		if( !this.isFirstLoad && !this.hasGrid ) return;
       
  3495 		
       
  3496 		if(this.onBeforeOperation) this.onBeforeOperation.call(null,this);
       
  3497 		
       
  3498 		var labelId = this.colOperation['id'];
       
  3499 		var colIndex = this.colOperation['col'];
       
  3500 		var operation = this.colOperation['operation'];
       
  3501 		var outputType = this.colOperation['write_method'];
       
  3502 		var totRowIndex = this.colOperation['tot_row_index'];
       
  3503 		var excludeRow = this.colOperation['exclude_row'];
       
  3504 		var decimalPrecision = this.colOperation['decimal_precision']!=undefined
       
  3505 								? this.colOperation['decimal_precision'] : 2;
       
  3506 		
       
  3507 		//nuovella: determine unique list of columns to operate on
       
  3508 		var ucolIndex =[]; 
       
  3509 		var ucolMax=0;
       
  3510 		
       
  3511 		ucolIndex[ucolMax]=colIndex[0];
       
  3512 		
       
  3513 		for(var i=1; i<colIndex.length; i++)
       
  3514 		{
       
  3515 			saved=0;
       
  3516 			//see if colIndex[i] is already in the list of unique indexes
       
  3517 			for(var j=0; j<=ucolMax; j++ )
       
  3518 			{
       
  3519 				if (ucolIndex[j]==colIndex[i])
       
  3520 					saved=1;
       
  3521 			}
       
  3522 			if (saved==0)
       
  3523 			{//if not saved then, save the index;
       
  3524 				ucolMax++;
       
  3525 				ucolIndex[ucolMax]=colIndex[i];
       
  3526 			}
       
  3527 		}// for i
       
  3528 		
       
  3529 		if( (typeof labelId).tf_LCase()=='object' 
       
  3530 			&& (typeof colIndex).tf_LCase()=='object' 
       
  3531 			&& (typeof operation).tf_LCase()=='object' )
       
  3532 		{
       
  3533 			var row = this.tbl.rows;
       
  3534 			var colvalues = [];
       
  3535 			
       
  3536 			for(var ucol=0; ucol<=ucolMax; ucol++)
       
  3537 			{
       
  3538 				//this retrieves col values 
       
  3539 				//use ucolIndex because we only want to pass through this loop once for each column
       
  3540 				//get the values in this unique column
       
  3541 				colvalues.push( this.GetColValues(ucolIndex[ucol],true,excludeRow) );
       
  3542 				
       
  3543 			   //next: calculate all operations for this column
       
  3544 			   var result, nbvalues=0,  temp;
       
  3545 			   var meanValue=0, sumValue=0, minValue=null, maxValue=null, q1Value=null, medValue=null, q3Value=null;
       
  3546 			   var meanFlag=0, sumFlag=0, minFlag=0, maxFlag=0, q1Flag=0, medFlag=0, q3Flag=0;
       
  3547 			   var theList=[];
       
  3548 			   var opsThisCol=[], decThisCol=[], labThisCol=[], oTypeThisCol=[];
       
  3549 			   var mThisCol=-1;
       
  3550 				
       
  3551 				for(var i=0; i<colIndex.length; i++)
       
  3552 				{
       
  3553 					 if (colIndex[i]==ucolIndex[ucol])
       
  3554 					 {
       
  3555 						mThisCol++;
       
  3556 						opsThisCol[mThisCol]=operation[i].tf_LCase();
       
  3557 						decThisCol[mThisCol]=decimalPrecision[i];
       
  3558 						labThisCol[mThisCol]=labelId[i]; 
       
  3559 						oTypeThisCol = (outputType != undefined && (typeof outputType).tf_LCase()=='object') 
       
  3560 											? outputType[i] : null;
       
  3561 						
       
  3562 						switch( opsThisCol[mThisCol] )
       
  3563 						{			
       
  3564 							case 'mean':
       
  3565 								meanFlag=1;
       
  3566 							break;
       
  3567 							case 'sum':
       
  3568 								sumFlag=1;
       
  3569 							break;
       
  3570 							case 'min':
       
  3571 								minFlag=1;
       
  3572 							break;
       
  3573 							case 'max':
       
  3574 								maxFlag=1;
       
  3575 							break;
       
  3576 							case 'median':
       
  3577 								medFlag=1;	
       
  3578 								break;
       
  3579 							case 'q1':
       
  3580 								q1Flag=1;
       
  3581 							break;
       
  3582 							case 'q3':
       
  3583 								q3Flag=1;
       
  3584 							break;
       
  3585 						}
       
  3586 					}		
       
  3587 				}
       
  3588 				
       
  3589 				for(var j=0; j<colvalues[ucol].length; j++ )
       
  3590 				{
       
  3591 					if ((q1Flag==1)||(q3Flag==1) || (medFlag==1))
       
  3592 					{//sort the list for calculation of median and quartiles
       
  3593 						if (j<colvalues[ucol].length -1)
       
  3594 						{
       
  3595 							for(k=j+1;k<colvalues[ucol].length; k++) {
       
  3596 				  
       
  3597 								if( eval(colvalues[ucol][k]) < eval(colvalues[ucol][j]))
       
  3598 								{
       
  3599 									temp = colvalues[ucol][j];            
       
  3600 									colvalues[ucol][j] = colvalues[ucol][k];              
       
  3601 									colvalues[ucol][k] = temp;            
       
  3602 								}
       
  3603 							}
       
  3604 						}
       
  3605 					}
       
  3606 					var cvalue = parseFloat(colvalues[ucol][j]);
       
  3607 					theList[j]=parseFloat( cvalue );
       
  3608 	
       
  3609 					if( !isNaN(cvalue) )
       
  3610 					{
       
  3611 						nbvalues++;
       
  3612 						if ((sumFlag==1)|| (meanFlag==1)) sumValue += parseFloat( cvalue );
       
  3613 						if (minFlag==1) 
       
  3614 						{
       
  3615 							if (minValue==null)
       
  3616 							{
       
  3617 								minValue = parseFloat( cvalue );
       
  3618 							}
       
  3619 							else minValue= parseFloat( cvalue )<minValue? parseFloat( cvalue ): minValue;
       
  3620 						}
       
  3621 						if (maxFlag==1) {
       
  3622 							if (maxValue==null)
       
  3623 							{maxValue = parseFloat( cvalue );}
       
  3624 						else {maxValue= parseFloat( cvalue )>maxValue? parseFloat( cvalue ): maxValue;}
       
  3625 						}
       
  3626 					}
       
  3627 				}//for j
       
  3628 				if (meanFlag==1) meanValue = sumValue/nbvalues;
       
  3629 				if (medFlag==1)
       
  3630 				{
       
  3631 						var aux = 0;
       
  3632 						if(nbvalues%2 == 1) 
       
  3633 						{
       
  3634 							aux = Math.floor(nbvalues/2);
       
  3635 							medValue = theList[aux];   
       
  3636 						}
       
  3637 					else medValue = (theList[nbvalues/2]+theList[((nbvalues/2)-1)])/2;
       
  3638 				}
       
  3639 				if (q1Flag==1)
       
  3640 				{	
       
  3641 					var posa=0.0;
       
  3642 					posa = Math.floor(nbvalues/4);
       
  3643 					if (4*posa == nbvalues) {q1Value = (theList[posa-1] + theList[posa])/2;}
       
  3644 					else {q1Value = theList[posa];}
       
  3645 				}
       
  3646 				if (q3Flag==1)
       
  3647 				{
       
  3648 					var posa=0.0;
       
  3649 					var posb=0.0;
       
  3650 					posa = Math.floor(nbvalues/4);
       
  3651 					if (4*posa == nbvalues)
       
  3652 					{
       
  3653 						posb = 3*posa;
       
  3654 						q3Value = (theList[posb] + theList[posb-1])/2;  
       
  3655 					}
       
  3656 					else
       
  3657 						q3Value = theList[nbvalues-posa-1];
       
  3658 				}
       
  3659 				
       
  3660 				for(var i=0; i<=mThisCol; i++ )
       
  3661 				{
       
  3662 				   switch( opsThisCol[i] )
       
  3663 				   {			
       
  3664 						case 'mean':
       
  3665 							result=meanValue;
       
  3666 						break;
       
  3667 						case 'sum':
       
  3668 							result=sumValue;
       
  3669 						break;
       
  3670 						case 'min':
       
  3671 							result=minValue;
       
  3672 						break;
       
  3673 						case 'max':
       
  3674 							result=maxValue;
       
  3675 						break;
       
  3676 						case 'median':
       
  3677 							result=medValue;	
       
  3678 							break;
       
  3679 						case 'q1':
       
  3680 							result=q1Value;
       
  3681 						break;
       
  3682 						case 'q3':
       
  3683 							result=q3Value;
       
  3684 						break;
       
  3685 				  }		
       
  3686 					
       
  3687 				var precision = decThisCol[i]!=undefined && !isNaN( decThisCol[i] )
       
  3688 									? decThisCol[i] : 2;
       
  3689 
       
  3690 				if(oTypeThisCol!=null && result)
       
  3691 				{//if outputType is defined
       
  3692 					result = result.toFixed( precision );
       
  3693 					if( tf_Id( labThisCol[i] )!=undefined )
       
  3694 					{
       
  3695 						switch( oTypeThisCol.tf_LCase() )
       
  3696 						{
       
  3697 							case 'innerhtml':							
       
  3698 								if (isNaN(result) || !isFinite(result) || (nbvalues==0)) 
       
  3699 									tf_Id( labThisCol[i] ).innerHTML = '.';
       
  3700 								else
       
  3701 									tf_Id( labThisCol[i] ).innerHTML = result;
       
  3702 							break;
       
  3703 							case 'setvalue':
       
  3704 								tf_Id( labThisCol[i] ).value = result;
       
  3705 							break;
       
  3706 							case 'createtextnode':
       
  3707 								var oldnode = tf_Id( labThisCol[i] ).firstChild;
       
  3708 								var txtnode = tf_CreateText( result );
       
  3709 								tf_Id( labThisCol[i] ).replaceChild( txtnode,oldnode );
       
  3710 							break;
       
  3711 						}//switch
       
  3712 					}
       
  3713 				} else {
       
  3714 					try
       
  3715 					{      
       
  3716 						if (isNaN(result) || !isFinite(result) || (nbvalues==0)) 
       
  3717 							tf_Id( labThisCol[i] ).innerHTML = '.';
       
  3718 						else
       
  3719 							 tf_Id( labThisCol[i] ).innerHTML = result.toFixed( precision );
       
  3720 					} catch(e){ }//catch
       
  3721 				}//else
       
  3722 			 }//for i
       
  3723 			//eventual row(s) with result are always visible
       
  3724 			if(totRowIndex!=undefined && row[totRowIndex[ucol]]) 
       
  3725 				row[totRowIndex[ucol]].style.display = '';
       
  3726 			}//for ucol
       
  3727 		}//if typeof
       
  3728 		
       
  3729 		if(this.onAfterOperation) this.onAfterOperation.call(null,this);
       
  3730 	},
       
  3731 	
       
  3732 	SetPage: function( cmd )
       
  3733 	/*====================================================
       
  3734 		- If paging set true shows page according to
       
  3735 		param value (string or number):
       
  3736 			- strings: 'next','previous','last','first' or
       
  3737 			- number: page number
       
  3738 	=====================================================*/
       
  3739 	{
       
  3740 		if( this.hasGrid && this.paging )
       
  3741 		{
       
  3742 			var btnEvt = this.pagingBtnEvents, cmdtype = typeof cmd;
       
  3743 			if(cmdtype=='string')
       
  3744 			{
       
  3745 				switch(cmd.tf_LCase())
       
  3746 				{
       
  3747 					case 'next':
       
  3748 						btnEvt.next();
       
  3749 					break;
       
  3750 					case 'previous':
       
  3751 						btnEvt.prev();
       
  3752 					break;
       
  3753 					case 'last':
       
  3754 						btnEvt.last();
       
  3755 					break;
       
  3756 					case 'first':
       
  3757 						btnEvt.first();
       
  3758 					break;
       
  3759 					default:
       
  3760 						btnEvt.next();
       
  3761 					break;
       
  3762 				}//switch
       
  3763 			}
       
  3764 			if(cmdtype=='number') this.ChangePage( (cmd-1) );
       
  3765 		}// this.hasGrid 
       
  3766 	},
       
  3767 	
       
  3768 	RefreshFiltersGrid: function()
       
  3769 	/*====================================================
       
  3770 		- retrieves select, multiple and checklist filters
       
  3771 		- calls method repopulating filters
       
  3772 	=====================================================*/
       
  3773 	{
       
  3774 		var slcA1 = this.GetFiltersByType( this.fltTypeSlc,true );
       
  3775 		var slcA2 = this.GetFiltersByType( this.fltTypeMulti,true );
       
  3776 		var slcA3 = this.GetFiltersByType( this.fltTypeCheckList,true );
       
  3777 		var slcIndex = slcA1.concat(slcA2);
       
  3778 		slcIndex = slcIndex.concat(slcA3);
       
  3779 
       
  3780 		if( this.activeFilterId!=null )//for paging
       
  3781 		{
       
  3782 			var activeFlt = this.activeFilterId.split('_')[0];
       
  3783 			activeFlt = activeFlt.split(this.prfxFlt)[1];
       
  3784 			var slcSelectedValue;
       
  3785 			for(var i=0; i<slcIndex.length; i++)
       
  3786 			{
       
  3787 				var curSlc = tf_Id(this.fltIds[slcIndex[i]]);
       
  3788 				slcSelectedValue = this.GetFilterValue( slcIndex[i] );
       
  3789 				//if(activeFlt==slcIndex[i] && slcA3.tf_Has(slcIndex[i]) && slcSelectedValue!=this.displayAllText) continue;
       
  3790 				if(activeFlt!=slcIndex[i] || (this.paging && slcA1.tf_Has(slcIndex[i]) && activeFlt==slcIndex[i] ) || 
       
  3791 					( !this.paging && (slcA3.tf_Has(slcIndex[i]) || slcA2.tf_Has(slcIndex[i]) ) /*&& activeFlt==slcIndex[i]*/) || 
       
  3792 					slcSelectedValue==this.displayAllText )
       
  3793 					//(this.paging && (!slcA3.tf_Has(slcIndex[i]) && !slcA2.tf_Has(slcIndex[i]) && activeFlt==slcIndex[i]) ) )
       
  3794 				{
       
  3795 					if(slcA3.tf_Has(slcIndex[i]))
       
  3796 						this.checkListDiv[slcIndex[i]].innerHTML = '';
       
  3797 					else curSlc.innerHTML = '';
       
  3798 					
       
  3799 					if(this.fillSlcOnDemand) { //1st option needs to be inserted
       
  3800 						var opt0 = tf_CreateOpt(this.displayAllText,'');
       
  3801 						curSlc.appendChild( opt0 );
       
  3802 					}
       
  3803 					
       
  3804 					if(slcA3.tf_Has(slcIndex[i]))
       
  3805 						this._PopulateCheckList(slcIndex[i]);
       
  3806 					else
       
  3807 						this._PopulateSelect(slcIndex[i],true);
       
  3808 						
       
  3809 					this.SetFilterValue(slcIndex[i],slcSelectedValue);
       
  3810 				}
       
  3811 			}// for i
       
  3812 		}
       
  3813 	},
       
  3814 	
       
  3815 	RememberFiltersValue: function( name )
       
  3816 	/*==============================================
       
  3817 		- stores filters' values in a cookie
       
  3818 		when Filter() method is called
       
  3819 		- Params:
       
  3820 			- name: cookie name (string)
       
  3821 		- credits to Florent Hirchy
       
  3822 	===============================================*/
       
  3823 	{
       
  3824 		var flt_values = [];
       
  3825 		for(var i=0; i<this.fltIds.length; i++)
       
  3826 		{//creates an array with filters' values
       
  3827 			value = this.GetFilterValue(i);
       
  3828 			if (value == '') value = ' ';
       
  3829 			flt_values.push(value);
       
  3830 		}
       
  3831 		flt_values.push(this.fltIds.length); //adds array size
       
  3832 		tf_WriteCookie(
       
  3833 			name,
       
  3834 			flt_values,
       
  3835 			this.cookieDuration
       
  3836 		); //writes cookie  
       
  3837 	},
       
  3838 	
       
  3839 	RememberPageNb: function( name )
       
  3840 	/*==============================================
       
  3841 		- stores page number value in a cookie
       
  3842 		when ChangePage method is called
       
  3843 		- Params:
       
  3844 			- name: cookie name (string)
       
  3845 	===============================================*/
       
  3846 	{
       
  3847 		tf_WriteCookie(
       
  3848 			name,
       
  3849 			this.currentPageNb,
       
  3850 			this.cookieDuration
       
  3851 		); //writes cookie  
       
  3852 	},
       
  3853 	
       
  3854 	RememberPageLength: function( name )
       
  3855 	/*==============================================
       
  3856 		- stores page length value in a cookie
       
  3857 		when ChangePageLength method is called
       
  3858 		- Params:
       
  3859 			- name: cookie name (string)
       
  3860 	===============================================*/
       
  3861 	{
       
  3862 		tf_WriteCookie(
       
  3863 			name,
       
  3864 			this.resultsPerPageSlc.selectedIndex,
       
  3865 			this.cookieDuration
       
  3866 		); //writes cookie
       
  3867 	},
       
  3868 	
       
  3869 	ResetValues: function()
       
  3870 	{ 
       
  3871 		this.EvtManager(this.Evt.name.resetvalues); 
       
  3872 	},
       
  3873 	
       
  3874 	_ResetValues: function()
       
  3875 	/*==============================================
       
  3876 		- re-sets grid values when page is 
       
  3877 		re-loaded. It invokes ResetGridValues,
       
  3878 		ResetPage and ResetPageLength methods
       
  3879 		- Params:
       
  3880 			- name: cookie name (string)
       
  3881 	===============================================*/
       
  3882 	{
       
  3883 		if(this.rememberGridValues && this.fillSlcOnDemand) //only fillSlcOnDemand
       
  3884 			this.ResetGridValues(this.fltsValuesCookie);
       
  3885 		if(this.rememberPageLen) this.ResetPageLength( this.pgLenCookie );
       
  3886 		if(this.rememberPageNb) this.ResetPage( this.pgNbCookie );		
       
  3887 	},	
       
  3888 	
       
  3889 	ResetGridValues: function( name )
       
  3890 	/*==============================================
       
  3891 		- re-sets filters' values when page is 
       
  3892 		re-loaded if load on demand is enabled
       
  3893 		- Params:
       
  3894 			- name: cookie name (string)
       
  3895 		- credits to Florent Hirchy
       
  3896 	===============================================*/
       
  3897 	{
       
  3898 		if(!this.fillSlcOnDemand) return;
       
  3899 		var flts = tf_ReadCookie(name); //reads the cookie
       
  3900 		var reg = new RegExp(',','g');	
       
  3901 		var flts_values = flts.split(reg); //creates an array with filters' values
       
  3902 		var slcFltsIndex = this.GetFiltersByType(this.fltTypeSlc, true);
       
  3903 		var multiFltsIndex = this.GetFiltersByType(this.fltTypeMulti, true);
       
  3904 		
       
  3905 		if(flts_values[(flts_values.length-1)] == this.fltIds.length)
       
  3906 		{//if the number of columns is the same as before page reload
       
  3907 			for(var i=0; i<(flts_values.length - 1); i++)
       
  3908 			{			
       
  3909 				if (flts_values[i]==' ') continue;				
       
  3910 				if(this['col'+i]==this.fltTypeSlc || this['col'+i]==this.fltTypeMulti)
       
  3911 				{// if fillSlcOnDemand, drop-down needs to contain stored value(s) for filtering
       
  3912 					var slc = tf_Id( this.fltIds[i] );
       
  3913 					slc.options[0].selected = false;
       
  3914 					
       
  3915 					if( slcFltsIndex.tf_Has(i) )
       
  3916 					{//selects
       
  3917 						var opt = tf_CreateOpt(flts_values[i],flts_values[i],true);
       
  3918 						slc.appendChild(opt);
       
  3919 						this.hasStoredValues = true;
       
  3920 					}
       
  3921 					if(multiFltsIndex.tf_Has(i))
       
  3922 					{//multiple select
       
  3923 						var s = flts_values[i].split(' '+this.orOperator+' ');
       
  3924 						for(j=0; j<s.length; j++)
       
  3925 						{
       
  3926 							if(s[j]=='') continue;
       
  3927 							var opt = tf_CreateOpt(s[j],s[j],true);
       
  3928 							slc.appendChild(opt);
       
  3929 							this.hasStoredValues = true;
       
  3930 							
       
  3931 							if(tf_isIE)
       
  3932 							{// IE multiple selection work-around
       
  3933 								this.__deferMultipleSelection(slc,j,false);
       
  3934 								hasStoredValues = false;
       
  3935 							}
       
  3936 						}
       
  3937 					}// if multiFltsIndex
       
  3938 				}
       
  3939 				else if(this['col'+i]==this.fltTypeCheckList)
       
  3940 				{
       
  3941 					var divChk = this.checkListDiv[i];
       
  3942 					divChk.title = divChk.innerHTML;
       
  3943 					divChk.innerHTML = '';
       
  3944 					
       
  3945 					var ul = tf_CreateElm('ul',['id',this.fltIds[i]],['colIndex',i]);
       
  3946 					ul.className = this.checkListCssClass;
       
  3947 
       
  3948 					var li0 = tf_CreateCheckItem(this.fltIds[i]+'_0', '', this.displayAllText);
       
  3949 					li0.className = this.checkListItemCssClass;
       
  3950 					ul.appendChild(li0);
       
  3951 
       
  3952 					divChk.appendChild(ul);
       
  3953 					
       
  3954 					var s = flts_values[i].split(' '+this.orOperator+' ');
       
  3955 					for(j=0; j<s.length; j++)
       
  3956 					{
       
  3957 						if(s[j]=='') continue;
       
  3958 						var li = tf_CreateCheckItem(this.fltIds[i]+'_'+(j+1), s[j], s[j]);
       
  3959 						li.className = this.checkListItemCssClass;
       
  3960 						ul.appendChild(li);
       
  3961 						li.check.checked = true;
       
  3962 						this.__setCheckListValues(li.check);
       
  3963 						this.hasStoredValues = true;
       
  3964 					}					
       
  3965 				}
       
  3966 			}//end for
       
  3967 			
       
  3968 			if(!this.hasStoredValues && this.paging) this.SetPagingInfo();
       
  3969 		}//end if
       
  3970 	},
       
  3971 	
       
  3972 	ResetPage: function( name )
       
  3973 	{
       
  3974 		this.EvtManager(this.Evt.name.resetpage);
       
  3975 	},
       
  3976 	_ResetPage: function( name )
       
  3977 	/*==============================================
       
  3978 		- re-sets page nb at page re-load
       
  3979 		- Params:
       
  3980 			- name: cookie name (string)
       
  3981 	===============================================*/
       
  3982 	{
       
  3983 		var pgnb = tf_ReadCookie(name); //reads the cookie
       
  3984 		if( pgnb!='' ) 
       
  3985 			this.ChangePage((pgnb-1));
       
  3986 	},
       
  3987 	
       
  3988 	ResetPageLength: function( name )
       
  3989 	{
       
  3990 		this.EvtManager(this.Evt.name.resetpagelength);
       
  3991 	},
       
  3992 	_ResetPageLength: function( name )
       
  3993 	/*==============================================
       
  3994 		- re-sets page length at page re-load
       
  3995 		- Params:
       
  3996 			- name: cookie name (string)
       
  3997 	===============================================*/
       
  3998 	{
       
  3999 		if(!this.paging) return;
       
  4000 		var pglenIndex = tf_ReadCookie(name); //reads the cookie
       
  4001 		
       
  4002 		if( pglenIndex!='' )
       
  4003 		{
       
  4004 			this.resultsPerPageSlc.options[pglenIndex].selected = true;
       
  4005 			this.ChangeResultsPerPage();
       
  4006 		}
       
  4007 	},
       
  4008 	
       
  4009 	SetLoader: function()
       
  4010 	/*====================================================
       
  4011 		- generates loader div
       
  4012 	=====================================================*/
       
  4013 	{
       
  4014 		if( this.loaderDiv!=null ) return;
       
  4015 		var containerDiv = tf_CreateElm( 'div',['id',this.prfxLoader+this.id] );
       
  4016 		containerDiv.className = this.loaderCssClass;// for ie<=6
       
  4017 		//containerDiv.style.display = 'none';
       
  4018 		var targetEl = (this.loaderTgtId==null) 
       
  4019 			? (this.gridLayout ? this.tblCont : this.tbl.parentNode) : tf_Id( this.loaderTgtId );
       
  4020 		if(this.loaderTgtId==null) targetEl.insertBefore(containerDiv, this.tbl);
       
  4021 		else targetEl.appendChild( containerDiv );
       
  4022 		this.loaderDiv = tf_Id(this.prfxLoader+this.id);
       
  4023 		if(this.loaderHtml==null) 
       
  4024 			this.loaderDiv.appendChild( tf_CreateText(this.loaderText) );
       
  4025 		else this.loaderDiv.innerHTML = this.loaderHtml;
       
  4026 	},
       
  4027 	
       
  4028 	RemoveLoader: function()
       
  4029 	/*====================================================
       
  4030 		- removes loader div
       
  4031 	=====================================================*/
       
  4032 	{
       
  4033 		if( this.loaderDiv==null ) return;
       
  4034 		var targetEl = (this.loaderTgtId==null) 
       
  4035 			? (this.gridLayout ? this.tblCont : this.tbl.parentNode) : tf_Id( this.loaderTgtId );
       
  4036 		targetEl.removeChild(this.loaderDiv);
       
  4037 		this.loaderDiv = null;
       
  4038 	},
       
  4039 	
       
  4040 	ShowLoader: function(p)
       
  4041 	/*====================================================
       
  4042 		- displays/hides loader div
       
  4043 	=====================================================*/
       
  4044 	{
       
  4045 		if(!this.loader || !this.loaderDiv) return;
       
  4046 		if(this.loaderDiv.style.display==p) return;
       
  4047 		var o = this;
       
  4048 
       
  4049 		function displayLoader(){ 
       
  4050 			if(!o.loaderDiv) return;
       
  4051 			if(o.onShowLoader && p!='none') 
       
  4052 				o.onShowLoader.call(null,o);
       
  4053 			o.loaderDiv.style.display = p;
       
  4054 			if(o.onHideLoader && p=='none') 
       
  4055 				o.onHideLoader.call(null,o);
       
  4056 		}
       
  4057 
       
  4058 		var t = (p=='none') ? this.loaderCloseDelay : 1;
       
  4059 		window.setTimeout(displayLoader,t);
       
  4060 	},
       
  4061 	
       
  4062 	StatusMsg: function(t)
       
  4063 	/*====================================================
       
  4064 		- sets status messages
       
  4065 	=====================================================*/
       
  4066 	{
       
  4067 		if(t==undefined) this.StatusMsg('');
       
  4068 		if(this.status) this.WinStatusMsg(t);
       
  4069 		if(this.statusBar) this.StatusBarMsg(t);
       
  4070 	},
       
  4071 	
       
  4072 	StatusBarMsg: function(t)
       
  4073 	/*====================================================
       
  4074 		- sets status bar messages
       
  4075 	=====================================================*/
       
  4076 	{
       
  4077 		if(!this.statusBar || !this.statusBarSpan) return;
       
  4078 		var o = this;
       
  4079 		function setMsg(){
       
  4080 			o.statusBarSpan.innerHTML = t;
       
  4081 		}
       
  4082 		var d = (t=='') ? (this.statusBarCloseDelay) : 1;
       
  4083 		window.setTimeout(setMsg,d);
       
  4084 	},
       
  4085 	
       
  4086 	WinStatusMsg: function(t)
       
  4087 	/*====================================================
       
  4088 		- sets window status messages
       
  4089 	=====================================================*/
       
  4090 	{
       
  4091 		if(!this.status) return;
       
  4092 		window.status = t;
       
  4093 	},
       
  4094 	
       
  4095 	ClearFilters: function()
       
  4096 	{ 
       
  4097 		this.EvtManager(this.Evt.name.clear); 
       
  4098 	},	
       
  4099 	_ClearFilters: function()
       
  4100 	/*====================================================
       
  4101 		- clears grid filters
       
  4102 	=====================================================*/
       
  4103 	{
       
  4104 		if( !this.fltGrid ) return;
       
  4105 		for(var i=0; i<this.fltIds.length; i++)
       
  4106 			this.SetFilterValue(i,'');
       
  4107 		if(this.refreshFilters){
       
  4108 			this.activeFilterId = '';	
       
  4109 			this.RefreshFiltersGrid();
       
  4110 		}
       
  4111 		if(this.rememberPageLen) tf_RemoveCookie(this.pgLenCookie);
       
  4112 		if(this.rememberPageNb) tf_RemoveCookie(this.pgNbCookie);
       
  4113 	},
       
  4114 	
       
  4115 	UnhighlightAll: function()
       
  4116 	/*====================================================
       
  4117 		- removes keyword highlighting
       
  4118 	=====================================================*/
       
  4119 	{
       
  4120 		if( this.highlightKeywords && this.searchArgs!=null )
       
  4121 			for(var y=0; y<this.searchArgs.length; y++)
       
  4122 				tf_UnhighlightWord( 
       
  4123 					this.tbl,this.searchArgs[y],
       
  4124 					this.highlightCssClass 
       
  4125 				);
       
  4126 	},
       
  4127 	
       
  4128 	RefreshGrid: function()
       
  4129 	/*====================================================
       
  4130 		- Re-generates filters grid
       
  4131 	=====================================================*/
       
  4132 	{
       
  4133 		this.RemoveGrid();
       
  4134 		setFilterGrid(this.id, this.startRow, this.fObj);
       
  4135 	},
       
  4136 	
       
  4137 	__resetGrid: function()
       
  4138 	/*====================================================
       
  4139 		- Only used by AddGrid() method
       
  4140 		- Resets filtering grid bar if previously removed
       
  4141 	=====================================================*/
       
  4142 	{
       
  4143 		if( this.isFirstLoad ) return;
       
  4144 		
       
  4145 		// grid was removed, grid row element is stored in this.fltGridEl property
       
  4146 		this.tbl.rows[this.filtersRowIndex].parentNode.insertBefore( 
       
  4147 			this.fltGridEl,
       
  4148 			this.tbl.rows[this.filtersRowIndex]
       
  4149 		);
       
  4150 		
       
  4151 		if( this.isExternalFlt )
       
  4152 		{// filters are appended in external placeholders elements
       
  4153 			for(var ct=0; ct<this.externalFltTgtIds.length; ct++ )
       
  4154 				if( tf_Id(this.externalFltTgtIds[ct]) )
       
  4155 					tf_Id(this.externalFltTgtIds[ct]).appendChild(this.externalFltEls[ct]);
       
  4156 		}
       
  4157 		
       
  4158 		this.nbFilterableRows = this.GetRowsNb();
       
  4159 		this.nbVisibleRows = this.nbFilterableRows;
       
  4160 		this.nbRows = this.tbl.rows.length;
       
  4161 		this.sort = true;
       
  4162 		
       
  4163 		/*** 	ie bug work-around, filters need to be re-generated
       
  4164 				since row is empty; insertBefore method doesn't seem to work properly 
       
  4165 				with previously generated DOM nodes modified by innerHTML 	***/
       
  4166 		if( this.tbl.rows[this.filtersRowIndex].innerHTML=='' )
       
  4167 		{
       
  4168 			this.tbl.deleteRow(this.filtersRowIndex);
       
  4169 			this.RemoveGrid();
       
  4170 			this.RemoveExternalFlts();
       
  4171 			this.fltIds = [];
       
  4172 			this.isFirstLoad = true;
       
  4173 			this.AddGrid();
       
  4174 			
       
  4175 		}
       
  4176 		
       
  4177 		this.hasGrid = true;
       
  4178 	},
       
  4179 	
       
  4180 	__deferMultipleSelection: function(slc,index,filter)
       
  4181 	/*====================================================
       
  4182 		- IE bug: it seems there is no way to make 
       
  4183 		multiple selections programatically, only last 
       
  4184 		selection is kept (multiple select previously 
       
  4185 		populated via DOM)
       
  4186 		- Turn-around: defer selection with a setTimeout
       
  4187 		If you find an alternative elegant solution to 
       
  4188 		this let me know ;-)
       
  4189 		- For the moment only this solution seems 
       
  4190 		to work!
       
  4191 		- Params: 
       
  4192 			- slc = select object (select obj)
       
  4193 			- index to be selected (integer)
       
  4194 			- execute filtering (boolean)
       
  4195 	=====================================================*/
       
  4196 	{
       
  4197 		if(slc.nodeName.tf_LCase() != 'select') return;
       
  4198 		var doFilter = (filter==undefined) ? false : filter;
       
  4199 		var o = this;
       
  4200 		window.setTimeout(
       
  4201 			function(){
       
  4202 				slc.options[0].selected = false;
       
  4203 				
       
  4204 				if(slc.options[index].value=='') 
       
  4205 					slc.options[index].selected = false;
       
  4206 				else
       
  4207 				slc.options[index].selected = true; 
       
  4208 				if(doFilter) o.Filter();
       
  4209 			},
       
  4210 			.1
       
  4211 		);
       
  4212 	},
       
  4213 	
       
  4214 	__getCustomValues: function(colIndex)
       
  4215 	/*====================================================
       
  4216 		- Returns an array [[values],[texts]] with 
       
  4217 		custom values for a given filter
       
  4218 		- Param: column index (integer)
       
  4219 	=====================================================*/
       
  4220 	{
       
  4221 		if(colIndex==undefined) return;
       
  4222 		var isCustomSlc = (this.hasCustomSlcOptions  //custom select test
       
  4223 							&& this.customSlcOptions.cols.tf_Has(colIndex));
       
  4224 		if(!isCustomSlc) return;
       
  4225 		var optTxt = [], optArray = [];
       
  4226 		var index = this.customSlcOptions.cols.tf_IndexByValue(colIndex);
       
  4227 		var slcValues = this.customSlcOptions.values[index];
       
  4228 		var slcTexts = this.customSlcOptions.texts[index];
       
  4229 		var slcSort = this.customSlcOptions.sorts[index];
       
  4230 		for(var r=0; r<slcValues.length; r++)
       
  4231 		{
       
  4232 			optArray.push(slcValues[r]);
       
  4233 			if(slcTexts[r]!=undefined)
       
  4234 				optTxt.push(slcTexts[r]);
       
  4235 			else
       
  4236 				optTxt.push(slcValues[r]);
       
  4237 		}
       
  4238 		if(slcSort)
       
  4239 		{
       
  4240 			optArray.sort();
       
  4241 			optTxt.sort();
       
  4242 		}
       
  4243 		return [optArray,optTxt];
       
  4244 	},
       
  4245 	
       
  4246 	__setCheckListValues: function(o)
       
  4247 	/*====================================================
       
  4248 		- Sets checked items information of a checklist
       
  4249 	=====================================================*/
       
  4250 	{
       
  4251 		if(o==null) return;
       
  4252 		var chkValue = o.value; //checked item value
       
  4253 		var chkIndex = parseInt(o.id.split('_')[2]);
       
  4254 		var filterTag = 'ul', itemTag = 'li';
       
  4255 		var n = o;
       
  4256 		
       
  4257 		//ul tag search
       
  4258 		while(n.nodeName.tf_LCase() != filterTag)
       
  4259 			n = n.parentNode;
       
  4260 
       
  4261 		if(n.nodeName.tf_LCase() != filterTag) return;
       
  4262 		
       
  4263 		var li = n.childNodes[chkIndex];
       
  4264 		var colIndex = n.getAttribute('colIndex');
       
  4265 		var fltValue = n.getAttribute('value'); //filter value (ul tag)
       
  4266 		var fltIndexes = n.getAttribute('indexes'); //selected items (ul tag)
       
  4267 
       
  4268 		if(o.checked)		
       
  4269 		{
       
  4270 			if(chkValue=='')
       
  4271 			{//show all item
       
  4272 				if((fltIndexes!=null && fltIndexes!=''))
       
  4273 				{
       
  4274 					var indSplit = fltIndexes.split(this.separator);//items indexes
       
  4275 					for(var u=0; u<indSplit.length; u++)
       
  4276 					{//checked items loop
       
  4277 						var cChk = tf_Id(this.fltIds[colIndex]+'_'+indSplit[u]); //checked item
       
  4278 						if(cChk)
       
  4279 						{ 
       
  4280 							cChk.checked = false;
       
  4281 							tf_removeClass(
       
  4282 								n.childNodes[indSplit[u]],
       
  4283 								this.checkListSlcItemCssClass
       
  4284 							);
       
  4285 						}
       
  4286 					}
       
  4287 				}
       
  4288 				n.setAttribute('value', '');
       
  4289 				n.setAttribute('indexes', '');
       
  4290 				
       
  4291 			} else {
       
  4292 				fltValue = (fltValue) ? fltValue : '';
       
  4293 				chkValue = (fltValue+' '+chkValue +' '+this.orOperator).tf_Trim();
       
  4294 				chkIndex = fltIndexes + chkIndex + this.separator;
       
  4295 				n.setAttribute('value', chkValue );
       
  4296 				n.setAttribute('indexes', chkIndex);
       
  4297 				//1st option unchecked
       
  4298 				if(tf_Id(this.fltIds[colIndex]+'_0'))
       
  4299 					tf_Id(this.fltIds[colIndex]+'_0').checked = false; 
       
  4300 			}
       
  4301 			
       
  4302 			if(li.nodeName.tf_LCase() == itemTag)
       
  4303 			{
       
  4304 				tf_removeClass(n.childNodes[0],this.checkListSlcItemCssClass);
       
  4305 				tf_addClass(li,this.checkListSlcItemCssClass);
       
  4306 			}
       
  4307 		} else { //removes values and indexes
       
  4308 			if(chkValue!='')
       
  4309 			{
       
  4310 				var replaceValue = new RegExp(tf_RegexpEscape(chkValue+' '+this.orOperator));
       
  4311 				fltValue = fltValue.replace(replaceValue,'');
       
  4312 				n.setAttribute('value', fltValue);
       
  4313 				
       
  4314 				var replaceIndex = new RegExp(tf_RegexpEscape(chkIndex + this.separator));
       
  4315 				fltIndexes = fltIndexes.replace(replaceIndex,'');
       
  4316 				n.setAttribute('indexes', fltIndexes);
       
  4317 			}
       
  4318 			if(li.nodeName.tf_LCase() == itemTag)
       
  4319 				tf_removeClass(li,this.checkListSlcItemCssClass);
       
  4320 		}
       
  4321 			
       
  4322 	},
       
  4323 	
       
  4324 	__containsStr: function(arg,data,fltType,forceMatch)
       
  4325 	/*==============================================
       
  4326 		- Checks if data contains searched arg,
       
  4327 		returns a boolean
       
  4328 		- Params:
       
  4329 			- arg: searched string
       
  4330 			- data: data string
       
  4331 			- fltType: filter type (string, 
       
  4332 			exact match by default for selects - 
       
  4333 			optional)
       
  4334 			- forceMatch: boolean forcing exact
       
  4335 			match (optional)
       
  4336 	===============================================*/
       
  4337 	{
       
  4338 		// Improved by Cedric Wartel (cwl)
       
  4339 		// automatic exact match for selects and special characters are now filtered
       
  4340 		var regexp;
       
  4341 		var modifier = (this.matchCase) ? 'g' : 'gi';
       
  4342 		var exactMatch = (forceMatch==undefined) ? this.exactMatch : forceMatch;
       
  4343 		if(exactMatch || (fltType!=this.fltTypeInp && fltType!=undefined))//Váry Péter's patch
       
  4344 			regexp = new RegExp('(^\\s*)'+tf_RegexpEscape(arg)+'(\\s*$)', modifier);							
       
  4345 		else
       
  4346 			regexp = new RegExp(tf_RegexpEscape(arg), modifier);
       
  4347 		return regexp.test(data);
       
  4348 	},
       
  4349 	
       
  4350 	IncludeFile: function(fileId, filePath, callback, type)
       
  4351 	{
       
  4352 		var ftype = (type==undefined) ? 'script' : type;
       
  4353 		var isImported = tf_isImported(filePath, ftype);
       
  4354 		if( isImported ) return;
       
  4355 		
       
  4356 		var o = this, isLoaded = false, file;			
       
  4357 		var head = tf_Tag(document,'head')[0];
       
  4358 		
       
  4359 		if(ftype.tf_LCase() == 'link')
       
  4360 			file = tf_CreateElm(
       
  4361 						'link', ['id',fileId], ['type','text/css'],
       
  4362 						['rel','stylesheet'], ['href',filePath]
       
  4363 					);
       
  4364 		else
       
  4365 			file = tf_CreateElm(
       
  4366 						'script', ['id',fileId], 
       
  4367 						['type','text/javascript'], ['src',filePath]
       
  4368 					);
       
  4369 
       
  4370 		file.onload = file.onreadystatechange = function()
       
  4371 		{
       
  4372 			if (!isLoaded && 
       
  4373 				(!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) 
       
  4374 			{
       
  4375 				isLoaded = true;
       
  4376 				if (typeof callback === 'function')
       
  4377 					callback(o);
       
  4378 			}
       
  4379 		}
       
  4380 		head.appendChild(file);
       
  4381 	},
       
  4382 	
       
  4383 	/*====================================================
       
  4384 		- Additional public methods for developers
       
  4385 	=====================================================*/
       
  4386 	
       
  4387 	HasGrid: function()
       
  4388 	/*====================================================
       
  4389 		- checks if table has a filter grid
       
  4390 		- returns a boolean
       
  4391 	=====================================================*/
       
  4392 	{
       
  4393 		return this.hasGrid;
       
  4394 	},
       
  4395 	
       
  4396 	GetFiltersId: function()
       
  4397 	/*====================================================
       
  4398 		- returns an array containing filters ids
       
  4399 		- Note that hidden filters are also returned
       
  4400 	=====================================================*/
       
  4401 	{
       
  4402 		if( !this.hasGrid ) return;
       
  4403 		return this.fltIds;
       
  4404 	},
       
  4405 	
       
  4406 	GetValidRowsIndex: function()
       
  4407 	/*====================================================
       
  4408 		- returns an array containing valid rows indexes 
       
  4409 		(valid rows upon filtering)
       
  4410 	=====================================================*/
       
  4411 	{
       
  4412 		if( !this.hasGrid ) return;
       
  4413 		return this.validRowsIndex;
       
  4414 	},
       
  4415 	
       
  4416 	GetFiltersRowIndex: function()
       
  4417 	/*====================================================
       
  4418 		- Returns the index of the row containing the 
       
  4419 		filters
       
  4420 	=====================================================*/
       
  4421 	{
       
  4422 		if( !this.hasGrid ) return;
       
  4423 		return this.filtersRowIndex;
       
  4424 	},
       
  4425 	
       
  4426 	GetHeadersRowIndex: function()
       
  4427 	/*====================================================
       
  4428 		- Returns the index of the headers row
       
  4429 	=====================================================*/
       
  4430 	{
       
  4431 		if( !this.hasGrid ) return;
       
  4432 		return this.headersRow;
       
  4433 	},
       
  4434 	
       
  4435 	GetStartRowIndex: function()
       
  4436 	/*====================================================
       
  4437 		- Returns the index of the row from which will 
       
  4438 		start the filtering process (1st filterable row)
       
  4439 	=====================================================*/
       
  4440 	{
       
  4441 		if( !this.hasGrid ) return;
       
  4442 		return this.refRow;
       
  4443 	},
       
  4444 	
       
  4445 	GetLastRowIndex: function()
       
  4446 	/*====================================================
       
  4447 		- Returns the index of the last row
       
  4448 	=====================================================*/
       
  4449 	{
       
  4450 		if( !this.hasGrid ) return;
       
  4451 		return (this.nbRows-1);
       
  4452 	},
       
  4453 	
       
  4454 	AddPaging: function(filterTable)
       
  4455 	/*====================================================
       
  4456 		- Adds paging feature if filter grid bar is 
       
  4457 		already set
       
  4458 		- Param(s):
       
  4459 			- execFilter: if true table is filtered 
       
  4460 			(boolean)
       
  4461 	=====================================================*/
       
  4462 	{
       
  4463 		if( !this.hasGrid || this.paging ) return;
       
  4464 		this.paging = true; 
       
  4465 		this.isPagingRemoved = true; 
       
  4466 		this.SetPaging();
       
  4467 		if(filterTable) this.Filter();
       
  4468 	}	
       
  4469 	
       
  4470 }
       
  4471 
       
  4472 /* --- */
       
  4473 
       
  4474 /*====================================================
       
  4475 	- General TF utility fns below
       
  4476 =====================================================*/
       
  4477 
       
  4478 function tf_GetChildElms(n)
       
  4479 /*====================================================
       
  4480 	- checks passed node is a ELEMENT_NODE nodeType=1
       
  4481 	- removes TEXT_NODE nodeType=3  
       
  4482 =====================================================*/
       
  4483 {
       
  4484 	if(n!=undefined && n.nodeType == 1)
       
  4485 	{
       
  4486 		var enfants = n.childNodes;
       
  4487 		for(var i=0; i<enfants.length; i++)
       
  4488 		{
       
  4489 			var child = enfants[i];
       
  4490 			if(child.nodeType == 3)
       
  4491 			{ 
       
  4492 				n.removeChild(child);
       
  4493 				i = -1;
       
  4494 			}
       
  4495 		}
       
  4496 		return n;	
       
  4497 	}
       
  4498 }
       
  4499 
       
  4500 function tf_GetNodeText(n)
       
  4501 /*====================================================
       
  4502 	- returns text + text of child nodes of a node
       
  4503 =====================================================*/
       
  4504 {
       
  4505 	/*if(n.innerText) return n.innerText.tf_Trim();
       
  4506 	var s = '';
       
  4507 	var enfants = n.childNodes;
       
  4508 	for(var i=0; i<enfants.length; i++)
       
  4509 	{
       
  4510 		var child = enfants[i];
       
  4511 		if(child.nodeType == 3) s+= child.data;
       
  4512 		else s+= tf_GetNodeText(child).tf_Trim();
       
  4513 	}*/
       
  4514 	var s = n.textContent || n.innerText || n.innerHTML.replace(/\<[^<>]+>/g, '');
       
  4515 	return s.replace(/^\s+/, '').replace(/\s+$/, '');
       
  4516 
       
  4517 	return s.tf_Trim();
       
  4518 }
       
  4519 
       
  4520 function tf_isObj(varname)
       
  4521 /*====================================================
       
  4522 	- checks if var exists and is an object
       
  4523 	- returns a boolean
       
  4524 =====================================================*/
       
  4525 {
       
  4526 	var isO = false;
       
  4527 	if( window[varname] && (typeof window[varname]).tf_LCase()=='object' )
       
  4528 		isO = true;
       
  4529 	return isO;
       
  4530 }
       
  4531 
       
  4532 function tf_isFn(fn)
       
  4533 /*====================================================
       
  4534 	- checks if passed param is a function
       
  4535 	- returns a boolean
       
  4536 =====================================================*/
       
  4537 {
       
  4538 	var isFn = false;
       
  4539 	if(fn && (typeof fn).tf_LCase() == 'function')
       
  4540 		isFn = true;
       
  4541 	return isFn;
       
  4542 }
       
  4543 
       
  4544 function tf_Id(id)
       
  4545 /*====================================================
       
  4546 	- this is just a getElementById shortcut
       
  4547 =====================================================*/
       
  4548 {
       
  4549 	return document.getElementById( id );
       
  4550 }
       
  4551 
       
  4552 function tf_Tag(o,tagname)
       
  4553 /*====================================================
       
  4554 	- this is just a getElementsByTagName shortcut
       
  4555 =====================================================*/
       
  4556 {
       
  4557 	return o.getElementsByTagName( tagname );
       
  4558 }
       
  4559 
       
  4560 function tf_RegexpEscape(s)
       
  4561 /*====================================================
       
  4562 	- escapes special characters [\^$.|?*+() 
       
  4563 	for regexp
       
  4564 	- Many thanks to Cedric Wartel for this fn
       
  4565 =====================================================*/
       
  4566 {
       
  4567 	// traite les caractères spéciaux [\^$.|?*+()
       
  4568 	//remplace le carctère c par \c
       
  4569 	function escape(e)
       
  4570 	{
       
  4571 		a = new RegExp('\\'+e,'g');
       
  4572 		s = s.replace(a,'\\'+e);
       
  4573 	}
       
  4574 
       
  4575 	chars = new Array('\\','[','^','$','.','|','?','*','+','(',')');
       
  4576 	//for(e in chars) escape(chars[e]); // compatibility issue with prototype
       
  4577 	for(var e=0; e<chars.length; e++) escape(chars[e]);
       
  4578 	return s;
       
  4579 }
       
  4580 
       
  4581 function tf_CreateElm(tag)
       
  4582 /*====================================================
       
  4583 	- creates an html element with its attributes
       
  4584 	- accepts the following params:
       
  4585 		- a string defining the html tag
       
  4586 		to create
       
  4587 		- an undetermined # of arrays containing the
       
  4588 		couple 'attribute name','value' ['id','myId']
       
  4589 =====================================================*/
       
  4590 {
       
  4591 	if(tag==undefined || tag==null || tag=='') return;
       
  4592 	var el = document.createElement( tag );		
       
  4593 	if(arguments.length>1)
       
  4594 	{
       
  4595 		for(var i=0; i<arguments.length; i++)
       
  4596 		{
       
  4597 			var argtype = typeof arguments[i];
       
  4598 			switch( argtype.tf_LCase() )
       
  4599 			{
       
  4600 				case 'object':
       
  4601 					if( arguments[i].length==2 )
       
  4602 					{						
       
  4603 						el.setAttribute( arguments[i][0],arguments[i][1] );
       
  4604 					}//if array length==2
       
  4605 				break;
       
  4606 			}//switch
       
  4607 		}//for i
       
  4608 	}//if args
       
  4609 	return el;	
       
  4610 }
       
  4611 
       
  4612 function tf_CreateText(node)
       
  4613 /*====================================================
       
  4614 	- this is just a document.createTextNode shortcut
       
  4615 =====================================================*/
       
  4616 {
       
  4617 	return document.createTextNode( node );
       
  4618 }
       
  4619 
       
  4620 function tf_CreateOpt(text,value,isSel)
       
  4621 /*====================================================
       
  4622 	- creates an option element and returns it:
       
  4623 		- text: displayed text (string)
       
  4624 		- value: option value (string)
       
  4625 		- isSel: is selected option (boolean)
       
  4626 =====================================================*/
       
  4627 {
       
  4628 	var isSelected = isSel ? true : false;
       
  4629 	var opt = (isSelected) 
       
  4630 		? tf_CreateElm('option',['value',value],['selected','true'])
       
  4631 		: tf_CreateElm('option',['value',value]);
       
  4632 	opt.appendChild(tf_CreateText(text));
       
  4633 	return opt;
       
  4634 }
       
  4635 
       
  4636 function tf_CreateCheckItem(chkIndex, chkValue, labelText)
       
  4637 /*====================================================
       
  4638 	- creates an checklist item and returns it
       
  4639 	- accepts the following params:
       
  4640 		- chkIndex: index of check item (number)
       
  4641 		- chkValue: check item value (string)
       
  4642 		- labelText: check item label text (string)
       
  4643 =====================================================*/
       
  4644 {
       
  4645 	if(chkIndex==undefined || chkValue==undefined || labelText==undefined )
       
  4646 		return;
       
  4647 	var li = tf_CreateElm('li');
       
  4648 	var label = tf_CreateElm('label',['for',chkIndex]);
       
  4649 	var check = tf_CreateElm( 'input',
       
  4650 					['id',chkIndex],
       
  4651 					['name',chkIndex],
       
  4652 					['type','checkbox'],
       
  4653 					['value',chkValue] );
       
  4654 	label.appendChild(check);
       
  4655 	label.appendChild(tf_CreateText(labelText));
       
  4656 	li.appendChild(label);
       
  4657 	li.label = label;
       
  4658 	li.check = check;
       
  4659 	return li;
       
  4660 }
       
  4661 
       
  4662 function tf_HighlightWord( node,word,cssClass )
       
  4663 /*====================================================
       
  4664 	- highlights keyword found in passed node
       
  4665 	- accepts the following params:
       
  4666 		- node
       
  4667 		- word to search
       
  4668 		- css class name for highlighting
       
  4669 =====================================================*/
       
  4670 {
       
  4671 	// Iterate into this nodes childNodes
       
  4672 	if(node.hasChildNodes) 
       
  4673 		for( var i=0; i<node.childNodes.length; i++ )
       
  4674 			tf_HighlightWord(node.childNodes[i],word,cssClass);
       
  4675 
       
  4676 	// And do this node itself
       
  4677 	if(node.nodeType == 3) 
       
  4678 	{ // text node
       
  4679 		var tempNodeVal = node.nodeValue.tf_LCase();
       
  4680 		var tempWordVal = word.tf_LCase();
       
  4681 		if(tempNodeVal.indexOf(tempWordVal) != -1) 
       
  4682 		{
       
  4683 			var pn = node.parentNode;
       
  4684 			if(pn.className != cssClass) 
       
  4685 			{
       
  4686 				// word has not already been highlighted!
       
  4687 				var nv = node.nodeValue;
       
  4688 				var ni = tempNodeVal.indexOf(tempWordVal);
       
  4689 				// Create a load of replacement nodes
       
  4690 				var before = tf_CreateText(nv.substr(0,ni));
       
  4691 				var docWordVal = nv.substr(ni,word.length);
       
  4692 				var after = tf_CreateText(nv.substr(ni+word.length));
       
  4693 				var hiwordtext = tf_CreateText(docWordVal);
       
  4694 				var hiword = tf_CreateElm('span');
       
  4695 				hiword.className = cssClass;
       
  4696 				hiword.appendChild(hiwordtext);
       
  4697 				pn.insertBefore(before,node);
       
  4698 				pn.insertBefore(hiword,node);
       
  4699 				pn.insertBefore(after,node);
       
  4700 				pn.removeChild(node);
       
  4701 			}
       
  4702 		}
       
  4703 	}// if node.nodeType == 3
       
  4704 }
       
  4705 
       
  4706 function tf_UnhighlightWord( node,word,cssClass )
       
  4707 /*====================================================
       
  4708 	- removes highlights found in passed node
       
  4709 	- accepts the following params:
       
  4710 		- node
       
  4711 		- word to search
       
  4712 		- css class name for highlighting
       
  4713 =====================================================*/
       
  4714 {
       
  4715 	// Iterate into this nodes childNodes
       
  4716 	if(node.hasChildNodes)
       
  4717 		for( var i=0; i<node.childNodes.length; i++ )
       
  4718 			tf_UnhighlightWord(node.childNodes[i],word,cssClass);
       
  4719 
       
  4720 	// And do this node itself
       
  4721 	if(node.nodeType == 3) 
       
  4722 	{ // text node
       
  4723 		var tempNodeVal = node.nodeValue.tf_LCase();
       
  4724 		var tempWordVal = word.tf_LCase();
       
  4725 		if(tempNodeVal.indexOf(tempWordVal) != -1)
       
  4726 		{
       
  4727 			var pn = node.parentNode;
       
  4728 			if(pn.className == cssClass)
       
  4729 			{
       
  4730 				var prevSib = pn.previousSibling;
       
  4731 				var nextSib = pn.nextSibling;
       
  4732 				nextSib.nodeValue = prevSib.nodeValue + node.nodeValue + nextSib.nodeValue;
       
  4733 				prevSib.nodeValue = '';
       
  4734 				node.nodeValue = '';
       
  4735 			}
       
  4736 		}
       
  4737 	}// if node.nodeType == 3
       
  4738 }
       
  4739 
       
  4740 function tf_addEvent(obj,event_name,func_name)
       
  4741 {
       
  4742 	if (obj.attachEvent)
       
  4743 		obj.attachEvent('on'+event_name, func_name);
       
  4744 	else if(obj.addEventListener)
       
  4745 		obj.addEventListener(event_name,func_name,true);
       
  4746 	else
       
  4747 		obj['on'+event_name] = func_name;
       
  4748 }
       
  4749 
       
  4750 function tf_removeEvent(obj,event_name,func_name)
       
  4751 {
       
  4752 	if (obj.detachEvent)
       
  4753 		obj.detachEvent('on'+event_name,func_name);
       
  4754 	else if(obj.removeEventListener)
       
  4755 		obj.removeEventListener(event_name,func_name,true);
       
  4756 	else
       
  4757 		obj['on'+event_name] = null;
       
  4758 }
       
  4759 
       
  4760 function tf_NumSortAsc(a, b){ return (a-b); }
       
  4761 
       
  4762 function tf_NumSortDesc(a, b){ return (b-a); }
       
  4763 
       
  4764 function tf_IgnoreCaseSort(a, b) {
       
  4765 	var x = a.tf_LCase();
       
  4766 	var y = b.tf_LCase();
       
  4767 	return ((x < y) ? -1 : ((x > y) ? 1 : 0));
       
  4768 }
       
  4769 
       
  4770 String.prototype.tf_MatchCase = function (mc) 
       
  4771 {
       
  4772 	if (!mc) return this.tf_LCase();
       
  4773 	else return this.toString();
       
  4774 }
       
  4775 
       
  4776 String.prototype.tf_Trim = function()
       
  4777 {//optimised by Anthony Maes
       
  4778 	return this.replace(/(^[\s\xA0]*)|([\s\xA0]*$)/g,'');
       
  4779 }
       
  4780 
       
  4781 String.prototype.tf_LCase = function()
       
  4782 {
       
  4783 	return this.toLowerCase();
       
  4784 }
       
  4785 
       
  4786 String.prototype.tf_UCase = function()
       
  4787 {
       
  4788 	return this.toUpperCase();
       
  4789 }
       
  4790 
       
  4791 Array.prototype.tf_Has = function(s,mc) 
       
  4792 {
       
  4793 	//return this.indexOf(s) >= 0;
       
  4794 	var sCase = (mc==undefined) ? false : mc;
       
  4795 	for (i=0; i<this.length; i++)
       
  4796 		if (this[i].toString().tf_MatchCase(sCase)==s) return true;
       
  4797 	return false;
       
  4798 }
       
  4799 
       
  4800 Array.prototype.tf_IndexByValue = function(s,mc) 
       
  4801 {
       
  4802 	var sCase = (mc==undefined) ? false : mc;
       
  4803 	for (i=0; i<this.length; i++)
       
  4804 		if (this[i].toString().tf_MatchCase(sCase)==s) return i;
       
  4805 	return (-1);
       
  4806 }
       
  4807 
       
  4808 // Is this IE 6? the ultimate browser sniffer ;-)
       
  4809 //window['tf_isIE'] = (window.innerHeight) ? false : true;
       
  4810 window['tf_isIE'] = (window.innerHeight) ? false : /msie|MSIE 6/.test(navigator.userAgent) ? true : false;
       
  4811 window['tf_isIE7'] = (window.innerHeight) ? false : /msie|MSIE 7/.test(navigator.userAgent) ? true : false;
       
  4812 
       
  4813 function tf_hasClass(elm,cl) 
       
  4814 {
       
  4815 	return elm.className.match(new RegExp('(\\s|^)'+cl+'(\\s|$)'));
       
  4816 }
       
  4817 
       
  4818 function tf_addClass(elm,cl) 
       
  4819 {
       
  4820 	if (!tf_hasClass(elm,cl))
       
  4821 		elm.className += ' '+cl;
       
  4822 }
       
  4823 
       
  4824 function tf_removeClass(elm,cl) 
       
  4825 {
       
  4826 	if ( !tf_hasClass(elm,cl) ) return;
       
  4827 	var reg = new RegExp('(\\s|^)'+cl+'(\\s|$)');
       
  4828 	elm.className = elm.className.replace(reg,' ');
       
  4829 }
       
  4830 
       
  4831 function tf_isValidDate(dateStr, format) 
       
  4832 {
       
  4833 	if (format == null) { format = 'DMY'; }
       
  4834 	format = format.toUpperCase();
       
  4835 	if (format.length != 3) { format = 'DMY'; }
       
  4836 	if ( (format.indexOf('M') == -1) || (format.indexOf('D') == -1) ||
       
  4837 		(format.indexOf('Y') == -1) ) { format = 'DMY'; }
       
  4838 	if (format.substring(0, 1) == 'Y') { // If the year is first
       
  4839 		  var reg1 = /^\d{2}(\-|\/|\.)\d{1,2}\1\d{1,2}$/;
       
  4840 		  var reg2 = /^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$/;
       
  4841 	} else if (format.substring(1, 2) == 'Y') { // If the year is second
       
  4842 		  var reg1 = /^\d{1,2}(\-|\/|\.)\d{2}\1\d{1,2}$/;
       
  4843 		  var reg2 = /^\d{1,2}(\-|\/|\.)\d{4}\1\d{1,2}$/;
       
  4844 	} else { // The year must be third
       
  4845 		  var reg1 = /^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{2}$/;
       
  4846 		  var reg2 = /^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/;
       
  4847 	}
       
  4848 	// If it doesn't conform to the right format (with either a 2 digit year or 4 digit year), fail
       
  4849 	if ( (reg1.test(dateStr) == false) && (reg2.test(dateStr) == false) ) { return false; }
       
  4850 	var parts = dateStr.split(RegExp.$1); // Split into 3 parts based on what the divider was
       
  4851 	// Check to see if the 3 parts end up making a valid date
       
  4852 	if (format.substring(0, 1) == 'M') { var mm = parts[0]; } else
       
  4853 		if (format.substring(1, 2) == 'M') { var mm = parts[1]; } else { var mm = parts[2]; }
       
  4854 	if (format.substring(0, 1) == 'D') { var dd = parts[0]; } else
       
  4855 		if (format.substring(1, 2) == 'D') { var dd = parts[1]; } else { var dd = parts[2]; }
       
  4856 	if (format.substring(0, 1) == 'Y') { var yy = parts[0]; } else
       
  4857 		if (format.substring(1, 2) == 'Y') { var yy = parts[1]; } else { var yy = parts[2]; }
       
  4858 	if (parseFloat(yy) <= 50) { yy = (parseFloat(yy) + 2000).toString(); }
       
  4859 	if (parseFloat(yy) <= 99) { yy = (parseFloat(yy) + 1900).toString(); }
       
  4860 	var dt = new Date(parseFloat(yy), parseFloat(mm)-1, parseFloat(dd), 0, 0, 0, 0);
       
  4861 	if (parseFloat(dd) != dt.getDate()) { return false; }
       
  4862 	if (parseFloat(mm)-1 != dt.getMonth()) { return false; }
       
  4863 	return true;
       
  4864 }
       
  4865 
       
  4866 function tf_formatDate(dateStr, format)
       
  4867 {
       
  4868 	if(format==null) format = 'DMY';
       
  4869 	var oDate, parts;
       
  4870 	
       
  4871 	function y2kDate(yr){
       
  4872 		if(yr == undefined) return 0;
       
  4873 		if(yr.length>2) return yr;
       
  4874 		var y;
       
  4875 		if(yr <= 99 && yr>50) //>50 belong to 1900
       
  4876 			y = '19' + yr;
       
  4877 		if(yr<50 || yr =='00') //<50 belong to 2000
       
  4878 			y = '20' + yr;
       
  4879 		return y;
       
  4880 	}
       
  4881 	
       
  4882 	switch(format.toUpperCase())
       
  4883 	{
       
  4884 		case 'DMY':
       
  4885 			parts = dateStr.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,'$1 $3 $5').split(' ');
       
  4886 			oDate = new Date(y2kDate(parts[2]),parts[1]-1,parts[0]);
       
  4887 		break;
       
  4888 		case 'MDY':
       
  4889 			parts = dateStr.replace(/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/,'$1 $3 $5').split(' ');
       
  4890 			oDate = new Date(y2kDate(parts[2]),parts[0]-1,parts[1]);
       
  4891 		break;
       
  4892 		case 'YMD':
       
  4893 			parts = dateStr.replace(/^((\d\d)?\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/,'$1 $4 $6').split(' ');
       
  4894 			oDate = new Date(y2kDate(parts[0]),parts[1]-1,parts[2]);
       
  4895 		break;
       
  4896 		default: //in case format is not correct
       
  4897 			parts = dateStr.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,'$1 $3 $5').split(' ');
       
  4898 			oDate = new Date(y2kDate(parts[2]),parts[1]-1,parts[0]);
       
  4899 		break;
       
  4900 	}
       
  4901 	return oDate;
       
  4902 }
       
  4903 
       
  4904 function tf_removeNbFormat(data,format)
       
  4905 {
       
  4906 	if(data==null) return;
       
  4907 	if(format==null) format = 'us';
       
  4908 	var n = data;
       
  4909 	if( format.tf_LCase()=='us' )
       
  4910 		n =+ n.replace(/[^\d\.-]/g,'');
       
  4911 	else
       
  4912 		n =+ n.replace(/[^\d\,-]/g,'').replace(',','.');
       
  4913 	return n;
       
  4914 }
       
  4915 
       
  4916 function tf_isImported(filePath,type)
       
  4917 {
       
  4918 	var isImported = false; 
       
  4919 	var importType = (type==undefined) ? 'script' : type;
       
  4920 	var files = tf_Tag(document,importType);
       
  4921 	for (var i=0; i<files.length; i++)
       
  4922 	{
       
  4923 		if(files[i].src == undefined) continue;
       
  4924 		if(files[i].src.match(filePath))
       
  4925 		{
       
  4926 			isImported = true;	
       
  4927 			break;
       
  4928 		}
       
  4929 	}
       
  4930 	return isImported;
       
  4931 }
       
  4932 
       
  4933 function tf_WriteCookie(name, value, hours)
       
  4934 {
       
  4935 	var expire = '';
       
  4936 	if(hours != null)
       
  4937 	{
       
  4938 		expire = new Date((new Date()).getTime() + hours * 3600000);
       
  4939 		expire = '; expires=' + expire.toGMTString();
       
  4940 	}
       
  4941 	document.cookie = name + '=' + escape(value) + expire;
       
  4942 }
       
  4943 
       
  4944 function tf_ReadCookie(name)
       
  4945 {
       
  4946 	var cookieValue = '';
       
  4947 	var search = name + '=';
       
  4948 	if(document.cookie.length > 0)
       
  4949 	{ 
       
  4950 		offset = document.cookie.indexOf(search);
       
  4951 		if (offset != -1)
       
  4952 		{ 
       
  4953 			offset += search.length;
       
  4954 			end = document.cookie.indexOf(';', offset);
       
  4955 			if (end == -1) end = document.cookie.length;
       
  4956 			cookieValue = unescape(document.cookie.substring(offset, end))
       
  4957 		}
       
  4958 	}
       
  4959 	return cookieValue;
       
  4960 }
       
  4961 
       
  4962 function tf_CookieValueArray(name)
       
  4963 {
       
  4964 	var val = tf_ReadCookie(name); //reads the cookie
       
  4965 	var arr = val.split(','); //creates an array with filters' values
       
  4966 	return arr;
       
  4967 }
       
  4968 
       
  4969 function tf_CookieValueByIndex(name, index)
       
  4970 {
       
  4971 	var val = tf_CookieValueArray(name); //reads the cookie
       
  4972 	return val[index];
       
  4973 }
       
  4974 
       
  4975 function tf_RemoveCookie(name)
       
  4976 {
       
  4977 	tf_WriteCookie(name,'',-1);
       
  4978 }
       
  4979 /* --- */
       
  4980 
       
  4981 /*====================================================
       
  4982 	- Backward compatibility fns
       
  4983 =====================================================*/
       
  4984 function grabEBI(id){ return tf_Id( id ); }
       
  4985 function grabTag(obj,tagname){ return tf_Tag(obj,tagname); }
       
  4986 function tf_GetCellText(n){ return tf_GetNodeText(n); }
       
  4987 function tf_isObject(varname){ return tf_isObj(varname); }
       
  4988 /* --- */
       
  4989     //]]>
       
  4990     </script>
       
  4991     
       
  4992     <script language="javascript" type="text/javascript">
       
  4993     //<![CDATA[
       
  4994     /**
       
  4995  * Copyright (c)2005-2009 Matt Kruse (javascripttoolbox.com)
       
  4996  * 
       
  4997  * Dual licensed under the MIT and GPL licenses. 
       
  4998  * This basically means you can use this code however you want for
       
  4999  * free, but don't claim to have written it yourself!
       
  5000  * Donations always accepted: http://www.JavascriptToolbox.com/donate/
       
  5001  * 
       
  5002  * Please do not link to the .js files on javascripttoolbox.com from
       
  5003  * your site. Copy the files locally to your server instead.
       
  5004  * 
       
  5005  */
       
  5006 /* ******************************************************************* */
       
  5007 /*   UTIL FUNCTIONS                                                    */
       
  5008 /* ******************************************************************* */
       
  5009 var Util = {'$VERSION':1.06};
       
  5010 
       
  5011 // Util functions - these are GLOBAL so they
       
  5012 // look like built-in functions.
       
  5013 
       
  5014 // Determine if an object is an array
       
  5015 function isArray(o) {
       
  5016 	return (o!=null && typeof(o)=="object" && typeof(o.length)=="number" && (o.length==0 || defined(o[0])));
       
  5017 };
       
  5018 
       
  5019 // Determine if an object is an Object
       
  5020 function isObject(o) {
       
  5021 	return (o!=null && typeof(o)=="object" && defined(o.constructor) && o.constructor==Object && !defined(o.nodeName));
       
  5022 };
       
  5023 
       
  5024 // Determine if a reference is defined
       
  5025 function defined(o) {
       
  5026 	return (typeof(o)!="undefined");
       
  5027 };
       
  5028 
       
  5029 // Iterate over an array, object, or list of items and run code against each item
       
  5030 // Similar functionality to Perl's map() function
       
  5031 function map(func) {
       
  5032 	var i,j,o;
       
  5033 	var results = [];
       
  5034 	if (typeof(func)=="string") {
       
  5035 		func = new Function('$_',func);
       
  5036 	}
       
  5037 	for (i=1; i<arguments.length; i++) {
       
  5038 		o = arguments[i];
       
  5039 		if (isArray(o)) {
       
  5040 			for (j=0; j<o.length; j++) {
       
  5041 				results[results.length] = func(o[j]);
       
  5042 			}
       
  5043 		}
       
  5044 		else if (isObject(o)) {
       
  5045 			for (j in o) {
       
  5046 				results[results.length] = func(o[j]);
       
  5047 			}
       
  5048 		}
       
  5049 		else {
       
  5050 			results[results.length] = func(o);
       
  5051 		}
       
  5052 	}
       
  5053 	return results;
       
  5054 };
       
  5055 
       
  5056 // Set default values in an object if they are undefined
       
  5057 function setDefaultValues(o,values) {
       
  5058 	if (!defined(o) || o==null) {
       
  5059 		o = {};
       
  5060 	}
       
  5061 	if (!defined(values) || values==null) {
       
  5062 		return o;
       
  5063 	}
       
  5064 	for (var val in values) {
       
  5065 		if (!defined(o[val])) {
       
  5066 			o[val] = values[val];
       
  5067 		}
       
  5068 	}
       
  5069 	return o;
       
  5070 };
       
  5071 
       
  5072 /* ******************************************************************* */
       
  5073 /*   DEFAULT OBJECT PROTOTYPE ENHANCEMENTS                             */
       
  5074 /* ******************************************************************* */
       
  5075 // These functions add useful functionality to built-in objects
       
  5076 Array.prototype.contains = function(o) {
       
  5077 	var i,l;
       
  5078 	if (!(l = this.length)) { return false; }
       
  5079 	for (i=0; i<l; i++) {
       
  5080 		if (o==this[i]) {
       
  5081 			return true;
       
  5082 		}
       
  5083 	}
       
  5084 };
       
  5085 
       
  5086 /* ******************************************************************* */
       
  5087 /*   DOM FUNCTIONS                                                     */
       
  5088 /* ******************************************************************* */
       
  5089 var DOM = (function() { 
       
  5090 	var dom = {};
       
  5091 	
       
  5092 	// Get a parent tag with a given nodename
       
  5093 	dom.getParentByTagName = function(o,tagNames) {
       
  5094 		if(o==null) { return null; }
       
  5095 		if (isArray(tagNames)) {
       
  5096 			tagNames = map("return $_.toUpperCase()",tagNames);
       
  5097 			while (o=o.parentNode) {
       
  5098 				if (o.nodeName && tagNames.contains(o.nodeName)) {
       
  5099 					return o;
       
  5100 				}
       
  5101 			}
       
  5102 		}
       
  5103 		else {
       
  5104 			tagNames = tagNames.toUpperCase();
       
  5105 			while (o=o.parentNode) {
       
  5106 				if (o.nodeName && tagNames==o.nodeName) {
       
  5107 					return o;
       
  5108 				}
       
  5109 			}
       
  5110 		}
       
  5111 		return null;
       
  5112 	};
       
  5113 	
       
  5114 	// Remove a node from its parent
       
  5115 	dom.removeNode = function(o) {
       
  5116 		if (o!=null && o.parentNode && o.parentNode.removeChild) {
       
  5117 			// First remove all attributes which are func references, to avoid memory leaks
       
  5118 			for (var i in o) {
       
  5119 				if (typeof(o[i])=="function") {
       
  5120 					o[i] = null;
       
  5121 				}
       
  5122 			}
       
  5123 			o.parentNode.removeChild(o);
       
  5124 			return true;
       
  5125 		}
       
  5126 		return false;
       
  5127 	};
       
  5128 
       
  5129 	// Get the outer width in pixels of an object, including borders, padding, and margin
       
  5130 	dom.getOuterWidth = function(o) {
       
  5131 		if (defined(o.offsetWidth)) {
       
  5132 			return o.offsetWidth;
       
  5133 		}
       
  5134 		return null;
       
  5135 	};
       
  5136 
       
  5137 	// Get the outer height in pixels of an object, including borders, padding, and margin
       
  5138 	dom.getOuterHeight = function(o) {
       
  5139 		if (defined(o.offsetHeight)) {
       
  5140 			return o.offsetHeight;
       
  5141 		}
       
  5142 		return null;
       
  5143 	};
       
  5144 
       
  5145 	// Resolve an item, an array of items, or an object of items
       
  5146 	dom.resolve = function() {
       
  5147 		var results = new Array();
       
  5148 		var i,j,o;
       
  5149 		for (var i=0; i<arguments.length; i++) {
       
  5150 			var o = arguments[i];
       
  5151 			if (o==null) {
       
  5152 				if (arguments.length==1) {
       
  5153 					return null;
       
  5154 				}
       
  5155 				results[results.length] = null;
       
  5156 			}
       
  5157 			else if (typeof(o)=='string') {
       
  5158 				if (document.getElementById) {
       
  5159 					o = document.getElementById(o);
       
  5160 				}
       
  5161 				else if (document.all) {
       
  5162 					o = document.all[o];
       
  5163 				}
       
  5164 				if (arguments.length==1) {
       
  5165 					return o;
       
  5166 				}
       
  5167 				results[results.length] = o;
       
  5168 			}
       
  5169 			else if (isArray(o)) {
       
  5170 				for (j=0; j<o.length; j++) {
       
  5171 					results[results.length] = o[j];
       
  5172 				}
       
  5173 			}
       
  5174 			else if (isObject(o)) {
       
  5175 				for (j in o) {
       
  5176 					results[results.length] = o[j];
       
  5177 				}
       
  5178 			}
       
  5179 			else if (arguments.length==1) {
       
  5180 				return o;
       
  5181 			}
       
  5182 			else {
       
  5183 				results[results.length] = o;
       
  5184 			}
       
  5185 	  }
       
  5186 	  return results;
       
  5187 	};
       
  5188 	dom.$ = dom.resolve;
       
  5189 	
       
  5190 	return dom;
       
  5191 })();
       
  5192 
       
  5193 /* ******************************************************************* */
       
  5194 /*   CSS FUNCTIONS                                                     */
       
  5195 /* ******************************************************************* */
       
  5196 var CSS = (function(){
       
  5197 	var css = {};
       
  5198 
       
  5199 	// Convert an RGB string in the form "rgb (255, 255, 255)" to "#ffffff"
       
  5200 	css.rgb2hex = function(rgbString) {
       
  5201 		if (typeof(rgbString)!="string" || !defined(rgbString.match)) { return null; }
       
  5202 		var result = rgbString.match(/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*/);
       
  5203 		if (result==null) { return rgbString; }
       
  5204 		var rgb = +result[1] << 16 | +result[2] << 8 | +result[3];
       
  5205 		var hex = "";
       
  5206 		var digits = "0123456789abcdef";
       
  5207 		while(rgb!=0) { 
       
  5208 			hex = digits.charAt(rgb&0xf)+hex; 
       
  5209 			rgb>>>=4; 
       
  5210 		} 
       
  5211 		while(hex.length<6) { hex='0'+hex; }
       
  5212 		return "#" + hex;
       
  5213 	};
       
  5214 
       
  5215 	// Convert hyphen style names like border-width to camel case like borderWidth
       
  5216 	css.hyphen2camel = function(property) {
       
  5217 		if (!defined(property) || property==null) { return null; }
       
  5218 		if (property.indexOf("-")<0) { return property; }
       
  5219 		var str = "";
       
  5220 		var c = null;
       
  5221 		var l = property.length;
       
  5222 		for (var i=0; i<l; i++) {
       
  5223 			c = property.charAt(i);
       
  5224 			str += (c!="-")?c:property.charAt(++i).toUpperCase();
       
  5225 		}
       
  5226 		return str;
       
  5227 	};
       
  5228 	
       
  5229 	// Determine if an object or class string contains a given class.
       
  5230 	css.hasClass = function(obj,className) {
       
  5231 		if (!defined(obj) || obj==null || !RegExp) { return false; }
       
  5232 		var re = new RegExp("(^|\\s)" + className + "(\\s|$)");
       
  5233 		if (typeof(obj)=="string") {
       
  5234 			return re.test(obj);
       
  5235 		}
       
  5236 		else if (typeof(obj)=="object" && obj.className) {
       
  5237 			return re.test(obj.className);
       
  5238 		}
       
  5239 		return false;
       
  5240 	};
       
  5241 	
       
  5242 	// Add a class to an object
       
  5243 	css.addClass = function(obj,className) {
       
  5244 		if (typeof(obj)!="object" || obj==null || !defined(obj.className)) { return false; }
       
  5245 		if (obj.className==null || obj.className=='') { 
       
  5246 			obj.className = className; 
       
  5247 			return true; 
       
  5248 		}
       
  5249 		if (css.hasClass(obj,className)) { return true; }
       
  5250 		obj.className = obj.className + " " + className;
       
  5251 		return true;
       
  5252 	};
       
  5253 	
       
  5254 	// Remove a class from an object
       
  5255 	css.removeClass = function(obj,className) {
       
  5256 		if (typeof(obj)!="object" || obj==null || !defined(obj.className) || obj.className==null) { return false; }
       
  5257 		if (!css.hasClass(obj,className)) { return false; }
       
  5258 		var re = new RegExp("(^|\\s+)" + className + "(\\s+|$)");
       
  5259 		obj.className = obj.className.replace(re,' ');
       
  5260 		return true;
       
  5261 	};
       
  5262 	
       
  5263 	// Fully replace a class with a new one
       
  5264 	css.replaceClass = function(obj,className,newClassName) {
       
  5265 		if (typeof(obj)!="object" || obj==null || !defined(obj.className) || obj.className==null) { return false; }
       
  5266 		css.removeClass(obj,className);
       
  5267 		css.addClass(obj,newClassName);
       
  5268 		return true;
       
  5269 	};
       
  5270 	
       
  5271 	// Get the currently-applied style of an object
       
  5272 	css.getStyle = function(o, property) {
       
  5273 		if (o==null) { return null; }
       
  5274 		var val = null;
       
  5275 		var camelProperty = css.hyphen2camel(property);
       
  5276 		// Handle "float" property as a special case
       
  5277 		if (property=="float") {
       
  5278 			val = css.getStyle(o,"cssFloat");
       
  5279 			if (val==null) { 
       
  5280 				val = css.getStyle(o,"styleFloat"); 
       
  5281 			}
       
  5282 		}
       
  5283 		else if (o.currentStyle && defined(o.currentStyle[camelProperty])) {
       
  5284 			val = o.currentStyle[camelProperty];
       
  5285 		}
       
  5286 		else if (window.getComputedStyle) {
       
  5287 			val = window.getComputedStyle(o,null).getPropertyValue(property);
       
  5288 		}
       
  5289 		else if (o.style && defined(o.style[camelProperty])) {
       
  5290 			val = o.style[camelProperty];
       
  5291 		}
       
  5292 		// For color values, make the value consistent across browsers
       
  5293 		// Convert rgb() colors back to hex for consistency
       
  5294 		if (/^\s*rgb\s*\(/.test(val)) {
       
  5295 			val = css.rgb2hex(val);
       
  5296 		}
       
  5297 		// Lowercase all #hex values
       
  5298 		if (/^#/.test(val)) {
       
  5299 			val = val.toLowerCase();
       
  5300 		}
       
  5301 		return val;
       
  5302 	};
       
  5303 	css.get = css.getStyle;
       
  5304 
       
  5305 	// Set a style on an object
       
  5306 	css.setStyle = function(o, property, value) {
       
  5307 		if (o==null || !defined(o.style) || !defined(property) || property==null || !defined(value)) { return false; }
       
  5308 		if (property=="float") {
       
  5309 			o.style["cssFloat"] = value;
       
  5310 			o.style["styleFloat"] = value;
       
  5311 		}
       
  5312 		else if (property=="opacity") {
       
  5313 			o.style['-moz-opacity'] = value;
       
  5314 			o.style['-khtml-opacity'] = value;
       
  5315 			o.style.opacity = value;
       
  5316 			if (defined(o.style.filter)) {
       
  5317 				o.style.filter = "alpha(opacity=" + value*100 + ")";
       
  5318 			}
       
  5319 		}
       
  5320 		else {
       
  5321 			o.style[css.hyphen2camel(property)] = value;
       
  5322 		}
       
  5323 		return true;
       
  5324 	};
       
  5325 	css.set = css.setStyle;
       
  5326 	
       
  5327 	// Get a unique ID which doesn't already exist on the page
       
  5328 	css.uniqueIdNumber=1000;
       
  5329 	css.createId = function(o) {
       
  5330 		if (defined(o) && o!=null && defined(o.id) && o.id!=null && o.id!="") { 
       
  5331 			return o.id;
       
  5332 		}
       
  5333 		var id = null;
       
  5334 		while (id==null || document.getElementById(id)!=null) {
       
  5335 			id = "ID_"+(css.uniqueIdNumber++);
       
  5336 		}
       
  5337 		if (defined(o) && o!=null && (!defined(o.id)||o.id=="")) {
       
  5338 			o.id = id;
       
  5339 		}
       
  5340 		return id;
       
  5341 	};
       
  5342 	
       
  5343 	return css;
       
  5344 })();
       
  5345 
       
  5346 /* ******************************************************************* */
       
  5347 /*   EVENT FUNCTIONS                                                   */
       
  5348 /* ******************************************************************* */
       
  5349 
       
  5350 var Event = (function(){
       
  5351 	var ev = {};
       
  5352 	
       
  5353 	// Resolve an event using IE's window.event if necessary
       
  5354 	// --------------------------------------------------------------------
       
  5355 	ev.resolve = function(e) {
       
  5356 		if (!defined(e) && defined(window.event)) {
       
  5357 			e = window.event;
       
  5358 		}
       
  5359 		return e;
       
  5360 	};
       
  5361 	
       
  5362 	// Add an event handler to a function
       
  5363 	// Note: Don't use 'this' within functions added using this method, since
       
  5364 	// the attachEvent and addEventListener models differ.
       
  5365 	// --------------------------------------------------------------------
       
  5366 	ev.add = function( obj, type, fn, capture ) {
       
  5367 		if (obj.addEventListener) {
       
  5368 			obj.addEventListener( type, fn, capture );
       
  5369 			return true;
       
  5370 		}
       
  5371 		else if (obj.attachEvent) {
       
  5372 			obj.attachEvent( "on"+type, fn );
       
  5373 			return true;
       
  5374 		}
       
  5375 		return false;
       
  5376 	};
       
  5377 
       
  5378 	// Get the mouse position of an event
       
  5379 	// --------------------------------------------------------------------
       
  5380 	// PageX/Y, where they exist, are more reliable than ClientX/Y because 
       
  5381 	// of some browser bugs in Opera/Safari
       
  5382 	ev.getMouseX = function(e) {
       
  5383 		e = ev.resolve(e);
       
  5384 		if (defined(e.pageX)) {
       
  5385 			return e.pageX;
       
  5386 		}
       
  5387 		if (defined(e.clientX)) {
       
  5388 			return e.clientX+Screen.getScrollLeft();
       
  5389 		}
       
  5390 		return null;
       
  5391 	};
       
  5392 	ev.getMouseY = function(e) {
       
  5393 		e = ev.resolve(e);
       
  5394 		if (defined(e.pageY)) {
       
  5395 			return e.pageY;
       
  5396 		}
       
  5397 		if (defined(e.clientY)) {
       
  5398 			return e.clientY+Screen.getScrollTop();
       
  5399 		}
       
  5400 		return null;
       
  5401 	};
       
  5402 
       
  5403 	// Stop the event from bubbling up to parent elements.
       
  5404 	// Two method names map to the same function
       
  5405 	// --------------------------------------------------------------------
       
  5406 	ev.cancelBubble = function(e) {
       
  5407 		e = ev.resolve(e);
       
  5408 		if (typeof(e.stopPropagation)=="function") { e.stopPropagation(); } 
       
  5409 		if (defined(e.cancelBubble)) { e.cancelBubble = true; }
       
  5410 	};
       
  5411 	ev.stopPropagation = ev.cancelBubble;
       
  5412 
       
  5413 	// Prevent the default handling of the event to occur
       
  5414 	// --------------------------------------------------------------------
       
  5415 	ev.preventDefault = function(e) {
       
  5416 		e = ev.resolve(e);
       
  5417 		if (typeof(e.preventDefault)=="function") { e.preventDefault(); } 
       
  5418 		if (defined(e.returnValue)) { e.returnValue = false; }
       
  5419 	};
       
  5420 	
       
  5421 	return ev;
       
  5422 })();
       
  5423 
       
  5424 /* ******************************************************************* */
       
  5425 /*   SCREEN FUNCTIONS                                                  */
       
  5426 /* ******************************************************************* */
       
  5427 var Screen = (function() {
       
  5428 	var screen = {};
       
  5429 
       
  5430 	// Get a reference to the body
       
  5431 	// --------------------------------------------------------------------
       
  5432 	screen.getBody = function() {
       
  5433 		if (document.body) {
       
  5434 			return document.body;
       
  5435 		}
       
  5436 		if (document.getElementsByTagName) {
       
  5437 			var bodies = document.getElementsByTagName("BODY");
       
  5438 			if (bodies!=null && bodies.length>0) {
       
  5439 				return bodies[0];
       
  5440 			}
       
  5441 		}
       
  5442 		return null;
       
  5443 	};
       
  5444 
       
  5445 	// Get the amount that the main document has scrolled from top
       
  5446 	// --------------------------------------------------------------------
       
  5447 	screen.getScrollTop = function() {
       
  5448 		if (document.documentElement && defined(document.documentElement.scrollTop) && document.documentElement.scrollTop>0) {
       
  5449 			return document.documentElement.scrollTop;
       
  5450 		}
       
  5451 		if (document.body && defined(document.body.scrollTop)) {
       
  5452 			return document.body.scrollTop;
       
  5453 		}
       
  5454 		return null;
       
  5455 	};
       
  5456 	
       
  5457 	// Get the amount that the main document has scrolled from left
       
  5458 	// --------------------------------------------------------------------
       
  5459 	screen.getScrollLeft = function() {
       
  5460 		if (document.documentElement && defined(document.documentElement.scrollLeft) && document.documentElement.scrollLeft>0) {
       
  5461 			return document.documentElement.scrollLeft;
       
  5462 		}
       
  5463 		if (document.body && defined(document.body.scrollLeft)) {
       
  5464 			return document.body.scrollLeft;
       
  5465 		}
       
  5466 		return null;
       
  5467 	};
       
  5468 	
       
  5469 	// Util function to default a bad number to 0
       
  5470 	// --------------------------------------------------------------------
       
  5471 	screen.zero = function(n) {
       
  5472 		return (!defined(n) || isNaN(n))?0:n;
       
  5473 	};
       
  5474 
       
  5475 	// Get the width of the entire document
       
  5476 	// --------------------------------------------------------------------
       
  5477 	screen.getDocumentWidth = function() {
       
  5478 		var width = 0;
       
  5479 		var body = screen.getBody();
       
  5480 		if (document.documentElement && (!document.compatMode || document.compatMode=="CSS1Compat")) {
       
  5481 		    var rightMargin = parseInt(CSS.get(body,'marginRight'),10) || 0;
       
  5482 		    var leftMargin = parseInt(CSS.get(body,'marginLeft'), 10) || 0;
       
  5483 			width = Math.max(body.offsetWidth + leftMargin + rightMargin, document.documentElement.clientWidth);
       
  5484 		}
       
  5485 		else {
       
  5486 			width =  Math.max(body.clientWidth, body.scrollWidth);
       
  5487 		}
       
  5488 		if (isNaN(width) || width==0) {
       
  5489 			width = screen.zero(self.innerWidth);
       
  5490 		}
       
  5491 		return width;
       
  5492 	};
       
  5493 	
       
  5494 	// Get the height of the entire document
       
  5495 	// --------------------------------------------------------------------
       
  5496 	screen.getDocumentHeight = function() {
       
  5497 		var body = screen.getBody();
       
  5498 		var innerHeight = (defined(self.innerHeight)&&!isNaN(self.innerHeight))?self.innerHeight:0;
       
  5499 		if (document.documentElement && (!document.compatMode || document.compatMode=="CSS1Compat")) {
       
  5500 		    var topMargin = parseInt(CSS.get(body,'marginTop'),10) || 0;
       
  5501 		    var bottomMargin = parseInt(CSS.get(body,'marginBottom'), 10) || 0;
       
  5502 			return Math.max(body.offsetHeight + topMargin + bottomMargin, document.documentElement.clientHeight, document.documentElement.scrollHeight, screen.zero(self.innerHeight));
       
  5503 		}
       
  5504 		return Math.max(body.scrollHeight, body.clientHeight, screen.zero(self.innerHeight));
       
  5505 	};
       
  5506 	
       
  5507 	// Get the width of the viewport (viewable area) in the browser window
       
  5508 	// --------------------------------------------------------------------
       
  5509 	screen.getViewportWidth = function() {
       
  5510 		if (document.documentElement && (!document.compatMode || document.compatMode=="CSS1Compat")) {
       
  5511 			return document.documentElement.clientWidth;
       
  5512 		}
       
  5513 		else if (document.compatMode && document.body) {
       
  5514 			return document.body.clientWidth;
       
  5515 		}
       
  5516 		return screen.zero(self.innerWidth);
       
  5517 	};
       
  5518 	
       
  5519 	// Get the height of the viewport (viewable area) in the browser window
       
  5520 	// --------------------------------------------------------------------
       
  5521 	screen.getViewportHeight = function() {
       
  5522 		if (!window.opera && document.documentElement && (!document.compatMode || document.compatMode=="CSS1Compat")) {
       
  5523 			return document.documentElement.clientHeight;
       
  5524 		}
       
  5525 		else if (document.compatMode && !window.opera && document.body) {
       
  5526 			return document.body.clientHeight;
       
  5527 		}
       
  5528 		return screen.zero(self.innerHeight);
       
  5529 	};
       
  5530 
       
  5531 	return screen;
       
  5532 })();var Sort = (function(){
       
  5533 	var sort = {};
       
  5534 	sort.AlphaNumeric = function(a,b) {
       
  5535 		if (a==b) { return 0; }
       
  5536 		if (a<b) { return -1; }
       
  5537 		return 1;
       
  5538 	};
       
  5539 
       
  5540 	sort.Default = sort.AlphaNumeric;
       
  5541 	
       
  5542 	sort.NumericConversion = function(val) {
       
  5543 		if (typeof(val)!="number") {
       
  5544 			if (typeof(val)=="string") {
       
  5545 				val = parseFloat(val.replace(/,/g,''));
       
  5546 				if (isNaN(val) || val==null) { val=0; }
       
  5547 			}
       
  5548 			else {
       
  5549 				val = 0;
       
  5550 			}
       
  5551 		}
       
  5552 		return val;
       
  5553 	};
       
  5554 	
       
  5555 	sort.Numeric = function(a,b) {
       
  5556 		return sort.NumericConversion(a)-sort.NumericConversion(b);
       
  5557 	};
       
  5558 
       
  5559 	sort.IgnoreCaseConversion = function(val) {
       
  5560 		if (val==null) { val=""; }
       
  5561 		return (""+val).toLowerCase();
       
  5562 	};
       
  5563 
       
  5564 	sort.IgnoreCase = function(a,b) {
       
  5565 		return sort.AlphaNumeric(sort.IgnoreCaseConversion(a),sort.IgnoreCaseConversion(b));
       
  5566 	};
       
  5567 
       
  5568 	sort.CurrencyConversion = function(val) {
       
  5569 		if (typeof(val)=="string") {
       
  5570 			val = val.replace(/^[^\d\.]/,'');
       
  5571 		}
       
  5572 		return sort.NumericConversion(val);
       
  5573 	};
       
  5574 	
       
  5575 	sort.Currency = function(a,b) {
       
  5576 		return sort.Numeric(sort.CurrencyConversion(a),sort.CurrencyConversion(b));
       
  5577 	};
       
  5578 	
       
  5579 	sort.DateConversion = function(val) {
       
  5580 		// inner util function to parse date formats
       
  5581 		function getdate(str) {
       
  5582 			// inner util function to convert 2-digit years to 4
       
  5583 			function fixYear(yr) {
       
  5584 				yr = +yr;
       
  5585 				if (yr<50) { yr += 2000; }
       
  5586 				else if (yr<100) { yr += 1900; }
       
  5587 				return yr;
       
  5588 			};
       
  5589 			var ret;
       
  5590 			// YYYY-MM-DD
       
  5591 			if (ret=str.match(/(\d{2,4})-(\d{1,2})-(\d{1,2})/)) {
       
  5592 				return (fixYear(ret[1])*10000) + (ret[2]*100) + (+ret[3]);
       
  5593 			}
       
  5594 			// MM/DD/YY[YY] or MM-DD-YY[YY]
       
  5595 			if (ret=str.match(/(\d{1,2})[\/-](\d{1,2})[\/-](\d{2,4})/)) {
       
  5596 				return (fixYear(ret[3])*10000) + (ret[1]*100) + (+ret[2]);
       
  5597 			}
       
  5598 			return 99999999; // So non-parsed dates will be last, not first
       
  5599 		};
       
  5600 		return getdate(val);
       
  5601 	};
       
  5602 
       
  5603 	sort.Date = function(a,b) {
       
  5604 		return sort.Numeric(sort.DateConversion(a),sort.DateConversion(b));
       
  5605 	};
       
  5606 
       
  5607 	return sort;
       
  5608 })();
       
  5609 
       
  5610 var Position = (function() {
       
  5611 	// Resolve a string identifier to an object
       
  5612 	// ========================================
       
  5613 	function resolveObject(s) {
       
  5614 		if (document.getElementById && document.getElementById(s)!=null) {
       
  5615 			return document.getElementById(s);
       
  5616 		}
       
  5617 		else if (document.all && document.all[s]!=null) {
       
  5618 			return document.all[s];
       
  5619 		}
       
  5620 		else if (document.anchors && document.anchors.length && document.anchors.length>0 && document.anchors[0].x) {
       
  5621 			for (var i=0; i<document.anchors.length; i++) {
       
  5622 				if (document.anchors[i].name==s) { 
       
  5623 					return document.anchors[i]
       
  5624 				}
       
  5625 			}
       
  5626 		}
       
  5627 	}
       
  5628 	
       
  5629 	var pos = {};
       
  5630 	pos.$VERSION = 1.0;
       
  5631 	
       
  5632 	// Set the position of an object
       
  5633 	// =============================
       
  5634 	pos.set = function(o,left,top) {
       
  5635 		if (typeof(o)=="string") {
       
  5636 			o = resolveObject(o);
       
  5637 		}
       
  5638 		if (o==null || !o.style) {
       
  5639 			return false;
       
  5640 		}
       
  5641 		
       
  5642 		// If the second parameter is an object, it is assumed to be the result of getPosition()
       
  5643 		if (typeof(left)=="object") {
       
  5644 			var pos = left;
       
  5645 			left = pos.left;
       
  5646 			top = pos.top;
       
  5647 		}
       
  5648 		
       
  5649 		o.style.left = left + "px";
       
  5650 		o.style.top = top + "px";
       
  5651 		return true;
       
  5652 	};
       
  5653 	
       
  5654 	// Retrieve the position and size of an object
       
  5655 	// ===========================================
       
  5656 	pos.get = function(o) {
       
  5657 		var fixBrowserQuirks = true;
       
  5658 			// If a string is passed in instead of an object ref, resolve it
       
  5659 		if (typeof(o)=="string") {
       
  5660 			o = resolveObject(o);
       
  5661 		}
       
  5662 		
       
  5663 		if (o==null) {
       
  5664 			return null;
       
  5665 		}
       
  5666 		
       
  5667 		var left = 0;
       
  5668 		var top = 0;
       
  5669 		var width = 0;
       
  5670 		var height = 0;
       
  5671 		var parentNode = null;
       
  5672 		var offsetParent = null;
       
  5673 	
       
  5674 		
       
  5675 		offsetParent = o.offsetParent;
       
  5676 		var originalObject = o;
       
  5677 		var el = o; // "el" will be nodes as we walk up, "o" will be saved for offsetParent references
       
  5678 		while (el.parentNode!=null) {
       
  5679 			el = el.parentNode;
       
  5680 			if (el.offsetParent==null) {
       
  5681 			}
       
  5682 			else {
       
  5683 				var considerScroll = true;
       
  5684 				/*
       
  5685 				In Opera, if parentNode of the first object is scrollable, then offsetLeft/offsetTop already 
       
  5686 				take its scroll position into account. If elements further up the chain are scrollable, their 
       
  5687 				scroll offsets still need to be added in. And for some reason, TR nodes have a scrolltop value
       
  5688 				which must be ignored.
       
  5689 				*/
       
  5690 				if (fixBrowserQuirks && window.opera) {
       
  5691 					if (el==originalObject.parentNode || el.nodeName=="TR") {
       
  5692 						considerScroll = false;
       
  5693 					}
       
  5694 				}
       
  5695 				if (considerScroll) {
       
  5696 					if (el.scrollTop && el.scrollTop>0) {
       
  5697 						top -= el.scrollTop;
       
  5698 					}
       
  5699 					if (el.scrollLeft && el.scrollLeft>0) {
       
  5700 						left -= el.scrollLeft;
       
  5701 					}
       
  5702 				}
       
  5703 			}
       
  5704 			// If this node is also the offsetParent, add on the offsets and reset to the new offsetParent
       
  5705 			if (el == offsetParent) {
       
  5706 				left += o.offsetLeft;
       
  5707 				if (el.clientLeft && el.nodeName!="TABLE") { 
       
  5708 					left += el.clientLeft;
       
  5709 				}
       
  5710 				top += o.offsetTop;
       
  5711 				if (el.clientTop && el.nodeName!="TABLE") {
       
  5712 					top += el.clientTop;
       
  5713 				}
       
  5714 				o = el;
       
  5715 				if (o.offsetParent==null) {
       
  5716 					if (o.offsetLeft) {
       
  5717 						left += o.offsetLeft;
       
  5718 					}
       
  5719 					if (o.offsetTop) {
       
  5720 						top += o.offsetTop;
       
  5721 					}
       
  5722 				}
       
  5723 				offsetParent = o.offsetParent;
       
  5724 			}
       
  5725 		}
       
  5726 		
       
  5727 	
       
  5728 		if (originalObject.offsetWidth) {
       
  5729 			width = originalObject.offsetWidth;
       
  5730 		}
       
  5731 		if (originalObject.offsetHeight) {
       
  5732 			height = originalObject.offsetHeight;
       
  5733 		}
       
  5734 		
       
  5735 		return {'left':left, 'top':top, 'width':width, 'height':height
       
  5736 				};
       
  5737 	};
       
  5738 	
       
  5739 	// Retrieve the position of an object's center point
       
  5740 	// =================================================
       
  5741 	pos.getCenter = function(o) {
       
  5742 		var c = this.get(o);
       
  5743 		if (c==null) { return null; }
       
  5744 		c.left = c.left + (c.width/2);
       
  5745 		c.top = c.top + (c.height/2);
       
  5746 		return c;
       
  5747 	};
       
  5748 	
       
  5749 	return pos;
       
  5750 })();// CLASS CONSTRUCTOR
       
  5751 // --------------------------------------------------------------------
       
  5752 var Popup = function(div, options) {
       
  5753 	this.div = defined(div)?div:null;
       
  5754 	this.index = Popup.maxIndex++;
       
  5755 	this.ref = "Popup.objects["+this.index+"]";
       
  5756 	Popup.objects[this.index] = this;
       
  5757 	// Store a reference to the DIV by id, also
       
  5758 	if (typeof(this.div)=="string") {
       
  5759 		Popup.objectsById[this.div] = this;
       
  5760 	}
       
  5761 	if (defined(this.div) && this.div!=null && defined(this.div.id)) {
       
  5762 		Popup.objectsById[this.div.id] = this.div.id;
       
  5763 	}
       
  5764 	// Apply passed-in options
       
  5765 	if (defined(options) && options!=null && typeof(options)=="object") {
       
  5766 		for (var i in options) {
       
  5767 			this[i] = options[i];
       
  5768 		}
       
  5769 	}
       
  5770 	return this;
       
  5771 };
       
  5772 
       
  5773 // CLASS PROPERTIES
       
  5774 // --------------------------------------------------------------------
       
  5775 // Index of popup objects, to maintain a global reference if necessary
       
  5776 Popup.maxIndex = 0;
       
  5777 Popup.objects = {};
       
  5778 Popup.objectsById = {};
       
  5779 
       
  5780 // The z-index value that popups will start at
       
  5781 Popup.minZIndex = 101;
       
  5782 
       
  5783 // Class names to assign to other objects
       
  5784 Popup.screenClass = "PopupScreen";
       
  5785 Popup.iframeClass = "PopupIframe";
       
  5786 Popup.screenIframeClass = "PopupScreenIframe";
       
  5787 
       
  5788 // CLASS METHODS
       
  5789 // --------------------------------------------------------------------
       
  5790 
       
  5791 // Hide all currently-visible non-modal dialogs
       
  5792 Popup.hideAll = function() {
       
  5793 	for (var i in Popup.objects) {
       
  5794 		var p = Popup.objects[i];
       
  5795 		if (!p.modal && p.autoHide) {
       
  5796 			p.hide();
       
  5797 		}
       
  5798 	}
       
  5799 };
       
  5800 // Catch global events as a trigger to hide auto-hide popups
       
  5801 Event.add(document, "mouseup", Popup.hideAll, false);
       
  5802 
       
  5803 // A simple class method to show a popup without creating an instance
       
  5804 Popup.show = function(divObject, referenceObject, position, options, modal) {
       
  5805 	var popup;
       
  5806 	if (defined(divObject)) { 
       
  5807 		popup = new Popup(divObject);
       
  5808 	}
       
  5809 	else {
       
  5810 		popup = new Popup();
       
  5811 		popup.destroyDivOnHide = true;
       
  5812 	}
       
  5813 	if (defined(referenceObject)) { popup.reference = DOM.resolve(referenceObject); }
       
  5814 	if (defined(position)) { popup.position = position; }
       
  5815 	if (defined(options) && options!=null && typeof(options)=="object") {
       
  5816 		for (var i in options) {
       
  5817 			popup[i] = options[i];
       
  5818 		}
       
  5819 	}
       
  5820 	if (typeof(modal)=="boolean") {
       
  5821 		popup.modal = modal;
       
  5822 	}
       
  5823 	popup.destroyObjectsOnHide = true;
       
  5824 	popup.show();
       
  5825 	return popup;
       
  5826 };
       
  5827 
       
  5828 // A simple class method to show a modal popup
       
  5829 Popup.showModal = function(divObject, referenceObject, position, options) {
       
  5830 	Popup.show(divObject, referenceObject, position, options, true);
       
  5831 };
       
  5832 
       
  5833 // A method to retrieve a popup object based on a div ID
       
  5834 Popup.get = function(divId) {
       
  5835 	if (defined(Popup.objectsById[divId])) {
       
  5836 		return Popup.objectsById[divId];
       
  5837 	}
       
  5838 	return null;
       
  5839 };
       
  5840 
       
  5841 // A method to hide a popup based on a div id
       
  5842 Popup.hide = function(divId) {
       
  5843 	var popup = Popup.get(divId);
       
  5844 	if (popup!=null) {
       
  5845 		popup.hide();
       
  5846 	}
       
  5847 };
       
  5848 
       
  5849 // PROTOTYPE PROPERTIES
       
  5850 // --------------------------------------------------------------------
       
  5851 Popup.prototype.content = null;
       
  5852 Popup.prototype.className = "PopupDiv";
       
  5853 Popup.prototype.style = null; // Styles to be applied to the DIV
       
  5854 Popup.prototype.width = null;
       
  5855 Popup.prototype.height = null;
       
  5856 Popup.prototype.top = null;
       
  5857 Popup.prototype.left = null;
       
  5858 Popup.prototype.offsetLeft = 0;
       
  5859 Popup.prototype.offsetTop = 0;
       
  5860 Popup.prototype.constrainToScreen = true;
       
  5861 Popup.prototype.autoHide = true;
       
  5862 Popup.prototype.useIframeShim = false; /*@cc_on @*/ /*@if (@_win32) {Popup.prototype.useIframeShim = true;} @end @*/ 
       
  5863 Popup.prototype.iframe = null;
       
  5864 Popup.prototype.position = null; // vertical: "above top center bottom below", horizontal: "adjacent-left,left,center,right,adjacent-right"
       
  5865 Popup.prototype.reference = null;
       
  5866 Popup.prototype.modal = false;
       
  5867 Popup.prototype.destroyDivOnHide = false;
       
  5868 Popup.prototype.destroyObjectsOnHide = false;
       
  5869 Popup.prototype.screen = null;
       
  5870 Popup.prototype.screenIframeShim = null;
       
  5871 Popup.prototype.screenOpacity=.4;
       
  5872 Popup.prototype.screenColor="#cccccc";
       
  5873 
       
  5874 // INSTANCE METHODS
       
  5875 // --------------------------------------------------------------------
       
  5876 
       
  5877 // Show the popup
       
  5878 // --------------------------------------------------------------------
       
  5879 Popup.prototype.show = function(options, modal) {
       
  5880 	this.modal = this.modal || (typeof(modal)=="boolean" && modal);
       
  5881 	if (defined(options) && options!=null && typeof(options)=="object") {
       
  5882 		for (var i in options) {
       
  5883 			this[i] = options[i];
       
  5884 		}
       
  5885 	}
       
  5886 	this.div = DOM.resolve(this.div);
       
  5887 	CSS.setStyle(this.div,'position','absolute');
       
  5888 	
       
  5889 	// If there is no div pre-defined to use, create one
       
  5890 	if (this.div==null) {
       
  5891 		this.div = this.createDiv();
       
  5892 	}
       
  5893 	if (this.content!=null) {
       
  5894 		this.div.innerHTML = this.content;
       
  5895 		this.content = null;
       
  5896 	}
       
  5897 	if (this.className!=null) {
       
  5898 		this.div.className = this.className;
       
  5899 	}
       
  5900 	if (this.style!=null) {
       
  5901 		this.applyStyle();
       
  5902 	}
       
  5903 	if (this.width!=null) {
       
  5904 		this.div.style.width = this.width+"px";
       
  5905 		this.div.style.overflowX="auto";
       
  5906 	}
       
  5907 	if (this.height!=null) {
       
  5908 		this.div.style.height = this.height+"px";
       
  5909 		this.div.style.overflowY="auto";
       
  5910 	}
       
  5911 
       
  5912 	// Do the actual display - this is a separate method so display transitions can be implemented
       
  5913 	this.transition();
       
  5914 	
       
  5915 	// Make sure clicks on the DIV don't bubble up to the document
       
  5916 	this.div.onclick = function(e) { 
       
  5917 		Event.cancelBubble(Event.resolve(e));
       
  5918 	};
       
  5919 	this.div.onmouseup = this.div.onclick;
       
  5920 	
       
  5921 	// Focus to the DIV if possible	
       
  5922 	if (this.modal && this.div.focus) {
       
  5923 		this.div.focus();
       
  5924 	}
       
  5925 };
       
  5926 
       
  5927 // Show the popup but make it modal
       
  5928 // --------------------------------------------------------------------
       
  5929 Popup.prototype.transition = function() {
       
  5930 	if (this.modal) {
       
  5931 		this.addScreen();
       
  5932 	}
       
  5933 	
       
  5934 	// Make the DIV displayed but hidden so its size can be measured
       
  5935 	CSS.setStyle(this.div,'visibility','hidden');
       
  5936 	CSS.setStyle(this.div,'display','block');
       
  5937 
       
  5938 	// Position the popup
       
  5939 	this.setPosition();
       
  5940 
       
  5941 	// Add the shim if necessary	
       
  5942 	if (this.useIframeShim) {
       
  5943 		this.addIframeShim();
       
  5944 	}
       
  5945 
       
  5946 	// Make sure the DIV is higher than the shim
       
  5947 	this.div.style.zIndex = Popup.minZIndex++;
       
  5948 
       
  5949 	CSS.setStyle(this.div,'display','block');
       
  5950 	CSS.setStyle(this.div,'visibility','visible');
       
  5951 };
       
  5952 
       
  5953 // Show the popup but make it modal
       
  5954 // --------------------------------------------------------------------
       
  5955 Popup.prototype.showModal = function(options) {
       
  5956 	this.show(options,true);
       
  5957 };
       
  5958 
       
  5959 // Apply user styles to the DIV
       
  5960 // --------------------------------------------------------------------
       
  5961 Popup.prototype.applyStyle = function() {
       
  5962 	if (this.div!=null && this.style!=null && typeof(this.style)=="object") {
       
  5963 		for (var i in this.style) {
       
  5964 			this.div.style[i] = this.style[i];
       
  5965 		}
       
  5966 	}
       
  5967 };
       
  5968 
       
  5969 // Hide the popup
       
  5970 // --------------------------------------------------------------------
       
  5971 Popup.prototype.hide = function() {
       
  5972 	// If this was a temp object creating on-the-fly, then remove objects from the DOM so
       
  5973 	// The document doesn't get littered with extra objects
       
  5974 	if (this.destroyDivOnHide) {
       
  5975 		DOM.removeNode(this.div);
       
  5976 		this.div = null;
       
  5977 		delete Popup.objects[this.id];
       
  5978 	}
       
  5979 	else if (this.div!=null) {
       
  5980 		CSS.setStyle(this.div,'display','none');
       
  5981 	}
       
  5982 
       
  5983 	if (this.destroyObjectsOnHide) {
       
  5984 		DOM.removeNode(this.iframe);
       
  5985 		DOM.removeNode(this.screen);
       
  5986 		DOM.removeNode(this.screenIframeShim);
       
  5987 	}
       
  5988 	else {
       
  5989 		if (this.iframe!=null) {
       
  5990 			this.iframe.style.display = "none";
       
  5991 		}
       
  5992 		if (this.screen!=null) {
       
  5993 			this.screen.style.display = "none";
       
  5994 		}
       
  5995 		if (this.screenIframeShim!=null) {
       
  5996 			this.screenIframeShim.style.display = "none";
       
  5997 		}
       
  5998 	}
       
  5999 };
       
  6000 
       
  6001 // Util funcs for position
       
  6002 // --------------------------------------------------------------------
       
  6003 Popup.prototype.setTop = function(top) {
       
  6004 	this.div.style.top = top+"px";
       
  6005 };
       
  6006 Popup.prototype.setLeft = function(left) {
       
  6007 	this.div.style.left = left+"px";
       
  6008 };
       
  6009 Popup.prototype.getTop = function() {
       
  6010 	return parseInt(CSS.getStyle(this.div,"top"),10);
       
  6011 };
       
  6012 Popup.prototype.getLeft = function() {
       
  6013 	return parseInt(CSS.getStyle(this.div,"left"),10);
       
  6014 };
       
  6015 
       
  6016 // All the logic to position the popup based on various criteria
       
  6017 // --------------------------------------------------------------------
       
  6018 Popup.prototype.setPosition = function() {
       
  6019 	if (this.position!=null) {
       
  6020 		var m = this.position.match(/^(\S+)\s+(\S+)/); 
       
  6021 		if (m!=null && m.length==3) {
       
  6022 			var v = m[1];
       
  6023 			var h = m[2];
       
  6024 
       
  6025 			var ref = this.reference;
       
  6026 			if (ref==null) { ref = Screen.getBody(); }
       
  6027 			var p = Position.get(ref);
       
  6028 			var refTop = p.top;
       
  6029 			var refLeft = p.left;
       
  6030 			var refWidth = DOM.getOuterWidth(ref);
       
  6031 			var refHeight = DOM.getOuterHeight(ref);
       
  6032 			
       
  6033 			var width = DOM.getOuterWidth(this.div);
       
  6034 			var height = DOM.getOuterHeight(this.div);
       
  6035 			
       
  6036 			var scrollLeft = Screen.getScrollLeft();
       
  6037 			var scrollTop = Screen.getScrollTop();
       
  6038 
       
  6039 			// Set vertical position relative to reference object
       
  6040 			if (v=="above") { this.setTop(refTop-height+this.offsetTop); }
       
  6041 			else if (v=="top") { this.setTop(refTop+this.offsetTop); }
       
  6042 			else if (v=="center") { this.setTop(refTop+(refHeight/2)-(height/2)+this.offsetTop); }
       
  6043 			else if (v=="bottom") { this.setTop(refTop+refHeight-height+this.offsetTop); }
       
  6044 			else if (v=="below") { this.setTop(refTop+refHeight+this.offsetTop); }
       
  6045 
       
  6046 			// Set horizontal position relative to reference object
       
  6047 			if (h=="adjacent-left") { this.setLeft(refLeft-width+this.offsetLeft); }
       
  6048 			else if (h=="left") { this.setLeft(refLeft+this.offsetLeft); }
       
  6049 			else if (h=="center") { this.setLeft(refLeft+(refWidth/2)-(width/2)+this.offsetLeft); }
       
  6050 			else if (h=="right") { this.setLeft(refLeft+refWidth-width+this.offsetLeft); }
       
  6051 			else if (h=="adjacent-right") { this.setLeft(refLeft+refWidth+this.offsetLeft); }
       
  6052 		}
       
  6053 	}
       
  6054 	else if (this.top==null && this.left==null) {
       
  6055 		this.center();
       
  6056 	}
       
  6057 	else {
       
  6058 		if (this.top==null) { this.top=0; }
       
  6059 		if (this.left==null) { this.left=0; }
       
  6060 		this.div.style.top = this.top+this.offsetTop+"px";
       
  6061 		this.div.style.left = this.left+this.offsetLeft+"px";
       
  6062 	}
       
  6063 
       
  6064 	// Re-position to make sure it stays on the screen
       
  6065 	if (this.constrainToScreen) {
       
  6066 		this.fitToScreen();
       
  6067 	}
       
  6068 };
       
  6069 
       
  6070 // Append an object to the body
       
  6071 // --------------------------------------------------------------------
       
  6072 Popup.prototype.appendToBody = function(o) {
       
  6073 	var body = Screen.getBody();
       
  6074 	if (body && body.appendChild) {
       
  6075 		body.appendChild(o);
       
  6076 	}
       
  6077 };
       
  6078 
       
  6079 // Create a new DIV object to be used for a popup
       
  6080 // --------------------------------------------------------------------
       
  6081 Popup.prototype.createDiv = function() {
       
  6082 	if (document.createElement) {
       
  6083 		var d = document.createElement("DIV");
       
  6084 		d.style.position="absolute";
       
  6085 		d.style.display="block";
       
  6086 		d.style.visibility="hidden";
       
  6087 		this.appendToBody(d);
       
  6088 		return d;
       
  6089 	}
       
  6090 	alert("ERROR: Couldn't create DIV element in Popup.prototype.createDiv()");
       
  6091 	return null;
       
  6092 };
       
  6093 
       
  6094 // Create a new IFRAME object to be used behind the popup
       
  6095 // --------------------------------------------------------------------
       
  6096 Popup.prototype.createIframe = function() {
       
  6097 	if (document.createElement) {
       
  6098 		var i= document.createElement("IFRAME");
       
  6099 		i.style.position="absolute";
       
  6100 		i.style.display="block";
       
  6101 		i.style.visibility="hidden";
       
  6102 		i.style.background="none";
       
  6103 		this.appendToBody(i);
       
  6104 		return i;
       
  6105 	}
       
  6106 	else {
       
  6107 		alert("ERROR: Couldn't create IFRAME object in Popup.prototype.createIframe()");
       
  6108 	}
       
  6109 };
       
  6110 
       
  6111 // Add an IFRAME shim for the DIV
       
  6112 // --------------------------------------------------------------------
       
  6113 Popup.prototype.addIframeShim = function() {
       
  6114 	if (this.iframe==null) {
       
  6115 		this.iframe = this.createIframe();
       
  6116 	}
       
  6117 	this.iframe.className = Popup.iframeClass;
       
  6118 	CSS.setStyle(this.iframe,'top',this.getTop()+"px");
       
  6119 	CSS.setStyle(this.iframe,'left',this.getLeft()+"px");
       
  6120 	CSS.setStyle(this.iframe,'width',DOM.getOuterWidth(this.div) + "px");
       
  6121 	CSS.setStyle(this.iframe,'height',DOM.getOuterHeight(this.div) + "px");
       
  6122 	CSS.setStyle(this.iframe,'zIndex',Popup.minZIndex++);
       
  6123 	CSS.setStyle(this.iframe,'opacity',0);
       
  6124 	CSS.setStyle(this.iframe,'visibility','visible');
       
  6125 	CSS.setStyle(this.iframe,'display','block');
       
  6126 };
       
  6127 
       
  6128 // Create a "screen" to make a popup modal
       
  6129 // --------------------------------------------------------------------
       
  6130 Popup.prototype.addScreen = function() {
       
  6131 	if (this.screen==null) {
       
  6132 		this.screen = this.createDiv();
       
  6133 		this.screen.style.top="0px";
       
  6134 		this.screen.style.left="0px";
       
  6135 		this.screen.style.backgroundColor = this.screenColor;
       
  6136 		this.screen.className=Popup.screenClass;;
       
  6137 		CSS.setStyle(this.screen,"opacity",this.screenOpacity);
       
  6138 		this.screen.onclick = function(e) { Event.cancelBubble(Event.resolve(e)); }
       
  6139 	}
       
  6140 	if (this.screenIframeShim==null) {
       
  6141 		this.screenIframeShim = this.createIframe();
       
  6142 		this.screenIframeShim.style.top="0px";
       
  6143 		this.screenIframeShim.style.left="0px";
       
  6144 		this.screenIframeShim.className=Popup.screenIframeClass;
       
  6145 		CSS.setStyle(this.screenIframeShim,"opacity",0);
       
  6146 	}
       
  6147 	this.screen.style.width = Screen.getDocumentWidth()+"px";
       
  6148 	this.screen.style.height = Screen.getDocumentHeight()+"px";
       
  6149 	this.screenIframeShim.style.width = Screen.getDocumentWidth()+"px";
       
  6150 	this.screenIframeShim.style.height = Screen.getDocumentHeight()+"px";
       
  6151 	this.screenIframeShim.style.zIndex = Popup.minZIndex++;
       
  6152 	this.screenIframeShim.style.visibility="visible";
       
  6153 	this.screenIframeShim.style.display="block";
       
  6154 	this.screen.style.zIndex = Popup.minZIndex++;
       
  6155 	this.screen.style.visibility="visible";
       
  6156 	this.screen.style.display="block";
       
  6157 };
       
  6158 
       
  6159 // Re-position the DIV so it stays on the screen
       
  6160 // --------------------------------------------------------------------
       
  6161 Popup.prototype.fitToScreen = function() {
       
  6162 	var width = DOM.getOuterWidth(this.div);
       
  6163 	var height = DOM.getOuterHeight(this.div);
       
  6164 	var top = this.getTop();
       
  6165 	var left = this.getLeft();
       
  6166 	
       
  6167 	var clientWidth = Screen.getViewportWidth();
       
  6168 	var clientHeight = Screen.getViewportHeight();
       
  6169 	
       
  6170 	var scrollLeft = Screen.getScrollLeft();
       
  6171 	var scrollTop = Screen.getScrollTop();
       
  6172 
       
  6173 	if (top-scrollTop+height>clientHeight) {
       
  6174 		top = top - ((top+height) - (scrollTop+clientHeight));
       
  6175 		this.div.style.top = top + "px";
       
  6176 	}
       
  6177 	if (left-scrollLeft+width>clientWidth) {
       
  6178 		left = left - ((left+width) - (scrollLeft+clientWidth));
       
  6179 		this.div.style.left = left + "px";
       
  6180 	}
       
  6181 	if (top<scrollTop) {
       
  6182 		this.div.style.top=scrollTop+"px";
       
  6183 	}
       
  6184 	if (left<scrollLeft) {
       
  6185 		this.div.style.left=scrollLeft+"px";
       
  6186 	}
       
  6187 };
       
  6188 
       
  6189 // Center the DIV object
       
  6190 // --------------------------------------------------------------------
       
  6191 Popup.prototype.center = function() {
       
  6192 	var left = DOM.getOuterWidth(this.div);
       
  6193 	var top = DOM.getOuterHeight(this.div);
       
  6194 	if (isNaN(left)) { left=0; }
       
  6195 	if (isNaN(top)) { top=0; }	
       
  6196 	var clientW = Screen.getViewportWidth();
       
  6197 	var clientH = Screen.getViewportHeight();
       
  6198 	if (clientW!=null && clientH!=null) {
       
  6199 		top = (clientH-top)/2;
       
  6200 		left = (clientW-left)/2;
       
  6201 	}
       
  6202 	top += Screen.getScrollTop();
       
  6203 	left += Screen.getScrollLeft();
       
  6204 	
       
  6205 	this.div.style.top = top+this.offsetTop+"px";
       
  6206 	this.div.style.left = left+this.offsetLeft+"px";
       
  6207 };
       
  6208 
       
  6209     //]]>
       
  6210     </script>
       
  6211 
   118 </head>
  6212 </head>
   119 <body>
  6213 <body>
   120 
  6214 
   121     <h1>Generation summary:</h1>
  6215     <h1>Generation summary:</h1>
   122     <table class="summary">
  6216     <table class="summary">
   123      <tr>
  6217     <tr>
   124         <th class="featureName" colspan="2">Statistics</th>
  6218         <th class="featureName">Statistics</th>
   125      </tr>
  6219         <th class="featureName"></th>
   126      <tr>
  6220         </tr>
       
  6221     <tr>
   127         <td>Refs in files</td>
  6222         <td>Refs in files</td>
   128         <td>12</td>
  6223         <td>48</td>
       
  6224         </tr>
       
  6225     <tr>
       
  6226         <td>Not generated Refs</td>
       
  6227         <td>32</td>
       
  6228         </tr>
       
  6229     <tr>
       
  6230         <th class="featureName" colspan="2">Details</th>
   129     </tr>
  6231     </tr>
   130     <tr>
  6232     <tr>
   131         <td>Refs with no implementation</td>
       
   132         <td>13</td>
       
   133     </tr>
       
   134     <tr>
       
   135         <th class="featureName" colspan="2">Details</th>
       
   136      </tr>
       
   137     <tr>
       
   138         <td>Report generated</td>
  6233         <td>Report generated</td>
   139         <td>30.09.2009 15:42:50</td>
  6234         <td>20.04.2010 19:23:59</td>
   140     </tr>
  6235         </tr>
   141     <tr>
  6236     <tr>
   142         <td>Generation duration</td>
  6237         <td>Generation duration</td>
   143         <td>0.547</td>
  6238         <td>1.172</td>
   144     </tr>
  6239         </tr>
   145     <tr>
  6240     <tr>
   146         <td>Generation log</td>
  6241         <td>Generation log</td>
   147         <td><a href="file:///this_is_ignored/cone.log">cone.log</a></td>
  6242         <td><a href="file:///C|/Documents%20and%20Settings/teerytko/workspace/cone.trunk/source/scripts/tests/temp/gen_ll3/cone.log">cone log</a></td>
   148     </tr>
  6243         </tr>
   149     <tr>
  6244     <tr>
   150         <th class="featureName" colspan="2">Generation options</th>
  6245         <th class="featureName" colspan="2">Generation options</th>
   151     </tr>
  6246     </tr>
   152     <tr>
  6247     <tr>
   153         <td align="left">Layers</td>
  6248         <td align="left">Layers</td>
   154         <td align="left">[-1]</td>
  6249         <td align="left">[-1]</td>
   155     </tr>
  6250         </tr>
   156     <tr>
  6251     <tr>
   157         <td align="left">Added</td>
  6252         <td align="left">Added</td>
   158         <td align="left">None</td>
  6253         <td align="left">None</td>
   159     </tr>
  6254         </tr>
   160     <tr>
  6255     <tr>
   161         <td align="left">Dryrun</td>
  6256         <td align="left">Dryrun</td>
   162         <td align="left">False</td>
  6257         <td align="left">False</td>
   163     </tr>
  6258         </tr>
   164     <tr>
  6259     <tr>
   165         <td align="left">Verbose</td>
  6260         <td align="left">Verbose</td>
   166         <td align="left">3</td>
  6261         <td align="left">3</td>
   167     </tr>
  6262         </tr>
   168     <tr>
  6263     <tr>
   169         <td align="left">Overrides</td>
  6264         <td align="left">Overrides</td>
   170         <td align="left">None</td>
  6265         <td align="left">None</td>
   171     </tr>
  6266         </tr>
   172     <tr>
  6267     <tr>
   173         <td align="left">Project</td>
  6268         <td align="left">Project</td>
   174         <td align="left">this_is_ignored\generation_test_project</td>
  6269         <td align="left">C:\Documents and Settings\teerytko\workspace\cone.trunk\source\scripts\tests\generation_test_project</td>
   175     </tr>
  6270         </tr>
   176         <tr>
  6271         <tr>
   177         <td align="left">Report</td>
  6272         <td align="left">Report</td>
   178         <td align="left">report.html</td>
  6273         <td align="left">report.html</td>
   179     </tr>
  6274         </tr>
   180     <tr>
  6275     <tr>
   181         <td align="left">Impls</td>
  6276         <td align="left">Impls</td>
   182         <td align="left">None</td>
  6277         <td align="left">None</td>
   183     </tr>
  6278         </tr>
       
  6279     <tr>
       
  6280         <td align="left">Tags</td>
       
  6281         <td align="left">{}</td>
       
  6282         </tr>
   184     <tr>
  6283     <tr>
   185         <td align="left">Output</td>
  6284         <td align="left">Output</td>
   186         <td align="left">output</td>
  6285         <td align="left">output</td>
   187     </tr>
  6286         </tr>
   188     <tr>
  6287     <tr>
   189         <td align="left">Configuration</td>
  6288         <td align="left">Configuration</td>
   190         <td align="left">root.confml</td>
  6289         <td align="left">root.confml</td>
       
  6290         </tr>
       
  6291     </table>
       
  6292     
       
  6293     <h1>Generation Outputs:</h1><br>
       
  6294     <p>Predefined filters:<br>
       
  6295         <FORM>
       
  6296         <INPUT type="button" value="Refs with no implementation" onclick="tf_outputs.SetFilterValue(1,'None');tf_outputs.SetFilterValue(0, '');tf_outputs.SetFilterValue(2, '');tf_outputs.Filter();return false;" name="Refs with no implementation"">
       
  6297         <br>
       
  6298         <INPUT type="button" value="Refs with not output" onclick="tf_outputs.SetFilterValue(2, 'None');tf_outputs.SetFilterValue(0, '');tf_outputs.SetFilterValue(1, '');tf_outputs.Filter();return false;" name="Refs with not output">
       
  6299         </FORM>
       
  6300     </p>
       
  6301     <table class="report" id="outputs">
       
  6302     <tr>
       
  6303         <th class="featureName">Settings</th>
       
  6304         <th class="featureName">Impl. file</th>
       
  6305         <th class="featureName">Outputs</th>
       
  6306     </tr>
       
  6307 
       
  6308     
       
  6309 
       
  6310     
       
  6311 
       
  6312     <!-- process the output files -->    
       
  6313     
       
  6314     <tr>
       
  6315         <td>
       
  6316         </td>
       
  6317         <td>
       
  6318             Rule:
       
  6319           
       
  6320            custom/implml/seq_tempvar.implml:15
       
  6321         
       
  6322         </td>
       
  6323         <td>
       
  6324         
       
  6325            TempFeature2.FilesToCopy
       
  6326         
       
  6327         </td>
   191     </tr>
  6328     </tr>
   192     <tr>
  6329     <tr>
   193         <td align="left">Working directory</td>
  6330         <td>
   194         <td align="left">this_is_ignored\source\scripts\tests\temp\gen_ll3</td>
  6331         </td>
       
  6332         <td>
       
  6333             Rule:
       
  6334           
       
  6335            custom/implml/simple_tempvars.implml:12
       
  6336         
       
  6337         </td>
       
  6338         <td>
       
  6339         
       
  6340            TempFeature.String
       
  6341         
       
  6342         </td>
   195     </tr>
  6343     </tr>
       
  6344     <tr>
       
  6345         <td>
       
  6346         </td>
       
  6347         <td>
       
  6348             Rule:
       
  6349           
       
  6350            custom/implml/simple_tempvars.implml:13
       
  6351         
       
  6352         </td>
       
  6353         <td>
       
  6354         
       
  6355            TempFeature.Int
       
  6356         
       
  6357         </td>
       
  6358     </tr>
       
  6359     <tr>
       
  6360         <td>
       
  6361         </td>
       
  6362         <td>
       
  6363             Rule:
       
  6364           
       
  6365            custom/implml/simple_tempvars.implml:14
       
  6366         
       
  6367         </td>
       
  6368         <td>
       
  6369         
       
  6370            TempFeature.Real
       
  6371         
       
  6372         </td>
       
  6373     </tr>
       
  6374     <tr>
       
  6375         <td>
       
  6376                        <B>
       
  6377            MultiSelectionTest.MultiSelectionSetting
       
  6378         </B><br>
       
  6379         </td>
       
  6380         <td>
       
  6381           
       
  6382            base/implml/multiselection.templateml:2
       
  6383         
       
  6384         </td>
       
  6385         <td>
       
  6386         
       
  6387            output/multiselection.txt
       
  6388         
       
  6389         </td>
       
  6390     </tr>
       
  6391     <tr>
       
  6392         <td>
       
  6393                        <B>
       
  6394            NameIdMappingTestTargetSettings.Selection
       
  6395         </B><br>
       
  6396                        <B>
       
  6397            NameIdMappingTestTargetSettings.Int
       
  6398         </B><br>
       
  6399                        <B>
       
  6400            NameIdMappingTestTargetSettings.Real
       
  6401         </B><br>
       
  6402                        <B>
       
  6403            NameIdMappingTestTargetSettings.Sequence.Selection
       
  6404         </B><br>
       
  6405                        <B>
       
  6406            NameIdMappingTestTargetSettings.Sequence.Int
       
  6407         </B><br>
       
  6408                        <B>
       
  6409            NameIdMappingTestTargetSettings.Sequence.Real
       
  6410         </B><br>
       
  6411         </td>
       
  6412         <td>
       
  6413           
       
  6414            base/implml/name_id_mapping_test.templateml:2
       
  6415         
       
  6416         </td>
       
  6417         <td>
       
  6418         
       
  6419            output/name_id_mapping_test.txt
       
  6420         
       
  6421         </td>
       
  6422     </tr>
       
  6423     <tr>
       
  6424         <td>
       
  6425                        <i>
       
  6426            TempFeature.String
       
  6427         </i><br>
       
  6428         </td>
       
  6429         <td>
       
  6430           
       
  6431            custom/implml/conditional_container.implml:12
       
  6432         
       
  6433         </td>
       
  6434         <td>
       
  6435         
       
  6436            output/content/template_string_condition_true.txt
       
  6437         
       
  6438         </td>
       
  6439     </tr>
       
  6440     <tr>
       
  6441         <td>
       
  6442         </td>
       
  6443         <td>
       
  6444           
       
  6445            custom/implml/conditional_container.implml:34
       
  6446         
       
  6447         </td>
       
  6448         <td>
       
  6449         
       
  6450            output/sis/app1.txt
       
  6451         
       
  6452         </td>
       
  6453     </tr>
       
  6454     <tr>
       
  6455         <td>
       
  6456                        <B>
       
  6457            BasicSettingTypesTest.IntSetting
       
  6458         </B><br>
       
  6459         </td>
       
  6460         <td>
       
  6461           
       
  6462            custom/implml/impl_override_test.templateml:2
       
  6463         
       
  6464         </td>
       
  6465         <td>
       
  6466         
       
  6467            output/impl_override_test.txt
       
  6468         
       
  6469         </td>
       
  6470     </tr>
       
  6471     <tr>
       
  6472         <td>
       
  6473         </td>
       
  6474         <td>
       
  6475           
       
  6476            custom/implml/invocation_phase_test.implml:6
       
  6477         
       
  6478         </td>
       
  6479         <td>
       
  6480         
       
  6481            output/content/invocation_phase_test_common_ns.txt
       
  6482         
       
  6483         </td>
       
  6484     </tr>
       
  6485     <tr>
       
  6486         <td>
       
  6487         </td>
       
  6488         <td>
       
  6489           
       
  6490            custom/implml/invocation_phase_test.implml:25
       
  6491         
       
  6492         </td>
       
  6493         <td>
       
  6494         
       
  6495            output/content/invocation_phase_test_contentml_ns.txt
       
  6496         
       
  6497         </td>
       
  6498     </tr>
       
  6499     <tr>
       
  6500         <td>
       
  6501                        <i>
       
  6502            TempFeatureMissingFile.Test1
       
  6503         </i><br>
       
  6504                        <i>
       
  6505            TempFeatureMissingFile.Test2
       
  6506         </i><br>
       
  6507         </td>
       
  6508         <td>
       
  6509           
       
  6510            custom/implml/missing_file_in_report_test.implml:11
       
  6511         
       
  6512         </td>
       
  6513         <td>
       
  6514         
       
  6515            output/content/missing_output_file_test1.txt
       
  6516         
       
  6517         </td>
       
  6518     </tr>
       
  6519     <tr>
       
  6520         <td>
       
  6521                        <i>
       
  6522            TempFeatureMissingFile.Test1
       
  6523         </i><br>
       
  6524                        <i>
       
  6525            TempFeatureMissingFile.Test2
       
  6526         </i><br>
       
  6527         </td>
       
  6528         <td>
       
  6529           
       
  6530            custom/implml/missing_file_in_report_test.implml:11
       
  6531         
       
  6532         </td>
       
  6533         <td>
       
  6534         
       
  6535            output/content/missing_output_file_test2.txt
       
  6536         
       
  6537         </td>
       
  6538     </tr>
       
  6539     <tr>
       
  6540         <td>
       
  6541         </td>
       
  6542         <td>
       
  6543           
       
  6544            custom/implml/output_override_test.implml:6
       
  6545         
       
  6546         </td>
       
  6547         <td>
       
  6548         
       
  6549            output/test_subdir/output_subdir_test.txt
       
  6550         
       
  6551         </td>
       
  6552     </tr>
       
  6553     <tr>
       
  6554         <td>
       
  6555         </td>
       
  6556         <td>
       
  6557           
       
  6558            custom/implml/output_override_test.implml:16
       
  6559         
       
  6560         </td>
       
  6561         <td>
       
  6562         
       
  6563            output/overridden_output/output_rootdir_test.txt
       
  6564         
       
  6565         </td>
       
  6566     </tr>
       
  6567     <tr>
       
  6568         <td>
       
  6569         </td>
       
  6570         <td>
       
  6571           
       
  6572            custom/implml/output_override_test.implml:27
       
  6573         
       
  6574         </td>
       
  6575         <td>
       
  6576         
       
  6577            output/overridden_output/test_subdir/output_rootdir_test.txt
       
  6578         
       
  6579         </td>
       
  6580     </tr>
       
  6581     <tr>
       
  6582         <td>
       
  6583                        <B>
       
  6584            TempFeature2.FilesToCopy.FilePath
       
  6585         </B><br>
       
  6586         </td>
       
  6587         <td>
       
  6588           
       
  6589            custom/implml/seq_tempvar.implml:21
       
  6590         
       
  6591         </td>
       
  6592         <td>
       
  6593         
       
  6594            output/content/temp_seq_test/invocation_phase_test_1.txt
       
  6595         
       
  6596         </td>
       
  6597     </tr>
       
  6598     <tr>
       
  6599         <td>
       
  6600                        <B>
       
  6601            TempFeature2.FilesToCopy.FilePath
       
  6602         </B><br>
       
  6603         </td>
       
  6604         <td>
       
  6605           
       
  6606            custom/implml/seq_tempvar.implml:21
       
  6607         
       
  6608         </td>
       
  6609         <td>
       
  6610         
       
  6611            output/content/temp_seq_test/invocation_phase_test_2.txt
       
  6612         
       
  6613         </td>
       
  6614     </tr>
       
  6615     <tr>
       
  6616         <td>
       
  6617                        <i>
       
  6618            TempFeature.String
       
  6619         </i><br>
       
  6620                        <i>
       
  6621            TempFeature.Int
       
  6622         </i><br>
       
  6623                        <i>
       
  6624            TempFeature.Real
       
  6625         </i><br>
       
  6626                        <i>
       
  6627            TempFeature.Boolean
       
  6628         </i><br>
       
  6629         </td>
       
  6630         <td>
       
  6631           
       
  6632            custom/implml/simple_tempvars.implml:18
       
  6633         
       
  6634         </td>
       
  6635         <td>
       
  6636         
       
  6637            output/content/simple_tempvars_test.txt
       
  6638         
       
  6639         </td>
       
  6640     </tr>
       
  6641     <tr>
       
  6642         <td>
       
  6643         </td>
       
  6644         <td>
       
  6645           
       
  6646            custom/implml/invocation_phase_test.implml:15
       
  6647         
       
  6648         </td>
       
  6649         <td>
       
  6650         
       
  6651            output/content/invocation_phase_test_common_ns.txt
       
  6652         
       
  6653         </td>
       
  6654     </tr>
       
  6655     <tr>
       
  6656         <td>
       
  6657         </td>
       
  6658         <td>
       
  6659           
       
  6660            custom/implml/invocation_phase_test.implml:31
       
  6661         
       
  6662         </td>
       
  6663         <td>
       
  6664         
       
  6665            output/content/invocation_phase_test_contentml_ns.txt
       
  6666         
       
  6667         </td>
       
  6668     </tr>
       
  6669     <tr>
       
  6670         <td>
       
  6671         </td>
       
  6672         <td>
       
  6673             Rule:
       
  6674           
       
  6675            custom/implml/missing_file_in_report_test.implml:28
       
  6676         
       
  6677         </td>
       
  6678         <td>
       
  6679         
       
  6680            TempFeatureMissingFile.Test1
       
  6681         
       
  6682         </td>
       
  6683     </tr>
       
  6684     <tr>
       
  6685         <td>
       
  6686         </td>
       
  6687         <td>
       
  6688             Rule:
       
  6689           
       
  6690            custom/implml/missing_file_in_report_test.implml:29
       
  6691         
       
  6692         </td>
       
  6693         <td>
       
  6694         
       
  6695            TempFeatureMissingFile.Test2
       
  6696         
       
  6697         </td>
       
  6698     </tr>
       
  6699             
       
  6700     <!-- process the refs with no output -->
       
  6701     <tr>
       
  6702         <td>
       
  6703           <B>
       
  6704             
       
  6705            BasicSettingTypesTest.StringSetting
       
  6706         
       
  6707           </B><br>
       
  6708         </td>
       
  6709         <td>
       
  6710             <span class="red">None</span><br>
       
  6711         </td>
       
  6712         <td>
       
  6713             <span class="red">None</span><br> 
       
  6714         </td>
       
  6715     </tr>
       
  6716     <tr>
       
  6717         <td>
       
  6718           <B>
       
  6719             
       
  6720            Feature1.SequenceSetting
       
  6721         
       
  6722           </B><br>
       
  6723         </td>
       
  6724         <td>
       
  6725             <span class="red">None</span><br>
       
  6726         </td>
       
  6727         <td>
       
  6728             <span class="red">None</span><br> 
       
  6729         </td>
       
  6730     </tr>
       
  6731     <tr>
       
  6732         <td>
       
  6733           <B>
       
  6734             
       
  6735            Feature1.SequenceSetting.BooleanSubSetting
       
  6736         
       
  6737           </B><br>
       
  6738         </td>
       
  6739         <td>
       
  6740             <span class="red">None</span><br>
       
  6741         </td>
       
  6742         <td>
       
  6743             <span class="red">None</span><br> 
       
  6744         </td>
       
  6745     </tr>
       
  6746     <tr>
       
  6747         <td>
       
  6748           <B>
       
  6749             
       
  6750            Feature1.SequenceSetting.IntSubSetting
       
  6751         
       
  6752           </B><br>
       
  6753         </td>
       
  6754         <td>
       
  6755             <span class="red">None</span><br>
       
  6756         </td>
       
  6757         <td>
       
  6758             <span class="red">None</span><br> 
       
  6759         </td>
       
  6760     </tr>
       
  6761     <tr>
       
  6762         <td>
       
  6763           <B>
       
  6764             
       
  6765            Feature1.SequenceSetting.RealSubSetting
       
  6766         
       
  6767           </B><br>
       
  6768         </td>
       
  6769         <td>
       
  6770             <span class="red">None</span><br>
       
  6771         </td>
       
  6772         <td>
       
  6773             <span class="red">None</span><br> 
       
  6774         </td>
       
  6775     </tr>
       
  6776     <tr>
       
  6777         <td>
       
  6778           <B>
       
  6779             
       
  6780            Feature1.SequenceSetting.SelectionSubSetting
       
  6781         
       
  6782           </B><br>
       
  6783         </td>
       
  6784         <td>
       
  6785             <span class="red">None</span><br>
       
  6786         </td>
       
  6787         <td>
       
  6788             <span class="red">None</span><br> 
       
  6789         </td>
       
  6790     </tr>
       
  6791     <tr>
       
  6792         <td>
       
  6793           <B>
       
  6794             
       
  6795            Feature1.SequenceSetting.StringSubSetting
       
  6796         
       
  6797           </B><br>
       
  6798         </td>
       
  6799         <td>
       
  6800             <span class="red">None</span><br>
       
  6801         </td>
       
  6802         <td>
       
  6803             <span class="red">None</span><br> 
       
  6804         </td>
       
  6805     </tr>
       
  6806     <tr>
       
  6807         <td>
       
  6808           <B>
       
  6809             
       
  6810            NameIdMappingTestSourceSequences.StringSequence
       
  6811         
       
  6812           </B><br>
       
  6813         </td>
       
  6814         <td>
       
  6815             <span class="red">None</span><br>
       
  6816         </td>
       
  6817         <td>
       
  6818             <span class="red">None</span><br> 
       
  6819         </td>
       
  6820     </tr>
       
  6821     <tr>
       
  6822         <td>
       
  6823           <B>
       
  6824             
       
  6825            NameIdMappingTestSourceSequences.StringSequence.Value
       
  6826         
       
  6827           </B><br>
       
  6828         </td>
       
  6829         <td>
       
  6830             <span class="red">None</span><br>
       
  6831         </td>
       
  6832         <td>
       
  6833             <span class="red">None</span><br> 
       
  6834         </td>
       
  6835     </tr>
       
  6836     <tr>
       
  6837         <td>
       
  6838           <B>
       
  6839             
       
  6840            NameIdMappingTestSourceSequences.StringToIntSequence
       
  6841         
       
  6842           </B><br>
       
  6843         </td>
       
  6844         <td>
       
  6845             <span class="red">None</span><br>
       
  6846         </td>
       
  6847         <td>
       
  6848             <span class="red">None</span><br> 
       
  6849         </td>
       
  6850     </tr>
       
  6851     <tr>
       
  6852         <td>
       
  6853           <B>
       
  6854             
       
  6855            NameIdMappingTestSourceSequences.StringToIntSequence.Name
       
  6856         
       
  6857           </B><br>
       
  6858         </td>
       
  6859         <td>
       
  6860             <span class="red">None</span><br>
       
  6861         </td>
       
  6862         <td>
       
  6863             <span class="red">None</span><br> 
       
  6864         </td>
       
  6865     </tr>
       
  6866     <tr>
       
  6867         <td>
       
  6868           <B>
       
  6869             
       
  6870            NameIdMappingTestSourceSequences.StringToIntSequence.Value
       
  6871         
       
  6872           </B><br>
       
  6873         </td>
       
  6874         <td>
       
  6875             <span class="red">None</span><br>
       
  6876         </td>
       
  6877         <td>
       
  6878             <span class="red">None</span><br> 
       
  6879         </td>
       
  6880     </tr>
       
  6881     <tr>
       
  6882         <td>
       
  6883           <B>
       
  6884             
       
  6885            NameIdMappingTestSourceSequences.StringToRealSequence
       
  6886         
       
  6887           </B><br>
       
  6888         </td>
       
  6889         <td>
       
  6890             <span class="red">None</span><br>
       
  6891         </td>
       
  6892         <td>
       
  6893             <span class="red">None</span><br> 
       
  6894         </td>
       
  6895     </tr>
       
  6896     <tr>
       
  6897         <td>
       
  6898           <B>
       
  6899             
       
  6900            NameIdMappingTestSourceSequences.StringToRealSequence.Name
       
  6901         
       
  6902           </B><br>
       
  6903         </td>
       
  6904         <td>
       
  6905             <span class="red">None</span><br>
       
  6906         </td>
       
  6907         <td>
       
  6908             <span class="red">None</span><br> 
       
  6909         </td>
       
  6910     </tr>
       
  6911     <tr>
       
  6912         <td>
       
  6913           <B>
       
  6914             
       
  6915            NameIdMappingTestSourceSequences.StringToRealSequence.Value
       
  6916         
       
  6917           </B><br>
       
  6918         </td>
       
  6919         <td>
       
  6920             <span class="red">None</span><br>
       
  6921         </td>
       
  6922         <td>
       
  6923             <span class="red">None</span><br> 
       
  6924         </td>
       
  6925     </tr>
       
  6926     <tr>
       
  6927         <td>
       
  6928           <B>
       
  6929             
       
  6930            NameIdMappingTestTargetSettings.Sequence
       
  6931         
       
  6932           </B><br>
       
  6933         </td>
       
  6934         <td>
       
  6935             <span class="red">None</span><br>
       
  6936         </td>
       
  6937         <td>
       
  6938             <span class="red">None</span><br> 
       
  6939         </td>
       
  6940     </tr>
       
  6941     <tr>
       
  6942         <td>
       
  6943           <B>
       
  6944             
       
  6945            SequenceSettingTest.SequenceSetting
       
  6946         
       
  6947           </B><br>
       
  6948         </td>
       
  6949         <td>
       
  6950             <span class="red">None</span><br>
       
  6951         </td>
       
  6952         <td>
       
  6953             <span class="red">None</span><br> 
       
  6954         </td>
       
  6955     </tr>
       
  6956     <tr>
       
  6957         <td>
       
  6958           <B>
       
  6959             
       
  6960            SequenceSettingTest.SequenceSetting.BooleanSubSetting
       
  6961         
       
  6962           </B><br>
       
  6963         </td>
       
  6964         <td>
       
  6965             <span class="red">None</span><br>
       
  6966         </td>
       
  6967         <td>
       
  6968             <span class="red">None</span><br> 
       
  6969         </td>
       
  6970     </tr>
       
  6971     <tr>
       
  6972         <td>
       
  6973           <B>
       
  6974             
       
  6975            SequenceSettingTest.SequenceSetting.FileSubSetting.localPath
       
  6976         
       
  6977           </B><br>
       
  6978         </td>
       
  6979         <td>
       
  6980             <span class="red">None</span><br>
       
  6981         </td>
       
  6982         <td>
       
  6983             <span class="red">None</span><br> 
       
  6984         </td>
       
  6985     </tr>
       
  6986     <tr>
       
  6987         <td>
       
  6988           <B>
       
  6989             
       
  6990            SequenceSettingTest.SequenceSetting.FileSubSetting.targetPath
       
  6991         
       
  6992           </B><br>
       
  6993         </td>
       
  6994         <td>
       
  6995             <span class="red">None</span><br>
       
  6996         </td>
       
  6997         <td>
       
  6998             <span class="red">None</span><br> 
       
  6999         </td>
       
  7000     </tr>
       
  7001     <tr>
       
  7002         <td>
       
  7003           <B>
       
  7004             
       
  7005            SequenceSettingTest.SequenceSetting.FolderSubSetting.localPath
       
  7006         
       
  7007           </B><br>
       
  7008         </td>
       
  7009         <td>
       
  7010             <span class="red">None</span><br>
       
  7011         </td>
       
  7012         <td>
       
  7013             <span class="red">None</span><br> 
       
  7014         </td>
       
  7015     </tr>
       
  7016     <tr>
       
  7017         <td>
       
  7018           <B>
       
  7019             
       
  7020            SequenceSettingTest.SequenceSetting.FolderSubSetting.targetPath
       
  7021         
       
  7022           </B><br>
       
  7023         </td>
       
  7024         <td>
       
  7025             <span class="red">None</span><br>
       
  7026         </td>
       
  7027         <td>
       
  7028             <span class="red">None</span><br> 
       
  7029         </td>
       
  7030     </tr>
       
  7031     <tr>
       
  7032         <td>
       
  7033           <B>
       
  7034             
       
  7035            SequenceSettingTest.SequenceSetting.IntSubSetting
       
  7036         
       
  7037           </B><br>
       
  7038         </td>
       
  7039         <td>
       
  7040             <span class="red">None</span><br>
       
  7041         </td>
       
  7042         <td>
       
  7043             <span class="red">None</span><br> 
       
  7044         </td>
       
  7045     </tr>
       
  7046     <tr>
       
  7047         <td>
       
  7048           <B>
       
  7049             
       
  7050            SequenceSettingTest.SequenceSetting.RealSubSetting
       
  7051         
       
  7052           </B><br>
       
  7053         </td>
       
  7054         <td>
       
  7055             <span class="red">None</span><br>
       
  7056         </td>
       
  7057         <td>
       
  7058             <span class="red">None</span><br> 
       
  7059         </td>
       
  7060     </tr>
       
  7061     <tr>
       
  7062         <td>
       
  7063           <B>
       
  7064             
       
  7065            SequenceSettingTest.SequenceSetting.SelectionSubSetting
       
  7066         
       
  7067           </B><br>
       
  7068         </td>
       
  7069         <td>
       
  7070             <span class="red">None</span><br>
       
  7071         </td>
       
  7072         <td>
       
  7073             <span class="red">None</span><br> 
       
  7074         </td>
       
  7075     </tr>
       
  7076     <tr>
       
  7077         <td>
       
  7078           <B>
       
  7079             
       
  7080            SequenceSettingTest.SequenceSetting.StringSubSetting
       
  7081         
       
  7082           </B><br>
       
  7083         </td>
       
  7084         <td>
       
  7085             <span class="red">None</span><br>
       
  7086         </td>
       
  7087         <td>
       
  7088             <span class="red">None</span><br> 
       
  7089         </td>
       
  7090     </tr>
       
  7091 
   196     </table>
  7092     </table>
   197     
  7093         
   198     <h1>Rule execution results:</h1><br>
  7094     <!-- Create extra data divs only when debug is on -->        
   199     
  7095      <!-- verbose 3 -->
   200     <table class="report">
  7096         
   201         <tr>
  7097     <script language="javascript" type="text/javascript">
   202             <th class="featureName">File</th>
  7098         //<![CDATA[
   203             <th class="featureName">Rule No.</th>
  7099              var output_Props =  {  
   204             <th class="featureName">Input refs</th>
  7100                      paging: false,
   205             <th class="featureName">Affected refs</th>
  7101                      highlight_keywords: true,                      
   206         </tr>
  7102                      rows_counter: true,  
   207         
  7103                      rows_counter_text: "Rows:",  
   208         
  7104                      btn_reset: true,  
   209         <tr>
  7105                      loader: true,  
   210             <a name="rule:custom/implml/missing_file_in_report_test.implml:1"/>
  7106                      loader_text: "Filtering data..."  
   211             <td><a href="file:///this_is_ignored/custom/implml/missing_file_in_report_test.implml">custom/implml/missing_file_in_report_test.implml</a></td>
  7107                  }; 
   212             <td>1</td>
  7108             setFilterGrid("outputs", output_Props);
   213             <td>
       
   214             </td>
       
   215             <td>TempFeatureMissingFile.Test1<br/>
       
   216             
  7109             
   217             </td>
  7110             function Showpopup(item_over, popup_ref)
   218         </tr>
  7111             {
   219         
  7112                 Popup.show(popup_ref, item_over,'top left', {'offsetTop':20});
   220         <tr>
  7113             } 
   221             <a name="rule:custom/implml/missing_file_in_report_test.implml:2"/>
  7114         //]]>
   222             <td><a href="file:///this_is_ignored/custom/implml/missing_file_in_report_test.implml">custom/implml/missing_file_in_report_test.implml</a></td>
  7115     </script>
   223             <td>2</td>
  7116 
   224             <td>
       
   225             </td>
       
   226             <td>TempFeatureMissingFile.Test2<br/>
       
   227             
       
   228             </td>
       
   229         </tr>
       
   230         
       
   231         <tr>
       
   232             <a name="rule:custom/implml/seq_tempvar.implml:1"/>
       
   233             <td><a href="file:///this_is_ignored/custom/implml/seq_tempvar.implml">custom/implml/seq_tempvar.implml</a></td>
       
   234             <td>1</td>
       
   235             <td>
       
   236             </td>
       
   237             <td>TempFeature2.FilesToCopy<br/>
       
   238             
       
   239             </td>
       
   240         </tr>
       
   241         
       
   242         <tr>
       
   243             <a name="rule:custom/implml/simple_tempvars.implml:1"/>
       
   244             <td><a href="file:///this_is_ignored/custom/implml/simple_tempvars.implml">custom/implml/simple_tempvars.implml</a></td>
       
   245             <td>1</td>
       
   246             <td>
       
   247             </td>
       
   248             <td>TempFeature.String<br/>
       
   249             
       
   250             </td>
       
   251         </tr>
       
   252         
       
   253         <tr>
       
   254             <a name="rule:custom/implml/simple_tempvars.implml:2"/>
       
   255             <td><a href="file:///this_is_ignored/custom/implml/simple_tempvars.implml">custom/implml/simple_tempvars.implml</a></td>
       
   256             <td>2</td>
       
   257             <td>
       
   258             </td>
       
   259             <td>TempFeature.Int<br/>
       
   260             
       
   261             </td>
       
   262         </tr>
       
   263         
       
   264         <tr>
       
   265             <a name="rule:custom/implml/simple_tempvars.implml:3"/>
       
   266             <td><a href="file:///this_is_ignored/custom/implml/simple_tempvars.implml">custom/implml/simple_tempvars.implml</a></td>
       
   267             <td>3</td>
       
   268             <td>
       
   269             </td>
       
   270             <td>TempFeature.Real<br/>
       
   271             
       
   272             </td>
       
   273         </tr>
       
   274         
       
   275         
       
   276     </table>
       
   277     
       
   278     
       
   279     <h1>Output files:</h1><br>
       
   280     
       
   281     <table class="report">
       
   282     <tr>
       
   283         <th class="featureName">API</th>
       
   284         <th class="featureName">Data</th>
       
   285         <th class="featureName">Impl. file</th>
       
   286         <th class="featureName">Impl. type</th>
       
   287         <th class="featureName">Generated for</th>
       
   288         <th class="featureName">Output files</th>
       
   289     </tr>
       
   290     
       
   291     
       
   292         <tr>
       
   293             <td align="left" rowspan=1>
       
   294                 <b>MultiSelectionTest.MultiSelectionSetting</b><br>
       
   295                 <b>Name: </b>Multi-selection setting<br>
       
   296                 <b>Type: </b>multiSelection<br>
       
   297                 <b>ConfML: </b><a href="file:///this_is_ignored/base/confml/multiselection.confml">base\confml\multiselection.confml</a>
       
   298             </td>
       
   299             <td align="left" rowspan=1>
       
   300             <table class="report">
       
   301             
       
   302             
       
   303                 
       
   304                     <tr>
       
   305                         <th class="th.header">Layer</th>
       
   306                         <th class="th.header">Value</th>
       
   307                     </tr>
       
   308                     <tr>
       
   309                         <td><a href="file:///this_is_ignored/base/confml/multiselection.confml">base\confml\multiselection.confml</a></td>
       
   310                         <td>&#34;opt 1&#34; &#34;opt 3&#34;</td>
       
   311                     </tr>
       
   312                 
       
   313             
       
   314                 
       
   315                     <tr>
       
   316                         <td><a href="file:///this_is_ignored/data/confml/data.confml">data\confml\data.confml</a></td>
       
   317                         <td>&#34;opt 2&#34; &#34;opt 4&#34; &#34;opt 5&#34;</td>
       
   318                     </tr>
       
   319                 
       
   320             
       
   321             </table>
       
   322 
       
   323             <table class="report">
       
   324                 
       
   325             </table>
       
   326             
       
   327             
       
   328                 
       
   329                     <td align="left">
       
   330                         <a href="file:///this_is_ignored/base/implml/multiselection.templateml">base\implml\multiselection.templateml</a>
       
   331                     </td>
       
   332                     <td align="left">
       
   333                         templateml
       
   334                     </td>
       
   335                     <td align="left">
       
   336                         
       
   337                     </td>
       
   338                     <td align="left">
       
   339                         
       
   340                                 <a href="file:///this_is_ignored/multiselection.txt">output\multiselection.txt</a><br>
       
   341                             
       
   342                     </td>
       
   343                 
       
   344                 
       
   345             
       
   346         </tr>
       
   347     
       
   348     
       
   349         <tr>
       
   350             <td align="left" rowspan=1>
       
   351                 <b>NameIdMappingTestTargetSettings.Int</b><br>
       
   352                 <b>Name: </b>Int setting<br>
       
   353                 <b>Type: </b>int<br>
       
   354                 <b>ConfML: </b><a href="file:///this_is_ignored/base/confml/name_id_mapping_test.confml">base\confml\name_id_mapping_test.confml</a>
       
   355             </td>
       
   356             <td align="left" rowspan=1>
       
   357             <table class="report">
       
   358             
       
   359             
       
   360                 
       
   361                     <tr>
       
   362                         <th class="th.header">Layer</th>
       
   363                         <th class="th.header">Value</th>
       
   364                     </tr>
       
   365                     <tr>
       
   366                         <td><a href="file:///this_is_ignored/base/confml/name_id_mapping_test.confml">base\confml\name_id_mapping_test.confml</a></td>
       
   367                         <td>0</td>
       
   368                     </tr>
       
   369                 
       
   370             
       
   371                 
       
   372                     <tr>
       
   373                         <td><a href="file:///this_is_ignored/data/confml/data.confml">data\confml\data.confml</a></td>
       
   374                         <td>140</td>
       
   375                     </tr>
       
   376                 
       
   377             
       
   378             </table>
       
   379 
       
   380             <table class="report">
       
   381                 
       
   382             </table>
       
   383             
       
   384             
       
   385                 
       
   386                     <td align="left">
       
   387                         <a href="file:///this_is_ignored/base/implml/name_id_mapping_test.templateml">base\implml\name_id_mapping_test.templateml</a>
       
   388                     </td>
       
   389                     <td align="left">
       
   390                         templateml
       
   391                     </td>
       
   392                     <td align="left">
       
   393                         
       
   394                     </td>
       
   395                     <td align="left">
       
   396                         
       
   397                                 <a href="file:///this_is_ignored/name_id_mapping_test.txt">output\name_id_mapping_test.txt</a><br>
       
   398                             
       
   399                     </td>
       
   400                 
       
   401                 
       
   402             
       
   403         </tr>
       
   404     
       
   405     
       
   406         <tr>
       
   407             <td align="left" rowspan=1>
       
   408                 <b>NameIdMappingTestTargetSettings.Real</b><br>
       
   409                 <b>Name: </b>Real setting<br>
       
   410                 <b>Type: </b>real<br>
       
   411                 <b>ConfML: </b><a href="file:///this_is_ignored/base/confml/name_id_mapping_test.confml">base\confml\name_id_mapping_test.confml</a>
       
   412             </td>
       
   413             <td align="left" rowspan=1>
       
   414             <table class="report">
       
   415             
       
   416             
       
   417                 
       
   418                     <tr>
       
   419                         <th class="th.header">Layer</th>
       
   420                         <th class="th.header">Value</th>
       
   421                     </tr>
       
   422                     <tr>
       
   423                         <td><a href="file:///this_is_ignored/base/confml/name_id_mapping_test.confml">base\confml\name_id_mapping_test.confml</a></td>
       
   424                         <td>0</td>
       
   425                     </tr>
       
   426                 
       
   427             
       
   428                 
       
   429                     <tr>
       
   430                         <td><a href="file:///this_is_ignored/data/confml/data.confml">data\confml\data.confml</a></td>
       
   431                         <td>1.4</td>
       
   432                     </tr>
       
   433                 
       
   434             
       
   435             </table>
       
   436 
       
   437             <table class="report">
       
   438                 
       
   439             </table>
       
   440             
       
   441             
       
   442                 
       
   443                     <td align="left">
       
   444                         <a href="file:///this_is_ignored/base/implml/name_id_mapping_test.templateml">base\implml\name_id_mapping_test.templateml</a>
       
   445                     </td>
       
   446                     <td align="left">
       
   447                         templateml
       
   448                     </td>
       
   449                     <td align="left">
       
   450                         
       
   451                     </td>
       
   452                     <td align="left">
       
   453                         
       
   454                                 <a href="file:///this_is_ignored/name_id_mapping_test.txt">output\name_id_mapping_test.txt</a><br>
       
   455                             
       
   456                     </td>
       
   457                 
       
   458                 
       
   459             
       
   460         </tr>
       
   461     
       
   462     
       
   463         <tr>
       
   464             <td align="left" rowspan=1>
       
   465                 <b>NameIdMappingTestTargetSettings.Selection</b><br>
       
   466                 <b>Name: </b>Selection setting<br>
       
   467                 <b>Type: </b>selection<br>
       
   468                 <b>ConfML: </b><a href="file:///this_is_ignored/base/confml/name_id_mapping_test.confml">base\confml\name_id_mapping_test.confml</a>
       
   469             </td>
       
   470             <td align="left" rowspan=1>
       
   471             <table class="report">
       
   472             
       
   473             
       
   474                 
       
   475                     <tr>
       
   476                         <th class="th.header">Layer</th>
       
   477                         <th class="th.header">Value</th>
       
   478                     </tr>
       
   479                     <tr>
       
   480                         <td><a href="file:///this_is_ignored/base/confml/name_id_mapping_test.confml">base\confml\name_id_mapping_test.confml</a></td>
       
   481                         <td>None</td>
       
   482                     </tr>
       
   483                 
       
   484             
       
   485                 
       
   486                     <tr>
       
   487                         <td><a href="file:///this_is_ignored/data/confml/data.confml">data\confml\data.confml</a></td>
       
   488                         <td>Entry 4 (new)</td>
       
   489                     </tr>
       
   490                 
       
   491             
       
   492             </table>
       
   493 
       
   494             <table class="report">
       
   495                 
       
   496             </table>
       
   497             
       
   498             
       
   499                 
       
   500                     <td align="left">
       
   501                         <a href="file:///this_is_ignored/base/implml/name_id_mapping_test.templateml">base\implml\name_id_mapping_test.templateml</a>
       
   502                     </td>
       
   503                     <td align="left">
       
   504                         templateml
       
   505                     </td>
       
   506                     <td align="left">
       
   507                         
       
   508                     </td>
       
   509                     <td align="left">
       
   510                         
       
   511                                 <a href="file:///this_is_ignored/name_id_mapping_test.txt">output\name_id_mapping_test.txt</a><br>
       
   512                             
       
   513                     </td>
       
   514                 
       
   515                 
       
   516             
       
   517         </tr>
       
   518     
       
   519     
       
   520         <tr>
       
   521             <td align="left" rowspan=1>
       
   522                 <b>NameIdMappingTestTargetSettings.Sequence</b><br>
       
   523                 <b>Name: </b>Sequence<br>
       
   524                 <b>Type: </b>sequence<br>
       
   525                 <b>ConfML: </b><a href="file:///this_is_ignored/base/confml/name_id_mapping_test.confml">base\confml\name_id_mapping_test.confml</a>
       
   526             </td>
       
   527             <td align="left" rowspan=1>
       
   528             <table class="report">
       
   529             
       
   530             
       
   531             </table>
       
   532 
       
   533             <table class="report">
       
   534                 
       
   535                     
       
   536                         <tr>
       
   537                             <th class="th.header">Setting</th>
       
   538                             <th class="th.header">Value</th>
       
   539                         </tr>
       
   540                         <tr>
       
   541                             <td><b>Selection sub-setting</b></td>
       
   542                             <td>
       
   543                                 
       
   544                                     Entry 2<br>
       
   545                                 
       
   546                                     Entry 4 (new)<br>
       
   547                                 
       
   548                                     Entry 5 (new)<br>
       
   549                                 
       
   550                             </td>
       
   551                         </tr>
       
   552                     
       
   553                 
       
   554                     
       
   555                         <tr>
       
   556                             <td><b>Int sub-setting</b></td>
       
   557                             <td>
       
   558                                 
       
   559                                     120<br>
       
   560                                 
       
   561                                     140<br>
       
   562                                 
       
   563                                     150<br>
       
   564                                 
       
   565                             </td>
       
   566                         </tr>
       
   567                     
       
   568                 
       
   569                     
       
   570                         <tr>
       
   571                             <td><b>Real sub-setting</b></td>
       
   572                             <td>
       
   573                                 
       
   574                                     1.2<br>
       
   575                                 
       
   576                                     1.4<br>
       
   577                                 
       
   578                                     1.5<br>
       
   579                                 
       
   580                             </td>
       
   581                         </tr>
       
   582                     
       
   583                 
       
   584             </table>
       
   585             
       
   586             
       
   587                 
       
   588                     <td align="left">
       
   589                         <a href="file:///this_is_ignored/base/implml/name_id_mapping_test.templateml">base\implml\name_id_mapping_test.templateml</a>
       
   590                     </td>
       
   591                     <td align="left">
       
   592                         templateml
       
   593                     </td>
       
   594                     <td align="left">
       
   595                         
       
   596                     </td>
       
   597                     <td align="left">
       
   598                         
       
   599                                 <a href="file:///this_is_ignored/name_id_mapping_test.txt">output\name_id_mapping_test.txt</a><br>
       
   600                             
       
   601                     </td>
       
   602                 
       
   603                 
       
   604             
       
   605         </tr>
       
   606     
       
   607     
       
   608         <tr>
       
   609             <td align="left" rowspan=1>
       
   610                 <b><i>TempFeature.Boolean</i></b><br>
       
   611                 <b>Name: </b>Boolean<br>
       
   612                 <b>Type: </b>boolean<br>
       
   613                 <b>ConfML: </b><a href="file:///this_is_ignored/autodata.confml">autodata.confml</a>
       
   614             </td>
       
   615             <td align="left" rowspan=1>
       
   616             <table class="report">
       
   617             
       
   618             
       
   619                 
       
   620                     <tr>
       
   621                         <th class="th.header">Layer</th>
       
   622                         <th class="th.header">Value</th>
       
   623                     </tr>
       
   624                     <tr>
       
   625                         <td><a href="file:///this_is_ignored/autodata.confml">autodata.confml</a></td>
       
   626                         <td>true</td>
       
   627                     </tr>
       
   628                 
       
   629             
       
   630             </table>
       
   631 
       
   632             <table class="report">
       
   633                 
       
   634             </table>
       
   635             
       
   636             
       
   637                 
       
   638                     <td align="left">
       
   639                         <a href="file:///this_is_ignored/custom/implml/simple_tempvars.implml">custom\implml\simple_tempvars.implml</a>
       
   640                     </td>
       
   641                     <td align="left">
       
   642                         templateml
       
   643                     </td>
       
   644                     <td align="left">
       
   645                         
       
   646                     </td>
       
   647                     <td align="left">
       
   648                         
       
   649                                 <a href="file:///this_is_ignored/content/simple_tempvars_test.txt">output\content\simple_tempvars_test.txt</a><br>
       
   650                             
       
   651                     </td>
       
   652                 
       
   653                 
       
   654             
       
   655         </tr>
       
   656     
       
   657     
       
   658         <tr>
       
   659             <td align="left" rowspan=1>
       
   660                 <b><i>TempFeature.Int</i></b><br>
       
   661                 <b>Name: </b>Int<br>
       
   662                 <b>Type: </b>int<br>
       
   663                 <b>ConfML: </b><a href="file:///this_is_ignored/autodata.confml">autodata.confml</a>
       
   664             </td>
       
   665             <td align="left" rowspan=1>
       
   666             <table class="report">
       
   667             
       
   668             
       
   669                 
       
   670                     <tr>
       
   671                         <th class="th.header">Layer</th>
       
   672                         <th class="th.header">Value</th>
       
   673                     </tr>
       
   674                     <tr>
       
   675                         <td><a href="file:///this_is_ignored/autodata.confml">autodata.confml</a></td>
       
   676                         <td>501</td>
       
   677                     </tr>
       
   678                 
       
   679             
       
   680             </table>
       
   681 
       
   682             <table class="report">
       
   683                 
       
   684             </table>
       
   685             
       
   686             
       
   687                 
       
   688                     <td align="left">
       
   689                         <a href="file:///this_is_ignored/custom/implml/simple_tempvars.implml">custom\implml\simple_tempvars.implml</a>
       
   690                     </td>
       
   691                     <td align="left">
       
   692                         templateml
       
   693                     </td>
       
   694                     <td align="left">
       
   695                         
       
   696                     </td>
       
   697                     <td align="left">
       
   698                         
       
   699                                 <a href="file:///this_is_ignored/content/simple_tempvars_test.txt">output\content\simple_tempvars_test.txt</a><br>
       
   700                             
       
   701                     </td>
       
   702                 
       
   703                 
       
   704             
       
   705         </tr>
       
   706     
       
   707     
       
   708         <tr>
       
   709             <td align="left" rowspan=1>
       
   710                 <b><i>TempFeature.Real</i></b><br>
       
   711                 <b>Name: </b>Real<br>
       
   712                 <b>Type: </b>real<br>
       
   713                 <b>ConfML: </b><a href="file:///this_is_ignored/autodata.confml">autodata.confml</a>
       
   714             </td>
       
   715             <td align="left" rowspan=1>
       
   716             <table class="report">
       
   717             
       
   718             
       
   719                 
       
   720                     <tr>
       
   721                         <th class="th.header">Layer</th>
       
   722                         <th class="th.header">Value</th>
       
   723                     </tr>
       
   724                     <tr>
       
   725                         <td><a href="file:///this_is_ignored/autodata.confml">autodata.confml</a></td>
       
   726                         <td>1.75</td>
       
   727                     </tr>
       
   728                 
       
   729             
       
   730             </table>
       
   731 
       
   732             <table class="report">
       
   733                 
       
   734             </table>
       
   735             
       
   736             
       
   737                 
       
   738                     <td align="left">
       
   739                         <a href="file:///this_is_ignored/custom/implml/simple_tempvars.implml">custom\implml\simple_tempvars.implml</a>
       
   740                     </td>
       
   741                     <td align="left">
       
   742                         templateml
       
   743                     </td>
       
   744                     <td align="left">
       
   745                         
       
   746                     </td>
       
   747                     <td align="left">
       
   748                         
       
   749                                 <a href="file:///this_is_ignored/content/simple_tempvars_test.txt">output\content\simple_tempvars_test.txt</a><br>
       
   750                             
       
   751                     </td>
       
   752                 
       
   753                 
       
   754             
       
   755         </tr>
       
   756     
       
   757     
       
   758         <tr>
       
   759             <td align="left" rowspan=3>
       
   760                 <b><i>TempFeature.String</i></b><br>
       
   761                 <b>Name: </b>String<br>
       
   762                 <b>Type: </b>string<br>
       
   763                 <b>ConfML: </b><a href="file:///this_is_ignored/autodata.confml">autodata.confml</a>
       
   764             </td>
       
   765             <td align="left" rowspan=3>
       
   766             <table class="report">
       
   767             
       
   768             
       
   769                 
       
   770                     <tr>
       
   771                         <th class="th.header">Layer</th>
       
   772                         <th class="th.header">Value</th>
       
   773                     </tr>
       
   774                     <tr>
       
   775                         <td><a href="file:///this_is_ignored/autodata.confml">autodata.confml</a></td>
       
   776                         <td>testing and more testing</td>
       
   777                     </tr>
       
   778                 
       
   779             
       
   780             </table>
       
   781 
       
   782             <table class="report">
       
   783                 
       
   784             </table>
       
   785             
       
   786             
       
   787                 
       
   788                     <td align="left">
       
   789                         <a href="file:///this_is_ignored/custom/implml/\conditional_container.implml">custom\implml\conditional_container.implml</a>
       
   790                     </td>
       
   791                     <td align="left">
       
   792                         templateml
       
   793                     </td>
       
   794                     <td align="left">
       
   795                         
       
   796                     </td>
       
   797                     <td align="left">
       
   798                         
       
   799                                 <a href="ignored">output\content\template_string_condition_true.txt</a><br>
       
   800                             
       
   801                     </td>
       
   802                 
       
   803                 
       
   804             
       
   805                 
       
   806                     <tr>
       
   807                     <td align="left">
       
   808                         <a href="file:///this_is_ignored/custom/implml/conditional_container.implml">custom\implml\conditional_container.implml</a>
       
   809                     </td>
       
   810                     <td align="left">
       
   811                         templateml
       
   812                     </td>
       
   813                     <td align="left">
       
   814                         
       
   815                     </td>
       
   816                     <td align="left">
       
   817                         
       
   818                             
       
   819                                 <span class="red">output\content\template_string_condition_false.txt</span><br>
       
   820                             
       
   821                         
       
   822                     </td>
       
   823                     </tr>
       
   824                 
       
   825                 
       
   826             
       
   827                 
       
   828                     <tr>
       
   829                     <td align="left">
       
   830                         <a href="file:///this_is_ignored/custom/implml/simple_tempvars.implml">custom\implml\simple_tempvars.implml</a>
       
   831                     </td>
       
   832                     <td align="left">
       
   833                         templateml
       
   834                     </td>
       
   835                     <td align="left">
       
   836                         
       
   837                     </td>
       
   838                     <td align="left">
       
   839                         
       
   840                             
       
   841                                 <a href="file:///C|/Users/NoBackup/wc/cone-trunk-temp/source/scripts/tests/temp/gen_ll3/output/content/simple_tempvars_test.txt">output\content\simple_tempvars_test.txt</a><br>
       
   842                             
       
   843                         
       
   844                     </td>
       
   845                     </tr>
       
   846                 
       
   847                 
       
   848             
       
   849         </tr>
       
   850     
       
   851     
       
   852         <tr>
       
   853             <td align="left" rowspan=1>
       
   854                 <b><i>TempFeature2.FilesToCopy</i></b><br>
       
   855                 <b>Name: </b>FilesToCopy<br>
       
   856                 <b>Type: </b>sequence<br>
       
   857                 <b>ConfML: </b><a href="file:///C|/Users/NoBackup/wc/cone-trunk/source/scripts/tests/generation_test_project/autodata.confml">autodata.confml</a>
       
   858             </td>
       
   859             <td align="left" rowspan=1>
       
   860             <table class="report">
       
   861             
       
   862             
       
   863             </table>
       
   864 
       
   865             <table class="report">
       
   866                 
       
   867                     
       
   868                         <tr>
       
   869                             <th class="th.header">Setting</th>
       
   870                             <th class="th.header">Value</th>
       
   871                         </tr>
       
   872                         <tr>
       
   873                             <td><b>FilePath</b></td>
       
   874                             <td>
       
   875                                 
       
   876                                     invocation_phase_test_1.txt<br>
       
   877                                 
       
   878                                     invocation_phase_test_2.txt<br>
       
   879                                 
       
   880                                     overlay/overlay_folder/overlay.txt<br>
       
   881                                 
       
   882                             </td>
       
   883                         </tr>
       
   884                     
       
   885                 
       
   886             </table>
       
   887             
       
   888             
       
   889                 
       
   890                     <td align="left">
       
   891                         <a href="file:///C|/Users/NoBackup/wc/cone-trunk/source/scripts/tests/generation_test_project/custom/implml/seq_tempvar.implml">custom\implml\seq_tempvar.implml</a>
       
   892                     </td>
       
   893                     <td align="left">
       
   894                         content
       
   895                     </td>
       
   896                     <td align="left">
       
   897                         
       
   898                     </td>
       
   899                     <td align="left">
       
   900                         
       
   901                                 <a href="file:///this_is_ignored">output\content\temp_seq_test\invocation_phase_test_2.txt</a><br>
       
   902                             
       
   903                                 <a href="file:///this_is_ignored">output\content\temp_seq_test\invocation_phase_test_1.txt</a><br>
       
   904                             
       
   905                     </td>
       
   906                 
       
   907                 
       
   908             
       
   909         </tr>
       
   910     
       
   911     
       
   912         <tr>
       
   913             <td align="left" rowspan=1>
       
   914                 <b><i>TempFeatureMissingFile.Test1</i></b><br>
       
   915                 <b>Name: </b>Test1<br>
       
   916                 <b>Type: </b>string<br>
       
   917                 <b>ConfML: </b><a href="file:///this_is_ignored">autodata.confml</a>
       
   918             </td>
       
   919             <td align="left" rowspan=1>
       
   920             <table class="report">
       
   921             
       
   922             
       
   923                 
       
   924                     <tr>
       
   925                         <th class="th.header">Layer</th>
       
   926                         <th class="th.header">Value</th>
       
   927                     </tr>
       
   928                     <tr>
       
   929                         <td><a href="file:///this_is_ignored">autodata.confml</a></td>
       
   930                         <td>None</td>
       
   931                     </tr>
       
   932                 
       
   933             
       
   934             </table>
       
   935 
       
   936             <table class="report">
       
   937                 
       
   938             </table>
       
   939             
       
   940             
       
   941                 
       
   942                     <td align="left">
       
   943                         <a href="file:///this_is_ignored">custom\implml\missing_file_in_report_test.implml</a>
       
   944                     </td>
       
   945                     <td align="left">
       
   946                         templateml
       
   947                     </td>
       
   948                     <td align="left">
       
   949                         
       
   950                     </td>
       
   951                     <td align="left">
       
   952                         
       
   953                                 <span class="red">output\content\missing_output_file_test1.txt</span><br>
       
   954                             
       
   955                                 <span class="red">output\content\missing_output_file_test2.txt</span><br>
       
   956                             
       
   957                     </td>
       
   958                 
       
   959                 
       
   960             
       
   961         </tr>
       
   962     
       
   963     
       
   964         <tr>
       
   965             <td align="left" rowspan=1>
       
   966                 <b><i>TempFeatureMissingFile.Test2</i></b><br>
       
   967                 <b>Name: </b>Test2<br>
       
   968                 <b>Type: </b>string<br>
       
   969                 <b>ConfML: </b><a href="file:///this_is_ignored">autodata.confml</a>
       
   970             </td>
       
   971             <td align="left" rowspan=1>
       
   972             <table class="report">
       
   973             
       
   974             
       
   975                 
       
   976                     <tr>
       
   977                         <th class="th.header">Layer</th>
       
   978                         <th class="th.header">Value</th>
       
   979                     </tr>
       
   980                     <tr>
       
   981                         <td><a href="file:///this_is_ignored">autodata.confml</a></td>
       
   982                         <td>None</td>
       
   983                     </tr>
       
   984                 
       
   985             
       
   986             </table>
       
   987 
       
   988             <table class="report">
       
   989                 
       
   990             </table>
       
   991             
       
   992             
       
   993                 
       
   994                     <td align="left">
       
   995                         <a href="file:///this_is_ignored">custom\implml\missing_file_in_report_test.implml</a>
       
   996                     </td>
       
   997                     <td align="left">
       
   998                         templateml
       
   999                     </td>
       
  1000                     <td align="left">
       
  1001                         
       
  1002                     </td>
       
  1003                     <td align="left">
       
  1004                         
       
  1005                                 <span class="red">output\content\missing_output_file_test1.txt</span><br>
       
  1006                             
       
  1007                                 <span class="red">output\content\missing_output_file_test2.txt</span><br>
       
  1008                             
       
  1009                     </td>
       
  1010                 
       
  1011                 
       
  1012             
       
  1013         </tr>
       
  1014         
       
  1015     </table>
       
  1016 
       
  1017     <h1>Refs with no implementation:</h1><br>
       
  1018     
       
  1019     <table class="report">
       
  1020     <tr>
       
  1021         <th class="featureName">API</th>
       
  1022         <th class="featureName">Data</th>
       
  1023     </tr>
       
  1024     
       
  1025         <tr>
       
  1026             <td align="left" >
       
  1027                 <b>BasicSettingTypesTest.IntSetting</b><br>
       
  1028                 <b>Name: </b>Int setting<br>
       
  1029                 <b>Type: </b>int<br>
       
  1030                 <b>ConfML: </b><a href="file:///this_is_ignored/base/confml/basic_setting_types_test.confml">base\confml\basic_setting_types_test.confml</a>
       
  1031             </td>
       
  1032             <td align="left">
       
  1033             <table class="report">
       
  1034             
       
  1035             
       
  1036                 
       
  1037                     <tr>
       
  1038                         <th class="th.header">Layer</th>
       
  1039                         <th class="th.header">Value</th>
       
  1040                     </tr>
       
  1041                     <tr>
       
  1042                         <td><a href="file:///this_is_ignored/base/confml/basic_setting_types_test.confml">base\confml\basic_setting_types_test.confml</a></td>
       
  1043                         <td>10</td>
       
  1044                     </tr>
       
  1045                 
       
  1046             
       
  1047                 
       
  1048                     <tr>
       
  1049                         <td><a href="file:///this_is_ignored/data/confml/data.confml">data\confml\data.confml</a></td>
       
  1050                         <td>555</td>
       
  1051                     </tr>
       
  1052                 
       
  1053             
       
  1054             </table>
       
  1055             
       
  1056             <table class="report">
       
  1057                 
       
  1058             </table>
       
  1059         </tr>
       
  1060     
       
  1061         <tr>
       
  1062             <td align="left" >
       
  1063                 <b>BasicSettingTypesTest.StringSetting</b><br>
       
  1064                 <b>Name: </b>String setting<br>
       
  1065                 <b>Type: </b>string<br>
       
  1066                 <b>ConfML: </b><a href="file:///this_is_ignored/base/confml/basic_setting_types_test.confml">base\confml\basic_setting_types_test.confml</a>
       
  1067             </td>
       
  1068             <td align="left">
       
  1069             <table class="report">
       
  1070             
       
  1071             
       
  1072                 
       
  1073                     <tr>
       
  1074                         <th class="th.header">Layer</th>
       
  1075                         <th class="th.header">Value</th>
       
  1076                     </tr>
       
  1077                     <tr>
       
  1078                         <td><a href="file:///this_is_ignored/base/confml/basic_setting_types_test.confml">base\confml\basic_setting_types_test.confml</a></td>
       
  1079                         <td>default string</td>
       
  1080                     </tr>
       
  1081                 
       
  1082             
       
  1083                 
       
  1084                     <tr>
       
  1085                         <td><a href="file:///this_is_ignored/data/confml/data.confml">data\confml\data.confml</a></td>
       
  1086                         <td>&#12459;&#12479;&#12459;&#12490; &lt;&amp;&gt;</td>
       
  1087                     </tr>
       
  1088                 
       
  1089             
       
  1090             </table>
       
  1091             
       
  1092             <table class="report">
       
  1093                 
       
  1094             </table>
       
  1095         </tr>
       
  1096     
       
  1097         <tr>
       
  1098             <td align="left" >
       
  1099                 <b><i>Condition.Boolean</i></b><br>
       
  1100                 <b>Name: </b>Boolean<br>
       
  1101                 <b>Type: </b>boolean<br>
       
  1102                 <b>ConfML: </b><a href="file:///C|/Users/NoBackup/wc/cone-trunk-temp/source/scripts/tests/generation_test_project/autodata.confml">autodata.confml</a>
       
  1103             </td>
       
  1104             <td align="left">
       
  1105             <table class="report">
       
  1106             
       
  1107             
       
  1108                 
       
  1109                     <tr>
       
  1110                         <th class="th.header">Layer</th>
       
  1111                         <th class="th.header">Value</th>
       
  1112                     </tr>
       
  1113                     <tr>
       
  1114                         <td><a href="file:///C|/Users/NoBackup/wc/cone-trunk-temp/source/scripts/tests/generation_test_project/autodata.confml">autodata.confml</a></td>
       
  1115                         <td>true</td>
       
  1116                     </tr>
       
  1117                 
       
  1118             
       
  1119             </table>
       
  1120             
       
  1121             <table class="report">
       
  1122                 
       
  1123             </table>
       
  1124         </tr>
       
  1125     
       
  1126         <tr>
       
  1127             <td align="left" >
       
  1128                 <b><i>Condition.Int</i></b><br>
       
  1129                 <b>Name: </b>Int<br>
       
  1130                 <b>Type: </b>int<br>
       
  1131                 <b>ConfML: </b><a href="file:///C|/Users/NoBackup/wc/cone-trunk-temp/source/scripts/tests/generation_test_project/autodata.confml">autodata.confml</a>
       
  1132             </td>
       
  1133             <td align="left">
       
  1134             <table class="report">
       
  1135             
       
  1136             
       
  1137                 
       
  1138                     <tr>
       
  1139                         <th class="th.header">Layer</th>
       
  1140                         <th class="th.header">Value</th>
       
  1141                     </tr>
       
  1142                     <tr>
       
  1143                         <td><a href="file:///C|/Users/NoBackup/wc/cone-trunk-temp/source/scripts/tests/generation_test_project/autodata.confml">autodata.confml</a></td>
       
  1144                         <td>500</td>
       
  1145                     </tr>
       
  1146                 
       
  1147             
       
  1148             </table>
       
  1149             
       
  1150             <table class="report">
       
  1151                 
       
  1152             </table>
       
  1153         </tr>
       
  1154     
       
  1155         <tr>
       
  1156             <td align="left" >
       
  1157                 <b><i>Condition.Real</i></b><br>
       
  1158                 <b>Name: </b>Real<br>
       
  1159                 <b>Type: </b>real<br>
       
  1160                 <b>ConfML: </b><a href="file:///C|/Users/NoBackup/wc/cone-trunk-temp/source/scripts/tests/generation_test_project/autodata.confml">autodata.confml</a>
       
  1161             </td>
       
  1162             <td align="left">
       
  1163             <table class="report">
       
  1164             
       
  1165             
       
  1166                 
       
  1167                     <tr>
       
  1168                         <th class="th.header">Layer</th>
       
  1169                         <th class="th.header">Value</th>
       
  1170                     </tr>
       
  1171                     <tr>
       
  1172                         <td><a href="file:///C|/Users/NoBackup/wc/cone-trunk-temp/source/scripts/tests/generation_test_project/autodata.confml">autodata.confml</a></td>
       
  1173                         <td>1.5</td>
       
  1174                     </tr>
       
  1175                 
       
  1176             
       
  1177             </table>
       
  1178             
       
  1179             <table class="report">
       
  1180                 
       
  1181             </table>
       
  1182         </tr>
       
  1183     
       
  1184         <tr>
       
  1185             <td align="left" >
       
  1186                 <b><i>Condition.String</i></b><br>
       
  1187                 <b>Name: </b>String<br>
       
  1188                 <b>Type: </b>string<br>
       
  1189                 <b>ConfML: </b><a href="file:///C|/Users/NoBackup/wc/cone-trunk-temp/source/scripts/tests/generation_test_project/autodata.confml">autodata.confml</a>
       
  1190             </td>
       
  1191             <td align="left">
       
  1192             <table class="report">
       
  1193             
       
  1194             
       
  1195                 
       
  1196                     <tr>
       
  1197                         <th class="th.header">Layer</th>
       
  1198                         <th class="th.header">Value</th>
       
  1199                     </tr>
       
  1200                     <tr>
       
  1201                         <td><a href="file:///C|/Users/NoBackup/wc/cone-trunk-temp/source/scripts/tests/generation_test_project/autodata.confml">autodata.confml</a></td>
       
  1202                         <td>testing</td>
       
  1203                     </tr>
       
  1204                 
       
  1205             
       
  1206             </table>
       
  1207             
       
  1208             <table class="report">
       
  1209                 
       
  1210             </table>
       
  1211         </tr>
       
  1212     
       
  1213         <tr>
       
  1214             <td align="left" >
       
  1215                 <b><i>Condition.Unused</i></b><br>
       
  1216                 <b>Name: </b>Unused<br>
       
  1217                 <b>Type: </b>boolean<br>
       
  1218                 <b>ConfML: </b><a href="file:///C|/Users/NoBackup/wc/cone-trunk-temp/source/scripts/tests/generation_test_project/autodata.confml">autodata.confml</a>
       
  1219             </td>
       
  1220             <td align="left">
       
  1221             <table class="report">
       
  1222             
       
  1223             
       
  1224                 
       
  1225                     <tr>
       
  1226                         <th class="th.header">Layer</th>
       
  1227                         <th class="th.header">Value</th>
       
  1228                     </tr>
       
  1229                     <tr>
       
  1230                         <td><a href="file:///C|/Users/NoBackup/wc/cone-trunk-temp/source/scripts/tests/generation_test_project/autodata.confml">autodata.confml</a></td>
       
  1231                         <td>false</td>
       
  1232                     </tr>
       
  1233                 
       
  1234             
       
  1235             </table>
       
  1236             
       
  1237             <table class="report">
       
  1238                 
       
  1239             </table>
       
  1240         </tr>
       
  1241     
       
  1242         <tr>
       
  1243             <td align="left" >
       
  1244                 <b>Feature1.SequenceSetting</b><br>
       
  1245                 <b>Name: </b>Sequence setting<br>
       
  1246                 <b>Type: </b>sequence<br>
       
  1247                 <b>ConfML: </b><a href="file:///this_is_ignored/base/confml/feature1.confml">base\confml\feature1.confml</a>
       
  1248             </td>
       
  1249             <td align="left">
       
  1250             <table class="report">
       
  1251             
       
  1252             
       
  1253             </table>
       
  1254             
       
  1255             <table class="report">
       
  1256                 
       
  1257                     
       
  1258                         <tr>
       
  1259                             <th class="th.header">Setting</th>
       
  1260                             <th class="th.header">Value</th>
       
  1261                         </tr>
       
  1262                         <tr>
       
  1263                             <td><b>Real sub-setting</b></td>
       
  1264                             <td>
       
  1265                                 
       
  1266                                     1.25<br>
       
  1267                                 
       
  1268                                     1.5<br>
       
  1269                                 
       
  1270                                     1.5<br>
       
  1271                                 
       
  1272                             </td>
       
  1273                         </tr>
       
  1274                     
       
  1275                 
       
  1276                     
       
  1277                         <tr>
       
  1278                             <td><b>Int sub-setting</b></td>
       
  1279                             <td>
       
  1280                                 
       
  1281                                     128<br>
       
  1282                                 
       
  1283                                     256<br>
       
  1284                                 
       
  1285                                     256<br>
       
  1286                                 
       
  1287                             </td>
       
  1288                         </tr>
       
  1289                     
       
  1290                 
       
  1291                     
       
  1292                         <tr>
       
  1293                             <td><b>String sub-setting</b></td>
       
  1294                             <td>
       
  1295                                 
       
  1296                                     def1<br>
       
  1297                                 
       
  1298                                     def2<br>
       
  1299                                 
       
  1300                                     test<br>
       
  1301                                 
       
  1302                             </td>
       
  1303                         </tr>
       
  1304                     
       
  1305                 
       
  1306                     
       
  1307                         <tr>
       
  1308                             <td><b>Boolean sub-setting</b></td>
       
  1309                             <td>
       
  1310                                 
       
  1311                                     false<br>
       
  1312                                 
       
  1313                                     false<br>
       
  1314                                 
       
  1315                                     true<br>
       
  1316                                 
       
  1317                             </td>
       
  1318                         </tr>
       
  1319                     
       
  1320                 
       
  1321                     
       
  1322                         <tr>
       
  1323                             <td><b>Selection sub-setting</b></td>
       
  1324                             <td>
       
  1325                                 
       
  1326                                     1<br>
       
  1327                                 
       
  1328                                     1<br>
       
  1329                                 
       
  1330                                     1<br>
       
  1331                                 
       
  1332                             </td>
       
  1333                         </tr>
       
  1334                     
       
  1335                 
       
  1336             </table>
       
  1337         </tr>
       
  1338     
       
  1339         <tr>
       
  1340             <td align="left" >
       
  1341                 <b>NameIdMappingTestSourceSequences.StringSequence</b><br>
       
  1342                 <b>Name: </b>String sequence<br>
       
  1343                 <b>Type: </b>sequence<br>
       
  1344                 <b>ConfML: </b><a href="file:///this_is_ignored/base/confml/name_id_mapping_test.confml">base\confml\name_id_mapping_test.confml</a>
       
  1345             </td>
       
  1346             <td align="left">
       
  1347             <table class="report">
       
  1348             
       
  1349             
       
  1350             </table>
       
  1351             
       
  1352             <table class="report">
       
  1353                 
       
  1354                     
       
  1355                         <tr>
       
  1356                             <th class="th.header">Setting</th>
       
  1357                             <th class="th.header">Value</th>
       
  1358                         </tr>
       
  1359                         <tr>
       
  1360                             <td><b>Value sub-setting</b></td>
       
  1361                             <td>
       
  1362                                 
       
  1363                                     Entry 1<br>
       
  1364                                 
       
  1365                                     Entry 2<br>
       
  1366                                 
       
  1367                                     Entry 3<br>
       
  1368                                 
       
  1369                                     Entry 4 (new)<br>
       
  1370                                 
       
  1371                                     Entry 5 (new)<br>
       
  1372                                 
       
  1373                             </td>
       
  1374                         </tr>
       
  1375                     
       
  1376                 
       
  1377             </table>
       
  1378         </tr>
       
  1379     
       
  1380         <tr>
       
  1381             <td align="left" >
       
  1382                 <b>NameIdMappingTestSourceSequences.StringToIntSequence</b><br>
       
  1383                 <b>Name: </b>String-to-int sequence<br>
       
  1384                 <b>Type: </b>sequence<br>
       
  1385                 <b>ConfML: </b><a href="file:///this_is_ignored/base/confml/name_id_mapping_test.confml">base\confml\name_id_mapping_test.confml</a>
       
  1386             </td>
       
  1387             <td align="left">
       
  1388             <table class="report">
       
  1389             
       
  1390             
       
  1391             </table>
       
  1392             
       
  1393             <table class="report">
       
  1394                 
       
  1395                     
       
  1396                         <tr>
       
  1397                             <th class="th.header">Setting</th>
       
  1398                             <th class="th.header">Value</th>
       
  1399                         </tr>
       
  1400                         <tr>
       
  1401                             <td><b>Name sub-setting</b></td>
       
  1402                             <td>
       
  1403                                 
       
  1404                                     Entry 1<br>
       
  1405                                 
       
  1406                                     Entry 2<br>
       
  1407                                 
       
  1408                                     Entry 3<br>
       
  1409                                 
       
  1410                                     Entry 4 (new)<br>
       
  1411                                 
       
  1412                                     Entry 5 (new)<br>
       
  1413                                 
       
  1414                             </td>
       
  1415                         </tr>
       
  1416                     
       
  1417                 
       
  1418                     
       
  1419                         <tr>
       
  1420                             <td><b>Value sub-setting</b></td>
       
  1421                             <td>
       
  1422                                 
       
  1423                                     100<br>
       
  1424                                 
       
  1425                                     120<br>
       
  1426                                 
       
  1427                                     130<br>
       
  1428                                 
       
  1429                                     140<br>
       
  1430                                 
       
  1431                                     150<br>
       
  1432                                 
       
  1433                             </td>
       
  1434                         </tr>
       
  1435                     
       
  1436                 
       
  1437             </table>
       
  1438         </tr>
       
  1439     
       
  1440         <tr>
       
  1441             <td align="left" >
       
  1442                 <b>NameIdMappingTestSourceSequences.StringToRealSequence</b><br>
       
  1443                 <b>Name: </b>String-to-real sequence<br>
       
  1444                 <b>Type: </b>sequence<br>
       
  1445                 <b>ConfML: </b><a href="file:///this_is_ignored/base/confml/name_id_mapping_test.confml">base\confml\name_id_mapping_test.confml</a>
       
  1446             </td>
       
  1447             <td align="left">
       
  1448             <table class="report">
       
  1449             
       
  1450             
       
  1451             </table>
       
  1452             
       
  1453             <table class="report">
       
  1454                 
       
  1455                     
       
  1456                         <tr>
       
  1457                             <th class="th.header">Setting</th>
       
  1458                             <th class="th.header">Value</th>
       
  1459                         </tr>
       
  1460                         <tr>
       
  1461                             <td><b>Name sub-setting</b></td>
       
  1462                             <td>
       
  1463                                 
       
  1464                                     Entry 1<br>
       
  1465                                 
       
  1466                                     Entry 2<br>
       
  1467                                 
       
  1468                                     Entry 3<br>
       
  1469                                 
       
  1470                                     Entry 4 (new)<br>
       
  1471                                 
       
  1472                                     Entry 5 (new)<br>
       
  1473                                 
       
  1474                             </td>
       
  1475                         </tr>
       
  1476                     
       
  1477                 
       
  1478                     
       
  1479                         <tr>
       
  1480                             <td><b>Value sub-setting</b></td>
       
  1481                             <td>
       
  1482                                 
       
  1483                                     1.1<br>
       
  1484                                 
       
  1485                                     1.2<br>
       
  1486                                 
       
  1487                                     1.3<br>
       
  1488                                 
       
  1489                                     1.4<br>
       
  1490                                 
       
  1491                                     1.5<br>
       
  1492                                 
       
  1493                             </td>
       
  1494                         </tr>
       
  1495                     
       
  1496                 
       
  1497             </table>
       
  1498         </tr>
       
  1499     
       
  1500         <tr>
       
  1501             <td align="left" >
       
  1502                 <b>SequenceSettingTest.SequenceSetting</b><br>
       
  1503                 <b>Name: </b>Sequence setting<br>
       
  1504                 <b>Type: </b>sequence<br>
       
  1505                 <b>ConfML: </b><a href="file:///this_is_ignored/base/confml/sequence_setting_test.confml">base\confml\sequence_setting_test.confml</a>
       
  1506             </td>
       
  1507             <td align="left">
       
  1508             <table class="report">
       
  1509             
       
  1510             
       
  1511             </table>
       
  1512             
       
  1513             <table class="report">
       
  1514                 
       
  1515                     
       
  1516                         <tr>
       
  1517                             <th class="th.header">Setting</th>
       
  1518                             <th class="th.header">Value</th>
       
  1519                         </tr>
       
  1520                         <tr>
       
  1521                             <td><b>Folder sub-setting</b></td>
       
  1522                             <td>
       
  1523                                 
       
  1524                                     [&#39;seq/default_folder&#39;, None]<br>
       
  1525                                 
       
  1526                             </td>
       
  1527                         </tr>
       
  1528                     
       
  1529                 
       
  1530                     
       
  1531                         <tr>
       
  1532                             <td><b>localPath</b></td>
       
  1533                             <td>
       
  1534                                 
       
  1535                                     seq/default_folder<br>
       
  1536                                 
       
  1537                             </td>
       
  1538                         </tr>
       
  1539                     
       
  1540                 
       
  1541                     
       
  1542                         <tr>
       
  1543                             <td><b>targetPath</b></td>
       
  1544                             <td>
       
  1545                                 
       
  1546                                     None<br>
       
  1547                                 
       
  1548                             </td>
       
  1549                         </tr>
       
  1550                     
       
  1551                 
       
  1552                     
       
  1553                         <tr>
       
  1554                             <td><b>Real sub-setting</b></td>
       
  1555                             <td>
       
  1556                                 
       
  1557                                     10.10<br>
       
  1558                                 
       
  1559                             </td>
       
  1560                         </tr>
       
  1561                     
       
  1562                 
       
  1563                     
       
  1564                         <tr>
       
  1565                             <td><b>File sub-setting</b></td>
       
  1566                             <td>
       
  1567                                 
       
  1568                                     [&#39;seq/default_file.txt&#39;, None]<br>
       
  1569                                 
       
  1570                             </td>
       
  1571                         </tr>
       
  1572                     
       
  1573                 
       
  1574                     
       
  1575                         <tr>
       
  1576                             <td><b>localPath</b></td>
       
  1577                             <td>
       
  1578                                 
       
  1579                                     seq/default_file.txt<br>
       
  1580                                 
       
  1581                             </td>
       
  1582                         </tr>
       
  1583                     
       
  1584                 
       
  1585                     
       
  1586                         <tr>
       
  1587                             <td><b>targetPath</b></td>
       
  1588                             <td>
       
  1589                                 
       
  1590                                     None<br>
       
  1591                                 
       
  1592                             </td>
       
  1593                         </tr>
       
  1594                     
       
  1595                 
       
  1596                     
       
  1597                         <tr>
       
  1598                             <td><b>Int sub-setting</b></td>
       
  1599                             <td>
       
  1600                                 
       
  1601                                     120<br>
       
  1602                                 
       
  1603                             </td>
       
  1604                         </tr>
       
  1605                     
       
  1606                 
       
  1607                     
       
  1608                         <tr>
       
  1609                             <td><b>String sub-setting</b></td>
       
  1610                             <td>
       
  1611                                 
       
  1612                                     &lt;&amp;&#12459;&#12479;&#12459;&#12490;&gt;<br>
       
  1613                                 
       
  1614                             </td>
       
  1615                         </tr>
       
  1616                     
       
  1617                 
       
  1618                     
       
  1619                         <tr>
       
  1620                             <td><b>Boolean sub-setting</b></td>
       
  1621                             <td>
       
  1622                                 
       
  1623                                     true<br>
       
  1624                                 
       
  1625                             </td>
       
  1626                         </tr>
       
  1627                     
       
  1628                 
       
  1629                     
       
  1630                         <tr>
       
  1631                             <td><b>Selection sub-setting</b></td>
       
  1632                             <td>
       
  1633                                 
       
  1634                                     2<br>
       
  1635                                 
       
  1636                             </td>
       
  1637                         </tr>
       
  1638                     
       
  1639                 
       
  1640             </table>
       
  1641         </tr>
       
  1642     
       
  1643         <tr>
       
  1644             <td align="left" >
       
  1645                 <b><i>TempFeature.Unused</i></b><br>
       
  1646                 <b>Name: </b>Unused<br>
       
  1647                 <b>Type: </b>boolean<br>
       
  1648                 <b>ConfML: </b><a href="file:///this_is_ignored/autodata.confml">autodata.confml</a>
       
  1649             </td>
       
  1650             <td align="left">
       
  1651             <table class="report">
       
  1652             
       
  1653             
       
  1654                 
       
  1655                     <tr>
       
  1656                         <th class="th.header">Layer</th>
       
  1657                         <th class="th.header">Value</th>
       
  1658                     </tr>
       
  1659                     <tr>
       
  1660                         <td><a href="file:///this_is_ignored/autodata.confml">autodata.confml</a></td>
       
  1661                         <td>false</td>
       
  1662                     </tr>
       
  1663                 
       
  1664             
       
  1665             </table>
       
  1666             
       
  1667             <table class="report">
       
  1668                 
       
  1669             </table>
       
  1670         </tr>
       
  1671         
       
  1672     </table>
       
  1673     <h1>Not generated output files:</h1><br>
       
  1674     
       
  1675     <table class="report">
       
  1676     <tr>
       
  1677         <th class="featureName">Output file</th>
       
  1678     </tr>
       
  1679     
       
  1680         <tr>
       
  1681             <td align="left" >
       
  1682                 output\content\template_string_condition_false.txt
       
  1683             </td>
       
  1684     
       
  1685         <tr>
       
  1686             <td align="left" >
       
  1687                 output\content\missing_output_file_test1.txt
       
  1688             </td>
       
  1689     
       
  1690         <tr>
       
  1691             <td align="left" >
       
  1692                 output\content\missing_output_file_test2.txt
       
  1693             </td>
       
  1694     
       
  1695     </table>
       
  1696     
  7117     
  1697 </body>
  7118 </body>
  1698 </html>
  7119 </html>