
var x_r;
kerio.waw = {
ui: {},
status: {
x_14: {
x_zi: false
}
},
shared: {
x_17: {}
},
init: {
x_zj: false,
x_zk: false,
x_zl: {
x_zm: false,
x_zn: false,
x_zo: false,
x_zp: false
}
}
};

kerio.waw.x_m3 = function() {

var x_j4 = {
x_28: {
'object': 'ProductInfoManager',
'method': 'get',
'params': null
},
x_zq: {
x_zr: '',
x_zs: ''
},
x_ma: true,

x_2e: function(x_6v, x_6w, x_28) {
if ((new Date()).getTime() > kerio.waw.x_zt) { kerio.waw.shared.x_3e.x_3f(
undefined, {
x_1n: kerio.lib.x_x('Kerio WinRoute Firewall is not responding. It either failed restarting or responds on different IP or port.', 'common'),
x_m2: 0
}
); return;
}
kerio.waw.x_m3.defer(5000, this);
}
};
if (undefined === kerio.waw.x_zt) {
kerio.waw.x_zt =  (new Date()).getTime() + (2 * 60 * 1000) ; }
kerio.lib.x_6t.x_6u(x_j4);
};

kerio.waw.x_zu = function(x_dg) {
var
x_zv,
x_s8,
x_zw,
x_zx,
x_41, x_42,
x_zy;
if (x_dg && true === x_dg.returnValue) {
return; }
else if (x_dg && false === x_dg.returnValue) {
if ('object' === typeof x_dg.errorMessage) {
x_fi.x_j2(x_dg.errorMessage);
}
else if ('object' === typeof x_dg.error) {
x_fi.x_j2(x_dg.error);
}
else if ('object' === typeof x_dg.result) {
x_zx = x_dg.result;
for (x_41 = 0, x_42 = x_zx.length; x_41 < x_42; x_41++) {
if (1 < x_41 && 3 < x_42) { x_zy = x_42 - x_41;
x_fi.x_j2(kerio.lib.x_x('Other %1 error(s) have occured.', 'common', {x_49:[x_zy]}));
return;
}
else { x_fi.x_j2(x_zx[x_41].errorMessage);
}
}
}
}
else if (x_dg.result) {
x_s8 = x_dg.result;
for (x_41 = 0, x_42 = x_s8.length; x_41 < x_42; x_41++) {
x_zw = x_s8[x_41];
kerio.waw.x_zu(x_zw);
}
}
else if (x_dg.resultList) {
x_zv = x_dg.resultList;
for (x_41 = 0, x_42 = x_zv.length; x_41 < x_42; x_41++) {
x_s8 = x_zv[x_41];
if (x_s8 && 'object' === typeof x_s8.message && false === x_s8.success) {
x_fi.x_j2(x_s8.message);
}
}
}
else {
kerio.lib.x_48(kerio.lib.x_x('Error', 'common'), kerio.lib.x_x('Requested operation failed', 'serverMessage'));
}
}; 
kerio.lib.x_zz = function() {
var x_100 = kerio.waw.init;
x_100.x_101(true);
kerio.lib.x_102({
x_103: 'token' });
kerio.lib.x_6t.x_104({
x_105: '/admin/login.php'
});
kerio.lib.x_6t.x_106({
x_6a: '/admin/stub/dataMiner.php',
x_6p: 'post'
});
kerio.lib.x_6b.x_107 = true; x_100.x_108();
}; 
kerio.waw.init.x_108 = function() {
kerio.waw.init.x_zm();
kerio.waw.init.x_zn();
}; 
kerio.waw.init.x_109 = function() {
var
x_100 = kerio.waw.init,
x_p = kerio.waw.status.x_p;
x_100.x_10a();
x_100.x_10b();
x_100.x_10c({
x_10d: [x_p.x_10e],
x_10f:          x_p.x_10g,
x_10h:                 x_p.x_q,
x_3x:               x_p.x_3x
});
kerio.waw.status.x_14.x_10i();
x_100.x_101(false);
}; 
kerio.waw.init.x_10j = function(x_6u) {
var
x_10k,
x_100 = kerio.waw.init,
x_zl = x_100.x_zl;
x_zl[x_6u] = true;
if (!x_100.x_zj && x_zl.x_zm) {
x_100.x_zj = true;
x_100.x_zo();
}
if (!x_100.x_zk && x_zl.x_zo) {
x_100.x_zk = true;
x_100.x_10l();
x_100.x_zp();
return;
}
for (x_10k in x_zl) {
if (false === x_zl[x_10k]) {
return;
}
}
x_100.x_109();
}; 
kerio.waw.init.x_101 = function(x_24) {
var x_10m;
if (x_24) {
x_10m = document.createElement('div');
x_10m.id = 'x_10n';
x_10m.style.textAlign = 'center';
x_10m.style.paddingTop = (document.documentElement.clientHeight / 2 - 16) + 'px'; x_10m.innerHTML = '<img src="img/loading.gif" />';
document.body.appendChild(x_10m);
}
else {	document.getElementById('x_10n').style.display = 'none';
}
}; 
kerio.waw.init.x_10b = function() {
kerio.lib.x_10o.x_10p({
x_6a: '/admin/stub/dataMiner.php',
x_28: {'object': 'ServerManager', 'method': 'getRestrictionList'}
});
}; 
kerio.waw.init.x_zo = function() {
var x_j4;
x_j4 = {
x_28: {'object': 'UserManager', 'method': 'getMySettings'}
};

x_j4.x_2e = function(x_6v) {
var
x_10q,
x_10r,
x_f3,
x_10s,
x_10t,
x_dg = x_6v.x_ac;
if (!x_dg || !x_dg.returnValue) {
return;
}
x_10q = x_dg.settings;
x_10s = kerio.waw.status;
kerio.lib.x_10u(x_r.x_bs.x_10v.slice(1)); x_10s.x_p = x_10s.x_p || {};
x_10t = x_10s.x_p;
x_10t.x_q = x_10q.roles[0];
x_10t.x_10g = x_10q.language;
x_10t.x_10e = x_10q.detectedLanguage;
x_10t.x_10w = x_10q.calculatedLanguage;
x_10r = x_10q.user;
x_f3 = ('' === x_10r.domainName) ? 'localhost' : x_10r.domainName;
x_10t.x_3x = x_10r.name + '@' + x_f3;
kerio.waw.init.x_10j('x_zo');
};
kerio.lib.x_6t.x_6u(x_j4);
}; 
kerio.waw.init.x_zm = function() {
var x_j4;
x_j4 = {
x_28: {'object': 'ServerManager', 'method': 'getNamedConstantList'}
};

x_j4.x_2e = function(x_6v) {
var x_dg = x_6v.x_ac;
if (!x_dg || !x_dg.returnValue) {
return;
}
x_r = x_dg.constants;
kerio.waw.shared.x_3r = x_r;
kerio.lib.x_102(x_r.x_3s);
kerio.adm.x_10x(x_r.kerio_web_SharedConstants);
kerio.waw.init.x_10j('x_zm');
};kerio.lib.x_6t.x_6u(x_j4);
}; 
kerio.waw.init.x_zn = function() {
var x_j4;
x_j4 = {
x_28: {'object': 'Session', 'method': 'reset'}
};

x_j4.x_2e = function(x_6v) {
var x_dg = x_6v.x_ac;
if (!x_dg || !x_dg.returnValue) {
return;
}
kerio.waw.init.x_10j('x_zn');
};kerio.lib.x_6t.x_6u(x_j4);
}; 
kerio.waw.init.x_10l = function() {
var
x_10g,
x_10t = kerio.waw.status.x_p;
x_10g = x_10t.x_10g;
if (!x_10g || x_10g.length !== 2) {
x_10t.x_10g = x_10t.x_10w;
}
}; 
kerio.waw.init.x_zp = function() {
var
x_10g,
x_j4,
x_100 = kerio.waw.init;
x_100.x_10l();
x_10g = kerio.waw.status.x_p.x_10g;
if ('en' === x_10g) {
kerio.waw.x_10y = {}; x_100.x_10j('x_zp');
return;
}
x_j4 = {
x_6a: 'translations/' + x_10g + '.js?v=' + x_r.x_3s.x_10z,
x_6p: 'get'
};

x_j4.x_2e = function(x_6v) {
var x_110;      x_110  = 'ev';
x_110 += 'al';
try {
window[x_110](x_6v.x_111.responseText);	}
catch (x_112) {
kerio.lib.x_nq('Internal error: Error during translation file loading', 'init.js');
}
kerio.lib.x_113();	kerio.waw.init.x_10j('x_zp');	};
kerio.lib.x_6t.x_6u(x_j4);
}; 