code: public static Map duplicateMap(Map map, boolean doKeysLower, boolean deepCopy) throws PageException {
  	if (doKeysLower) {
  	    Map newMap;
  	    try {
  		newMap = (Map) ClassUtil.loadInstance(map.getClass());
  	    }
  	    catch (ClassException e) {
  		newMap = new HashMap();
  	    }
  	    boolean inside = ThreadLocalDuplication.set(map, newMap);
  	    try {
  		Iterator it = map.keySet().iterator();
  		while (it.hasNext()) {
  		    Object key = it.next();
  		    if (deepCopy) newMap.put(StringUtil.toLowerCase(Caster.toString(key)), duplicate(map.get(key), deepCopy));
  		    else newMap.put(StringUtil.toLowerCase(Caster.toString(key)), map.get(key));
  		}
  	    }
  	    finally {
  		if (!inside) ThreadLocalDuplication.reset();
  	    }
  	    //
  	    return newMap;
  	}
  	return duplicateMap(map, deepCopy);
      }
docs: duplicate a map
  
  @param map
  @param doKeysLower
  @return duplicated Map
  @throws PageException