//Portions are Copyright (c) 2000-2005, Mobular Technologies&#174;, Inc.  All Rights Reserved.
//Mobular and Mobular Technologies are Registered Trademarks of Mobular
//Technologies, Inc.
//All rights reserved.  Unauthorized reproduction prohibited.
//http://www.mobular.com/
//

var g_solution_type = "";





// Any of the values below can be inserted into the docinfo.txt file in order to customize
// the contact module and footer of an e-document/kit.  These variables also exist at the 
// bottom of the index.html file.  Any value passed in through the docinfo.txt file will override
// an entry defined in the index.html file.  Therefore, the template can be customized specifically
// to a client in the index.html file, but can in turn be overridden on a case-by-case basis
// through the docinfo.txt file.  
//
// Note: If a value is defined in the index.html or sent in through the docinfo.txt for a given
// variable, it will cause that particular link to display the e-document/kit.  If you want to 
// remove a value that is defined in the index.html (so it will display), pass in the variable
// name and "remove" as the name/value pair in the docinfo.txt file.  For example:
//
//   g_callmenow_link|remove

var g_orderonline_link = "";
var g_textchat_link = "";
var g_callmelater_link = "";
var g_callmenow_link = "";
var g_emailus_link = "";
var g_contact_rc_link = "";
var g_contact_footer_link = "";
var g_about_link = "";
var g_termsofuse_link = "";
var g_privacy_link = "";
var g_phone_number = "";
var g_feeds_link = "";
var g_contact_module_title = "";
var g_max_rc_count = 1;
var g_max_rc_desc_length = 10000;
var g_rc_rotate = 1;
var g_rc_offer_timing = 5000; // In milliseconds.



// Global variables used by the system for right column display.  Not typically
// overridden by input values.
var g_rc_currently_rotating = 1;
var g_master_rc_offers = new Array();
var g_active_rc_offers = new Array();
var g_current_rc_offer = -1;
var g_rc_nav_offer_timing = 3000; // In milliseconds.
var g_rc_timeout_id = 0;
var g_rc_nav_timeout_id = 0;
var g_rc_pages_mapping = "";
var g_rc_action_description = "Learn more";





var g_any_contact_module_links = "";
var g_db = new Array();

// Global variables to track the current document, section, page, etc.
var g_current_page_absolute = 0;
var g_current_document_name = "";
var g_current_document_number = 0;
var g_current_document_start_page = 0;
var g_current_document_end_page = 0;
var g_current_document_page = 0;
var g_current_document_page_title = "";
var g_current_document_page_count = 0;
var g_current_document_pdf_filesize = "";
var g_current_section_name = "";
var g_current_section_start_page = 0;

var g_last_page_absolute = 0;
var g_customCover = 0;
var g_twoPageSpreadDisplayed = false;

var g_printOption = 0;
var g_print_limit = 10;

// Global variable for the default page display in a document/kit - 0: single page, 1: split page
var g_show2pgDefault = 1;

// Breadcrumb array
var g_bread = new Array( "" );
var g_bread_actions = new Array( "" );

// 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 = "";

var rand = new RandomNumberGenerator();

//-----------------------------------------------------------------------------
// Begin - Writing content functions  
//-----------------------------------------------------------------------------
function I2U_writePage2(n)
{
	// All necessary code from the original writePage2 function has been moved
	// to the reporting.js file in a special "listener" that will fire everytime
	// the writePage function in the engine is called.
	//
	// This function now is nothing more than a passthrough to writePage.  
	this.writePage(n);
}

function I2U_writeNextPage()
{
	// Original boltOn code removed.  Replaced with appropriate 9.1 engine call.
	this.writePage(65536);
}

function I2U_writePrevPage()
{
	// Original boltOn code removed.  Replaced with appropriate 9.1 engine call.
	this.writePage(-65536);
}

function I2U_writePageKeyin(pg)
{
	if (eengine.kitData.current.doc == 0  && eengine.kitData.documents.length > 1) { alert(eengine.erMsg[0]); return 0; }
	
	var page = -1;
	try {
		page = parseInt(pg,10) - 1;	
		if (isNaN(page) || page < 0 || page >= eengine.kitData.documents[eengine.kitData.current.doc].pages.length) {
			throw "Invalid or page out of range. ";
		} else {
			this.writePage(eengine.kitData.current.doc, page);
		}
	} catch (e) {
		var msg = eengine.mkEr(1, eengine.kitData.documents[eengine.kitData.current.doc].pages.length);
		alert(msg);
	}	
}

function I2U_writeFirstPageCurrentDocument()
{
  	// Original boltOn code removed.  Replaced with appropriate 9.1 engine call.
	var doc_num = eengine.kitData.current.doc;
	this.writePage(doc_num,0);
}

function I2U_writeLastPageCurrentDocument()
{
  	// Original boltOn code removed.  Replaced with appropriate 9.1 engine call.
	var pg = eengine.kitData.documents[eengine.kitData.current.doc].pages.length - 1;
	var doc_num = eengine.kitData.current.doc;
	this.writePage(doc_num,pg);
}

function I2U_gotoDocumentByNumber(doc_num)
{
  	// Original boltOn code removed.  Replaced with appropriate 9.1 engine call.
	this.writePage(doc_num,0);
}

function I2U_togglepageFlipOnOff()
{
	// Original boltOn code removed.  Replaced with appropriate 9.1 engine call.
	eengine.flashObj.toggleFlash();
}

function I2U_getDocumentParameter(n, parameter)
{
	// The input value -- parameter -- corresponds to the columns in the g_prtDocs 
	// array:
	//
	//   0 = document number
	//   1 = document name
	//   2 = start page number
	//   3 = end page number
	//   etc.
  
	var doc_parm = "";
	var end_page_num = "";

	for (var i=0; i < g_prtDocs.length; i++)
	{
		var doc_info = g_prtDocs[i].split('|');
  
		doc_parm = doc_info[parameter];
		end_page_num = doc_info[3];
    
		if (parseInt(n) <= parseInt(end_page_num))
		{
			break;
		}
	}
  
	return doc_parm;
  
}

function I2U_buildPageBreadcrumbs(n)
{  
	// Create breadcrumbs
	if (g_prtDocs.length > 1)
	{
		var doc_num = eengine.kitData.current.doc + 1;	
		this.g_bread_actions = new Array(
			"this.showShow2()"
		);
 
		this.g_bread = new Array(
			"Kit cover"
		);   

		if (n > 0) {
			this.g_bread_actions[ this.g_bread_actions.length ] = "this.goToPage(1," + doc_num + ")";
			this.g_bread[ this.g_bread.length ] = eengine.kitData.documents[eengine.kitData.current.doc].title;
		}
	}
	else
	{
		this.g_bread_actions = new Array(
			"this.showShow2()"
		);
 
		this.g_bread = new Array(
			"E-document cover"
		);    
 
	}
  
	if (g_current_section_name != "" && g_current_section_name.toLowerCase() != "no_toc_defined")
	{
		this.g_bread_actions[ this.g_bread_actions.length ] = "this.writePage2(" + g_current_section_start_page + ")";
    
		var obj = /&nbsp\;/ig;
		this.g_bread[ this.g_bread.length ] = g_current_section_name.replace(obj, "");
	}       	      
  
}

function I2U_setCurrentLocationInfo(n)
{

	var doc_num = "";
	var doc_name = "";
	var start_page_num = "";
	var end_page_num = "";
  
	var section_name = "";
	var doc_section_page = "";
	var section_start_page_num = "";
 
	g_last_page_absolute = g_current_page_absolute;
	g_current_page_absolute = n;
  
	if (g_current_page_absolute > 0)
	{
		//alert ("Inside setCurrentLocationInfo...New page:" + g_current_page_absolute + "  Last page:" + g_last_page_absolute);
      
		// Set the document related global variables based on the input 
		// absolute page number.
    
		for (var i=0; i < g_prtDocs.length; i++)
		{
			var doc_info = g_prtDocs[i].split('|');
    
			doc_num = doc_info[0];
			doc_name = doc_info[1];
			start_page_num = doc_info[2];
			end_page_num = doc_info[3];
      
			pdf_filesize = prtDocsFileSizes[i];
      
			if (parseInt(n) <= parseInt(end_page_num))
			{
				break;
			}
		}
    
		g_current_document_number = parseInt(doc_num);
		g_current_document_name = doc_name;
		g_current_document_start_page = parseInt(start_page_num);
		g_current_document_end_page = parseInt(end_page_num);
		g_current_document_page = parseInt(n) - parseInt(start_page_num) + 1;
		g_current_document_page_count = parseInt(end_page_num) - parseInt(start_page_num) + 1;
		g_current_document_pdf_filesize = pdf_filesize;
    
		var rec_num = g_current_page_absolute - 1;
		var _db = this.db[rec_num].split('|');
		g_current_document_page_title =_db[0];
    
		// Set the section related global variables based on the input 
		// absolute page number.
    
		g_current_section_name = "";
		g_current_section_start_page = 1;
    
		for (var i=0; i < g_TocRef.length; i++)
		{
			var section_info = g_TocRef[i].split('|');
    
			doc_num = section_info[0];
			section_start_page_num = section_info[1];
			section_name = section_info[2];
      
			if (doc_num == g_current_document_number)
			{
				if (g_current_document_page >= parseInt(section_start_page_num))
				{
					g_current_section_name = section_name;
					g_current_section_start_page = parseInt(section_start_page_num) + parseInt(g_current_document_start_page) - 1;
				}
				else
				{
					break;
				}
			}
		}
	}
	else
	{
		// Reset all variables to their initial values
        
		g_current_page_absolute = 0;
		g_current_document_name = "";
		g_current_document_number = 0;
		g_current_document_start_page = 0;
		g_current_document_end_page = 0;
		g_current_document_page = 0;
		g_current_section_name = "";
		g_current_section_start_page = 0;
    
		g_last_page_absolute = 0;
    }
  
	var t_string = "";
	t_string += "g_current_page_absolute: \t\t" + g_current_page_absolute + "\n";
	t_string += "\n";
	t_string += "g_current_document_number: \t" + g_current_document_number + "\n";
	t_string += "g_current_document_name: \t\t" + g_current_document_name + "\n";
	t_string += "g_current_document_start_page: \t" + g_current_document_start_page + "\n";
	t_string += "g_current_document_end_page: \t" + g_current_document_end_page + "\n";
	t_string += "g_current_document_page: \t\t" + g_current_document_page + "\n";
	t_string += "\n";
	t_string += "g_current_section_name: \t\t" + g_current_section_name + "\n";
	t_string += "g_current_section_start_page: \t" + g_current_section_start_page + "\n";
	//alert (t_string);  
}

