if (new_script.readyState) {
new_script.onreadystatechange = function () {
if (new_script.readyState == "loaded" || new_script.readyState == "complete") {
new_script.onreadystatechange = null;
my_function();
}
};
} else {
new_script.onload = function () {
my_function();
};
}