function EnviarMensajeContactar(MSJ_ERRORCAMPOS,MSJ_ERROREMAIL,MSJ_ENVIANDO)
{  

if (ValidarCamposContactar(MSJ_ERRORCAMPOS,MSJ_ERROREMAIL)==false) return;    


var NOMBREREMITENTE   =   document.FORMCONTACTAR.NOMBREREMITENTE.value;
var EMPRESAREMITENTE  =   document.FORMCONTACTAR.EMPRESAREMITENTE.value;
var EMAILREMITENTE    =   document.FORMCONTACTAR.EMAILREMITENTE.value;
var TELEFONOREMITENTE =   document.FORMCONTACTAR.TELEFONOREMITENTE.value;
var ASUNTO            =   document.FORMCONTACTAR.ASUNTO.value;
var MENSAJE           =   document.FORMCONTACTAR.MENSAJE.value;

var strDIVPROCESANTO='DIVPROCESANDO';
document.getElementById(strDIVPROCESANTO).innerHTML ="<img src='/images/loading_icon.gif'/>&nbsp;&nbsp;" + MSJ_ENVIANDO;

  

    var oXmlHttp = createXMLHttp();
    if (oXmlHttp==null) return;
    var url="./ajax/mailer.jsp?" + "NOMBREREMITENTE=" + escape(NOMBREREMITENTE) + "&EMPRESAREMITENTE=" + escape(EMPRESAREMITENTE) +"&EMAILREMITENTE=" + escape(EMAILREMITENTE) + "&TELEFONOREMITENTE=" + escape(TELEFONOREMITENTE) + "&ASUNTO=" + escape(ASUNTO) + "&MENSAJE=" + escape(MENSAJE);
    oXmlHttp.open("get",url,true);
    oXmlHttp.onreadystatechange = function () {
        if (oXmlHttp.readyState == 4 ) {
           var strId='DIVCONTACTAR'; 
           document.getElementById(strId).innerHTML =oXmlHttp.responseText;
        }
    }
    oXmlHttp.send(null);

}
//------------------------------------------------------------------
function ValidarCamposContactar(MSJ_ERRORCAMPOS,MSJ_ERROREMAIL)
{
var strTmp="";
strTmp=document.FORMCONTACTAR.NOMBREREMITENTE.value;
if (strTmp=="") 
   {
   alert(MSJ_ERRORCAMPOS);
   document.FORMCONTACTAR.NOMBREREMITENTE.focus();
   return(false);
   }

strTmp="";
strTmp=document.FORMCONTACTAR.EMPRESAREMITENTE.value;
if (strTmp=="") 
   {
   alert(MSJ_ERRORCAMPOS);
   document.FORMCONTACTAR.EMPRESAREMITENTE.focus();
   return(false);
   }

strTmp="";
strTmp=document.FORMCONTACTAR.EMAILREMITENTE.value;
if (strTmp=="") 
   {
   alert(MSJ_ERRORCAMPOS);
   document.FORMCONTACTAR.EMAILREMITENTE.focus();
   return(false);
   }

strTmp="";
strTmp=document.FORMCONTACTAR.TELEFONOREMITENTE.value;
if (strTmp=="") 
   {
   alert(MSJ_ERRORCAMPOS);
   document.FORMCONTACTAR.TELEFONOREMITENTE.focus();
   return(false);
   }

strTmp="";
strTmp=document.FORMCONTACTAR.ASUNTO.value;
if (strTmp=="") 
   {
   alert(MSJ_ERRORCAMPOS);
   document.FORMCONTACTAR.ASUNTO.focus();
   return(false);
   }

strTmp="";
strTmp=document.FORMCONTACTAR.MENSAJE.value;
if (strTmp=="") 
   {
   alert(MSJ_ERRORCAMPOS);
   document.FORMCONTACTAR.MENSAJE.focus();
   return(false);
   }

var strEmail=document.FORMCONTACTAR.EMAILREMITENTE.value;
if (ComprobarEmail(strEmail)==false)
   {
   alert(MSJ_ERROREMAIL);
   document.FORMCONTACTAR.EMAILREMITENTE.focus();
   return(false);
   }

return(true);
}
//------------------------------------------------------------------
