function PortletMgr() 
{
	this.iframes = new Array();
}

// Store the IFRAME nodes as they are created
PortletMgr.prototype.addIFrame = function (iframe)
{
	this.iframes[this.iframes.length] = iframe;
}

// Pass in the id of the IFRAME to filter out while refreshing all others
PortletMgr.prototype.refresh = function (id)
{
	var len = this.iframes.length;
	for (var i = 0; i < len; i++) {
		iframe = this.iframes[i];
		if (iframe.id == id)
			continue;
		PortletMgr.prototype.reload(iframe);
	}
}

// Pass in the iframe itself
PortletMgr.prototype.reload = function (iframe)
{
	var src = iframe.src;
	src += "&_refresh=false";
	iframe.setAttribute('src', src);
}

PortletMgr.prototype.setActiveLink = function(src)
{
	newsrc = src + "&_refresh=true";
	return newsrc;
}

var portletMgr = new PortletMgr();