function isForm() {

    var agt=navigator.userAgent.toLowerCase()

    this.major = parseInt(navigator.appVersion)

    this.win   = (agt.indexOf("win")!=-1)

    this.mac    = (agt.indexOf("mac")!=-1)

    this.nav  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible')==-1)))

    this.nav3 = (this.nav && (this.major == 3))

    this.nav4 = this.nav && (this.major == 4)

    this.nav6 = this.nav && (this.major >= 5)

    this.ie   = (agt.indexOf("msie") != -1)

    this.ie3  = (this.ie && (this.major == 2))

    this.ie4n5  = this.ie  && (this.major == 4)

    this.ie5up = this.ie  && (this.major >= 5)

 }



var isForm;

isForm = new isForm();





function popup(page,xx,yy) {



            if (self.screen) { 

            sw = screen.width

            sh = screen.height

            w = xx;h=yy;

            if (isForm.win && isForm.nav4) {w = xx;h=yy;}

			else if (isForm.win && isForm.ie4n5) {w = xx;h=yy;} 

			else if (isForm.win && isForm.ie5up) {w = xx;h=yy;} 

			else if (isForm.mac && isForm.nav) {w = xx;h=yy;} 

			else if (isForm.mac && isForm.nav6) {w = xx;h=yy;} 

			else if (isForm.mac && isForm.ie4n5) {w = xx-16;h=yy-16;} 

			else if (isForm.mac && isForm.ie5up) {w = xx-16;h=xx-16;} 

			 

			cx = (.5*sw) - (w*.5)

			cy = (.5*sh) - (h*.5)

                var  dimentions_and_such = 'status=no,width='+w+','+'height='+h+',' + 'screenX=' +cx+','+'screenY='+cy+','+'left='+cx+','+'top='+cy

            }



 Pop=window.open(page,"x",dimentions_and_such);   

}
