  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, eCheckForm, t9;
          	t1 = document.getElementById('name').value;
          	t2 = document.getElementById('email').value;
          	t3 = document.getElementById('empresa').value;
          	t4 = document.getElementById('telefono').value;
			t5 = document.getElementById('evento').value;
          	t6 = document.getElementById('participantes').value;
          	t7 = document.getElementById('fecha').value;
          	t8 = document.getElementById('comentario').value;
			t9 = document.getElementById('otros').value;
			eCheckForm = '';
			for(var i=0;i<document.getElementById('contactForm').getElementsByTagName('input').length;i++){
			  if(document.getElementById('contactForm').getElementsByTagName('input')[i].type == 'checkbox' &&
				 document.getElementById('contactForm').getElementsByTagName('input')[i].checked == true){
				eCheckForm += document.getElementById('contactForm').getElementsByTagName('input')[i].id +", ";
			  }
			}
          	ajax=AJAXRequest();
          	ajax.open("POST", "mailers/mailerContacto.php",true);
          	ajax.onreadystatechange=function() {
          		if (ajax.readyState==4) {
                  renderLayer(ajax.responseText);
          	 	}
          	}
          	ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
          	ajax.send("content=nombre: "+t1+"\remail: "+t2+"\rempresa: "+t3+"\rtelefono: "+t4+"\revento: "+t5+"\rparticipantes: "+t6+"\rfecha: "+t7+"\rcomentario: "+t8+"\rEstoy interesado en: "+eCheckForm+" y en: "+t9);
          }
          
          function comprobarForm(){
                   if(document.getElementById('email').value == ''){
                     alert('El campo "Email" 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('contactForm').reset();
          }

