
// (C) 2000 TECNOCONSULTA.COM S.A. All rigths reserved

// Syncronyze a list (HTML tag SELECT) to a specific value contained
// in the OPTION's value field of the list itself

function synchronizeListByValue ( list, value )
{
	var index ;

	for ( index = 0 ; index < list.length ; index++ )
	{
		if ( list.options[index].value == value )
			break ;
	}

	if ( index < list.length )
		return list.selectedIndex = index ;
	else
		return -1 ;
}

function synchronizeListByText ( list, text )
{
	var index ;

	for ( index = 0 ; index < list.length ; index++ )
	{
		if ( list.options[index].text == text )
			break ;
	}

	if ( index < list.length )
		return list.selectedIndex = index ;
	else
		return -1 ;
}

/* EOF */

