function enviar_anio(valor){
	
	var myConn = new XHConn();

	myConn.connect('./reportajes_prensa/cambio_anio.php','POST',"valor="+valor,leeranio);

}
function leeranio(oXML)
{
	var select=oXML.responseText.split('|'); 
	document.getElementById('td_marca').innerHTML=select[0];
	document.getElementById('td_embarcacion').innerHTML=select[1];
	document.getElementById('tabla_noticia').innerHTML=select[2];
	document.getElementById('paginado').innerHTML=select[3];
	document.getElementById('pagina').value=select[4];
}


//*********

function enviar_astillero(valor)
{
	var anio=document.getElementById('anio').value;
	
	var myConn = new XHConn();
	myConn.connect('./reportajes_prensa/astillero.php','POST','valor='+valor+'&anio='+anio,leerDatos2);
	
}

function leerDatos2(oXML)
{
	var select=oXML.responseText.split('|'); 
	document.getElementById('td_embarcacion').innerHTML=select[0];
	document.getElementById('tabla_noticia').innerHTML=select[1];
	document.getElementById('paginado').innerHTML=select[2];
	document.getElementById('pagina').value=select[3];
}


//***********
function enviar_modelo(valor)
{
	var anio=document.getElementById('anio').value;	
	var marca=document.getElementById('astillero').value;
	var myConn = new XHConn();
	myConn.connect('./reportajes_prensa/modelo.php','POST','valor='+valor+'&anio='+anio+'&marca='+marca,leermodelo);
}

function leermodelo(oXML)
{
	var select=oXML.responseText.split('|');
	
	document.getElementById('tabla_noticia').innerHTML=select[0];
	document.getElementById('paginado').innerHTML=select[1];
	document.getElementById('pagina').value=select[2];
	
}

//*************
/*function enviar(campo,valor){
	
	var myConn = new XHConn();
	myConn.connect('./reportajes_prensa/embarcacion.php','POST','campo='+campo+"&valor="+valor,leerDatos2);

	if(document.formulario.anio.value=='0')return false;
	if(document.formulario.astillero.value=='0')return false;
	if(document.getElementById('modelo').value=='0')return false;
	//document.formulario.submit();
}*/

function pagina(valor)
{
	var anio=document.getElementById('anio').value;	
	var marca=document.getElementById('astillero').value;
	var modelo=document.getElementById('modelo').value;
	var myConn = new XHConn();
	myConn.connect('./reportajes_prensa/modelo.php','POST','pagina='+valor+'&anio='+anio+'&marca='+marca+'&valor='+modelo,leermodelo);
}


