function SaveSourceEmail(d,b){var a=document.getElementById(d);var c=new SourceEmail(a,b);if(c.ValidateEmail()){c.SaveEmail("SaveSourceEmailCallback")}a.value=""}function SaveSourceEmailCallback(a){if(a.Response.Code){if(a.Response.Code==1){document.getElementById("divWeeklyEmail").innerHTML="Thank you for subscribing to Break's Weekly email.  In a few minutes, you'll receive an email at the address you supplied.  Just click on the link in the email to finish your subscription."}else{if(a.Response.Code==0){document.getElementById("divWeeklyEmail").innerHTML="Thank you. You already subscribe to Break's Weekly email."}}}}function SourceEmail(a,d){SourceEmail.prototype.SaveEmail=function(f){c(f)};function c(f){var g=new BreakJSON();g.sendBegin("http://websvc.break.com/cms/Handlers/Email/EmailHandler.ashx?invoke=setmarketingemail&wc=1&sb=1&sid="+d+"&ea="+a.value,f)}SourceEmail.prototype.ValidateEmail=function(){if((a.value==null)||(a.value=="")){alert("Please type your e-mail address in the format yourname@example.com");a.focus();return false}if(b(a.value)==false){pEmailAddressvalue="";a.focus();return false}return true};var e;function b(g){var f=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;if(f.test(g)){e=true}else{alert("Please type your e-mail address in the format yourname@example.com");e=false}return(e)}};