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