

function x_3a(e) {
if (27 == e.keyCode) {
x_b4();
}
}

function x_b4() {
if ('block' == document.getElementById('x_3g').style.display) {
x_3t()
} else if ('block' == document.getElementById('x_3e').style.display) {
if ('block' == document.getElementById('startPhase').style.display ||
'block' == document.getElementById('errorPhase').style.display)
x_43();
}
}

function x_3i(x_b5, x_b6, x_b7, x_b8, x_b9) {
if (x_b5 && document.getElementById(x_b5))
if (document.getElementById(x_b5).style.display == 'block') {
document.getElementById(x_b5).style.display = 'none';
if (x_b6 && document.getElementById(x_b6))
document.getElementById(x_b6).src = x_b7;
if (x_b9)
document.getElementById('executeIt2').src = x_b9 + document.getElementById(x_b5).style.display;
} else {
document.getElementById(x_b5).style.display = 'block';
if (x_b6 && document.getElementById(x_b6))
document.getElementById(x_b6).src = x_b8;
if (x_b9)
document.getElementById('executeIt2').src = x_b9 + document.getElementById(x_b5).style.display;
}
}

function x_ba(x_bb){
var x_bc = document.getElementById('fBox');
var x_bd = document.getElementById('fText');
if (x_bb == 'copy' || x_bb == 'move' || x_bb == 'rename'){
inputBox.style.display = 'block';
textBox.style.display = 'block';
}
else{
inputBox.style.display = 'none';
textBox.style.display = 'none';
}
if (x_bb != 'none')
document.getElementById('fSubmit').style.display = 'block';
else
document.getElementById('fSubmit').style.display = 'none';
}

function x_5e(x_aa, x_be) {
if (x_aa == 'all') {
for (var x_bf = 1; x_bf < document.getElementById('browserForm').elements.length; x_bf++) {
if (document.getElementById('browserForm').elements[x_bf].type == 'checkbox' && document.getElementById('browserForm').elements[x_bf].id != 'mainBox')
if (document.getElementById(x_be).checked == true)
document.getElementById('browserForm').elements[x_bf].checked = true;
else
document.getElementById('browserForm').elements[x_bf].checked = false;
}	
} else {
if (document.getElementById(x_be).checked == false)
document.getElementById('mainBox').checked = false;
}
if (x_bg() == 0) {
x_2u('renameTableActiveDiv', 'renameTableDisabledDiv');
x_2u('actionsTableActiveDiv', 'actionsTableDisabledDiv');
}
if (x_bg() == 1) {
x_2u('renameTableDisabledDiv', 'renameTableActiveDiv');
x_2u('actionsTableDisabledDiv', 'actionsTableActiveDiv');
} 
if (x_bg() >= 2) {
x_2u('renameTableActiveDiv', 'renameTableDisabledDiv');
x_2u('actionsTableDisabledDiv', 'actionsTableActiveDiv');
}
}

function x_bg() {
x_bh=document.getElementById('mainWindow').getElementsByTagName('input');	
var x_bi = 0;
for (var x_bf = 1; x_bf < document.getElementById('browserForm').elements.length; x_bf++) {
if (document.getElementById('browserForm').elements[x_bf].checked == true)
x_bi ++;
if (x_bi >= 2)
return 2;
}
return x_bi;
}

function x_bj()
{
if (self.innerHeight) {var x_bk = window.document.body.scrollHeight;
var x_bl = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) {
return document.documentElement.clientHeight; } else if (document.body) {
return document.body.clientHeight; }
if (x_bk < x_bl)
return x_bl;
else
return x_bk;
}

function x_bm()
{
if (self.innerWidth) {var x_bn = window.document.body.scrollWidth;
var x_bo = self.innerWidth;
} else if (document.documentElement && document.documentElement.clientWidth) {
return document.documentElement.clientWidth; } else if (document.body) {
return document.body.clientWidth; }
if (x_bn > x_bo)
return x_bo;
else
return x_bn;
}
 
