﻿// JScript File

function newWindow(url, nameW) {

    var width;
    var height;

    var  nameTmp;
    nameTmp = nameW.toUpperCase();

    if (nameTmp == 'SEARCH') {
        width = 620;
        height = 795;
    }
    else if (nameTmp == 'VIEWPDF') {
        width = 800;
        height = 600;
    }
    else if (nameTmp == '3D') {
        width = 675;
        height = 475;
    }
    else if (nameTmp == 'ADPOPUP') {
        width = 750;
        height = 620;
    }
    else if (nameTmp == 'PDFCOVER') {
        width = 800;
        height = 600;
    }
    else if (nameTmp == 'MAP') {
        width = 859;
        height = 770;
    }
    else {
        width = 800;
        height = 600;
    }



    if (navigator.appVersion.indexOf('4') != -1) {
        // Vars for centering the new window on Version 4 Browsers
        xTop = screen.width / 2 - (width / 2);
        yTop = screen.height / 2 - (height / 2);
        nameW = window.open(url, nameW, 'height=' + height + ',width=' + width + ',scrollbars=0,resizable=1,menubar=0,toolbar=0,titlebar=0,status=0,location=0,directories=0,left=' + xTop + ',top=' + yTop + '');
    }
    else {
        nameW = window.open(url, nameW, 'height=' + height + ',width=' + width + ',scrollbars=0,resizable=1,menubar=0,toolbar=0,titlebar=0,status=0,location=0,directories=0,left=0,top=0');
    }

    if (nameW != null)
        nameW.focus();
}

function checkJavaScriptValidity() {
    //document.getElementById("jsEnabled").style.visibility = 'visible';
    //document.getElementById("jsDisabled").style.visibility = 'hidden';
}
