function setPointer(b, a, c, f, e, d) {
    var g = null;
    if ((e == '' && d == '') || typeof(b.style) == 'undefined') {
        return false
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        g = b.getElementsByTagName('td')
    } else if (typeof(b.cells) != 'undefined') {
        g = b.cells
    } else {
        return false
    }
    var l = g.length;
    var k = null;
    var j = null;
    var h = null;
    if (typeof(window.opera) == 'undefined' && typeof(g[0].getAttribute) != 'undefined') {
        j = g[0].getAttribute('bgcolor');
        k = true
    } else {
        j = g[0].style.backgroundColor;
        k = false
    }
    if (j == '' || j.toLowerCase() == f.toLowerCase()) {
        if (c == 'over' && e != '') {
            h = e
        } else if (c == 'click' && d != '') {
            h = d;
            marked_row[a] = true
        }
    } else if (j.toLowerCase() == e.toLowerCase() && (typeof(marked_row[a]) == 'undefined' || !marked_row[a])) {
        if (c == 'out') {
            h = f
        } else if (c == 'click' && d != '') {
            h = d;
            marked_row[a] = true
        }
    } else if (j.toLowerCase() == d.toLowerCase()) {
        if (c == 'click') {
            h = (e != '') ? e : f;
            marked_row[a] = (typeof(marked_row[a]) == 'undefined' || !marked_row[a]) ? true : null
        }
    }
    if (h) {
        var i = null;
        if (k) {
            for (i = 0; i < l; i++) {
                g[i].setAttribute('bgcolor', h, 0)
            }
        } else {
            for (i = 0; i < l; i++) {
                g[i].style.backgroundColor = h
            }
        }
    }
    return true
}
function imgFit(b, a) {
    if (typeof b.naturalWidth == 'undefined') {
        b.naturalHeight = b.height;
        b.naturalWidth = b.width
    }
    if (b.width > a) {
        b.height = Math.round(((a) / b.width) * b.height);
        b.width = a;
        b.title = 'Íàæìèòå íà êàðòèíêó äëÿ óâåëè÷åíèÿ';
        b.style.cursor = 'move'
    } else if (b.width == a && b.width < b.naturalWidth) {
        b.height = b.naturalHeight;
        b.width = b.naturalWidth;
        b.title = 'Íàæìèòå íà êàðòèíêó äëÿ ïîìåùåíèÿ â ðàçìåð îêíà'
    }
}
var tid = 0,
    x = 0,
    y = 0;
var obj;
document.onmousemove = track;

function track(b) {
    x = (document.all) ? window.event.x + document.body.scrollLeft : b.pageX;
    y = (document.all) ? window.event.y + document.body.scrollTop : b.pageY
}
function show(b) {
    obj = document.getElementById(b);
    obj.style.left = x - 120;
    obj.style.top = y + 25;
    obj.style.display = "block";
    tid = window.setTimeout("show(" + b + ")", 10)
}
function hide(b) {
    obj = document.getElementById(b);
    window.clearTimeout(tid);
    obj.style.display = "none"
}
function changeText(b, a) {
    document.getElementById(a).value = b
}
var azWin = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'
var azKoi = 'þàáöäåôãõèéêëìíîïÿðñòóæâüûçøýù÷úÞÀÁÖÄÅÔÃÕÈÉÊËÌÍÎÏßÐÑÒÓÆÂÜÛÇØÝÙ×Ú'
var AZ = azWin
var azURL = '0123456789ABCDEF'
var b64s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
var b64a = b64s.split('') function enBASE64(b) {
    var a = Array(),
        c f(c = 0; c < b.length; c++) {
        var e = b.charCodeAt(c) if (e > 127) {
            e = AZ.indexOf(b.charAt(c)) + 163;
            if (e < 163) continue
        }
        a.push(e)
    };
    var s = Array(),
        lPos = a.length - a.length % 3 f(c = 0; c < lPos; c += 3) {
        var d = (a[c] << 16) + (a[c + 1] << 8) + a[c + 2] s.push(b64a[(d >> 18) & 0x3f] + b64a[(d >> 12) & 0x3f] + b64a[(d >> 6) & 0x3f] + b64a[d & 0x3f])
    }
    switch (a.length - lPos) {
    case 1:
        var d = a[lPos] << 4;
        s.push(b64a[(d >> 6) & 0x3f] + b64a[d & 0x3f] + '==');
        break
    case 2:
        var d = (a[lPos] << 10) + (a[lPos + 1] << 2);
        s.push(b64a[(d >> 12) & 0x3f] + b64a[(d >> 6) & 0x3f] + b64a[d & 0x3f] + '=');
        break
    }
    return s.join('')
}
function deBASE64(b) {
    while (b.substr(-1, 1) == '=') b = b.substr(0, b.length - 1);
    var a = b.split(''),
        c
    var f = Array(),
        e
    var d = a.length - a.length % 4
    for (c = 0; c < d; c += 4) {
        e = (b64s.indexOf(a[c]) << 18) + (b64s.indexOf(a[c + 1]) << 12) + (b64s.indexOf(a[c + 2]) << 6) + b64s.indexOf(a[c + 3]) f.push(((e >> 16) & 0xff), ((e >> 8) & 0xff), (e & 0xff))
    }
    if ((a.length - d) == 2) {
        e = (b64s.indexOf(a[d]) << 18) + (b64s.indexOf(a[d + 1]) << 12);
        f.push(((e >> 16) & 0xff))
    }
    if ((a.length - d) == 3) {
        e = (b64s.indexOf(a[d]) << 18) + (b64s.indexOf(a[d + 1]) << 12) + (b64s.indexOf(a[d + 2]) << 6);
        f.push(((e >> 16) & 0xff), ((e >> 8) & 0xff))
    }
    for (c = f.length - 1; c >= 0; c--) {
        if (f[c] >= 168) f[c] = AZ.charAt(f[c] - 163)
        else f[c] = String.fromCharCode(f[c])
    };
    return f.join('')
}
function placeholderSetup(b) {
    var a = ge(b);
    if (!a) return;
    if (a.type != 'text') return;
    if (a.type != 'text') return;
    var c = a.getAttribute("placeholder");
    if (c && c != "") {
        a.value = c;
        a.style.color = '#777';
        a.is_focused = 0;
        a.onfocus = placeholderFocus;
        a.onblur = placeholderBlur
    }
}
function placeholderFocus() {
    if (!this.is_focused) {
        this.is_focused = 1;
        this.value = '';
        this.style.color = '#000';
        var b = this.getAttribute("radioselect");
        if (b && b != "") {
            var a = document.getElementById(b);
            if (!a) {
                return
            }
            if (a.type != 'radio') return;
            a.checked = true
        }
    }
}
function placeholderBlur() {
    var b = this.getAttribute("placeholder") if (this.is_focused && b && this.value == "") {
        this.is_focused = 0;
        this.value = b;
        this.style.color = '#777'
    }
}