﻿function newWindow2(url,iWidth,iHeight)

{

	var iTop=(window.screen.height-iHeight)/2;

	var iLeft=(window.screen.width-iWidth)/2;

	var win = window.open(url,'newwindow','top=' + iTop + ',left=' + iLeft + ',status=yes,toolbar=no,location=no,scrollbars=yes,width='+iWidth+',height='+iHeight)

	win.focus();

}



function ValidateEmailFooter()
{
    var bValidated = true;
    var EmailReg = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w)*/;
    var oEmail = document.getElementById("tBox_EmailFooter");
    
    if (oEmail.value=="")
    {
        alert("Please enter a valid e-mail address.");
        oEmail.focus();
        bValidated = false;
    }else{
        if(!EmailReg.test(oEmail.value))
        {
            alert("The e-mail address you entered does not follow the accepted pattern.");
            oEmail.focus();
            bValidated = false;
        }else{
            bValidated = true;
        }
    }
    
    if(bValidated)
    {
        window.location.href = "/myvado/happen/subscribe.aspx?email=" + oEmail.value;
    }
}


