en

story.html

HTML icon story.html — HTML, 11 KB (11583 bytes)

File contents

<!DOCTYPE HTML>
<html style="height: 100%;" lang="en-US">
<head>
    
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <!-- Created using Storyline 360 - http://www.articulate.com  -->
    <!-- version: 3.15.15453.0 -->

    <title>Knowledge Management Academy</title>
    <style>
        body {
            background: #ffffff;
            overflow: hidden;
        }

        html, body, table {
            height: 100%;
            width: 100%;
            margin: 0;
            padding: 0;
            border: 0;
        }

        table td {
            vertical-align: middle;
            text-align: center;
        }

        #nosupport {
            background: #f5f5f5;
            margin: 50px 65px;
            border: 1px solid #d5d5d5;
            width: calc(100% - 130px);
            height: calc(100% - 100px);
        }

        p {
            font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;
            font-size: 12pt;
            color: #303030;
        }

        a {
            color: #2D9DDA;
            text-decoration: none !important;
        }

    </style>
    <script>
        var html5Supported = true;

    </script>
    <!--[if lte IE 9]><script>html5Supported = false;</script><![endif]-->

    <script type="text/javascript">

        function routePlayer() {

            var settings = {
                lmsEnabled: false,
                tincanEnabled: false,
                aoEnabled: false,
                runtimeOrder: [{"type":"amp","url":"amplaunch.html"},{"type":"html5","url":"story_html5.html"},{"type":"flash","url":"story_flash.html"}],
                warnOnCommitFail: false
            };

            var PARAM_WARN_ON_COMMIT = {name: 'warncommit', value: 1},
                    PARAM_LMS = {name: 'lms', value: 1},
                    PARAM_TINCAN = {name: 'tincan', value: true},
                    PARAM_AO = {name: 'aosupport', value: true};

            var detection = {
                agent: navigator.userAgent,

                flashEnabled: function() {
                    var description, version, flashAX,
                            plugin = navigator.plugins["Shockwave Flash"];

                    if (plugin != null) {
                        description = plugin.description.split(" ");
                        version = Number(description[description.length - 2]);

                        return (version >= 10) || isNaN(version);
                    } else {
                        try {
                            flashAX = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.10");
                            return (flashAX != null);
                        } catch (e) {
                        }
                    }

                    return false;
                },
				
                isFlashWaiting: function() {
                    var html = '',
                    divFlash = document.getElementById('flashCheck'),
                    player;

                    html += '<object width="100px" height="100px" id="player" type="application/x-shockwave-flash">';
                    html += '<param name="name" value="player" />';
                    html += '<param name="wmode" value="opaque" />';
                    html += '<param name="allowScriptAccess" value="always" />';
                    html += '</object>';

                    divFlash.innerHTML = html;
                    player = document.getElementById('player');

                    return player != null && player.getBoundingClientRect().width > 0;
                },

                html5Enabled: function() {
                    return html5Supported;
                },

                ampEnabled: function() {
                    return ((this.isIOS() && this.isIPad()) || this.isAndroid());
                },

                isIOS: function() {
                    return (this.agent.indexOf("AppleWebKit/") > -1 && this.agent.indexOf("Mobile/") > -1)
                },

                isAndroid: function() {
                    return (this.agent.indexOf("Android") > -1);
                },

                isIPad: function() {
                    return (this.agent.indexOf("iPad") > -1);
                },

                isEdge: function() {
                    var hasGlCapability = (function() {
                        var canv = document.createElement('canvas'),
                            gl = canv.getContext('webgl') || canv.getContext('experimental-webgl');
                        canv = null;
                        return gl != null;
                    }());
                    return window.MSBlobBuilder != null && window.msCrypto == null && hasGlCapability;
                }
            };

            var router = {

                init: function() {
                    var i, url, launchInfo,
                        redirected = false,
                        order = settings.runtimeOrder,
                        launchMap = {
                            flash: {
                                isEnabled: 'flashEnabled',
                                getParams: 'getFlashParams',
                                delim: '?'
                            },
                            html5: {
                                isEnabled: 'html5Enabled',
                                getParams: 'getHtml5Params',
                                delim: '?'
                            },
                            amp: {
                                isEnabled: 'ampEnabled',
                                getParams: 'getAmpParams',
                                delim: '#'
                            }
                        };

                    if (document.location.search.toLowerCase().indexOf('forceflash') != -1) {
                        this.moveFlashToStartOfOrder(order);
                    }

                    for (i = 0; i < order.length; i++) {
                        launchInfo = launchMap[order[i].type];
                        url = order[i].url;

                        if (detection[launchInfo.isEnabled]()) {
                            this.redirect(url, this[launchInfo.getParams](), launchInfo.delim);
                            redirected = true;
                            break;
                        }
                    }

                    if (!redirected) {
                        if (
                            detection.isEdge() &&
                            order[0].type === 'flash' &&
                            detection.isFlashWaiting()
                        ) {
                            launchInfo = launchMap[order[0].type];
                            url = order[0].url;
                            this.redirect(url, this[launchInfo.getParams](), launchInfo.delim);
                        } else {
                            document.getElementById('nosupport').style.visibility = 'visible';
                        }
                    }
                },

                moveFlashToStartOfOrder: function (order) {
                    var i,
                        flashIndex = -1;
                    for (i = 0; i < order.length; i++) {
                        if (order[i].type == "flash") {
                            flashIndex = i;
                            break;
                        }
                    }
                    if (flashIndex != -1) {
                        order.splice(0, 0, order.splice(flashIndex, 1)[0]);
                    }
                },

                getQueryString: function (params) {
                    params = params || [];
                    var i,
                            queryString = document.location.search.substr(1),
                            paramArr = queryString.length > 0 ? queryString.split('&') : [];

                    for (i = 0; i < params.length; i++) {
                        paramArr.push([params[i].name, params[i].value].join('='));
                    }

                    return paramArr.join('&');
                },

                formatUrl: function (url, params, delim) {
                    delim = delim || '?';

                    var queryString = this.getQueryString(params);

                    if (queryString != null && queryString.length > 0) {
                        return [url, queryString].join(delim);
                    }

                    return url;
                },

                redirect: function (url, params, delim) {
                    window.location.replace(this.formatUrl(url, params, delim));
                },

                getFlashParams: function () {
                    return [];
                },

                getHtml5Params: function () {
                    var params = [];
                    if (settings.tincanEnabled) {
                        params.push(PARAM_TINCAN);
                    } else if (settings.lmsEnabled) {
                        params.push(PARAM_LMS);
                        if (settings.warnOnCommitFail) {
                            params.push(PARAM_WARN_ON_COMMIT);
                        }
                    }

                    return params;
                },

                getAmpParams: function () {
                    var tincanProto = settings.aoEnabled || settings.tincanEnabled,
                            params = [];
                    // build AMP params
                    if (tincanProto) {
                        params.push(PARAM_TINCAN);
                        if (settings.aoEnabled) {
                            params.push(PARAM_AO);
                        }
                    }
                    return params;
                }
            };

            router.init();
        };

    </script>