function I2U_showShow2()
{
/*	if (g_custom_cover_page == "" && g_prtDocs.length == 1)
	{
		eengine.cover = 0;	
		if (g_showShow.indexOf("medium-border") == -1)
		{
			g_showShow = "<br /><center><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td class=\"medium-border\">" + g_showShow + "</td></tr></table><br /><br /></center>";		
			eengine.eeUtility.showShow = g_showShow;
		}
		eengine.goToPage(1,1);
	}
	else
	{
*/
		// Load cover into the new binder abstration layer.
		eengine.loadCoverInsert();
		eengine.writePage(0,0);
		var pg_status = document.getElementById('pageStatus');
		pg_status.value = g_cover;
//	}
}

function I2U_loadCoverInsert()
{
	if (g_custom_cover_page == "" && g_prtDocs.length != 1)
	{
		this.loadStandardKitCover();  
	}
	else if (g_custom_cover_page == "" && g_prtDocs.length == 1)
	{ 
		this.loadStandardDocumentCover();  
	}
	else
	{
		this.loadCustomCover();
	}
}

function I2U_loadCustomCover()
{
	//alert ('Inside showCustomCover...');

	// The S2D page for Macintosh is not used for anything IBM related.  Therefore, the page
	// has been hijacked for use in displaying custom cover pages in the eDocument/eCatalog.
	var custom_cover = g_showS2DMAC;

	// Drop in the custom cover page 
	custom_cover = custom_cover.replace("[[PGS]]", g_custom_cover_page);

	g_ekitCover = custom_cover;
	eengine.eeUtility.ekitCover = custom_cover;
	//eengine.kitData.coverInsert.html = eengine.makeBinderCoverInsert();
	eengine.kitData.coverInsert.html = custom_cover;
			 
	document.getElementById('pageStatus').value = g_cover;
}

function I2U_loadStandardDocumentCover()
{
	//alert ('Inside showCustomCover...');

	// The S2D page for Macintosh is not used for anything IBM related.  Therefore, the page
	// has been hijacked for use in displaying custom cover pages in the eDocument/eCatalog.
	var custom_cover = g_showS2DMAC;

	// Drop in the cover image		
	var _db = this.db[0].split('|');
	var _image = _db[3];	
	custom_cover = custom_cover.replace("[[PGS]]", "<center><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr align=\"center\"><td class=\"medium-border\"><span=\"medium-border\"><img src=\"images/" + _image + "\" alt=\"\" border=\"0\"></td></tr></table></center><br /><br />");

	g_ekitCover = custom_cover;
	eengine.eeUtility.ekitCover = custom_cover;
	//eengine.kitData.coverInsert.html = eengine.makeBinderCoverInsert();
	eengine.kitData.coverInsert.html = custom_cover;
	g_showShow = custom_cover;
	eengine.eeUtility.showShow = custom_cover;
	
	document.getElementById('pageStatus').value = g_cover;
}

function I2U_loadStandardKitCover()
{
	//alert ('Inside showStandardKitCover...');

	// The S2D page for Macintosh is not used for anything IBM related.	Therefore, the page
	// has been hijacked for use in displaying custom cover pages in the eDocument/eCatalog.
	var custom_cover = g_showS2DMAC;

	var custom_cover_spread = g_kitCoverMatch;
	var cover_content = "";
	var cover_row = ""
	var row_class = "";
	
	for (var i=0; i < g_prtDocs.length; i++)
	{
	
		var doc_info = g_prtDocs[i].split('|');
	
		doc_num = doc_info[0];
		doc_name = doc_info[1];
		page_num = doc_info[2];
		
		subtitle = trim(prtDocsSubtitles[i]);
		if (subtitle != "") { subtitle = "<br />" + subtitle; }

		cover_row = g_kitCoverSpread;
		
		var obj = /\[\[doc_name\]\]/ig;
		cover_row = cover_row.replace(obj, doc_name);
		
		obj = /\[\[page_num\]\]/ig;
		cover_row = cover_row.replace(obj, page_num);
				
		obj = /\[\[book\]\]/ig;
		cover_row = cover_row.replace(obj, doc_num + ",1");

		obj = /\[\[subtitle\]\]/ig;
		cover_row = cover_row.replace(obj, subtitle);
			 
		row_class = (i % 2 == 0 ? "shaded-row" : "white-row");			 
		cover_row = cover_row.replace("[[row_class]]", row_class);

		cover_content += cover_row;
		
	}

	custom_cover_spread = custom_cover_spread.replace("SHOWMATCHRESULTS", cover_content);
 
	// Drop in the custom cover page 
	custom_cover = custom_cover.replace("[[PGS]]", custom_cover_spread);
 
	g_ekitCover = custom_cover;
	eengine.eeUtility.ekitCover = custom_cover;
	//eengine.kitData.coverInsert.html = eengine.makeBinderCoverInsert();
	eengine.kitData.coverInsert.html = custom_cover;
						
	document.getElementById('pageStatus').value = g_cover;

}

//-----------------------------------------------------------------------------
// End - Writing content functions  
//-----------------------------------------------------------------------------



//-----------------------------------------------------------------------------
// Begin - Search functions
//-----------------------------------------------------------------------------

// wrapper for search function.
// special for ibm
function I2U_search2 (kwds, sc, st) {

	var t_showDocName = this.showDocName;
	this.showDocName = 1
	
	this.eeUtility.noMatch = g_showNoMatch;	
	this.eeUtility.match = g_showMatch;	

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

	this.g_bread = new Array(
		capFirstLetter(g_solution_type) + g_spacecover,
		g_searchfor + "'"+kwds+"'"
	);    

	var rc = this.makeRC('*');	

	this.eeUtility.noMatch = this.manageSpecialTags( this.eeUtility.noMatch, rc );
	this.eeUtility.match = this.manageSpecialTags( this.eeUtility.match, rc );

	this.search( kwds, sc, st );	
	
	this.showDocName = t_showDocName;	
	
	// Ensure that we are at the top of the page
	window.scrollTo(0,0);    

}

//-----------------------------------------------------------------------------
// End - Search functions
//-----------------------------------------------------------------------------



//-----------------------------------------------------------------------------
// Begin - Utility functions
//-----------------------------------------------------------------------------

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

	this.eeUtility.s2d = g_showS2D;

	this.g_bread_actions = new Array(
		"this.showShow2()",
		"this.showS2D2()"
	);

	this.g_bread = new Array(
		capFirstLetter(g_solution_type) + g_spacecover,
		g_downloadthetxt + g_solution_type
	);    
        
	// swap out common tags
	var rc = this.makeRC('*');     
   
	// 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.eeUtility.s2d = this.manageSpecialTags( this.eeUtility.s2d, rc );

	this.showS2D();
   
	// Ensure that we are at the top of the page
	window.scrollTo(0,0);
   
}

function I2U_doClickThrough2(theurl, _poph, _popw, _fw) 
{
	// Execute the click through
	//this.executeClickThrough(theurl, _poph, _popw, _fw);
	var t_pdf = this._pdf;
	this._pdf = 1;
	this.doClickThrough(theurl, _poph, _popw, _fw);
	this._pdf = t_pdf;
}

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)
	{
		//  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();
		}
	}    

}

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;
}

// 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(g_engineTitle); 
  
	var t_baseUrl = baseUrl.replace(/(.*)(\/document)/, "$1");  
  
	url += "?url=" + t_baseUrl + "&title=" + title;
  
	this.executeClickThrough( url, 480, 780, 2);
	this.reporting.trackAction(100, 'ClickThrough', this.cno, "SendToFriend");
}

function I2U_showForward2a()
{ 
	// This function is not used by IBM at this time, but remains here just in case the use of
	// the 4D S2F application ever goes away in the future.
  
	//altsend = baseUrl + '\/' + cid + '\/' + campid + '\/' + engineid + '\/send2friend.html';
	altsend = this.qualifyUrl('send2friend.html')

	//this.ctnt[8] = g_showForward;
	this.eeUtility.s2f = g_showForward;
	
	this.g_bread_actions = new Array(
		"this.showShow2()",
		"this.showForward2()"
	);

	this.g_bread = new Array(
		capFirstLetter(g_solution_type) + g_spacecover,
		"Send to Friend"
	);    
        
	// swap out common tags
	var rc = this.makeRC('*');     
   
	// 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.showForward2a()";
	this.addAction (t_function_call);         
  
	this.eeUtility.s2f = this.manageSpecialTags( this.eeUtility.s2f, rc );

	this.showForward();
   
	// Ensure that we are at the top of the page
	window.scrollTo(0,0);
   
}

function I2U_showSuccess2()
{ 

	// Prepare the g_showSuccess and this.ctnt for display at the point in time
	// that the user successfully completes the S2F process.  The S2F jsp/aspx 
	// will handle the call to display this page.  Note:  This is not used at this time
	// due to the Circle 4D S2F application handling this function.
  
	this.eeUtility.s2fSuccess = g_showSuccess;

	this.g_bread_actions = new Array(
		"this.showShow2()",
		"this.showForward2()"
	);

	this.g_bread = new Array(
		capFirstLetter(g_solution_type) + g_spacecover,
		"Send to Friend"
	);    
        
	// swap out common tags
	var rc = this.makeRC('*');     
    
	this.eeUtility.s2fSuccess = this.manageSpecialTags( this.eeUtility.s2fSuccess, rc );
   
}

