| 33 | | try { |
| 34 | | $('securitykeyboard').checked = false; |
| 35 | | if ($('fldUserID')) { |
| 36 | | // page 1 |
| 37 | | w.addEventListener('load', function() { |
| 38 | | $('fldUserID').value = id; |
| 39 | | $('fldUserNumId').focus(); |
| 40 | | }, false); |
| 41 | | } |
| 42 | | else { |
| 43 | | // page 2 |
| 44 | | var ths = document.getElementsByTagName('th'); |
| 45 | | var p = []; |
| 46 | | for (var i = 0, size = ths.length; i < size; i++) { |
| 47 | | if (ths[i].width == '15%') { |
| 48 | | p.push({ |
| 49 | | x: ths[i].innerHTML[0], |
| 50 | | y: ths[i].innerHTML[1] |
| 51 | | }); |
| 52 | | } |
| 53 | | } |
| 54 | | for (var i = 0; i < 3; i++) { |
| 55 | | $('fldGridChg' + (i + 1)).value = table[p[i].x][p[i].y]; |
| 56 | | } |
| 57 | | w.CheckLogonInputs(); |
| 58 | | } |
| 59 | | } |
| 60 | | catch(e) {} |
| | 36 | if (document.title != '\u30ed\u30b0\u30a4\u30f3\u30b9\u30af\u30ea\u30fc\u30f3' || |
| | 37 | !/^direct[^.]+\.shinseibank\.co\.jp$/.test(location.host)) |
| | 38 | return; |
| 62 | | function $(id) { |
| 63 | | return document.getElementById(id); |
| 64 | | } |
| | 40 | try { |
| | 41 | $('securitykeyboard').checked = false; |
| | 42 | var input_fldUserID = $xe("//input[@name='fldUserID'][@type='text']"); |
| | 43 | if (input_fldUserID) { |
| | 44 | // page 1 |
| | 45 | w.addEventListener('load', function() { |
| | 46 | input_fldUserID.value = id; |
| | 47 | $('fldUserNumId').value = pin; |
| | 48 | var input_fldUserPass = $xe("//input[@name='fldUserPass'][@type='password']"); |
| | 49 | if (password != '') { |
| | 50 | input_fldUserPass.value = password; |
| | 51 | $('loginbutton').click(); |
| | 52 | } else { |
| | 53 | input_fldUserPass.addEventListener('keypress', function(e) { |
| | 54 | if (e.keyCode == 13) { // Enter key |
| | 55 | $('loginbutton').click(); |
| | 56 | } |
| | 57 | }, false); |
| | 58 | setTimeout(function(){input_fldUserPass.focus()}, 100); |
| | 59 | } |
| | 60 | }, false); |
| | 61 | } |
| | 62 | else { |
| | 63 | // page 2 |
| | 64 | var p = [ |
| | 65 | w.fldGridChallange1.split(''), |
| | 66 | w.fldGridChallange2.split(''), |
| | 67 | w.fldGridChallange3.split('') |
| | 68 | ]; |
| | 69 | for (var i = 0; i < 3; i++) { |
| | 70 | $('fldGridChg' + (i + 1)).value = table[p[i][0]][p[i][1]]; |
| | 71 | } |
| | 72 | $('loginbutton').click(); |
| | 73 | } |
| | 74 | } catch (e) { |
| | 75 | console.dir(e); |
| | 76 | } |
| | 77 | |
| | 78 | function $xe(xpath) { |
| | 79 | return document.evaluate(xpath, document, null, |
| | 80 | XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue; |
| | 81 | } |
| | 82 | |
| | 83 | function $(id) { |
| | 84 | return document.getElementById(id); |
| | 85 | } |