// Copyright © 2008 Formative Innovations Inc. All Rights Reserved.
// The content contained within this file is both confidential and privileged. 
// You are hereby notified that any review, retransmission, conversion to hard copy, copying, circulation
// or other use of the content contained within this file is strictly prohibited.

































































































function DetectBrowser() {

    var result = "other";

    try {
        var agent = navigator.userAgent.toLowerCase();

        if (agent.indexOf("msie") != -1) {

            result = "msie";
        }
        else if (agent.indexOf("firefox") != -1) {

            result = "firefox";
        }
        else if (agent.indexOf("opera") != -1) {

            result = "opera";
        }
        else if (agent.indexOf("safari") != -1) {

            result = "safari";
        }
    }
    catch (Exception) {
        alert('DetectBrowser() Exception: ' + Exception.description);
    }

    return result;
}



























































































function PopUpWindow(url, width, height, options) {
    try {
        if (options == '' || !/^(scroll|resize|both)$/.test(options)) {
            options = 'both';
        }

        var win = window.open(url, '', 'width=' + width + ', height=' + height + ', scrollbars=' + (/^(scroll|both)$/.test(options) ? 'yes' : 'no') + ', resizeable=' + (/^(resize|both)$/.test(options) ? 'yes' : 'no') + ', status=no, toolbar=no, menubar=no, location=no');
        return win;
    }
    catch (Exception) {
        alert('PopUpWindow() Exception: ' + Exception.description);
    }
}











































function DetectPlatform() {

    var result = "other";

    try {
        var app_version = navigator.appVersion.toLowerCase();

        if (app_version.indexOf("win") != -1) {
            result = "win";
        }
        else if (app_version.indexOf("mac") != -1) {
            result = "mac";
        }
    }
    catch (Exception) {
        alert('DetectPlatform() Exception: ' + Exception.description);
    }

    return result;
}



