function GetInList (list, index, delim)
{
	var flag = false, curr = 0;
	var posStart = "", posStop = "";

	// first, look for at least one occurance of the delimeter
	// if we can't find one, then just return the original
	if(list.indexOf(delim) == -1) return list;

	// alright, let's go through the string one character at a time
	for(x=0; x<list.length; x++)
	{
		/*/
		/ / We process if we find a delimeter, or we already found
		/ / a delimeter before and reached the end of the string.
		/*/
		if( (list.substr(x, 1) == delim) || (flag && (x == (list.length - 1))) )
		{
			// increment the current index if we need to
			if(index > 0) curr++;

			/*/ are we looking for the end or begining of the index? /*/
			if(flag)
			{	/*/ ending /*/

				/*/
				/ / Record the index for extraction later.  Remember, we want
				/ / the char before the delim, so we're done with this cycle.
				/ / But, we don't do this for the last index because there is
				/ / not delimeter for us to track, so we add one.
				/*/
				if(x == (list.length - 1))
					posStop = x + 1;
				else
					posStop = x;
				break;
			}
			else
			{	/*/ beginning /*/

				// did we find a match?
				if(curr == index)
				{
					/*/
					/ / We are on the index the caller wants.
					/ / So we record this for extraction later.
					/*/

					/*/ flag indicates we found the start /*/
					flag = true;

					/*/
					/ / Now, here's the tricky part.  If we're not on the first
					/ / index (0) we want posStart to be one greater than the
					/ / current iteration to pass up the delimeter; however,
					/ / if we are on the first index, we want posStart to be the
					/ / beginning and posStop to be what posStart was supposed to be.
					/*/
					if(curr == 0)
					{	/*/ zero /*/
						posStart = 0;
						posStop  = x;

						// we have the data we need
						break;
					}
					else
						/*/ non-zero /*/
						posStart = x + 1;
				}
			}
		}
	}

	/*/ if we made it here w/o flag being set, then we didn't find the index /*/
	if(!flag)
		return false;
	else
	{	/*/ we have what we need to extract the index /*/

		// return the data back to the caller
		return list.substring(posStart, posStop);
	}
}

function ListLen (list, delim)
{
	var curr = 0;
	var listToArray = "";

	listToArray = list.split(delim);
	
	curr = listToArray.length;
	
	//return the number of items in the list
	return curr;
}

function ListFind(list, item, delim) {
	var searchResult = false;
	//get the list length
	myListLength = ListLen(list, delim);
	//loop over the list using the GetInList() function
	for(i=0; i<=(myListLength-1); i++)
		{
		tempVar = GetInList(list, i, delim);
		if(tempVar == item)
			{searchResult = true; break;}
		}
	return searchResult;
}

function ListFindPos(list, item, delim) {
	var searchResult = 0;
	//get the list length
	myListLength = ListLen(list, delim);
	//loop over the list using the GetInList() function
	for(i=0; i<=(myListLength-1); i++)
		{
		tempVar = GetInList(list, i, delim);
		if(tempVar == item)
			{searchResult = i; break;}
		}
	return searchResult;
}