function MMClick(state)
{
	// get search template from hidden field txtFieldsStore
	var template = document.formSearch.txtFieldsStore.value;
	// get existence of major mention
	var bMajorMention;
	if( template.indexOf("mm") >= 0 ) 
		bMajorMention = true;
	else
		bMajorMention = false;
	// choose proper major mention search template
	if( bMajorMention )
	{
		// array and index vars
		var aray = new Array()
		var i, cnt;
		// split up the string [1-mm/$1] [1+mm/hlead($1) or terms($1)]...
		aray = template.split("[");
		cnt = aray.length;
		// clear template string
		template = "";
		// loop through the array rebuilding template to use
		for(i = 0; i < cnt; i++)
		{
			if( state ) // want +mm part
			{
				if( aray[i].indexOf("-mm") >= 0 )
					aray[i] = "";
			}
			else // want -mm part
			{
				if( aray[i].indexOf("+mm") >= 0 )
					aray[i] = "";
			}
			// add to rebuilt template
			template += "["; // add to front
			template += aray[i];
		}
	}
	// write rebuilt search template to hidden field txtFields
	document.formSearch.txtFields.value = template;
}
