function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

if (window.screen) {
 	aW=screen.availWidth;
 	aH=screen.availHeight;
} else {
aW=800;
aH=600;
}

function screen_init() {
if (window.screen) {
 		window.moveTo(0, 0);

if (navigator.appName=="Netscape") {
window.outerWidth = aW;
window.outerHeight = aH;
} else {     
window.resizeTo(aW, aH);
}
    	}
}

function BrowserCheck() {
        var agt=navigator.userAgent.toLowerCase()
        var b = navigator.appName
        this.win   = (agt.indexOf("win")!=-1)
        this.mac    = (agt.indexOf("mac")!=-1)
        if (b=="Netscape") this.b = "ns"
        else if (b=="Microsoft Internet Explorer") this.b = "ie"
        else this.b = b
        this.v = parseInt(navigator.appVersion)
        this.ns = (this.b=="ns" && this.v>=4)
        this.ns4 = (this.b=="ns" && this.v==4)
        this.ns5 = (this.b=="ns" && this.v==5)
        this.ie = (this.b=="ie" && this.v>=4)
        this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0)
        this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0)
        if (this.ie5) this.v = 5
        this.min = (this.ns||this.ie)
}

// automatically create the "is" object
isBrowser = new BrowserCheck()

function popup(page,theW,theH) { 
            if (self.screen) { 
            if (isBrowser.mac && isBrowser.ie5) {
               offsetX=16;
               offsetY=16;
            } else {
               offsetX=0;
               offsetY=0;
            }
            sw = screen.width
            sh = screen.height
			w = theW-offsetX // to center: use desired width
			h = theH-offsetY // to center: use desired height
			cx = (.5*sw) - (w*.5)
			cy = (.5*sh) - (h*.5)
                var  dimentions_and_such = 'status=yes,directories=yes,scrolling=yes,scrollbars=yes, menubar=yes,location=yes,tools=yes,resizable=no,width='+w+','+'height='+h+',' + 'screenX=' +cx+','+'screenY='+cy+','+'left='+cx+','+'top='+cy
            }

//ushtml=window.open(page,"",dimentions_and_such);
//   ushtml.focus();

ushtml=window.open(page,"");
   ushtml.focus();
}


