function validate_feedback_form() { // init var error = 'errors:' + '\t\n\n'; var errors = Array(); var focus = null; var form = document.forms['feedback']; var i_errors = 0; // validation if (empty(form.elements['comment'].value)) { errors[i_errors++] = 'you must specify a comment.'; focus = focus == null ? 'comment' : focus; } // error handling if (i_errors > 0) { for (i = 0; i < i_errors; i++) error += errors[i] + '\t\n'; alert(error); if (focus != null) form.elements[focus].focus(); return false; } // success else { var width = 367; var height = 214; var left = (screen.width - width) / 2; var top = (screen.height - height) / 2; var feedback = window.open('/blank.asp?title=please wait...', 'feedback', 'scrollbars,status,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top); feedback.focus(); return true; } } function toggle_ms(name) { if (empty(document.getElementById('ms_' + name + '_links').style.display)) { document.getElementById('ms_' + name + '_links').style.display = 'none'; document.getElementById('ms_' + name + '_line').style.display = 'none'; document.getElementById('ms_' + name + '_arrow').src = '/media/right_arrow_red_ms.gif'; } else { document.getElementById('ms_' + name + '_links').style.display = ''; document.getElementById('ms_' + name + '_line').style.display = ''; document.getElementById('ms_' + name + '_arrow').src = '/media/down_arrow_red_ms.gif'; } } function fn_sign_up() { var width = 375; var height = 225; var left = (screen.width - width) / 2; var top = (screen.height - height) / 2; var sign_up = window.open('/sign_up_thanks.asp', 'sign_up_thanks', 'status,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top); sign_up.focus(); } function fn_form_success(intID) { var width = 375; var height = 225; var left = (screen.width - width) / 2; var top = (screen.height - height) / 2; var form_success = window.open('form_thanks.asp?ei='+intID, 'form_thanks', 'status,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top); form_success.focus(); } function fn_fw(intID) { var width = 640; var height = 480; var left = (screen.width - width) / 2; var top = (screen.height - height) / 2; var fw = window.open('/form.asp?ei='+intID+'&p=1', 'form_popup', 'scrollbars,status,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top); fw.focus(); } function validate_newsletter_form() { // init var error = 'errors:' + '\t\n\n'; var errors = Array(); var focus = null; var form = document.forms['newsletter']; var i_errors = 0; // validation if (!validate_email(form.elements['email'].value)) { errors[i_errors++] = 'you must specify a valid email.'; focus = focus == null ? 'email' : focus; } // error handling if (i_errors > 0) { for (i = 0; i < i_errors; i++) error += errors[i] + '\t\n'; alert(error); if (focus != null) form.elements[focus].focus(); return false; } // success else { var width = 375; var height = 265; var left = (screen.width - width) / 2; var top = (screen.height - height) / 2; var newsletter = window.open('/newsletter_thanks.asp?e=' + form.elements['email'].value, 'newsletter', 'status,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top); newsletter.focus(); return true; } } function validate_sidebar_form(sidebarform, sidebarid) { // this needs to be fairly heavily modified to make a generic sidebar input system. The validation type will need to be dynamically specified. // init var error = 'errors:' + '\t\n\n'; var errors = Array(); var focus = null; var form = sidebarform; var i_errors = 0; // validation if (!validate_telephone(form.elements['sidebar_input'].value)) { errors[i_errors++] = 'please enter a valid mobile phone number. numbers and spaces only.'; focus = focus == null ? 'sidebar_input' : focus; } // error handling if (i_errors > 0) { for (i = 0; i < i_errors; i++) error += errors[i] + '\t\n'; alert(error); if (focus != null) form.elements[focus].focus(); //return false; } // success else { var width = 375; var height = 265; var left = (screen.width - width) / 2; var top = (screen.height - height) / 2; var newsletter = window.open('/sidebar_input.asp?id='+sidebarid+'&input=' + form.elements['sidebar_input'].value, 'sidebar', 'status,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top); newsletter.focus(); //return true; } } function validate_sidebar_sms_form(sidebarform, sidebarid) { // this needs to be fairly heavily modified to make a generic sidebar input system. The validation type will need to be dynamically specified. // init var error = 'errors:' + '\t\n\n'; var errors = Array(); var focus = null; var form = sidebarform; var i_errors = 0; // validation if (!validate_telephone(form.elements['sidebar_input'].value)) { errors[i_errors++] = 'please enter a valid mobile phone number. numbers and spaces only.'; focus = focus == null ? 'sidebar_input' : focus; } // error handling if (i_errors > 0) { for (i = 0; i < i_errors; i++) error += errors[i] + '\t\n'; alert(error); if (focus != null) form.elements[focus].focus(); //return false; } // success else { var width = 375; var height = 265; var left = (screen.width - width) / 2; var top = (screen.height - height) / 2; var newsletter = window.open('/sidebar_sms_input.asp?id='+sidebarid+'&input=' + form.elements['sidebar_input'].value+'&cid=' + form.elements['Campaign_ID'].value, 'sidebar', 'status,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top); newsletter.focus(); //return true; } } function toggle_description(i) { if (empty(document.getElementById('issue_' + i).style.display)) { document.getElementById('issue_' + i).style.display = 'none'; document.getElementById('image_' + i).src = '/media/right_arrow_red.gif'; } else { document.getElementById('issue_' + i).style.display = ''; document.getElementById('image_' + i).src = '/media/down_arrow_red.gif'; } } function show_dictionary(id, title) { dictionary('/dictionary.asp?ti=' + id + '&an=' + title.replace(/\s/g, '_')); }