function getItem(posNum,stringVar,delimeter){// set variablesstringVarLength = stringVar.length;matches = 0;prevPos = 0;currentPos = -1;// end if  if delimeter is at first character (nothing before that!)if ( (posNum == 1) && (stringVar.charAt(0) == delimeter) )	{ zResult = ""; }else{// continue on, find position in string based on delimiter	for (var P = 1; P <= stringVarLength; P++)	{		if (stringVar.charAt(P) == delimeter)			{				prevPos = currentPos;				currentPos = P;				matches = matches + 1;			}		if (matches == posNum) {break}	}	if (P > stringVarLength)		{			prevPos = currentPos;			currentPos = (P - 1);		}	prevPos = prevPos + 1;	position = stringVar.substring(prevPos,currentPos);}	return (position);}