	/*
		Function: Table
		Purpose: To create an alternating row table containing data from an Ajax object.
		Use: To initialize first use
				var objTable = new Table( strTableID, strTableClass, objDestination )
			Where:  strTableID is the id of the id you wish the table to be known as.
					strTableClass is the style sheet class for the table.
					objDestination is the object that the table will be appended to (if null then the document body will get the table).
					
		Properties:	objTable.
						RowWriteSpeed = integer; Sets or retrieves the speed that the rows will be written in miliseconds. Default is 25.
						RecordCount = integer; Sets or retrieves the number of records returned. Default is 0.
						RecordLimit = integer; Sets or retrieves the maximum number of records that can be displayed. Default is 150.
						RecordeIndexStart = integer; Sets or retrieves the start index. Default is 0.
						isPaged = boolean; Sets or retrieve the pageination feature. Default is false.
						RowsPerPage = integer; Sets or retrieves the number of rows to write if isPaged equals true. Default is 15.
						AlternateEvery = integer; Sets or retrieves the number of rows the background color will be applied to before swapping. Default is 1.
						AjaxNodeName = string; Sets or retrieves the name of the XML node that contains the data you need. Default is "result".
						ContainsHotTracks = boolean; Sets or retrieve the Hot Track flag to tell the construct to seperate Hot Tracks from the rest
													 of the track list.
		Methods: objTable
						Headers( sText ) Creates an array of values to construct the table header(s).
						HeaderClass( sText ) Creates an array of values that contain the class names used by the table header(s).
						HeaderAttributes(  sText ) Is a place holder for a future feature.
						AjaxFields( sText ) Creates an array of values that contain field names for the Ajax object.
						RowTemplate( sText ) Creates an array of values that contain the contents of the table cells.
							Remarks: Any text or XHTML can be used as a value as long as the value is contained in quotes. To insert data from the
									 Ajax object you must use {n} in place of the data where n references the index of the field name in the AjaxFields
									 array.
									 Example:
									 	objTable.AjaxFields( 'url', 'site_name' );
									 	objTable.RowTemplate( '<a href="{0}">{1}</a>' );

										Will produce
											<a href="http://www.napster.com">Napster</a>
										if the url field is http://www.napster.com
										and the site_name field is Napster.

						RowClass( sText ) Creates an array of values that contain the class names used by the table cell(s).
						RowLogic( sText ) Creates an array that contains logic to use on specific cell data.
							Remarks: This array uses the same syntax as the RowTemplate method except that the values contain evaluatable logic.
								Example:
									objTable.AjaxFields( 'explicit' );
									objTable.RowTemplate( '<a href="{0}">{1}</a>', null );
									RowLogic( null, '( {0} == 0 )? "" : "Explicit"' );

									Will use the outcome of the logic as the contents of the second column.
									Notice that the first array value is null, this tells the construct to use the template value. The index of the
									array values are matched to the index of the RowTemplate array.
									
						DrawHeaders() Is a safety method. If there is no data returned from the Ajax call you can still write the headers of the table
									  by calling this method if desired.
									  
						MakeTable( oXMLObject required, iStartIndex optional ) Writes the table cell data to the table object.
							Remarks: oXMLObject must contain the request.responseXML.documentElement returned by the Ajax call.
									 iStartIndex is the record index that you want to start writting from. The default is 0. This is used mainly for
									 pagination.
			
	*/
	/* !!!!!!!!!! - 20070424 - MIrwin added "strTableCellspace" var to control table spacing */
	
	function Table( strTableID, strTableClass, objDestination, strTableCellspace ){
		this.table = document.createElement( 'TABLE' );
		if( strTableID != null )
			this.table.id = strTableID;
		if( strTableClass != null )
			this.table.className = strTableClass;
		if( strTableCellspace != null )
			this.table.cellSpacing = strTableCellspace;
		this.table.object = this;
		if( objDestination != null ){
			this.destination = objDestination;
			this.destination.innerHTML = '';
			objDestination.appendChild( this.table );
		}
		else{
			this.destination = document.body;
			document.body.appendChild( this.table );
		}
		this.NavigatePage = function(){
			if( arguments[0] == 'next' ){
				if( this.RecordIndex < this.RecordCount )
					this.RecordIndex = ( parseInt( this.RecordIndex ) );
				this.MakeTable( this.RecordIndex );
			}
			else{
				if( this.RecordIndex > 0 )
					this.RecordIndex = ( parseInt( this.RecordIndex ) - ( parseInt( this.RowsPerPage ) * 2 ) );
				if( this.RecordIndex < 0 )
					this.RecordIndex = 0;
				this.MakeTable( this.RecordIndex );
			}
		}
		this.tbody = document.createElement( 'TBODY' );
		this.table.appendChild( this.tbody );
		this.interval = null;
		this.RowWriteSpeed = 1;
		this.RecordCount = 0;
		this.RecordIndex = 0;
		this.RecordLimit = 400;
		this.RecordeIndexStart = 0;
		this.ContainsHotTracks = false;
		this.HotTracksWritten = false;
		this.HotTracksIndex = 0;
		this.HotTracksColSpan = 0;
		this.HotTrackCount = 0;
		this.isPaged = false;
		this.RowsPerPage = 30;
		this.AlternateEvery = 1;
		this.AlternateEveryIndex = 0;
		this.AlternateRowColor_1 = '#FFFFFF';
		this.AlternateRowColor_2 = '#F6F6F6';
		this.ReturnIndex = false;
		this.AjaxNodeName = 'result';
		this.AjaxFieldsArray = null;
		this.AjaxObject = null;
		this.ZeroRecordsError = null;
		this.RowColor = this.AlternateRowColor_2;
		this.AlternateRowColor = function(){
			if( this.RowColor == this.AlternateRowColor_2 )
				this.RowColor = this.AlternateRowColor_1;
			else
				this.RowColor = this.AlternateRowColor_2;
			return;
		}
		this.hrow = document.createElement( 'TR' );
		this.tbody.appendChild( this.hrow );
		this.Headers = function(){
			this.Headers = arguments;
		}
		this.HeaderClass = function(){
			this.HeaderClass = arguments;
		}
		this.HeaderAttributes = function(){
			this.HeaderAttributes = arguments;
		}
		this.HeadersDrawn = false;
		this.DrawHeaders = function(){
			for( var i = 0; i < this.Headers.length; i++ ){
				var objHeaderCell = document.createElement( 'TH' );
				if( this.HeaderAttributes[i] != null ){
					var aryCellAttributes = this.HeaderAttributes[i].split( ',' );
					for( var j = 0; j < aryCellAttributes.length; j++ )
						eval( 'objHeaderCell.' + aryCellAttributes[j] );
				}
				objHeaderCell.innerHTML = this.Headers[i];
				if( this.HeaderClass[i] != null )
					objHeaderCell.className = 'TableHeader ' + this.HeaderClass[i];
				this.hrow.appendChild( objHeaderCell );
			}
			this.HeadersDrawn = true;
		}
		this.AjaxFields = function(){
			this.AjaxFieldsArray = arguments;
		}
		this.Row = function(){
			var objRow = document.createElement( 'TR' );
			if( arguments[0] != null )
				objCell.className = arguments[0];
			this.tbody.appendChild( objRow );
			for( var i = 0; i < this.RowEventsArray.length; i++ ){
				eval( 'objRow.' + this.RowEventsArray[i] );
			}
			return objRow;
		}
		
		this.RowTemplateArray = new Array();
		this.RowEventsArray = new Array();
		this.RowAttributesArray = new Array();
		this.RowClassArray = new Array();
		this.RowLogicArray = new Array();
		this.TemplateIndex = 0;
		this.RowEvents = function(){
			this.RowEventsArray = arguments;
		}
		this.RowTemplate = function(){
			this.TemplateIndex = 0; //this.RowTemplateArray.length;
			this.RowTemplateArray[this.TemplateIndex] = arguments;
			this.RowAttributesArray[this.TemplateIndex] = '';
			this.RowClassArray[this.TemplateIndex] = '';
			this.RowLogicArray[this.TemplateIndex] = '';
		}
		this.RowAttributes = function(){
			this.RowAttributesArray[this.TemplateIndex] = arguments;
		}
		this.RowClass = function(){
			this.RowClassArray[this.TemplateIndex] = arguments;
		}
		this.RowLogic = function(){
			this.RowLogicArray[this.TemplateIndex] = arguments;
		}
		this.AddRow = function( objToInsert, intAjaxIndex ){
			if( intAjaxIndex != null ){
				var objAjaxData = objToInsert.getElementsByTagName( this.AjaxNodeName )[intAjaxIndex];
				for( var zed = 0; zed < this.RowTemplateArray.length; zed++ ){
					var objRow = this.Row();
					for( var i = 0; i < this.RowEventsArray.length; i++ ){
						eval( 'objRow.' + this.RowEventsArray[i] );
					}
					if( this.AlternateEveryIndex == this.AlternateEvery ){
						this.AlternateRowColor();
						this.AlternateEveryIndex = 0;
					}
					this.AlternateEveryIndex++;
					
					if( this.HotTracksColSpan < this.RowTemplateArray[zed].length )
						this.HotTracksColSpan = this.RowTemplateArray[zed].length;
		
					objRow.style.background = this.RowColor;
					for( var i = 0; i < this.RowTemplateArray[zed].length; i++ ){
						objCell = document.createElement( 'TD' );
						if( this.RowAttributesArray[zed] != null && this.RowAttributesArray[zed][i] != null ){
							var aryCellAttributes = this.RowAttributesArray[zed][i].split( ',' );
							for( var j = 0; j < aryCellAttributes.length; j++ )
								eval( 'objCell.' + aryCellAttributes[j] );
						}
						if( this.RowClassArray[zed] != null && this.RowClassArray[zed][i] != null )
							objCell.className = this.RowClassArray[zed][i];
						var dataPattern = new RegExp( '\\{[\\d]+\\}', 'g' );
						var indexPattern = new RegExp( '\\{i\\}', 'g' );
						var objQuoteExp = new RegExp( '"', 'g' );
						var strLogic = null;
						if( this.RowLogicArray[zed] != null && this.RowLogicArray[zed][i] != null ){
							var objLogicMatch = this.RowLogicArray[zed][i].match( dataPattern );
							if( objLogicMatch ){
								strLogic = this.RowLogicArray[zed][i];
								for( var j = 0; j < objLogicMatch.length; j++ ){
									var intAjaxIndex = new Number( objLogicMatch[j].replace( /[\\{\\}]/g, '' ) );
									var strCleanText = objAjaxData.getAttribute( this.AjaxFieldsArray[intAjaxIndex] );
									if( strCleanText != null && strCleanText.match( objQuoteExp ) )
										strCleanText = strCleanText.replace( objQuoteExp, '\\\"' );
									strLogic = strLogic.replace( objLogicMatch[j], strCleanText )
								}
							}
							else
								strLogic = this.RowLogicArray[zed][i];
						}
						var objDataMatch = this.RowTemplateArray[zed][i].match( dataPattern );
						var strHTML = '';
						if( strLogic != null ){
							strHTML = eval( strLogic );
						}
						else{
							if( objDataMatch ){
								strHTML = this.RowTemplateArray[zed][i];
								for( var j = 0; j < objDataMatch.length; j++ ){
									var intAjaxIndex = new Number( objDataMatch[j].replace( /[\\{\\}]/g, '' ) );
									var strCleanText = objAjaxData.getAttribute( this.AjaxFieldsArray[intAjaxIndex] );
									if( strCleanText != null && strCleanText.match( objQuoteExp ) )
										strCleanText = strCleanText.replace( objQuoteExp, '\\\"' );
									strHTML = strHTML.replace( objDataMatch[j], strCleanText );
								}
							}
							else
								strHTML = this.RowTemplateArray[zed][i];
						}
						if( strHTML.match( indexPattern ) ){
							strHTML = strHTML.replace( indexPattern, this.RecordIndex );
						}
						
						objCell.innerHTML = strHTML;
						objRow.appendChild( objCell );
					}
				}
			}
			else{
				var objRow = this.Row();
				for( var i = 0; i < this.RowEventsArray.length; i++ ){
					eval( 'objRow.' + this.RowEventsArray[i] );
				}
				if( this.AlternateEveryIndex == this.AlternateEvery ){
					this.AlternateRowColor();
					this.AlternateEveryIndex = 0;
				}
				this.AlternateEveryIndex++;
	
				objRow.style.background = this.RowColor;
				objCell = document.createElement( 'TD' );
				objCell.innerHTML = objToInsert;
				objRow.appendChild( objCell );
				return objCell;
			}
		}
		this.CountView = null;
		this.PageNavDiv = null;
		this.interval = null;
		this.StartIndex = 0;
		this.indexOffset = 0;
		this.MakeTable = function(){
			if( this.AjaxObject != null ){
				if( this.interval != null )
					clearInterval( this.interval );
				this.AlternateEvery = ( this.TemplateIndex + 1 );
				if( this.PageNavDiv != null )
					this.PageNavDiv.innerHTML = '';
				if( this.tbody.rows.length > 1 ){
					for( i = ( this.tbody.rows.length - 1 ); i > 0; i-- ){
						this.tbody.deleteRow( i );
					}
				}
				if( arguments[0] != null ){
					this.RecordIndex = new Number( arguments[0] );
					this.StartIndex = new Number( arguments[0] );
				}
				if( !this.HeadersDrawn )
					this.DrawHeaders();
				var objThisTable = this;
				var intRecordLength = this.AjaxObject.getElementsByTagName( this.AjaxNodeName ).length;
				this.RecordCount = ( intRecordLength > this.RecordLimit )? this.RecordLimit : intRecordLength;
				if( this.CountView != null ){
					var intCurrentDisplayCountMax = parseInt( this.RecordIndex ) + parseInt( this.RowsPerPage );
					$( this.CountView ).innerHTML = 'Viewing ' + ( this.RecordIndex + 1 ) + '-' + ( ( intCurrentDisplayCountMax > this.RecordCount )? this.RecordCount : intCurrentDisplayCountMax ) + ' of ' + this.RecordCount;
				}
				if( new Number( intRecordLength ) == 0 ){
					if( this.ZeroRecordsError != null ){
						this.destination.innerHTML = this.ZeroRecordsError;
					}
					if( this.CountView != null )
						$( this.CountView ).innerHTML = '&nbsp;' + this.AjaxObject.getAttribute( 'num_results' ) + ' items returned.';
					else
						this.destination.appendChild( document.createTextNode( '&nbsp;' + intRecordLength + ' items returned.' ) );
				}
				else{
					var intRecordLimit = 0;
					if( this.isPaged ){
						intRecordLimit = this.RecordIndex + this.RowsPerPage;
						if( intRecordLimit > this.RecordCount )
							intRecordLimit = this.RecordCount;
					}
					else{
						if( this.RecordLimit > this.RecordCount )
							intRecordLimit = ( this.RecordCount ) - this.RecordIndex;
						else
							intRecordLimit = this.RecordLimit;
					}
					
					if( this.ContainsHotTracks && intRecordLength == 1 )
						this.ContainsHotTracks = false;
					if( this.ContainsHotTracks ){
						this.HotTrackCount = this.AjaxObject.getAttribute( 'num_hot_tracks' );
						if( this.AjaxObject.getAttribute( 'num_hot_tracks' ) > 0 && this.RecordIndex == 0 ){
							var objRow = objThisTable.Row();
							objRow.style.background = '#E3E5E6';
							objCell = document.createElement( 'TD' );
							objCell.colSpan = objThisTable.RowTemplateArray[0].length;
							objCell.innerHTML = 'Most popular tracks';
							objCell.className = 'HotTrackSeperator';
							this.AlternateEveryIndex = 1;
							objRow.appendChild( objCell );
							if( this.RecordCount > intRecordLimit )
								objThisTable.indexOffset++;
						}
					}
					this.HotTracksWritten = false;
					var objAjaxObject = this.AjaxObject.getElementsByTagName( this.AjaxNodeName );
					if( $B.browser == 'safari' || ( $B.browser == 'firefox' && $B.version == '1.0.7' ) ){
						for( var intIndex = this.RecordIndex; intIndex < intRecordLimit; intIndex++ ){
							objAjaxData = objAjaxObject[intIndex];
							for( var zed = 0; zed < this.RowTemplateArray.length; zed++ ){
								var objRow = this.Row();
								if( this.AlternateEveryIndex == this.AlternateEvery ){
									this.AlternateRowColor();
									this.AlternateEveryIndex = 0;
								}
								this.AlternateEveryIndex++;
								if( this.HotTracksColSpan < this.RowTemplateArray[zed].length )
									this.HotTracksColSpan = this.RowTemplateArray[zed].length;
								objRow.style.background = this.RowColor;
								for( var i = 0; i < this.RowTemplateArray[zed].length; i++ ){
									objCell = document.createElement( 'TD' );
									if( this.RowAttributesArray[zed] != null && this.RowAttributesArray[zed][i] != null ){
										var aryCellAttributes = this.RowAttributesArray[zed][i].split( ',' );
										for( var j = 0; j < aryCellAttributes.length; j++ )
											eval( 'objCell.' + aryCellAttributes[j] );
									}
									if( this.RowClassArray[zed] != null && this.RowClassArray[zed][i] != null )
										objCell.className = this.RowClassArray[zed][i];
									var dataPattern = new RegExp( '\\{[\\d]+\\}', 'g' );
									var indexPattern = new RegExp( '\\{i\\}', 'g' );
									var objQuoteExp = new RegExp( '"', 'g' );
									var strLogic = null;
									if( this.RowLogicArray[zed] != null && this.RowLogicArray[zed][i] != null ){
										var objLogicMatch = this.RowLogicArray[zed][i].match( dataPattern );
										if( objLogicMatch ){
											strLogic = this.RowLogicArray[zed][i];
											for( var j = 0; j < objLogicMatch.length; j++ ){
												var intAjaxIndex = new Number( objLogicMatch[j].replace( /[\\{\\}]/g, '' ) );
												var strCleanText = objAjaxData.getAttribute( this.AjaxFieldsArray[intAjaxIndex] );
												if( strCleanText != null && strCleanText.match( objQuoteExp ) )
													strCleanText = strCleanText.replace( objQuoteExp, '&quot;' );
												strLogic = strLogic.replace( objLogicMatch[j], strCleanText )
											}
										}
										else
											strLogic = this.RowLogicArray[zed][i];
									}
									var objDataMatch = this.RowTemplateArray[zed][i].match( dataPattern );
									var strHTML = '';
									if( strLogic != null )
										strHTML = eval( strLogic );
									else{
										if( objDataMatch ){
											strHTML = this.RowTemplateArray[zed][i];
											for( var j = 0; j < objDataMatch.length; j++ ){
												var intAjaxIndex = new Number( objDataMatch[j].replace( /[\\{\\}]/g, '' ) );
												var strCleanText = objAjaxData.getAttribute( this.AjaxFieldsArray[intAjaxIndex] );
												if( strCleanText != null && strCleanText.match( objQuoteExp ) )
													strCleanText = strCleanText.replace( objQuoteExp, '&quot;' );
												strHTML = strHTML.replace( objDataMatch[j], strCleanText );
											}
										}
										else
											strHTML = this.RowTemplateArray[zed][i];
									}
									if( strHTML.match( indexPattern ) ){
										strHTML = strHTML.replace( indexPattern, this.RecordIndex );
									}
									objCell.innerHTML = strHTML;
									objRow.appendChild( objCell );
								}
							}
							if( objThisTable.ContainsHotTracks && objThisTable.HotTrackCount > 0 && intRecordLength > 1 && objThisTable.RecordIndex == ( objThisTable.HotTrackCount - 1 ) ){
								if( objThisTable.RecordIndex >= ( objThisTable.HotTrackCount - 1 ) && !objThisTable.HotTracksWritten ){
									var objRow = objThisTable.Row();
									objRow.style.background = '#E3E5E6';
									objCell = document.createElement( 'TD' );
									objCell.colSpan = objThisTable.HotTracksColSpan;
									var intTrackCount = objThisTable.RecordCount - objThisTable.HotTrackCount;
									objCell.innerHTML = 'All (' + intTrackCount + ') track results sorted chronologically by most recent';
									objCell.className = 'HotTrackSeperator';
									objRow.appendChild( objCell );
									objThisTable.AlternateRowColor();
									objThisTable.AlternateEveryIndex = 1;
									if( objThisTable.RecordCount > intRecordLimit )
										objThisTable.indexOffset++;
									objThisTable.HotTracksWritten = true;
								}
							}
							this.RecordIndex++;
							if( this.RecordIndex >= ( intRecordLimit - this.indexOffset ) ){
								if( this.isPaged ){
									if( this.RowsPerPage < this.RecordCount ){
										var strPageNavigationHTML = '';
										var intPageCount = Math.ceil( this.RecordCount / this.RowsPerPage );
										for( var i = 0; i < intPageCount; i++ ){
											var intRowsPerPageCount = ( ( i * this.RowsPerPage ) - this.indexOffset );
											if( intRowsPerPageCount < 0 )
												intRowsPerPageCount = 0;
											if( i == 0 ){
												if( ( this.RowsPerPage * i ) == ( this.RecordIndex - this.RowsPerPage ) )
													strPageNavigationHTML += '&lt;Prev | ';
												else
													strPageNavigationHTML += '<a href="javascript:$(\'' + this.table.id + '\').object.NavigatePage( \'prev\' )">&lt;Prev</a> | ';
											}
											if( ( i * this.RowsPerPage ) == this.StartIndex )
												strPageNavigationHTML += ( i + 1 ) + ' | ';
											else
												strPageNavigationHTML += '<a href="javascript:$(\'' + this.table.id + '\').object.MakeTable( ' + intRowsPerPageCount + ' );">' + ( i + 1 ) + '</a> | ';
		
											if( i == ( intPageCount - 1 ) ){
												if( this.RecordCount == this.RecordIndex )
													strPageNavigationHTML += 'Next&gt;';
												else
													strPageNavigationHTML += '<a href="javascript:$(\'' + this.table.id + '\').object.NavigatePage( \'next\' )">Next&gt;</a>';
											}
										}
										$( 'RecordPageNavigation' ).innerHTML = strPageNavigationHTML;
									}
								}
							}
						}
					}
					else{
						this.interval = setInterval( function(){
							objAjaxData = objAjaxObject[objThisTable.RecordIndex];
							for( var zed = 0; zed < objThisTable.RowTemplateArray.length; zed++ ){
								var objRow = objThisTable.Row();
								if( objThisTable.AlternateEveryIndex == objThisTable.AlternateEvery ){
									objThisTable.AlternateRowColor();
									objThisTable.AlternateEveryIndex = 0;
								}
								objThisTable.AlternateEveryIndex++;
								if( objThisTable.HotTracksColSpan < objThisTable.RowTemplateArray[zed].length )
									objThisTable.HotTracksColSpan = objThisTable.RowTemplateArray[zed].length;
								objRow.style.background = objThisTable.RowColor;
								for( var i = 0; i < objThisTable.RowTemplateArray[zed].length; i++ ){
									objCell = document.createElement( 'TD' );
									if( objThisTable.RowAttributesArray[zed] != null && objThisTable.RowAttributesArray[zed][i] != null ){
										var aryCellAttributes = objThisTable.RowAttributesArray[zed][i].split( ',' );
										for( var j = 0; j < aryCellAttributes.length; j++ )
											eval( 'objCell.' + aryCellAttributes[j] );
									}
									if( objThisTable.RowClassArray[zed] != null && objThisTable.RowClassArray[zed][i] != null )
										objCell.className = objThisTable.RowClassArray[zed][i];
									var dataPattern = new RegExp( '\\{[\\d]+\\}', 'g' );
									var indexPattern = new RegExp( '\\{i\\}', 'g' );
									var objQuoteExp = new RegExp( '"', 'g' );
									var strLogic = null;
									if( objThisTable.RowLogicArray[zed] != null && objThisTable.RowLogicArray[zed][i] != null ){
										var objLogicMatch = objThisTable.RowLogicArray[zed][i].match( dataPattern );
										if( objLogicMatch ){
											strLogic = objThisTable.RowLogicArray[zed][i];
											for( var j = 0; j < objLogicMatch.length; j++ ){
												var intAjaxIndex = new Number( objLogicMatch[j].replace( /[\\{\\}]/g, '' ) );
												var strCleanText = objAjaxData.getAttribute( objThisTable.AjaxFieldsArray[intAjaxIndex] );
												if( strCleanText != null && strCleanText.match( objQuoteExp ) )
													strCleanText = strCleanText.replace( objQuoteExp, '&quot;' );
												strLogic = strLogic.replace( objLogicMatch[j], strCleanText )
											}
										}
										else
											strLogic = objThisTable.RowLogicArray[zed][i];
									}
									var objDataMatch = objThisTable.RowTemplateArray[zed][i].match( dataPattern );
									var strHTML = '';
									if( strLogic != null )
										strHTML = eval( strLogic );
									else{
										if( objDataMatch ){
											strHTML = objThisTable.RowTemplateArray[zed][i];
											for( var j = 0; j < objDataMatch.length; j++ ){
												var intAjaxIndex = new Number( objDataMatch[j].replace( /[\\{\\}]/g, '' ) );
												var strCleanText = objAjaxData.getAttribute( objThisTable.AjaxFieldsArray[intAjaxIndex] );
												if( strCleanText != null && strCleanText.match( objQuoteExp ) )
													strCleanText = strCleanText.replace( objQuoteExp, '&quot;' );
												strHTML = strHTML.replace( objDataMatch[j], strCleanText );
											}
										}
										else
											strHTML = objThisTable.RowTemplateArray[zed][i];
									}
									if( strHTML.match( indexPattern ) ){
										strHTML = strHTML.replace( indexPattern, objThisTable.RecordIndex );
									}
									objCell.innerHTML = strHTML;
									objRow.appendChild( objCell );
								}
							}
							if( objThisTable.ContainsHotTracks && objThisTable.HotTrackCount > 0 && intRecordLength > 1 && objThisTable.RecordIndex == ( objThisTable.HotTrackCount - 1 ) ){
								if( objThisTable.RecordIndex >= ( objThisTable.HotTrackCount - 1 ) && !objThisTable.HotTracksWritten ){
									var objRow = objThisTable.Row();
									objRow.style.background = '#E3E5E6';
									objCell = document.createElement( 'TD' );
									objCell.colSpan = objThisTable.HotTracksColSpan;
									var intTrackCount = objThisTable.RecordCount - objThisTable.HotTrackCount;
									objCell.innerHTML = 'All (' + intTrackCount + ') track results sorted chronologically by most recent';
									objCell.className = 'HotTrackSeperator';
									objRow.appendChild( objCell );
									objThisTable.AlternateRowColor();
									objThisTable.AlternateEveryIndex = 1;
									if( objThisTable.RecordCount > intRecordLimit )
										objThisTable.indexOffset++;
									objThisTable.HotTracksWritten = true;
								}
							}
							objThisTable.RecordIndex++;
							if( objThisTable.RecordIndex >= ( intRecordLimit - objThisTable.indexOffset ) ){
								clearInterval( objThisTable.interval );
								objThisTable.interval = null;
								if( objThisTable.isPaged ){
									if( objThisTable.RowsPerPage < objThisTable.RecordCount ){
										var strPageNavigationHTML = '';
										var intPageCount = Math.ceil( objThisTable.RecordCount / objThisTable.RowsPerPage );
										for( var i = 0; i < intPageCount; i++ ){
											var intRowsPerPageCount = ( ( i * objThisTable.RowsPerPage ) - objThisTable.indexOffset );
											if( intRowsPerPageCount < 0 )
												intRowsPerPageCount = 0;
											if( i == 0 ){
												if( ( objThisTable.RowsPerPage * i ) == ( objThisTable.RecordIndex - objThisTable.RowsPerPage ) )
													strPageNavigationHTML += '&lt;Prev | ';
												else
													strPageNavigationHTML += '<a href="javascript:$(\'' + objThisTable.table.id + '\').object.NavigatePage( \'prev\' )">&lt;Prev</a> | ';
											}
											
											
											if( intRowsPerPageCount == objThisTable.StartIndex )
												strPageNavigationHTML += ( i + 1 ) + ' | ';
											else
												strPageNavigationHTML += '<a href="javascript:$(\'' + objThisTable.table.id + '\').object.MakeTable( ' + intRowsPerPageCount + ' );">' + ( i + 1 ) + '</a> | ';
		
											if( i == ( intPageCount - 1 ) ){
												if( objThisTable.RecordCount == objThisTable.RecordIndex )
													strPageNavigationHTML += 'Next&gt;';
												else
													strPageNavigationHTML += '<a href="javascript:$(\'' + objThisTable.table.id + '\').object.NavigatePage( \'next\' )">Next&gt;</a>';
											}
										}
										$( 'RecordPageNavigation' ).innerHTML = strPageNavigationHTML;
									}
								}
								objThisTable.indexOffset = 0;
							}
						}, this.RowWriteSpeed );
					}
				}
			}
		}
	}
