//Code for centering the window
//horizontal = (screen.width - 200) / 2;
//vertical = (screen.height - 300) / 2;
arHorizontal = (screen.width - 211)
arVertical = 0;

function openAR(file,arHeight) {
        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=1,width=200,height=" + arHeight + 
                ",top=" + arVertical + ",left=" + arHorizontal;
        } 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=1,width=200,height=" + arHeight + 
                ",screenY=" + arVertical + ",screenX=" + arHorizontal;
        } else {
                windOptions = "toolbar=0,location=0,directories=0,status=0," +
                "menubar=0,scrollbars=0,resizable=1,width=200,height=300";
        }

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