
var WAServerVars={"WebServerScheme":"http","ServerIP":"ec2-50-19-140-52.compute-1.amazonaws.com","WebServerFQDN":"apex.avayalive.com","ServerTitle":'webalive server',"MicroInstallerName":'microsetup-web.alive-client.exe',"versionString":'2.5.40',"buildNumber":'b1079',"downloadLocation":'http://downloads.projectchainsaw.com/fci/',"controlName":'WebPlugin.WebPluginControl.2.5.40',"appDir":"webcommon-2.1-b0","controlClassID":'CLSID:9A4E9AAB-72AE-4568-B974-7A73B0729D1A',"mimeType":'application/x-webalive-2.5.40',"webAuthenticationCookieName":'',"IEMaxVersion":'9999',"IEMinVersion":'6',"ChromeMaxVersion":'9999',"ChromeMinVersion":'0',"FirefoxMaxVersion":'9999',"FirefoxMinVersion":'3.0',"FlashMaxVersion":'9999',"FlashMinVersion":'0'}
var xa="";function WALoaderObj(parameter){WALoaderObj.prototype.element=parameter;this.WAJavaScriptArray=new Array();this.InvokerCallback=function(){alert("undefined callback");};}
WALoaderObj.prototype.WAAddScript=function(scriptSource)
{this.WAJavaScriptArray.push({'file':scriptSource,'status':'0'});}
WALoaderObj.prototype.WAInjectScripts=function(callback)
{this.InvokerCallback=callback;for(var i=0,len=this.WAJavaScriptArray.length;i<len;++i)
{this.WAInjectScript(this.element,this.WAJavaScriptArray[i].file,i,"text/javascript");}}
WALoaderObj.prototype.WAGenericCallback=function(arrayIndex)
{this.WAJavaScriptArray[arrayIndex].status='1';var arlen=this.WAJavaScriptArray.length;for(var i=0,len=this.WAJavaScriptArray.length;i<len;++i)
{if(this.WAJavaScriptArray[i].status=='0')
{return;}}
this.InvokerCallback();}
WALoaderObj.prototype.WAInjectScript=function(element,url,scriptID,myType)
{var headID=element.getElementsByTagName("head")[0];if(!headID){return;}
var ver=this.WAGetInternetExplorerVersion();var script=element.createElement('script');script.type=myType;script.src=url;var myObj=this;if(script.readyState){script.onreadystatechange=function(){if(script.readyState=="loaded"||script.readyState=="complete"){script.onreadystatechange=null;myObj.WAGenericCallback(scriptID);}};}else{script.onload=function()
{myObj.WAGenericCallback(scriptID);}}
if(ver>-1)
{headID.appendChild(script);return;}
headID.appendChild(script);}
WALoaderObj.prototype.WAInjectStylesheet=function(urlPath)
{var head=this.element.getElementsByTagName('head')[0];var tag=this.element.createElement('link');tag.setAttribute('rel','stylesheet');tag.setAttribute('type','text/css');tag.setAttribute('href',urlPath);head.appendChild(tag);}
WALoaderObj.prototype.WAGetInternetExplorerVersion=function()
{var rv=-1;if(navigator.appName=='Microsoft Internet Explorer')
{var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");if(re.exec(ua)!=null)
rv=parseFloat(RegExp.$1);}
return rv;}
function WAStart()
{var WACanvas=document.getElementById('WACanvas');WACanvas.style.backgroundImage='url('+WAServerVars.WebServerScheme+'://'+WAServerVars.WebServerFQDN+'/'+WAServerVars.appDir+'/_img/loading_'+WAUrlVars.Language+'.gif)';WACanvas.style.backgroundPosition='center';WACanvas.style.backgroundRepeat='no-repeat';WACanvas.style.backgroundColor='#fff';var WALoaderObjInstance;WALoaderObjInstance=new WALoaderObj(this.document);WALoaderObjInstance.WAInjectStylesheet(WAServerVars.WebServerScheme+"://"+WAServerVars.WebServerFQDN+"/"+WAServerVars.appDir+"/_css/WACustomerStyles.css");WALoaderObjInstance.WAAddScript(WAServerVars.WebServerScheme+"://"+WAServerVars.WebServerFQDN+"/"+WAServerVars.appDir+'/javascript/lib/x.js');WALoaderObjInstance.WAAddScript(WAServerVars.WebServerScheme+"://"+WAServerVars.WebServerFQDN+"/"+WAServerVars.appDir+'/javascript/WACustomerSpecific.js');WALoaderObjInstance.WAInjectScripts(function(){xa=new xAnimation();window.onresize=onWindowResize;WAStartApp();});}
function WAStop()
{var WACanvas=document.getElementById('WACanvas');WACanvas.style.backgroundImage='url('+WAServerVars.WebServerScheme+'://'+WAServerVars.WebServerFQDN+'/'+WAServerVars.appDir+'/_img/closed.jpg)';WACanvas.style.backgroundPosition='center';WACanvas.style.backgroundRepeat='no-repeat';WACanvas.style.backgroundColor='#fff';WACanvas.innerHTML='<div style="width:100%; height:100%;" onclick="location.reload();"></div>';var closeControl=document.getElementById('closeControl');closeControl.style.visibility='hidden';}
