final void imc_addkey(PACKET p, String key, String value)
	{

		for(int i = 0; i < value.length(); i++)
		{
			if(value.substring(i, i+1).equals("\""))
			{
				String tmp = value.substring(0, i);
				tmp = tmp.concat("\\\"").concat(value.substring(i+1, value.length()));
				value = tmp;
				i++;
			}
		}

		for (int i = 0; i < PACKET.IMC_MAX_KEYS; i++)
		{
			if (!p.key[i].equals("") && (key.equalsIgnoreCase(p.key[i])))
			{
				p.key[i] = "";
				p.value[i] = "";
				break;
			}
		}
		if (value=="")
			return;

		for (int i = 0; i < PACKET.IMC_MAX_KEYS; i++)
		{
			if (p.key[i] == "")
			{
				p.key[i] = key;
				if((value.indexOf(' ') > -1))
					value = "\""+value+"\"";
				p.value[i] = value;
				return;
			}
		}
	}