<?php
require_once('../config.inc'); 
require_once('../' . CORE_PATH . 'translate.inc'); 
require_once('../' . CORE_PATH . 'dateTime.inc'); 
require_once('../' . LIB_PATH . 'Database.inc'); 
require_once('../' . LIB_PATH . 'ApFind.inc'); 
require_once('../' . NONAUTH_LIB_PATH . 'Language.inc'); 
function x_um($x_un = 'en') { 
$x_5c = Array(); 
for ($x_7p = 1; $x_7p <= 12; $x_7p++) { 
$x_5c[] = '<kerio:text id="month_' . $x_7p . '" />'; 
} 
return $x_5c; 
} 
function x_uo($x_un = 'en') { 
$x_5c = Array(); 
for ($x_7p = 0; $x_7p <= 6; $x_7p++) { 
$x_5c[] = '<kerio:text id="day-' . $x_7p . '-short" />'; 
} 
return $x_5c; 
} 
function x_up($x_uq = '') { 
if (!empty($x_uq)) { 
return $x_uq; 
} 
} 
function x_ur() { 
$x_us = Array( x_4a('cancel'), 
x_4a('ok'), 
x_4a('today'), 
x_4a('date-current-week-capitals'), 
x_4a('date-current-month-capitals')); 
return $x_us; 
} 
$x_33 = new x_4n(); 
header("X-Kerio-Filter: translate-webiface=" . $x_33->x_8f()); 
header("Content-type: text/html; charset=UTF-8"); 
$x_ut = Array(); 
$x_uu = x_um($x_un); 
if (is_array($x_uu) && !empty($x_uu)) { 
$x_ut[] = '\'x_su\':[\'' . implode('\', \'', $x_uu) . '\']'; 
} 
$x_uv = x_ur(); 
if (!empty($x_uv)) { 
$x_ut[] = '\'x_rn\':[\'' . implode('\', \'', $x_uv) . '\']'; 
} 
$x_uw = x_uo($x_un); 
if (is_array($x_uw) && !empty($x_uw)) { 
$x_ut[] = '\'x_tv\':[\'' . implode('\', \'', $x_uw) . '\']'; 
} 
if (!empty($x_ut)) { 
$x_ux = implode(',', $x_ut) . ','; 
} 
$x_uy = $x_33->x_r4(); 
?>
	 	
function x_u8(x_86) {
return <?php echo $x_uy; ?>;
}

function x_uz(x_tx, x_ta, x_co, x_cp) {
if (x_db && x_db[x_tx] && x_db[x_tx][x_ta]) {
for (i in x_db[x_tx][x_ta]) {
if (x_co == x_db[x_tx][x_ta][i]['start'] && x_cp == x_db[x_tx][x_ta][i]['end']) {
return 'W';
}
}
}
if (x_dc && x_dc[x_tx]) {
for (i in x_dc[x_tx]) {
if (x_co == x_dc[x_tx][i]['start'] && x_cp == x_dc[x_tx][i]['end']) {
return 'M';
}
}
}
}

function x_v0(x_co, x_cp) {
var x_v1 = new Date(x_co * 86400000);
var x_v2 = new Date(x_cp * 86400000);
var x_v3 = x_ry(true);
var x_t7 = x_v4();
var x_v5 = x_cp - x_co;
var x_1f = '';
if (x_v5 > 0) {
x_1f = x_uz(x_v3.getFullYear(), x_v3.getMonth() + 1, x_co, x_cp);
} else {
x_1f = 'D';
}
if ('D' == x_1f) {
document.getElementById('x_el').innerHTML = x_u8(x_v1);
} else {
document.getElementById('x_el').innerHTML = x_u8(x_v1) + ' - ' + x_u8(x_v2);
}
var x_v6 = 'normal';
var x_v7 = 'bold';
var x_rn = {'buttonToday' : x_v6, 'buttonWeek' : x_v6, 'buttonMonth' : x_v6};
if ('D' == x_1f && x_co == x_t7 && 0 == x_v5) {
x_rn['buttonToday'] = x_v7;
} else if (x_t7 >= x_co && x_t7 <= x_cp && 'W' == x_1f) {
x_rn['buttonWeek'] = x_v7;
} else if (x_t7 >= x_co && x_t7 <= x_cp && 'M' == x_1f) {
x_rn['buttonMonth'] = x_v7;
}
for (var i in x_rn) {
document.getElementById(i).style.fontWeight = x_rn[i];
}
} 
var x_st = { <?php echo $x_ux; ?>
'x_tj':['<?php echo x_4a('date-previous-month'); ?>', '<?php echo x_4a('date-next-month'); ?>', '<?php echo x_4a('date-previous-year'); ?>', '<?php echo x_4a('date-next-year'); ?>'],
'x_ti':['../nonauth/gfx/begin.gif', '../nonauth/gfx/previous.gif', '../nonauth/gfx/next.gif', '../nonauth/gfx/end.gif'],
'x_td': ['<?php echo x_4a('no_week_period'); ?>', '<?php echo x_4a('no_month_period'); ?>']};
var x_db = {};
var x_dc = {};
var x_v8 = '<?php echo x_4a('roundWeeks'); ?>';
var x_v9 = '<?php echo x_4a('roundMonths'); ?>';
var x_va = '<?php echo x_4a('invalidFormatStart'); ?>';
var x_vb = '<?php echo x_4a('invalidFormatEnd'); ?>';
var x_vc = '<?php echo x_4a('invalidDateStart'); ?>';
var x_vd = '<?php echo x_4a('invalidDateEnd'); ?>';
var x_ve = '<?php echo x_4a('noStart'); ?>';
var x_vf = '<?php echo x_4a('noEnd'); ?>';
var x_vg = '<?php echo x_4a('periodLong'); ?>';
var x_vh = '<?php echo x_4a('endBiggerThanStart'); ?>';
var x_vi = '<?php echo x_4a('day'); ?>';
var x_vj = '<?php echo x_4a('week'); ?>';
var x_vk = '<?php echo x_4a('month'); ?>';
var x_vl = '<?php echo x_4a('custom'); ?>';
<?php  
$x_6x = new x_6y(); 
echo ($x_6x->x_cy('W', $x_33)); 
echo ($x_6x->x_cy('M', $x_33)); 
echo 'var x_8a = ' . $x_33->x_r5() . ';'; 
$x_vm = ($x_4['firstDayOfWeek'] < 6 ? $x_4['firstDayOfWeek'] + 1 : 0); 
echo 'x_u7 = ' . $x_vm . ';'; 
echo 'var x_vn = ' . $x_5 . ';' 
?>