function zen_make_params(id, cmd)
{
	var j = {};
	var str = '#frm input,#frm textarea,#frm select';
	$(str.replace(/frm/g, id)).each(
		function(i)
		{
			if (this.type.match(/(radio|checkbox)/))
			{
				if (this.checked)
				{
					j[this.name] = this.value;
				}
			}
			else if (this.name.match(/^cmd\-/))
			{
				if (cmd)
				{
					if (cmd == this.name)
					{
						j[this.name] = 1;
					}
				}
				else
				{
					j[this.name] = this.value;
				}
			}
			else
			{
				j[this.name] = this.value;
			}
		}
	);
	return $.toJSON(j);
}

