function getObjectHeight(obj)
{
	if (obj.offsetHeight)
	{
		return obj.offsetHeight;
	}
	return 0;
}

function getObjectWidth(obj)
{
	if (obj.offsetWidth)
	{
		return obj.offsetWidth;
	}
	return 0;
}

function changeObjectClass(obj_id, class_name)
{
	var target;
	if (document.all) {
		target = document.all[obj_id];
	}
	else {
		target = document.getElementById(obj_id);
	}
	target.className = class_name;
}

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] > vec[hiBound])
		{
			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] <= pivot)
			loSwap++;

		// Find the right hiSwap
		while (vec[hiSwap] > pivot)
			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;

	// Recursively call function...  the beauty of quicksort
	// 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);
}



