ie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4));

ie5 = ((navigator.appName == "Microsoft Internet Explorer") && (navigator.userAgent.indexOf("MSIE 5") != -1));

ie4Win = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4) && (navigator.userAgent.indexOf("Win")!=-1));

nn4 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4 ));

nn3 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 3 ));

nn = (nn3 || nn4);

var popupWin;
var xpos = 0;
var ypos = 0;
var wbody = 0;
var hbody = 0;

function openWin(url,winwidth,winheight,scroll,name) {
                        popWin(url,winwidth,winheight,scroll,name);
                }

function popWin(url,winwidth,winheight,scroll,name) {
        //var winwidth = winwidthnum;
        //var winheight = winheightnum;
        var scrollb = scroll
        var pageentry = url;
                screenWidth=screen.width;
                screenHeight=screen.height
                xpos= ((screenWidth/2)-(winwidth/2));
                ypos=((screenHeight/2)-(winheight/2));
                winname = name
                        if (winname == ""){
                                winname = "displayPopup";
                        }
                popupWinCount = 1;
                previousentry = url;

        if (nn4) {
                var winfeatures = "resizable=yes,menubar=no,scrollbars="+scrollb+",status=no,titlebar=no,toolbar=no,location=no,width="+winwidth+",height="+winheight+",screenX="+xpos+",screenY="+ypos;
                popupWin = window.open(pageentry,winname,winfeatures);
                popupWin.focus();
        }
        else if (ie4) {
                if (scrollb == 1) {
                winwidth = winwidth - 0;
                winwidth = winwidth + 17;
                }
                var winfeatures = "resizable=yes,menubar=no,scrollbars="+scrollb+",status=no,titlebar=no,toolbar=no,location=no,width="+winwidth+",height="+winheight+",left="+xpos+",top="+ypos;
                popupWin = window.open(pageentry,winname,winfeatures);
                //if(ie5) popupWin.focus();
                //alert('test');
                popupWin.focus();
        }
        else if (nn3) {
                var winfeatures = "resizable=1,menubar=0,scrollbars=1,width="+winwidth+",height="+winheight;
                popupWin = window.open(pageentry,winname,winfeatures);
                popupWin.focus();
        }
        else {
                var winfeatures = "resizable=0,menubar=0,scrollbars=0,width="+winwidth+",height="+winheight;
                popupWin = window.open(pageentry,winname,winfeatures);
        }
}

function rid(){
window.onblur
window.close()
}

