﻿function openAWindow( pageToLoad,ime, width, height, center) {
/* Opens a new window named "secondary" on the users desktop.
Arguments:
                pageToLoad - The URL of a page to load in the browser window.
                                         This can be a relative URL or fully qualified.
                width -          The horizontal size of the new window.
                height -         The vertical size of the new window.
                center -     toggle centering on 4.0 browsers.
                                         1=centered window 0=no centering

                Values in the "args" section below can all be toggled in the
                same fashion as the center toggle.  Just modify the appropriate
                value in the args section to be either 0 or 1.
                
                A call to this function might look like this:
                <a href="javascript:openAWindow('ice.html',375,250,1)">Ice</a>

                Created by Glenn Davis of Project Cool, Inc. for general use.  If
                you use this routine please leave all comments in place so that
                others may benefit as well.
                */
                                         
        xposition=0; yposition=0;
        if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
                xposition = (screen.width - width) / 2;
                yposition = 0;
        }
        args = "width=" + width + "," 
        + "height=" + screen.height + "," 
        + "location=0," 
        + "menubar=0,"
        + "resizable=1,"
        + "scrollbars=1,"
        + "status=0," 
        + "titlebar=0,"
        + "toolbar=0,"
        + "hotkeys=0,"
        + "screenx=" + xposition + ","  //NN Only
        + "screeny=" + yposition + ","  //NN Only
        + "left=" + xposition + ","     //IE Only
        + "top=" + yposition;           //IE Only

        window.open( pageToLoad,ime,args );
}		


