  function AJAXRequest(){
          	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 getResponse(){
          	var t1, t2, t3, t4, t5, t6, t7, t8, t9;
          	t1 = document.getElementById('marca').value;
          	t2 = document.getElementById('edad').value;
          	t3 = document.getElementById('altura').value;
          	t4 = document.getElementById('frecuencia').value;
			t5 = document.getElementById('handicap').value;
          	t6 = document.getElementById('presupuesto').value;
          	t7 = document.getElementById('email').value;
          	t8 = document.getElementById('nombre').value;
			t9 = document.getElementById('telefono').value;
          	ajax=AJAXRequest();
          	ajax.open("POST", "mailers/mailerPalos.php",true);
          	ajax.onreadystatechange=function() {
          		if (ajax.readyState==4) {
                  renderLayer(ajax.responseText);
          	 	}
          	}
          	ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
          	ajax.send("content=marca: "+t1+"\redad: "+t2+"\raltura: "+t3+"\rfrecuencia: "+t4+"\rhandicap: "+t5+"\rpresupuesto: "+t6+"\remail: "+t7+"\rnombre: "+t8+"\rtelefono: "+t9)
          }
          
          function comprobarForm(){
                   if(document.getElementById('email').value == ''){
                     alert('El campo "Email destino" está vacío. Por favor, rellénalo.')
                     return false;
                   } else {
                     drawGlassPanel();
                     if(navigator.userAgent.indexOf('MSIE') != -1){
                       oDiv.style.height = (document.body.offsetHeight-40)+'px';
                       oDiv.style.width = (document.body.offsetWidth-40)+'px';
                         if(navigator.userAgent.indexOf('MSIE 6.0') != -1){
                           oDiv.style.height = (document.body.offsetHeight)+'px';
                           oDiv.style.width = (document.body.offsetWidth-17)+'px';
                         }
                     }
                     showGlassPanel();
                     getResponse();
                   }
                   
          }
          
          function renderLayer(o){
                  oDiv2.removeChild(oImg);
                  oText.nodeValue = o;
                  oText2.nodeValue = '';                     
                  oDiv2.style.top = (document.body.offsetHeight - oDiv2.offsetHeight) /2 +'px';
                  oDiv2.style.left = (document.body.offsetWidth - oDiv2.offsetWidth) /2 +'px';
                  var timOut = setTimeout ('startFadeOut();',3000);
                  document.getElementById('palosForm').reset();
          }

