рдЗрд╕рд╕реЗ рдкрд╣рд▓реЗ, рдореИрдВрдиреЗ рдкрд╣рд▓реЗ рд╣реА рдирдИ Google рд╕реНрдкреНрд░реЗрдбрд╢реАрдЯ рд╕реЗрд╡рд╛рдУрдВ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рддреЗ рд╣реБрдП рд╢рдмреНрджреЛрдВ рдореЗрдВ рдПрдХ рд░рд╛рд╢рд┐ рдЙрддреНрдкрдиреНрди рдХрд░рдиреЗ рдХрд╛ рдПрдХ рдЙрджрд╛рд╣рд░рдг рдкреНрд░рдХрд╛рд╢рд┐рдд рдХрд┐рдпрд╛ рдерд╛
habrahabr.ru/blogs/google/104057рдЕрдм TIN рджрд░реНрдЬ рдХрд░рдиреЗ рдХреА рд╢реБрджреНрдзрддрд╛ рдХреА рдЬрд╛рдБрдЪ рдХрд╛ рдХрд╛рд░реНрдп рднреА рд▓рд╛рдЧреВ рдХрд┐рдпрд╛ рдЧрдпрд╛ рд╣реИред
рддрд╛рд▓рд┐рдХрд╛ рдЦреЛрд▓реЗрдВ
рдмрд╕ рдЕрдкрдиреЗ рдЦрд╛рддреЗ рдореЗрдВ рддрд╛рд▓рд┐рдХрд╛ рдХреЛ рдХреЙрдкреА рдХрд░реЗрдВ рдФрд░ рдЖрд╡рд╢реНрдпрдХ рдлрд╝реАрд▓реНрдб рдореЗрдВ рдореВрд▓реНрдп рдХреЗ рд▓рд┐рдВрдХ рдХреЗ рд╕рд╛рде = is_valid_inn (
A3 ) рджрд░реНрдЬ рдХрд░реЗрдВ
рд╕реНрд░реЛрдд рдХреЛрдбCopy Source | Copy HTML
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }тАЛ
news.eastgeology.com/2010/09/google-spreadsheets_19.html - рдЙрджрд╛рд╣рд░рдг рдПрдореНрдмреЗрдбреЗрдб рддрд╛рд▓рд┐рдХрд╛