    function lightwindow(){
        var width = 0, height = 0;
        if( typeof( window.innerWidth ) == 'number' ) {
          //Non-IE
          width = document.body.clientWidth;
          //height = window.innerHeight;
          height = document.body.clientHeight;
        } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
          //IE 6+ in 'standards compliant mode'
          width = document.documentElement.clientWidth;
          height = document.body.clientHeight;
        } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
          //IE 4 compatible
          width = document.body.clientWidth;
          height = document.body.clientHeight;
        }
        var negro = document.createElement("div");
        negro.id = "opacador";
        negro.style.backgroundColor = "#333";
        negro.style.opacity = '0.7';
        negro.style.filter = '0.7';
        negro.style.filter = 'alpha(opacity=70)';
        negro.style.position = "absolute";
        negro.style.top = "0";
        negro.style.left = "0";
        negro.style.minHeight = "100%";
        negro.style.width = width+"px";
        negro.style.height= height+"px";

        var contenido = document.createElement("div");
        contenido.style.backgroundColor = "#FFFFFF";
        contenido.style.position = "absolute";
        contenido.style.top = (height/2)-150+"px";
        contenido.id = "contenedor";
        contenido.style.left = (width/2)-150+"px";
        contenido.style.width = "250px";
        contenido.style.height = "261px";
        contenido.style.zIndex = 1000;
        contenido.style.textAlign = "center";
        contenido.style.border = "5px solid black";

        var cerrarP = document.createElement("p");
        var cerrarA = document.createElement("a");
        var cerrarImg = document.createElement("img");
        cerrarImg.src = "/images/ic_cerrar_sinfondo.gif";
        cerrarImg.style.border = "none";
        cerrarA.appendChild(cerrarImg);
        cerrarA.href = "#";
        cerrarA.style.cursor = "pointer";
        cerrarA.onclick = function (){
            var negro = document.getElementById("opacador");
            document.body.removeChild(negro);
            document.body.removeChild(contenido);
        }
        cerrarP.style.textAlign = "right";
        cerrarP.style.marginBottom = "45px";
        cerrarP.appendChild(cerrarA);

        var formulario = document.createElement("div");
        formulario.style.marginTop = "10px";
        formulario.style.width = "200px";
        formulario.style.margin = "0 auto";
        formulario.innerHTML = '<form name="emvForm" id="emvForm" action="http://tre.emv3.com/D2UTF8" method="POST" target="_top"><input type="hidden" name="emv_tag" value="827B751C29010008" /><input type="hidden" name="emv_ref" value="BdX7CqkdEEYzyRIKcpV66rnVIUx7HK3D8g1k" /><input type="hidden" id="EMVADMIN1_FIELD" name="EMVADMIN1_FIELD" value="ES"><input type="hidden" id="EMVADMIN2_FIELD" name="EMVADMIN2_FIELD" value="BENEWS"><p style="font-size:1.3em;text-align:left;">E-Mail:</p><input type="text" id="EMAIL_FIELD" name="EMAIL_FIELD" value="" size="29" style="margin-bottom:15px;" maxlength="64" alt="Email"><input type="button" id="botSend" value="" onClick="validarMail();"></form>';
        /*formulario.onkeypress = function(){
            var errores = $('errores');
            var contenido = $('contenedor');
            contenido.removeChild(errores);
        }*/

        contenido.appendChild(cerrarP);
        contenido.appendChild(formulario);
        document.body.appendChild(contenido);
        document.body.appendChild(negro);
    }

    function validarMail(){
        var mail = $('EMAIL_FIELD');
        var contenido = $('contenedor');

        if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail.value)){
            $('emvForm').submit();
        }else {

            if($('errores')) { 
                // ...
            }else {
                var msj = document.createElement("p");
                msj.id = "errores";
                msj.innerHTML = '<span style="color:#e02514">La direcci�n de email es incorrecta.</span>';
                contenido.appendChild(msj);
            }
            return (false);
        }
    }
	
	function gup( name ){
	
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp( regexS );
	var results = regex.exec( window.location.href );
	if( results == null )
		return "";
	else
		return results[1];
	}