function I2U_doStandardClickThrough(item, calling_location)
{
	// Note:  Calling location should be either ContactModule or Footer.  
  
	var url = "";  
	var surfaid_page = "";
	var surfaid_qkwd = "";
	var surfaid_qresult = null;
  
	var window_height = 600;
	var window_width  = 1000;
  
	if (calling_location.toLowerCase() != "contactmodule" && calling_location.toLowerCase() != "footer")
	{
		var t_message = g_Messages[9];
		alert (t_message);
		return 0; 
	}
  
	surfaid_page = calling_location;
  
	switch (item.toLowerCase())
	{
		case "orderonline":
			url           = this.g_orderonline_link;
			surfaid_qkwd  = "OrderOnline";
			break;

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

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

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

		case "emailus":
			url           = this.g_emailus_link;
			surfaid_qkwd  = "EmailUs";
			break;
      
		case "contact":
			if (calling_location.toLowerCase() == "footer")
			{
				url           = this.g_contact_footer_link;
			}
			else
			{
				url           = this.g_contact_rc_link;
			}
			surfaid_qkwd  = "Contact";
			break;

		case "legal":
			url           = this.g_legal_link;
			surfaid_qkwd  = "Legal";
			break;

		case "about":
			url           = this.g_about_link;
			surfaid_qkwd  = "About";
			break;
          
		case "termsofuse":
			url           = this.g_termsofuse_link;
			surfaid_qkwd  = "TermsOfUse";
			break;
    
		case "privacy":
			url           = this.g_privacy_link;
			surfaid_qkwd  = "Privacy";
			break;
    
		case "feeds":
			url           = this.g_feeds_link;
			surfaid_qkwd  = "IBMFeeds";
			break;
	}  
  
	if (trim(url) != "")
	{
		this.reporting.trackAction(100, surfaid_page, this.cno, surfaid_qkwd);	
		this.executeClickThrough(url, window_height, window_width, 2);	
	}
	else
	{
		alert(item + g_linknotdefinetxt);    
	}
  
}

function I2U_setContactModuleLinks()
{
	var standard_links = new Array( 
		"g_orderonline_link",
		"g_callmenow_link",
		"g_textchat_link",
		"g_requestaquote_link",
		"g_callmelater_link",
		"g_emailus_link",
		"g_contact_rc_link",  
		"g_phone_number",
		"g_contact_module_title",
		"g_any_contact_module_links"
	);

	var content = g_global_rc;
  
	eengine.g_any_contact_module_links = ""; 
    
	var obj = /\n/ig;
	content = content.replace ( obj, "temporaryreplaceoflinefeeds" );
    
	var t_parm = "";
	var l_var = "";
	var g_var = "";
  
	for (var i=0; i < standard_links.length; i++)
	{
		t_parm = trim(standard_links[i]);
		l_var = trim(eval(t_parm));
		g_var = trim(eval("eengine." + t_parm));
  
		if (l_var != '')
		{
			if (l_var.toLowerCase() != 'remove')
			{
				g_var = l_var;
			}
			else
			{
				g_var = '';
			}
		}

		if (g_var != '')
		{
			content = content.replace (eval("/\\<\\!\\-\\-\\s+" + t_parm + "(.*?)\\-\\-\\>/ig"), "$1");
			if (t_parm != "g_contact_module_title") { eengine.g_any_contact_module_links = "true"; }
      
			var ev = "eengine." + t_parm + "='" + g_var + "'";
			eval(ev);
		}
	}
  
	if (trim(eengine.g_contact_module_title) != "")
	{
		obj = /\[\[g_contact_module_title\]\]/ig;
		content = content.replace ( obj, eengine.g_contact_module_title );
	}
	else
	{
		obj = /\[\[g_contact_module_title\]\]/ig;
		content = content.replace ( obj, "&nbsp;" );
	}
  
    if (trim(eengine.g_phone_number) != "")
	{
		obj = /\[\[g_phone_number\]\]/ig;
		content = content.replace ( obj, eengine.g_phone_number );
	}
  
	var obj = /temporaryreplaceoflinefeeds/ig;
	content = content.replace ( obj, "\n" );

	// The portal will remove any line that sets the g_global_rc variable before it inserts in
	// the showglobalrc.html.  Therefore, put the if (true) in the line to fake out the portal
	// and have it leave this line alone.
	if (true) { g_global_rc = content; }
  
	if (document.getElementById('globalRC')) { document.getElementById('globalRC').innerHTML = g_global_rc; }
  
}

function I2U_setFooterLinks()
{
	var standard_links = new Array( 
		"g_contact_footer_link",
		"g_about_link",
		"g_termsofuse_link",
		"g_privacy_link",
		"g_feeds_link"
	);

	var content = g_brandFooter;
  
	eengine.g_any_contact_module_links = ""; 
    
	var obj = /\n/ig;
	content = content.replace ( obj, "temporaryreplaceoflinefeeds" );
    
	var t_parm = "";
	var l_var = "";
	var g_var = "";
  
	for (var i=0; i < standard_links.length; i++)
	{
		t_parm = trim(standard_links[i]);
		l_var = trim(eval(t_parm));
		g_var = trim(eval("eengine." + t_parm));
    
		if (l_var != '')
		{
			if (l_var.toLowerCase() != 'remove')
			{
				g_var = l_var;
			}
			else
			{
				g_var = '';
			}
		}

		if (g_var != '')
		{
			content = content.replace (eval("/\\<\\!\\-\\-\\s+" + t_parm + "(.*?)\\-\\-\\>/ig"), "$1");
			eengine.g_any_contact_module_links = "true";
      
			var ev = "eengine." + t_parm + "='" + g_var + "'";
			eval(ev);
      
		}
	}
    
	var obj = /temporaryreplaceoflinefeeds/ig;
	content = content.replace ( obj, "\n" );

	g_brandFooter = content;

	if (document.getElementById('footer')) { document.getElementById('footer').innerHTML = g_brandFooter; }  
    if (document.getElementById('ibm-footer')) { document.getElementById('ibm-footer').style.visibility = "visible"; } 
}

function I2U_showHelp2() {

	//this.ctnt[1] = g_showHelp;
	this.eeUtility.help = g_showHelp;

	this.g_bread_actions = new Array(
		"this.showShow2()",
		"this.showHelp2()"
	);

	this.g_bread = new Array(
		capFirstLetter(g_solution_type) + g_spacecover,
		g_helptxt
	);    
        
	// swap out common tags
	var rc = this.makeRC('*');     
   
	// 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.showHelp2()";
	this.addAction (t_function_call);         
  
	//this.ctnt[1] = this.manageSpecialTags( this.ctnt[1], rc );
	this.eeUtility.help = this.manageSpecialTags( this.eeUtility.help, rc );

	this.showHelp();
	
	// Ensure that we are at the top of the page
	window.scrollTo(0,0);
   
}

// wrapper for show help so we can get the breadcrumb bar in there
function I2U_showPrint2() {

	var _prtContent = g_prtContent;
	if (g_prtDocs.length == 1)
	{
		// If this is an eDocument cut out the document identifier/navigation from the
		// the top of the print dialog.

		var obj = /\n/ig;
		_prtContent = _prtContent.replace(obj, "thisisatemporarylinefeedreplacement");

		obj = /\<\!-- Begin eDocument cut(.+)End eDocument cut - DO NOT modify\/remove this line --\>/gi;
		_prtContent = _prtContent.replace( obj, "");    

		var obj = /thisisatemporarylinefeedreplacement/ig;
		_prtContent = _prtContent.replace(obj, "\n");
	}
  
	//this.ctnt[7] = _prtContent;
	this.eeUtility.print = _prtContent;
	
	this.g_bread_actions = new Array(
		"this.showShow2()",
		"this.showPrint2()"
	);

	this.g_bread = new Array(
		capFirstLetter(g_solution_type) + g_spacecover,
		g_printtxt
	);    
        
	// swap out common tags
	var rc = this.makeRC('*');     
   
	// 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.showPrint2()";
	this.addAction (t_function_call);         
  
	// Temporarily set the document name and page number to 1 if not
	// currently set so that the manageSpecialTags assumes document
	// one is the current document.
	var t_current_page_absolute = g_current_page_absolute;
	if (t_current_page_absolute == 0) { this.setCurrentLocationInfo(1); }
  
	//this.ctnt[7] = this.manageSpecialTags( this.ctnt[7], rc );
	this.eeUtility.print = this.manageSpecialTags( this.eeUtility.print, rc );
  
	this.showPrt();
   
	// Ensure that we are at the top of the page
	window.scrollTo(0,0);
   
}

