public String
	replace_vars(String input, String context)
	{
		if(log_level >= 4) log.log(4, key, "replace_vars called.", "\n");
		if(log_level >= 4) log.log(4, key, "input: ", input, "\n");
		if(log_level >= 4) log.log(4, key, "context: ", context, "\n");

		String tmp = null;
                String rv = null;  // return value

                for (String item:symbolnames) {
                        if(context_varname_var.get(context).containsKey(item)){
                                if (tmp == null) {
                                        rv = context_varname_var.get(context).get(item).get_value();
                                        tmp = input.replaceAll(item, rv);
                                        tmp = tmp.replaceAll("false", "!!!");
                                        tmp = tmp.replaceAll("FALSE", "!!!");
                                        tmp = tmp.replaceAll("true", "###");
                                        tmp = tmp.replaceAll("TRUE", "###");
                                } else {
                                        rv = context_varname_var.get(context).get(item).get_value();
                                        tmp = tmp.replaceAll(item, rv);
                                        tmp = tmp.replaceAll("false", "!!!");
                                        tmp = tmp.replaceAll("FALSE", "!!!");
                                        tmp = tmp.replaceAll("true", "###");
                                        tmp = tmp.replaceAll("TRUE", "###");
                                }
                        }
                }

                tmp = tmp.replaceAll("!!!", "false");
                tmp = tmp.replaceAll("###", "true");

		if(log_level >= 4) log.log(4, key, "return value: ", tmp, "\n");

		return tmp;
	}