﻿function open_close() {
    var sidebar_all = document.getElementById('sidebar_all');
    var obj_sidebar = document.getElementById('sidebar');
}
function A2YSlide(name, id, range, sec, tb, margin) {
    this.name = name;
    this.obj = document.getElementById(id);
    this.range = range;
    this.sec = sec;
    this.tb = tb;
    this.margin = margin;
    this.Timer();
}
A2YSlide.prototype.Move = function A2YSlide_Move(fix_y) {
    objY = parseInt(this.obj.style.top);
    if (objY != fix_y) {
        this.obj.style.top = (objY + this.GetMoveValue(objY, fix_y)) + 'px';
    }
    this.Timer();
}
A2YSlide.prototype.GetMoveValue = function A2YSlide_GetMoveValue(start, end) {
    return (end - start) * this.range;
}
A2YSlide.prototype.GetDocTnB = function A2YSlide_GetDocTnB(bTB) {
    return ((bTB) ? document.documentElement.clientHeight : 0) + document.documentElement.scrollTop;
}
A2YSlide.prototype.Timer = function A2YSlide_Timer() {
    setTimeout(this.name + '.Move(' + (this.GetDocTnB(this.tb) + this.margin) + ')', this.sec);
}
function A2Wzd_YSlide(id, range, sec, tb, margin) {
    eval('C' + id + " = new A2YSlide('C" + id + "','" + id + "'," + range + "," + sec + "," + tb + "," + margin + ');');
}
function scroll_ing() {
    A2Wzd_YSlide('rightMenu', 0.2, 10, 0, 142);
}
if (typeof window.addEventListener != 'undefined') {
    window.addEventListener("load", open_close, false);
    window.addEventListener("load", scroll_ing, false);
} else if (typeof window.attachEvent != 'undefined') {
    window.attachEvent("onload", open_close);
    window.attachEvent("onload", scroll_ing);
}
function popup(theURL, winName, features) {
    window.open(theURL, winName, features);
}



