// File: 	boltOn.js
//
// Description:	
//
//		Master IBM boltOn used by all e-catalogs as of 10/13/2005. 
//
// Revision history:
//
//		DKR/2005-10-13 - Created from the STG System Seller boltOn. Includes SurfAid passthrough
//		from incoming URL that was implemented for System Seller on 10-12-2005.
//		
//		DKR/2005-11-29 - Added a line to the SurfAid code that removes the ?where=eengine.alertSurfAid()
//   		part of the query string, if present, before making the SurfAid call.
//

// breadcrumb array to track this information
var g_bread = new Array( "E-catalog home" );

//-- handles to windows/frames opened by I2U_writeWindow - RE 6/4/2003
var g_windowHandles = new Array();

// holds the series data for display
var g_series_data = new Array();

// holds the RC key for Series display
var g_series_rc_key = "0";

// indicates a series was run.
var g_ran_series = 0;

// indicates the last key that was sorted on.
var g_last_sort = 7;

// stores _ref and matchFlag for a series
var g_series_ref = 0;
var g_series_matchFlag = 0;

// indicates this is a detail view
var g_showingDetail = 0;

// variable set in catchPreview.js if there is a query string on the URL.  Used as a pass through
// in addSurfAid if defined.
var g_saCurrentQueryString = "";

// pop an alert box with the SurfAid parameter string for
// debugging purposes
var g_alertSurfAid = 0;

// holds all e-catalog actions in a stack and tracks the
// last action number (within the stack) executed.
var g_lastAction = 0;
var g_walkingActionStack = false;
var g_Actions = new Array( "this.showShow2()" );
var g_lastKeywordResults = new Array();
var g_lastKeywords = "";

// warning message for doClickThrough2 from inside the static exe
var g_exeWarningMessage = 'Accessing content external to the e-catalog requires that you be online.\n\nNote: You will only be shown this message once.';
var g_exeWarningMessageShown = false;

var g_callmenow_link = "";
var g_textchat_link = "";
var g_requestaquote_link = "";
var g_callmelater_link = "";
var g_emailus_link = "";



//------------------------------------------------------------
// Page Display functions.  
//
// This includes wrappers for page display, searching, series
// and detail display.
//------------------------------------------------------------

// wrapper for search function.
// this allows us to alter the search results nav on the fly
// special for ibm
function I2U_search2 (kwds, sc, st) {

   // Convert input string from double byte to HTML escaped, if necessary
   kwds = this.ascEsc(kwds);

   this.g_ran_series = 0;

   if (kwds.length == 0) {
      return this.shwEr(this.erMsg[13], 2);
   }
   
   // default to all columns if one isn't listed
   if ( ! sc ) {
     sc = "*";
   }
   
   //-- swap out keyword if it matches an alias
   var ev = "";
   for ( i=g_kwd.length-1; i >= 0; i-- ) {
     if ( g_kwd[i] != "" ) {
       var kwd = g_kwd[i].split('|');
       if ( kwd[0].toLowerCase() == kwds.toLowerCase() ) {
         kwds = kwd[1];
  
         if ( kwd[1].indexOf("this.") != -1 )
            ev = kwd[1];
  
         break;
       }

     }
   }

   // if 'ev' has a value then the alias is not another keyword but 
   // an engine call like writePage2 or something
   if ( ev != "" ) {
     eval(ev);
   } else {   
	   // blank out showMatch for the moment.. 
	   var tmp_sm = this.ctnt[5];  
	   var tmp_smf = this.ctnt[2];
	   this.ctnt[5] = "";
	   this.ctnt[2] = "";

           // check to see if we are showing a detailed view.
	   if ( this.g_showingDetail == 0 ) {
	      // make sure srchSpread is used here
	      this.ctnt[13] = g_srchSpread;
	   }   
   
	   // run search
	   this.search( kwds, sc, st );
	   
	   // sort results by ID
           this.sortResults(2,1);       
	   
	   // create search nav
	   this.prevNext2(this.results.length, parseInt (this.numToShow, 10) );

	   // replace showmatch 
	   this.ctnt[5] = tmp_sm; 
	   this.ctnt[2] = tmp_smf; 

	   // create breadcrumb for this section  
	   this.acts = new Array(
	      "this.showShow2()",
	      "this.search2('"+kwds+"', '"+sc+"')"
	   );

	   this.g_bread = new Array(
	      "E-catalog home",
	      "Search for '"+kwds+"'"
	   );    

	   var rc = this.makeRC('SRdefault');
	   
           // Add action to the action stack - Note: This must preceed the manageSpecialTags call
           // in other to ensure that the proper action stack template is displayed.
           var t_function_call = "this.showMatch2(0,0)";
           this.addAction (t_function_call);    
	   
	   // swap out common tags
	   this.ctnt[5]= this.manageSpecialTags( this.ctnt[5], rc );
	   this.ctnt[2]= this.manageSpecialTags( this.ctnt[2], rc );

	   if ( this.results.length > 0 ) {
	     // call showmatch for 0,0 entry
	     this.showMatch(0,0);
	     
	     // Save the search results so that the back/forward operations don't need
	     // to rerun the search each time.  showMatch2 is leveraging this array.
	     g_lastKeywordResults = this.results;
	     g_lastKeywords = this.query;

	     // Make SurfAid call
	     if ( this.g_showingDetail != 1 ) {
	        this.addSurfAid("KeywordSearch", kwds, "true");
	     }
	   } else {
	   
	     // Add action to the action stack - Note: This must preceed the manageSpecialTags call
	     // in other to ensure that the proper action stack template is displayed.
	     //
	     // Up above we added the action to the array based on the assumption of a successful
	     // search.  Since it was unsuccessful, remove the last action and add back the unsuccessful
	     // search.
	     this.g_Actions.pop();
	     var t_function_call = "this.search2('" + kwds + "')";
	     this.addAction (t_function_call);    

	     this.noMatch();

	     // Make SurfAid call
	     if ( this.g_showingDetail != 1 ) {
	        this.addSurfAid("KeywordSearch", kwds, "false");
	     }
	   }

	   // remove dupe
	   this.acts.length = this.acts.length-1;  

           // set template back to normal
           this.ctnt[5] = tmp_sm;
           this.ctnt[2] = tmp_smf;
    }	   
    
   // Ensure that we are at the top of the page
   window.scrollTo(0,0);    
  
   return false;
}

// Wrapper for showMatch.
// IBM uses a modified ShowMatch due to their search result layout
function I2U_showMatch2 (_ref, matchFlag) {
   
   // Reinstate the last keyword search results just in case the function is called by 
   // goForward or goBack where the search was not just run (as in the case where
   // you are simply stepping through the results as part of navigating the results page.
   this.results = g_lastKeywordResults;
   this.query = g_lastKeywords;

   // capture ref
   this.hEnd = _ref;
   
   // blank out showMatch for the moment.. 
   var tmp_sm = this.ctnt[5];     
   
   // if needed capture here and re-route to displaySeries because that is what we have just done.
   if ( this.g_ran_series == 0 ) {
      // create search nav
      this.prevNext2(this.results.length, parseInt (this.numToShow, 10) );
      
      var rc = this.makeRC('SRdefault');
      
      // Add action to the action stack - Note: This must preceed the manageSpecialTags call
      // in other to ensure that the proper action stack template is displayed.
      var t_function_call = "this.showMatch2(" + _ref + ", " + matchFlag + ")";
      this.addAction (t_function_call);    
      
       // swap out common tags
      this.ctnt[5]= this.manageSpecialTags( this.ctnt[5], rc );
   
      // call showmatch for 0,0 entry
      this.showMatch(_ref, matchFlag);
   
      // remove dupe
      this.acts.length = this.acts.length-1;  
   } else {
      // must be a series.. call displaySeries(key) and redisplay.
      this.g_series_ref = _ref;
      this.g_series_matchFlag = matchFlag;
      
      this.displaySeries(this.g_last_sort);

      // remove dupe
      this.acts.length = this.acts.length-1;  
   }
   
    // set template back to normal
   this.ctnt[5] = tmp_sm;   
   
   // Ensure that we are at the top of the page
   window.scrollTo(0,0);    

      
}

// wrapper for the writePage function.
// in here we have to temporarily turn off the prodInfo array
// and turn on the database array as the primary array to use
// for the engine.
function I2U_writePage2(n) {  

    var pagenumset = true;
    if (! parseInt(n) > 0)
    {
      pagenumset = false;
      for (i=0; i < database.length; i++)
      {
        var tmp_page = database[i].split('|');
        var tmp_pageid = tmp_page[0].split(' ');
        if (trim(tmp_pageid[0].toLowerCase()) == trim(n.toLowerCase()))
        {
          //alert ('Got a page match for ' + n + ' at page number ' + i);
          n = i + 1;
          pagenumset = true;
          break;
        }
      }
    }
    
    if (! pagenumset)
    {
      alert ('Unable to determine page to display -> ' + n + '...Exiting.');
      return;
    }

    this.g_ran_series = 0;

    this.ss_db = "this.db";
    
    var tmpPage = database[(n-1)];
    var det_pg = this.ctnt[15];
    
    var pg = tmpPage.split('|');

    // add in name for action
    var title = pg[0];
    var pg_num = title.substring(0, title.indexOf(" "));
    title = title.substring(title.indexOf(" ")+1);

    var rc = this.makeRC(pg_num); 
    
    // create breadcrumbs
    this.acts = new Array("this.showShow2()");     
    this.g_bread = new Array("E-catalog home");    
   
    // normal level that comes off the home page
    this.acts[ this.acts.length ] = "this.writePage2('" + n + "')";
    this.g_bread[ this.g_bread.length ] = title;
    
    // Add action to the action stack - Note: This must preceed the manageSpecialTags call
    // in other to ensure that the proper action stack template is displayed.
    var t_function_call = "this.writePage2(" + n + ")";
    this.addAction (t_function_call);    
    
    // swap out common tags
    database[(n-1)]= this.manageSpecialTags( database[(n-1)], rc );
    database[(n-1)]= this.cleanContent(database[(n-1)]);
    this.ctnt[15] = this.manageSpecialTags( this.ctnt[15], rc );
    
    this.writePage(n);
    
    this.addSurfAid(pg_num, null, null);
    
    database[(n-1)] = tmpPage;
    this.ctnt[15] = det_pg;
  
    this.ss_db = "this.prod";

    // remove dupe
    this.acts.length = this.acts.length-1;
    
    // Ensure that we are at the top of the page
    window.scrollTo(0,0);
    
}

// writes out a product series.
function I2U_writeSeries(cat, ser, sc, st) {

//alert ('Inside writeSeries: ' + cat + ':' + ser);

   // Ensure that the full series displays on the page, not just 10
   this.numToShow = 1000; 

   // indicate that this is a series
   this.g_ran_series = 1;

   // init series ref and matchFlag
   this.g_series_ref = 0;
   this.g_series_matchFlag = 0;   

   // make sure as best as possible that there are not dupe entries next to each other.
   this.checkForDupeBread();

   // blank out showMatch for the moment.. 
   var tmp_sm = this.ctnt[5];  
   var tmp_snm = this.ctnt[2];
   this.ctnt[5] = "";
   this.ctnt[2] = "";
   
   // store showSpread
   var spread_tmp = this.ctnt[13];

   // make sure there are no slashes in the category or subcategory...HTML escape sequence them
   var obj = eval("/\\//gi");
   cat = cat.replace(obj, "&#047;");
   ser = ser.replace(obj, "&#047;");
   
   // run search
   cat = trim(cat);
   ser = trim(ser);
   var kwds2 = cat;

   if ( cat.indexOf(",") != -1 ) {
     kwds2 = ' ' + cat.replace(',', " ");     
   } else if ( cat.indexOf(" ") != -1 ) {
     kwds2 = '"' + cat + '"';
   }   
   
   //if ( ser.indexOf(",") != -1 ) {
   //  kwds2 += ' ' + ser.replace(',', " ");     
   //} else if ( trim(ser) != "" ) {
   //  kwds2 += ' "' + ser + '"';
   //}
   
   // go ahead and run search
   this.search( kwds2, '0', st );

   // ensure we are dealing with the series we searched for.
   var temp_series = new Array();
   var temp_idx = new Array();
   for ( var i=0; i < this.results.length; i++ ) {
      var line = this.results[i].split('|');
      if ( trim(ser) != "" ) {
      
          var a_ser = ser.split(',');
          for ( var j=0; j < a_ser.length; j++ ) {
            if ( ( cat.toLowerCase() == line[0].toLowerCase() ) && ( line[1].toLowerCase().indexOf(a_ser[j].toLowerCase()) != -1 ) ) {
               temp_series[ temp_series.length ] = this.results[i];
               temp_idx[ temp_idx.length ] = (i+1);
            }             
          }
        
      } else {
        if ( cat.toLowerCase() == line[0].toLowerCase() ) {
           temp_series[ temp_series.length ] = this.results[i];
           temp_idx[ temp_idx.length ] = (i+1);
        }
      }      
   }
  
   // clean out search results
   this.results = new Array();
   this.r_idx = new Array();
   
   // fill with cleaned values
   this.results = temp_series;
   this.r_idx = temp_idx;
   
   // capture series information
   this.g_series_data = this.results[0];   
   
   // create breadcrumbs
   this.acts = new Array("this.showShow2()"); 
   this.g_bread = new Array("E-catalog home");    
   
   // from here we should have a category page ref then a ref to this series.
   // go get the category
   var category = cat;
   this.assembleBread(category);    
   
   this.acts[ this.acts.length ] = "eengine.writeSeries('" + cat + "', '" + ser + "')";    
   var tmp_bread = "";
   //tmp_bread = cat + " " + ser;
   tmp_bread = ser;
   this.g_bread[ this.g_bread.length ] = tmp_bread;
    
   // DKR/20050801...Set the RC key based on the category/subcategory being used for the
   // series display.
   this.g_series_rc_key = trim(cat) + ">" + trim(ser);
   
   // put no match back
   this.ctnt[2] = tmp_snm;
   
   // Add action to the action stack - Note: This must preceed the manageSpecialTags call
   // in other to ensure that the proper action stack template is displayed.
   var t_function_call = "this.writeSeries('" + cat + "','" + ser + "')";
   this.addAction (t_function_call);       
   
   // run display of series
   this.displaySeries(2);  
   
   var saSeriesKwd = cat;
   if ( ser != "" && ser != null ) {
     saSeriesKwd += ">" + ser;
   }
   this.addSurfAid("SeriesPage", saSeriesKwd, null);

   // set template back to normal
   this.ctnt[5] = tmp_sm;
   this.ctnt[13] = spread_tmp;

   // remove dupe.
   this.acts.length = this.acts.length-1;
   // There won't be a duplicate breadcrumb if the series has no products.
   if (0 != this.results.length) {
      this.g_bread.length = this.g_bread.length-1;
   }
 
   // Ensure that we are at the top of the page
   window.scrollTo(0,0);
   
   // Change back the number of search results to display to the standard default of 10.
   this.numToShow = 10; 
    
   return false;

}

// this is used to show a detailed view of a given product.
// 'n' is the product/model number from the search results
function I2U_goDetail(n) {

  this.g_ran_series = 0;
  
  // DKR/20050210 - Because you cannot be sure in the EMEA e-catalog
  // that the path to the goDetail went through the search results,
  // as implied by the comment above the function declaration above,
  // always look for the record you need through the entire prodInfo
  // array not the last result set as originally coded.
  this.results = this.prod;

  // swap out normal search results layout for detailed
  // search layout
  var tmpPg_showMch = this.ctnt[5];
  var tmpPg_spread = this.ctnt[13];
  this.ctnt[5] = "SHOWMATCHRESULTS";
  this.ctnt[13] = this.g_detail;

  // record what we did
  var t_results = new Array();
  var r = this.results[0].split('|');  
  // go find the matching record if needed
  for ( var i=0; i < this.results.length; i++ ) {
     var line = this.results[i].split('|');

     if ( line[2] == n ) {
        r = this.results[i].split('|'); 
        t_results[0] = this.results[i]; 
        break;
     }
  }
  
  if (t_results.length == 0) 
  { 
    alert('Product (ID: ' + n + ') not found in the e-catalog database. Exiting.');
    return false;
  }  
 
  // create breadcrumbs
  this.acts = new Array("this.showShow2()");   
  this.g_bread = new Array("E-catalog home");    
     
  // reference category.. this creates the breadcrumb for this instance
  var category = r[0];   
  this.assembleBread(category);
     

  // grab series      
  // DKR/20050218 -- There are no series in the EMEA ROC solution.  Remove
  // the series portion of the bread crumb all together.
  // DKR/20050801 -- The BPRT solution does have product series so put it
  // back in.
  
  // Add the Series/subcategory to the breadcrumb if both a category and subcategory
  // exist for the product about to be displayed.
  if (trim(r[0]) != "" && trim(r[1]) != "")
  {
    this.acts[ this.acts.length ] = "eengine.writeSeries('"+r[0]+"', '"+r[1]+"')";   
    this.g_bread[ this.g_bread.length ] = r[1];
  }
  
  // reference where we are
  this.acts[ this.acts.length ] = "this.goDetail('"+n+"')";
  // DKR/20050507 - Change the breadcrumb from the ID column to the title column
  //this.g_bread[ this.g_bread.length ] = r[2];
  this.g_bread[ this.g_bread.length ] = r[7];

  // backup information
  var tmp_acts = this.acts;
  var tmp_bread = this.g_bread;
  
  // set query for the moment so we can setup rc column based on category
  this.query = new Array();
  this.query[ this.query.length ] = r[0];
  
  //DKR, 2005-08-16...Changed to new RC offer logic/syntax
  var rc = this.makeRC('DETproduct>' + r[0] + '>' + r[1] + ">" + r[2]);
  
  // Add action to the action stack - Note: This must preceed the manageSpecialTags call
  // in other to ensure that the proper action stack template is displayed.
  var t_function_call = "this.goDetail('" + n + "')";
  this.addAction (t_function_call);    
  
  // swap out common tags
  this.ctnt[13]= this.manageSpecialTags( this.ctnt[13], rc );
 
  // add additional search algorithms to run
  this.s_alg[0] = "this.cleanResults()";
  
  // run search
  this.g_showingDetail = 1;

  // DKR/20050210 - Only search column three for the match, not everything
  //this.search2(n, '*');
  // DKR/20050507 - Not sure why we are running a search since we know that
  // the record stored in the "r" array is the record we want to display.
  // Therefore, I just overwrote this.results below when we found the desired
  // record.
  //this.search2(n, '2');
  this.results = t_results; 
  
  //-- run any additional algorithms
  for ( var i=0; i<this.s_alg.length; i++)
    eval(this.s_alg[i]);

  this.g_showingDetail = 0;
  
  // redisplay
  this.showMatch(0,0);
  
  // tmp_acts has now magically added an extra array element in the call to showMatch.
  tmp_acts.length = tmp_acts.length - 1;

  // handle SurfAid values
  this.addSurfAid("ProductPage", r[7], null);

  // restore information
  this.acts = tmp_acts;
  this.g_bread = tmp_bread;
      
  // put all back to normal;
  this.ctnt[5] = tmpPg_showMch; 
  this.ctnt[13] = tmpPg_spread;

  this.s_alg = new Array();
  
  // Ensure that we are at the top of the page
  window.scrollTo(0,0);

  return false;

}

