﻿eval(function (p, a, c, k, e, r) { e = function (c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function (e) { return r[e] } ]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p } ('(4($){$.Z.10({11:4(a,b,c,d,e,f){8.u=z;v 8.L(4(){M $.N(8,a,b,c,d,e,f)})},B:4(a){v 8.w("B",a)}});$.N=4(h,j,k,l,m,n,o){$(h).12();$(h).C(O(h,k,l,o,j==z));$(h).w("A",4(b){p(h.u==z)h.u=j;$(\'.6\').D();3 c=0;3 d=\'<r>\';p(j==z||j.E<1)v;P(3 i=0;i<j.E;i++){3 e=c%2==0?\'Q\':\'R\';d+=\'<s F=\'+j[i][m]+\' t=\'+e+\'>\'+j[i][n]+\'</s>\';c++}d+=\'</r>\';$(\'#\'+(8.5)+\' .7 .6\').C(d);$(\'#\'+(8.5)+\' .7 .6\').S();$(\'#\'+(8.5)+\' .7 .6 r s\').w("A",4(a){G(a)})});$(\'#\'+(h.5)+\' .7 .x y\').w("13",4(b){3 c=$(\'#\'+(h.5)+\' .7 .x y\').q();3 d=M 14();$.L(h.u,4(i){p(h.u[i][n].15().T().16(c.T())!=-1){d.17(8)}});j=d;3 e=0;3 f=\'<r>\';P(3 i=0;i<j.E;i++){3 g=e%2==0?\'Q\':\'R\';f+=\'<s F=\'+j[i][m]+\' t=\'+g+\'>\'+j[i][n]+\'</s>\';e++}f+=\'</r>\';$(\'#\'+(h.5)+\' .7 .6\').C(f);$(\'#\'+(h.5)+\' .7 .6\').S();$(\'#\'+(h.5)+\' .7 .6 r s\').w("A",4(a){G(a)})});4 G(e){3 a=e.18||19.1a.1b;$(\'#\'+(h.5)+\' .7 .x y\').q($(a).H());$(\'#\'+(h.5)+\' .7 .x y\').I(\'1c\');3 b=$(a).H();3 c=$(a).U(\'F\');$(h).1d("B",[c,b]);$(\'.6\').1e("A",4(){$(\'.6\').D()});v 1f}}})(1g);4 O(a,b,c,d,e){3 f=c!=""?c:b;3 g=d?\'\':\'1h\';3 h=d?\'1i\':\'1j\';3 i=c==\'\'?\'J\':\'K\';3 j;3 k;3 l;p(e)j=\'\';1k j=\'1l: 1m(/1n/1o.1p)\';3 m=$(a).U(\'5\')+\'1q\';p(d){k=\'V(8, \\\'\'+b+\'\\\')\';l=\'W(8, \\\'\'+b+\'\\\')\'}3 n=\'<9 t="7">\'+\'<9 t="x">\'+\'<9 X=" \'+j+\' 1r-1s 1t; 1u:1v%;"><y t=\\"\'+i+\'\\" 5=\\"\'+m+\'\\" \'+g+\' 1w="H" X="1x:\'+h+\';1y:0; 1z: 1A 1B;" 1C=\\"\'+f+\'\\" 1D=\\"\'+k+\'\\" 1E=\\"\'+l+\'\\" /></9>\'+\'</9>\'+\'<9 t="6">\'+\'</9>\'+\'</9>\';$(\'.6\').D();v n}4 V(a,b){p($(a).q()==b)$(a).q(\'\')}4 W(a,b){p($(a).q()==\'\'){$(a).q(b);$(a).Y(\'K\').I(\'J\')}}4 1F(a,b){$(a).Y(\'J\').I(\'K\');1G($(a).q())}', 62, 105, '|||var|function|id|ac_list|ac_wrapper|this|div||||||||||||||||if|val|ul|li|class|UnfilterdList|return|bind|ac_upper|input|null|click|result|html|hide|length|acid|select_ac_item|text|addClass|ac_input_readonly|ac_input_edit|each|new|Autocompleter|construct_autocomplete|for|odd|even|show|toLowerCase|attr|autocompeltefocus|autocompelteblur|style|removeClass|fn|extend|autocomplete|unbind|keyup|Array|toString|indexOf|push|target|window|event|srcElement|ac_selected|trigger|live|true|jQuery|readonly|auto|pointer|else|background|url|images|ac_arrowdown|gif|_ac|no|repeat|right|width|100|type|cursor|margin|border|none|0px|value|onfocus|onblur|autocompeltechange|filter_ac_input'.split('|'), 0, {}))
eval(function (p, a, c, k, e, r) { e = function (c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function (e) { return r[e] } ]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p } ('3(!o.m){m={}}(5(){5 f(n){7 n<10?\'0\'+n:n}3(6 1k.w.p!==\'5\'){1k.w.p=5(a){7 o.1u()+\'-\'+f(o.1p()+1)+\'-\'+f(o.1D())+\'T\'+f(o.1B())+\':\'+f(o.1A())+\':\'+f(o.1z())+\'Z\'};N.w.p=1x.w.p=1w.w.p=5(a){7 o.1r()}}q e=/[\\1y\\1a\\14-\\12\\1m\\1b\\1n\\1l-\\19\\17-\\W\\V-\\1g\\X\\18-\\15]/g,K=/[\\\\\\"\\1E-\\1F\\1I-\\1R\\1a\\14-\\12\\1m\\1b\\1n\\1l-\\19\\17-\\W\\V-\\1g\\X\\18-\\15]/g,8,C,1d={\'\\b\':\'\\\\b\',\'\\t\':\'\\\\t\',\'\\n\':\'\\\\n\',\'\\f\':\'\\\\f\',\'\\r\':\'\\\\r\',\'"\':\'\\\\"\',\'\\\\\':\'\\\\\\\\\'},l;5 J(b){K.1j=0;7 K.L(b)?\'"\'+b.z(K,5(a){q c=1d[a];7 6 c===\'I\'?c:\'\\\\u\'+(\'Y\'+a.11(0).M(16)).13(-4)})+\'"\':\'"\'+b+\'"\'}5 E(a,b){q i,k,v,h,y=8,9,2=b[a];3(2&&6 2===\'x\'&&6 2.p===\'5\'){2=2.p(a)}3(6 l===\'5\'){2=l.H(b,a,2)}1v(6 2){A\'I\':7 J(2);A\'U\':7 1o(2)?N(2):\'D\';A\'1q\':A\'D\':7 N(2);A\'x\':3(!2){7\'D\'}8+=C;9=[];3(O.w.M.1s(2)===\'[x 1t]\'){h=2.h;B(i=0;i<h;i+=1){9[i]=E(i,2)||\'D\'}v=9.h===0?\'[]\':8?\'[\\n\'+8+9.G(\',\\n\'+8)+\'\\n\'+y+\']\':\'[\'+9.G(\',\')+\']\';8=y;7 v}3(l&&6 l===\'x\'){h=l.h;B(i=0;i<h;i+=1){k=l[i];3(6 k===\'I\'){v=E(k,2);3(v){9.1c(J(k)+(8?\': \':\':\')+v)}}}}S{B(k 1e 2){3(O.1f.H(2,k)){v=E(k,2);3(v){9.1c(J(k)+(8?\': \':\':\')+v)}}}}v=9.h===0?\'{}\':8?\'{\\n\'+8+9.G(\',\\n\'+8)+\'\\n\'+y+\'}\':\'{\'+9.G(\',\')+\'}\';8=y;7 v}}3(6 m.P!==\'5\'){m.P=5(a,b,c){q i;8=\'\';C=\'\';3(6 c===\'U\'){B(i=0;i<c;i+=1){C+=\' \'}}S 3(6 c===\'I\'){C=c}l=b;3(b&&6 b!==\'5\'&&(6 b!==\'x\'||6 b.h!==\'U\')){1h 1i 1C(\'m.P\');}7 E(\'\',{\'\':a})}}3(6 m.R!==\'5\'){m.R=5(c,d){q j;5 Q(a,b){q k,v,2=a[b];3(2&&6 2===\'x\'){B(k 1e 2){3(O.1f.H(2,k)){v=Q(2,k);3(v!==1G){2[k]=v}S{1H 2[k]}}}}7 d.H(a,b,2)}e.1j=0;3(e.L(c)){c=c.z(e,5(a){7\'\\\\u\'+(\'Y\'+a.11(0).M(16)).13(-4)})}3(/^[\\],:{}\\s]*$/.L(c.z(/\\\\(?:["\\\\\\/1J]|u[0-1K-1L-F]{4})/g,\'@\').z(/"[^"\\\\\\n\\r]*"|1M|1N|D|-?\\d+(?:\\.\\d*)?(?:[1O][+\\-]?\\d+)?/g,\']\').z(/(?:^|:|,)(?:\\s*\\[)+/g,\'\'))){j=1P(\'(\'+c+\')\');7 6 d===\'5\'?Q({\'\':j},\'\'):j}1h 1i 1Q(\'m.R\');}}})();', 62, 116, '||value|if||function|typeof|return|gap|partial||||||||length||||rep|JSON||this|toJSON|var||||||prototype|object|mind|replace|case|for|indent|null|str||join|call|string|quote|escapable|test|toString|String|Object|stringify|walk|parse|else||number|u2060|u202f|ufeff|0000|||charCodeAt|u0604|slice|u0600|uffff||u2028|ufff0|u200f|u00ad|u17b4|push|meta|in|hasOwnProperty|u206f|throw|new|lastIndex|Date|u200c|u070f|u17b5|isFinite|getUTCMonth|boolean|valueOf|apply|Array|getUTCFullYear|switch|Boolean|Number|u0000|getUTCSeconds|getUTCMinutes|getUTCHours|Error|getUTCDate|x00|x1f|undefined|delete|x7f|bfnrt|9a|fA|true|false|eE|eval|SyntaxError|x9f'.split('|'), 0, {}))

