<!--

popWindow=null;
function open_window(url,width,height) {

        windowName="main";
        agent=navigator.appVersion;
        version=parseInt(agent);

        //figure out the top/left of the screen
        //taking the menu bar into consideration
        if (version>=4) {
                leftCorner=screen.width/6;
                topCorner=screen.height/4;
        }else{
                leftCorner=20;
                topCorner=20;
        }
        features=",screenX="+leftCorner+",screenY="+topCorner+",left="+leftCorner+",top="+topCorner;
        features=features+",titlebar=1";
        if (popWindow==null) {
                popWindow=open(url,windowName, "width="+width+",height="+height+ features);
                // for IE3, focus, closed, and opener doesn't work, so we have to tell
                // the window opened who's the opener
                if (version<3)
                        setTimeout("popWindow.mama=window",428);
        }else{
                if (version<3) {
                        popWindow.close();
                        popWindow=null;
                        setTimeout("open_window('"+url+"',"+width+","+height+")", 428);
                        setTimeout("popWindow.mama=window",598);
                }else if (!popWindow.closed){
                        popWindow.close();
                        popWindow=null;
                        setTimeout("open_window('"+url+"',"+width+","+height+")", 428);

                }else{
                        popWindow=null;
                        popWindow=open(url,windowName, "width="+width+",height="+height+features);
                }
        }
}
//-->
