var url_location="";
var url_location_true="";
var print_valoracion=false;
var no_go=false;
seg = 15;

function setHttpRequest(){
   var http_request = false;
   if (window.XMLHttpRequest) { // Mozilla, Safari,...
	http_request = new XMLHttpRequest();
	if (http_request.overrideMimeType) {
		   http_request.overrideMimeType('text/xml');
	}
   } else if (window.ActiveXObject) { // IE
	try {
		   http_request = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		   try {
			  http_request = new ActiveXObject("Microsoft.XMLHTTP");
		   } catch (e) {
		   }
	}
   }
   return http_request;
}

function makeGETRequest(url, parameters) {
//  url = "http://ibdigital.cat" + url;
  http_request = setHttpRequest();
  if (!http_request) {
	 alert('Cannot create XMLHTTP instance');
	 return false;
  }
  
  http_request.onreadystatechange = alertContents;

  http_request.open('GET', url+"?"+parameters, true);
  http_request.send(null);
}

function makePOSTRequest(url, parameters) {
//  url = "http://ibdigital.cat" + url;
/*	if (url_location_true!=""){
		mostrarCargando('Enviando');
	}else{
		mostrarCargando('Cargando...');
	}*/
	mostrarCargando('&nbsp;');
	
	http_request = setHttpRequest();
	if (!http_request) {
		alert('Cannot create XMLHTTP instance');
		return false;
	}
	
	http_request.onreadystatechange = alertContents;
	
	http_request.open('POST', url+"?"+parameters, true);
	http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	http_request.setRequestHeader("Content-length", parameters.length);
	http_request.setRequestHeader("Connection", "close");
	
	http_request.send(parameters);
}
function makePOSTRequest2(url, parameters) {
	mostrarCargando('Cargando...');
	alert ("Cargando...");
	http_request = setHttpRequest();
	if (!http_request) {
		alert('Cannot create XMLHTTP instance');
		return false;
	}
	
	http_request.onreadystatechange = alertContents;
	
	http_request.open('POST', url+"?"+parameters, true);
	http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	http_request.setRequestHeader("Content-length", parameters.length);
	http_request.setRequestHeader("Connection", "close");
	
	http_request.send(parameters);
}

function filterTick(obj, url){
	alert(url);
	obj.href=url;
	TB_init();
}

