
 
function x_1t(x_15, x_16){
for (i = 1; i <= x_16; i++) {
setTimeout("x_vo('" + x_15 + "'," +  i + ")",10);
}
}
 
function x_vo(x_15, x_vp) {
var x_vq = 'processTemplate.php';
var x_vr = 'page=' + x_15 
+ '&docType=xml&moduleId=' + x_vp 
+ '&userId=' + x_m 
+ '&protoId=' + x_o 
+ '&periodStart=' + x_k 
+ '&periodEnd=' + x_l
+ ('error' == x_15 ? '&errorType=' + x_p : '')
+ '&x_u=' + x_u;
x_vs = {
method: 'get',
parameters: x_vr,
onComplete: x_vt
};
x_vu[x_16 - x_vp] = new Ajax.Request(x_vq, x_vs);
}
function x_vv(x_vw) {
switch (x_vw.readyState) {
case 1:case 2:case 3:return true;
break;
default:
return false;
break;
}
}

function showFailureMessage() {
x_vx(false);
window.clearTimeout(); 
var x_vy = window.top;
x_vy.x_vz('x_2o', 'x_2m');
}

Ajax.Responders.register(
{
onCreate: function(request) {
request['x_w0'] = window.setTimeout(
function() {
if (x_vv(request.transport)) {
request.transport.abort();
}
showFailureMessage();
},
300000 );
},
onComplete: function(request) {
window.clearTimeout(request['x_w0']);
}
}
);

function x_vx(x_w1) {
for (x_7p in x_vu) {
try {
x_vu[x_7p].transport.abort();
} catch (e) {}
}
if (x_w1) {
window.location = 'nonauth/empty.html';
}
}
 
function x_vt(x_w2) {
var x_w3 = x_w2.getResponseHeader('elemId');
var x_w4 = 'elem' + x_w3;
x_w5[x_w3] = x_w2.responseText;
x_w6(x_w3); if (1 == Ajax.activeRequestCount) {
x_w7();
}
}
 
function x_w6(x_w3) {
var x_w4 = 'stepImg_' + x_w3; window.top.document.getElementById(x_w4).src = 'nonauth/gfx/loaded.gif';
}
 
function x_w7() {
if (0 == x_1g) {

window.top.document.getElementById('x_ea').innerHTML = document.getElementById('x_ea').innerHTML;
for (var x_7p in x_w5) {
var x_w4 = 'elem' + x_7p;
if (window.top.document.getElementById(x_w4)) {
window.top.document.getElementById(x_w4).innerHTML = x_w5[x_7p];
}
}
x_w5 = [];
window.top.document.getElementById('x_e9').className = 'dashboard ' + x_17;
if ('activity' == x_15) {
try {
eval (window.top.document.getElementById('x_3f').innerHTML);
} catch (e) {}
}
if (window.top.document.getElementById('x_ei')) {
window.top.document.getElementById('x_ei').innerHTML = x_1j;
}
if (1 == x_1a && 
typeof window.top.document.getElementById("x_1a") !== 'undefined' && 
document.getElementById("x_1a")) {
if ('stats' == x_j) {
var x_w8 = window.top.document.getElementById('x_em');
var x_w9 = window.top.document.getElementById('x_er');
} else {
var x_w8 = window.top.document.getElementById('x_er');
var x_w9 = window.top.document.getElementById('x_em');
}
x_w8.innerHTML = document.getElementById("x_1r").innerHTML;
x_w9.innerHTML = '';
}
if (window.top.document.getElementById('db_caption') && window.top.document.getElementById('db_userInfo')) {
var x_wa = window.top.document.getElementById('db_caption').style.display;
var x_wb = window.top.document.getElementById('db_userInfo').style.display;
if ('L5' == x_17 && 'none' == x_wb) {
window.top.x_vz('db_userInfo', 'db_caption');
} else if (x_17 != 'L5' && 'none' == x_wa) {
window.top.x_vz('db_caption', 'db_userInfo');
}
}
if ('L6' == x_17) {
window.top.document.getElementById('db_header').style.display = 'none';
} else {
window.top.document.getElementById('db_header').style.display = 'block';
}
window.top.x_v0(x_k, x_l);
x_wc();
x_wd();
window.top.document.getElementById('x_2h').value = x_1b;
window.top.document.getElementById('x_2i').value = x_1d;
window.top.x_we();
window.top.x_wf(x_1i);
x_wg('lastDisplayed', x_1h);
window.top.x_wh(x_1f, x_k, x_l);
if ('stats' == x_j) {
window.top.x_vz('x_ge', 'x_gf');
window.top.x_vz('x_gl', 'x_gi');
} else {
window.top.x_vz('x_gf', 'x_ge');
window.top.x_vz('x_gi', 'x_gl');
}
if (x_n != 0 && 'L4' == x_17) {
var x_wi = 'scrElem' + x_n;
var x_wj = "window.top.x_hb(\'" + x_wi + "\');";
window.top.document.getElementById('x_n').value = '';
setTimeout(x_wj, 300);
} else {
window.top.x_fg();
window.top.x_wk();
}
if (x_15 != 'accStats' && x_15 != 'prefs') {
window.top.document.title = 'Kerio StaR' + ' - Kerio WinRoute Firewall';
} else {
window.top.document.title = 'Web Interface' + ' - Kerio WinRoute Firewall';
}
setTimeout("x_1q();", 250);
}
}

function x_wg() {
var x_vq = 'set.php';
var x_vr = 'target=x_3w' +
'&x_3y=lastDisplayed' +
'&x_3z=' + x_1h +
'&x_u=' + x_u;
x_vs = {
method: 'post',
parameters: x_vr
};
var x_wl = new Ajax.Request(x_vq, x_vs);
}
 
function x_wc() {
var x_wm = ['overall', 'individual', 'activity', 'traffic', 'sites', 'categories', 'prefs', 'accStats', 'dialup'];
var x_wn = window.top.document;
for (var x_7p = 0; x_7p < x_wm.length; x_7p++) {
var x_ui = 'tab_' + x_wm[x_7p];
if (x_wn.getElementById(x_ui)) {
var x_wo = x_wn.getElementById(x_ui);
if (x_15 == x_wm[x_7p]) {
x_wo.className = 'active';					
} else {
x_wo.className = 'common';
}
}
}
}

function x_1q() {
if (window.top.document.getElementById('x_2l').style.display == 'block') {
window.top.x_2k(0, "x_2l");
x_wd();
} else {
window.top.x_2k(1, "x_2l");
}
} 

function x_wd() {
var x_wp = '<img src="' + x_19 + '" width="32" height="32">' + x_18;
if (window.top.document.getElementById('x_gg')) {
window.top.document.getElementById('x_gg').src = x_19;
} 
if (window.top.document.getElementById('x_gh')) {
window.top.document.getElementById('x_gh').innerHTML = x_18;
} 
}
var x_w5 = [];
var x_vu = new Array();
