var urlThankYou="thankyou.html";        // custom "Thank You" page to be loaded 										// into the main browser window// validate ZIP code (no validation by default)// return TRUE if valid, otherwise display error message and return FALSE function validateZIP(value) {    return true;}// validate e-mail// return TRUE if valid, otherwise display error message and return FALSE function validateEMail(value) {    // use regular expression for the validation    if (!value.match(/^\s*(([_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*)|(\".+\"))@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,6})\s*$/)) {        alert("Invalid e-Mail");        return false;    }    return true;}var iTimerId = 0;function wait(){iTimerId = window.setInterval("checkState()",3000);}function checkState(){	window.clearInterval(iTimerId);	document.forms['emailform'].submit();	//top.close();}// button onClick event handler.// Input argument: form - the form where button is locatedfunction doSubmit(form) {    // get values from the fields in input form    var email=form.email.value;    var zip=form.ZipCode.value;        // validate input data    if (!validateEMail(email)) return;    if (!validateZIP(zip)) return;	//open new window with the frameset containing one visible and one invisible frame	window.open("/message.html","messageWin","height=200,width=400,status=no,toolbar=no,menubar=no,location=no");    //submit a form    wait(form);    //form.submit();    // redirect main browser window to the custom "Thank You"    // window.location=urlThankYou;}
