/*
 * Used by orings_materials_data_details.cfm
 * 
 * Fired off when a new compound is chosen from a list.
 * 
 */
function catalogCompoundInputSelected(e) {

	//--- If this element is already selected, do no more.
	if( $(this).parents("dt").hasClass("selected") ) return false;


	$(this).parents("dl").children("dt").removeClass("selected");
	$(this).parents("dl").children("dd").slideUp();
	$(this).parents("dt").addClass("selected");

	var container = $(this).parents("dt").next("dd");

	var qs = new queryString();
	var thiscompid = $(this).attr("value");

	ajaxifyBookmark( qs.get('mat_compid', thiscompid) );

	//--- If this element is the "none" choice, do no more (here; bubble and let the onChange occur).
	if( thiscompid == 0 ) return;


	if( container.html() == "" )
		container.html('<b>LOADING...</b>').load( webroot + '/catalog/details/orings/materials/pages/details_compoundData.cfm?' + qs.get('mat_compid', thiscompid), function(){ $(this).slideDown(); } );
	else
		container.slideDown();



}