function I2U_runPrt2()
{
	var start_print = 0;
	var end_print = 0;

	var t_current_page_absolute = g_current_page_absolute;
	if (t_current_page_absolute == 0) { this.setCurrentLocationInfo(1); }

	var _prt = g_printOption;

	switch (_prt)
	{
		case 0:
			//alert('Printing page: ' + g_current_page_absolute);
			start_print = g_current_page_absolute;
			end_print = g_current_page_absolute;
			break;
      
		case 2:
			//alert('Printing entire document: ' + g_current_document_name);
			start_print = g_current_document_start_page;
			end_print = g_current_document_end_page;
			break;

		case 3:
			var page_range = document.getElementById('page_range').value;
  
			var range_values = page_range.split('-');
			if (range_values.length == 2 && this.validPageRange(page_range, range_values[0], range_values[1]))
			{
				//alert ('Got a range...');  
				start_print = parseInt(range_values[0]) + g_current_document_start_page - 1;
				end_print = parseInt(range_values[1]) + g_current_document_start_page - 1;
			} 
			else if (range_values.length == 1 && this.validPageRange(page_range, range_values[0]))
			{
				//alert ('Got a single page...');   
				start_print = parseInt(range_values[0]) + g_current_document_start_page - 1;
				end_print = parseInt(range_values[0]) + g_current_document_start_page - 1;
			}   
			break;
	}

	var return_to_current_page = true;
	if (start_print > 0 && end_print > 0)
	{
		if (this.pdfPrint)
		{
			//alert ('Printing high res...start_print: ' + start_print + ' - end_print: ' + end_print);
			var relative_start_print = start_print - g_current_document_start_page + 1;
			var relative_end_print = end_print - g_current_document_start_page + 1;
			this.loadRangePDF(relative_start_print, relative_end_print);
		}
		else
		{
			//alert ('Printing low res...start_print: ' + start_print + ' - end_print: ' + end_print);
			return_to_current_page = this.printRange(start_print, end_print);
		}
	}  

	if (t_current_page_absolute == 0) { this.setCurrentLocationInfo(t_current_page_absolute); }
  
}

function I2U_validPageRange(page_range, p1, p2)
{
  
	if (trim(page_range) == "")
	{
		var t_message = g_Messages[6];
		alert (t_message);
		return 0;
	}
  
	if (! parseInt(p1) > 0)
	{
		var t_message = g_Messages[5].replace('[[page_range]]', page_range);
		alert (t_message);
		return 0;
	}
  
	if (p2)
	{
		if (! parseInt(p2) > 0 || parseInt(p1) > parseInt(p2))
		{
			var t_message = g_Messages[5].replace('[[page_range]]', page_range);
			alert (t_message);
		return 0;
		}  
	}
      
	var _p1 = parseInt(p1);

	if (_p1 < 1 || _p1 > g_current_document_page_count)
	{
		var t_message = g_Messages[7].replace('[[page_range]]', page_range);
		t_message = t_message.replace('[[doc_name]]', g_current_document_name);
		t_message = t_message.replace('[[total_pages_in_doc]]', g_current_document_page_count);
		alert (t_message);
		return 0;  
	}

	if (p2)
	{
		var _p2 = parseInt(p2);
		if (_p2 < 1 || _p2 > g_current_document_page_count)
		{
			var t_message = g_Messages[7].replace('[[page_range]]', page_range);
			t_message = t_message.replace('[[doc_name]]', g_current_document_name);
			t_message = t_message.replace('[[total_pages_in_doc]]', g_current_document_page_count);
			alert (t_message);
			return 0;  
		}
	}

	return 1;
  
}

function I2U_returnToCurrentPage()
{
	if (g_current_page_absolute > 0)
	{
		this.writePage2(g_current_page_absolute);
	}
	else
	{
		this.showShow2();
	}
}

function I2U_printOption(option)
{
	g_printOption = option;
}

function I2U_printRange(start_print, end_print)
{
  
	var print_content = "";
	var tmp_print_content = "";
  
	var print_count = parseInt(end_print) - parseInt(start_print) + 1;

	if (print_count <= g_print_limit)
	{
   
		// Loop through the database and add the necessary pages
		var start = start_print - 1;
		var end = end_print;
  
		for ( var i=start; i < end_print; i++ ) 
		{
			tmp_print_content = "";
      
			if (i > start)
			{
				//tmp_print_content += "\n<h5 style=\"page-break-after: always;\">&nbsp;</h5>";
				//tmp_print_content += '\n<print_page_break>&nbsp;</print_page_break>';
				tmp_print_content += "\n<div class=\"pagestart\"><img src=\"images/c.gif\" width=\"1\" height=\"1\" alt=\"\" /></div>";
			}
                
			tmp_print_content += this.g_printdetail;
      
			var line = this.db[i].split('|');
			var print_title = g_current_document_name + ' - ' + line[0];
			tmp_print_content = tmp_print_content.replace( eval("/\\[\\[print_title\\]\\]/gi") , print_title)
      
			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;
           
		}
    
		//alert (print_content);
  
		var saKwd = "";
		if (g_prtDocs.length > 1)
		{
			saKwd = g_current_document_name + ":";
		}
		var _db = this.db[start_print-1].split('|');
		saKwd += _db[0];
		if (start_print != end_print)
		{
			_db = this.db[end_print-1].split('|');
			saKwd += "-" + _db[0];
		}
		
		this.reporting.trackAction(100, "PrintLowRes", this.cno, saKwd);			
		this.printContent2(print_content);		
    
		return true;
	}
	else
	{
		var t_message = g_Messages[8];
		alert (t_message);
		return false;
	}
}

function I2U_loadRangePDF(start_print, end_print)
{
	var t_doc = g_prtDocs[g_current_document_number - 1].split('|');
	var pdfName = t_doc[6];
	var pdfOpt = '#page=' + start_print;

	//this.doClickThrough(baseUrl + "/print/" + pdfName + pdfOpt, 800, 600, 1);
	this.doClickThrough("print/" + pdfName + pdfOpt, 800, 600, 1);

	var saKwd = "";
	if (g_prtDocs.length > 1)
	{
		saKwd = g_current_document_name + ":";
	}
	var _db = this.db[start_print-1].split('|');
	saKwd += _db[0];
	if (start_print != end_print)
	{
		_db = this.db[end_print-1].split('|');
		saKwd += "-" + _db[0];
	}

	this.reporting.trackAction(100, "PrintHighRes", this.cno, saKwd);		  
	
	return false;
}

function I2U_printContent2(p)
{

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

	eengine.showAll=1;

	//p = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html><head><style type='text/css'>@media print{.pagestart{page-break-after: always;}</style></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 = "<html><head>\n<style type='text/css'>@media print{.pagestart{page-break-after: always;}</style>\n</head><body onload=\"this.focus();this.print();\">" + p + "</body></html>";
	p = eengine.prepPrt(p);

	//alert(p);  
	eengine.prpCt(p, -1, 'printFrame', '', '', 1);
	//eengine.prpCt(p, -1, 'showFrame', '', '', 1);

	eengine.showAll=0;
  
}

function I2U_goPrevDocument()
{
	var i = 0;
	if (g_current_document_number > 1)
	{
		i = g_current_document_number - 1;
	}
	else
	{
		i = g_prtDocs.length;
	}
 
	i = i - 1;
	var _doc = g_prtDocs[i].split('|');
	var _start_page = parseInt(_doc[2]);
    this.setCurrentLocationInfo(_start_page);
  
	this.showPrint2();
}

function I2U_goNextDocument()
{
	var i = 0;
	if (g_current_document_number < g_prtDocs.length)
	{
		i = g_current_document_number + 1;
	}
	else
	{
		i = 1;
	}
 
	i = i - 1;
	var _doc = g_prtDocs[i].split('|');
	var _start_page = parseInt(_doc[2]);
	this.setCurrentLocationInfo(_start_page);
  
	this.showPrint2();
}

//-----------------------------------------------------------------------------
// End - Utility functions
//-----------------------------------------------------------------------------




//-----------------------------------------------------------------------------
// Begin - Miscellaneous functions
//-----------------------------------------------------------------------------

function I2U_addSurfAid( page, kwd, result ) {
	// Function stubbed out.  The reporting metrics now are handled by the reporting.js file.  However,
	// removing the function would require a modification to the catchPreview.js file.
}

function mod(a, b) { return a-Math.floor(a/b)*b } 

function copyArray(fromarray, toarray) {

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

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 trim(value) {
   var temp = value;
   var obj = /^(\s*)([\W\w]*)(\b\s*$)/;
   if (obj.test(temp)) { temp = temp.replace(obj, '$2'); }
   return temp;
}

function addDays(myDate,days) {
    return new Date(myDate.getTime() + days*24*60*60*1000);
}

function capFirstLetter(str) 
{

  var index;
  var tmpStr;
  var tmpChar;
  var preString;
  var postString;
  var strlen;
  tmpStr = str.toLowerCase();
  strLen = tmpStr.length;
  
  if (strLen > 0)  
  {
    for (index = 0; index < strLen; index++)  
    {
      if (index == 0)  
      {
        tmpChar = tmpStr.substring(0,1).toUpperCase();
        postString = tmpStr.substring(1,strLen);
        tmpStr = tmpChar + postString;
      }
      else 
      {
        tmpChar = tmpStr.substring(index, index+1);
      }
    }
  }
 
  return tmpStr;
  
}

function I2U_cleanDatabase()
{  
  var tmp_db = new Array();
  
  for (var j=0; j < this.db.length; j++)
  { 
    var t_str = this.db[j];
  
    for (var i=0; i < g_db_fixes.length; i++)
    {
      var fix_tokens = g_db_fixes[i].split('|');
      var obj = eval("/" + fix_tokens[0] + "/gi");    
      t_str = t_str.replace(obj, fix_tokens[1]);  
    }
    
    tmp_db[j] = t_str;
  }
     
  copyArray(tmp_db, this.db);

}

function I2U_loadImageMaps()
{
  if (t_imgMaps.length > 0)
  {    
    this.imgMaps = t_imgMaps;
  }
}

function cleanTOC() {
  
  var t_TocRef = new Array();
  copyArray(g_TocRef, t_TocRef);
  g_TocRef = Array();
  
  for (var i=0; i < t_TocRef.length; i++) {
    if (t_TocRef[i].indexOf('no_toc_defined') == -1 )
	{
	  g_TocRef[g_TocRef.length] = t_TocRef[i];
	}
  }
}

function I2U_showThumb2(e,objName,page_num) 
{
   
  //var rec_num = page_num - 1;
  //var record = this.db[rec_num].split('|');
  //var imgName = record[3]; 
  
  var book = eengine.navigate.transPosToPage(page_num);
  var imgName = eengine.kitData.documents[book.doc].pages[book.page].images.lowResolution;
  var imgName = imgName.substr();
  
  var url = "" + document.location;
  if (((url.indexOf("file") >= 0 || url.indexOf("10.2.1") >= 0 || url.indexOf("10.1.1") >= 0 || url.indexOf("preview.mobular.net") >= 0 || url.indexOf("localhost") >= 0)))
  {
    // imgName is a fully qualified URL to the IBM deployment URL.  When in preview/testing, make it a relative path to the low
	// res image.
	imgName = "images/lowres" + imgName.substring(imgName.lastIndexOf('/'));
  }
   
  if (e.clientX <= 400)
  {
  
    if ((obj=MM_findObj(objName)) != null) 
    {
      //document.getElementById('thumbnail_img').onerror = findThumbInExe;
      document.getElementById('thumbnail_img').onerror = "src='images/c.gif'";
      //document.getElementById('thumbnail_img').src='images/lowres/'+imgName;
	  document.getElementById('thumbnail_img').src = imgName;
    
      if (obj.style)
      {
        y_scroll_offset = 0;
        if (document.all)
        {
          y_scroll_offset = ( document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop );
          obj.style.top = y_scroll_offset + 100;
        }
        else if (document.getElementById) 
        {
          y_scroll_offset = window.pageYOffset;
          obj.style.top = y_scroll_offset + 100 + 'px';
        }
            
        obj.style.visibility='visible';
      }
    }
  }
}


function I2U_hideThumb2(objName) 
{
  if ((obj=MM_findObj(objName)) != null) 
  {
    if (obj.style) 
    {
      obj.style.visibility='hidden';
    }
  }
  document.getElementById('thumbnail_img').src='images/c.gif';
}

function MM_findObj(n, d) { //v4.0
    var p,i,x;
    if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && document.getElementById) x=document.getElementById(n); return x;
}

