﻿// _bf_Browser is declare in initial.ashx
// BeanFunBlockParams is declare in initial.ashx
if (_bf_IsInitOK) 
{
    if (BeanFunBlockParams.SupportedBrowsers[_bf_Browser] != null) 
    {
        if (_bf_Browser == "IE") 
        {
            document.write("<object id='objAdapter' width='0' height='0' " +
                "classid='clsid:708BFDA5-5B56-435B-8227-726021E197E9' " +
                "codebase='" + _bf_BaseUrl + "embeds/BFServiceAdapter.cab#Version=" + BeanFunBlockParams.ActiveXVersion + "' style='display:none;'></object>");
            document.write("<scr" + "ipt type='text/javascript' for='objAdapter' event='OnResult(command_id, serial_num, param_str)'>" +
                "BeanFunBlock.HandleOnResult(command_id, serial_num, param_str);</scr" + "ipt>\n");
        }
        else
        {
            document.write("<embed id='objAdapter' width='0' height='0' type='" + BeanFunBlockParams.PluginsMimeType + "' onresult='BeanFunBlock.HandleOnResult' />");
        }
    }
    else 
    {
        // Let BeanFunBlock.Init() show the _bf_LangT.UnsupportedBrowser message inside the beanfun! block.
    }
}
