//JS array tools

/**
 * Searches a value in an array
 *
 * @param	needle		This is the string to search for.
 * @param	haystack	This is the array in which to search.
 * @return	boolean
 */
function inArray(needle, haystack) {
	var i;

	for (i=0; i < haystack.length; i++) {
		if (haystack[i] === needle) {
			return true;
		}
	}
	return false;
}