function x_2s(x_bp, x_bq) {
window.x_br = Math.max(x_bj(), 550);
window.x_bs = Math.max(x_bm(), 750);
if (typeof executeIt.document != 'undefined' && executeIt.document.getElementById('mainWindow')) {
var x_bp = executeIt.document.getElementById('mainWindow').offsetWidth;
var x_bq = executeIt.document.getElementById('mainWindow').offsetHeight;
}
if (!x_bp)
x_bp = -1;
if (!x_bq)
x_bq = -1;
var x_bt = x_bs - 202;
if (document.getElementById('mainWindow'))
document.getElementById('mainWindow').style.width = x_bt + 'px';
if (document.getElementById('dataLoading'))
document.getElementById('dataLoading').style.width = x_bt + 'px';
if (document.getElementById('browserTable'))
document.getElementById('browserTable').style.width = x_bt + 'px';
if (document.getElementById('dataLoadingTable'))
document.getElementById('dataLoadingTable').style.width = x_bt + 'px';
if (document.getElementById('dataLoadingTable2'))
document.getElementById('dataLoadingTable2').style.width = x_bt + 'px';
if (document.getElementById('mainHeader'))
document.getElementById('mainHeader').style.width = x_bs + 'px';
if (document.getElementById('pathBar'))
document.getElementById('pathBar').style.width = x_bs + 'px';
if (document.getElementById('goToDirTable'))
document.getElementById('goToDirTable').style.width = x_bs + 'px';
if (document.getElementById('x_3d'))
document.getElementById('x_3d').style.width = x_bs + 'px';
var x_bt = x_br - 82;
if (x_bt < x_bq)
x_bt = x_bq;
x_bt = x_br - (document.getElementById('topBar').clientHeight + document.getElementById('pathBar').clientHeight);
x_bt = x_bt - 2;
if (document.getElementById('mainWindow'))
document.getElementById('mainWindow').style.height = x_bt + 'px';
if (document.getElementById('leftBar'))
document.getElementById('leftBar').style.height = x_bt + 'px';
if (document.getElementById('dataLoading'))
document.getElementById('dataLoading').style.height = x_bt + 'px';
if (document.getElementById('column'))
document.getElementById('column').style.height = x_bt + 'px';
}

function x_bu(x_bv, x_bw, x_bx, x_by, x_9j, x_9k, x_bz, x_c0)
{
var x_c1;
var x_bf;
var x_c2;
if (!x_bz)
var x_bz = 400;
if (!x_c0)	
var x_c0 = 450;
if (arguments.length < 3)
x_bx = "";
if (!x_9j)
x_9j = 400;
if (!x_9k)
x_9k = 400;
var x_c3 = x_bv.split(/[\/\?]/);
for (x_bf = 0; x_bf < x_c3.length; x_bf++) {
x_c4 = Math.max(x_c3[x_bf].indexOf(".html"), x_c3[x_bf].indexOf(".php"));
if (x_c4 > 0) {
x_c2 = x_c3[x_bf].substr(0, x_c4);
break;
}
}
x_c5 = null;
if (x_bx != "")
x_bv += "?" + x_bx;
window.x_c6 = null;
var x_c7 = (x_9i() && 6 == navigator.userAgent.match(/MSIE ([0-9]*)/)[1]);
if (x_c7) {
x_c0 += 18; var x_c4 = x_bv;
var x_c8 = "";

try {
x_c5 = window.showModalDialog(x_bv, window.self, "dialogWidth:"+x_bz+"px; dialogHeight:"+x_c0+"px; dialogLeft: " + x_9j + ";dialogTop: " + x_9k + "; status:0; resizable:0; help:0");
} catch (e) {
}
if (x_by)
eval("window." + x_by);
}
else {
x_c0 -= 28;
x_c1 = window.open(x_bv, x_bw, "width="+x_bz+", height="+x_c0+", top=" + x_9k + ", left=" + x_9j + ", menubar=0, toolbar=0, locationbar=0, personalbar=0, scrollbars=0,statusbar=0, resizable=0, modal");
window.x_c6 = x_c1;
if (!x_c9())
x_ca(x_c1);
if (x_c1)
x_c1.focus();
if (x_by)
setTimeout("x_cb(\""+x_by+"\", 0)",100);
}
}
function x_c9()
{
return (navigator.appVersion.indexOf("Safari") != -1 || navigator.appName.indexOf("Safari") != -1 );
}
function x_ca(x_c1)
{
if (!x_c1 || !x_c1.opener)
return;
var x_cc = x_c1.opener;
var x_cd = 0;
while (true && x_cd < 10) {
var x_ce = x_cc.document;
x_cc.onfocus = x_cf;
x_cg = x_ce.getElementsByTagName("body")[0];
if (x_cc == x_cc.parent)
break;
x_cc = x_cc.parent;
x_cd++;
}
}
function x_cf()
{
try {
if (window.x_c6)
window.x_c6.focus();
} catch (e) {
}
return false;
}
function x_ch(x_ce, x_ci)
{
if (x_ci.nodeType == Node.ELEMENT_NODE) {
if (x_ci.hasAttribute("onclick")) {

x_ci.setAttribute("x_cj", x_ci.getAttribute("onclick"));
return;
}
if (x_ci.hasAttribute("onclick") || x_ci.tagName == "A") {
x_ci.onclick = x_ck;
}
}
var x_cl = x_ci.childNodes;
for (var x_bf=0; x_bf<x_cl.length; x_bf++) {
var x_cm = x_cl.item(x_bf);
x_ch(x_ce, x_cm);
}
}
function x_ck()
{
return false;
}


