	function Quicksort(vec, loBound, hiBound)
	/**************************************************************
		This function adapted from the algorithm given in:
			Data Abstractions & Structures Using C++, by
			Mark Headington and David Riley, pg. 586.

		Quicksort is the fastest array sorting routine for
		unordered arrays.  Its big O is n log n.
	 **************************************************************/
	{

		var pivot, loSwap, hiSwap, temp;

		// Two items to sort
		if (hiBound - loBound == 1)
		{
			if (vec[loBound].title > vec[hiBound].title)
			{
				temp = vec[loBound];
				vec[loBound] = vec[hiBound];
				vec[hiBound] = temp;
			}
			return;
		}

		// Three or more items to sort
		pivot = vec[parseInt((loBound + hiBound) / 2)];
		vec[parseInt((loBound + hiBound) / 2)] = vec[loBound];
		vec[loBound] = pivot;
		loSwap = loBound + 1;
		hiSwap = hiBound;

		do {
			// Find the right loSwap
			while (loSwap <= hiSwap && vec[loSwap].title <= pivot.title)
				loSwap++;

			// Find the right hiSwap
			while (vec[hiSwap].title > pivot.title)
				hiSwap--;

			// Swap values if loSwap is less than hiSwap
			if (loSwap < hiSwap)
			{
				temp = vec[loSwap];
				vec[loSwap] = vec[hiSwap];
				vec[hiSwap] = temp;
			}
		} while (loSwap < hiSwap);

		vec[loBound] = vec[hiSwap];
		vec[hiSwap] = pivot;


		// 2 or more items in first section		
		if (loBound < hiSwap - 1)
			Quicksort(vec, loBound, hiSwap - 1);


		// 2 or more items in second section
		if (hiSwap + 1 < hiBound)
			Quicksort(vec, hiSwap + 1, hiBound);
	}



// If title contains a quoted string, it returns that quoted string, otherwise
// it returns the entire title.
function RetrieveTitle( title )
{
	var a = title.indexOf('"');
	var b = title.lastIndexOf('"');
	if (a > -1 && b > -1 )
	{
	   var temp = title.substring(a+1,b);
	   while ( temp.charAt(0) == ' ' )
	     temp = temp.substring(1);
		return temp;
	}
	else
		return title;
}

function ArtItem( title, id )
{
  this.title = title;
  this.id = id;
  return this;
}

function AddElement( ar, val )
{
  return ar.concat( new Array( val ) )
}