document.write('
');
var easyxdm3dpscripts = [];
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/Core.js');
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/Debug.js');
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/DomHelper.js');
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/Fn.js');
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/Socket.js');
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/Rpc.js');
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/stack/FlashTransport.js');
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/stack/SameOriginTransport.js');
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/stack/PostMessageTransport.js');
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/stack/FrameElementTransport.js');
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/stack/NameTransport.js');
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/stack/HashTransport.js');
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/stack/ReliableBehavior.js');
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/stack/QueueBehavior.js');
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/stack/VerifyBehavior.js');
easyxdm3dpscripts.push('https://console.amfg.ai/js/easyXDM/stack/RpcBehavior.js');
var easyxdm3dpscriptsindex = 0;
var easyxdm3dptransport;
function loadSystemScript(callback)
{
if (easyxdm3dpscriptsindex >= easyxdm3dpscripts.length) {
easyxdm3dptransport = new easyXDM.Socket(/** The configuration */{
remote: "https://console.amfg.ai/externalsite/index/html/?token=1525095097835&es_session_id=qq2gnetnpu4hmakfr5dag39v06&lang=EN"+(window.location.hash.replace('#','&')),
swf: "https://console.amfg.ai/js/easyXDM/easyxdm.swf",
container: "519b4508",
onMessage: function(message, origin){
message = message.split('|');
if (message[0] == 'scroll'){
window.scrollTo(0, parseFloat(document.getElementById("519b4508").offsetTop) + parseFloat(message[1]));
} else {
this.container.getElementsByTagName("iframe")[0].style.height = message[0] + "px";
this.container.getElementsByTagName("iframe")[0].style.width = message[1] + "px";
this.container.getElementsByTagName("iframe")[0].setAttribute('scrolling','no');
}
},
onReady: function() {
var element = document.getElementById("519b4508-loader");
if (element){
element.parentNode.removeChild(element);
}
setInterval(function(){
easyxdm3dptransport.postMessage(document.getElementById("519b4508").getBoundingClientRect().top + '|' + screen.height);
},10);
}
});
return;
}
// adding the script tag to the head as suggested before
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = easyxdm3dpscripts[easyxdm3dpscriptsindex];
// bind the event to the callback function
if(script.addEventListener) {
script.addEventListener("load", function(){easyxdm3dpscriptsindex++;setTimeout(function(){loadSystemScript();}, 10);}, false); // IE9+, Chrome, Firefox
}
else if(script.readyState) {
if(!callback) callback = function(){
if(this.readyState=='complete' || this.readyState=='loaded'){
easyxdm3dpscriptsindex++;
setTimeout(function(){loadSystemScript();}, 10);
}
}; // ★★★★★★★★★ JUST ADD THIS LINE!
script.onreadystatechange = callback; // IE8
}
// fire the loading
head.appendChild(script);
}
setTimeout(function(){loadSystemScript();}, 10);
function isIE () {
var myNav = navigator.userAgent.toLowerCase();
return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;
}