﻿var Core = {
    _onloadList: new Array(),

    init: function() {
    },

    add_onload: function(func) {
        this._onloadList[this._onloadList.length] = func;
    },

    process_onload: function() {
        for (var i = 0; i < this._onloadList.length; i++) {
            this._onloadList[i]();
        }
    }
}

if (top.location != self.location) {
	top.location = self.location;
}

// Add onload handler
if (window.addEventListener) window.addEventListener("load", function() { Core.process_onload(); }, false);
else if (window.attachEvent) window.attachEvent("onload", function() { Core.process_onload(); });
else if (document.getElementById) window.onload = function() { Core.process_onload(); };

