var today = Math.floor((new Date()).valueOf() / 86400000); var future = Math.floor((new Date(2006, 1, 5)).valueOf() / 86400000); function countdown() { document.write(future - today); } function validateForm(form) { process = true; errorMessage = "The address: " + form.email.value + " is an AOL account.\nPlease provide a different (non-AOL) email address."; focusOnField = null; searchString = /aol.com$/gi; if (form.email.value.search(searchString) > -1) { form.email.value = ""; focusOnField = form.email; process = false; } if (!process) { alert(errorMessage); focusOnField.focus(); } return process; }