﻿/* © Crypton Technologies 2011 */

///<summary>Loads javascript from a file</summary>
if (document.loadjs == undefined) {
    document.loadjs = function (file) {
        var script = document.createElement("script");
        script.setAttribute("src", file);
        document.getElementsByTagName("head")[0].appendChild(script);
    }
}
window.attachOnLoad = function (event) {
    if (typeof event != "function") {
        throw "The `event` parameter must be a function type";
    }
    var wndonload = window.onload;
    if (typeof window.onload != "function") {
        window.onload = event;
        return this;
    } else {
        window.onload = function () {
            wndonload();
            event();
        }
    }
}

