function CmxKeywords_parseTitle(titleText)
{
	var idx = new Array(2);
	idx[0] = titleText.indexOf(this.delimiter);
	idx[1] = idx[0] + this.delimiter.length;
	
	if (idx[0] >= 0)
	{
		this.category = titleText.substr(0, idx[0]);
		this.title = titleText.substr(idx[1]);
	}
	else
	{
		// The delimiter was not found in the string.  This
		// was an invalid format, and useless for information.
		this.category = this.getFilename();
		this.title = this.getDirectory();
	}
}
function CmxKeywords_getFilename( )
{
	var idx = window.location.href.lastIndexOf("/");
	return window.location.href.substr(idx + 1);
}
function CmxKeywords_getDirectory( )
{
	var idx = new Array(2);
	idx[0] = 0;
	idx[1] = 0;
	var i = 0;
	while ((i = window.location.href.indexOf("/", i + 1)) >= 0)
	{
		idx[0] = idx[1];
		idx[1] = i;
	}
	return window.location.href.substr(idx[0] + 1, idx[1] - idx[0] - 1);
}
function CmxKeywords_toString( )
{
	return "[CmxKeywords Object: " + this.category + this.delimiter + this.title + "]";
}
function CmxKeywords_sendPageview( )
{
	if (this.category == "")
	{
		this.category = CmxKeywords_getDirectory();
	}
	if (this.title == "")
	{
		this.title = document.title;
	}
	if ((this.category != "") && (this.title != ""))
	{
		if (!(location.href.indexOf("invtst") > -1 || location.href.indexOf("localhost") > -1))
		{
			// Set to production if we are not running on a test
			// server or on a localhost.
			cmSetProduction();
		}
		cmCreatePageviewTag(this.title, this.category, this.searchTerm, this.searchResults);
	}
}
function CmxKeywords( )
{
	this.category = "";
	this.title = "";
	this.searchTerm = null;
	this.searchResults = null;
	this.parseTitle = CmxKeywords_parseTitle;
	this.sendPageview = CmxKeywords_sendPageview;
	this.toString = CmxKeywords_toString;
}
CmxKeywords.prototype.delimiter = " || ";
CmxKeywords.prototype.getDirectory = CmxKeywords_getDirectory;
CmxKeywords.prototype.getFilename = CmxKeywords_getFilename;