function Buscar()
{
	document.FBuscador.submit();
}

function inicio(error,msg)
{

/* comprobar();
 
 evento('POBLACION',document.FBuscador.Provincia.options[document.FBuscador.Provincia.selectedIndex].value);*/
 
  if (msg=="ERROR") {

	  if (error) alert('Error: '+error);
	  
  } 
  
  if (msg=="info") {

	  if (error) alert(error);

  }

 
}

function cambiar(esto)
{
	vista=document.getElementById(esto).style.display;
	if (vista=='none')
		vista='block';
	else
		vista='none';

	document.getElementById(esto).style.display = vista;
}


function mostrar(esto)
{
	document.getElementById(esto).style.display = 'block';
}

function ocultar(esto)
{
	document.getElementById(esto).style.display = 'none';
}




function getDataServer(url){
     var xml = null;
     try{
         xml = new ActiveXObject("Microsoft.XMLHTTP");
     }catch(expeption){
         xml = new XMLHttpRequest();
     }
     xml.open("GET",url, false);
     xml.send(null);
     if(xml.status == 404) alert("Url no valida");
     return xml.responseText;
}

function evento(param,v){
    
	
	var txt = getDataServer("/php/svr_buscador.php?p="+param+"&v="+v+"&v2="+v);

    document.getElementById(param).innerHTML = txt;

/*	if (param!="ZONA") document.getElementById("ZONA").innerHTML = "Seleccione primero localidad";	*/
	comprobar();
}

function verificar(zona, contenido, v) {

	if (contenido.length==1) evento(zona, v);
}

function comprobar() {
}