//-----------------------------------------------------------------------------
// Begin - Toggle page layout between single page and split page
//-----------------------------------------------------------------------------

function I2U_toggleLayout()
{
	// Original boltOn code removed.  Replaced with appropriate 9.1 engine call.
	eengine.switchLayout();  
}

//-----------------------------------------------------------------------------
// End - Toggle page layout between single page and split page
//-----------------------------------------------------------------------------






//-----------------------------------------------------------------------------
// Begin - Swap tag/right column promotion functions
//-----------------------------------------------------------------------------

// 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;
}

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

  var bread = this.makeBreadcrumb(); 
  if (document.getElementById('breadcrumb')) { document.getElementById('breadcrumb').innerHTML = bread; }  
  if (document.getElementById('dynamicRC')) { document.getElementById('dynamicRC').innerHTML = rc; }
  clearTimeout(g_rc_timeout_id);
  
  //if (g_rc_rotate && g_rc_currently_rotating)
  if (g_rc_rotate && g_rc_currently_rotating && rc_offers.length > g_max_rc_count)
  {
    g_rc_timeout_id = setTimeout("eengine.updateRC()", "" + g_rc_offer_timing);  
  }
    
  var obj = /\[\[SOLUTION_TYPE\]\]/ig;
  content = content.replace ( obj, g_solution_type );

  obj = /\[\[CURRENT_DOCUMENT\]\]/ig;
  content = content.replace ( obj, g_current_document_name );

  obj = /\[\[CURRENT_SECTION\]\]/ig;
  content = content.replace ( obj, g_current_section_name );

  obj = /\[\[CURRENT_PAGE\]\]/ig;
  content = content.replace ( obj, g_current_document_page );

  obj = /\[\[CURRENT_DOCUMENT_PAGE_COUNT\]\]/ig;
  content = content.replace ( obj, g_current_document_page_count );

  obj = /\[\[CURRENT_PAGE_TITLE\]\]/ig;
  content = content.replace ( obj, g_current_document_page_title );
  
  obj = /\[\[CURRENT_DOCUMENT_PDF_FILESIZE\]\]/ig;
  content = content.replace ( obj, g_current_document_pdf_filesize );


  // After MAPS runs this statement is unnecessary since it will replace all RD values.  It
  // is here for local development only.
  obj = /\[\[RD1\]\]/ig;
  content = content.replace ( obj, g_solution_type );
    
  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;
}

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

//alert('Inside makeRC...');
  
   var tmp_rc = "";
   var final_rc = "";
  
   this.rebuildRCOffersArray(key);  

   if (rc_offers.length > 0)
   {
   
     //var randomnumbervalue = random(0, rc_offers.length - 1); 
     var rc_start = (g_rc_rotate && rc_offers.length > g_max_rc_count ? random(0, rc_offers.length - 1) : 0)   
     var rc_limit = (rc_offers.length < g_max_rc_count ? rc_offers.length : g_max_rc_count)      

     for ( var i=rc_start; i < rc_start + rc_limit; i++ )
     {
  
       var k = i;
       if (k >= rc_offers.length) 
       { 
         k = i - rc_offers.length; 
       }    
       else if (k < 0)
       {
         k = i + rc_offers.length;
       }
  
       var line = rc_offers[k].split('|');
  
       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.indexOf("ftp://") == 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;
        
       g_current_rc_offer = k;
       copyArray(rc_offers, g_active_rc_offers);
  
    }
    
  }
  
  // check for any legal tags
  final_rc = this.cleanContent(final_rc);
    
  return final_rc;

}

function I2U_rebuildRCOffersArray(key)
{

  key = "" + key;

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

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

     var keys_from_input_file = line[0].split(',');

     for ( var j=0; j < keys_from_input_file.length; j++ )
     {

       if (possibleRCOffer (trim(key.toLowerCase()), trim(keys_from_input_file[j].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 k=1; k < 3; k++ ) {
            // 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[k].indexOf("/") != -1 ) {
               // col 0 = mm
               // col 1 = dd
               // col 2 = yyyy        
               y = 2;
               m = 0;
               d = 1;
               divider = '/';
            }
            
            date_array = line[k].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() ) ) 
         {
  
           rc_offers[rc_offers.length] = g_master_rc_offers[i];

         }
         
       }
        
       
     }

   } 

}

function I2U_updateRC()
{

//alert('Updating rc...');

  var tmp_rc = "";
  var final_rc = "";
  
  // There is a situation where if you minimize IE and then return to the e-doc/e-kit,
  // the whole right column is now missing.  The content is still present in the div
  // tag; however, it is not displayed.  The line below forces a redraw of this section.
  if (document.all)
  {
    //document.getElementById('globalRC').innerHTML = document.getElementById('globalRC').innerHTML;
    //document.getElementById('globalRC').style.visibility = "visible";
  }
  
  if (rc_offers.length > 0)
  {
  
    if (g_rc_rotate)
    {
      next_rc = g_current_rc_offer + 1;
    }
    else
    {
      next_rc = 0;
    }
    
    var loop_count = (rc_offers.length > g_max_rc_count ? g_max_rc_count : rc_offers.length)
    
    for ( var i=next_rc; i < next_rc + loop_count; i++ )
    {
  
       var k = i;
       if (k >= rc_offers.length) 
       { 
         k = i - rc_offers.length; 
       }    
       else if (k < 0)
       {
         k = i + rc_offers.length;
       }
             
       var line = rc_offers[k].split('|');
  
       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.indexOf("ftp://") == 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;
        
       g_current_rc_offer = k;
       copyArray(rc_offers, g_active_rc_offers);
  
    } 
  
  }
  
  // check for any legal tags
  final_rc = this.cleanContent(final_rc);
    
  if (document.getElementById('dynamicRC')) { document.getElementById('dynamicRC').innerHTML = final_rc; }
 
  if (g_rc_rotate && g_rc_currently_rotating)
  {
    g_rc_timeout_id = setTimeout("eengine.updateRC()", "" + g_rc_offer_timing);  
  }

}

