int GetObjectID(Object element) { if (element == null) return NULL; else if (element is Cell) return CELL; else if (element is Table) return TABLE; return -1; }