function FormNameListener(formNameEvent, appName) {
	this.formNameEvent = formNameEvent;
	this.formNameEvent.newFormName.subscribe(this.newFormName, this);
	this.appName = appName;
}

/**
 * The form name has changed. Change the product_name element.
 * Include version information if available.
 */
FormNameListener.prototype.newFormName = function(type, args, me) {
	var title = me.appName;

/* JC 	if (args[0]) title += ' - ' + args[0]; */

	document.title = title;
	var productName = document.getElementById('product_name');
/* JC	productName.innerHTML = args[0]; */
	if (productName.versionString) {
		productName.innerHTML += ' ' + productName.versionString;
	}
}

