The following works but I need to distribute it to clients that may be uncomfortable of pasting all this script into their home page. Just wondering if it can be simplified? I need to load Jquery 1.71, then the UI and then my own script and then call the function in my own script. Even minimized its rather long.

Hope some javascript guru can help. Thanks!

```
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js';
script.type = 'text/javascript';
head.appendChild(script);
if (script.onreadystatechange) script.onreadystatechange = function () {
    if (script.readyState == "complete" || script.readyState == "loaded") {
        script.onreadystatechange = false;
        //alert("complete");
        load_script();
    }
} else {
    script.onload = function () {
        //alert("complete");
        load_script();
    }
}
//setup array of scripts and an index to keep track of where we are in the process
var scripts = ['script/jquery-ui-1.8.7.custom.min.js', 'script/wfo171.js'],
    index = 0;
//setup a function that loads a single script
function load_script() {
    //make sure the current index is still a part of the array
    if (index < scripts.length) {
        //get the script at the current index
        $.getScript('http://mydomainn.com/script/' + scripts[index], function () {
            //once the script is loaded, increase the index and attempt to load the next script
            //alert('Loaded: ' + scripts[index] + "," + index);
            if (index != 0) {
                LoadEdge();
            }
            index++;
            load_script();
        });
    }
}

function LoadEdge() {
    Edge('f08430fa2a');
}

```