function I2U_CreateAjaxRequestObject()
{
	var requestObject = false;
	try
	{
		requestObject = new XMLHttpRequest();
	}
	catch (exception1)
	{
		try
		{
			requestObject = new ActiveXObject("MSXML2.XMLHTTP");
		}
		catch (exception2)
		{
			try
			{
				requestObject = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (exception3)
			{
				requestObject = false;
			}
		}
	}
	return requestObject;
}
var _loadCover = {
	coverExtensions : ['html','php','asp','aspx','cfm'],
	extensionCounter: -1,	
	hrefObj: {},
	_callback: '',
	buildUrl: function() {
		return _loadCover.hrefObj["href"] + "." + _loadCover.coverExtensions[_loadCover.extensionCounter] + _loadCover.hrefObj["query"];	
	},	
	getCoverRef: function() {
		// look for div tag
		var q = '';
		try {
			q = location.search;
		} catch (e) {}
		var h = '';
		try {
			h = location.href;
		} catch (e) {}
		
		// make sure we've removed and file ref (if there)
		var _fileTrap = /[a-zA-Z0-9]+\.[a-zA-Z0-9]+$/i;
		h = h.replace(_fileTrap, '');

		var _trailingSlash = /\/$/i;
		if (! _trailingSlash.test(h) ) {
			h += "/";
		}

		h = h + "UI/eeshow";
			
		_loadCover.hrefObj["href"] = h;
		_loadCover.hrefObj["query"] = q;			
	},	
	ajaxPullCover: function(dataSource, onCompleteCallback,onFailed) {
		var request = I2U_CreateAjaxRequestObject();
		if (request)
		{
			var timeStamp = new Date();
			request.open("GET", dataSource, true);
			request.onreadystatechange = function()
			{
				if ( request.readyState == 4 ) {
					switch (request.status) {
						case 200:
							onCompleteCallback(request, timeStamp);
							break;
						case 404:
							if ( onFailed ) {
								onFailed();
							}
							break;
					}
				}
			};
			request.send(null);
		}
	},	
	useExtension: function(request) {
		// pull the response text 
		var content = ''+request.responseText;

		// replace the footer
		var _footer = /\[\[T_FOOTER\]\]/ig;
		content = content.replace(_footer, g_brandFooter);

		// store it now we've got it
		eengine.ctnt[0] = content;
		
		eengine.showShow2_override();
	},
	nextExtension: function() {
		_loadCover.extensionCounter++;
		var h = _loadCover.buildUrl(); 

		// pull
		_loadCover.ajaxPullCover(h, _loadCover.useExtension, _loadCover.nextExtension);
	},
	handleCover: function() {					
		// the cover we want is eeshow.. go pull... 
	
		// load hrefObj
		_loadCover.getCoverRef();

		// start thread
		_loadCover.nextExtension();
	}
}

// wrapper to show the cover page.
var _runOnce = 0;
function I2U_showShow2() {
	if ( _runOnce == 0 ) {
		_loadCover.handleCover();
		_runOnce = 1;
	} else {
		eengine.showShow2_override();
	}
}

function I2U_showShow2_override() {

    this.g_ran_series = 0;

    // backup showshow
    var tmp_sm = this.ctnt[0];  

    // make sure as best as possible that there are not dupe entries next to each other.
    this.checkForDupeBread();

    var cover_page = database[0].split('|');
    var cover_page_name = cover_page[0].split(' ');

    var rc = this.makeRC(cover_page_name[0]); 
    
    // Add action to the action stack - Note: This must preceed the manageSpecialTags call
    // in other to ensure that the proper action stack template is displayed.
    //var t_function_call = "this.showShow2()";
    //this.addAction (t_function_call);       

    // Because the forward and back buttons do not appear on the cover, it gets confusing
    // if you go back to the cover, do something else, and then try to go back; you don't
    // end up back at the cover.  Trust me.
    // Anyway, clear out the action stack whenever you return to the e-catalog cover and
    // start fresh.
    g_lastAction = 0;
    g_walkingActionStack = false;
    var new_ActionStack = new Array( "this.showShow2()" );
    this.g_Actions = new_ActionStack;

    // swap out common tags    
    this.ctnt[0]= this.manageSpecialTags( this.ctnt[0], rc );    

    var obj = eval("/onclick\=\"return false\;checkForWait/gi");
    var obj2 = eval("/onclick\=\"return false\;if \(eengine\)/gi");

    this.ctnt[0] = this.ctnt[0].replace( obj, "onclick=\"checkForWait");
    this.ctnt[0] = this.ctnt[0].replace( obj2, "onclick=\"if (eengine)");    

    // call showshow
    this.showShow();

    // Make SurfAid call.
    this.addSurfAid(cover_page_name[0], null, null);

    // remove dupe
    this.acts.length = this.acts.length-1;
    
    // make sure as best as possible that there are not dupe entries next to each other.
    this.checkForDupeBread();    
    
    // set template back to normal
    this.ctnt[0] = tmp_sm;    
    
    // Ensure that we are at the top of the page
    window.scrollTo(0,0);
    
}

// this shows the express offer page.
// the content is detailed above in this file.
function I2U_showExpress() {

  // show express offer  
  this.writeWindow('ExpressProgram','',404,420, this.g_express);
  
  return false;

}

// display any featured offers that might exist
function I2U_showFeaturedOffers(fo_id) {

  var newPageTitle = "";
  
  this.g_ran_series = 0;

  // month array for date translation
  var mon_abbr = new Array( 
    "Jan","Feb","Mar","April","May","June","July","Aug", "Sept","Oct","Nov","Dec"
  );

  var tmp_feature = "";
  var final_feature = "";
  for ( var i=0; i < featured_offers.length; i++ ) {     
     if ( featured_offers[i] != '' ) {
       var line = featured_offers[i].split('|');
            
       // now we check date range.
       // dates[0] = start date
       // dates[1] = end date
       var dates = new Array();
       
       // position 1 is start date, position 2 is end date in featured_offers db line
       for ( var j=1; j < 3; j++ ) {
          // check to see if the date needs conversion.
          // it could be coming in various ways.
                 
          // split the date
          var date_array = new Array();
          var divider = '-';
          var y = 0;          
          var m = 1;
          var d = 2;
          if ( line[j].indexOf("/") != -1 ) {
             // col 0 = mm
             // col 1 = dd
             // col 2 = yyyy        
             y = 2;
             m = 0;
             d = 1;
             divider = '/';
          }
          
          date_array = line[j].split(divider);        
          
          if ( date_array[2].indexOf(" ") != -1 ) {
            date_array[2] = date_array[2].substring(0, date_array[2].indexOf(" ") );
          }

          // rebuild date in the format we need .. we need dd mon yyyy
          var tmp_date = (date_array[d] + " " + mon_abbr[parseInt(date_array[m],10)-1] + " " + date_array[y]);           
          
          dates[ dates.length ] = new Date (Date.parse ( tmp_date ));
       }

       var now = new Date();
       
       if ( ( now.valueOf() > dates[0].valueOf() ) && ( now.valueOf() < dates[1].valueOf() ) ) {

         // DKR/2005-03-24...A featured offer input parameter has been added for this version of the
         // boltOn.  If the input string matches the beginning of the featured offer id, then
         // include it in the display otherwise exclude it.  A wildcard ('*') will display 
         // all featured offers.
         if ( fo_id == '*' || line[0].toLowerCase().indexOf(fo_id.toLowerCase()) > -1 )
         {
           tmp_feature = g_feature_detail;
           for ( var j=0; j < line.length; j++ ) {
              var val = line[j];
            
              // look for upper dashes and convert to real dash
              var obj = /\&macr\;/gi;
              val = val.replace( obj, "&#151;");
            
              // clean up template
  	      tmp_feature = this.manageLabels(tmp_feature, line, 1);
                        
              // swap out data
              tmp_feature = tmp_feature.replace("[[col"+j+"]]", val);
           }
           final_feature += tmp_feature;
           
           if (fo_id != '*') 
           { 
             var t_idx = line[0].indexOf('_');
             newPageTitle = line[0].substr(0,t_idx);
           }           
         }
       }
     }
  }
  
  // now we've got the detail.. push into main form
  var wrapper = g_feature;
  wrapper = wrapper.replace("SHOWMATCHRESULTS", final_feature);
  
  if (newPageTitle != "") { wrapper = wrapper.replace("Recently Published", newPageTitle) }
  
  // create breadcrumb for this section
  this.acts = new Array(
     "this.showShow2()",
     "this.showFeaturedOffers()"
  );
  
  this.g_bread = new Array(
     "E-catalog home",
     "Recently Published"
  );
  
  // Add action to the action stack - Note: This must preceed the manageSpecialTags call
  // in other to ensure that the proper action stack template is displayed.
  var t_function_call = "this.showFeaturedOffers('" + fo_id + "')";
  this.addAction (t_function_call);         
  
  // swap out common tags
  var rc = this.makeRC('FeaturedOffers' + '>' + fo_id);  
  wrapper= this.manageSpecialTags( wrapper, rc );
  
  // handle any footnotes
  wrapper = this.cleanContent( wrapper );
  
  // hijack showAbout for a moment
  var tmp_pg = this.ctnt[3];
  this.ctnt[3] = wrapper;
  
  this.showAbout();
  
  // remove showAbout because it doesn't have a matching g_bread entry
  this.acts.length = this.acts.length-1;

  // replace showAbout page
  this.ctnt[3] = tmp_pg;
  
  if (fo_id == '*')
  {
    this.addSurfAid("FeaturedOffers", "All", null);
  }
  else
  {
    this.addSurfAid("FeaturedOffers", fo_id, null);
  }
  
  // Ensure that we are at the top of the page
  window.scrollTo(0,0);


}


// wrapper for show save to desktop so we can get the breadcrumb bar in there
function I2U_showS2D2() {

   this.g_ran_series = 0;

   // backup templates
   var tmp_sd = this.ctnt[4];
   var tmp_sd_mac = this.ctnt[6];

   // create breadcrumb for this section  
   this.acts = new Array(
      "this.showShow2()",
      "this.showS2D2()"
   );
  
   this.g_bread = new Array(
      "E-catalog home",
      "Download e-catalog"
   );    
        
   // swap out common tags
   var rc = this.makeRC('SaveToDesktop');     
   
   // Add action to the action stack - Note: This must preceed the manageSpecialTags call
   // in other to ensure that the proper action stack template is displayed.
   var t_function_call = "this.showS2D2()";
   this.addAction (t_function_call);         
   
   this.ctnt[4] = this.manageSpecialTags( this.ctnt[4], rc );
   this.ctnt[6] = this.manageSpecialTags( this.ctnt[6], rc );

   //this.ctnt[4]= this.manageSpecialTags( this.ctnt[4], '' );
   //this.ctnt[6]= this.manageSpecialTags( this.ctnt[6], '' );

   this.showS2D();
   
   // Make SurfAid call
   // DKR/20050218 - Added a SurfAid call for Save-to-Desktop
   this.addSurfAid("SaveToDesktop", null, null);

   // restore templates
   this.ctnt[4] = tmp_sd;
   this.ctnt[6] = tmp_sd_mac;

   // remove dupe
   this.acts.length = this.acts.length-1;  
   
   // Ensure that we are at the top of the page
   window.scrollTo(0,0);
   
}

// Note:  This version of showForward is specifically for IBM where Send to Friend is handled by
//        the Circle/4D application.
function I2U_showForward2()
{ 

  var url = g_showForward;
  var title = encodeURL(document.title); 
  
  var t_baseUrl = baseUrl.replace(/(.*)(\/catalog)/, "$1");
  
  url += "?url=" + t_baseUrl + "&title=" + title;
  
  this.addSurfAid("ClickThrough", "SendToFriend", null);
  this.executeClickThrough( url, 480, 780, 2);
}



function encodeURL (str)
{

  var special_characters = new Array(
                                     " |20",
                                     "\\$|24",
                                     "&|26",
                                     "\\+|2B",
                                     ",|2C",
                                     "/|2F",
                                     ":|3A",
                                     ";|3B",
                                     "=|3D",
                                     "\\?|3F",
                                     "@|40",
                                     "\"|22",
                                     "<|3C",
                                     ">|3E",
                                     "#|23",
                                     "{|7B",
                                     "}|7D",
                                     "`|60"
                                    );
  for (var i=0; i < special_characters.length; i++)
  {
    var character_pair = special_characters[i].split('|');
    str = str.replace( eval("/" + character_pair[0] + "/gi") , "%" + character_pair[1]);
  }
  
  return str;
  
}


function I2U_doStandardClickThrough(item)
{

  var url = "";  
  var surfaid_page = "";
  var surfaid_qkwd = "";
  var surfaid_qresult = null;
  
  var window_height = 480;
  var window_width  = 780;
  
  switch (item.toLowerCase())
  {

    case "callmenow":
      url           = this.g_callmenow_link;
      surfaid_page  = "ContactModule";
      surfaid_qkwd  = "CallMeNow";
      break;

    case "textchat":
      url           = this.g_textchat_link;
      surfaid_page  = "ContactModule";
      surfaid_qkwd  = "TextChat";
      window_height = 220;
      window_width  = 600;
      break;
      
    case "requestaquote":
      url           = this.g_requestaquote_link;
      surfaid_page  = "ContactModule";
      surfaid_qkwd  = "RequestAQuote";
      break;

    case "callmelater":
      url           = this.g_callmelater_link;
      surfaid_page  = "ContactModule";
      surfaid_qkwd  = "CallMeLater";
      break;

    case "emailus":
      url           = this.g_emailus_link;
      surfaid_page  = "ContactModule";
      surfaid_qkwd  = "EmailUs";
      break;
      
    case "aboutibm":
      url           = this.g_aboutibm_link;
      surfaid_page  = "Footer";
      surfaid_qkwd  = "AboutIBM";
      break;
    
    case "termsofuse":
      url           = this.g_termsofuse_link;
      surfaid_page  = "Footer";
      surfaid_qkwd  = "TermsOfUse";
      break;
    
    case "privacy":
      url           = this.g_privacy_link;
      surfaid_page  = "Footer";
      surfaid_qkwd  = "Privacy";
      break;
    
    case "contactibm":
      url           = this.g_contactibm_link;
      surfaid_page  = "Footer";
      surfaid_qkwd  = "ContactIBM";
      break;

  }  
  
  if (trim(url) != "")
  {
    this.addSurfAid(surfaid_page, surfaid_qkwd, surfaid_qresult);
    this.executeClickThrough( url, window_height, window_width, 2);
  }
  else
  {
    alert(item + " link is not defined at the bottom of the index.html file.");
  }
  
}


//------------------------------------------------------------
// end Page Display functions
//------------------------------------------------------------

//------------------------------------------------------
// Breadcrumb functions
//
// This collection of functions are used at various times to
// generate the breadcrumb for the product
//------------------------------------------------------

// walk breadcrumb for action to perform
// the 'n' is the array position that determines which action will be called
function I2U_walkBreadcrumb(n) {

   // get command to perform
   var cmd = this.acts[n];

   // insert call to the wrapper   
   cmd = cmd.replace(".showShow(", ".showShow2(");
   cmd = cmd.replace(".writePage(", ".writePage2(");
   cmd = cmd.replace(".search(", ".search2(");
   cmd = cmd.replace("this.", "eengine.");

   // reduce breadcrumbs to that length
   for ( var i=n+1; i < this.acts.length; i++ ) {
      this.acts[i] = "";
      this.g_bread[i] = "";
   }
   this.acts.length = n;
   this.g_bread.length = n;
   
   if ( this.acts == "" ) {
      this.acts = new Array();
      this.g_bread = new Array();
      this.g_bread[ this.g_bread.length ] = "E-catalog home";
      this.acts[ this.acts.length ] = "this.showShow()";
   }

   eval(cmd);
   
}

// search the breadcrumb list for the first action that matches the
// supplied action
function I2U_searchBreadcrumb(key) {

   // search breadcrumbs for action
   for ( var i=0; i < this.acts.length; i++ ) {
      var line = this.acts[i];
      
      line = line.replace("this.", "eengine.");
      line = line.replace(".showShow(", ".showShow2(");
      
      if ( key.toLowerCase() == line.toLowerCase() ) {
        key = "eengine.walkBreadcrumb(" + i + ")";
      }
   }

   return key;
}

function I2U_makeBreadcrumb() {

  var bread_divider = "<span class=\"bct\">&nbsp;&gt;&nbsp;</span>";
  var bread_link_st = "<a href=\"index.html\" class=\"bctl\" onclick=\"";
  var bread_link_ed = "; return false;\">";
 
  // make sure as best as possible that there are not dupe entries next to each other.
  this.checkForDupeBread();    
 
  var final_bread = "";
  
  // DKR 20050907...Paula Matthies has requested that the "breadcrumb should end at the page
  // before (the one) you are actually on".  The for loop below is modified to accomplish this.
  //for ( var i=0; i < this.acts.length; i++ ) {
  for ( var i=0; i < this.acts.length-1; i++ ) {
    if ( final_bread != '' ) {
       final_bread += bread_divider;
    }
   
    this.g_bread[i] = this.g_bread[i].replace("@server", "eServer");
    
    if ( i < this.acts.length-1 ) {
      final_bread += bread_link_st + "eengine.walkBreadcrumb(" + i + ")" + bread_link_ed + this.g_bread[i] + "</a>";
    } else {
      final_bread += bread_link_st + "Javascript:void(0)" + bread_link_ed + this.g_bread[i] + "</a>";      
    }
  }
  
  final_bread += bread_divider;

  final_bread = final_bread.replace("this.", "eengine.");

  return final_bread;
}

// -----------------------------------------------------
// This sets the breadcrumb for series and detail pages
// -----------------------------------------------------
function I2U_assembleBread(category) {
  
  for ( var i=0; i < this.db.length; i++ ) {
       var line = this.db[i].split('|');  

       var isOk = 0;
       
       // certain items have an alias.. such as 
       // thinkcentre is the same as NetVista
       // eserver is the same as @server
       //
       //.. lets compensate here
       switch ( category.toLowerCase() ) {
          case "thinkcentre":
         if ( ( line[0].toLowerCase().indexOf(category.toLowerCase()) != -1 ) || ( line[0].toLowerCase().indexOf("netvista") != -1 ) ) {
            isOk = 1;
         }            
             break;
          case "eserver":
         if ( ( line[0].toLowerCase().indexOf(category.toLowerCase()) != -1 ) || ( line[0].toLowerCase().indexOf("@server") != -1 ) ) {
            isOk = 1;
         }          
             break;
          default:
         if ( line[0].indexOf(category) != -1 ) {
            isOk = 1;
         }           
             break;
       }
             
       if ( isOk == 1 ) {
          this.acts[ this.acts.length ] = "this.writePage2("+(i+1)+")";
          
          var title = line[0].substring( line[0].indexOf(" ")+1 );
         
          this.g_bread[ this.g_bread.length ] = title;
          break;
       }
  }
}

// makes sure, as best as we can, there will not be duplicate entries in the breadcrumbs.
function I2U_checkForDupeBread() {

    // check for additional dupes
    if ( this.acts[ this.acts.length-1 ] == this.acts[ this.acts.length-2 ] ) {
      // remove dupe
      this.acts.length = this.acts.length-1;  
      this.g_bread.length = this.g_bread.length-1;
    }
    
}

//-----------------------------------------------------
// end Breadcrumb function section
//-----------------------------------------------------

//-----------------------------------------------------
// Series Display Support functions
//
// These functions are used in support of displaying 
// any given series of products
//-----------------------------------------------------

// this sorts an existing series search and redisplays accordingly
function I2U_sortSeries(key) {

   // make sure there is something to do.
   if ( key > -1 ) {
     // capture what to sort on
     this.g_last_sort = key;

     // blank out showMatch for the moment.. 
     var tmp_sm = this.ctnt[5];  
     this.ctnt[5] = "";
     // store showSpread
     var spread_tmp = this.ctnt[13];
   
     // run display of series
     this.displaySeries(key);
   
     // set template back to normal
     this.ctnt[5] = tmp_sm;
     this.ctnt[13] = spread_tmp;
   
     // remove breadcrumb as its not one we want to keep
     this.acts.length = this.acts.length-1;
     this.g_bread.length = this.g_bread.length-1;     
   }
 
   return false;   
}

// used by writeSeries and sortSeries
function I2U_displaySeries(sortKey) {

   var tmp_ctnt_2 = this.ctnt[2];

   if ( this.results.length > 0 ) {
     var line = this.results[0].split('|');
     this.g_bread[ this.g_bread.length ] = line[0] + " " + line[1];   
   }

   // create search nav
   // DKR, 2005-08-19...Since the writeSeries function was modified to always show ALL series
   // products in a single display, blank out the previous and next arrows.
   //this.prevNext2(this.results.length, parseInt (this.numToShow, 10) );
   this.ctnt[14] = "";

   // replace showmatch and search spread
   this.ctnt[5] = this.g_prod_series; 
   this.ctnt[13] = this.g_prod_ser_detail;
   
   var final_rc_key = this.g_series_rc_key;
   var rc = this.makeRC( final_rc_key );  
   
   // swap out common tags
   this.ctnt[5]= this.manageSpecialTags( this.ctnt[5], rc );
   
   // just in case we've a bad hit on a series.. 
   this.ctnt[2]= this.manageSpecialTags( this.ctnt[2], rc );   
   
   if ( this.results.length > 0 ) {
     var line = this.g_series_data.split('|');
     
     // handle series title, copy, image name, image height and image width 
     for ( var i=0; i < this.g_seriesHeader.length; i++ ) {
        var sh_line = this.g_seriesHeader[i].split('|');
        
        if ( ( line[0].toLowerCase() == sh_line[0].toLowerCase() ) && ( line[1].toLowerCase().indexOf(sh_line[1].toLowerCase()) != -1  ) ) {
           for ( var j=0; j < sh_line.length; j++ ) {
              this.ctnt[5] = this.ctnt[5].replace( eval("/\\[\\[series_col"+j+"\\]\\]/gi") , sh_line[j]);
           }
           break;
        }
     }          
     
     // if sortKey is negative.. sort nothing
     if ( sortKey >= 0 ) {
       // call showmatch for 0,0 entry
       this.sortResults(sortKey,1);    
     }
     
     this.ctnt[5] = this.manageLabels(this.ctnt[5], line);
     
     // if sortKey is negative show nothing.. the calling method will perform the display
     // if there are items.
     if ( sortKey >= 0 ) {       
       // show results
       //this.showMatch (0,0);
       this.showMatch (this.g_series_ref, this.g_series_matchFlag );
     }
     
   } else {
     this.noMatch();
   }
   
   this.ctnt[2] = tmp_ctnt_2;
}

// normally for replacing columns and labels in the category display.
// could be used by other functions as needed.
function I2U_manageLabels( content, line, f ) {

     // perform swap out for series data
     for ( var i=0; i < line.length; i++ ) {
        // this is to shove out a message  
        var lbl = eval("/(\\[\\[lbl=(.+|col[0123456789]+[\\-0123456789]*|.+)\\]\\])/gi");

        // if good, then process user message to push onto page, if the given
        // condition is true.
        if ( lbl.test(content) ) {
            var otr = RegExp.$1;
            var llst = RegExp.$2.split('|');

            // pos is position in lbl parameter list-array
            var pos = 3;
            // check for a range of columns or a single column
            
            if ( ( llst[1].indexOf("-") != -1 ) || ( llst[1] == ("col"+i) ) ) {
               var s = i;
               var e = i+1;
               // seed (s)tart and (e)nd if a range of columns
               if ( llst[1].indexOf("-") != -1 ) { 
                 var lne = llst[1].split('-');
                 s = parseInt( lne[0].substring( 3 ), 10);
                 e = parseInt( lne[1], 10 );
               }

               // perform test for given condition
               for ( var k=s; k < e; k++ ) {
                 if ( ( eval( "line["+k+"] "+llst[2] ) ) || ( llst[2] == "*" ) ) {
                    pos = 0;
                    break;
                 }
               }

               // reset so we don't miss anything
               j=0;
               content = content.replace( otr, llst[pos] );
            } 
        }

        // if we want to skip the column swap.. f will have a value.
        if (! f ) {        
          // if blank, put 'none' in.
          var col = line[i];
          if ( col == "" ) {
            col = "None";
          }

          // swap out any $ for &#036; to avoid a bug in NN6 and Opera 7.23
          col = col.replace("$", "&&#036;" );
          col = col.replace("&&", "&" );

          // swap out columns
          content = content.replace( eval("/\\[\\[col"+i+"\\]\\]/gi") , col);
        }
     }

     return content;
}

//-----------------------------------------------------
// end Series Display Support functions
//-----------------------------------------------------

//-----------------------------------------------------
// Search Support functions
//
// These are generic functions that are used by the
// search wrappers of this product
//-----------------------------------------------------

// altered prevNext.. no numbers only a 'prev' and 'next' link
function I2U_prevNext2 (ceiling,flag) {

    var pg_max = 10;
    var lnk = '<a href="index.html" onclick="eengine.showMatch2';
    var noPages = Math.ceil( (this.results.length/pg_max) );  
   
    // check for previous link
    var repCt = "";
    if ( this.hEnd > 0 )
    {
       repCt += '\n ' + lnk + '(' + (this.hEnd-pg_max) +',2);return false;">&lt; Previous</A>';
    }  
    
    // check for next link
    if ( ( this.results.length > pg_max ) && ( ( this.hEnd + pg_max ) <  this.results.length) )
    {
       if ( repCt != "" ) repCt += "&nbsp;|&nbsp;";
       
       // display right-next arrow images
       repCt += '\n ' + lnk + '(' +  ( this.hEnd + pg_max ) +',1);return false;">Next &gt;</A>';
    }
   
    this.ctnt[14] = repCt;
}

// this performs some post-process routines to the search results
// any time some data needs cleaning.. run it through here
// Such items as dynamic links being inserted and so on, go in here.
function I2U_cleanResults() {   
   this.results[0] = this.cleanContent( this.results[0] );
}

// this performs some post-process routines to the search results
// any time some data needs cleaning.. run it through here
// Such items as dynamic links being inserted and so on, go in here.
function I2U_cleanContent(content) {

   // make link for success lease
   var l1 = "SuccessLease&reg; for Small Business";
   var l2 = "<a class=\"small\" href=\"Javascript:void(0)\" onclick = \"eengine.doClickThrough2('http://www-132.ibm.com/content/home/store_IBMPublicUSA/en_US/buy.html',600,800,2); return false;\">"+l1+"</a>";
    
   content = content.replace(l1, l2); 
  
   // make links for footnotes
   for ( var i=0; i < 1001; i++ ) {
      var old_link = "";
      var link_hand = "";
      if ( content.indexOf("<sup>[<a href='javascript:HandleFootnote("+i+")'>"+i+"</a>]</sup>") != -1 ) {
      
        link_hand = "<sup>[<a class=\"small\" href=\"Javascript:void(0)\" onclick = \"eengine.HandleFootnote("+i+"); return false;\">";
        link_hand += i+"</a>]</sup>";
                
        old_link = "\\<sup\\>\\[\\<a href\\=\\'javascript\\:HandleFootnote\\("+i+"\\)\\'\\>"+i+"\\<\\/a\\>\\]\\<\\/sup\\>";   
        
      }
      //} else if ( content.indexOf("["+i+"]") != -1 ) {      
      //
      //  link_hand = "<a class=\"small\" href=\"Javascript:void(0)\" onclick = \"eengine.HandleFootnote("+i+"); return false;\">";
      //  link_hand += "["+i+"]</a>";
      //  
      //  old_link = "\\["+i+"\\]";
      //  
      //} else if ( content.indexOf("<sup>"+i+"</sup>") != -1 ) {       
      //
      //  link_hand = "<a class=\"small\" href=\"Javascript:void(0)\" onclick = \"eengine.HandleFootnote("+i+"); return false;\">";
      //  link_hand += "<sup>"+i+"</sup></a>";
      //  
      //  old_link = "\\<sup\\>"+i+"\\<\\/sup\\>";
      //  
      //}     
      
      // make objects for replacement.
      var obj_old = eval("/" + old_link + "/gi");
      
      content = content.replace(obj_old, link_hand);
   }

   return content;
}

//-----------------------------------------------------------------------------
// Sort the result array in low to high for price and number,
// and for text, it is A to Z.
//-----------------------------------------------------------------------------

function I2U_sortResults(field, type){

    // field variable comes in as an array if from a form.  Fix it.
    
    if (field.length > 3){

    	var fieldArray = field.split(',');
	type= fieldArray[1];
	field = fieldArray[0];
	tid = fieldArray[3];
    
    }
    	
	var fields_2=new Array();
	var fields_1=new Array();

// push the array element to the front with a special
// delimiter '{|' and sort in place
    for (var j = 0; j < (this.results.length); j++) {
		var fields_1 = this.results[j].split('|');
		var item1   = new String (fields_1[ field ]);
		if(type== 2){
                    
		    item1 = item1.replace (/\$+/g, "");
	    	    item1 = item1.replace (/,/g,"");
		    
		    
		    // If it's a price add in some zeroes so that all balances out
		    
		    if ( (field == 8) || ( field == 19 ) ) {
		    
		   	 var dotLoc = item1.indexOf(".");
		   	 var addDots = 6 - dotLoc;
		   	 if (addDots < 0){
		   	 	addDots = 0;
				}
		    	for (var dotCount = 0; dotCount <= addDots; dotCount++)
		    	{
		    		    
				item1 = "0" + item1;
				    
		    	}	
		    
		    	dotLoc = item1.indexOf(".");
		    	item1 = item1.substring(0,dotLoc + 2);
		    }	    
		    
        }
         
        if(type== 2 || type== 3)       		{
           // item1 = parseInt(item1);
        }
        
        if(type== 1) 		{
            item1 = item1.toLowerCase();
        }
        
        // add temporary front field
        // DKR 2005/08/12...Series sort is not working properly because the "}{" string
        // being used a separator between the sort value -- tmp -- and the full line from
        // the results array is too high in the ASCII character sequence.  By changing the
        // separator to five blanks and a bang, the alpha sort is now working for similarly 
        // constructed strings such as "x306 Express" and x306 Express - Browse and buy".
        //var tmp = item1 + '}{' + this.results[j];
        var tmp = item1 + '     !' + this.results[j];
        fields_2[j]=tmp;
    }
	
        // use built-in quick sort; log-linear, not quadratic
	fields_2.sort();
		
        // swap back the starting array in sorted order on the element
	for (var j=0;j<(fields_2.length);j++) {
           //fields_1 = fields_2[j].split('}{');
           fields_1 = fields_2[j].split('     !');
           this.results[j] = fields_1[1];			
	}

	this.pageStart = 1;
	this.pageEnd = 10;    
}

//-----------------------------------------------------
// end Search Support functions
//-----------------------------------------------------

//-----------------------------------------------------
// General Support functions
//
// These are generic functions that are used by many of the 
// other functions in this file
//-----------------------------------------------------

// this is used by display series. 
// it cleans out any stray swap tags that might remain in the given content
function I2U_cleanSeriesTags(content) {

     var cols = this.prod[0].split('|');
        
     for ( var i=0; i < cols.length; i++ ) {
	var obj_name = eval("/\\[\\[ATTRIB"+(i+1)+"\\]\\]/gi");
	var obj_val = eval("/\\[\\[ATTRIB_COL_"+(i+1)+"\\]\\]/gi");
	var obj_nval = eval("/\\[\\[ATTRIB_NCOL_"+(i+1)+"\\]\\]/gi");

	// swap out attribute names
	if ( content.indexOf("[[ATTRIB"+(i+1)+"]]") != -1 ) {
	  content = content.replace("<th align=\"left\" valign=\"middle\" width=\"110\" class=\"sep2\"><strong><span class=\"small\">[[ATTRIB"+(i+1)+"]]</span></strong></th>", "<th valign=\"middle\" width=\"1\" class=\"sep2\"><strong><span class=\"small\">&nbsp;</span></strong></th>");	  
	  content = content.replace(obj_name, "");	  
	}

	// swap out attribute data column numbers
	if ( content.indexOf("[[ATTRIB_COL_"+(i+1)+"]]") != -1 ) {		
	  content = content.replace("<td align=\"left\" valign=\"top\" width=\"110\" class=\"small\">[[ATTRIB_COL_"+(i+1)+"]]</td>", "<td valign=\"top\" width=\"1\" class=\"small\">&nbsp;</td>");		
	  content = content.replace(obj_val, "");	  
	}

	// swap out attribute sort values for sorting pulldown
	content = content.replace(obj_nval, "");     
     }
     
     // if they aren't replaced by now.. swap out a space for them to keep it all clean
     var sh_line = this.g_seriesHeader[0].split('|'); 
     for ( var j=0; j < sh_line.length; j++ ) {
        content = content.replace("[[series_col"+j+"]]", "");            
     }     
       
     return content;
     
}

// swaps out tags like [[GLOBAL_RC]] and so on
function I2U_manageSpecialTags(content, rc) {

  var bread = this.makeBreadcrumb(); 
  content = content.replace("[[NAVBAR]]", bread);
  content = content.replace("[[GLOBAL_RC]]", g_global_rc);
  content = content.replace("[[RCOL]]", rc);   
  content = content.replace("[[T_FOOT]]", g_brandFooter);
  
  if (this.g_Actions.length > 1)
  {
    if (g_lastAction > 0)
    {
      if (g_lastAction == this.g_Actions.length - 1)
      {
        content = content.replace( eval("/<!-- Begin actionStackNav.+End actionStackNav -->/gi"), g_actionStackTop);
      }
      else
      {
        content = content.replace( eval("/<!-- Begin actionStackNav.+End actionStackNav -->/gi"), g_actionStackMid);
      }
    }
    else
    {
      content = content.replace( eval("/<!-- Begin actionStackNav.+End actionStackNav -->/gi"), g_actionStackBottom);
    }
  }
  else
  {
    content = content.replace( eval("/<!-- Begin actionStackNav.+End actionStackNav -->/gi"), g_actionStackNone);
  }
  
  return content;
}


// this allows footnotes to be passed and manipulated
function I2U_HandleFootnote(n) {
  this.doClickThrough2("http://www.pc.ibm.com/us/fnotes.html#go"+n,500,500,2);
}


function I2U_doClickThrough2(theurl, _poph, _popw, _fw) 
{
  
  // Make SurfAid call.
  this.addSurfAid("ClickThrough", theurl, null);

  // Execute the click through
  this.executeClickThrough(theurl, _poph, _popw, _fw);

}


function I2U_executeClickThrough(theurl, _poph, _popw, _fw) 
{

  var b_url = "redirect.html";
 
  var _tb = 'location=yes,toolbar=yes,statusbar=yes,resizable=yes,scrollbars=yes,height='+_poph+',width='+_popw;
  if ( _fw == 1 )
     _tb = 'WIDTH='+_popw+',HEIGHT='+_poph+',screenX=50,screenY=50,top=50,left=50,scrollbars=yes,resize=yes,location=yes,toolbar=yes,menubar=yes,status=yes,directories=yes';
  
  if (! this.exe && theurl.indexOf("mailto") == -1)
  {
  //  clickThrough = window.open(b_url,'customerSite', _tb);
  //  setTimeout("clickThrough.location='"+theurl+"';", 1000);
    clickThrough = window.open(theurl,'_blank', _tb);    
  }
  else
  {
    if (! g_exeWarningMessageShown)
    {
      alert (g_exeWarningMessage);
      g_exeWarningMessageShown = true;
    }
    clickThrough = window.open(theurl,'_blank', _tb);    
  }
  
  if (clickThrough && (! this.exe) && theurl.indexOf("mailto") == -1) {
    if (! this.is_opera7 ) {
      clickThrough.focus();
    }
  }    

}


// this is a wrapper to doClickThrough.  This will cause a special page to show up anytime the user leaves the 
// IBM catalog
function I2U_searchIBM(form) {

   // we are wanting to run a search across IBM's own web site.. 
   // call their search page and pass the value in from 'q' to seed the search
   var url = "http://www.ibm.com/search?en=utf&v=11&lang=en&cc=us&q=" + form.q.value; 

   // call doClickThrough2 so we get our 'you can return ..' message    
   this.doClickThrough2(url, 600, 800, 2);   
   
   return false;
}

//-----------------------------------------------------------------------------
// Dynamically display the individual pages from the documents in the database
// index is the index value (DB page number)
// tid is the topographical ID (pass in a 0 if unsure)
// pageName is either the name of a pop-up window, or a frame name
// anchorName is the name of an anchor to position the window scroll position
// If width and height are set, a window will be popped-up.  If omitted or <0,
// the content will be written in the frame name called pageName.
// ADDED - RE 6/4/2003
//-----------------------------------------------------------------------------
function I2U_writeWindow(pageName, anchorName, height, width, content) {
  var pageRef;
  var newheight= -1, newwidth=-1;

  // if height and width were passed in, use them.
  if(height) { newheight= height; }
  if(width) { newwidth= width; }

  // if we already have a window/frame open by that name
  if((this.g_windowHandles[pageName]) && (this.is_ie)) {
    try {
      if(this.g_windowHandles[pageName].closed) {
        this.g_windowHandles[pageName] = null;
      }
    } catch(e) {
      this.g_windowHandles[pageName] = null;
    }
  } else {
    if((this.g_windowHandles[pageName]) && (this.g_windowHandles[pageName].closed)){
      this.g_windowHandles[pageName] = null;
    }
  }

  if((this.g_windowHandles[pageName]) && (this.g_windowHandles[pageName] != null)) {
    pageRef = this.g_windowHandles[pageName];
  // if width or height is <0, we assume it is a frame name
  } else if((newwidth < 0) || (newheight < 0)) { 
    if(pageName.indexOf("parent") >= 0) {   
      pageRef = eval(pageName);
    } else {   
      pageRef = eval('parent.'+pageName);
    }
  // otherwise, we assume it is a window to be opened
  } else { 
    pageRef = window.open('about:blank', pageName, 'width='+newwidth+',height='+newheight+',screenX=50,top=50,left=50,scrollbars=yes,resize=yes,resizable=yes,location=yes,toolbar=yes,menubar=yes');

    // add a random number (1-1000000) to the pageName to avoid
    // window collisions - this happens if a window is opened with a name,
    // somehow the engine gets reloaded (or a different engine is loaded),
    // and another window is opened with the same window name
    // this is due to browser security and the new engine not having access
    // to the window handle created by someone else.  
   
    var seed = (new Date()).getTime();       
    seed = (seed*9301+49297) % 233280;           
    if (! this.is_opera7 ) {
      pageRef.name = pageName + (Math.ceil((seed/(233280.0))*1000000));              
    }
  }

  // keep a copy of the handle to the window/frame so we can grab it back
  this.g_windowHandles[pageName] = pageRef;

  // write out content
  var d = eval("this.g_windowHandles['"+pageName+"'].document");

  d.open();

  d.write(
     content
  );

  d.close();

  // if an anchorName was passed in, use it to scroll
  if((anchorName) && (anchorName != "")) {
    // if no # at the beginning of the anchorName, put one there.
    if(anchorName.indexOf("#") != 0) {
      anchorName = "#" + anchorName;
    }

    // find pixel coordinates to scroll to on page
    var coords = {x:0, y:0};
    if(document.layers) {
      // NS 4 ?
      var anchor = pageRef.document.anchors[anchorName];
      coords.x = anchor.x;
      coords.y = anchor.y;
    } else if(document.getElementById) {
      // IE 6, NS 7, NS 6, etc.
      // try looking it up by name
      var anchor = pageRef.document.anchors[anchorName];

      // just in case name lookup failed, look it up by enumeration
      for(var loop=0; loop < pageRef.document.anchors.length; loop++) {
        if(pageRef.document.anchors[loop].name==anchorName) {
          anchor = pageRef.document.anchors[loop];
          break;
        }
      }

      // skip current anchor offsets?  - seems to make NS7 happy
      if(this.is_nav7) {
        anchor = anchor.offsetParent;

      // NS6 scrolls just past the line we want.  Go back up approx line height.
      } else if(this.is_nav6) {
        coords.y -= 15;
      }

      // anchor coordinates are relative
      while(anchor) {
        coords.x += anchor.offsetLeft;
        coords.y += anchor.offsetTop;
        anchor = anchor.offsetParent;
      }
    }

    // make sure we're not asking the browser to do something it can't do
    if(coords.x < 0) coords.x = 0;
    if(coords.y < 0) coords.y = 0;

    pageRef.scrollTo(coords.x, coords.y);
  }

  // focus on this window/frame
  pageRef.focus();
}

// create the right hand column with the featured offers
function I2U_makeRC(key) {

  var mon_abbr = new Array( 
    "Jan","Feb","Mar","April","May","June","July","Aug", "Sept","Oct","Nov","Dec"
  );

  var tmp_rc = "";
  var final_rc = "";
  for ( var i=0; i < rc_offers.length; i++ ) {
     var line = rc_offers[i].split('|');
     // make sure the key matched

     if (possibleRCOffer (trim(key.toLowerCase()), trim(line[0].toLowerCase()))) 
     {
      
       // now we check date range.
       // dates[0] = start date
       // dates[1] = end date
       var dates = new Array();
       
       // position 1 is start date, position 2 is end date in rc_offers db line
       for ( var j=1; j < 3; j++ ) {
          // check to see if the date needs conversion.
          // it could be coming in various ways.
                 
          // split the date
          var date_array = new Array();
          var divider = '-';
          var y = 0;          
          var m = 1;
          var d = 2;
          if ( line[j].indexOf("/") != -1 ) {
             // col 0 = mm
             // col 1 = dd
             // col 2 = yyyy        
             y = 2;
             m = 0;
             d = 1;
             divider = '/';
          }
          
          date_array = line[j].split(divider);        
          
          if ( date_array[2].indexOf(" ") != -1 ) {
            date_array[2] = date_array[2].substring(0, date_array[2].indexOf(" ") );
          }

          // rebuild date in the format we need .. we need dd mon yyyy
          var tmp_date = (date_array[d] + " " + mon_abbr[parseInt(date_array[m],10)-1] + " " + date_array[y]);           
          
          dates[ dates.length ] = new Date (Date.parse ( tmp_date ));
       }

       var now = new Date();
       
       if ( ( now.valueOf() > dates[0].valueOf() ) && ( now.valueOf() < dates[1].valueOf() ) ) {

         tmp_rc = g_rc;
         for ( var j=0; j < line.length; j++ ) {
            var val = line[j];
            
            // Certain action/engine calls in the RightColumnOffers do not need to be fully defined.
            // If the entry starts with "http://", it is an external URL so wrap it in a doClickThrough2.
            // If the entry is simply a number, assume it is a page number and call writePage2.
            if ( val.indexOf("http://") == 0 || val.indexOf("https://") == 0 ) {
               val = "eengine.doClickThrough2('"+val+"',600,800,2);return false;";
            } 
            else 
            {
               var tst_field = parseInt(val);
               if ( ( j > 8 ) && (! isNaN(tst_field) ) ) {
                  val = "eengine.writePage2('"+val+"');return false;";
               }
            }
            
            // clean up template
            tmp_rc = this.manageLabels(tmp_rc, line, 1);
            
            // swap out data
            //tmp_rc = tmp_rc.replace("[[col"+j+"]]", val);
            tmp_rc = tmp_rc.replace( eval("/\\[\\[col"+j+"\\]\\]/gi") , val);

         }

         final_rc += tmp_rc;

       }

     }
  }
  
  // check for any legal tags
  final_rc = this.cleanContent(final_rc);
  
  return final_rc;

}

// Based on where you are in the e-catalog, various possibilities for determining whether
// to display a given right column promotional offer.  This function checks all possibilities 
// for a given offer against the page/content being displayed.  
//
// If the rc offer applies and should be displayed, based on the location in the e-catalog, 
// this function returns true. Note: The date range for an offer is checked in the makeRC
// function, not here.  This function simply determines whether an rc offer applies to a given
// e-catalog location.  Wheter it displays or not is determined in the makeRC function.
//
// If the rc offer does not apply and should not be displayed, this function returns false.
//
// DKR, 2005-08-16
//
function possibleRCOffer(key_from_ecatalog, key_from_inputfile_offers) 
{

  // make sure there are no slashes in the category or subcategory...HTML escape sequence them
  var obj = eval("/\\//gi");
  key_from_ecatalog = key_from_ecatalog.replace(obj, "&#047;");
  key_from_inputfile_offers = key_from_inputfile_offers.replace(obj, "&#047;");

//alert (key_from_ecatalog + '...' + key_from_inputfile_offers);

  var return_value = 0;
  
  // Remove any blanks around the ">" when trying to map to a product series.
  var rc_tokens_from_inputfile_offers = key_from_inputfile_offers.split('>');
  if (rc_tokens_from_inputfile_offers.length == 2) { key_from_inputfile_offers = trim(rc_tokens_from_inputfile_offers[0]) + ">" + trim(rc_tokens_from_inputfile_offers[1]) }

  // If you are getting a product detail page reference, you will have multiple pieces 
  // to process in the incoming key_from_ecatalog.
  var rc_tokens_from_ecatalog = key_from_ecatalog.split('>');
  
  switch(true)
  {
    // Any instance where a page name or category/series is explicitly referenced
    // in the RightColumnOffers in the input file.
    // 1-to-1 relationship
    case (key_from_ecatalog == key_from_inputfile_offers):
      return_value = 1;
      break;
    
    // Wildcard in the RightColumnOffers in the input file to display the offer anywhere
    // in the e-catalog (e.g. searches, page displays, Featured offers page, etc.).
    // 1-to-all relationship.
    case (key_from_inputfile_offers == "*"):
      return_value = 1;
      break;
      
    // For any product detail page, display those RightColumnOffers defined as DETdefault.
    case (key_from_ecatalog.indexOf('det') == 0 && key_from_inputfile_offers == "detdefault"):
      return_value = 1;
      break;
      
    // For any product detail page, display those RightColumnOffers 
    // explicitly defined to the category, series, product for the given product.
    case (key_from_ecatalog.indexOf('detproduct') == 0 && (rc_tokens_from_ecatalog.length == 4)):
    
      // Single product mapped to right column offer
      if (rc_tokens_from_ecatalog[3] == key_from_inputfile_offers) 
      { 
        return_value = 1;
      }
      // Category mapped to right column offer
      else if (rc_tokens_from_inputfile_offers.length == 2) 
      { 
        if (trim(rc_tokens_from_inputfile_offers[1]) == trim(rc_tokens_from_ecatalog[1]))
        {
          return_value = 1;
        }
      }
      // Series mapped to right column offer
      else if (rc_tokens_from_inputfile_offers.length == 3) 
      { 
        if (trim(rc_tokens_from_inputfile_offers[1]) == trim(rc_tokens_from_ecatalog[1]) && trim(rc_tokens_from_inputfile_offers[2]) == trim(rc_tokens_from_ecatalog[2]))
        {
          return_value = 1;
        }
      }
      break;
      
    // For the Save to Desktop page, display those RightColumnOffers mapped to 
    // "S2D" (legacy) or "SaveToDesktop"
    case (key_from_ecatalog == "savetodesktop" && (key_from_inputfile_offers == "savetodesktop" || key_from_inputfile_offers == "s2d")):
      return_value = 1;
      break;
 
    // For any Featured Offers display -- showing all or a single offer, display those 
    // RightColumnOffers defined as FO or FeaturedOffers,
    case (key_from_ecatalog.indexOf('featuredoffers') == 0 && (key_from_inputfile_offers == "featuredoffers" || key_from_inputfile_offers == "fo")):
      return_value = 1;
      break;

    // For any Featured Offers displaying a single offer, display those 
    // RightColumnOffers defined as FO or FeaturedOffers specifically to that offer (e.g. fo>offer1).
    case (key_from_ecatalog.indexOf('featuredoffers') == 0 && rc_tokens_from_inputfile_offers.length == 2):
      if (trim(rc_tokens_from_inputfile_offers[1]) == trim(rc_tokens_from_ecatalog[1]))
      {
        return_value = 1;
      }
      break;
  
  }
  
  return return_value;

}


// This script opens a new browser window and writes
// HTML to display an image with a window title
function I2U_showImage(imageFileName, windowTitle) {

  // Specify window parameters
  imageWin = window.open( "", "imagewindow", "width=600,height=500,status,scrollbars,resizable,screenX=0,screenY=0,left=0,top=0");

  // Write content to window
  imageWin.document.write('<html><head><title>' + windowTitle + '</title></head><body>');
  imageWin.document.write('<img src="' + imageFileName + '" />');
  imageWin.document.write('</body></html>');
  imageWin.document.close();

  // If we are on NetScape, we can bring the window to the front
  if (navigator.appName.substring(0,8) == "Netscape") imageWin.focus();

}



//-----------------------------------------------------
// end General Support functions
//-----------------------------------------------------



//-----------------------------------------------------------------------------
// Print functions
//-----------------------------------------------------------------------------
function I2U_printDetail(n) {

  this.results = this.prod;

  var print_content = this.g_printdetail;

  //alert (print_content);

  var line = new Array();

  // go find the matching record if needed
  for ( var i=0; i < this.results.length; i++ ) 
  {
     var line = this.results[i].split('|');
     if ( line[2] == n ) { break; }
  }
   
  for ( var j=0; j < line.length; j++ ) 
  {
    var val = line[j];
              
    print_content = this.manageLabels(print_content, line, 1);
    print_content = print_content.replace( eval("/\\[\\[col"+j+"\\]\\]/gi") , val);
  } 
  
  //alert (print_content);
  
  this.printContent2(print_content, "PrintProductPage", line[7]);
  
  return false;

}

function I2U_printSeries(cat, ser, st)
{
  
   var print_content = "";
   var first_page = true;
   
   // make sure there are no slashes in the category or subcategory...HTML escape sequence them
   var obj = eval("/\\//gi");
   cat = cat.replace(obj, "&#047;");
   ser = ser.replace(obj, "&#047;");

   // run search
   cat = trim(cat);
   ser = trim(ser);
   var kwds2 = cat;

   if ( cat.indexOf(",") != -1 ) {
     kwds2 = ' ' + cat.replace(',', " ");     
   } else if ( cat.indexOf(" ") != -1 ) {
     kwds2 = '"' + cat + '"';
   }   
     
   this.cts = "0|1";

   // clear any previous searches
   this.query.length=0;

   //-- Copy keyword(s) into the object query array
   this.query = kwds2.split (/\s/);

   this.dbSearch();   
   
   // Sort the results and print them in the order of 
   // the Series page.
   this.sortResults(2,1);       
   
   // ensure we are dealing with the series we searched for.
   var temp_series = new Array();
   var temp_idx = new Array();
   for ( var i=0; i < this.results.length; i++ ) 
   {
      var line = this.results[i].split('|');
      var add_row_to_print_content = false;

      if ( trim(ser) != "" ) 
      {
          var a_ser = ser.split(',');
          for ( var j=0; j < a_ser.length; j++ ) 
          {
            if ( ( cat.toLowerCase() == line[0].toLowerCase() ) && ( line[1].toLowerCase().indexOf(a_ser[j].toLowerCase()) != -1 ) ) {
               temp_series[ temp_series.length ] = this.results[i];
               temp_idx[ temp_idx.length ] = (i+1);
               
               add_row_to_print_content = true; 
            }             
          }
        
      } 
      else 
      {
        if ( cat.toLowerCase() == line[0].toLowerCase() ) 
        {
           temp_series[ temp_series.length ] = this.results[i];
           temp_idx[ temp_idx.length ] = (i+1);
           
           add_row_to_print_content = true;
        }
     }      
     
     if (add_row_to_print_content)
     {
       
       var tmp_print_content = "";
       if (first_page)
       {
         tmp_print_content = "";
         first_page = false;
       }
       else
       {
         tmp_print_content = '\n<h5 style="page-break-after: always;">&nbsp;</h5>';
       }
       
       tmp_print_content += this.g_printdetail;

       for ( var j=0; j < line.length; j++ ) 
       {
         var val = line[j];
                   
         tmp_print_content = this.manageLabels(tmp_print_content, line, 1);
         tmp_print_content = tmp_print_content.replace( eval("/\\[\\[col"+j+"\\]\\]/gi") , val);
       }
       
       print_content += tmp_print_content;
       
     }   
   }
  
   var saSeriesKwd = cat;
   if ( ser != "" && ser != null ) {
     saSeriesKwd += ">" + ser;
   }
   
   this.printContent2(print_content, "PrintAllProductPagesForSeries", saSeriesKwd);

   return false;

}

function I2U_printContent2(p, sa_page, sa_qkwd)
{

  p += this.buildSurfAidCall(sa_page, sa_qkwd, null);

  eengine.showAll=1;

  p = "<html><head><link href=\"styles/ecat.css\" type=\"text/css\" rel=\"stylesheet\" /></head><body onload=\"this.focus();this.print();\"><table border=\"0\" width=\"100%\"><tr><td align=\"center\" valign=\"top\">" + p + "</td></tr></table></body></html>";
  p = eengine.prepPrt(p);
  eengine.prpCt(p, -1, 'printFrame', '', '', 1);

  eengine.showAll=0;
  
}
//-----------------------------------------------------------------------------
// End - Print functions
//-----------------------------------------------------------------------------



//-----------------------------------------------------------------------------
// Begin - SurfAid functions.  
//-----------------------------------------------------------------------------

function I2U_addSurfAid( page, kwd, result ) {

	if (! this.exe) {

		var sa_msg = "";

		if (trim(this.g_saCurrentQueryString) != "")
		{
			sa_msg += this.g_saCurrentQueryString + "&";
		}
   
		sa_msg += "page=" + page;

		if ( kwd != null ) {
			var obj = /"/gi;
			kwd = kwd.replace( obj, "");

			sa_msg += "&qkwd=" + kwd;
		}

		if ( result != null ) {      
			sa_msg += "&qresult=" + result;
		}
  
		window.SA_Message = sa_msg;
   
		var ecat_url = "";
		if (document.URL.indexOf('?') != -1) 
		{
			ecat_url = document.URL.substr(0,document.URL.indexOf('?'))
		}
		else
		{
			ecat_url = document.URL;
		}   
	
		if (g_alertSurfAid) { 
			alert("window.SA_Message: " + window.SA_Message) 
		} else {
			sa_onclick (ecat_url);  
		}		
 
	}
	
} // end addSurfAid


var g_alertSurfAid = 0;
function alertSurfAid() {
 
  g_alertSurfAid = 1;
  
}


//-----------------------------------------------------------------------------
// End - SurfAid functions.  
//-----------------------------------------------------------------------------



function I2U_checkContactFormFields(){

  var theform = document.forms['contactForm'];
  var requiredfields = theform.elements['REQUIREDFIELDS'].value;
  
  var retval = true;
  var focuselement = theform.elements[0];
  
  var error_intro = "Please enter values for the following required fields and resubmit:\n";
  var error_msg = error_intro;

  for (i=0; i<theform.elements.length; i++){

    var field = theform.elements[i]
    var isReq = (requiredfields.indexOf(field.name) != -1) ? true : false

    if(isReq){
    
      if ((field.type=="text" || field.type=="textarea" || field.type=="password") && field.value=="")
      {     
        var error_field = "ERROR_" + field.name;
        error_msg += "\n    - " + theform.elements[error_field].value;
        if (retval) { focuselement = document.forms['contactForm'].elements[i] }
        retval = false;
      }
      
      if (field.type=="select-one" && field.selectedIndex == 0)
      {  
        var error_field = "ERROR_" + field.name;
        error_msg += "\n    - " + theform.elements[error_field].value;
        if (retval) { focuselement = document.forms['contactForm'].elements[i] }
        retval = false;
      }
      
      if(field.type=="select-multiple")
      {  
        Sel=0
        for(o=0; o<field.options.length; o++){
          if(field.options[o].selected){
          Sel++
          break
          }
        }
        if(Sel == 0)
        {
          var error_field = "ERROR_" + field.name;
          error_msg += "\n    - " + theform.elements[error_field].value;
          if (retval) { focuselement = document.forms['contactForm'].elements[i] }
          retval = false;
        }      
      }
      
      if (field.type=="checkbox" || field.type=="radio")
      {
        var startingIndex = i  
        var Checked = 0
        var rLength=1
        while (field.type == theform.elements[i+1].type && field.name == theform.elements[i+1].name)
        {
          rLength++
          i++ 
        }
        
        for (g = startingIndex; g < rLength+startingIndex; g++)
        {
          if(theform.elements[g].checked)
          {
            Checked++
            break
          }
        }    
        if (Checked == 0)
        {
          var error_field = "ERROR_" + field.name;
          error_msg += "\n    - " + theform.elements[error_field].value;
          if (retval) { focuselement = document.forms['contactForm'].elements[i] }
          retval = false;
        }
      }
      
    }//isReq
    
  }//for
 
  if (! retval)
  {
    alert(error_msg);
    focuselement.focus();
  }
  else
  {
    var ecat_url = "";
    if (document.URL.indexOf('?') != -1) 
    {
      ecat_url = document.URL.substr(0,document.URL.indexOf('?'))
    }
    else
    {
      ecat_url = document.URL;
    }
    var s2d_engine_call = "?where=eengine.showS2D2()";
    var s2d_page = ecat_url + s2d_engine_call;
    theform.elements['THANKYOUPAGE'].value = s2d_page;
  }

  return retval;

}


//-----------------------------------------------------------------------------
// Spider development utilities
//
// This section of code is used during spider development.  After the prodInfo
// array is built via the spider, the goProductList function can be used to 
// display the full array so that the pages can be reviewed within a 
// fully functioning e-catalog without the need to modify the menus or put
// a static HTML page in place that lists the available products.
//
//-----------------------------------------------------------------------------

var g_sortcolumn = 2;

function I2U_goProductList() {

  this.dumpProductList(g_sortcolumn);
  
}

function I2U_dumpProductList(sortcolumn) {

  //alert ("Inside goProductList...template:" + template);
    
  g_sortcolumn = sortcolumn;

  var t_prodInfo = new Array();
  copyArray(prodInfo, t_prodInfo);
  
  // Is the sort column a text column or a numeric column?
  // text = 1 and numeric = 2.  
  var field = parseInt(sortcolumn);
  var column_type = 1;
  sortArray (t_prodInfo, field, column_type)
  
  var t_srchSpread = "";
  
   t_srchSpread += "\n <!-- Begin Mobular Technologies content - DO NOT modify this section -->";
   t_srchSpread += "\n ";
   t_srchSpread += "\n <table id=\"v14-body-table\" width=\"760\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\">";
   t_srchSpread += "\n ";
   t_srchSpread += "\n <!--	Begin breadcrumb -->";
   t_srchSpread += "\n <table width=\"600\" cellspacing=\"0\" cellpadding=\"0\">";
   t_srchSpread += "\n   <tr>";
   t_srchSpread += "\n     <td width=\"500\" valign=\"middle\" height=\"23\">";
   t_srchSpread += "\n       <img src=\"images/c.gif\" width=\"7\" height=\"1\" alt=\"\" />";
   t_srchSpread += "\n       <a href=\"index.html\" class=\"bctl\" onclick=\"eengine.walkBreadcrumb(0); return false;\">E-catalog home</a><span class=\"bct\">&nbsp;&gt;&nbsp;Book Portfolio</span>";
   t_srchSpread += "\n     </td>";
   t_srchSpread += "\n     <td width=\"90\" valign=\"middle\" align=\"right\">";
   t_srchSpread += "\n       <!-- Begin actionStackNav --><a href=\"Back\" onclick=\"if(total_load==1){eengine.goBack()}else{alert(loadWarn)}return false;\" onmouseout=\"window.status='';return true;\" onmouseover=\"window.status='Back';return true;\" style=\"text-decoration:none\"><img alt=\"Back\" src=\"images/bk_bold_black.gif\" height=\"16\" width=\"16\">&nbsp;<b>Back</b></a><!-- End actionStackNav -->";
   t_srchSpread += "\n     </td>";
   t_srchSpread += "\n     <td>";
   t_srchSpread += "\n       <img src=\"images/c.gif\" width=\"10\" height=\"1\" alt=\"\" />";
   t_srchSpread += "\n     </td>";
   t_srchSpread += "\n   </tr>";
   t_srchSpread += "\n </table>";
   t_srchSpread += "\n <!--	End breadcrumb -->";
   t_srchSpread += "\n ";
   t_srchSpread += "\n      <!--	Begin hero --> ";
  
  
   t_srchSpread += "\n<table align=\"left\" border=\"0\" width=\"760\" cellpadding=\"0\" cellspacing=\"0\">";   
 
   t_srchSpread += "\n   <tr>";
   t_srchSpread += "\n     <td width=\"760\" colspan=\"6\"><img src=\"images/c.gif\" width=\"760\" height=\"10\" alt=\"\" /></td>";
   t_srchSpread += "\n   </tr>";
 
   t_srchSpread += "\n   <tr height=\"50\">";
   
   t_srchSpread += "\n     <td width=\"82\"><img src=\"images/c.gif\" width=\"82\" height=\"1\" alt=\"\" /></td>";
   t_srchSpread += "\n     <td align=\"left\" valign=\"top\">"; 
   t_srchSpread += "\n       <table align=\"left\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";   
   t_srchSpread += "\n         <tr>";    
   t_srchSpread += "\n           <td>";    
   t_srchSpread += "\n             " + t_prodInfo.length + " total IBM Press books";
   t_srchSpread += "\n           </td>";
   t_srchSpread += "\n         </tr>";
   t_srchSpread += "\n       </table>";    
   t_srchSpread += "\n     </td>"; 
  
   t_srchSpread += "\n     <td colspan=\"4\" align=\"right\" valign=\"top\">";
   t_srchSpread += "\n     <form name=\"sortForm\" action=\"index.html\" target=\"engineWindow\">";
   t_srchSpread += "\n       <select name=\"sortGroup\" style=\"font-family: sans-serif; font-size: 11px; width:125px\" onchange=\"eengine.dumpProductList(document.sortForm.sortGroup.value); return false;\">";
   t_srchSpread += "\n         <option value=\"-1\">Sort results by...</option><option value=\"2\">ID</option><option value=\"0\">Category</option><option value=\"7\">Title</option>"; 
   t_srchSpread += "\n       </select>";
   t_srchSpread += "\n     </form>"; 
   t_srchSpread += "\n     </td>";
   t_srchSpread += "\n   </tr>";
  
   t_srchSpread += "\n   <tr>";
   t_srchSpread += "\n     <td width=\"82\" align=\"center\"><img src=\"images/c.gif\" width=\"82\" height=\"1\" alt=\"\" /></td>";
   t_srchSpread += "\n     <td width=\"460\"><img src=\"images/c.gif\" width=\"460\" height=\"1\" alt=\"\" /></td>";
   t_srchSpread += "\n     <td width=\"10\"><img src=\"images/c.gif\" width=\"5\" height=\"1\" alt=\"\" /></td>";
   t_srchSpread += "\n     <td width=\"102\"><img src=\"images/c.gif\" width=\"102\" height=\"1\" alt=\"\" /></td>";
   t_srchSpread += "\n     <td width=\"40\"><img src=\"images/c.gif\" width=\"40\" height=\"1\" alt=\"\" /></td>";
   t_srchSpread += "\n     <td width=\"66\"><img src=\"images/c.gif\" width=\"66\" height=\"1\" alt=\"\" /></td>";
   t_srchSpread += "\n   </tr>";
 
   t_srchSpread += "\n   <tr>";
   t_srchSpread += "\n     <td style=\"border-bottom:solid 1px #000000; border-top:solid 1px #000000\" align=\"center\" class=\"v14-header-1\"><span class=\"black9b\"><img src=\"images/c.gif\" width=\"10\" height=\"20\" alt=\"\" /></td>";
   t_srchSpread += "\n     <td style=\"border-bottom:solid 1px #000000; border-top:solid 1px #000000\" align=\"center\" class=\"v14-header-1\"><span class=\"black9b\">Title, Description, and Author(s)</span></td>";
   t_srchSpread += "\n     <td style=\"border-bottom:solid 1px #000000; border-top:solid 1px #000000\" align=\"center\" class=\"v14-header-1\"><span class=\"black9b\"><img src=\"images/c.gif\" width=\"10\" height=\"20\" alt=\"\" /></td>";
   t_srchSpread += "\n     <td style=\"border-bottom:solid 1px #000000; border-top:solid 1px #000000\" align=\"center\" class=\"v14-header-1\"><span class=\"black9b\">Category</span></td>";
   t_srchSpread += "\n     <td style=\"border-bottom:solid 1px #000000; border-top:solid 1px #000000\" align=\"center\" class=\"v14-header-1\"><span class=\"black9b\">Price</span></td>";
   t_srchSpread += "\n     <td style=\"border-bottom:solid 1px #000000; border-top:solid 1px #000000\" align=\"center\" class=\"v14-header-1\"><span class=\"black9b\">Buy Now</span></td>";
   t_srchSpread += "\n   </tr>";
     
   for (i=0; i < t_prodInfo.length; i++)
   {    
     var t_rec = t_prodInfo[i].split('|');  
     
     var t_shading = "";
     var t_style = "";
     
     t_srchSpread += "\n   <tr>";
     t_srchSpread += "\n     <td style=\"border-bottom:solid 1px #dddddd\" align=\"left\" valign=\"middle\" class=\"" + t_shading + "\" align=\"center\"><span class=\"black10\"><img src=\"images/" + t_rec[13] + "\" align=\"center\" alt=\"\" /></td>";
     t_srchSpread += "\n     <td style=\"border-bottom:solid 1px #dddddd\" align=\"left\" valign=\"middle\" class=\"" + t_shading + "\"><span class=\"black10\"><b>" + t_rec[7] + "</b><br /><br />" + t_rec[9] + "<br /><br /><i>" + t_rec[10] + "</i></span></td>";    
     t_srchSpread += "\n     <td style=\"border-bottom:solid 1px #dddddd\" align=\"left\" valign=\"middle\" class=\"" + t_shading + "\"><img src=\"images/c.gif\" width=\"10\" height=\"20\" alt=\"\" /></td>";
     t_srchSpread += "\n     <td style=\"border-bottom:solid 1px #dddddd\" align=\"left\" valign=\"middle\" class=\"" + t_shading + "\"><span class=\"black10\">" + t_rec[0] + "</span></td>";
     t_srchSpread += "\n     <td style=\"border-bottom:solid 1px #dddddd\" align=\"left\" valign=\"middle\" class=\"" + t_shading + "\"><span class=\"black10\">" + t_rec[12] + "</span></td>";
     t_srchSpread += "\n     <td style=\"border-bottom:solid 1px #dddddd\" align=\"center\" valign=\"middle\" class=\"" + t_shading + "\"><span class=\"black10\"><a href=\"" + t_rec[5] + "\" target=\"_blank\"><img src=\"images/sout.gif\" width=\"16\" height=\"16\" alt=\"\" /><br />Buy Now</a></span></td>";
     t_srchSpread += "\n   </tr>";
     
     t_srchSpread += "\n   <tr>";
     t_srchSpread += "\n     <td colspan=\"6\" style=\"border-bottom:solid 1px #dddddd\" align=\"left\" valign=\"middle\" class=\"" + t_shading + "\"><img src=\"images/c.gif\" width=\"10\" height=\"20\" alt=\"\" /></td>";
     t_srchSpread += "\n   </tr>";     
 
   }
     
   t_srchSpread += "\n</table>";
   
  t_srchSpread += "\n  <!-- CONTENT ENDS HERE -->";
  t_srchSpread += "\n </td>";
 
  t_srchSpread += "\n <td id=\"right-nav\" width=\"150\">";
 
  t_srchSpread += "\n 	<br>";
  t_srchSpread += "\n       <!--	End content -->";
  t_srchSpread += "\n      <!-- Begin Mobular Technologies content - DO NOT modify this section -->";
  t_srchSpread += "\n     </td>";
  t_srchSpread += "\n  </tr>";
  t_srchSpread += "\n   </table>";

  
  var sr_showMatch = this.ctnt[5];
  var sr_showMatchItem = this.ctnt[13];  
  
  this.ctnt[5] = "SHOWMATCHRESULTS";
  this.ctnt[13] = t_srchSpread;
     
  // Set up a dummy result set
  var dummy = new Array("0");
  this.results = dummy;
  this.showMatch(0,0);
  
  this.ctnt[5] = sr_showMatch;
  this.ctnt[13] = sr_showMatchItem;

}


function sortArray(input_array, field, column_type)
{    
  
  var t_array = input_array;

  var begS = new Date();	
  var fields_2 = new Array();
  var fields_1 = new Array();

  // Push the array element to the front with a special
  // delimiter '}{' and sort in place
  
  for (var j = 0; j < (t_array.length); j++) 
  {
    var fields_1 = t_array[j].split('|');
    var item1   = new String (fields_1[ field ]);

    // If it's a price, ensure you are sorting numeric values by
    // ensuring that the numerical values line up.  
    //
    // DKR Note:  This is the way it was done for PCD and 
    // its simply reused here.  I am not sure if this is the optimal
    // way to do it, but I am not going to take the time in building
    // this demo software to research a better way.  In a production world,
    // this may need to be reconsidered.
		    
    if (column_type == 2)
    {
		    
      var dotLoc = item1.indexOf(".");
      
      // If there is no decimal place because its a whole dollar value, then
      // add the decimal places and reevaluate dotLoc.
      if (dotLoc < 0) {item1 = item1 + ".00"; dotLoc = item1.indexOf(".");}
      
      var addDots = 6 - dotLoc;
      if (addDots < 0)
      {
        addDots = 0;
      }

      for (var dotCount = 0; dotCount <= addDots; dotCount++)
      {
        item1 = "0" + item1;
      }	
		    
      dotLoc = item1.indexOf(".");
      item1 = item1.substring(0,dotLoc + 3);

    }	    
    else
    {
      item1 = item1.toLowerCase();
    }


    // Add temporary front field
    var tmp = item1 + '}{' + t_array[j];
    fields_2[j] = tmp;
        
  }
  	
  // Use built-in quick sort; log-linear, not quadratic
  fields_2.sort();
  if (column_type == 2) { fields_2.reverse(); }
		
  // Swap back the starting array in sorted order on the element
  for (var j = 0; j < (fields_2.length); j++) 
  {
    fields_1 = fields_2[j].split('}{');
    t_array[j] = fields_1[1];			
  }

  // benchmark timer
  //var t3= (new Date()).getTime();	
  //alert((t3-t1)/1000 + " milliseconds to print:  quick-sorted");    

  this.pageStart = 1;
  this.pageEnd = 10;

  // Call show match function to display the sorted result
  var endS    = new Date();
  var elapsed = (endS.valueOf() - begS.valueOf()) / 1000; 
  
  input_array = t_array;
      
}

function copyArray(fromarray, toarray) {

  for (i=0; i<fromarray.length; i++)
  {
    toarray[i] = fromarray[i];
  }
  
}

//-----------------------------------------------------------------------------
// End - Spider development utilities
//-----------------------------------------------------------------------------


//-----------------------------------------------------------------------------
// Back button functions
//
// This section of code contains the support functions for the "back" button
// (and forward for that matter) capability within the e-catalog.  
//
//-----------------------------------------------------------------------------


function I2U_addAction (function_call)
{

  if (function_call != this.g_Actions[this.g_Actions.length - 1])
  {
  
    //this.showActionStack ('Action added: ' + function_call + '\n\nAction stack: \n'); 

    if (! g_walkingActionStack)
    {
      // If you are not walking through the action stack with the forward and back buttons,
      // meaning you have a new action, clear out anything in the action stack below where
      // you are, and then add the new action below the current position.
      for (i = this.g_Actions.length-1; i > g_lastAction; i--)
      {
        this.g_Actions.pop();
      }
      
      this.g_Actions[this.g_Actions.length] = function_call; 
      g_lastAction = this.g_Actions.length - 1;
    }
    
  }
    
  //this.showActionStack ('Action added: ' + function_call + '\n\nAction stack: \n'); 

}

// Performs the "back" functionality
function I2U_goBack(n) {

  //this.showActionStack ('Before back executes...');

  if (this.g_Actions.length > 1 && g_lastAction > 0)
  {  
    this.executeAction(g_lastAction - 1);
  }
  
}


// Performs the "forward" functionality
function I2U_goForward(n) {

  //this.showActionStack ('Before forward executes...');

  if (g_lastAction < this.g_Actions.length - 1)
  {  
    this.executeAction(g_lastAction + 1);
  }
  
}


function I2U_executeAction(n) {
  
  g_walkingActionStack = true;
  
  g_lastAction = n;
  eval(this.g_Actions[n]);
  
  g_walkingActionStack = false;  
  
}


// For debug purposes, show the action stack with a string header passed in
// for easy of tracking where you are in the code.
function I2U_showActionStack(str) {

  var t_actionstack = str + "\n";
  for (i=0; i<=this.g_Actions.length-1; i++)
  {
    t_actionstack += i + " - " + this.g_Actions[i] + "\n";
  }
  
  t_actionstack += "\nLast action: " + g_lastAction;
  
  alert (t_actionstack);

}

//-----------------------------------------------------------------------------
// End - Back button functions
//-----------------------------------------------------------------------------


















































































































































































































































































































































































































































































































































































































var g_detail = "";
    g_detail += "\n <!-- Begin Mobular Technologies content - DO NOT modify this section -->";
    g_detail += "\n ";
    g_detail += "\n <table id=\"v14-body-table\" width=\"760\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\">";
    g_detail += "\n ";
    g_detail += "\n <!--	Begin breadcrumb -->";
    g_detail += "\n <table width=\"600\" cellspacing=\"0\" cellpadding=\"0\">";
    g_detail += "\n   <tr>";
    g_detail += "\n     <td width=\"550\" valign=\"middle\" height=\"23\">";
    g_detail += "\n       <img src=\"images/c.gif\" width=\"7\" height=\"1\" alt=\"\" />";
    g_detail += "\n       [[NAVBAR]]";
    g_detail += "\n     </td>";
    g_detail += "\n     <td width=\"40\" valign=\"middle\" align=\"right\">";
    g_detail += "\n       <!-- Begin actionStackNav --><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td valign=\"bottom\"> <img alt=\"Back\" height=\"16\" src=\"images/bk_bold_gray.gif\" width=\"16\"/> </td> <td valign=\"top\"> <span class=\"bct\" style=\"text-decoration:none; color:#dddddd;\"><b>Back</b></span> </td> <td valign=\"top\">  <span class=\"bct\" style=\"text-decoration:none; font-size:11\"><!-- End actionStackNav -->";
    g_detail += "\n     </td>";
    g_detail += "\n     <td>";
    g_detail += "\n       <img src=\"images/c.gif\" width=\"10\" height=\"1\" alt=\"\" />";
    g_detail += "\n     </td>";
    g_detail += "\n   </tr>";
    g_detail += "\n </table>";
    g_detail += "\n <!--	End breadcrumb -->";
    g_detail += "\n ";
    g_detail += "\n <!-- End Mobular Technologies content -->";
    g_detail += "\n ";
    g_detail += "\n <!--	Begin content -->";
    g_detail += "\n ";
    g_detail += "\n <table width=\"600\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"  id=\"content-table\">";
    g_detail += "\n 	<tr><td colspan=\"3\"><img src=\"images/c.gif\" width=\"1\" height=\"7\" alt=\"\" /></td></tr>";
    g_detail += "\n 	<tr valign=\"top\">";
    g_detail += "\n 		<td width=\"10\"><img src=\"images/c.gif\" width=\"10\" height=\"1\" alt=\"\" /></td>";
    g_detail += "\n 		<td width=\"581\" valign=\"top\"><h1>[[col7]]</h1></td>";
    g_detail += "\n 		<td width=\"9\"><img src=\"images/c.gif\" width=\"9\" height=\"1\" alt=\"\" /></td>";
    g_detail += "\n 	</tr>";
    g_detail += "\n 	<tr><td colspan=\"3\"><img src=\"images/c.gif\" width=\"10\" height=\"1\" alt=\"\" />[[col10]]<br/><br/></td></tr>";
    g_detail += "\n 	<tr valign=\"top\">";
    g_detail += "\n 		<td width=\"10\"><img src=\"images/c.gif\" width=\"10\" height=\"1\" alt=\"\" /></td>";
    g_detail += "\n 		<td width=\"581\" valign=\"top\">[[col26]]</td>";
    g_detail += "\n 		<td width=\"9\"><img src=\"images/c.gif\" width=\"9\" height=\"1\" alt=\"\" /></td>";
    g_detail += "\n 	</tr>";
    g_detail += "\n ";
    g_detail += "\n 	<tr><td colspan=\"3\"><img src=\"images/c.gif\" width=\"1\" height=\"20\" alt=\"\" /></td></tr>";
    g_detail += "\n ";
    g_detail += "\n 	<tr><td colspan=\"3\"><img src=\"images/dotted.gif\" width=\"600\" height=\"1\" alt=\"\" /></td></tr>";
    g_detail += "\n 	<tr><td colspan=\"3\"><img src=\"images/c.gif\" width=\"1\" height=\"5\" alt=\"\" /></td></tr>";
    g_detail += "\n ";
    g_detail += "\n 	<tr valign=\"top\">";
    g_detail += "\n 		<td width=\"10\"><img src=\"images/c.gif\" width=\"10\" height=\"1\" alt=\"\" /></td>";
    g_detail += "\n 		<td width=\"581\" valign=\"top\">";
    g_detail += "\n 			<table width=\"581\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
    g_detail += "\n 				<tr>";
    g_detail += "\n 					<td width=\"16\"><img alt=\"\" height=\"16\" src=\"images/printer.gif\" width=\"16\"/></td>";
    g_detail += "\n 					<td width=\"202\" align=\"left\"><b><a class=\"fbox\" href=\"index.html\" onclick=\"eengine.printDetail('[[col2]]');return false;\">Print this page</a></b></td>";
    g_detail += "\n 					<td width=\"7\">&nbsp;</td>";
    g_detail += "\n                     <td width=\"16\"><img alt=\"\" height=\"16\" src=\"images/sout.gif\" width=\"16\"/></td>";
    g_detail += "\n                     <td width=\"202\" align=\"left\"><b><a class=\"fbox\" href=\"#\" onclick=\"eengine.doClickThrough2('[[col5]]',800,600,1);\">Buy Now</a></b></td>";
    g_detail += "\n 				</tr>";
    g_detail += "\n 			</table>";
    g_detail += "\n 		</td>";
    g_detail += "\n 		<td width=\"9\"><img src=\"images/c.gif\" width=\"9\" height=\"1\" alt=\"\" /></td>";
    g_detail += "\n 	</tr>";
    g_detail += "\n ";
    g_detail += "\n </table>";
    g_detail += "\n ";
    g_detail += "\n <!--	End content -->";
    g_detail += "\n ";
    g_detail += "\n <!-- Begin Mobular Technologies content - DO NOT modify this section -->";
    g_detail += "\n ";
    g_detail += "\n </td>";
    g_detail += "\n ";
    g_detail += "\n <td class=\"dotted\"><img src=\"images/c.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>";
    g_detail += "\n <td width=\"9\"><img src=\"images/c.gif\" width=\"9\" height=\"1\" alt=\"\" /></td>";
    g_detail += "\n <td valign=\"top\" width=\"150\" id=\"right-nav\">";
    g_detail += "\n <!--	BEGIN GLOBAL SECTION OF RIGHT COLUMN -->";
    g_detail += "\n <!-- Begin \"We're here to help\" table here -->";
    g_detail += "\n ";
    g_detail += "\n [[GLOBAL_RC]]";
    g_detail += "\n ";
    g_detail += "\n <!--	END GLOBAL SECTION OF RIGHT COLUMN -->";
    g_detail += "\n <!-- Begin Mobular Technologies content - DO NOT modify this section -->";
    g_detail += "\n <!--	BEGIN RIGHT COLUMN OFFERS -->";
    g_detail += "\n ";
    g_detail += "\n <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">[[RCOL]]</table>";
    g_detail += "\n ";
    g_detail += "\n <!--	END RIGHT COLUMN OFFERS -->";
    g_detail += "\n </td></tr></table>";
    g_detail += "\n ";
    g_detail += "\n <!-- End Mobular Technologies content -->";
    g_detail += "\n [[T_FOOT]]";

var g_printdetail = "";
    g_printdetail += "\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"581\">";
    g_printdetail += "\n   <tr>";
    g_printdetail += "\n     <td valign=\"top\" class=\"bbg\" width=\"55\"><img src=\"images/ibm-logo-small.gif\" width=\"55\" height=\"30\" border=\"0\" alt=\"IBM\"/></td>";
    g_printdetail += "\n     <td class=\"mbbg\" width=\"526\" valign=\"middle\" align=\"right\"><h1>[[col7]]</h1></td>";
    g_printdetail += "\n   </tr>";
    g_printdetail += "\n ";
    g_printdetail += "\n   <tr><td colspan=\"2\"><img src=\"images/c.gif\" width=\"1\" height=\"20\" alt=\"\" /></td></tr>";
    g_printdetail += "\n ";
    g_printdetail += "\n   <tr><td colspan=\"2\" width=\"581\" valign=\"top\">[[col26]]</td></tr>";
    g_printdetail += "\n ";
    g_printdetail += "\n </table>";

var g_prod_series = "";
    g_prod_series += "\n <!-- Begin Mobular Technologies content - DO NOT modify this section -->";
    g_prod_series += "\n ";
    g_prod_series += "\n <table id=\"v14-body-table\" width=\"760\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\">";
    g_prod_series += "\n ";
    g_prod_series += "\n <!--	Begin breadcrumb -->";
    g_prod_series += "\n <table width=\"600\" cellspacing=\"0\" cellpadding=\"0\">";
    g_prod_series += "\n   <tr>";
    g_prod_series += "\n     <td width=\"550\" valign=\"middle\" height=\"23\">";
    g_prod_series += "\n       <img src=\"images/c.gif\" width=\"7\" height=\"1\" alt=\"\" />";
    g_prod_series += "\n       [[NAVBAR]]";
    g_prod_series += "\n     </td>";
    g_prod_series += "\n     <td width=\"40\" valign=\"middle\" align=\"right\">";
    g_prod_series += "\n       <!-- Begin actionStackNav --><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td valign=\"bottom\"> <img alt=\"Back\" height=\"16\" src=\"images/bk_bold_gray.gif\" width=\"16\"/> </td> <td valign=\"top\"> <span class=\"bct\" style=\"text-decoration:none; color:#dddddd;\"><b>Back</b></span> </td> <td valign=\"top\">  <span class=\"bct\" style=\"text-decoration:none; font-size:11\"><!-- End actionStackNav -->";
    g_prod_series += "\n     </td>";
    g_prod_series += "\n     <td>";
    g_prod_series += "\n       <img src=\"images/c.gif\" width=\"10\" height=\"1\" alt=\"\" />";
    g_prod_series += "\n     </td>";
    g_prod_series += "\n   </tr>";
    g_prod_series += "\n </table>";
    g_prod_series += "\n <!--	End breadcrumb -->";
    g_prod_series += "\n ";
    g_prod_series += "\n <!-- End Mobular Technologies content -->";
    g_prod_series += "\n ";
    g_prod_series += "\n <!-- Begin content -->";
    g_prod_series += "\n ";
    g_prod_series += "\n <table width=\"600\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"  id=\"content-table\">";
    g_prod_series += "\n   <tr><td colspan=\"3\"><img src=\"images/c.gif\" width=\"1\" height=\"7\" alt=\"\" /></td></tr>";
    g_prod_series += "\n   <tr valign=\"top\">";
    g_prod_series += "\n     <td width=\"10\"><img src=\"images/c.gif\" width=\"10\" height=\"1\" alt=\"\" /></td>";
    g_prod_series += "\n     <td width=\"581\">";
    g_prod_series += "\n       <table width=\"581\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
    g_prod_series += "\n         <tr> <td width=\"581\" ><img src=\"images/c.gif\" width=\"1\" height=\"10\" alt=\"\" /></td> </tr>";
    g_prod_series += "\n ";
    g_prod_series += "\n         <h1>[[col0]]</h1><br/><br/>";
    g_prod_series += "\n ";
    g_prod_series += "\n [[lbl=<p>The IBM Press developerWorks Series represents a unique undertaking in which print books and the Web are mutually supportive. The publications in this series are complemented by resources on the developerWorks web site, which both support and extend your experience. These materials include articles, tutorials, forums, software, and other materials available through the developerWorks technical library. Icons in the printed books alert you to links to assets on developerWorks that relate to the specific point in the text. A summary of links appear at the end of each chapter. Additionally, you will be able to obtain access to an electronic file of all the links through this page. Other developerWorks Web materials related to the books will reference developerWorks Series publications.</p>|col0|=='developerWorks Series'|]]";
    g_prod_series += "\n ";
    g_prod_series += "\n         <tr> <td width=\"581\" class=\"tdblue\" height=\"1\" ><img src=\"images/c.gif\" width=\"1\" height=\"1\" alt=\"\" /></td> </tr>";
    g_prod_series += "\n         <tr>";
    g_prod_series += "\n           <td width=\"581\" height=\"18\" >";
    g_prod_series += "\n             <span class=\"sbold\"> [[itm_shwn]]</span>";
    g_prod_series += "\n             <span class=\"sreg\"> of </span><span class=\"sbold\">[[itm_fnd]]</span>";
    g_prod_series += "\n             <span class=\"sreg\"> results";
    g_prod_series += "\n             <span class=\"sreg\">&nbsp;|&nbsp;</span>";
    g_prod_series += "\n             <span class=\"detl\">[[sNav]]</span>";
    g_prod_series += "\n           </td>";
    g_prod_series += "\n         </tr>";
    g_prod_series += "\n         <tr> <td width=\"581\" class=\"lgray\" height=\"1\" ><img src=\"images/c.gif\" width=\"1\" height=\"1\" alt=\"\" /></td> </tr>";
    g_prod_series += "\n         <tr> <td width=\"581\" ><img src=\"images/c.gif\" width=\"1\" height=\"5\" alt=\"\" /></td> </tr>";
    g_prod_series += "\n         <tr> <td width=\"581\" ><img src=\"images/c.gif\" width=\"1\" height=\"5\" alt=\"\" /></td> </tr>";
    g_prod_series += "\n         <tr>";
    g_prod_series += "\n           <td width=\"581\" height=\"10\" >";
    g_prod_series += "\n             <table width=\"581\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
    g_prod_series += "\n               SHOWMATCHRESULTS";
    g_prod_series += "\n             </table>";
    g_prod_series += "\n           </td>";
    g_prod_series += "\n         </tr>";
    g_prod_series += "\n         <tr> <td width=\"581\" ><img src=\"images/c.gif\" width=\"1\" height=\"10\" alt=\"\" /></td> </tr>";
    g_prod_series += "\n         <tr> <td width=\"581\" class=\"tdblue\" height=\"1\" ><img src=\"images/c.gif\" width=\"1\" height=\"1\" alt=\"\" /></td> </tr>";
    g_prod_series += "\n         <tr>";
    g_prod_series += "\n           <td width=\"581\" height=\"18\" >";
    g_prod_series += "\n             <span class=\"sbold\"> [[itm_shwn]]</span>";
    g_prod_series += "\n             <span class=\"sreg\"> of </span><span class=\"sbold\">[[itm_fnd]]</span>";
    g_prod_series += "\n             <span class=\"sreg\"> results";
    g_prod_series += "\n             <span class=\"sreg\">&nbsp;|&nbsp;</span>";
    g_prod_series += "\n             <span class=\"detl\">[[sNav]]</span>";
    g_prod_series += "\n           </td>";
    g_prod_series += "\n         </tr>";
    g_prod_series += "\n         <tr> <td width=\"581\" class=\"lgray\" height=\"1\" ><img src=\"images/c.gif\" width=\"1\" height=\"1\" alt=\"\" /></td> </tr>";
    g_prod_series += "\n         <tr> <td width=\"581\" ><img src=\"images/c.gif\" width=\"1\" height=\"5\" alt=\"\" /></td> </tr>";
    g_prod_series += "\n       </table>";
    g_prod_series += "\n     </td>";
    g_prod_series += "\n     <td width=\"9\"><img src=\"images/c.gif\" width=\"9\" height=\"1\" alt=\"\" /></td>";
    g_prod_series += "\n   </tr>";
    g_prod_series += "\n </table>";
    g_prod_series += "\n ";
    g_prod_series += "\n <!--	End content -->";
    g_prod_series += "\n ";
    g_prod_series += "\n <!-- Begin Mobular Technologies content - DO NOT modify this section -->";
    g_prod_series += "\n ";
    g_prod_series += "\n </td>";
    g_prod_series += "\n ";
    g_prod_series += "\n <td class=\"dotted\"><img src=\"images/c.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>";
    g_prod_series += "\n <td width=\"9\"><img src=\"images/c.gif\" width=\"9\" height=\"1\" alt=\"\" /></td>";
    g_prod_series += "\n <td valign=\"top\" width=\"150\" id=\"right-nav\">";
    g_prod_series += "\n <!--	BEGIN GLOBAL SECTION OF RIGHT COLUMN -->";
    g_prod_series += "\n <!-- Begin \"We're here to help\" table here -->";
    g_prod_series += "\n ";
    g_prod_series += "\n [[GLOBAL_RC]]";
    g_prod_series += "\n ";
    g_prod_series += "\n <!--	END GLOBAL SECTION OF RIGHT COLUMN -->";
    g_prod_series += "\n <!-- Begin Mobular Technologies content - DO NOT modify this section -->";
    g_prod_series += "\n <!--	BEGIN RIGHT COLUMN OFFERS -->";
    g_prod_series += "\n ";
    g_prod_series += "\n <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">[[RCOL]]</table>";
    g_prod_series += "\n ";
    g_prod_series += "\n <!--	END RIGHT COLUMN OFFERS -->";
    g_prod_series += "\n </td></tr></table>";
    g_prod_series += "\n ";
    g_prod_series += "\n <!-- End Mobular Technologies content -->";
    g_prod_series += "\n [[T_FOOT]]";

var g_prod_ser_detail = "";
    g_prod_ser_detail += "\n [[lbl=<tr><td width=\"10\"><img src=\"images/c.gif\" width=\"10\" /></td><td colspan=\"4\">[[col28]]<br /></td></tr><tr><td colspan=\"5\"></td></tr></b>|col28|!=' '|]]";
    g_prod_ser_detail += "\n ";
    g_prod_ser_detail += "\n <tr>";
    g_prod_ser_detail += "\n   <!--BeginRecord-->";
    g_prod_ser_detail += "\n   <!-- <td width=\"20\" valign=\"top\" align=\"left\"><b>[[sr_num]].</b></td> -->";
    g_prod_ser_detail += "\n   <td width=\"10\"><img src=\"images/c.gif\" width=\"10\" height=\"1\" alt=\"\" /></td>";
    g_prod_ser_detail += "\n ";
    g_prod_ser_detail += "\n ";
    g_prod_ser_detail += "\n ";
    g_prod_ser_detail += "\n   <td align=\"left\" valign=\"top\"><span class=\"black10\"><img src=\"images/[[col13]]\" align=\"left\" alt=\"\" width=\"61\" height=\"81\" />&nbsp;&nbsp;</td>";
    g_prod_ser_detail += "\n   <td align=\"left\" valign=\"top\"><span class=\"black10\"><b>[[col7]]</b><br /><br />[[col9]]";
    g_prod_ser_detail += "\n   [[lbl=<a href=\"index.html\" target=\"showFrame\" onclick=\"eengine.goDetail('[[col2]]'); return false;\" class=\"serieslink\">...<b>[[col25]]</b></a>|col25|=='More'|]]";
    g_prod_ser_detail += "\n   <br /><br /><i>[[col10]]</i></span></td>";
    g_prod_ser_detail += "\n   <!-- td width=\"549\" valign=\"top\" dir=\"ltr\"><a href=\"index.html\" target=\"showFrame\" onclick=\"eengine.goDetail('[[col2]]'); return false;\" class=\"serieslink\">[[col10]]</a></td -->";
    g_prod_ser_detail += "\n   <!--td align=\"left\" valign=\"top\"><span class=\"black10\">[[col0]]</span></td>";
    g_prod_ser_detail += "\n   <!--td align=\"left\" valign=\"top\"><span class=\"black10\">[[col12]]</span></td-->";
    g_prod_ser_detail += "\n   <td align=\"right\" valign=\"top\"><span class=\"black10\"><a href=\"#\" onclick=\"eengine.doClickThrough2('[[col5]]',800,600);\"><img src=\"images/sout.gif\" width=\"16\" height=\"16\" alt=\"\" /><br />Buy Now</a></span></td>";
    g_prod_ser_detail += "\n   <td width=\"10\"><img src=\"images/c.gif\" width=\"10\" height=\"1\" alt=\"\" /></td>";
    g_prod_ser_detail += "\n ";
    g_prod_ser_detail += "\n </tr>";
    g_prod_ser_detail += "\n <tr>";
    g_prod_ser_detail += "\n   <td width=\"10\"><img src=\"images/c.gif\" width=\"10\" height=\"1\" alt=\"\" /></td>";
    g_prod_ser_detail += "\n   <td colspan=\"4\" style=\"border-bottom:solid 1px #dddddd\"><img src=\"images/c.gif\" width=\"1\" height=\"8\" alt=\"\" /></td>";
    g_prod_ser_detail += "\n   <td width=\"10\"><img src=\"images/c.gif\" width=\"10\" height=\"1\" alt=\"\" /></td>";
    g_prod_ser_detail += "\n </tr>";

var g_feature = "";
    g_feature += "\n <!-- Begin Mobular Technologies content - DO NOT modify this section -->";
    g_feature += "\n ";
    g_feature += "\n <table  id=\"v14-body-table\" width=\"760\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\">";
    g_feature += "\n ";
    g_feature += "\n <!--	Begin breadcrumb -->";
    g_feature += "\n <table width=\"600\" cellspacing=\"0\" cellpadding=\"0\">";
    g_feature += "\n   <tr>";
    g_feature += "\n     <td width=\"550\" valign=\"middle\" height=\"23\">";
    g_feature += "\n       <img src=\"images/c.gif\" width=\"7\" height=\"1\" alt=\"\" />";
    g_feature += "\n       [[NAVBAR]]";
    g_feature += "\n     </td>";
    g_feature += "\n     <td width=\"40\" valign=\"middle\" align=\"right\">";
    g_feature += "\n       <!-- Begin actionStackNav --><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td valign=\"bottom\"> <img alt=\"Back\" height=\"16\" src=\"images/bk_bold_gray.gif\" width=\"16\"/> </td> <td valign=\"top\"> <span class=\"bct\" style=\"text-decoration:none; color:#dddddd;\"><b>Back</b></span> </td> <td valign=\"top\">  <span class=\"bct\" style=\"text-decoration:none; font-size:11\"><!-- End actionStackNav -->";
    g_feature += "\n     </td>";
    g_feature += "\n     <td>";
    g_feature += "\n       <img src=\"images/c.gif\" width=\"10\" height=\"1\" alt=\"\" />";
    g_feature += "\n     </td>";
    g_feature += "\n   </tr>";
    g_feature += "\n </table>";
    g_feature += "\n <!--	End breadcrumb -->";
    g_feature += "\n ";
    g_feature += "\n <!-- End Mobular Technologies content -->";
    g_feature += "\n ";
    g_feature += "\n <!-- Begin content -->";
    g_feature += "\n ";
    g_feature += "\n <table  id=\"content-table\" width=\"600\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
    g_feature += "\n ";
    g_feature += "\n   <tr><td colspan=\"4\"><img src=\"images/c.gif\" width=\"1\" height=\"7\" alt=\"\" /></td></tr>";
    g_feature += "\n ";
    g_feature += "\n   <tr valign=\"top\">";
    g_feature += "\n     <td rowspan=\"99\" width=\"10\"><img src=\"images/c.gif\" width=\"10\" height=\"1\" alt=\"\" /></td>";
    g_feature += "\n     <td  colspan=\"3\"><span class=\"big-hl1b\">Recently Published</span></td>";
    g_feature += "\n   </tr>";
    g_feature += "\n ";
    g_feature += "\n   <tr valign=\"top\">";
    g_feature += "\n     <td  colspan=\"4\">&nbsp;</td>";
    g_feature += "\n   </tr>";
    g_feature += "\n ";
    g_feature += "\n   <tr>";
    g_feature += "\n     <td colspan=\"4\" height=\"1\" class=\"bbg\"><img src=\"images/c.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>";
    g_feature += "\n   </tr>";
    g_feature += "\n ";
    g_feature += "\n   <tr valign=\"top\">";
    g_feature += "\n     <td  colspan=\"4\">&nbsp;</td>";
    g_feature += "\n   </tr>";
    g_feature += "\n ";
    g_feature += "\n   <tr><td colspan=\"4\"><img src=\"images/c.gif\" width=\"1\" height=\"7\" alt=\"\" /></td></tr>";
    g_feature += "\n ";
    g_feature += "\n   <tr>";
    g_feature += "\n     <td colspan=\"4\">";
    g_feature += "\n       <table width=\"590\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td>";
    g_feature += "\n ";
    g_feature += "\n         SHOWMATCHRESULTS";
    g_feature += "\n ";
    g_feature += "\n       </td></tr></table>";
    g_feature += "\n     </td>";
    g_feature += "\n   </tr>";
    g_feature += "\n </table>";
    g_feature += "\n ";
    g_feature += "\n <!-- End content -->";
    g_feature += "\n ";
    g_feature += "\n <!-- Begin Mobular Technologies content - DO NOT modify this section -->";
    g_feature += "\n ";
    g_feature += "\n </td>";
    g_feature += "\n <td class=\"dotted\"><img src=\"images/c.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>";
    g_feature += "\n <td width=\"9\"><img src=\"images/c.gif\" width=\"9\" height=\"1\" alt=\"\" /></td>";
    g_feature += "\n <td valign=\"top\" width=\"150\" id=\"right-nav\">";
    g_feature += "\n <!--	BEGIN GLOBAL SECTION OF RIGHT COLUMN -->";
    g_feature += "\n <!-- Begin \"We're here to help\" table here -->";
    g_feature += "\n ";
    g_feature += "\n [[GLOBAL_RC]]";
    g_feature += "\n ";
    g_feature += "\n <!--	END GLOBAL SECTION OF RIGHT COLUMN -->";
    g_feature += "\n <!-- Begin Mobular Technologies content - DO NOT modify this section -->";
    g_feature += "\n <!--	BEGIN RIGHT COLUMN OFFERS -->";
    g_feature += "\n <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">[[RCOL]]</table>";
    g_feature += "\n <!--	END RIGHT COLUMN OFFERS -->";
    g_feature += "\n </td></tr></table>";
    g_feature += "\n ";
    g_feature += "\n <!-- End Mobular Technologies content -->";
    g_feature += "\n [[T_FOOT]]";

var g_feature_detail = "";
    g_feature_detail += "\n <!-- Begin file header - DO NOT modify this line";
    g_feature_detail += "\n ";
    g_feature_detail += "\n  		Input file:				featurespread.html";
    g_feature_detail += "\n 		Output file: 			boltOn.js";
    g_feature_detail += "\n 		Display template:		g_feature_detail";
    g_feature_detail += "\n ";
    g_feature_detail += "\n 		Description:";
    g_feature_detail += "\n 		Display template for individual featured offer instances on the featured offers page.  This";
    g_feature_detail += "\n 		template is wrapped by the g_feature (showfeatures.html) template.";
    g_feature_detail += "\n ";
    g_feature_detail += "\n 		Revision history:";
    g_feature_detail += "\n 		DKR/2005-05-08 - Pulled template from boltOn to create this file.  No modifications made.";
    g_feature_detail += "\n ";
    g_feature_detail += "\n 		Note:";
    g_feature_detail += "\n 		This header, to be be used for documentation purposes, will be removed at build time";
    g_feature_detail += "\n 		before the template is put into its destination file.";
    g_feature_detail += "\n ";
    g_feature_detail += "\n End file header - DO NOT modify this line -->";
    g_feature_detail += "\n ";
    g_feature_detail += "\n <tr>";
    g_feature_detail += "\n   <td width=\"600\" bgcolor=\"#ffffff\" valign=\"top\">";
    g_feature_detail += "\n ";
    g_feature_detail += "\n     <span class=\"subtitle\"><b>[[col7]]</b></span><br />";
    g_feature_detail += "\n     [[lbl=<span class=\"subtitle\"><i>[[col8]]</i></span><br /><br />|col8|!= ' '| ]]";
    g_feature_detail += "\n ";
    g_feature_detail += "\n     <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">";
    g_feature_detail += "\n       <tr>";
    g_feature_detail += "\n 	    <td valign=\"top\">";
    g_feature_detail += "\n  	      [[lbl=<img src=\"images/[[col3]]\" alt=\"[[col4]]\" width=\"[[col5]]\" height=\"[[col6]]\"><br /><img src=\"images/c.gif\" alt=\"\" width=\"220\" height=\"1\"></td><td><img src=\"images/c.gif\" alt=\"\" width=\"10\" height=\"1\"></td><td valign=\"top\">|col3|!= ' '| ]]";
    g_feature_detail += "\n           [[col9]]";
    g_feature_detail += "\n         </td>";
    g_feature_detail += "\n         <td><img src=\"images/c.gif\" alt=\"\" width=\"10\" height=\"1\"></td>";
    g_feature_detail += "\n       </tr>";
    g_feature_detail += "\n     </table>";
    g_feature_detail += "\n ";
    g_feature_detail += "\n ";
    g_feature_detail += "\n   </td>";
    g_feature_detail += "\n ";
    g_feature_detail += "\n </tr>";
    g_feature_detail += "\n <!-- deleted the colspan 4, 4, 6 and 6 -->";
    g_feature_detail += "\n <tr><td><img src=\"images/c.gif\" width=\"1\" height=\"20\" alt=\"\" /></td></tr>";
    g_feature_detail += "\n <tr><td class=\"dotted\"><img src=\"images/c.gif\" width=\"1\" height=\"1\" alt=\"\" /></td></tr>";
    g_feature_detail += "\n <tr><td><img src=\"images/c.gif\" width=\"1\" height=\"20\" alt=\"\" /></td></tr>";

var g_global_rc = "";
    g_global_rc += "\n <!--	BEGIN GLOBAL SECTION OF RIGHT COLUMN -->";
    g_global_rc += "\n      <!-- Begin \"We're here to help\" table here -->";
    g_global_rc += "\n      <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"150\">";
    g_global_rc += "\n ";
    g_global_rc += "\n        <tbody><tr>";
    g_global_rc += "\n          <td valign=\"top\"><img src=\"images/c.gif\" alt=\"\" border=\"0\" height=\"6\" width=\"1\"></td>";
    g_global_rc += "\n ";
    g_global_rc += "\n        </tr>";
    g_global_rc += "\n ";
    g_global_rc += "\n        <tr>";
    g_global_rc += "\n          <td class=\"v14-header-1-small\">We're here to help</td>";
    g_global_rc += "\n        </tr>";
    g_global_rc += "\n ";
    g_global_rc += "\n        <tr>";
    g_global_rc += "\n          <td>";
    g_global_rc += "\n       	  <table class=\"v14-gray-table-border\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
    g_global_rc += "\n ";
    g_global_rc += "\n      	    <tbody><tr>";
    g_global_rc += "\n ";
    g_global_rc += "\n      		  <td class=\"no-padding\" width=\"150\">";
    g_global_rc += "\n      		    <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"148\">";
    g_global_rc += "\n                    <tbody><tr valign=\"top\">";
    g_global_rc += "\n                      <td class=\"iltbp\"><img src=\"images/face.gif\" alt=\"\" height=\"36\" width=\"36\"></td>";
    g_global_rc += "\n                      <td class=\"espl\"><p class=\"smgraytext\">Easy ways to get the answers you need</p></td>";
    g_global_rc += "\n                    </tr>";
    g_global_rc += "\n                  </tbody></table>";
    g_global_rc += "\n                </td>";
    g_global_rc += "\n ";
    g_global_rc += "\n              </tr>";
    g_global_rc += "\n ";
    g_global_rc += "\n              <tr>";
    g_global_rc += "\n                <td>";
    g_global_rc += "\n                  <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
    g_global_rc += "\n                    <tbody><tr valign=\"top\">";
    g_global_rc += "\n                      <td><img src=\"images/email_rd.gif\" alt=\"\" height=\"21\" width=\"21\"></td>";
    g_global_rc += "\n                      <td class=\"spl ipt\">";
    g_global_rc += "\n                        <b>";
    g_global_rc += "\n                          <a href=\"mailto:ibmpub@us.ibm.com\" class=\"smallplainlink\">";
    g_global_rc += "\n                            Email now";
    g_global_rc += "\n                          </a>";
    g_global_rc += "\n                        </b>";
    g_global_rc += "\n                      </td>";
    g_global_rc += "\n                    </tr>";
    g_global_rc += "\n                  </tbody></table>";
    g_global_rc += "\n                </td>";
    g_global_rc += "\n              </tr>";
    g_global_rc += "\n ";
    g_global_rc += "\n              <tr><td><img src=\"images/c.gif\" alt=\"\" height=\"7\" width=\"1\"></td></tr>";
    g_global_rc += "\n ";
    g_global_rc += "\n              <tr><td class=\"lgray\"><img src=\"images/c.gif\" alt=\"\" height=\"1\" width=\"1\"></td></tr>";
    g_global_rc += "\n            </tbody></table>";
    g_global_rc += "\n          </td>";
    g_global_rc += "\n        </tr>";
    g_global_rc += "\n      </tbody></table>";
    g_global_rc += "\n ";
    g_global_rc += "\n <br />";
    g_global_rc += "\n ";
    g_global_rc += "\n <!-- Start of promotion box -->";
    g_global_rc += "\n ";
    g_global_rc += "\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"150\">";
    g_global_rc += "\n   <tr>";
    g_global_rc += "\n     <td class=\"v14-header-2-small\">Stay Informed</td>";
    g_global_rc += "\n   </tr>";
    g_global_rc += "\n   <tr>";
    g_global_rc += "\n     <td><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"v14-gray-table-border\">";
    g_global_rc += "\n         <tr>";
    g_global_rc += "\n           <td class=\"no-padding\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"148\">";
    g_global_rc += "\n               <tr valign=\"top\">";
    g_global_rc += "\n                 <td align=\"right\" width=\"18\" class=\"ipt\">&nbsp;</td>";
    g_global_rc += "\n                 <td width=\"130\" class=\"npl\"><p>Subscribe to the IBM Press newsletter to be the first to learn about our newest releases.</p></td>";
    g_global_rc += "\n               </tr>";
    g_global_rc += "\n             </table></td>";
    g_global_rc += "\n         </tr>";
    g_global_rc += "\n         <tr>";
    g_global_rc += "\n           <td class=\"dotted\"><img src=\"images/c.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>";
    g_global_rc += "\n         </tr>";
    g_global_rc += "\n         <tr>";
    g_global_rc += "\n           <td class=\"no-padding\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"148\">";
    g_global_rc += "\n               <tr valign=\"top\">";
    g_global_rc += "\n                 <td align=\"right\" width=\"18\" class=\"ipt\"><img src=\"images/dn.gif\" width=\"16\" height=\"16\" alt=\"\" border=\"0\" /></td>";
    g_global_rc += "\n                 <!--td width=\"130\" class=\"npl\"><p><a href=\"http://www.ibmpressbooks.com/newsletters/index.asp\" onclick=\"eengine.doClickThrough2('http://www.ibmpressbooks.com/newsletters/index.asp',800,600,2)\" class=\"smallplainlink\">Subscribe to IBM Press books</a></p></td-->";
    g_global_rc += "\n                 <td width=\"130\" class=\"npl\"><p><a href=\"http://www.ibmpressbooks.com/newsletters/index.asp\" onclick=\"eengine.doClickThrough2('http://www.ibmpressbooks.com/newsletters/index.asp',800,600,2)\" class=\"smallplainlink\">Subscribe</a></p></td>";
    g_global_rc += "\n               </tr>";
    g_global_rc += "\n             </table></td>";
    g_global_rc += "\n         </tr>";
    g_global_rc += "\n       </table></td>";
    g_global_rc += "\n   </tr>";
    g_global_rc += "\n </table>";
    g_global_rc += "\n ";
    g_global_rc += "\n <br/>";
    g_global_rc += "\n ";
    g_global_rc += "\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"150\">";
    g_global_rc += "\n   <tr>";
    g_global_rc += "\n     <td class=\"v14-header-2-small\">Tools</td>";
    g_global_rc += "\n   </tr>";
    g_global_rc += "\n    <tr>";
    g_global_rc += "\n     <td><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"v14-gray-table-border\">";
    g_global_rc += "\n         <!--tr>";
    g_global_rc += "\n           <td class=\"no-padding\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"148\">";
    g_global_rc += "\n               						<tr valign=\"top\">";
    g_global_rc += "\n                 						<td align=\"right\" width=\"18\" class=\"ipt\"><img src=\"images/fw_bold.gif\" width=\"16\" height=\"16\" alt=\"\" border=\"0\" /></td>";
    g_global_rc += "\n                 						<td width=\"130\" class=\"npl\"><p><a href=\"index.html\" onclick=\"if(total_load==1){eengine.showFeaturedOffers('*')}else{alert(loadWarn)} return false;\" class=\"smallplainlink\">Recently Published</a></p></td>";
    g_global_rc += "\n               						</tr>";
    g_global_rc += "\n          							</table>";
    g_global_rc += "\n           </td>";
    g_global_rc += "\n         </tr-->";
    g_global_rc += "\n ";
    g_global_rc += "\n         <tr>";
    g_global_rc += "\n           <td class=\"dotted\"><img src=\"images/c.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>";
    g_global_rc += "\n         </tr>";
    g_global_rc += "\n        <tr>";
    g_global_rc += "\n           <td class=\"no-padding\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"148\">";
    g_global_rc += "\n               <tr valign=\"top\">";
    g_global_rc += "\n                 <!--td align=\"right\" width=\"18\" class=\"ipt\"><img src=\"images/dn.gif\" width=\"16\" height=\"16\" alt=\"\" border=\"0\" /></td-->";
    g_global_rc += "\n                 <!--td width=\"130\" class=\"npl\"><p><a href=\"index.html\" onclick=\"if(total_load==1){eengine.showS2D2()}else{alert(loadWarn)} return false;\" class=\"smallplainlink\">Download this e-catalog</a></p></td-->";
    g_global_rc += "\n                 <!--td width=\"130\" class=\"npl\"><p><a href=\"index.html\" onclick=\"if(total_load==1){eengine.doClickThrough2('http://www.ibm.com/servers/eserver/express/campaigns/ecatalog/contact.html',480,780,2)}else{alert(loadWarn)} return false;\" class=\"smallplainlink\">Download this e-catalog</a></p></td-->";
    g_global_rc += "\n               </tr>";
    g_global_rc += "\n             </table></td>";
    g_global_rc += "\n         </tr>";
    g_global_rc += "\n         <tr>";
    g_global_rc += "\n           <td class=\"dotted\"><img src=\"images/c.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>";
    g_global_rc += "\n         </tr>";
    g_global_rc += "\n         <tr>";
    g_global_rc += "\n           <td class=\"no-padding\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"148\">";
    g_global_rc += "\n               <tr valign=\"top\">";
    g_global_rc += "\n                 <td align=\"right\" width=\"18\" class=\"ipt\" valign=\"top\"><img src=\"images/em.gif\" width=\"16\" height=\"16\" alt=\"\" border=\"0\" /></td>";
    g_global_rc += "\n                 <td width=\"130\" class=\"npl\" valign=\"top\"><p><a class=\"smallplainlink\"  href=\"index.html\" onclick=\"if(total_load==1){eengine.showForward2()}else{alert(loadWarn)}return false;\">E-mail this e-catalog</a></p></td>";
    g_global_rc += "\n               </tr>";
    g_global_rc += "\n             </table></td>";
    g_global_rc += "\n         </tr>";
    g_global_rc += "\n       </table></td>";
    g_global_rc += "\n   </tr>";
    g_global_rc += "\n </table>";
    g_global_rc += "\n ";
    g_global_rc += "\n <!-- End of promotion box -->";
    g_global_rc += "\n ";
    g_global_rc += "\n <br />";
    g_global_rc += "\n ";
    g_global_rc += "\n <!-- END GLOBAL SECTION OF RIGHT COLUMN -->";

var g_rc = "";
    g_rc += "\n <!-- Begin file header - DO NOT modify this line";
    g_rc += "\n ";
    g_rc += "\n  		Input file:				showprodrc.html";
    g_rc += "\n 		Output file: 			boltOn.js";
    g_rc += "\n 		Display template:		g_rc";
    g_rc += "\n ";
    g_rc += "\n 		Description:";
    g_rc += "\n 		Display template for individual right column offers (displayed below the global right column";
    g_rc += "\n 		offers.";
    g_rc += "\n ";
    g_rc += "\n 		Revision history:";
    g_rc += "\n 		DKR/2005-05-08 - Pulled template from boltOn to create this file.  No modifications made.";
    g_rc += "\n ";
    g_rc += "\n 		Note:";
    g_rc += "\n 		This header, to be be used for documentation purposes, will be removed at build time";
    g_rc += "\n 		before the template is put into its destination file.";
    g_rc += "\n ";
    g_rc += "\n End file header - DO NOT modify this line -->";
    g_rc += "\n ";
    g_rc += "\n [[lbl=<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"150\"><tr><td class=\"v14-header-4-small\">[[col7]]</td></tr></table>|col7|!= ' '| ]]";
    g_rc += "\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"v14-gray-table-border\" width=\"150\">";
    g_rc += "\n     [[lbl=<tr><td colspan=\"3\" align=\"center\"><img src=\"images/[[col3]]\" align=\"center\" onerror=\"file='[[col3]]';if(eengine.exe == 1){this.src=eengine.getExeImageName(file,0)};\" width=\"61\" height=\"81\" alt=\"[[col4]]\" /></td></tr><tr><td colspan=\"3\"><img alt=\"\" height=\"1\" src=\"images/gray_rule.gif\" width=\"148\"/></td></tr>|col3|!= ' '| ]]";
    g_rc += "\n 	<tr><td colspan=\"3\"><img alt=\"\" height=\"5\" src=\"images/c.gif\" width=\"1\"/></td></tr>";
    g_rc += "\n 	[[lbl=<tr><td colspan=\"3\"><p class=\"small\">[[col16]]</p></td></tr>|col16|!= ''| ]]";
    g_rc += "\n     [[lbl=<tr><td colspan=\"3\" class=\"dotted\"><img src=\"images/c.gif\" width=\"1\" height=\"1\" alt=\"\" /></td></tr>|col16|!= ''| ]]";
    g_rc += "\n     [[lbl=<tr><td><img src=\"images/c.gif\" width=\"18\" height=\"5\" alt=\"\" /></td>|col16|!= ''| ]]";
    g_rc += "\n     [[lbl=<td><img src=\"images/c.gif\" width=\"124\" height=\"5\" alt=\"\" /></td>|col16|!= ''| ]]";
    g_rc += "\n     [[lbl=<td><img src=\"images/c.gif\" width=\"5\" height=\"5\" alt=\"\" /></td></tr>|col16|!= ''| ]]";
    g_rc += "\n 	[[lbl=<tr><td class=\"npl\" align=\"right\" valign=\"top\" width=\"17\"><img alt=\"\" height=\"16\" src=\"images/fw.gif\" width=\"16\"/></td><td width=\"124\"><a class=\"smallplainlink\" href=\"index.html\" target=\"newwin\" onclick=\"target='';this.href='#';[[col9]];setTimer(); return false;\">[[col8]]</a></td><td width=\"5\">&nbsp;</td></tr>|col9|!= ' '| ]]";
    g_rc += "\n 	[[lbl=<tr><td align=\"right\" valign=\"top\" width=\"17\"><img alt=\"\" height=\"16\" src=\"images/fw.gif\" width=\"16\"/></td><td width=\"124\"><a class=\"smallplainlink\" href=\"index.html\" target=\"newwin\" onclick=\"target='';this.href='#';[[col11]];setTimer(); return false;\">[[col10]]</a></td><td width=\"5\">&nbsp;</td></tr>|col11|!= ' '| ]]";
    g_rc += "\n 	[[lbl=<tr><td align=\"right\" valign=\"top\" width=\"17\"><img alt=\"\" height=\"16\" src=\"images/fw.gif\" width=\"16\"/></td><td width=\"124\"><a class=\"smallplainlink\" href=\"index.html\" target=\"newwin\" onclick=\"target='';this.href='#';[[col13]];setTimer(); return false;\">[[col12]]</a></td><td width=\"5\">&nbsp;</td></tr>|col13|!= ' '| ]]";
    g_rc += "\n 	[[lbl=<tr><td align=\"right\" valign=\"top\" width=\"17\"><img alt=\"\" height=\"16\" src=\"images/fw.gif\" width=\"16\"/></td><td width=\"124\"><a class=\"smallplainlink\" href=\"index.html\" target=\"newwin\" onclick=\"target='';this.href='#';[[col15]];setTimer(); return false;\">[[col14]]</a></td><td width=\"5\">&nbsp;</td></tr>|col15|!= ' '| ]]";
    g_rc += "\n 	<tr><td colspan=\"3\"><img alt=\"\" height=\"5\" src=\"images/c.gif\" width=\"1\"/></td></tr>";
    g_rc += "\n </table>";
    g_rc += "\n <br />";

var g_actionStackNone = "";
    g_actionStackNone += "\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
    g_actionStackNone += "\n   <tr>";
    g_actionStackNone += "\n 	<td valign=\"bottom\">";
    g_actionStackNone += "\n       <img alt=\"Back\" height=\"16\" src=\"images/bk_bold_gray.gif\" width=\"16\"/>";
    g_actionStackNone += "\n     </td>";
    g_actionStackNone += "\n 	<td valign=\"top\">";
    g_actionStackNone += "\n       <span class=\"bct\" style=\"text-decoration:none; color:#dddddd;\"><b>Back</b></span>";
    g_actionStackNone += "\n     </td>";
    g_actionStackNone += "\n 	<td valign=\"top\">";
    g_actionStackNone += "\n       &nbsp;<span class=\"bct\" style=\"text-decoration:none; font-size:11\">|</span>&nbsp;";
    g_actionStackNone += "\n     </td>";
    g_actionStackNone += "\n 	<td valign=\"top\">";
    g_actionStackNone += "\n       <span class=\"bct\" style=\"text-decoration:none; color:#dddddd;\"><b>Forward</b></span>";
    g_actionStackNone += "\n     </td>";
    g_actionStackNone += "\n 	<td valign=\"bottom\">";
    g_actionStackNone += "\n       <img alt=\"Forward\" height=\"16\" src=\"images/fw_bold_gray.gif\" width=\"16\"/>";
    g_actionStackNone += "\n     </td>";
    g_actionStackNone += "\n   </tr>";
    g_actionStackNone += "\n </table>";

var g_actionStackBottom = "";
    g_actionStackBottom += "\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
    g_actionStackBottom += "\n   <tr>";
    g_actionStackBottom += "\n 	<td valign=\"bottom\">";
    g_actionStackBottom += "\n       <img alt=\"Back\" height=\"16\" src=\"images/bk_bold_gray.gif\" width=\"16\"/>";
    g_actionStackBottom += "\n     </td>";
    g_actionStackBottom += "\n 	<td valign=\"top\">";
    g_actionStackBottom += "\n       <span class=\"bct\" style=\"text-decoration:none; color:#dddddd;\"><b>Back</b></span>";
    g_actionStackBottom += "\n     </td>";
    g_actionStackBottom += "\n 	<td valign=\"top\">";
    g_actionStackBottom += "\n       &nbsp;<span class=\"bct\" style=\"text-decoration:none; font-size:11\">|</span>&nbsp;";
    g_actionStackBottom += "\n     </td>";
    g_actionStackBottom += "\n 	<td valign=\"top\">";
    g_actionStackBottom += "\n       <a href=\"Forward\" onclick=\"if(total_load==1){eengine.goForward()}else{alert(loadWarn)}return false;\" onmouseout=\"window.status='';return true;\" onmouseover=\"window.status='Forward';return true;\" class=\"bctl\" style=\"color:#000000;\"><b>Forward</b></a>";
    g_actionStackBottom += "\n     </td>";
    g_actionStackBottom += "\n 	<td valign=\"bottom\">";
    g_actionStackBottom += "\n       <a href=\"Forward\" onclick=\"if(total_load==1){eengine.goForward()}else{alert(loadWarn)}return false;\" onmouseout=\"window.status='';return true;\" onmouseover=\"window.status='Forward';return true;\"><img alt=\"Forward\" height=\"16\" src=\"images/fw_bold_black.gif\" width=\"16\"/></a>";
    g_actionStackBottom += "\n     </td>";
    g_actionStackBottom += "\n   </tr>";
    g_actionStackBottom += "\n </table>";

var g_actionStackTop = "";
    g_actionStackTop += "\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
    g_actionStackTop += "\n   <tr>";
    g_actionStackTop += "\n 	<td valign=\"bottom\">";
    g_actionStackTop += "\n       <a href=\"Back\" onclick=\"if(total_load==1){eengine.goBack()}else{alert(loadWarn)}return false;\" onmouseout=\"window.status='';return true;\" onmouseover=\"window.status='Back';return true;\"><img alt=\"Back\" height=\"16\" src=\"images/bk_bold_black.gif\" width=\"16\"/></a>";
    g_actionStackTop += "\n     </td>";
    g_actionStackTop += "\n 	<td valign=\"top\">";
    g_actionStackTop += "\n       <a href=\"Back\" onclick=\"if(total_load==1){eengine.goBack()}else{alert(loadWarn)}return false;\" onmouseout=\"window.status='';return true;\" onmouseover=\"window.status='Back';return true;\" class=\"bctl\" style=\"color:#000000;\"><b>Back</b></a>";
    g_actionStackTop += "\n     </td>";
    g_actionStackTop += "\n 	<td valign=\"top\">";
    g_actionStackTop += "\n       &nbsp;<span class=\"bct\" style=\"text-decoration:none; font-size:11\">|</span>&nbsp;";
    g_actionStackTop += "\n     </td>";
    g_actionStackTop += "\n 	<td valign=\"top\">";
    g_actionStackTop += "\n       <span class=\"bct\" style=\"text-decoration:none; color:#dddddd;\"><b>Forward</b></span>";
    g_actionStackTop += "\n     </td>";
    g_actionStackTop += "\n 	<td valign=\"bottom\">";
    g_actionStackTop += "\n       <img alt=\"Forward\" height=\"16\" src=\"images/fw_bold_gray.gif\" width=\"16\"/>";
    g_actionStackTop += "\n     </td>";
    g_actionStackTop += "\n   </tr>";
    g_actionStackTop += "\n </table>";

var g_actionStackMid = "";
    g_actionStackMid += "\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
    g_actionStackMid += "\n   <tr>";
    g_actionStackMid += "\n 	<td valign=\"bottom\">";
    g_actionStackMid += "\n       <a href=\"Back\" onclick=\"if(total_load==1){eengine.goBack()}else{alert(loadWarn)}return false;\" onmouseout=\"window.status='';return true;\" onmouseover=\"window.status='Back';return true;\"><img alt=\"Back\" height=\"16\" src=\"images/bk_bold_black.gif\" width=\"16\"/></a>";
    g_actionStackMid += "\n     </td>";
    g_actionStackMid += "\n 	<td valign=\"top\">";
    g_actionStackMid += "\n       <a href=\"Back\" onclick=\"if(total_load==1){eengine.goBack()}else{alert(loadWarn)}return false;\" onmouseout=\"window.status='';return true;\" onmouseover=\"window.status='Back';return true;\" class=\"bctl\" style=\"color:#000000;\"><b>Back</b></a>";
    g_actionStackMid += "\n     </td>";
    g_actionStackMid += "\n 	<td valign=\"top\">";
    g_actionStackMid += "\n       &nbsp;<span class=\"bct\" style=\"text-decoration:none; font-size:11\">|</span>&nbsp;";
    g_actionStackMid += "\n     </td>";
    g_actionStackMid += "\n 	<td valign=\"top\">";
    g_actionStackMid += "\n       <a href=\"Forward\" onclick=\"if(total_load==1){eengine.goForward()}else{alert(loadWarn)}return false;\" onmouseout=\"window.status='';return true;\" onmouseover=\"window.status='Forward';return true;\" class=\"bctl\" style=\"color:#000000;\"><b>Forward</b></a>";
    g_actionStackMid += "\n     </td>";
    g_actionStackMid += "\n 	<td valign=\"bottom\">";
    g_actionStackMid += "\n       <a href=\"Forward\" onclick=\"if(total_load==1){eengine.goForward()}else{alert(loadWarn)}return false;\" onmouseout=\"window.status='';return true;\" onmouseover=\"window.status='Forward';return true;\"><img alt=\"Forward\" height=\"16\" src=\"images/fw_bold_black.gif\" width=\"16\"/></a>";
    g_actionStackMid += "\n     </td>";
    g_actionStackMid += "\n   </tr>";
    g_actionStackMid += "\n </table>";

var g_seriesHeader = new Array(
);