// 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) 
{

  // Ensure no leading or trailing blanks on incoming offer tokens.
  key_from_ecatalog = trim(key_from_ecatalog);
  key_from_inputfile_offers = trim(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;");

  var return_value = 0;
  
  // Check for wildcards coming from the input file in an eKit.  If none, ensure
  // there are no embedded blanks in the doc name > page num designation.
  var rc_tokens_from_inputfile_offers = key_from_inputfile_offers.split('>');
  if (rc_tokens_from_inputfile_offers.length == 2) 
  { 
    var rc_tokens_from_ecatalog = key_from_ecatalog.split('>');
    if (rc_tokens_from_ecatalog.length == 2 && trim(rc_tokens_from_inputfile_offers[1]) == "*")
    {
      // Found a wildcard on the right side of the greater than sign indicating
      // to display a given offer for all pages within a given document.
      key_from_ecatalog = trim(rc_tokens_from_ecatalog[0]);
      key_from_inputfile_offers = trim(rc_tokens_from_inputfile_offers[0]);
    }
    else
    {
      // Remove any blanks around the ">" when trying to map to a product series.
      key_from_inputfile_offers = trim(rc_tokens_from_inputfile_offers[0]) + ">" + trim(rc_tokens_from_inputfile_offers[1]) 
    }
  }

//alert (key_from_ecatalog + '...' + key_from_inputfile_offers);
  
  switch(true)
  {
    // Any instance where a page number or document number/page number are 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 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;
      
    // Do a final check for the right page if a two page spread.
    case (eengine.show2pg == 1):
      if(g_solution_type == "kit")
      {
        var rc_tokens_from_ecatalog = key_from_ecatalog.split('>');
        var left_page_num = parseInt(rc_tokens_from_ecatalog[1]);
        var right_page_num = left_page_num + 1;
        var rc_for_right_page = rc_tokens_from_ecatalog[0] + ">" + right_page_num;
        if (rc_for_right_page == key_from_inputfile_offers && left_page_num != 1)
        {
          return_value = 1;
        }
      }
      else
      {
        var left_page_num = parseInt(key_from_ecatalog);
        var right_page_num = left_page_num + 1;
        if (right_page_num == key_from_inputfile_offers && left_page_num != 1)
        {
          return_value = 1;
        }
      }   
      break;
  
  }
  
  return return_value;

}

function I2U_rcNavShow()
{

  if (g_rc_rotate && rc_offers.length > g_max_rc_count)
  {
  
    clearTimeout(g_rc_nav_timeout_id);
    
    // CHECK FOR MICROSOFT DOM
    if (document.all) 
    {
  
      var rc_nav_x = 0;
      rc_nav_x = document.all.dynamicRC.offsetLeft;
      document.all.rc_nav.style.left = rc_nav_x;
  
      var rc_nav_y = 0;
      rc_nav_y = document.all.dynamicRC.offsetTop;
      rc_nav_y = rc_nav_y - 40;
      document.all.rc_nav.style.top = rc_nav_y;
  
      document.all.rc_nav.style.visibility = "visible";
    
    }
    // CHECK FOR LEVEL 1 DOM
    else if (document.getElementById)
    {
    
      var noPx = document.childNodes ? 'px' : 0;
  
      var rc_nav_x = 0;
      rc_nav_x = document.getElementById('dynamicRC').offsetLeft;
    
      document.getElementById("rc_nav").style.left = rc_nav_x + noPx;
      document.getElementById("rc_nav").style.pixelLeft = rc_nav_x;
  
      var rc_nav_y = 0;
      rc_nav_y = document.getElementById('dynamicRC').offsetTop;
      rc_nav_y = rc_nav_y - 40;
      document.getElementById("rc_nav").style.top = rc_nav_y + noPx;
      document.getElementById("rc_nav").style.pixelTop = rc_nav_y;
      
      document.getElementById("rc_nav").style.visibility = "visible";
  
    }
    
    g_rc_nav_timeout_id = setTimeout("eengine.rcNavHide()", "" + g_rc_nav_offer_timing);  
  
  }
  
}

function I2U_rcNavHide()
{

  document.getElementById("rc_nav").style.visibility = "hidden";

}

function I2U_rcNavClick(parm)
{

  clearTimeout(g_rc_timeout_id);
  clearTimeout(g_rc_nav_timeout_id);
  
  switch (parm)
  {  
    case 0:
      
      if (g_rc_rotate && g_rc_currently_rotating)
      {
        g_rc_currently_rotating = 0;
        document.getElementById("rc_center_img").src = "images/rc_start.gif";
        document.getElementById("rc_center_img").alt = "Start rotation";
      }
      else
      {
        g_rc_currently_rotating = 1;
        document.getElementById("rc_center_img").src = "images/rc_pause.gif";      
        document.getElementById("rc_center_img").alt = "Pause rotation";     
        g_rc_timeout_id = setTimeout("eengine.updateRC()", "" + g_rc_offer_timing);  
      }
           
      break;
    
    case -1:
   
      //g_current_rc_offer = g_current_rc_offer - g_max_rc_count - 1;
      g_current_rc_offer = g_current_rc_offer - (2 * g_max_rc_count);
      eengine.updateRC();
      break;
    
    case 1:
    
      //g_current_rc_offer = g_current_rc_offer + g_max_rc_count - 1;
      eengine.updateRC();
      break;
    
  }
    
  g_rc_nav_timeout_id = setTimeout("eengine.rcNavHide()", "" + g_rc_nav_offer_timing);  

}


// The RandomNumberGenerator (RNG) with the function 
// 'NextRandomNumber()' and the function 
// 'RandomNumberGenerator()' is an implementation of 
// the Park-Miller algorithm. (See 'Random Number Generators: Good 
// Ones Are Hard to Find', by Stephen K. Park and Keith W. Miller, 
// Communications of the ACM, 31(10):1192-1201, 1988.) The JScript 
// version was written by David N. Smith of IBM's T. J. Watson 
// Research Center. Mr. Smith notes that his version has not been 
// subjected to the rigorous testing required of a mission-critical RNG.

// You might have noticed that JScript's Math object includes 
// a built-in random() method. The version presented here should 
// work as well as, if not better than, the built-in implementations, 
// and will work uniformly on all platforms.

function NextRandomNumber()  {
  var hi   = this.seed / this.Q;
  var lo   = this.seed % this.Q;
  var test = this.A * lo - this.R * hi;
  if (test > 0)
    this.seed = test;
  else
    this.seed = test + this.M;
  return (this.seed * this.oneOverM);
}

function RandomNumberGenerator() {
  var d = new Date();
  this.seed = 2345678901 +
    (d.getSeconds() * 0xFFFFFF) +
    (d.getMinutes() * 0xFFFF);
  this.A = 48271;
  this.M = 2147483647;
  this.Q = this.M / this.A;
  this.R = this.M % this.A;
  this.oneOverM = 1.0 / this.M;
  this.next = NextRandomNumber;
  return this;
}

function random(lrn, urn) {
  // Random LowerRange Number (lrn)
  // Random UpperRange Number (urn)
  // return Math.round((urn - lrn + 1) * rand.next() + lrn);
  return Math.floor((urn - lrn + 1) * rand.next() + lrn);
}







// 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;
}








// RSS feed functions for right column promotions


function I2U_loadRCOffers()
{

  // Make a copy of the rcoffers array for use when processing the dynamic portion of the
  // right column promotions.
  var t_rc_offers = new Array();
  copyArray(rc_offers, t_rc_offers);
  
  // First take any RSS feeds out of the rc_offers array so that on initial startup
  // you don't have an offer who's title is "doClickThrough2...".
  rc_offers.length = 0;

  for (var i=0; i < t_rc_offers.length; i++)
  {
  
    var line = t_rc_offers[i].split('|');
 
    if (! (line[7].toLowerCase().indexOf('.rss') == line[7].length - 4 ||  
           line[7].toLowerCase().indexOf('.xml') == line[7].length - 4))
    {  
      rc_offers[rc_offers.length] = t_rc_offers[i];
    }
    
  }
  
  // Then rebuild the offers combining entries from the input file and any RSS feeds. 
  
  for (var i=0; i < t_rc_offers.length; i++)
  {
  
    var line = t_rc_offers[i].split('|');
 
    if ((line[7].toLowerCase().indexOf('.rss') == line[7].length - 4 ||  
         line[7].toLowerCase().indexOf('.xml') == line[7].length - 4))
    {
    
      g_rc_pages_mapping = line[0];
      //alert ('Pull RSS...');
      
      var feed = "";
      if (line[7].toLowerCase().indexOf('http') == 0)
      {
        feed = line[7];
      }
      else
      {
        feed = document.location + line[7];
      }    
      this.pullFeed(feed);
      
      // Because this is an asynchronous call, when mulitiple feeds are 
      // pulled the g_rc_pages_mapping variable gets overwritten and can
      // cause the mapping of an offer to the wrong place in the e-doc/kit.
      // Therefore, sleep for a few seconds and let's hope they come back in
      // the right order.
      //sleep(5);
      
    }
    else
    {
      g_master_rc_offers[g_master_rc_offers.length] = t_rc_offers[i];
    }
    
  }
     
}




function sleep(seconds)
{

  naptime = seconds * 1000;
  var sleeping = true;
  var now = new Date();
  var alarm;
  var startingMSeconds = now.getTime();
  //alert("starting nap at timestamp: " + startingMSeconds + "\nWill sleep for: " + naptime + " ms");
  while(sleeping)
  {
    alarm = new Date();
    alarmMSeconds = alarm.getTime();
    if(alarmMSeconds - startingMSeconds > naptime){ sleeping = false; }
  } 
  //alert("Wakeup!");
  
}


function I2U_pullFeed(url) {

   try
   {
		this.IssueAjaxRequest(url, I2U_checkState);
   }
   catch (e)
   {

   }
}

function I2U_checkState(request, timeStamp)
{
    var g_xmlFeed = request.responseXML.documentElement; 
	if (g_xmlFeed)
	{ 
		eengine.processXML(g_xmlFeed);
	}		  
}