function alertContents(){
  if (http_request.readyState == 4) {
	 if (http_request.status == 200) {
		result = http_request.responseText;
		if(ie){    
			//document.all[nombreSpan].innerHTML=result;
			document.getElementById(nombreSpan).innerHTML=result;
		}else{
			if(n4){
				document.layers[nombreSpan].innerHTML=result;
			}else{
				if(n6){ 
					document.getElementById(nombreSpan).innerHTML=result;
				}
			}
		}
		if (result=="S'han enviat les dades d'usuari registrat a la seva direcci&oacute; d'e-mail."){
			document.getElementById("spanIdRespOK").style.display = 'none';
		}
		if (result=="Se han enviado los datos de usuario registrado a su direcci&oacute;n de e-mail."){
			document.getElementById("spanIdRespOK").style.display = 'none';
		}
		if ((result=='true')&&(url_location_true!="")){
			document.location.href = url_location_true;
		}else if ((result=='.')&&(url_location_true!="")){
			document.location.href = url_location_true;
		}else{
			if (url_location!="")
			{
/*				if (padre)
				{
					if (result=="")
					{
						parent.location.href = url_location;
					}
				}else{*/
					document.location.href = url_location;
//				}
			}
		}
	 } else {
		//alert('No se ha podido enviar el correo.');
	 }
  }
}
function mostrarCargando(texto){
  var result = '<span style="font-family: arial, verdana; font-size:11px;color:#757371;margin-left:10px;">' + texto + '</span>';
  //nombreSpan = "myspanComen";
	if(ie){    
		//document.all[nombreSpan].innerHTML=result;
		document.getElementById(nombreSpan).innerHTML=result;
	}else{
		if(n4){
			document.layers[nombreSpan].innerHTML=result;
		}else{
			if(n6){      
				document.getElementById(nombreSpan).innerHTML=result;
			}
		}
	}
  result = '';
//  var t=setTimeout("mostrarCargando();", 500);
}
function espera (mls){
  var now = new Date();
  var exitTime = now.getTime() + mls;
  var salir=false;
  while(salir==false)
  {
      now = new Date();
      if(now.getTime() > exitTime) return;
  }
}
/*function actualizarTemp(temp, nomspan, tit, par, par2){
	var poststr = "nomspan=" + nomspan + "&tit=" + tit + "&par=" + par;
	if (par2!=''){
	 poststr = poststr + "&par2=" + par2;
  }
	nombreSpan = nomspan;
	makePOSTRequest("/inc/web/tem/" + temp + ".tem.php", poststr);
}*/
function actMesNoticies (pag, secc){
  var str3 = document.getElementById('pagMN3').src;
  var str6 = document.getElementById('pagMN6').src;
  var str9 = document.getElementById('pagMN9').src;
  
  if (pag=='3'){
    num_art_MN = '3';
    document.getElementById('pagMN3').src = str3.replace('_out', '_over');
    document.getElementById('pagMN6').src = str6.replace('_over', '_out');
    document.getElementById('pagMN9').src = str9.replace('_over', '_out');
  }else if (pag=='6'){
    num_art_MN = '6';
    document.getElementById('pagMN6').src = str6.replace('_out', '_over');
    document.getElementById('pagMN3').src = str3.replace('_over', '_out');
    document.getElementById('pagMN9').src = str9.replace('_over', '_out');
  }else{
    num_art_MN = '9';
    document.getElementById('pagMN9').src = str9.replace('_out', '_over');
    document.getElementById('pagMN6').src = str6.replace('_over', '_out');
    document.getElementById('pagMN3').src = str3.replace('_over', '_out');
  }
	var poststr = "par=" + pag + "&hw_seccion=" + secc;
	nombreSpan = "myspanMesNoticies";
	makePOSTRequest("/inc/ajax/tem/2.ajax.php", poststr);
}
function actOpinio (pag, tipo, opt){
	if (opt==""){
		opt = 'blog';
	}
	var spg3 = 'pag03'+opt;
	var spg6 = 'pag06'+opt;
	var spg9 = 'pag09'+opt;
	var spg12 = 'pag12'+opt;
	
	var spgfot = 'foto'+opt;
	var spglis = 'lista'+opt;
	
/*	var spg3 = 'pag03';
	var spg6 = 'pag06';
	var spg9 = 'pag09';
	var spg12 = 'pag12';
	
	var spgfot = 'foto';
	var spglis = 'lista';*/
	
	var str3 = document.getElementById(spg3).src;
	var str6 = document.getElementById(spg6).src;
	var str9 = document.getElementById(spg9).src;
	var str12 = document.getElementById(spg12).src;
	
	var strf = document.getElementById(spgfot).src;
	var strl = document.getElementById(spglis).src;
  if (pag=='3'){
    num_art_O = '3';
    document.getElementById(spg3).src = str3.replace('_out', '_over');
    document.getElementById(spg6).src = str6.replace('_over', '_out');
    document.getElementById(spg9).src = str9.replace('_over', '_out');
    document.getElementById(spg12).src = str12.replace('_over', '_out');
  }else if (pag=='6'){
    num_art_O = '6';
    document.getElementById(spg6).src = str6.replace('_out', '_over');
    document.getElementById(spg3).src = str3.replace('_over', '_out');
    document.getElementById(spg9).src = str9.replace('_over', '_out');
    document.getElementById(spg12).src = str12.replace('_over', '_out');
  }else if (pag=='9'){
    num_art_O = '9';
    document.getElementById(spg9).src = str9.replace('_out', '_over');
    document.getElementById(spg3).src = str3.replace('_over', '_out');
    document.getElementById(spg6).src = str6.replace('_over', '_out');
    document.getElementById(spg12).src = str12.replace('_over', '_out');
  }else{
    num_art_O = '12';
    document.getElementById(spg12).src = str12.replace('_out', '_over');
    document.getElementById(spg9).src = str9.replace('_over', '_out');
    document.getElementById(spg6).src = str6.replace('_over', '_out');
    document.getElementById(spg3).src = str3.replace('_over', '_out');
  }
  if (tipo=='foto'){
    tipo_apart = 'foto';
    document.getElementById(spgfot).src = strf.replace('_out', '_over');
    document.getElementById(spglis).src = strl.replace('_over', '_out');
  }else{
    tipo_apart = 'lista';
    document.getElementById(spgfot).src = strf.replace('_over', '_out');
    document.getElementById(spglis).src = strl.replace('_out', '_over');
  }
  if (tipo=='foto'){
    document.getElementById(spg3).style.display = 'inline';
    document.getElementById(spg6).style.display = 'inline';
    document.getElementById(spg9).style.display = 'inline';
    document.getElementById(spg12).style.display = 'inline';
  }else{
    document.getElementById(spg3).style.display = 'none';
    document.getElementById(spg6).style.display = 'none';
    document.getElementById(spg9).style.display = 'none';
    document.getElementById(spg12).style.display = 'none';
  }
	var poststr = "par=" + pag + "&tipo=" + tipo + "&opt_lib=" + opt;
	nombreSpan = "myspanOpinio_" + opt;
  if (tipo=='foto'){
  	makePOSTRequest("/inc/ajax/tem/4.ajax.php", poststr);
  }else{
  	makePOSTRequest("/inc/ajax/tem/4_2.ajax.php", poststr);
  }
}
function actFichaOpinio (redac, idi, opt){
	if (document.getElementById('img_enl_opinio'+redac_act)){
		var str_act = document.getElementById('img_enl_opinio'+redac_act).src;
		//document.getElementById('img_enl_opinio'+redac_act).src = str_act.replace('flecha_small2_red.gif', 'flecha_small2.gif');
		//document.getElementById('enl_opinio'+redac_act).style.color = "#757371";
	}
	var str_fut = document.getElementById('img_enl_opinio'+redac).src;
	//document.getElementById('img_enl_opinio'+redac).src = str_fut.replace('flecha_small2.gif', 'flecha_small2_red.gif');
	//document.getElementById('enl_opinio'+redac).style.color = "#9C1F2E";
	redac_act = redac;
	
	var poststr = "redac=" + redac + "&idi=" + idi;
	nombreSpan = "myspanFichaOpinio_"+opt;
 	makePOSTRequest("/inc/ajax/tem/4_2_1.ajax.php", poststr);
}
function actUltTitulares (cat){
  var str_act = document.getElementById('img_enl_ulttit'+cat_act).src;
  var str_fut = document.getElementById('img_enl_ulttit'+cat).src;
  
 // document.getElementById('img_enl_ulttit'+cat_act).src = str_act.replace('flecha_small2_red.gif', 'flecha_small2.gif');
 // document.getElementById('img_enl_ulttit'+cat).src = str_fut.replace('flecha_small2.gif', 'flecha_small2_red.gif');
	
	//document.getElementById('enl_ulttit'+cat_act).style.color = "#757371";
	//document.getElementById('enl_ulttit'+cat).style.color = "#9C1F2E";
	
  cat_act = cat;
  
  var poststr = "cat=" + cat;
	nombreSpan = "myspanUltTit";
 	makePOSTRequest("/inc/ajax/tem/6.ajax.php", poststr);
}
function actMesEdicions(cat){
	var str_act = document.getElementById('img_enl_mesedi'+cat_act_mesedi).src;
	var str_fut = document.getElementById('img_enl_mesedi'+cat).src;
  
	document.getElementById('img_enl_mesedi'+cat_act_mesedi).src = str_act.replace('flecha_small2_red.gif', 'flecha_small2.gif');
	document.getElementById('img_enl_mesedi'+cat).src = str_fut.replace('flecha_small2.gif', 'flecha_small2_red.gif');
	
	//document.getElementById('enl_mesedi'+cat_act_mesedi).style.color = "#757371";
	//document.getElementById('enl_mesedi'+cat).style.color = "#9C1F2E";
	
	cat_act_mesedi = cat;
  
	var poststr = "cat=" + cat;
	nombreSpan = "myspanMesEdi";
 	makePOSTRequest("/inc/ajax/tem/19.ajax.php", poststr);
}
function envComentario(frm){
	var comen = "";
	comen = frm.comen.value;
	comen = comen.replace(/€/g, 'euro;');
	var poststr = "iddoc=" + frm.iddoc.value + "&nombre=" + frm.nombre.value + "&email=" + frm.email.value + "&ciudad=" + frm.ciudad.value + "&comen=" + comen;
	if (frm.codconf){
		poststr = poststr + "&codconf=" + frm.codconf.value + "&ids=" + frm.id_sess.value;
	}	
	nombreSpan = "myspanComen";
	makePOSTRequest("/inc/ajax/noti/noti-0001.ajax.php", poststr);
}
/*function envComentario2(frm){
	alert ("IF YO 1");
	var poststr = "iddoc=" + frm.iddoc.value + "&nombre=" + frm.nombre.value + "&email=" + frm.email.value + "&ciudad=" + frm.ciudad.value + "&comen=" + frm.comen.value;
	alert ("IF YO 2");
	nombreSpan = "myspanComen";
	makePOSTRequest2("/inc/ajax/noti/noti-0001.ajax.php", poststr);
	alert ("IF YO 3");
}*/
function envContacto(frm){
	var poststr = "nom=" + frm.nom.value + "&mai=" + frm.mai.value + "&tel=" + frm.tel.value + "&mot=" + frm.mot.value;
	nombreSpan = "spanResultContacto";
	makePOSTRequest("/inc/ajax/comn/comn-0002.ajax.php", poststr);
}
function envAmigo(frm){
	var nom2 = frm.nombre2.value;
	nom2 = nom2.replace(";", "");nom2 = nom2.replace(";", "");nom2 = nom2.replace(";", "");
	nom2 = nom2.replace(",", ";");nom2 = nom2.replace(",", ";");nom2 = nom2.replace(",", ";");
	var mai2 = frm.email2.value;
	mai2 = mai2.replace(";", "");mai2 = mai2.replace(";", "");mai2 = mai2.replace(";", "");
	mai2 = mai2.replace(",", ";");mai2 = mai2.replace(",", ";");mai2 = mai2.replace(",", ";");
	var poststr = "iddoc=" + frm.iddoc.value + "&nombre=" + frm.nom.value + "&email=" + frm.mai.value + "&nombre2=" + nom2 + "&email2=" + mai2 + "&mens=" + frm.mens.value + "&tip=" + frm.tip.value + "&idi=" + frm.idi.value + "&url=" + frm.url.value;
	nombreSpan = "myspanEnviar";
	makePOSTRequest("/inc/ajax/noti/noti-0003.ajax.php", poststr);
}
function getVotar (iddoc){
	var poststr = "iddoc=" + iddoc;
	nombreSpan = "myspanMene";
	makePOSTRequest("/inc/ajax/noti/noti-0004.ajax.php", poststr);
}
function envUsuario(frm, tipo, conf){
	var poststr = "usu=" + frm.usu.value + "&pw=" + frm.pw.value + "&tip=" + tipo;
	if (conf==true){
		if (frm.idi.value=="es"){
			url_location_true = "http://confidencial.ibdigital.es/";
		}else{
			url_location_true = "http://confidencial.ibdigital.net/";
		}
	}else{
		if (frm.idi.value=="es"){
			url_location_true = "http://usuarios.ibdigital.es/zona-usuarios/";//frm.hw_url_actual.value;
//			url_location_true = "http://confidencial.ibdigital.net/";
		}else{
			url_location_true = "http://usuaris.ibdigital.net/zona-usuaris/";//frm.hw_url_actual.value;
//			url_location_true = "http://confidencial.ibdigital.cat/";
		}
	}
	if (tipo!="2")
	{
		if (frm.idi.value=="es"){
			url_location = "http://ibdigital.es/recordar-contrasena/";
		}else{
			url_location = "http://ibdigital.net/recordatori-contrasenya/";
		}
	}
	if (tipo=="2"){
		nombreSpan = "myspanResultUsu2";
	}else{
		nombreSpan = "myspanResultUsu";
	}
	makePOSTRequest("/inc/ajax/usua/usua-0001.ajax.php", poststr);
}
function outUsuario(frm){
	var poststr = "";
//	var poststr = "usu=" + frm.usu.value + "&pw=" + frm.pw.value;
	if (frm.dom.value=="usuarios"){
		url_location_true = "http://ibdigital.es";
	}else if (frm.dom.value=="usuaris"){
		url_location_true = "http://ibdigital.net";
	}else{
		url_location_true = frm.hw_url_actual.value;
	}
	url_location = url_location_true;
	nombreSpan = "myspanResultUsu";
	makePOSTRequest("/inc/ajax/usua/usua-0002.ajax.php", poststr);
}
/*function envAltaUsuario(frm){
	var poststr = "usuario=" + frm.usuario.value + "&pw=" + frm.pw.value + "&pw2=" + frm.pw2.value + "&mail=" + frm.mail.value + "&mail2=" + frm.mail2.value + "&movil=" + frm.movil.value;
	if (frm.idi.value=="es"){
		url_location_true = "/confirmar-usuario/";
	}else{
		url_location_true = "/confirmar-usuari/";
	}
	
	nombreSpan = "myspanResultUsu";
	makePOSTRequest("/inc/ajax/usua/usua-0003.ajax.php", poststr);
}*/
function envRespEncuesta(urlpreg, idpreg, idresp, bloq){
	var poststr = "idpreg=" + idpreg + "&idresp=" + idresp;
//	url_location_true = urlpreg;
	url_location = urlpreg;
	if (bloq==1){
		nombreSpan = "myspanResultPreg";
		poststr = poststr + "&bloque=1";
	}else{
		nombreSpan = "myspanResultPreg2";
		poststr = poststr + "&bloque=2";
	}
	makePOSTRequest("/inc/ajax/preg/preg-0001.ajax.php", poststr);
}
function envDatosUsu(frm, idi){
	var poststr = "usu=" + frm.usu.value + "&nom=" + frm.nom.value + "&ape=" + frm.ape.value + "&ape2=" + frm.ape2.value + "&mai=" + frm.mai.value + "&cp=" + frm.cp.value + "&dir=" + frm.dir.value + "&pai=" + frm.pai.value + "&pro=" + frm.pro.value + "&pob=" + frm.pob.value;
	nombreSpan = "myspanDatosUsuario";
	makePOSTRequest("/inc/ajax/usua/usua-0005.ajax.php", poststr);
}
function outSession(url){
	url_location = url;
	var poststr = "";
	nombreSpan = "myspanResultUsu";
	makePOSTRequest("/inc/ajax/usua/usua-0002.ajax.php", poststr);
}
function cambCont(frm){
	var poststr = "nueva=" + frm.nueva.value + "&nueva2=" + frm.nueva2.value;
	nombreSpan = "myspanDatosUsuario";
	makePOSTRequest("/inc/ajax/usua/usua-0007.ajax.php", poststr);
}
function cambEmail(frm){
	var poststr = "nueva=" + frm.nueva.value + "&nueva2=" + frm.nueva2.value;
	nombreSpan = "myspanDatosUsuario";
	makePOSTRequest("/inc/ajax/usua/usua-0008.ajax.php", poststr);
}
function envRecoUsuario(frm){
	var poststr = "mai=" + frm.email.value;
	nombreSpan = "spanResultUsuario";
	makePOSTRequest("/inc/ajax/usua/usua-0015.ajax.php", poststr);
}
function envAcceso(frm, idi, a){
	var poststr = "cod=" + frm.cod_acc.value + "&idi=" + idi;
	if (idi=="es"){
		url_location_true = "http://confidencial.ibdigital.es";
	}else{
		url_location_true = "http://confidencial.ibdigital.net";
	}
	nombreSpan = "myspanResultAcc";
	makePOSTRequest("/inc/ajax/conf/conf-0002.ajax.php", poststr);
}
function envBoletin(frm){
	var poststr = "idi=" + frm.radidi.value + "&id0=" + frm.idboletin0.value + "&id1=" + frm.idboletin1.value + "&id2=" + frm.idboletin2.value;
	poststr = poststr + "&cat0=" + frm.categ0.value + "&cat1=" + frm.categ1.value + "&cat2=" + frm.categ2.value;
	poststr = poststr + "&tip0=" + frm.rad0.value + "&tip1=" + frm.rad1.value + "&tip2=" + frm.rad2.value;
	poststr = poststr + "&hor0=" + frm.hora0.value + "&hor1=" + frm.hora1.value + "&hor2=" + frm.hora2.value;
	nombreSpan = "myspanDatosUsuario";
	makePOSTRequest("/inc/ajax/usua/usua-0010.ajax.php", poststr);
}
function paginacionAjax(frm, p, ajax){
//	var poststr = "ud=" + frm.url_document.value + "&id=" + frm.id.value + "&tc=" + frm.tc.value + "&pag=" + p;
	var poststr = "id=" + frm.id.value + "&pag=" + p;
	nombreSpan = frm.span_pagin.value;
	if (frm.file_ajax.value=="/core/comn/comn-0002.inc.php"){
		makePOSTRequest("/inc/lib" + frm.file_ajax.value, poststr);
	}else{
		makePOSTRequest("/inc/ajax" + frm.file_ajax.value, poststr);
	}
}
function cambiarJornada(jor, comp, tip){
	var poststr = "com=" + comp + "&jor=" + jor + "&tip=" + tip;
	nombreSpan = "spanCompeticion";
	makePOSTRequest("/inc/ajax/comp/comp-0001.ajax.php", poststr);
}
function bajaUsuario(id, idi){
	if (idi=="es"){
		url_location_true = "http://www.ibdigital.es";
	}else{
		url_location_true = "http://www.ibdigital.net";
	}
	var poststr = "id=" + id + "&idioma=" + idi;
	nombreSpan = "spanBaja";
	makePOSTRequest("/inc/ajax/usua/usua-0016.ajax.php", poststr);
}
function envBlog(frm, idi){
	if (idi=="es"){
		url_location_true = "http://usuarios.ibdigital.es/zona-usuarios/servicios/blog-creado/";
	}else{
		url_location_true = "http://usuaris.ibdigital.net/zona-usuaris/serveis/blog-creat/";
	}
	var poststr = "usua=" + frm.usua.value + "&blog=" + frm.blog.value + "&urlblog=" + frm.urlblog.value + "&idi=" + idi;
	nombreSpan = "myspanDatosUsuario";
	makePOSTRequest("/inc/ajax/usua/usua-0017.ajax.php", poststr);
}


