/*
  Use inside the HTML anchor element as in the following example:
  <a href="index.html" onclick="windowOpener(this.href,800,600,'window'); return false;">
     this.href = JavaScript object that takes the URL specified in the href=""
     800 = width
     600 = height
     'window' = Name of the new browser window
  All other values are set to "no" by default, if needed add them to the string.
*/

function windowOpener(url,width,height,name,scrolls,resizeable,toolbar,location,directories,status,menubar) {
            browserName = navigator.appName;
            browserVer = navigator.appVersion.substring(0,1);
            if (width==null) {width=600;}
            if (height==null) {height=400;}
            if (name==null) {name="globaltPopup"}
            if (scrolls==true) {
                        scrollsOption="yes";
            } else {
                        scrollsOption="no";
            }
            if (location==true) {
                        locationOption="yes";
            } else {
                        locationOption="no";
            }
            if (resizeable==true) {
                        resizeableOption="yes";
            } else {
                        resizeableOption="no";
            }
            if (toolbar==true) {
                        toolbarOption="yes";
            } else {
                        toolbarOption="no";
            }
            if (directories==true) {
                        directoriesOption="yes";
            } else {
                        directoriesOption="no";
            }
            if (status==true) {
                        statusOption="yes";
            } else {
                        statusOption="no";
            }
            if (menubar==true) {
                        menubarOption="yes";
            } else {
                        menubarOption="no";
            }
            var topPx = (browserName=="Netscape")?"screenX":"top";
            var leftPx = (browserName=="Netscape")?"screenY":"left";
            if (browserName != "Netscape" || browserVer != 2) {
                        controlWindow=window.open(url,name,"toolbar="+toolbarOption+",height="+height+",width="+width+",location="+locationOption+",directories="+directoriesOption+",status="+statusOption+",menubar="+menubarOption+",scrollbars="+scrollsOption+",resizable="+resizeableOption+","+leftPx+"=0,"+topPx+"=0");
            }
}