function I2U_processXML(xmlDoc) {

    // pull returned xml 

    var items = xmlDoc.getElementsByTagName('item');

    var title = "";
    var description = "";
    var link = "";
    
    // Assume that if an item is in the feed, it must be included.  Therefore, hardcode
    // the dates to make sure it displays.
    var start_date = "2006-01-01";
    var end_date = "2060-01-01";
    var space = " ";
    var pipe = "|";
    var offer = "";

    for (var i=0; i < items.length; i++)
    {

      if (items[i].getElementsByTagName('title')[0] && items[i].getElementsByTagName('title')[0].firstChild) { title = trim(items[i].getElementsByTagName('title')[0].firstChild.data); } else { title = " "; }
      if (items[i].getElementsByTagName('description')[0] && items[i].getElementsByTagName('description')[0].firstChild) { description = trim(items[i].getElementsByTagName('description')[0].firstChild.data); } else { description = " "; }
      if (items[i].getElementsByTagName('link')[0] && items[i].getElementsByTagName('link')[0].firstChild) { link = trim(items[i].getElementsByTagName('link')[0].firstChild.data); } else { link = " "; }
    
      if (title.toLowerCase() != "terms of use")
      {
        // Add the item to the g_master_rc_offers array
         
        // Need to check to see if the string is HTML.  If so, do not truncate it.
        var t_description = description;
        var obj = /<br[^>]*>/ig;
        t_description = t_description.replace(obj, "");

        if (! t_description.match(/<\/?[a-z][a-z0-9]*[^<>]*>/)) 
        {
          if (t_description.length > g_max_rc_desc_length)
          {
            description = description.substring(0, g_max_rc_desc_length - 1) + "...";
          }       
        }
                
        // Make sure there are no pipes
        obj = eval("/\\|/gi");
        title = title.replace(obj, "&#124;");
        description = description.replace(obj, "&#124;");       
        link = link.replace(obj, "&#124;");       
        
        if (link.indexOf("http") < 0 && link.indexOf("www.") == 0)
        {
          link = "http://" + link;
        }
        
        //alert(title + "|" + description + "|" + link);
        
        // *|2006-01-01|2006-12-31|iSeriesHero1_RightBox.jpg|Testing8|148|59|http://localhost/rss/system_i_offerings.rss|Learn more|http://www.ibm.com/systems/i/| | | | | | |Need more information on how System i5 solutions can simplify your IT?"

        //offer = g_rc_pages_mapping;
        offer = "*";
        offer += pipe + start_date;
        offer += pipe + end_date;
        offer += pipe + space;                     // image
        offer += pipe + space;                     // alt_tag
        offer += pipe + space;                     // height
        offer += pipe + space;                     // width
        offer += pipe + title;                     // title
        offer += pipe + g_rc_action_description;   // action_desc1 (e.g. Learn more)
        offer += pipe + link;                      // action1
        offer += pipe + space;                     // action_desc2
        offer += pipe + space;                     // action2
        offer += pipe + space;                     // action_desc3
        offer += pipe + space;                     // action3
        offer += pipe + space;                     // action_desc4
        offer += pipe + space;                     // action4
        offer += pipe + description;               // description/copy
        
        // Escape the offer ... if it's not HTML where the double quotes are needed.
        if (! t_description.match(/<\/?[a-z][a-z0-9]*[^<>]*>/)) 
        {
          obj = eval("/\"/gi");
          offer = offer.replace(obj, "&#034;");
        }             

        // Add it to the array
        g_master_rc_offers[g_master_rc_offers.length] = offer;
        
      }
      
    }
    
    var current_page = g_current_page_absolute - g_current_document_start_page + 1;  
    var key = (g_prtDocs.length == 1 ? g_current_page_absolute : g_current_document_number + ">" + current_page)    
    this.rebuildRCOffersArray(key);  
     
//alert (rc_offers.length);
     
    clearTimeout(g_rc_timeout_id);
    if (g_rc_rotate && g_rc_currently_rotating && rc_offers.length > g_max_rc_count)
    {
      g_rc_timeout_id = setTimeout("eengine.updateRC()", "" + g_rc_offer_timing);  
    }
    else if (! g_rc_rotate || rc_offers.length <= g_max_rc_count)
    {
      eengine.updateRC();
    }
}

