function toggleClasses(classesList)
{
	parentdiv = document.id(classesList).getParent();
	
	//document.id(classesList).getParent().getParent().setStyle('overflow', 'auto');
	parentdiv.getParent().setStyle('height', 'auto');

	if (parentdiv.style.display == 'none' || parentdiv.style.display == '')
	{
		parentdiv.setStyles(
		{
			'height': 'auto',
			'opacity': 100,
			'overflow': 'hidden',
			'visibility': 'visible',
			'display': 'block'
		});
		toggleIcon(classesList.substr(5,classesList.length - 5));
	}
	else
	{
		parentdiv.setStyle('display', 'none');
		toggleIcon(classesList.substr(5,classesList.length - 5));
	}
	
	kids = parentdiv.getParent().getChildren();
	
	kids.forEach(function(node)
	{
		if (node.className == 'price' || node.className == 'description' || node.className == 'course_number' || node.className == 'course_price')
		{
			if (node.style.display == 'none' || node.style.display == '')
			{
				node.setStyle('display', 'block');
			}
			else
			{
				node.setStyle('display', 'none');
			}
		}
	});
}

//-------------------------------------------------------------------------
// FUNCTION: toggleIcon
//-------------------------------------------------------------------------

function toggleIcon(parentId)
{	
	// gets passed the 'class999' (or whatever the enclosing div id is)
	// so we can find the <a ..> image and toggle it
	id = parentId;
	link = jQuery("#row" + parentId).find('a');
	link_html = link.html();
	
	//bullet_line.jpg
	
	if(link_html.indexOf('bullet_plus.gif') == -1)
	{
		link.find('img').attr("src", "/images/bullet_plus.gif");
	}
	else
	{
		link.find('img').attr("src", "/images/bullet_minus.gif");
	}	
	
}

function toggleDiv(theDiv)
{
	theTogglediv = document.id(theDiv);
	theTogglediv.setStyle('height', 'auto');

	if (theTogglediv.style.display == 'none' || theTogglediv.style.display == '')
	{
		theTogglediv.setStyle('display', 'block');

		toHeight = theTogglediv.scrollHeight;
			
		theTogglediv.setStyles(
		{
			'height': 0,
			'opacity': 0,
			'overflow': 'hidden'
		});

		var rowEffect = theTogglediv.effects(
		{
			duration: 300,
			
			transition: Fx.Transitions.sineOut
		});
	
		rowEffect.custom(
		{
			'height': [0, toHeight],
			'opacity': [0, 1]
		});
	}
	else
	{
		theTogglediv.setStyle('display', 'none');
	}
}


//-------------------------------------------------------------------------
// FUNCTION: hide
//-------------------------------------------------------------------------

function hide(obj)
{
	if (obj)
	{
		obj.style.display = 'none';
	}
}


//-------------------------------------------------------------------------
// FUNCTION: show
//-------------------------------------------------------------------------

function show(obj)
{
	if (obj.tagName.toLowerCase() == "table" && !window.ie)
	{
		obj.style.display = "table";
	}
	else if (obj.tagName.toLowerCase() == "tr" && !window.ie)
	{
		obj.style.display = "table-row";
	}
	else if (obj.tagName.toLowerCase() == "td" && !window.ie)
	{
		obj.style.display = "table-cell";
	}
	else if (obj.tagName.toLowerCase() == "select" || obj.tagName.toLowerCase() == "input")
	{
		obj.style.display = "inline";
	}
	else
	{
		obj.style.display = "block";
	}
}



//-------------------------------------------------------------------------
// FUNCTION: abs
//-------------------------------------------------------------------------

function abs()
{
}


