// JavaScript Document
function make_request(server_page, obj_id)
{
	xmlhttp=crear_xml();
	var obj=document.getElementById(obj_id);
	xmlhttp.open("GET", server_page);
	xmlhttp.onreadystatechange=function(){
	if(xmlhttp.readyState==4 && xmlhttp.status==200)
	{
		obj.innerHTML = xmlhttp.responseText;
	}
	}
	xmlhttp.send(null);
}
//funciones creadas para cambiar el estilo delas capas que muestran en la pagina index bien el mapa o bien el listado de las categorias una por una.
function cambiar_prop(id)
{
	if(id=="categorias")
	{
		objeto=document.getElementById(id);
		objeto.className='categorias';
		document.getElementById('provincias').className='provincias';
	}
	else if (id=="provincias")
	{
		objeto=document.getElementById(id);
		objeto.className='provincias_alternativo';	
		document.getElementById('categorias').className='categorias_alternativo';
	}
}

//funciones para cambiar la propiedad en el menu de navegación del perfil de la tieenda:
function cambiar_prop2(id)
{
	if(id=="datos_tienda")
	{
		objeto=document.getElementById(id);
		objeto.className='datos_tienda';
		document.getElementById('imagenes_tienda').className='imagenes_tienda';
	}
	else if (id=="imagenes_tienda")
	{
		objeto=document.getElementById(id);
		objeto.className='imagenes_tienda_alternativo';	
		document.getElementById('datos_tienda').className='datos_tienda_alternativo';
	}
}

//función a la que le llamo desde la página de usuarios favoritos asl hacer click en cerrar cuando se muestran los anuncios de un usuario:
function close_cargador_anuncios(elemento)
{
	el_objeto=document.getElementById(elemento);
	el_objeto.style.display='none';
}