function x_3p(x_cn){
var x_co = null;
if (x_cn == null) x_cn = window;
if (x_cn != null){
if (x_cn.dialogArguments != null) {
x_co = x_cn.dialogArguments;
}
if (x_co == null){
if (x_cn.opener != null){
x_co = x_cn.opener;
}
}
}
if (x_co != null){
if (x_co.closed) x_co = null;
}
return x_co;
}

function x_cp(x_bv) {
x_cq = x_3p(window);
window.name = "KerioSSLVPNActionWindow";
x_cq.document.getElementById('browserForm').action = x_bv;
x_cq.document.getElementById('browserForm').target = window.name;
x_cq.document.getElementById('browserForm').submit();
}

function x_9n(x_an, x_cr, x_cs) {
if (typeof x_cs == 'undefined') {
var x_cs = 0;
}
switch (x_cr) {
case 'x':
if (x_an.offsetLeft) {
x_cs = x_cs + x_an.offsetLeft;
}
break;
default:
if (x_an.offsetTop) {
x_cs = x_cs + x_an.offsetTop;
}
break;
}
if (x_an.offsetParent) {
return x_9n(x_an.offsetParent, x_cr, x_cs);
} else {
return x_cs;
}
}

function x_8b(x_ct, x_cu) {
var x_ab = document.getElementById(x_ct).value;
if (x_9i()) {
x_9j = window.screenLeft + 50;
x_9k = window.screenTop + 50;
} else {
x_9j = window.screenX + 50;
x_9k = window.screenY + 50;
}
if (!x_cu) {
x_ah = window.open('/browserSmallFrameset.php?path=' + x_ab + '&type=modal', "KerioSSLVPNFileBrowserSmall", 
"width=400, height=450,  top=" + x_9j + ", left=" + x_9k + ", location=no, menubar=no, resizable=no, scrollbars=no, status=no, titlebar=no, toolbar=no");
} else {
x_39('browserSmall', x_ab);
}
}

function x_7c (x_cv, x_aa) {
if (x_cv) {
if (typeof x_aa != 'undefined') {
document.getElementById('BSpleaseWait').style.display = 'block';
document.getElementById('bsPath').value = x_cv;
document.bsFrm.submit();
} else {
document.getElementById('BSpleaseWait').style.display = 'block';
window.top.frames[1].document.getElementById('bsPath').value = x_cv;
window.top.frames[1].document.bsFrm.submit();
}
}
}

