'use strict'; /* jshint eqnull: true, shadow: false, quotmark: single, eqeqeq: true, undef: true, unused: true, strict: true, curly: false, funcscope: true, globalstrict: true */ /* global AppStaticLib, StaticLib, LoadingScreen, window, jQuery, document, window */ window.__handleConnectionError=function(e,status,errorText,majorError,wipeDom,fromApp){if(typeof status!=='number'){status=parseInt(status,10);if(isNaN(status)){throw new Error('window.__handleConnectionError reports that the status is not a number');}}if(status===218){throw new Error('You cannot throw a 218, they occur within the ErrorHandler itself.');}if(status===200)return;if(typeof errorText!=='string'){if(e!==null&&typeof e==='object'&&typeof e.statusText==='string'&&e.statusText!==''){errorText=e.statusText;}else{errorText='';}}if(typeof fromApp==='undefined')fromApp=null;if(wipeDom!==true)wipeDom=false;if(majorError!==true)majorError=false;if(status>=500&&status<600){majorError=true;}if(status===0){majorError=false;wipeDom=false;}if(majorError===true){wipeDom=true;}else{majorError=false;}var messageList={0:'Internet connection lost',218:'Internal error handler failure',400:'Bad Request',401:'Authorization Required',402:'Payment Required',403:'Access from this machine forbidden',404:'File not found',413:'Request Entity Too Large',416:'Range Not Satisfiable',417:'Client Framework Error',418:'You are Logged Out',500:'Internal Server Error',504:'Gateway Timeout',511:'Must Fully Reauthenticate'};var originalStatus=status;var intmessage=messageList[status];if(status===-1){intmessage='Internal Error';}if(typeof intmessage==='undefined'){intmessage='Unknown connection error';}if(errorText===''){errorText=intmessage;}var className='';var Container=null;var title='';var appdetails='';var fatalErrMessage='';var fatalErrType='';var refreshTimer=null;var refreshCode2=function(){if(typeof window.Framework==='object'&&window.Framework!==null&&typeof window.Framework.prop==='object'&&window.Framework.prop!==null){window.Framework.prop.forceRefresh=true;}window.location.reload();};var escapeHtml=function(value){value=String(value);if(typeof StaticLib==='object'&&StaticLib!==null&&typeof StaticLib.EscapeHtml==='function'){return StaticLib.EscapeHtml(value);}return value.replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"').replace(/'/g,''');};var getAppDetails=function(){try{if(fromApp!==null&&typeof fromApp==='object'&&fromApp.AppDetails&&typeof fromApp.AppDetails.GetAppPath==='function'){return fromApp.AppDetails.GetAppPath('/');}}catch(ignored){}return'';};var canUseMsgBox=function(){return(typeof window.Framework==='object'&&window.Framework!==null&&typeof window.Framework.UI==='object'&&window.Framework.UI!==null&&typeof window.Framework.UI.MsgBox==='function');};var frameworkIsSetup=function(){return(typeof window.Framework==='object'&&window.Framework!==null&&typeof window.Framework.V5==='object'&&window.Framework.V5!==null&&window.Framework.V5.__setup===true&&window.Framework.V5.Setup===true);};var removeExistingError=function(id){var existing=document.getElementById(id);if(existing!==null&&existing.parentNode!==null){existing.parentNode.removeChild(existing);}};var FullScreenElementOnTop=function(el,shouldWipeDom,pos){if(shouldWipeDom!==true)shouldWipeDom=false;var hovered=jQuery(el)[0];var body=window.document.body;if(!hovered||!body)return;if(shouldWipeDom===true){while(body.firstChild){body.removeChild(body.firstChild);}}body.appendChild(hovered);var myPos={left:'0px',top:'0px',width:'100vw',height:'100vh'};if(typeof pos==='object'&&pos!==null){if(typeof pos.left!=='undefined'){myPos.left=pos.left;}if(typeof pos.top!=='undefined'){myPos.top=pos.top;}if(typeof pos.width!=='undefined'){myPos.width=pos.width;}if(typeof pos.height!=='undefined'){myPos.height=pos.height;}}hovered.style.position='fixed';hovered.style.left=myPos.left;hovered.style.top=myPos.top;hovered.style.width=myPos.width;hovered.style.height=myPos.height;hovered.style.zIndex='2147483647';};var createCloseableDialog=function(options){removeExistingError(options.id);var dialog=jQuery('
');dialog.html(''+'

'+options.icon+escapeHtml(options.title)+'

'+'
'+options.message+'
'+options.details+'
'+' '+options.extraButtons+'
');dialog.find('.CloseBtn').on('click',function(){if(refreshTimer!==null){window.clearTimeout(refreshTimer);refreshTimer=null;}dialog.remove();});return dialog;};var stopFrameworkActivity=function(){if(wipeDom!==true)return;try{if(typeof window.Framework==='object'&&window.Framework!==null&&typeof window.Framework.V5==='object'&&window.Framework.V5!==null&&typeof window.Framework.V5.SocketServer==='function'){var socketServer=window.Framework.V5.SocketServer();if(socketServer&&socketServer.IsConnected===true&&typeof socketServer.Disconnect==='function'){socketServer.Disconnect();}}}catch(ignoredSocketError){}try{if(window.Online===true&&typeof window.Framework==='object'&&window.Framework!==null&&typeof window.Framework.prop==='object'&&window.Framework.prop!==null){window.Framework.prop.screenLocked=true;}}catch(ignoredScreenLockError){}try{if(typeof window.Framework==='object'&&window.Framework!==null&&window.Framework.polling===true&&window.Framework.polling&&typeof window.Framework.polling.pauseTime==='function'){window.Framework.polling.pauseTime();}}catch(ignoredPollingError){}};var isJavascriptError=e instanceof Error||e instanceof ReferenceError||e instanceof SyntaxError||e instanceof RangeError||e instanceof TypeError;if(isJavascriptError===true){try{var errorType=e.constructor&&e.constructor.name?e.constructor.name:'Error';var errorMessage=typeof e.message==='string'&&e.message!==''?e.message:errorText;var stack='';if(typeof e.stack==='string'&&e.stack!==''){stack='
'+escapeHtml(e.stack)+'
';}title=getAppDetails();if(title===''){title='Internal Error';}var exceptionMessage=''+'

'+escapeHtml(errorMessage)+'

'+stack;if(canUseMsgBox()&&frameworkIsSetup()){return window.Framework.UI.MsgBox({title:errorType+' - '+title,message:exceptionMessage,height:400,width:600});}Container=createCloseableDialog({id:'ROMJavascriptError',className:'ROMBlueScreen',title:errorType+' - '+title,icon:' ',message:exceptionMessage,details:'',extraButtons:''});Container.find('.ReloadBtn').on('click',refreshCode2);FullScreenElementOnTop(Container,false,{height:'70vh',width:'70vw',top:'15vh',left:'15vw'});return;}catch(fatalErr){fatalErrMessage=fatalErr&&fatalErr.message?fatalErr.message:String(fatalErr);fatalErrType=fatalErr&&fatalErr.constructor&&fatalErr.constructor.name?fatalErr.constructor.name:'Error';status=218;intmessage=messageList[218];}}var safeErrorText=escapeHtml(errorText);var safeMessage=escapeHtml(intmessage);var message=''+'Connection Error: '+safeMessage+'
'+'status='+status+'
'+'errorText='+safeErrorText+'
';switch(status){case 218:className='ROMBlueScreen';appdetails=getAppDetails();if(fatalErrType===''){fatalErrType='Error';}if(fatalErrMessage===''){fatalErrMessage='The error handler encountered an additional error.';}Container=createCloseableDialog({id:className,className:className,title:fatalErrType+' ('+status+'): '+intmessage,icon:' ',message:'

'+'Whilst processing the original error, another error occurred.'+'

'+'

'+escapeHtml(fatalErrMessage)+'

',details:'
'+'Original status: '+escapeHtml(originalStatus)+'
'+'Original error: '+escapeHtml(errorText)+'
'+'Caller app: '+escapeHtml(appdetails||'Unknown')+'
',extraButtons:''});Container.css({background:'blue',color:'white',textAlign:'center'});Container.find('.ReloadBtn').on('click',refreshCode2);FullScreenElementOnTop(Container,false,{height:'50vh',width:'50vw',top:'25vh',left:'25vw'});return;case 511:window.location.href='/cache/locked.html';return;case 402:try{appdetails=getAppDetails();var NewApp=window.WindowStruct.create();NewApp.servletGroup='finance';NewApp.name='epayment';NewApp.layout='terminal';NewApp.argsIn={AppDetails:appdetails};new window.Framework.Methods.GetApp(NewApp).invoke();return;}catch(paymentError){errorText=paymentError.message||String(paymentError);status=500;intmessage=messageList[500];}break;case 404:if(window.Online===false){status=0;intmessage=messageList[0];errorText='The requested resource could not be loaded while offline.';break;}title='The page is missing';appdetails=getAppDetails();try{if(e!==null&&typeof e==='object'&&e.ActionObj&&e.ActionObj.caller&&typeof AppStaticLib==='object'&&typeof AppStaticLib.IsAnApp==='function'&&AppStaticLib.IsAnApp(e.ActionObj.caller)&&typeof e.ActionObj.caller.On404==='function'&&e.ActionObj.caller.AmIRunning===true){if(e.ActionObj.caller.On404(e.ActionObj.LastCalledURL)!==false){return;}}if(e!==null&&typeof e==='object'&&e.ActionObj&&typeof e.ActionObj.LastCalledURL==='string'){errorText=e.ActionObj.LastCalledURL;}}catch(ignored404Error){}Container=createCloseableDialog({id:'ROMMissing',className:'ROMMissing',title:'404 - '+title,icon:' ',message:'

'+escapeHtml(errorText)+'

'+(appdetails!==''?'

'+escapeHtml(appdetails)+'

':''),details:'',extraButtons:''});FullScreenElementOnTop(Container,false,{height:'50vh',width:'50vw',top:'25vh',left:'25vw'});return;case 416:title=intmessage;appdetails=getAppDetails();Container=createCloseableDialog({id:'ROMRangeError',className:'ROMMissing',title:'416 - '+title,icon:' ',message:'

'+escapeHtml(errorText)+'

'+(appdetails!==''?'

'+escapeHtml(appdetails)+'

':''),details:'',extraButtons:''});FullScreenElementOnTop(Container,false,{height:'50vh',width:'50vw',top:'25vh',left:'25vw'});return;case 417:Container=createCloseableDialog({id:'ROMClientFrameworkError',className:'ROMBlueScreen',title:'System Error: '+intmessage,icon:' ',message:'

'+escapeHtml(errorText)+'

',details:'',extraButtons:''});Container.css({background:'blue',color:'white',textAlign:'center'});Container.find('.ReloadBtn').on('click',refreshCode2);FullScreenElementOnTop(Container,wipeDom);stopFrameworkActivity();return;case 418:Container=createCloseableDialog({id:'ROMLoggedOut',className:'ROMLoggedOut',title:intmessage,icon:' ',message:'

'+escapeHtml(errorText)+'

',details:'',extraButtons:''});Container.css({background:'white',color:'black',textAlign:'center'});if(typeof StaticLib==='object'&&StaticLib!==null&&typeof StaticLib.IsJSONString==='function'&&StaticLib.IsJSONString(errorText)===true){try{var loggedOutMessage=JSON.parse(errorText);Container.find('h1').text(loggedOutMessage.Title||intmessage);Container.find('.ConnectionErrorMessage').html('

'+escapeHtml(loggedOutMessage.Body||errorText)+'

');}catch(ignoredJsonError){}}else{refreshTimer=window.setTimeout(refreshCode2,3000);}Container.find('.ReloadBtn').on('click',refreshCode2);FullScreenElementOnTop(Container,wipeDom);if(typeof window.Framework==='object'&&window.Framework!==null){window.Framework.teapot=true;}stopFrameworkActivity();return;case 0:title='Connection Lost';if(errorText===''||errorText==='error'||errorText==='abort'){errorText='The server could not be reached. Check your internet '+'connection and try again.';}message='

'+'Internet connection lost.'+'

';if(canUseMsgBox()&&frameworkIsSetup()){return window.Framework.UI.MsgBox({title:title,message:message,modal:false,width:450,height:240});}Container=createCloseableDialog({id:'ROMConnectionLost',className:'ROMConnectionLost',title:title,icon:' ',message:message,details:'
'+'Status: 0'+'
',extraButtons:''});Container.css({background:'#ffffff',color:'#222222',textAlign:'center',border:'1px solid #cccccc'});Container.find('.RetryBtn').on('click',refreshCode2);FullScreenElementOnTop(Container,false,{height:'300px',width:'500px',top:'calc(50vh - 150px)',left:'calc(50vw - 250px)'});return;case 504:title='Server Timeout';message='

'+'The server took too long to respond.'+'

'+'

'+escapeHtml(errorText)+'

';if(canUseMsgBox()&&frameworkIsSetup()){return window.Framework.UI.MsgBox({title:title,message:message,modal:false,width:450,height:240});}Container=createCloseableDialog({id:'ROMGatewayTimeout',className:'ROMGatewayTimeout',title:title,icon:' ',message:message,details:'
'+'Status: 504'+'
',extraButtons:''});Container.find('.RetryBtn').on('click',refreshCode2);FullScreenElementOnTop(Container,false,{height:'300px',width:'500px',top:'calc(50vh - 150px)',left:'calc(50vw - 250px)'});return;case 500:default:message=''+'Connection Error: '+escapeHtml(intmessage)+'
'+'status='+escapeHtml(status)+'
'+'errorText='+escapeHtml(errorText)+'
';if(canUseMsgBox()&&frameworkIsSetup()){return window.Framework.UI.MsgBox({title:'Developer Error A48',message:message});}Container=createCloseableDialog({id:'ROMBlueScreen',className:'ROMBlueScreen',title:'Connection Error: '+intmessage,icon:' ',message:'

'+escapeHtml(errorText)+'

',details:'
'+'Status: '+escapeHtml(status)+'
',extraButtons:''});Container.css({background:'blue',color:'white',textAlign:'center'});Container.find('.ReloadBtn').on('click',refreshCode2);FullScreenElementOnTop(Container,wipeDom);stopFrameworkActivity();return;}if(status===500){return window.__handleConnectionError(e,500,errorText,true,wipeDom,fromApp);}stopFrameworkActivity();};if(typeof(window.CachedControls)!=='object')window.CachedControls={};if(typeof(window.Framework.Methods)==='undefined')window.Framework.Methods={};window.Framework.Methods.LogDataSize=function(connection,data){var size=(connection.getResponseHeader('Content-Length'));if(size===null){try{size=((encodeURI(data).split(/%..|./).length-1)/1024);}catch(e){size=0;}}else{size=(size/1024);}window.DataSize+=size;var d=document.getElementById('TotalDataUsage');if(d===null)return;if(window.DataSize<=1024){d=document.getElementById('TotalDataUsage');if(d===null)throw new Error('No stylesheet?');d.innerHTML=StaticLib.Math.Round(window.DataSize,4);d=document.getElementById('TotalDataUsage');if(d===null)throw new Error('No stylesheet?');d.innerHTML=StaticLib.Math.Round(window.DataSize,4);}else{d=document.getElementById('DataMeasure');if(d===null)throw new Error('No stylesheet?');d.innerHTML='MB';d=document.getElementById('TotalDataUsage');if(d===null)throw new Error('No stylesheet?');d.innerHTML=StaticLib.Math.Round((window.DataSize/1024),4);}};StaticLib.DeepSeal(window.Framework.Methods.LogDataSize);StaticLib.DeepFreeze(window.Framework.Methods.LogDataSize);var DependencyLoader=function(dependencies,RunWhenDone,showLoading,loadAsControls){var __ShowLoading=false;var __ShowSubLoading=false;var __LoadAsControls=false;var __LoadedArray={};var _WhenDone=function(){};var _WhenPriorityDone=function(){};var __LowerPriorityURLS='';var _Ctor=jQuery.proxy(function(dependencies,RunWhenDone,showLoading,loadAsControls){window.FilesLoadedList=[];window.LoadedDependencyKeyList=[];if(typeof(RunWhenDone)!=='function')throw new Error('DependencyLoader: Argument 2 (RunWhenDone) must be a function');if(showLoading===true)__ShowLoading=true;if(loadAsControls===true)__LoadAsControls=true;_WhenDone=RunWhenDone;_WhenPriorityDone=RunWhenDone;var type=typeof(dependencies);var isString=(type==='string');var isNumeric=(type==='number');var isArray=StaticLib.IsArray(dependencies);if((dependencies===null)||((!isString)&&(!isNumeric)&&(!isArray)))throw new Error('DependencyLoader: Argument 1 (dependencies) must be a Dependency Key, or a list or URLs');if((isString===true)||(isNumeric===true)){_LoadByKey(dependencies);if((typeof(window.LoadingScreenTaskTypes)!=='undefined')&&(typeof(window.LoadingScreenTaskTypes.api)!=='undefined')){if(__ShowLoading===false)return;var task={Type:window.LoadingScreenTaskTypes.api,TaskID:'dependencies',TaskDescription:'Loading Dependencies',Priority:0};if((window.DependencyLoadingScreen===null)||(typeof(window.DependencyLoadingScreen)==='undefined')){window.DependencyLoadingScreen=new LoadingScreen({TaskList:[task]});}else{window.DependencyLoadingScreen.AddTask(task);}}}else{if((dependencies===null)||(typeof(dependencies)==='undefined')||(typeof(dependencies.length)!=='number')||(dependencies.length===0))throw new Error('Dependency loader expects an array of URLs, or a dependency key (string or number)');if(typeof(dependencies[0].priority)!=='undefined')dependencies=_RecursiveArray(dependencies);_LoadByURLs(dependencies);}},this);var _LoadByKey=jQuery.proxy(function(key){if((window.LoadedDependencyKeyList.indexOf(key))===-1){window.LoadedDependencyKeyList.push(key);var postData={'key':key};var stylesheet=document.getElementById('currentStyleSheet');if(stylesheet!==null){var themeName=stylesheet.href;if(themeName!==''){var removeBefore='themes/';var index=themeName.indexOf(removeBefore);if(index!==-1){themeName=themeName.substring((index+removeBefore.length));}var removeAfter='/';index=themeName.indexOf(removeAfter);if(index!==-1){themeName=themeName.substring(0,index);}postData.theme=themeName;}}var api=new window.Framework.Methods.GetAPI('system','GetDependancyFiles',this,_Callback_ProcessDependencies,postData);api.servletGroup='platform';api.showLoading=false;api.invoke();}else{_DoneLoading();}},this);var _LoadByURLs=jQuery.proxy(function(urlList,tries){if((typeof(urlList)==='undefined')||(urlList===null)||(urlList.length===0))return _DoneLoading();if(typeof(tries)==='undefined')tries=0;var extension='';var url='';var callback=null;var AlreadyLoaded=jQuery('script[fromurl], style[fromurl]');var length=AlreadyLoaded.length;var tag;var i;for(i=0;i0){if(url.indexOf('.php?type=')===-1){var res=url.split('?');extension=res[0].slice(-3);}}if(extension==='')extension=url.slice(-3);if(extension==='css'){callback=__Callback_ReceiveCSS;}else if(extension==='.js'){callback=_Callback_ReceiveJS;if(__LoadAsControls){callback=_Callback_ReceiveControl;if(window.Framework.GlobalControls.indexOf(url)!==-1)callback=_Callback_ReceiveJS;}}else{callback=_Callback_ReceiveJS;if(__LoadAsControls){callback=_Callback_ReceiveControl;if(window.Framework.GlobalControls.indexOf(url)!==-1)callback=_Callback_ReceiveJS;}}extension='';jQuery.ajax({'url':url,'method':'GET','dataType':'text','error':_Callback_TryAgain,'success':callback}).ActionObj={URL:url,OriginalContext:this,NumberOfTries:(tries+1)};}else{if(StaticLib.IsArray(url)){__LowerPriorityURLS=url;_WhenDone=jQuery.proxy(loadDep,this);}if(__ShowLoading===true){__ShowLoading=false;__ShowSubLoading=true;}}}var filesToCheck=Object.keys(__LoadedArray);length=filesToCheck.length;var urlToCheck='';for(i=0;idata[i].priority)priority=data[i].priority;}var primaryArray=[];var secondaryArray=[];for(i=0;idata[j].priority)priority=data[j].priority;continue;}if(__ShowLoading===true){var task={Type:window.LoadingScreenTaskTypes.api,TaskID:data[i].file,TaskDescription:'Loading Files...',Priority:(10-data[i].priority)};if(typeof(data[i].message)!=='undefined')task.TaskDescription=data[i].message;if((window.DependencyLoadingScreen===null)||(typeof(window.DependencyLoadingScreen)==='undefined')){window.DependencyLoadingScreen=new LoadingScreen({TaskList:[task]});}else{window.DependencyLoadingScreen.AddTask(task);}}if(priority===data[i].priority){primaryArray.push(data[i].file);}else{if((typeof(data[i].file)!=='undefined')&&(!StaticLib.Empty(data[i].file)))secondaryArray.push(data[i]);}}if(secondaryArray.length>0){var sortedSecondaryArray=_RecursiveArray(secondaryArray);primaryArray.push(sortedSecondaryArray);}return primaryArray;},this);var __Callback_ReceiveCSS=jQuery.proxy(function(data,status,connection){var ct=connection.getResponseHeader('content-type')||'';if(ct.indexOf('text/css')===-1)throw new Error('Invalid data received');window.Framework.Methods.LogDataSize(connection,data);if(connection.status!==200)window.__handleConnectionError(connection,connection.status,connection.statusText,false);var depLoad=connection.ActionObj.OriginalContext;if((depLoad===null)||(typeof(connection.ActionObj.URL)!=='string')||(connection.ActionObj.URL.length===0))return;var newStyle=document.createElement('STYLE');newStyle.innerHTML=data;newStyle.setAttribute('fromurl',connection.ActionObj.URL);document.head.appendChild(newStyle);__LoadedArray[connection.ActionObj.URL]=true;if(((window.DependencyLoadingScreen!==null)||(typeof(window.DependencyLoadingScreen)!=='undefined'))&&(window.DependencyLoadingScreen.HasTask(connection.ActionObj.URL)))window.DependencyLoadingScreen.CompleteTask(connection.ActionObj.URL);var filesToCheck=Object.keys(__LoadedArray);var length=filesToCheck.length;var urlToCheck=null;for(var i=0;i-1)||(ct.indexOf('text/javascript')>-1)){}else if(ct.indexOf('html')>-1){if(StaticLib.IsJSONString(data)){if((typeof(window.Framework)!=='undefined')&&(typeof(window.Framework.prop)!=='undefined')&&(window.Framework.prop.developer))window.Framework.UI.MsgBox({title:'_Callback_ReceiveControl Error',message:'Data returned is not HTML but instead JSON, please specify your content-type header before returning your data',modal:false,width:400,height:300});data=JSON.parse(data);}}else if(ct.indexOf('json')>-1){if(StaticLib.IsJSONString(data)===false)throw new Error('Not a valid JSON string');data=JSON.parse(data);}else{throw new Error('Unknown content type');}var depLoad=connection.ActionObj.OriginalContext;if((depLoad===null)||(typeof(connection.ActionObj.URL)!=='string')||(connection.ActionObj.URL.length===0))return;if(((window.DependencyLoadingScreen!==null)||(typeof(window.DependencyLoadingScreen)!=='undefined'))&&(window.DependencyLoadingScreen.HasTask(connection.ActionObj.URL)))window.DependencyLoadingScreen.CompleteTask(connection.ActionObj.URL);var filename=connection.ActionObj.URL;if(filename.indexOf('?')!==-1)filename=filename.substr(0,filename.indexOf('?'));window.CachedControls[filename]=data;__LoadedArray[connection.ActionObj.URL]=true;var filesToCheck=Object.keys(__LoadedArray);var length=filesToCheck.length;var urlToCheck='';for(var i=0;i-1){}else if(ct.indexOf('html')>-1){if(StaticLib.IsJSONString(data)){data=JSON.parse(data);}}else if(ct.indexOf('json')>-1){if(StaticLib.IsJSONString(data)===false)throw new Error('Not a valid JSON string');data=JSON.parse(data);}else{throw new Error('Unknown content type');}var depLoad=connection.ActionObj.OriginalContext;if((depLoad===null)||(typeof(connection.ActionObj.URL)!=='string')||(connection.ActionObj.URL.length===0))return;if(((window.DependencyLoadingScreen!==null)||(typeof(window.DependencyLoadingScreen)!=='undefined'))&&(window.DependencyLoadingScreen.HasTask(connection.ActionObj.URL)))window.DependencyLoadingScreen.CompleteTask(connection.ActionObj.URL);var newStyle=document.createElement('SCRIPT');try{jQuery.proxy(eval,window)(data);}catch(e){return window.__handleConnectionError(null,500,'Could not compile the framework, please quote the following code: '+connection.ActionObj.URL+': '+e.message,true);}newStyle.setAttribute('fromurl',connection.ActionObj.URL);document.head.appendChild(newStyle);__LoadedArray[connection.ActionObj.URL]=true;var filesToCheck=Object.keys(__LoadedArray);var length=filesToCheck.length;var urlToCheck='';for(var i=0;i