//-----------------------------------------------------------------------------
// End - Swap tag/right column promotion 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.g_bread_actions[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.g_bread_actions.length; i++ ) {
      this.g_bread_actions[i] = "";
      this.g_bread[i] = "";
   }
   this.g_bread_actions.length = n;
   this.g_bread.length = n;
   
   if ( this.g_bread_actions == "" ) {
      this.g_bread_actions = new Array();
      this.g_bread = new Array();
      this.g_bread[ this.g_bread.length ] = capFirstLetter(g_solution_type) + g_spacecover;
      this.g_bread_actions[ this.g_bread_actions.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.g_bread_actions.length; i++ ) {
      var line = this.g_bread_actions[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() {

//alert (this.g_bread);
//alert (this.g_bread_actions);

  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 = "";
  
  for ( var i=0; i < this.g_bread_actions.length; i++ ) {
    if ( final_bread != '' ) {
       final_bread += bread_divider;
    }
       
//    if ( i < this.g_bread_actions.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_link_st + "eengine.walkBreadcrumb(" + i + ")" + bread_link_ed + this.g_bread[i] + "</a>";

  }
  
  final_bread += bread_divider;

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

//alert (final_bread);

  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.g_bread_actions[ this.g_bread_actions.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.g_bread_actions[ this.g_bread_actions.length-1 ] == this.g_bread_actions[ this.g_bread_actions.length-2 ] ) {
      // remove dupe
      this.g_bread_actions.length = this.g_bread_actions.length-1;  
      this.g_bread.length = this.g_bread.length-1;
    }
    
}

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



//-----------------------------------------------------------------------------
// 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
//-----------------------------------------------------------------------------


//-----------------------------------------------------------------------------
// Display templates
//-----------------------------------------------------------------------------
 
var g_custom_cover_page = "";

var t_imgMaps = new Array();




var g_requestaquote_link = "http://ibm.com/vrm/raq/106AJ03W/175/oracle_cr_book";

var g_printdetail = "";
    g_printdetail += "\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
    g_printdetail += "\n ";
    g_printdetail += "\n   <tr><td valign=\"middle\"><table border=\"0\"><tr><td><center><img src=\"images/[[col3]]\" border=\"1\"></center></td></tr></table></td></tr>";
    g_printdetail += "\n ";
    g_printdetail += "\n </table>";

var g_global_rc = "";
    g_global_rc += "\n <!--	BEGIN GLOBAL SECTION OF RIGHT COLUMN -->";
    g_global_rc += "\n ";
    g_global_rc += "\n <!-- g_any_contact_module_links";
    g_global_rc += "\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"150\">";
    g_global_rc += "\n ";
    g_global_rc += "\n   <tr>";
    g_global_rc += "\n     <td valign=\"top\"><img src=\"images/c.gif\" alt=\"\" height=\"6\" width=\"1\" border=\"0\" /></td>";
    g_global_rc += "\n   </tr>";
    g_global_rc += "\n ";
    g_global_rc += "\n   <tr>";
    g_global_rc += "\n     <td class=\"v14-header-1-small\">[[g_contact_module_title]]</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 border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"v14-gray-table-border\">";
    g_global_rc += "\n ";
    g_global_rc += "\n 	    <tr>";
    g_global_rc += "\n 	      <td width=\"150\" class=\"no-padding\">";
    g_global_rc += "\n 	        <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"148\">";
    g_global_rc += "\n               <tr valign=\"top\">";
    g_global_rc += "\n                 <td class=\"iltbp\"><img src=\"images/face.gif\" height=\"36\" width=\"36\" alt=\"\"/></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             </table>";
    g_global_rc += "\n           </td>";
    g_global_rc += "\n         </tr>";
    g_global_rc += "\n ";
    g_global_rc += "\n -->";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n         <!-- g_orderonline_link";
    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               <tr valign=\"top\">";
    g_global_rc += "\n                 <td><img height=\"21\" src=\"images/arrow_rd.gif\" width=\"21\" alt=\"\"/></td>";
    g_global_rc += "\n                 <td class=\"spl ipt\">";
    g_global_rc += "\n                   <b>";
    g_global_rc += "\n                     <a href=\"index.html\" onclick=\"if(total_load==1){eengine.doStandardClickThrough('OrderOnline','ContactModule')}else{alert(loadWarn)} return false;\" class=\"smallplainlink\">";
    g_global_rc += "\n                       Order online";
    g_global_rc += "\n                     </a>";
    g_global_rc += "\n                   </b>";
    g_global_rc += "\n                 </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><td><img height=\"5\" src=\"images/c.gif\" width=\"1\" alt=\"\"/></td></tr>";
    g_global_rc += "\n         -->";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n         <!-- g_callmenow_link";
    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               <tr valign=\"top\">";
    g_global_rc += "\n                 <td><img height=\"21\" src=\"images/phone_rd.gif\" width=\"21\" alt=\"\"/></td>";
    g_global_rc += "\n                 <td class=\"spl ipt\">";
    g_global_rc += "\n                   <b>";
    g_global_rc += "\n                     <a href=\"index.html\" onclick=\"if(total_load==1){eengine.doStandardClickThrough('CallMeNow','ContactModule')}else{alert(loadWarn)} return false;\" class=\"smallplainlink\">";
    g_global_rc += "\n                       Call me 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             </table>";
    g_global_rc += "\n           </td>";
    g_global_rc += "\n         </tr>";
    g_global_rc += "\n ";
    g_global_rc += "\n         <tr><td><img height=\"5\" src=\"images/c.gif\" width=\"1\" alt=\"\"/></td></tr>";
    g_global_rc += "\n         -->";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n         <!-- g_callmelater_link";
    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               <tr valign=\"top\">";
    g_global_rc += "\n                 <td><img height=\"21\" src=\"images/phone_rd.gif\" width=\"21\" alt=\"\"/></td>";
    g_global_rc += "\n                 <td class=\"spl ipt\">";
    g_global_rc += "\n                   <b>";
    g_global_rc += "\n                     <a href=\"index.html\" onclick=\"if(total_load==1){eengine.doStandardClickThrough('CallMeLater','ContactModule')}else{alert(loadWarn)} return false;\" class=\"smallplainlink\">";
    g_global_rc += "\n                       Call me later";
    g_global_rc += "\n                     </a>";
    g_global_rc += "\n                   </b>";
    g_global_rc += "\n                 </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><td><img height=\"5\" src=\"images/c.gif\" width=\"1\" alt=\"\"/></td></tr>";
    g_global_rc += "\n         -->";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n         <!-- g_textchat_link";
    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               <tr valign=\"top\">";
    g_global_rc += "\n                 <td><img height=\"21\" src=\"images/chat_rd.gif\" width=\"21\" alt=\"\"/></td>";
    g_global_rc += "\n                 <td class=\"spl ipt\">";
    g_global_rc += "\n                   <b>";
    g_global_rc += "\n                     <a href=\"index.html\" onclick=\"if(total_load==1){eengine.doStandardClickThrough('TextChat','ContactModule')}else{alert(loadWarn)} return false;\" class=\"smallplainlink\">";
    g_global_rc += "\n                       Online text chat";
    g_global_rc += "\n                     </a>";
    g_global_rc += "\n                   </b>";
    g_global_rc += "\n                 </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><td><img height=\"5\" src=\"images/c.gif\" width=\"1\" alt=\"\"/></td></tr>";
    g_global_rc += "\n         -->";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n         <!-- g_requestaquote_link";
    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               <tr valign=\"top\">";
    g_global_rc += "\n                 <td><img height=\"21\" src=\"images/arrow_rd.gif\" width=\"21\" alt=\"\"/></td>";
    g_global_rc += "\n                 <td class=\"spl ipt\">";
    g_global_rc += "\n                   <b>";
    g_global_rc += "\n                     <a href=\"index.html\" onclick=\"if(total_load==1){eengine.doStandardClickThrough('RequestAQuote','ContactModule')}else{alert(loadWarn)} return false;\" class=\"smallplainlink\">";
    g_global_rc += "\n                       Request a quote";
    g_global_rc += "\n                     </a>";
    g_global_rc += "\n                   </b>";
    g_global_rc += "\n                 </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><td><img height=\"5\" src=\"images/c.gif\" width=\"1\" alt=\"\"/></td></tr>";
    g_global_rc += "\n         -->";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n         <!-- g_emailus_link";
    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               <tr valign=\"top\">";
    g_global_rc += "\n                 <td><img height=\"21\" src=\"images/email_rd.gif\" width=\"21\" alt=\"\"/></td>";
    g_global_rc += "\n                 <td class=\"spl ipt\">";
    g_global_rc += "\n                   <b>";
    g_global_rc += "\n                     <a href=\"index.html\" onclick=\"if(total_load==1){eengine.doStandardClickThrough('EmailUs','ContactModule')}else{alert(loadWarn)} return false;\" class=\"smallplainlink\">";
    g_global_rc += "\n                       Email us";
    g_global_rc += "\n                     </a>";
    g_global_rc += "\n                   </b>";
    g_global_rc += "\n                 </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><td><img height=\"5\" src=\"images/c.gif\" width=\"1\" alt=\"\"/></td></tr>";
    g_global_rc += "\n         -->";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n         <!-- g_contact_rc_link";
    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               <tr valign=\"top\">";
    g_global_rc += "\n                 <td><img height=\"21\" src=\"images/arrow_rd.gif\" width=\"21\" alt=\"\"/></td>";
    g_global_rc += "\n                 <td class=\"spl ipt\">";
    g_global_rc += "\n                   <b>";
    g_global_rc += "\n                     <a href=\"index.html\" onclick=\"if(total_load==1){eengine.doStandardClickThrough('Contact','ContactModule')}else{alert(loadWarn)} return false;\" class=\"smallplainlink\">";
    g_global_rc += "\n                       Contact us";
    g_global_rc += "\n                     </a>";
    g_global_rc += "\n                   </b>";
    g_global_rc += "\n                 </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><td><img height=\"5\" src=\"images/c.gif\" width=\"1\" alt=\"\"/></td></tr>";
    g_global_rc += "\n         -->";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n ";
    g_global_rc += "\n <!-- g_any_contact_module_links";
    g_global_rc += "\n         <tr><td><img height=\"1\" src=\"images/c.gif\" width=\"1\" alt=\"\"/></td></tr>";
    g_global_rc += "\n -->";
    g_global_rc += "\n ";
    g_global_rc += "\n         <!-- g_phone_number";
    g_global_rc += "\n         <tr><td class=\"lgray\"><img height=\"1\" src=\"images/c.gif\" width=\"1\" alt=\"\"/></td></tr>";
    g_global_rc += "\n ";
    g_global_rc += "\n         <tr>";
    g_global_rc += "\n           <td>";
    g_global_rc += "\n             <p class=\"smgraytext\">[[g_phone_number]]</b></p>";
    g_global_rc += "\n           </td>";
    g_global_rc += "\n         </tr>";
    g_global_rc += "\n         -->";
    g_global_rc += "\n ";
    g_global_rc += "\n <!-- g_any_contact_module_links";
    g_global_rc += "\n       </table>";
    g_global_rc += "\n     </td>";
    g_global_rc += "\n   </tr>";
    g_global_rc += "\n </table>";
    g_global_rc += "\n -->";
    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 [[lbl=<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"150\"><tr><td class=\"v14-header-4-small\" onmouseover=\"eengine.rcNavShow();\">[[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\" onmouseover=\"eengine.rcNavShow();\"><img src=\"images/[[col3]]\" onerror=\"file='[[col3]]';if(eengine.exe == 1){this.src=eengine.getExeImageName(file,0);}\" width=\"[[col5]]\" height=\"[[col6]]\" 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\" onmouseover=\"eengine.rcNavShow();\"><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=\"breadcrumb\" 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=\"divider\" style=\"text-decoration:none; font-size:11\">|</span>&nbsp;";
    g_actionStackNone += "\n     </td>";
    g_actionStackNone += "\n 	<td valign=\"top\">";
    g_actionStackNone += "\n       <span class=\"breadcrumb\" 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=\"breadcrumb\" 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=\"divider\" 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=\"breadcrumb\" 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=\"breadcrumb\" style=\"color:#000000;\"><b>Back</b></a>";
    g_actionStackTop += "\n     </td>";
    g_actionStackTop += "\n 	<td valign=\"top\">";
    g_actionStackTop += "\n       &nbsp;<span class=\"divider\" style=\"text-decoration:none; font-size:11\">|</span>&nbsp;";
    g_actionStackTop += "\n     </td>";
    g_actionStackTop += "\n 	<td valign=\"top\">";
    g_actionStackTop += "\n       <span class=\"breadcrumb\" 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=\"breadcrumb\" style=\"color:#000000;\"><b>Back</b></a>";
    g_actionStackMid += "\n     </td>";
    g_actionStackMid += "\n 	<td valign=\"top\">";
    g_actionStackMid += "\n       &nbsp;<span class=\"divider\" 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=\"breadcrumb\" 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_kitCoverMatch = "";
    g_kitCoverMatch += "\n <!--	Begin content -->";
    g_kitCoverMatch += "\n ";
    g_kitCoverMatch += "\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"814\">";
    g_kitCoverMatch += "\n   <tr>";
    g_kitCoverMatch += "\n     <td colspan=\"3\" align=\"center\"><img src=\"images/c.gif\" alt=\"\" /> </td>";
    g_kitCoverMatch += "\n   </tr>";
    g_kitCoverMatch += "\n   <tr>";
    g_kitCoverMatch += "\n     <td width=\"107\"><img src=\"images/c.gif\" width=\"100\" height=\"1\" alt=\"\" /> </td>";
    g_kitCoverMatch += "\n     <td width=\"600\">";
    g_kitCoverMatch += "\n 	  <table border=\"0\" cellspacing=\"0\" cellpadding=\"8\" width=\"600\" valign=\"top\">";
    g_kitCoverMatch += "\n         <tr>";
    g_kitCoverMatch += "\n           <td colspan=\"2\" style=\"border-bottom:1px solid black;\">";
    g_kitCoverMatch += "\n For your convenience, we have created interactive editions of documents and packed them into this e-kit.  These interactive documents are designed for comfortable reading and navigation.  The search features help you find what you need quickly and efficiently.  You can also download the e-kit for off-line reading and printing.";
    g_kitCoverMatch += "\n           </td>";
    g_kitCoverMatch += "\n         </tr>";
    g_kitCoverMatch += "\n         <tr>";
    g_kitCoverMatch += "\n           <td><img src=\"images/c.gif\" width=\"16\" height=\"1\" alt=\"\" /></td>";
    g_kitCoverMatch += "\n           <td><img src=\"images/c.gif\" width=\"550\" height=\"1\" alt=\"\" /></td>";
    g_kitCoverMatch += "\n         </tr>";
    g_kitCoverMatch += "\n ";
    g_kitCoverMatch += "\n SHOWMATCHRESULTS";
    g_kitCoverMatch += "\n ";
    g_kitCoverMatch += "\n       </table>";
    g_kitCoverMatch += "\n     </td>";
    g_kitCoverMatch += "\n     <td width=\"107\"><img src=\"images/c.gif\" width=\"100\" height=\"1\" alt=\"\" /></td>";
    g_kitCoverMatch += "\n   </tr>";
    g_kitCoverMatch += "\n </table>";
    g_kitCoverMatch += "\n ";
    g_kitCoverMatch += "\n <!--	End content -->";

var g_kitCoverSpread = "";
    g_kitCoverSpread += "\n <tr class=\"[[row_class]]\">";
    g_kitCoverSpread += "\n   <td align=\"left\" valign=\"top\">";
    g_kitCoverSpread += "\n     <img src=\"images/mobular_small.gif\" width=\"16\" height=\"16\" alt=\"\" />";
    g_kitCoverSpread += "\n   </td>";
    g_kitCoverSpread += "\n   <td align=\"left\" valign=\"top\">";
    g_kitCoverSpread += "\n     <a href=\"[[doc_name]]\" onclick=\"eengine.hideThumb2('thumb');eengine.writePage([[book]]);return false;\" onmouseover=\"eengine.showThumb2(event,'thumb','[[page_num]]');\" onmouseout=\"eengine.hideThumb('thumb');\" style=\"text-decoration:none\">";
    g_kitCoverSpread += "\n       <h2>[[doc_name]]</h2>";
    g_kitCoverSpread += "\n     </a>";
    g_kitCoverSpread += "\n     [[subtitle]]";
    g_kitCoverSpread += "\n   </td>";
    g_kitCoverSpread += "\n </tr>";

var prtDocsFileSizes = new Array(
"15.9MB"
);

var prtDocsSubtitles = new Array(
);

var rc_offers = new Array(
"*|2006-08-17|2008-08-31| |Customer reference| | |Customer reference|Extending the value of your investments through connectivity and reuse|http://www.ibm.com/marketing/edocument/sap/klc_reuse_kit|IBM SAP Customer Reference book|http://www.ibm.com/marketing/edocument/sap/sap_cr_book| | | | |"
);
