function buscarWikimedia(wikipath){
var busqueda=$('busqueda').value;
var limite=30;
var url='proxy.php';
var query='url='+escape(wikipath)+'&method=get&action=query&list=search&srsearch="+busqueda+"&srlimit="+limite+"&format=json'

alert(url);

new Ajax(url, {
		method: 'post',
		onComplete:function(){
		var respuesta=this.response.text;
//		alert(respuesta);
		var res=eval("("+respuesta+")")
		var resultados=res.query.search;
		var div=$('prueba');
		for (k=0; k<resultados.length; k++)
			{ 	
				res_tmp=resultados[k].title;
				var img=document.createElement("img");
				img.setAttribute("src", "BuscadorTemplates\Buscador\images\wikipediares.png");
				var a=document.createElement("a");
				a.setAttribute("href",wikiPath+"/index.php?title="+res_tmp);
				a.appendChild(document.createTextNode(res_tmp))
				var contenedor=document.createElement("div");
				contenedor.appendChild(img);
				contenedor.appendChild(a);
				var br=document.createElement("br");
				div.appendChild(contenedor);
				div.appendChild(br);
			}
		}
	}).request(query);


}
