***********************************************
** get index of the first existing array element
arguments: tag - tag of array (AR_LONG or AR_STR)
id - array id
returns: -1 - array is empty
otherwise returns index of the first array element
long GetFirstIndex(long tag,long id);