//-----------------------------------------------------------------------------
function detalle( n, obj, list, vector, blk )
{
	var idx = obj.options.selectedIndex;

  list.options.length = 0;

  for( var i = 1; i <= vector[ idx ].length; i++ )
  {
  	list.options[i-1] = new Option( vector[idx][i-1], blk + 'LIST' + i );
	}

  Cambiar( obj, blk );

  var chk = document.getElementById( "SELALL" + n );

	if( chk )
	{
		chk.checked = false;
	}

	if ( obj.length == 1 )
	{
		obj.disabled = true;
	}
}
//-----------------------------------------------------------------------------
function Cambiar( obj, name )
{
	var form = document.forms[0];

	for( var i = 0; i < form.elements.length; i++ )
	{
		if( form.elements[i].type == 'select-one' )
		{
			var sel   = form.elements[i];
			var index = sel.selectedIndex;

			for( var j = 0; j < sel.options.length; j++ )
			{
				if( sel.options[j].value == name )
				{
					sel.options[j].text = obj.options[ obj.selectedIndex ].text ;
				}

				if( sel.options[j].value == name + 'LIST' )
				{
					sel.options[j].text = obj.options[ obj.selectedIndex ].text ;
				}
			}

			sel.selectedIndex = -1;
			sel.selectedIndex = index;
		}
	}
}
//-----------------------------------------------------------------------------
function MultiSelect( chk, lista )
{
	var i;
	var count = lista.options.length;

	for( i = 0; i < count; i++ )
	{
		lista.options[i].selected = chk.checked;
	}
}
//-----------------------------------------------------------------------------