// VARIABLE DE DOMINIO
var blog_domain="blogs.ibdigital.net";
//Creamos el Objeto AJAX
//para la ejecución de procesos AJAX
function ajaxobj() {
	try {
		_ajaxobj = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			_ajaxobj = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			_ajaxobj = false;
		}
	}
	if (!_ajaxobj && typeof XMLHttpRequest!='undefined') {
		_ajaxobj = new XMLHttpRequest();
	}
	return _ajaxobj;
}
/* COMPROBAR DISPONIBILIDAD USUARIO */
/* zisponibility! developed by eze hispanetwork */
function getZisponibilityUser(val,input, idi){
	espera();
	input.value=parseToURL(val);
	var div=document.getElementById('zisponibilityUserBox'); //campturamos el contenedor para elmensaje de disponibiliad
	var parameters = "val=" + val; //declaramos los parámetros a comparar
	ajax = ajaxobj(); //inicializamos el objeto ajax
	ajax.open("POST", "/inc/ajax/usua/usua-0018.ajax.php"); //llamamos al proceso ajax
	ajax.onreadystatechange=function(){
	if (idi=="es"){
		div.innerHTML = "Comprobando..."; //mientras se realiza la búsqueda mostramos un texto "Comprobando..."
	}else{
		div.innerHTML = "Comprovant..."; //mientras se realiza la búsqueda mostramos un texto "Comprobando..."
	}
		if (ajax.readyState==4) {
			var datos = ajax.responseText; //capturamos el resultado de la búsqueda
			div.innerHTML=datos; //mostramos en el contenedor el texto devuelto
		}
	}
	ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;'); // configuraciones raras para el ajax
	ajax.send(parameters); //aquí se envían los parámetros al ajax
	return null; 
}
/* COMPROBAR DISPONIBILIDAD BLOG */
/* zisponibility! developed by eze hispanetwork */
function getZisponibilityBlog(val,input, idi){
	espera();
	input.value=parseToURL(val);
	var div=document.getElementById('zisponibilityUrlBlog'); //campturamos el contenedor para elmensaje de disponibiliad
	var parameters = "val=" + val; //declaramos los parámetros a comparar
	ajax = ajaxobj(); //inicializamos el objeto ajax
	ajax.open("POST", "/inc/ajax/usua/usua-0019.ajax.php"); //llamamos al proceso ajax
	ajax.onreadystatechange=function(){
	if (idi=="es"){
		div.innerHTML = "Comprobando..."; //mientras se realiza la búsqueda mostramos un texto "Comprobando..."
	}else{
		div.innerHTML = "Comprovant..."; //mientras se realiza la búsqueda mostramos un texto "Comprobando..."
	}
		if (ajax.readyState==4) {
			var datos = ajax.responseText; //capturamos el resultado de la búsqueda
			div.innerHTML=datos; //mostramos en el contenedor el texto devuelto
		}
	}
	ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;'); // configuraciones raras para el ajax
	ajax.send(parameters); //aquí se envían los parámetros al ajax
	return null; 
}
function espera(){
	var t=setTimeout("",2000);
}
