//Code for centering the window in IE
IEHorizontal = (screen.width - 660) / 2;
IEVertical = (screen.height - 420) / 2;

//function test() {
//mytop = document.body.clientHeight;
//alert(mytop);
//}

//Netscape
oa_horizontal = 0;
oa_vertical = 0;
oa_horizontal = 165;
oa_vertical = ((window.outerHeight - window.innerHeight) + 140);

function openActivity(file) {
        if ((navigator.userAgent.indexOf("MSIE")!=-1) && !((navigator.appVersion.indexOf("3.") != -1) || (navigator.appVersion.indexOf("2.") != -1))) {
                windOptions = "toolbar=0,location=0,directories=0,status=0," +
                "menubar=0,scrollbars=0,resizable=0,width=660,height=420," +
                "top=" + IEVertical + ",left=" + IEHorizontal;
        } else if ((navigator.userAgent.indexOf("Mozilla")!=-1) && !((navigator.appVersion.indexOf("3.") != -1) || (navigator.appVersion.indexOf("2.") != -1))) {
                windOptions = "toolbar=0,location=0,directories=0,status=0," +
                "menubar=0,scrollbars=0,resizable=0,width=660,height=420," +
                "screenY=" + oa_vertical + ",screenX=" + oa_horizontal;
        } else {
                windOptions = "toolbar=0,location=0,directories=0,status=0," +
                "menubar=0,scrollbars=0,resizable=0,width=660,height=420";
        }

        newWindow = window.open("","0",windOptions);
        newWindow.location.href= file;
        newWindow.focus();
}