$("#allocated_benefit_details").live("click", function () {
    $('#td_checkbox_company_car_second').hide();
});

function display_carcalculate() {

    $.getScript("/js/core.js", function () {
        initPopUp();

        GoServer(null, 'GetDemoData', null);
        
        CurrentEmployee = new Object();
        CurrentEmployee.EmployeeBenefits = new Object();
        SelectedAllocatedBenefit = new Object();
        SelectedAllocatedBenefit.Benefit = new Object();
        SelectedAllocatedBenefit.Payments = new Array();
        SelectedAllocatedBenefit.Mileages = new Array();
        SelectedAllocatedBenefit.Make = 'Demo';
        SelectedAllocatedBenefit.Model = 'Demo';
        SelectedAllocatedBenefit.RegistrationNumber = 'Demo';
        SelectedAllocatedBenefit.RegistrationDate = "01/01/2000";
        SelectedAllocatedBenefit.CO2MissingReason = 0;

        SelectedAllocatedBenefit.Benefit.BenefitType = BENEFIT_COMPANYCAR;
        var html = '<table style="vertical-align:top;height:100%;width:100%;">' +
        '<tr><td id="allocated_benefit_details" style="height: 100%; vertical-align:top;"></td></tr>' +
    '</table>';

        ShowModal(html, "Car and car fuel", 700, 400, null);
        display_employeebenefit_details(SelectedAllocatedBenefit);

        var html = '<table><tr>' +
            '<td style="width:75px;padding:0 0 7px 7px;" class="button">' + construct_button("bt1", "Calculate", "btn_allocated_b_calculate", "update_allocated_b(true)", null) + '</td>' +
            '<td style="width:75px;padding:0 0 7px 7px;" class="button">' + construct_button("bt1", "Close", "btn_allocated_b_cancel", "cancel_allocated_b_company_car()", null) + '</td>' +
            '</tr></table>';

        $('#allocated_b_details_buttons').html(html);

        $('#td_checkbox_company_car_second').hide();
        $('#companycar_mileage_side_tab').hide();
    });
}

function process_application_demodata(jdata) {
    VehiclesMakeList = jdata[0];
    VehiclesModelList = jdata[1];
    VehiclesModelDescription = jdata[2];
    Year = jdata[3];
    YearStart = jdata[4];
    YearEnd = jdata[5];
    YearLong = jdata[6];
}
