function show(id)
{
    el = document.getElementById(id);
    if (el.style.display == 'none')
    {
        el.style.display = '';
    } else {
        el.style.display = 'none';
    }
}
function openWindow(width,height,url,args)
{
    Sirka = screen.availHeight;
    Delka = screen.availWidth;
    sy = ((Sirka / 2) - (width / 2));
    sx = ((Delka / 2) - (height / 2));

    if (args == '')
    {
        window.open(url,'',"menubar=NO,titlebar=YES,toolbar=NO,fullscreen=NO,scrollbars=NO,height=" + width + ",width=" + height + ",left=" + sx + ",top=" + sy);
    }
    else
    {
        window.open(url + '?' + args,'',"menubar=NO,titlebar=YES,toolbar=NO,fullscreen=NO,scrollbars=NO,height=" + width + ",width=" + height + ",left=" + sx + ",top=" + sy);
    }
}
function DateDiff(date1, date2) 
{
    return date1.getTime() - date2.getTime();
}

