// FileCombiner - Fri Oct 09 16:01:53 EDT 2009 - ScriptCombiner_GenericListCore.properties
// FileCombiner - BEGIN - DojoRefresh.js
var UPDATE_PRODUCT_FILTER = "updateProductFilter";

var numPortletObjects = 0;
var portletObjects = new Array();

//add the input portlet object to the collection of portlet objects.
//
// portletObject - the portlet javascript object
function addPortletObject(portletObject)
{
	portletObjects[numPortletObjects] = portletObject;
	numPortletObjects = numPortletObjects + 1;
}
//loop through the collection of portlet objects and call each object's refresh method to refresh the portlet's
//data if necessary.
//
// action - the action causing the refresh
function refresh(action)
{
	var numPortletObjects = portletObjects.length;
	for (var i = 0; i < numPortletObjects; i++)
	{
		portletObjects[i].refresh(action);
	}
}
//unescape the input text, and turn characters strings of %20 into spaces.
//
// text - the text to unescape
function unEscape(text)
{
	text = unescape(text);
		 		
	//spaces were encoded specifically to %20 by the back-end servlet, because the Java encode function normally turns spaces into plusses, 
	//and the javascript unescape does not turn them back.  turn all occurences of a %20 character string to a blank.
	text = text.replace(/%20/g, " ");
	return text;
}
// FileCombiner - END - DojoRefresh.js
// FileCombiner - BEGIN - DojoGList.js
dojo.declare("DojoGList", DojoAjax, 
{
	//reviewed - 
	//the DojoAjax constructor that takes the following parameters:
	//
	// servletUrl - the URL of the AJAX servlet
	// portletUniqueName - the unique name of the portlet
	// portletMode - the mode the portlet is currently in
	// namespace - the encoded namespace of the portlet
	constructor: function(servletUrl, portletUniqueName, portletMode, namespace)
	{
		this.servletUrl = servletUrl;
		this.portletUniqueName = portletUniqueName;
		this.portletMode = portletMode;
		this.namespace = namespace;
		this.isContextComplete = "false";
	},
	//this is callback function to build updated context 
	refreshContextLayer: function(response, ioArgs)
	{
		var text = response;
		var products = eval('(' + text + ')');
		return response;
	
	},
	refresh: function(action)
	{
		if (action == UPDATE_PRODUCT_FILTER)
		{
			var parms = {"com.ibm.wplc.controller.action":"com.ibm.spe.genericList.action.UpdateSelectedProducts","com.ibm.wplc.controller.uniquePortletName": this.portletUniqueName, "com.ibm.wplc.controller.portletMode": this.portletMode}; 
			this.sendRequest(this.servletUrl, parms, dojo.hitch(this, this.insertProductNames));
		}
	},
	//this is the callback function to insert product choice
	insertProductNames: function(response, ioArgs)
	{
		var text = response;
		var selectedProductsDiv = dojo.byId(this.namespace + "_selectedProductsDiv");	
		selectedProductsDiv.style.display = "none";
		selectedProductsDiv.innerHTML = text;							
	} ,
	//callback function that does nothing
	doNothingCallback: function()
	{
	},
	//display the abstracts
	//
	//  groupName - the name of the group being processed
	//	abstractElementName - the name of the abstract elements
	//	translatedAbstractElementName - the name of the translated abstract elements
	moreDetails: function(groupName, abstractElementName, translatedAbstractElementName)
	{
		return this.hideShowAbstracts(groupName, abstractElementName, translatedAbstractElementName, "block");
	},
	//hide the abstracts
	//
	//  groupName - the name of the group being processed	
	//	abstractElementName - the name of the abstract elements
	//	translatedAbstractElementName - the name of the translated abstract elements
	lessDetails: function(groupName, abstractElementName, translatedAbstractElementName)
	{		
		return this.hideShowAbstracts(groupName, abstractElementName, translatedAbstractElementName, "none");
	},
	//common method to hide/show the abstracts as requested
	//  groupName - the name of the group being processed	
	//	abstractElementName - the name of the abstract elements
	//	translatedAbstractElementName - the name of the translated abstract elements
	//	displayValue - the value to set the element's style display value
	hideShowAbstracts: function(groupName, abstractElementName, translatedAbstractElementName, displayValue)
	{
		//hide/show the abstracts and then make an AJAX call to persist the display state.
		this.setAbstractDisplay(abstractElementName, displayValue);
		this.setAbstractDisplay(translatedAbstractElementName, displayValue);
		var parms = {"com.ibm.wplc.controller.action":"com.ibm.spe.genericList.action.ChangeAbstractDisplay","com.ibm.wplc.controller.uniquePortletName": this.portletUniqueName, "com.ibm.wplc.controller.portletMode": this.portletMode, groupName: groupName, abstractDisplay: displayValue}; 
		this.sendRequest(this.servletUrl, parms);
		return false;
	},
	//hide or show the abstracts as specified
	//	abstractElementName - the name of the abstract elements
	//	displayValue - the value to set the element's style display value	
	setAbstractDisplay: function(abstractElementName, displayValue)
	{
		//this uses getElementsByTagName rather than getElementsByName because getElementsByName doesn't work
		//in IE.
		var abstractDivs = document.getElementsByTagName("div");
		var numAbstractDivs = abstractDivs.length;
		var abstractDiv;
		for (var i = 0; i < numAbstractDivs; i++)
		{
			abstractDiv = abstractDivs[i];
			if (abstractDiv.getAttribute("name") == abstractElementName)
			{
				abstractDiv.style.display = displayValue;
			}
		}
	}
});
// FileCombiner - END - DojoGList.js
// FileCombiner - BEGIN - DojoExpandGroup.js
dojo.declare("DojoExpandGroup", DojoAjax, 
{
	//the DojoAjax constructor that takes the following parameters:
	
	//servletUrl - the URL of the AJAX servlet 
	//portletUniqueName - the unique name of the portlet 
	//portletMode - the mode the portlet is currently in
	//namespace - the encoded namespace of the portlet
	constructor: function(servletUrl, portletUniqueName, portletMode, namespace)
	{
		this.servletUrl = servletUrl;
		this.portletUniqueName = portletUniqueName;
		this.portletMode = portletMode;
		this.namespace = namespace;
		this.isContextComplete = "false";
	},
	// This function sends an AJAX request to the server to record the expansion of
	// a twistie in the portlet's view bean.
	expandGroup: function(id,catName)
	{
		this.categoryID  = id;
		this.catName = catName;
		var parms = {"com.ibm.wplc.controller.action": "com.ibm.spe.genericList.action.ExpandGroup", expandedGroupName: this.catName, "com.ibm.wplc.controller.uniquePortletName": this.portletUniqueName, "com.ibm.wplc.controller.portletMode": this.portletMode};
		this.sendRequest(this.servletUrl, parms);
		return false;							
	},
	// This function sends an AJAX request to the server to record the collapse of
	// a twistie in the portlet's view bean.
	collapseGroup: function(id,catName)
	{
		this.categoryID  = id;
		this.catName = catName;
		var parms = {"com.ibm.wplc.controller.action": "com.ibm.spe.genericList.action.CollapseGroup", collapsedGroupName: this.catName, "com.ibm.wplc.controller.uniquePortletName": this.portletUniqueName, "com.ibm.wplc.controller.portletMode": this.portletMode};
		this.sendRequest(this.servletUrl, parms);
		return false;							
	},
	// This function expands the twistie with the passed id and collapses all other
	// twisties on the page.  This is called when a key is pressed on the section.
	switchTwistieGroupWithKeyPress: function(event,id,catName,nameSpace)
	{		
		//ignore the tab key.
		if (event.keyCode != 9)
		{
			return this.switchTwistieGroup(id, catName, nameSpace);
		}
	},
	// This function expands the twistie with the passed id and collapses all other
	// twisties on the page.
	switchTwistieGroup: function(id,catName,nameSpace)
	{	
		expcolVal = this.styleUpdate(id,catName,nameSpace);
		
		// Send the appropriate Ajax request to the server to record the expansion or collapse 
		// of a twistie in the portlet's view bean.
 		if (expcolVal == "expand")
  		{
  			this.expandGroup(id,catName);
  		}
  		else 
  		{
  			this.collapseGroup(id,catName);
  		}
		return false;							
	},
	//this is the function to switch the twistie direction on the selected section
	//and to show the links under that product/section.  the jsps call switchTwistieGroup
	//and that function moves over to this step next.  this step then calls closeOthers (below)
	//the values sent to this function are id: <portlet:namespace/>group<<count>>_body_<<portlettype>>, 
	//catName: <<category name>> , and nameSpace: <portlet:namespace/>
	styleUpdate: function(id,catName,nameSpace)
	{
		var contentDiv, fullPageDiv, contentDivStyle, fullPageDivStyle, expcolVal;
  		
  		var splitID=id.split("_");
		var portletType = splitID[5];
		var whichCategory = splitID[3].substr(5);
		
		var headerDiv = nameSpace+"links_"+portletType+"_group_"+whichCategory;
		
		// If the twistie div contains an element that contains filter data, 
		// toggle the visibility of that element.
		// NOTE: The display style attribute on the filter element in the jsp 
		//       must specify either "block" or "display".
		var filterSectionId = nameSpace + "filter_group_" + whichCategory;
		var filterSection = dojo.byId(filterSectionId);
		if(filterSection != null)
		{
			filterDisplay = filterSection.style.display;
			if(filterDisplay == "block")
			{
				filterSection.style.display="none";
			}
			else if(filterDisplay == "none")
			{
				filterSection.style.display = "block";
			}
		}
  		
 		//getting a hold of the content div
 		if( document.getElementById ) //this is the way the standards work 
    		contentDiv = document.getElementById( nameSpace+"group"+whichCategory+"_body_" + portletType);
  		else if( document.all )  //this is the way old msie versions work 
     		contentDiv = document.all[nameSpace+"group"+whichCategory+"_body_" + portletType ];
  		else if( document.layers ) //this is the way nn4 works
    		contentDiv = document.layers[nameSpace+"group"+whichCategory+"_body_" + portletType ];
  		contentDivStyle = contentDiv.style;
  
  		//getting a hold of the Show all navigation div
  		if( document.getElementById )
    		fullPageDiv = document.getElementById( nameSpace+whichCategory+"showall" );
  		else if( document.all )
      		fullPageDiv = document.all[nameSpace+whichCategory+"showall" ];
  		else if( document.layers )
    		fullPageDiv = document.layers[nameSpace+whichCategory+"showall" ];
  		if (fullPageDiv != null) 
  		{
  			fullPageDivStyle = fullPageDiv.style;
  		}
		var hideShowIcon = dojo.byId(headerDiv + "hideShowImage");
		
		//the section might be hidden with a style class, or with a different image.  if the image exists,
		//swap to the other image.  otherwise, handle the class change.
		if (hideShowIcon != undefined)
		{
			var hideShowIconSrc = hideShowIcon.src;
			var fileNamePosition = hideShowIconSrc.indexOf("/images");
			if (hideShowIconSrc.substring(fileNamePosition) == "/images/plus_icon_sm.gif")
			{
				hideShowIcon.src = hideShowIconSrc.replace(/plus_icon_sm.gif/, "minus_icon_sm.gif");
				
				//set a variable that will be used at the end of close_others
				//so that the code will go to the correct call after the styles have
				//been set
				expcolVal = "expand";
			}
			else
			{
				hideShowIcon.src = hideShowIconSrc.replace(/minus_icon_sm.gif/, "plus_icon_sm.gif");
				
				//set a variable that will be used at the end of close_others
				//so that the code will go to the correct call after the styles have
				//been set
				expcolVal = "collapse";
			}
		}
		else
		{
			//switching the class of the header element 
	  		//(to get the twistie to point the correct way)
	  		if (document.getElementById(headerDiv).className == "highContrastHide")
	  		{
				document.getElementById(headerDiv).className = "highContrastShow";
				//set a variable that will be used at the end of close_others
				//so that the code will go to the correct call after the styles have
				//been set
				expcolVal = "expand";
			}
			else 
			{
				document.getElementById(headerDiv).className = "highContrastHide";
				//set a variable that will be used at the end of close_others
				//so that the code will go to the correct call after the styles have
				//been set
				expcolVal = "collapse";
			}			
		}
  		//switching the content to either be shown or hidden
  		//if the style.display value is blank we try to figure it out here
  		if(contentDivStyle.display==''&& contentDiv.offsetWidth!=undefined && contentDiv.offsetHeight!=undefined)
  			contentDivStyle.display = (contentDiv.offsetWidth!=0 && contentDiv.offsetHeight!=0)?'block':'none';
  			contentDivStyle.display = (contentDivStyle.display==''||contentDivStyle.display=='block')?'none':'block';
  
  		if (fullPageDiv != null) 
  		{
  			//switching the Show all link to either be shown or hidden
  			//if the style.display value is blank we try to figure it out here 
  			if(fullPageDivStyle.display=='' && fullPageDiv.offsetWidth!=undefined && fullPageDiv.offsetHeight!=undefined)
  				fullPageDivStyle.display = (fullPageDiv.offsetWidth!=0 && fullPageDiv.offsetHeight!=0)?'block':'none';
  				fullPageDivStyle.display = (fullPageDivStyle.display==''||fullPageDivStyle.display=='block')?'none':'block';
  		}
  		
  		return expcolVal;
	} 
});
// FileCombiner - END - DojoExpandGroup.js
// FileCombiner - BEGIN - DojoPagination.js
dojo.declare("DojoPagination", DojoAjax, 
{ 
	//the DojoAjax constructor that takes the following parameters:
	
	 //servletUrl - the URL of the AJAX servlet
	// portletUniqueName - the unique name of the portlet
	// portletMode - the mode the portlet is currently in
	// namespace - the encoded namespace of the portlet
	// genericListObjectName - the name of the generic list (DojoGList) object
	constructor: function(servletUrl, portletUniqueName, portletMode, namespace, genericListObjectName)
	{
		this.servletUrl = servletUrl;
		this.portletUniqueName = portletUniqueName;
		this.portletMode = portletMode;
		this.namespace = namespace;
		this.genericListObjectName = genericListObjectName;
		this.htmlText = "";
	},
	//display previous items.  Make an AJAX call to get the data to display.
	//id - id of dvision whose body needs to be replaced with new data
	//catName - category name to be sent to backend to gets links listed under it.
	//shouldShowTopSeparator - true if a separator should be added at the top of the expanded section
	previous: function(id,catName,shouldShowTopSeparator)
	{
		this.categoryID  = id;
		this.catName = catName;
		this.shouldShowTopSeparator = shouldShowTopSeparator;
		var parms = {"com.ibm.wplc.controller.action": "com.ibm.spe.genericList.action.Paginate", paginateMethod:"previous", paginateGroupName: this.catName, "com.ibm.wplc.controller.uniquePortletName": this.portletUniqueName, "com.ibm.wplc.controller.portletMode": this.portletMode};
		this.sendRequest(this.servletUrl, parms, dojo.hitch(this, this.refreshCategory));
		return false;			
	},
	
	//display next items.  Make an AJAX call to get the data to display.
	//id - id of dvision whose body needs to be replaced with new data
	//catName - category name to be sent to backend to gets links listed under it. 
	//shouldShowTopSeparator - true if a separator should be added at the top of the expanded section	
	next: function(id,catName,shouldShowTopSeparator)
	{
		this.categoryID  = id;
		this.catName = catName;
		this.shouldShowTopSeparator = shouldShowTopSeparator;
		var parms = {"com.ibm.wplc.controller.action": "com.ibm.spe.genericList.action.Paginate", paginateMethod:"next", paginateGroupName: this.catName, "com.ibm.wplc.controller.uniquePortletName": this.portletUniqueName, "com.ibm.wplc.controller.portletMode": this.portletMode};
		this.sendRequest(this.servletUrl, parms, dojo.hitch(this, this.refreshCategory));
		return false;			
	},
	
	//This is call back handler to display new links and previous, next links 
	refreshCategory: function(response, ioArgs)
	{
		var text = response;
		var pageData = eval('(' + text + ')');		
		var categorydiv = dojo.byId(this.categoryID);
		var numLinks = pageData.links.length;
		var prevButton = pageData.prevButton;
		var nextButton = pageData.nextButton;
		var startIndex = pageData.startIndex;
		var endIndex = pageData.endIndex;
		var totalHits = pageData.totalHits;
		var abstractDisplayValue = pageData.abstractDisplayValue;
		var productMessage = pageData.productMessage;
				
		this.htmlText = "";
		if (this.shouldShowTopSeparator == 'true')
		{
			this.htmlText = this.htmlText + '<div class="ibm-rule" style="margin-top: 5px; margin-bottom: 0;"><hr /></div>';
		}
		this.htmlText = this.htmlText + '<p style="text-align: center;" class="ibm-table-navigation" ><span class="ibm-primary-navigation"><strong>' + startIndex + '-' + endIndex + '</strong>&nbsp;' + eval(this.namespace + "translatedOf")  + '&nbsp;<strong>' + totalHits + '</strong>&nbsp;' + eval(this.namespace + "translatedResults");		
		if(nextButton == true && prevButton != true)
		{
			this.htmlText = this.htmlText + '<span class="ibm-table-navigation-links">&nbsp;|&nbsp;<a class="ibm-forward-em-link ibm-tooltip" title="' + eval(this.namespace + "previousNextHover") + '" onclick="return '+ this.namespace + 'dojoPagination.next(\'' + this.categoryID + '\',\'' + this.catName + '\',\'' + this.shouldShowTopSeparator + '\')" href="#">' + eval(this.namespace + "translatedNext") + '</a></span></span>';			
		}
		else if(nextButton == true && prevButton == true)
		{
			this.htmlText = this.htmlText + '<span class="ibm-table-navigation-links"><a class="ibm-back-em-link ibm-tooltip" title="' + eval(this.namespace + "previousNextHover") + '" onclick="return '+ this.namespace + 'dojoPagination.previous(\'' + this.categoryID + '\',\'' + this.catName + '\',\'' + this.shouldShowTopSeparator + '\')" href="#">' + eval(this.namespace + "translatedPrevious")  + '</a>&nbsp;|&nbsp;<a class="ibm-forward-em-link ibm-tooltip" title="' + eval(this.namespace + "previousNextHover") + '" onclick="return '+ this.namespace + 'dojoPagination.next(\'' + this.categoryID + '\',\'' + this.catName + '\',\'' + this.shouldShowTopSeparator + '\')" href="#">' + eval(this.namespace + "translatedNext") + '</a></span></span>';
		}
		else if(nextButton != true && prevButton == true)
		{
			this.htmlText = this.htmlText + '<span class="ibm-table-navigation-links"><a class="ibm-back-em-link ibm-tooltip" title="' + eval(this.namespace + "previousNextHover") + '" onclick="return '+ this.namespace + 'dojoPagination.previous(\'' + this.categoryID + '\',\'' + this.catName + '\',\'' + this.shouldShowTopSeparator + '\')" href="#">' + eval(this.namespace + "translatedPrevious")  + '</a></span></span>';			
		}
		if(this.catName != 'Alerts')
		{
			this.htmlText = this.htmlText +  '<span class="navigationLastModified"> ' + eval(this.namespace + "translatedLastModified") + '</span>'
		}
		this.htmlText = this.htmlText + '<span class="ibm-center-link">';
		this.htmlText = this.htmlText + '<a onclick="return ' + this.genericListObjectName + '.moreDetails(\'' + this.catName + '\', \'' + this.namespace + this.catName + '_abstract\',\'' + this.namespace + this.catName + '_translatedAbstract\')" href="#">' + eval(this.namespace + "more") + '</a>';			
		this.htmlText = this.htmlText + '&nbsp;|&nbsp;';
		this.htmlText = this.htmlText + '<a onclick="return ' + this.genericListObjectName + '.lessDetails(\'' + this.catName + '\', \'' + this.namespace + this.catName + '_abstract\',\'' + this.namespace + this.catName + '_translatedAbstract\')" href="#">' + eval(this.namespace + "lessDetails") + '</a>';
		this.htmlText = this.htmlText + '</span>';			
		this.htmlText = this.htmlText + '</p><div class="ibm-rule" style="margin-top: 0; margin-bottom: 5px;"><hr /></div>';		
		 
		if(productMessage != '')
		{
			this.htmlText += '<div style="margin-left: 20px; font-family:arial,sans-serif; font-size:0.76em; margin-bottom: 10px;">';
			this.htmlText += unEscape(decodeURIComponent(productMessage));
			this.htmlText += '</div>';
		}
		
		this.htmlText= this.htmlText + '<ul class="ibm-link-list">';				 
		for (var i = 0; i < numLinks; i++) 
		{
			this.buildItemHtml(pageData.links[i],abstractDisplayValue);
		}
		this.htmlText +=  "</ul>";
		
		// Process and display any returned error message.
		var errorMsg = pageData.errorMessage;
		if(errorMsg != null)
		{
			errorMsg = unEscape(decodeURIComponent(errorMsg));
						
			this.htmlText+="<div class='ibm-container-recent-group'";
			this.htmlText+="id='" + this.namespace + this.portletUniqueName + "_error_info'>";
			this.htmlText+="<p class='recent-noproducts'>" + errorMsg + "</p>";
		}
		this.htmlText = this.htmlText + '<div class="ibm-rule" style="margin-top: 5px; margin-bottom: 0;"><hr /></div>';
		this.htmlText = this.htmlText + '<p style="text-align: center;" class="ibm-table-navigation" ><span class="ibm-primary-navigation"><strong>' + startIndex + '-' + endIndex + '</strong>&nbsp;' + eval(this.namespace + "translatedOf")  + '&nbsp;<strong>' + totalHits + '</strong>&nbsp;' + eval(this.namespace + "translatedResults");		
		if(nextButton == true && prevButton != true)
		{
			this.htmlText = this.htmlText + '<span class="ibm-table-navigation-links">&nbsp;|&nbsp;<a class="ibm-forward-em-link ibm-tooltip" title="' + eval(this.namespace + "previousNextHover") + '" onclick="return '+ this.namespace + 'dojoPagination.next(\'' + this.categoryID + '\',\'' + this.catName + '\',\'' + this.shouldShowTopSeparator + '\')" href="#">' + eval(this.namespace + "translatedNext") + '</a></span></span>';			
		}
		else if(nextButton == true && prevButton == true)
		{
			this.htmlText = this.htmlText + '<span class="ibm-table-navigation-links"><a class="ibm-back-em-link ibm-tooltip" title="' + eval(this.namespace + "previousNextHover") + '" onclick="return '+ this.namespace + 'dojoPagination.previous(\'' + this.categoryID + '\',\'' + this.catName + '\',\'' + this.shouldShowTopSeparator + '\')" href="#">' + eval(this.namespace + "translatedPrevious")  + '</a>&nbsp;|&nbsp;<a class="ibm-forward-em-link ibm-tooltip" title="' + eval(this.namespace + "previousNextHover") + '" onclick="return '+ this.namespace + 'dojoPagination.next(\'' + this.categoryID + '\',\'' + this.catName + '\',\'' + this.shouldShowTopSeparator + '\')" href="#">' + eval(this.namespace + "translatedNext") + '</a></span></span>';		
		}
		else if(nextButton != true && prevButton == true)
		{
			this.htmlText = this.htmlText + '<span class="ibm-table-navigation-links"><a class="ibm-back-em-link ibm-tooltip" title="' + eval(this.namespace + "previousNextHover") + '" onclick="return '+ this.namespace + 'dojoPagination.previous(\'' + this.categoryID + '\',\'' + this.catName + '\',\'' + this.shouldShowTopSeparator + '\')" href="#">' + eval(this.namespace + "translatedPrevious")  + '</a></span></span>';
		}
		if(this.catName != 'Alerts')
		{
			//include this span but hide it to keep the text alignment in the bottom paging bar consistent with the top paging bar
			this.htmlText = this.htmlText +  '<span style="visibility: hidden;" class="navigationLastModified"> ' + eval(this.namespace + "translatedLastModified") + '</span>'
		}		
		this.htmlText = this.htmlText + '<span class="ibm-center-link">';
		this.htmlText = this.htmlText + '<a onclick="return ' + this.genericListObjectName + '.moreDetails(\'' + this.catName + '\', \'' + this.namespace + this.catName + '_abstract\',\'' + this.namespace + this.catName + '_translatedAbstract\')" href="#">' + eval(this.namespace + "more") + '</a>';			
		this.htmlText = this.htmlText + '&nbsp;|&nbsp;';
		this.htmlText = this.htmlText + '<a onclick="return ' + this.genericListObjectName + '.lessDetails(\'' + this.catName + '\', \'' + this.namespace + this.catName + '_abstract\',\'' + this.namespace + this.catName + '_translatedAbstract\')" href="#">' + eval(this.namespace + "lessDetails") + '</a>';
		this.htmlText = this.htmlText + '</span></p>';		
				
		categorydiv.innerHTML = this.htmlText;	
		
		// If the nfluent translation widget is present in the page, 
		// Call it to translate the updated div.
		if (window.IETRAN && window.IETRAN.translateNodes) 
		{
			IETRAN.translateNodes(categorydiv);
		}
		
		// The ibm-tooltip style class uses jQuery. When creating a new html element, it is necessary
		// to bind a jQuery event to that element in order for it work properly. The following line re-binds
		// the ibm-tooltip class to the jQuery tooltip function.
		jQuery(".ibm-tooltip").tooltip({showTitle: "||"});

		return response;
	},
	
	// Builds the html for a single item (i.e. a single link) to be displayed in the UI.
	buildItemHtml: function(item,abstractDisplayValue)
	{
		url = item.link;
		title = item.title;
		formattedTitle = item.formattedTitle;
		translatedTitle = item.translatedTitle;
		formattedTranslatedTitle = item.formattedTranslatedTitle;
		itemAbstract = item.itemAbstract;
		formattedAbstract = item.formattedAbstract;
		translatedAbstract = item.translatedAbstract;
		formattedTranslatedAbstract = item.formattedTranslatedAbstract;
		date = item.date;
		entitled = item.entitled;
		
		// If the url is the special signin url, generate the signin text which appears above the actual link.
		if(url == "specialUrl:signinUrl")
		{
			this.htmlText = this.htmlText + '<span style="font-family:arial,sans-serif; font-size:0.76em; font-weight: bold;" escapeXml="false">' + '&nbsp;' + eval(this.namespace + "nSeriesSigninMsg")  + '</span>';
			url = "#";
		}
		
		if(entitled == 'true')
		{
			this.htmlText += "<li class='ibm-password-link'>";
		}			
		else
		{
			this.htmlText += "<li class='ibm-forward-em-link'>";
		}
		
		// If we're being called from one of the mostRecent jsps, add the date
		// before the url and title (if it exists).
		this.htmlText += "<span style='float:right;padding-right:5px' class='ibm-bullet-list-recent-date'>"; 
		if(date != '')
		{
			this.htmlText +=  date;
		}
			
		this.htmlText += "</span>";
		this.htmlText += "<a href='" + url; 
		this.htmlText += "' class='ibm-feature-link ibm-tooltip'";
		// For a special signin url, build an onclick event handler that calls a signin function.
		if(url == "#")
		{
			this.htmlText += " onclick='ibmWebSigninPrelinkaction(this); return false;'";
		}
		
		//if the title is 'Subscribe_to...' it represents the product-specific notifications link that was added
		//to the collection of links returned from the back-end.  put the translated link text into the HTML.  the
		//translatedNotificationLink variable is defined in the max/full jsp.
		if (title == 'Subscribe_to_support_notifications')
		{
			this.htmlText += " title='" + eval(this.namespace + "translatedNotificationLink") + "'";				
			this.htmlText += "><b>" + eval(this.namespace + "translatedNotificationLink") + "</b></a>";
		}
		else
		{
			this.htmlText += " 'title='" + unEscape(decodeURIComponent(title)) + "'";				
			this.htmlText += "><b>" + unEscape(decodeURIComponent(formattedTitle)) + "</b></a>";
		}
		if(formattedAbstract != '')
		{
			this.htmlText += "<div style='display: " + abstractDisplayValue + ";' name='" + this.namespace + this.catName + "_abstract' class='abstractText ibm-tooltip'";
			this.htmlText += " title='" + unEscape(decodeURIComponent(itemAbstract)) + "'>";
			this.htmlText += unEscape(decodeURIComponent(formattedAbstract)) + "</div>";
		}
		if(formattedTranslatedTitle != '')
		{
			this.htmlText += "<span class='ibm-wtsxltd'><a href='" + url + "'";
			this.htmlText += " class='ibm-tooltip'";
			if(url == "#")
			{
				this.htmlText += " onclick='ibmWebSigninPrelinkaction(this); return false;'";
			}
			this.htmlText += " title='" + unEscape(decodeURIComponent(translatedTitle)) + "'>";
			this.htmlText += unEscape(decodeURIComponent(formattedTranslatedTitle)) + "</a></span>";
		}
		if(formattedTranslatedAbstract != '')
		{
			this.htmlText += "<div style='display: " + abstractDisplayValue + ";' name='" + this.namespace + this.catName + "_translatedAbstract' class='abstractText ibm-tooltip'"; 
			this.htmlText += " title='" + unEscape(decodeURIComponent(translatedAbstract)) + "'>"; 
			this.htmlText +=  unEscape(decodeURIComponent(formattedTranslatedAbstract))
			+ "</div>";
		}
		
		this.htmlText += "</li>";
		
		return false;
	},
	
	//callback function that does nothing
	doNothingCallback: function()
	{
	}
});
// FileCombiner - END - DojoPagination.js
// FileCombiner - end of combined file.
