// JScript File

var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
	browser = "Konqueror";
	OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari"
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "an unknown operating system";
}

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

function updateKP ( fileid, process )
{
    var url = "../ModalFrame.aspx?Page=Databases/KnownProgramUpdate.aspx";
    if ( browser == 'Internet Explorer' ){
        if (fileid != null && process != null) {
            url = url + "**x**FileID=" + fileid + "**y**Process=" + process;
        }
        window.showModalDialog(url,",", " dialogHeight:650px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
        
    }else{
        if (fileid != null && process != null)
            url = url + "**x**FileID=" + fileid + "**y**Process=" + process;
            window.open(url,'winName','width=800,height=650,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no');
    }
}
function blockKP ( fileid, process )
{
    var url = "../ModalFrame.aspx?Page=Reports/saProgramUpdate.aspx";
    if ( browser == 'Internet Explorer' ){
        if (fileid != null && process != null) {
            url = url + "**x**FileID=" + fileid + "**y**Process=" + process + "**y**action=block";
        }
        window.showModalDialog(url,",", " dialogHeight:300px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
        
    }else{
        if (fileid != null && process != null)
            url = url + "**x**FileID=" + fileid + "**y**Process=" + process + "**y**action=block";
            window.open(url,'winName','width=800,height=300px,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no');
    }
}
function allowKP ( fileid, process )
{
    var url = "../ModalFrame.aspx?Page=Reports/saProgramUpdate.aspx";
    if ( browser == 'Internet Explorer' ){
        if (fileid != null && process != null) {
            url = url + "**x**FileID=" + fileid + "**y**Process=" + process + "**y**action=allow";
        }
        window.showModalDialog(url,",", " dialogHeight:300px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
        
    }else{
        if (fileid != null && process != null)
            url = url + "**x**FileID=" + fileid + "**y**Process=" + process + "**y**action=allow";
            window.open(url,'winName','width=800,height=300px,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no');
    }
}
function allowDirectory ( processDirectory )
{
    var url = "../ModalFrame.aspx?Page=Reports/saProgramDirectoryUpdate.aspx";
    if ( browser == 'Internet Explorer' ){
        if (processDirectory != null) {
            url = url + "**x**processDirectory=" + processDirectory + "**y**action=allow";
        }
        window.showModalDialog(url,",", " dialogHeight:300px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
        
    }else{
        if (processDirectory != null)
            url = url + "**x**processDirectory=" + processDirectory + "**y**action=allow";
            window.open(url,'winName','width=800,height=300px,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no');
    }
}
function blockDirectory ( processDirectory )
{
    var url = "../ModalFrame.aspx?Page=Reports/saProgramDirectoryUpdate.aspx";
    if ( browser == 'Internet Explorer' ){
        if (processDirectory != null) {
            url = url + "**x**processDirectory=" + processDirectory + "**y**action=block";
        }
        window.showModalDialog(url,",", " dialogHeight:300px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
        
    }else{
        if (processDirectory != null)
            url = url + "**x**processDirectory=" + processDirectory + "**y**action=block";
            window.open(url,'winName','width=800,height=300px,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no');
    }
}
function allowPC ( pc, name )
{
    var url = "../ModalFrame.aspx?Page=Reports/saProgramPCUpdate.aspx";
    if ( browser == 'Internet Explorer' ){
        if (pc != null) {
            url = url + "**x**computer=" + pc + "**y**computername=" + name + "**y**action=allow";
        }
        window.showModalDialog(url,",", " dialogHeight:300px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
        
    }else{
        if (pc != null)
            url = url + "**x**computer=" + pc + "**y**computername=" + name + "**y**action=allow";
            window.open(url,'winName','width=800,height=300px,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no');
    }
}
function blockPC ( pc, name )
{
    var url = "../ModalFrame.aspx?Page=Reports/saProgramPCUpdate.aspx";
    if ( browser == 'Internet Explorer' ){
        if (pc != null) {
            url = url + "**x**computer=" + pc + "**y**computername=" + name + "**y**action=block";
        }
        window.showModalDialog(url,",", " dialogHeight:300px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
        
    }else{
        if (pc != null)
           url = url + "**x**computer=" + pc + "**y**computername=" + name + "**y**action=block";
            window.open(url,'winName','width=800,height=300px,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no');
    }
}
function allowVKP ( fileid, process, virus )
{
    var url = "../ModalFrame.aspx?Page=Reports/saProgramUpdate.aspx";
    if ( browser == 'Internet Explorer' ){
        if (fileid != null && process != null) {
            url = url + "**x**FileID=" + fileid + "**y**Process=" + process + "**y**action=allow**y**virus=" + virus;
        }
        window.showModalDialog(url,",", " dialogHeight:300px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
        
    }else{
        if (fileid != null && process != null)
            url = url + "**x**FileID=" + fileid + "**y**Process=" + process + "**y**action=allow**y**virus=" + virus;
            window.open(url,'winName','width=800,height=300px,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no');
    }
}
//Sized
function updatePL( name ){
    var url = "../ModalFrame.aspx?Page=Policies/PolicyUpdate.aspx";
    
    if ( browser == 'Internet Explorer' ){
        if (name != null)
            url = url + "**x**Name=" + name;
            window.showModalDialog(url,",", " dialogHeight:620px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (name != null)
            url = url + "**x**Name=" + name;
            var oWidth = 800;
            var oHeight = 620;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateBP ( process )
{
    var url = "../ModalFrame.aspx?Page=Databases/BannedProgramUpdate.aspx";

    if ( browser == 'Internet Explorer' ){
        if (process != null)
            url = url + "**x**Process=" + process;
            window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (process != null)
            url = url + "**x**Process=" + process;
            var oWidth = 750;
            var oHeight = 560;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateDM ( domain, QualityStats, CategoryNumber )
{
    var url = "../ModalFrame.aspx?Page=Databases/DomainUpdate.aspx";

    if ( browser == 'Internet Explorer' ){
        if (domain != null)
            url = url + "**x**Domain=" + domain;
        if (QualityStats != null)
            url = url + "**y**Quality=true";
        if (CategoryNumber != null)
            url = url + "**y**CategoryNumber=" + CategoryNumber;
            window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (domain != null)
            url = url + "**x**Domain=" + domain;
        if (QualityStats != null)
            url = url + "**y**Quality=true";
        if (CategoryNumber != null)
            url = url + "**y**CategoryNumber=" + CategoryNumber;
            var oWidth = 750;
            var oHeight = 560;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateIP ( ip, QualityStats, CategoryNumber )
{
    var url = "../ModalFrame.aspx?Page=Databases/IPUpdate.aspx";

    if ( browser == 'Internet Explorer' ){
        if (ip != null)
            url = url + "**x**IP=" + ip;
        if (QualityStats != null)
            url = url + "**y**Quality=true";
        if (CategoryNumber != null)
            url = url + "**y**CategoryNumber=" + CategoryNumber;
            window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (ip != null)
            url = url + "**x**IP=" + ip;
        if (QualityStats != null)
            url = url + "**y**Quality=true";
        if (CategoryNumber != null)
            url = url + "**y**CategoryNumber=" + CategoryNumber;
            var oWidth = 750;
            var oHeight = 560;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateURL ( urlin, QualityStats, CategoryNumber )
{
    var url = "../ModalFrame.aspx?Page=Databases/URLUpdate.aspx";
    
    if ( browser == 'Internet Explorer' ){
        if (urlin != null)
            url = url + "**x**URLName=" + urlin;
        if (QualityStats != null)
            url = url + "**y**Quality=true";
        if (CategoryNumber != null)
            url = url + "**y**CategoryNumber=" + CategoryNumber;
            window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (urlin != null)
            url = url + "**x**URLName=" + urlin;
        if (QualityStats != null)
            url = url + "**y**Quality=true";
        if (CategoryNumber != null)
            url = url + "**y**CategoryNumber=" + CategoryNumber;
            var oWidth = 750;
            var oHeight = 560;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateDS ( name )
{
    var url = "../ModalFrame.aspx?Page=Databases/DisinfectScriptsUpdate.aspx";

    if ( browser == 'Internet Explorer' ){
        if (name != null)
            url = url + "**x**Name=" + name;
            window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (name != null)
            url = url + "**x**Name=" + name;
            var oWidth = 750;
            var oHeight = 560;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateIR ( name )
{
    var url = "../ModalFrame.aspx?Page=Databases/IntrusionRuleUpdate.aspx";

    if ( browser == 'Internet Explorer' ){
        if (name != null)
            url = url + "**x**Name=" + name;
            window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (name != null)
            url = url + "**x**Name=" + name;
            var oWidth = 750;
            var oHeight = 560;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateRC ( key, valname )
{
    var url = "../ModalFrame.aspx?Page=Databases/RegistryControlUpdate.aspx";

    if ( browser == 'Internet Explorer' ){
        if (key != null && valname != null)
            url = url + "**x**Key=" + key + "**y**ValName=" + valname;
            window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (key != null && valname != null)
            url = url + "**x**Key=" + key + "**y**ValName=" + valname;
            var oWidth = 750;
            var oHeight = 560;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateRS ( appname )
{
    var url = "../ModalFrame.aspx?Page=Databases/RequiredSoftwareUpdate.aspx";

    if ( browser == 'Internet Explorer' ){
        if (appname != null)
            url = url + "**x**AppName=" + appname;
            window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (appname != null)
            url = url + "**x**AppName=" + appname;
            var oWidth = 750;
            var oHeight = 560;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateSK ( keywords )
{
    var url = "../ModalFrame.aspx?Page=Databases/SearchKeywordUpdate.aspx";

    if ( browser == 'Internet Explorer' ){
        if (keywords != null)
            url = url + "**x**Keywords=" + keywords;
            window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (keywords != null)
            url = url + "**x**Keywords=" + keywords;
            var oWidth = 750;
            var oHeight = 560;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateSP ( name )
{
    var url = "../ModalFrame.aspx?Page=Tools/SpamWizard.aspx";

    if ( browser == 'Internet Explorer' ){
        if (name != null)
            url = url + "**x**Name=" + name;
            window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (name != null)
            url = url + "**x**Name=" + name;
            var oWidth = 750;
            var oHeight = 560;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateSPE ( name )
{
    var url = "../ModalFrame.aspx?Page=Tools/SpamWizard.aspx";

    if ( browser == 'Internet Explorer' ){
        if (name != null)
            url = url + "**x**Action=Edit**y**Name=" + name;
        window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (name != null)
            url = url + "**x**Action=Edit**y**Name=" + name;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateVS ( name )
{
    var url = "../ModalFrame.aspx?Page=Databases/VirusSignaturesUpdate.aspx";

    if ( browser == 'Internet Explorer' ){
        if (name != null)
            url = url + "**x**Name=" + name;
            window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (name != null)
            url = url + "**x**Name=" + name;
            var oWidth = 750;
            var oHeight = 560;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateCAT ( number )
{
    var url = "../ModalFrame.aspx?Page=Databases/CategoryUpdate.aspx";

    if ( browser == 'Internet Explorer' ){
        if (number != null)
            url = url + "**x**CategoryNumber=" + number;
            window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (number != null)
            url = url + "**x**CategoryNumber=" + number;
            var oWidth = 750;
            var oHeight = 560;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function deleteCAT( number ){
    var url = "../ModalFrame.aspx?Page=Databases/CategoryDeleteWarning.aspx";

    if ( browser == 'Internet Explorer' ){
        if (number != null)
            url = url + "**x**CategoryNumber=" + number;
            window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (number != null)
            url = url + "**x**CategoryNumber=" + number;
            var oWidth = 750;
            var oHeight = 560;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateSRC( number ){
    var url = "../ModalFrame.aspx?Page=Databases/SourceUpdate.aspx";

    if ( browser == 'Internet Explorer' ){
        if (number != null)
            url = url + "**x**Number=" + number;
            window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (number != null)
            url = url + "**x**Number=" + number;
            var oWidth = 750;
            var oHeight = 560;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function backupDB( ){
    var url = "../ModalFrame.aspx?Page=Databases/StatisticsBackupWarning.aspx";

    if ( browser == 'Internet Explorer' ){
        window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        var oWidth = 750;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}
//Sized
function updateRU( number ){
    var url = "../ModalFrame.aspx?Page=Tools/RestrictedUsersUpdate.aspx";

    if ( browser == 'Internet Explorer' ){
        if (number != null)
            url = url + "**x**IDN=" + number;
            window.showModalDialog(url,",", " dialogHeight:480px; dialogWidth:500px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (number != null)
            url = url + "**x**IDN=" + number;
            var oWidth = 750;
            var oHeight = 600;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateSR( number ){
    var url = "../ModalFrame.aspx?Page=Tools/ScheduledReportsUpdate.aspx";

    if ( browser == 'Internet Explorer' ){
        if (number != null)
            url = url + "**x**IDN=" + number;
            window.showModalDialog(url,",", " dialogHeight:600px; dialogWidth:800px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (number != null)
            url = url + "**x**IDN=" + number;
            var oWidth = 750;
            var oHeight = 600;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}
//Sized
function updateMP( number ){
    var url = "../ModalFrame.aspx?Page=Tools/MonitoringServerPriorityUpdate.aspx";

    if ( browser == 'Internet Explorer' ){
        if (number != null)
            url = url + "**x**IDN=" + number;
            window.showModalDialog(url,",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        if (number != null)
            url = url + "**x**IDN=" + number;
            var oWidth = 750;
            var oHeight = 560;
            window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function updateEVL(number) {
    var url = "../ModalFrame.aspx?Page=Reports/svUpdate.aspx";

    if (browser == 'Internet Explorer') {
        if (number != null)
            url = url + "**x**VideoID=" + number;
        window.showModalDialog(url, ",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    } else {
        if (number != null)
            url = url + "**x**VideoID=" + number;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url, 'winName', 'width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

//Sized
function addToMailList( link ){
    var url = "../ModalFrame.aspx?Page=Properties/" + link;

    if ( browser == 'Internet Explorer' ){
        if (link != null)
            url = url;
            window.showModalDialog(url,",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        url = url;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

//Sized
function forwardMail( spamID, email ){
    var url = "../ModalFrame.aspx?Page=Properties/SpamMailForward.aspx";

    if ( browser == 'Internet Explorer' ){
        if (spamID != null)
            url = url + "**x**SpamID=" + spamID + "**y**email=" + email;
            window.showModalDialog(url,",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        url = url + "?SpamID=" + spamID + "**y**email=" + email;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

//Sized
function retrieveEmail( DocID, email ){
    var url = "../ModalFrame.aspx?Page=Properties/maRetrieveEmail.aspx";

    if ( browser == 'Internet Explorer' ){
        if (DocID != null){
            url = url + "**x**DocID=" + DocID + "**y**email=" + email;
            window.showModalDialog(url,",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");}
    }else{
        url = url + "?DocID=" + DocID + "**y**email=" + email;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

//Sized
function forwardMailByFile( file, email ){
    var url = "../ModalFrame.aspx?Page=Properties/SpamMailForward.aspx";

    if ( browser == 'Internet Explorer' ){
        if (file != null)
            url = url + "**x**File=" + file + "**y**email=" + email;
            window.showModalDialog(url,",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        url = url + "?File=" + file + "**y**email=" + email;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

//////////////////////////////////////////
//
//  TOOLS > SYSTEM SETUP TOOLS MODALS
//
//////////////////////////////////////////

function ssAddServerToWindowsDomain(){
    var url = "../ModalFrame.aspx?Page=Tools/ssAddServerToWindowsDomain.aspx";

    if ( browser == 'Internet Explorer' ){
        url = url;
        window.showModalDialog(url,",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        url = url;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function ssChangeAdminPassword(){
    var url = "../ModalFrame.aspx?Page=Tools/ssChangeAdminPassword.aspx";

    if ( browser == 'Internet Explorer' ){
        url = url;
        window.showModalDialog(url,",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        url = url;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function ssConfigureNovellLDAPAuth(){
    var url = "../ModalFrame.aspx?Page=Tools/ssConfigureNovellLDAPAuth.aspx";

    if ( browser == 'Internet Explorer' ){
        url = url;
        window.showModalDialog(url,",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        url = url;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function ssEditContentDatabaseSharing(){
    var url = "../ModalFrame.aspx?Page=Tools/ssEditContentDatabaseSharing.aspx";

    if ( browser == 'Internet Explorer' ){
        url = url;
        window.showModalDialog(url,",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        url = url;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function ssEditSupportContactInfo(){
    var url = "../ModalFrame.aspx?Page=Tools/ssEditSupportContactInfo.aspx";

    if ( browser == 'Internet Explorer' ){
        url = url;
        window.showModalDialog(url,",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        url = url;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function ssInterfaceAndTcpIpSettings(){
    var url = "../ModalFrame.aspx?Page=Tools/ssInterfaceAndTcpIpSettings.aspx";

    if ( browser == 'Internet Explorer' ){
        url = url;
        window.showModalDialog(url,",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        url = url;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function ssLicenseServer(){
    var url = "../ModalFrame.aspx?Page=Tools/ssLicenseServer.aspx";

    if ( browser == 'Internet Explorer' ){
        url = url;
        window.showModalDialog(url,",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        url = url;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function ssLicenseFeature(){
    var url = "../ModalFrame.aspx?Page=Tools/ssLicenseFeature.aspx";

    if ( browser == 'Internet Explorer' ){
        url = url;
        window.showModalDialog(url,",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        url = url;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function ssRenameServer(){
    var url = "../ModalFrame.aspx?Page=Tools/ssRenameServer.aspx";

    if ( browser == 'Internet Explorer' ){
        url = url;
        window.showModalDialog(url,",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        url = url;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function Limiter(query){
    var url = "../ModalFrame.aspx?Page=Properties/Limiter.aspx";

    if ( browser == 'Internet Explorer' ){
        var newquery = query.replace(/&/g, "**y**");
        url = url + '**x**' + newquery;
        window.showModalDialog(url,",", " dialogHeight:640px; dialogWidth:450px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        url = url + '?' + query;
        var oWidth = 450;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

function Priority(query){
    var url = "../ModalFrame.aspx?Page=Properties/Priority.aspx";

    if ( browser == 'Internet Explorer' ){
        var newquery = query.replace(/&/g, "**y**");
        url = url + '**x**' + newquery;
        window.showModalDialog(url,",", " dialogHeight:580px; dialogWidth:450px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }else{
        url = url + '?' + query;
        var oWidth = 450;
        var oHeight = 560;
        window.open(url,'winName','width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}



function showMailFile(mailFile)
{
    var url = "../ModalFrame.aspx?Page=Properties/ViewMailFile.aspx";

    var strFilename = mailFile.replace(/\+/g, "%2B");

    if (browser == 'Internet Explorer')
    {
        url = url + "**x**filename=" + strFilename;
        window.showModalDialog(url, ",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }
    else
    {
        url = url + "?filename=" + strFilename;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url, 'winName', 'width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}




function showMailFileAsHtml(mailFile)
{
    var url = "../ModalFrame.aspx?Page=Properties/ViewMailFile.aspx";

    if (browser == 'Internet Explorer')
    {
        url = url + "**x**displayOption=html" + "**y**filename=" + mailFile;
        window.showModalDialog(url, ",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }
    else
    {
        url = url + "?displayOption=html" + "**y**filename=" + mailFile;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url, 'winName', 'width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}



function showMailFileAsText(mailFile)
{
    var url = "../ModalFrame.aspx?Page=Properties/ViewMailFile.aspx";

    if (browser == 'Internet Explorer')
    {
        url = url + "**x**displayOption=text" + "**y**filename=" + mailFile;
        window.showModalDialog(url, ",", " dialogHeight:580px; dialogWidth:750px; center:Yes; help:No; resizable:No; status:No; scroll:Yes;");
    }
    else
    {
        url = url + "?displayOption=text" + "**y**filename=" + mailFile;
        var oWidth = 750;
        var oHeight = 560;
        window.open(url, 'winName', 'width=' + oWidth + ',height=' + oHeight + ',left=' + ((screen.width - oWidth) / 2) + ',top=' + ((screen.height - oHeight) / 2 - 40) + ',menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes');
    }
}

