function IsNull(obj) {
    if (obj != 'undefined' && obj != null)
        return false;

    return true;
}

function IsNullEmpty(obj) {
    if (!IsNull(obj) && obj != "")
        return false;

    return true;
}

var myph_lazy_loader = { pre_load: 30, image_array: new Array(), init: function() {
    var c = 0;
    var _2 = this;
    var _3 = document.getElementsByTagName("img");
    for (var i = 0; i < _3.length; i++) {
        var _5 = _3[i];
        if (!IsNullEmpty(_5.parentNode.getAttribute("gr"))) {
            c++;
            if (c > _2.pre_load) {
                _2.image_array.push(new lazy_image(_5));
            }
        }
    }
    if (window.addEventListener) {
        window.addEventListener("load", myph_li_ListeToScroll, false);
    } else {
        window.attachEvent("onload", myph_li_ListeToScroll);
    }
}, revive: function() {

    if (!IsNull(this.image_array)) {
        for (var i = 0; i < this.image_array.length; i++) {
            this.image_array[i].revive();
        }
        this.image_array = null;
    }
}
};
function lazy_image(_7, _8) {
    this.orig_src = _7.src;
    this.elem = _7;
    _7.src = "http://www.privatesite.ru/warn/loading.png";
    return this;
}
lazy_image.prototype.revive = function() {
    this.elem.src = this.orig_src;
};
function myph_li_ListeToScroll() {
    if (window.removeEventListener) {
        window.removeEventListener("load", myph_li_ListeToScroll, false);
    } else {
        window.detachEvent("onload", myph_li_ListeToScroll);
    }
    myph_lazy_loader.revive();
}
function initLazierLoad() {
/*
    if (window.addEventListener || window.attachEvent) {
        myph_lazy_loader.init();
    }
*/
}
/*
window.onload = function ImgLoader() {
    initLazierLoad();
}
*/


