1function isValidEmail (email, strict) 2{ 3 if ( !strict ) email = email.replace(/^\s+|\s+$/g, ''); 4 return (/^([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]{2,4}$/i).test(email); 5} 6 function checkField(el,num,txt,checkmail) 7 { 8 var checked = true; 9 var inp = $('.sendForm '+el+':eq('+num+')'); 10 if (checkmail) 11 { 12 if (!isValidEmail(inp.val()) || inp.val()==txt) condition = true; else condition = false; 13 } else 14 { 15 if (inp.val()=='' || inp.val()==txt) condition = true; else condition = false; 16 } 17 if (condition) 18 { 19 inp.val(txt); 20 inp.css("color","#c90000"); 21 inp.bind("focus",function() { 22 if ($(this).val()==txt) 23 { 24 $(this).val(''); 25 $(this).css("color","#222222"); 26 $(this).unbind(); 27 } 28 }); 29 checked = false; 30 } 31 return checked; 32 } 33 34$(document).ready(function() { 35 $('#buttonSend').bind("mousedown",function() {$(this).css("top","1px");}); 36 $('#buttonSend').bind("mouseup",function() {$(this).css("top","0");}); 37 $('#buttonSend').bind("click",function () { 38 var sm = true; 39 sm = checkField('input',0,'УкажиÑе ваÑе имÑ',false); 40 sm = checkField('input',1,'УкажиÑе коÑÑекÑнÑй e-mail',true); 41 sm = checkField('textarea',0,'ÐапиÑиÑе ÑообÑение',false); 42 if (sm) {return true;} else {return false;} 43 }); 44});
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.