// JavaScript Document
function nuevoAjax()
{ 
	/* Crea el objeto AJAX. Esta funcion es generica para cualquier utilidad de este tipo, por
	lo que se puede copiar tal como esta aqui */
	var xmlhttp=false; 
	try 
	{ 
		// Creacion del objeto AJAX para navegadores no IE
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
	}
	catch(e)
	{ 
		try
		{ 
			// Creacion del objet AJAX para IE 
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
		} 
		catch(E) { xmlhttp=false; }
	}
	if (!xmlhttp && typeof XMLHttpRequest!="undefined") { xmlhttp=new XMLHttpRequest(); } 

	return xmlhttp; 
}

function encontrar_online(chica){
	var ajax=nuevoAjax();
	var ojox=nuevoAjax();
	var ejex=nuevoAjax();
	var imagen;
	var nombre_c;
	var idiomas;
	alert(chica)
	ajax.open("GET","buscador.php?find="+chica,true);
	ajax.send(null); 
	document.getElementById('medio').innerHTML='<center><img src="imgs/cargando.gif" style="margin-top:50px;" width="268" height="224" alt="cargando" /></center>';

	
	
			var respuesta='<table style="margin-left:65px; margin-top:92px;"><th></th><th></th><th></th><th></th><th></th><tr><td>\
<div style="background:url(imgs/planchita.png); height:198px; width:166px;">\
<p><div><img src="'+imagen+'" height="124" width="162" style="margin-left:1px; margin-top:29px;" />\
<label id="lab">'+nombre_c+'</label><div style="margin-top:10px; margin-left:50px;">'+idiomas+'</div></div></p>\
</div></td></tr></table></div>';
document.getElementById('medio').innerHTML=ajax.responseText
document.getElementById('medio').innerHTML=document.getElementById('medio').innerHTML +'<p><a href="#" style="margin-left:50px;" onclick="volver()">Volver</a>';
				alert('conseguido');
				

		
}

function volver(){
	document.location.href="/"; 
}
function llevar(id){
	document.location.href="/cam/"+id;
}