function ajx(){
	
	var xmlhttp=false;
	
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
		 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
		 xmlhttp = false;
		}
	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
	
	return xmlhttp;

}

/*
* Function sendForm
* @param oForm: Object Form to send
*/
function sendForm(oForm){
	
	c = document.getElementById('divMessage');
	ajax=ajx();
	c.innerHTML = '<div style="text-align:center;"><img src="'+strPath+'/images/esperando.gif"/></div>'; 
	ajax.open("POST", strPath+"/scripts/envia_mail.php",true);
	
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			c.innerHTML = ajax.responseText
		}
	}
		
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	
	var strVars="";
	
	for (var i=0; i <= oForm.elements.length-1;i++)
		strVars+=oForm.elements[i].name + "=" + oForm.elements[i].value+"&";
		
	ajax.send(strVars);
	
	oForm.reset();
	
}

