﻿if (!document.all)
    document.body.style.overflowY = 'scroll';

function top() { window.scrollTo(0, 0); document.body.focus() }

var aeOL = []; function addEvent(o, n, f, l) { var a = 'addEventListener', h = 'on' + n, b = '', s = ''; if (o[a] && !l) return o[a](n, f, false); o._c |= 0; if (o[h]) { b = '_f' + o._c++; o[b] = o[h]; } s = '_f' + o._c++; o[s] = f; o[h] = function(e) { e = e || window.event; var r = true; if (b) r = o[b](e) != false && r; r = o[s](e) != false && r; return r; }; aeOL[aeOL.length] = { o: o, h: h }; };

addEvent(window, 'load', function() { if (document.forms.length > 0) { for (var i = 0; i < document.forms[0].length; i++) { try { document.forms[0][i].focus(); break; } catch (e) { } } } });

function bookmark() { 
    if (window.sidebar)
        window.sidebar.addPanel(document.title, window.location, "");
    else if(window.opera && window.print)
    {
        var elem = document.createElement('a');
        elem.setAttribute('href',window.location);
        elem.setAttribute('title',document.title);
        elem.setAttribute('rel','sidebar');
        elem.click();
    } else if (document.all)
        window.external.AddFavorite(window.location, document.title);
}

function setTextSize(percent) {
    document.getElementById('page').style.fontSize = percent + '%';
}
