function _vmiMessageBox(id){var MsgBx=document.createElement('div');MsgBx.id=id;MsgBx.style.left='0px';MsgBx.style.top='0px';MsgBx.style.border='0px black solid';MsgBx.style.position='absolute';MsgBx.style.zIndex='999';MsgBx["display"]=function(content,LT){this.style.left=LT[0];this.style.top=LT[1];this.style.border='1px black solid';this.style.position='absolute';this.style.height=null;this.style.width=null;this.style.zIndex='999';this.style.visibility='visible';this.innerHTML=content;this["content"]=new String(content);};MsgBx["close"]=function(){this.style.left='0px';this.style.top='0px';this.style.border='0px black solid';this.style.position='absolute';this.style.width='0px';this.style.height='0px';this.style.zIndex='999';this.style.visibility='hidden';this.innerHTML='';};return(MsgBx)};function _vmiStopWatch(){this.startTime=null;this.endTime=null;this.length=null;this.state='none';this.Start=function(){this.startTime=new Date();this.state='start';};this.Stop=function(){if(this.state!='stop'){this.endTime=new Date();var one_day=1000*60*60*24;this.length=(this.endTime.getTime()-this.startTime.getTime())/1000;if(this.speed!=0)this.speed=Math.round(this.fileSize/this.length);this.state='stop';}}};var vmiGlob={paths:{root:'',account:'',lib:''},debugging:{isActive:false,message:new _vmiMessageBox('vmiDebugMsg')},license:{_verifications:new Array(),timer:new _vmiStopWatch(),accountNumber:'DEMO',version:'0.0.0',urls:new Array(),verifiedUrls:new Array(),validate:function(){this.timer.Start();for(var i=0;i<this.urls.length;i++){if(this.urls[i]){this._verifications[i]=document.createElement('img');this._verifications[i].onload=function(e){var url=this.src.split("/");var tmp=new String();for(var j=0;j<url.length-1;j++){tmp=tmp+url[j]+'/';}vmiGlob.license.verifiedUrls[vmiGlob.license.verifiedUrls.length]=new String(tmp);vmiGlob.license.timer.Stop();};this._verifications[i].src=vmiGlob.license.urls[i]+vmiGlob.license.accountNumber+'?rd='+Math.round(Math.random()*Date.parse(new Date())*100);}}}},library:{loadingLibraries:new Object(),_loadingTimer:{_increment:10,_waitTime:500,_counter:0,_intervalTimer:new Array(),_state:-1,_waitingforRelease:function(library,idx){if(vmiGlob.library.loadingLibraries[library]){var isReqLibLoaded=true;if(vmiGlob.library.loadingLibraries[library]._reqLibs){for(var i=0;i<vmiGlob.library.loadingLibraries[library]._reqLibs.length;i++){var reqLib=vmiGlob.library.loadingLibraries[library]._reqLibs[i];if(!vmiGlob.library.loadingLibraries[reqLib]){vmiGlob.library.Load(reqLib);}if(!vmiGlob[reqLib])isReqLibLoaded=false;}}if(isReqLibLoaded){var isInitSuccess=true;try{vmiGlob.library.loadingLibraries[library].init();}catch(e){isInitSuccess=false;}if(isInitSuccess){clearInterval(this._intervalTimer[idx]);this._intervalTimer[idx]=1;vmiGlob.library._release(library);}}}},_loading:function(library,idx){if(vmiGlob.license.verifiedUrls.length>=1){clearInterval(this._intervalTimer[idx]);this._intervalTimer[idx]=1;this.state=1;vmiGlob.paths.root=vmiGlob.license.verifiedUrls[0];vmiGlob.paths.account=vmiGlob.license.verifiedUrls[0]+'_'+vmiGlob.license.accountNumber+'/';vmiGlob.paths.lib=vmiGlob.license.verifiedUrls[0]+'_'+vmiGlob.license.accountNumber+'/'+vmiGlob.license.version+'/';var vmiScript=document.createElement('script');vmiScript.setAttribute("id",'vmi_'+library);vmiScript.setAttribute("defer","defer");vmiScript.setAttribute("type","text/javascript");vmiScript.setAttribute("charset","utf-8");vmiScript.setAttribute("src",vmiGlob.paths.lib+library+'.js');document.getElementsByTagName("head")[0].appendChild(vmiScript);this._intervalTimer[idx]=setInterval("vmiGlob.library._loadingTimer._waitingforRelease('"+library+"',"+idx+")",100);if(vmiGlob.debugging.isActive)vmiGlob.debugging.message.display("Speed:"+vmiGlob.license.timer.length+" Verified:"+vmiGlob.paths.lib,['10px','10px']);}else if(this._counter>=this._waitTime){clearInterval(this._intervalTimer[idx]);throw "Error:0x0001 Unable to validate License Key";}else{this._counter++;}},_start:function(library){var idx=0;idx=this._intervalTimer.length;if(this._state==-1){this.state=0;this._intervalTimer[idx]=setInterval("vmiGlob.library._loadingTimer._loading('"+library+"',"+idx+")",this._increment);}},setWait:function(seconds){this._waitTime=(seconds*1000)/this._increment;}},_release:function(library){var scriptElement=document.getElementById('vmi_'+library);var headerElement=document.getElementsByTagName("head")[0];try{}catch(e){throw "Error:0x0007 Unable to release "+library;}},Validate:function(libObject){this.loadingLibraries[libObject._libName]=libObject;},Load:function(library){if(vmiGlob[library]||this.loadingLibraries[library])return;this.loadingLibraries[library]=true;this._loadingTimer._start(library);}},Init:function(){vmiGlob.license.accountNumber=vmi_AccountNumber;vmiGlob.license.version=vmi_Version;try{var errmsg=document.getElementById('vmiErrorMsg');errmsg.style.visibility='hidden';errmsg.style.width='0px';errmsg.style.height='0px';}catch(e){}if(vmiGlob.debugging.isActive){document.body.appendChild(vmiGlob.debugging.message);vmiGlob.license.urls[0]='http://aws.vergencemedia.net/_accounts/'}else{vmiGlob.license.urls[0]='http://aws.vergencemedia.net/_accounts/'}vmiGlob.license.validate();vmiGlob.library.Load('modeling');}};if(window.attachEvent){window.attachEvent("onload",vmiGlob.Init);}else if(/WebKit/i.test(navigator.userAgent)){var vmiInitTimer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){vmiGlob.Init();clearInterval(vmiInitTimer);}},10);}else if(document.addEventListener){document.addEventListener("DOMContentLoaded",vmiGlob.Init,null);}else{var vmiBrowserTmpVersion=0;if(navigator.appVersion.indexOf("MSIE")!=-1){vmiBrowserTmpVersion=parseFloat(navigator.appVersion.split("MSIE")[1]);if(vmiBrowserTmpVersion<6){}}throw "Error:0x0000 Unable to load framework";} 