﻿// JScript File
function stInst(){
    if(typeof installInit !== 'undefined')
    {
        if(typeof obj_axVisHelper === "undefined" || obj_axVisHelper == null) return;
        obj_axVisHelper.style.display = "inline";
    }
    setTimeout(_set_dnl,10,"javascript");
}

function _set_dnl()
{    
    if(typeof obj_axVisHelper === "undefined" || obj_axVisHelper == null) return;
    obj_axVisHelper.innerHTML = "<object id='xpanity_inst_obj' CLASSID='clsid:8CAA1904-334C-4960-8F64-B3CF03473763' CODEBASE='<%=AppSettings.XpanityInstallerUrl + AppSettings.XpanityInstallerFileName%>.cab' BORDER=0 VSPACE=0 HSPACE=0 ALIGN=TOP HEIGHT=0% WIDTH=0%></object>";
    var obj_axInstaller = _ge("xpanity_inst_obj");
    if(typeof obj_axInstaller === "undefined" || obj_axInstaller == null) return; 
    obj_axInstaller.onreadystatechange = function(){ 
        if (this.readyState != 4) return;   
        //5000 ms is to let client to notice that there's something happening here      
        setTimeout(_set_inst_ptr,5000,"javascript");  
    }
}


function _set_inst_ptr()
{
  try
  {    
    if(typeof obj_axVisHelper === "undefined" || obj_axVisHelper == null) return;
    obj_axVisHelper.style.display = "none";
  }
  catch(e){/*ignore*/}  
}

var IsIE =(navigator.appName.toLowerCase().indexOf("microsoft internet explorer") > -1);
//if (IsIE) {window.attachEvent("onload", stInst);} else document.write("<div style='display:none'>");
