code: function(obj, transients, shallow)
  	{
  		shallow = (shallow != null) ? shallow : false;
  		var clone = null;
  		
  		if (obj != null && typeof(obj.constructor) == 'function')
  		{
  			clone = new obj.constructor();
  			
  		    for (var i in obj)
  		    {
  		    	if (i != mxObjectIdentity.FIELD_NAME && (transients == null ||
  		    		mxUtils.indexOf(transients, i) < 0))
  		    	{
  			    	if (!shallow && typeof(obj[i]) == 'object')
  			    	{
  			            clone[i] = mxUtils.clone(obj[i]);
  			        }
  			        else
  			        {
  			            clone[i] = obj[i];
  			        }
  				}
  		    }
  		}
  		
  	    return clone;
  	}
docs: Function: clone
  
  Recursively clones the specified object ignoring all fieldnames in the
  given array of transient fields. <mxObjectIdentity.FIELD_NAME> is always
  ignored by this function.
  
  Parameters:
  
  obj - Object to be cloned.
  transients - Optional array of strings representing the fieldname to be
  ignored.
  shallow - Optional boolean argument to specify if a shallow clone should
  be created, that is, one where all object references are not cloned or,
  in other words, one where only atomic (strings, numbers) values are
  cloned. Default is false.