
function buscar_indice(elemento,tipo)
{
	var valor = document.getElementById(elemento).value;
	var url = "serv_indiceresult.php?";

	if (valor=="") return false;

	switch(tipo)
	{
		case "titulo":	url = url + "titulo="+valor;
						break;
		case "materia":	url = url + "materia="+valor;
						break;
		case "editorial":	url = url + "editorial="+valor;
							break;
		case "autor":	url = url + "autor="+valor;
						break;
	}

	document.location = url;
}

function buscar_indice_select(elemento,select)
{
	switch(document.getElementById(select).value)
	{
		case "0": return buscar_indice(elemento,'titulo');
		case "1": return buscar_indice(elemento,'materia');
		case "2": return buscar_indice(elemento,'editorial');
		case "4": return buscar_indice(elemento,'autor');
	}

	return false;
}