
// Returns the index of the first occurrence of the target element, or false if
// not fonud. Does not work with associative arrays.
function indexOf(arr, target)
{
	for ( var key in arr )
	{
		if ( arr[key] == target )
			return key;
	}
	return false;
}

// Returns true if the target is in the array, else false.
function inArray(arr, target)
{
	for ( var key in arr )
	{
		if ( arr[key] == target )
			return true;
	}
	return false;
}
