
function submitEmailMe() {
    var inp = document.getElementById('inpEmailBox');
    if (!!inp) {
        if (inp.value == '' || inp.value == 'Enter Email Address Here') {
            alert('Please enter your email address to continue.');
        } else {
            //alert(inp.value);
            if ( inp.value.indexOf('@') < 1 || inp.value.indexOf('.') < 3)
                alert('Please enter a valid email address (name@example.com) to continue.');
            else {
                var cookieName = 'txtGetEmailUpdates';
                var today = new Date(); 
                var expire = new Date(); 
                // expire in 10 mins
                expire.setTime(today.getTime() + 600);
                
                // build the cookie
                var cookiestring = cookieName+"="+escape(inp.value) + ";expires="+expire.toGMTString();
                
                
                    // so cookie can be passed from unsecure to secure domain name in production
                    cookiestring += ";domain=.everylampshade.com";
                
                
                document.cookie = cookiestring;
                document.location = 'https://secure.everylampshade.com/protected/contactus/email';
            }
        }
    }
    return false;
}