1 2var url=location.href;var filename=url.substring(url.indexOf('/',10)+1,url.length,url);var xCloseHTML=' <a href="javascript:void(0);">X</a>';function hideStatus() 3{$('div.samplesWrapC.tbc p.status a').click(function(){$(this).parent().hide();});} 4$(function(){if(TBwrapperClass=='samples sweeps'){if(_checkCookie('contest[underage]')===true){$("div#sweepForm").html('<p class="error" style="display:block;">Sorry. You must be over 18 years to enter our sweepstakes.</p>');}} 5$("#tbc_optin_form").submit(function(){var emailReg=/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;$('div.samplesWrapC.tbc p.status').hide();email=$("#tbc_optin").val();if(!emailReg.test(email)||email==''){$('div.samplesWrapC.tbc p.status').show();$('div.samplesWrapC.tbc p.status').html('Please enter a valid e-mail address.'+xCloseHTML);hideStatus();return false;} 6jsonData={'EMAIL_ADDRESS_':email,'TOTAL_BEAUTY_SHOPS':'Y','OPTIN_SOURCE':'TBSHOPSAMPLE'};$.ajax({type:'GET',url:'/newsletter/',data:jsonData,dataType:'json',success:function(msg){if(msg.status=='fatal'){$('div.samplesWrapC.tbc p.status').show();$('div.samplesWrapC.tbc p.status').html(msg.message+xCloseHTML);hideStatus();}else{$('p.tbc_paragragh.thank_you').show();$('#tbc_optin_form').hide();if(msg.status=='success'){Krux('admEvent','I1pcPDVe',{});if(msg.KAPoints){showKAPoints(msg.KAPoints);}else if(msg.differentEmail!=1){missed='<a id="signinNow" href="/accounts/register"><div class="greenBtnLg">OOPS! YOU MISSED EARNING 30 POINTS - SIGN IN NOW</div></a>';$("#userWrap").prepend(missed);$("#joinNow").hide();}}}},async:false});return false;});});if(filename=='samples_contests/make-your-face-jealous-sweepstakes'||'samples_contests/make-your-face-jealous-sweepstakes/'){$(function(){$(".advertiseForm").submit(function(){email=$(this).find("#email").val();zip=$(this).find("#zip").val();var errorMsg='';var filter=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;if(!filter.test(email)){errorMsg+="Please enter a valid email.<br />";} 7var zipFilter=/^[0-9]{5}([-]{1}[0-9]{4}|)$/;if(!zipFilter.test(zip)){errorMsg+="Please enter a valid zip code.<br />";} 8var listidBR=listidTB=listidOlay=0;if($('#check_tb:checked').attr('checked')===true){listidTB=1;} 9if($('#check_br:checked').attr('checked')===true){listidBR=1;} 10if($('#check_olay:checked').attr('checked')===true){listidOlay=1;} 11if(errorMsg!=''){$("p.olay_error").show();$("p.olay_error").html(errorMsg);return false;} 12type='olay_optin';$.ajax({type:"GET",url:"/newsletter/",data:{"email":email,"zip":zip,"location":type,"beautyriot":listidBR,"totalbeauty":listidTB,"olay":listidOlay},dataType:"json",beforeSend:function(){$("p.form_status").show();$("p.olay_error").hide();$("form.advertiseForm").hide();},success:function(msg){if(msg.status!='error_fatal'){$("div.form_contents").hide();$("div.olay_contest_instructions").hide();$("div.form_results").show();}else{$("p.olay_error").show();$("p.olay_error").html(msg.message);$("form.advertiseForm").show();}},complete:function(){$("p.form_status").hide();}});sendMacro('newsletter');return false;});});} 13$("form#sweepsform").submit(function(){if(_checkCookie('contest[underage]')===true){$("div#sweepForm").html('<p class="error" style="display:block;">Sorry. You must be over 18 years to enter our sweepstakes.</p>');return false;} 14$("p.error").hide();var daysInMonth=new Array(31,28,31,30,31,30,31,31,30,31,30,31);var integerFilter=/^\d+$/;var zipFilter=/^[0-9]{5}([-]{1}[0-9]{4}|)$/;var emailFilter=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;var status="success";if(!zipFilter.test($("#zip").val())){$("p.zip").show();status="fail";} 15if(!emailFilter.test($("#email_sweeps").val())){$("p.email_sweeps").show();status="fail";} 16if(TBwrapperClass=='samples sweeps jf_entryform'){if($("#fullname").val()==""){$("p.fullname").show();status="fail";} 17if($("#street").val()==""){$("p.street").show();status="fail";} 18if($("#city").val()==""){$("p.city").show();status="fail";} 19if($("#state").val()==""){$("p.state").show();status="fail";}}else{if($("#firstname").val()==""){$("p.firstname").show();status="fail";}} 20var month=$("#dob_month").val();var day=$("#dob_day").val();var year=$("#dob_year").val();if(month==''||day==''||year==''){$("p.error.dob").show();status="fail";}else{if(month.charAt(0)=='0'){month=month.charAt(1);} 21month=parseInt(month)-1;if(day.charAt(0)=='0'){day=day.charAt(1);} 22d=new Date(year,month,day);if(isNaN(d.getTime())){$("p.error.dob").show();status="fail";}else{leapYear=year/4;if(integerFilter.test(leapYear)){daysInMonth[1]=29;} 23if(day>daysInMonth[month]){status="fail";$("p.error.dob").show();}}} 24$("div.questionWrap").each(function(index){questionClass=$(this).attr("class");if(questionClass=="questionWrap text required"){if($(this).find("textarea").val()!=""){}else{status="fail";$(this).find("p.error").show();}} 25if(questionClass=="questionWrap radio required"){if($(this).find("input:checked").val()){}else{status="fail";$(this).find("p.error").show();}} 26if(questionClass=="questionWrap select required"){if($(this).find("select").val()!=""){}else{status="fail";$(this).find("p.error").show();}}});if(status=="fail"){return false;} 27return true;});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.