function checkIE8()
{
    var rv = -1; // Return value assumes failure
    
    if (navigator.appName == 'Microsoft Internet Explorer')
    {
        var ua = navigator.userAgent.toLowerCase();
        if( ua.indexOf('trident/4.0') != -1 )
        {
            rv = 1;
        }
        else
        {
            rv = 0;
        }
    }
        
    return rv;
}

document.write('<!-- ScriptX.cab install -->');
if( checkIE8() == 1 ) 
    document.write('<OBJECT ID="factory" viewastext CLASSID="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" CODEBASE="'+location.protocol+'//'+location.host+'/activeX/print/smsx.cab#Version=6,3,436,32" STYLE="display:none"></OBJECT>');
else
    document.write('<OBJECT ID="factory" viewastext CLASSID="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" CODEBASE="'+location.protocol+'//'+location.host+'/activeX/print/ScriptX.cab#Version=6,1,429,14" STYLE="display:none"></OBJECT>');
