//
// sysCheck.js
//

// determine afterCheckURL

function getAfterCheckURL()
{
        var afterCheckURL, tmp2, tmp3;
        var tmp = '';
        tmp += window.location;
        if ( tmp.indexOf( 'afterCheckURL' ) == -1 )
            afterCheckURL = '/bca/user/frontPorch';
        else
        {
            tmp2 = tmp.split( 'afterCheckURL=' );
            if ( tmp2[1].indexOf( '&' ) != -1 )
            {
                tmp3 = tmp2[1].split( '&' );
                afterCheckURL = unescape( tmp3[0] );
            }
            else
                afterCheckURL = unescape( tmp2[1] );
        }
        return afterCheckURL;
}

function detectNS_(ClassID, name) 
{
    var returnName = "";
    var mimeTypes = navigator.mimeTypes;
    if ((mimeTypes != null) && (mimeTypes[ClassID] != null) && (mimeTypes[ClassID].enabledPlugin != null))
    {
        returnName = name;
    }                
    return returnName;
}

function detectIE_(ClassID, name) 
{
    result = false;
    document.write('<SCRIPT LANGUAGE=VBScript>\n on error resume next \n result = IsObject(CreateObject("' + ClassID + '"))</SCRIPT>\n');
    if (result) 
        return name+',';
    else 
        return '';
}

// Determines whether an object is a window object (or at least an object for which
// the document property is defined)
function isWindow(object)
{
    return object && (object != null) && (typeof(object.document) != 'undefined');
}   