function x_3u(x_cw, x_cx) {
x_cq = x_3p(window.top);
if (x_cq) {
if (x_cq.document.getElementById(x_cx) && document.getElementById(x_cw)) {
x_cq.document.getElementById(x_cx).value = document.getElementById(x_cw).value;
x_cq.focus();
window.top.close();
}
} else
window.top.close();
}

function x_5i(x_cy) {
x_2u('browserError', 'mainWindow');
if (document.getElementById('mainWindow') && document.getElementById('dataLoading')) {
x_2u('mainWindow', 'dataLoading');
}
x_2t(0, 'on');
window.top.frames.executeIt.document.location = x_cy + '?mode=get';
document.getElementById('refreshPath').value = 'browse' + x_cy;
}

function x_2t(x_aa, x_cz) {
if (x_aa==0) {
if (x_cz == 'on') {
document.getElementById('refreshSpan').style.display = 'none';
document.getElementById('waitSpan').style.display = 'block';
document.getElementById('directory').value = document.getElementById('dirTmp').value;
} else {
document.getElementById('waitSpan').style.display = 'none';
document.getElementById('refreshSpan').style.display = 'block';
}
}
}

function x_9i()
{
var x_d0 = navigator.appVersion;
var x_c4 = x_d0.indexOf("MSIE");
return (x_c4 != -1);
}

function x_6g(x_d1, x_d2, x_d3) {
document.getElementById('sortBy').action = '/browse' + x_d1;
document.getElementById('sortType').value = x_d2;
document.getElementById('sortDescending').value = x_d3;
document.sortBy.submit();
}
function x_60(x_b5, x_aa) {
if (document.getElementById(x_b5)) {
if (x_aa == 1) {
document.getElementById(x_b5).style.backgroundColor = '#00365A';
document.getElementById(x_b5).style.color = 'white';
} else {
document.getElementById(x_b5).style.backgroundColor = '';
document.getElementById(x_b5).style.color = 'black';
}
}
}

function x_1e (x_d4, x_d5) {
if (x_d4 && x_d4.length != 0) {
var x_d6 = x_3p(window.top);
if (!x_d6) {
var x_d7 = document;
var x_d8 = document;
} else {
var x_d7 = x_d6.top.document;
var x_d8 = x_d6.document;
}
if (x_d7.getElementById('mainWindow') && x_d7.getElementById('dataLoading'))
x_2u('mainWindow', 'dataLoading');
if (!x_d6) {		
x_2t(0, 'on');
} else {
x_d6.x_2t(0, 'on');
}
var x_9r = new Date();
var x_d9 = (x_d4.indexOf('php?') != -1 ? '&' : '?');
if (x_d4.indexOf('bookmarks.php') != 0 && x_d4.indexOf('bookmarkWindow') != 0) {
x_d8.getElementById('executeIt').src = x_d4 + x_d9 + 'mode=get' + '&ver=' + x_9r.getTime();
} else {
x_d7.getElementById('executeIt').src = x_d4 + x_d9 + 'ver=' + x_9r.getTime();
}
}
if (!x_d5 )
window.top.close();
}
function x_da(x_db) {
if (confirm(x_db))
window.top.document.location = '/logout.php';
}

function x_dc() {
if (x_9i()) 
x_bz = 398;
else
x_bz = 392;
if (x_9i()) 
x_c0 = 316;
else
x_c0 = 310;
x_bu('/prodInfo.php', "KerioSSLVPNProductInfo", "", "", "", "", x_bz, x_c0);
}

function x_5z() {
if (document.getElementById('dirTmp').value != document.getElementById('directory').value) {
document.goToDirForm.action = '/direct_access.php';
x_2u('browserError', 'mainWindow');
x_2u('mainWindow', 'dataLoading');
x_2t(0, 'on');
return true;
} else {
document.goToDirForm.action = 'session_refresh.html';
return false;
}
}

function x_42() {
if (document.getElementById('chck'))
if (document.getElementById('chck').checked == true)
document.getElementById('executeIt2').src = 'setUserVariable.php?name=webAssist&value=1';
else
document.getElementById('executeIt2').src = 'setUserVariable.php?name=webAssist&value=0';
}