var url01a = "capas/capa_prueba.php?variable01="; 
var url01b = "&variable02=";
var url01c = "&variable03="
var http01 = ajax();
function res01(){
	div01=elige01(0);
    if (http01.readyState == 1){
        document.getElementById('cargando').style.visibility = "visible";
    }
    if (http01.readyState == 4){
        results = http01.responseText;
        document.getElementById('men' + div01).innerHTML = results;
		document.getElementById('cargando').style.visibility = "hidden";
		con08(div01);
    }
}
function con01(id){
	mensa = document.getElementById('newmensa' + id).value;
	usu = document.getElementById('usu' + id).value;
    http01.open("GET", url01a + mensa + url01b + id + url01c + usu, true);
	desple=elige01(id);
	document.getElementById('newmensa' + id).value="";	
	http01.onreadystatechange = res01;
	http01.send(null);
}
function elige01(uno){
	if (uno== 0){
			return(div01);
	}
	else {
		div01=uno;
		return(0);
	}
}
function limpiaimput(id){
	document.getElementById('newmensa' + id).value="Nuevo mensaje...";
}

//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------



function ajax(){
    var xmlhttp;

    /*@cc_on
    @if (@_jscript_version >= 5)
    try{
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e){
    try{
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch (e){
    xmlhttp = false;
    }
    }
    @else
    xmlhttp = false;
    @end @*/

    if (!xmlhttp && typeof XMLHttpRequest != 'undefined'){
        try{
            xmlhttp = new XMLHttpRequest();
        }
        catch (e){
            xmlhttp = false;
        }
    }
    return xmlhttp;
}
