// EMSL Public Javascript

//Globals - None right now

//Functions

function captureClick(url) {
    newWindow(url);
    return false;
}

function newWindow(url) {
    nw=window.open(url, "emslWindow", "scrollbars,toolbar,menubar,location,status,resizable,width=750,height=450");

    /* Bug workaround for Netscape 2 on Unix and Mac - we aren't supporting Netscape v2, and Netscape 3 doesn't like it
    if(parseInt(navigator.appVersion) == 2 && navigator.appName == 'Netscape') {
        nw=window.open(url, "emslWindow", "scrollbars,toolbar,menubar,location,status,resizable,width=750,height=450");
    }*/
    if(parseInt(navigator.appVersion) >= 4) {
        var nwLeft = (screen.availWidth - 750) / 2;
        var nwTop = (screen.availHeight - 450) / 2;

        if(parseInt(navigator.appVersion) > 4) {
            moveWindow(nw, nwLeft, nwTop);
        }
    }
    nw.focus();
}

function moveWindow(newWindow, windowLeft, windowTop) {
    try {
        newWindow.moveTo(windowLeft,windowTop);
    }
    catch (e) {
        //alert("Exception Caught!");
    }
}

// End of JavaScript