/* ******************************************************************************************************
Javascript functions for the search.php page
****************************************************************************************************** */

/* Make changes to the CSS properties of the description box that will alter it's size to show or hide */
/* a lengthy description. */
function changeDescriptionFieldSize(desc_box, change_field)
	{
	/* Grab a lock on the div elements in question */
	var desc=document.getElementById(desc_box);
	var chng_txt=document.getElementById(change_field);

	new Effect.Appear(desc, {duration: 16});
	// new Effect.Appear(this, {duration: 16});

	/* Now that we have the div element ID, let's effect some changes to the */
	/* style sheet to achieve the desired effect */
	desc.style.overflow=='visible' ? desc.style.overflow='hidden': desc.style.overflow='visible';
	desc.style.height=='100%' ? desc.style.height='75px' : desc.style.height='100%';

	/* Now change the text to reflect the state of the cell */
	chng_txt.innerHTML.trim()=='Show the rest of the description!' ? chng_txt.innerHTML='Collapse description' : chng_txt.innerHTML='Show the rest of the description!';
	}

function changeAdvancedType(element)
	{
	var adv_type=document.getElementById('type');
	adv_type.value=element;
	}