</head>
<body onload="routePlayer()" style="height: 100%;">
<div id="nosupport" style="visibility: hidden;">
    <table>
        <tr>
            <td>
                <p>
                    <svg xmlns="http://www.w3.org/2000/svg" width="90.2" height="74.9" viewBox="0 0 90 75" version="1.1">
                        <g transform="scale(.1)">
                            <path d="m409 7c54-25 106 20 130 66 106 170 213 340 320 510 17 28 32 63 19 96-14 36-55 51-91 51-224 1-448 0-672 0-35 1-76-3-100-33-26-32-15-77 5-108 107-173 216-344 324-517 16-26 35-53 65-65z"
                                  fill="#4c4c4c"></path>
                            <path d="m419 57c26-20 55 4 68 27 109 174 218 348 328 522 9 17 23 35 17 55-11 20-36 18-55 19-224 0-447 0-670 0-20-1-46 1-57-19-5-18 6-34 14-48 109-174 218-348 327-522 9-12 17-25 28-34z"
                                  fill="#f5f5f5"></path>
                            <path d="m429 179c25-12 58 8 56 35-1 81-5 161-10 242 2 32-49 39-57 9-7-73-6-146-11-219-1-24-4-56 22-67zM430 539 430 539 430 539c45-24 80 53 32 72-45 24-80-53-32-72z"
                                  fill="#4c4c4c"></path>
                        </g>
                    </svg>
                </p>
                <p>This course cannot be played.</p>
                <p><a href="https://ipc.articulate.com/slw/360/en/cannotplay/">Learn More</a></p>

            </td>
        </tr>
    </table>
</div>
<div id="flashCheck" style="visibility: hidden" >
</div>
</body>
</html>

International Training Centre of the ILO

Viale Maestri del Lavoro, 10
10127 Turin - Italy

Contact us