var agt=navigator.userAgent.toLowerCase();

    
    this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);

    this.nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    this.nav2 = (this.nav && (this.major == 2));
    this.nav3 = (this.nav && (this.major == 3));
    this.nav4 = (this.nav && (this.major == 4));
    this.nav4up = (this.nav && (this.major >= 4));
    this.navonly      = (this.nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    this.nav6 = (this.nav && (this.major == 5));
    this.nav6up = (this.nav && (this.major >= 5));
    this.gecko = (agt.indexOf('gecko') != -1);


    this.ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    this.ie3    = (this.ie && (this.major < 4));
    this.ie4    = (this.ie && (this.major == 4) && (agt.indexOf("msie 4")!=-1) );
    this.ie4up  = (this.ie  && (this.major >= 4));
    this.ie5    = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    this.ie5_5  = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.5") !=-1));
    this.ie5up  = (this.ie  && !this.ie3 && !this.ie4);
    this.ie5_5up =(this.ie && !this.ie3 && !this.ie4 && !this.ie5);
    this.ie6    = (this.ie && (this.major == 4) && (agt.indexOf("msie 6.")!=-1) );
    this.ie6up  = (this.ie  && !this.ie3 && !this.ie4 && !this.ie5 && !this.ie5_5);



    this.opera = (agt.indexOf("opera") != -1);
    this.opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
    this.opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
    this.opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
    this.opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
    this.opera5up = (this.opera && !this.opera2 && !this.opera3 && !this.opera4);





//--------------------------------

    if (this.nav) 	bigbrowser 	= "ne";
    if (this.nav2) 	browser 	= "ne2";
    if (this.nav3) 	browser 	= "ne3";
    if (this.nav4) 	browser 	= "ne4";    
    if (this.nav4up) 	browser 	= "ne4up";
    if (this.nav6) 	browser 	= "ne6";
    if (this.nav6up) 	browser 	= "ne6up";

    if (this.ie) 	bigbrowser 	= "ie";
    if (this.ie3) 	browser 	= "ie3";
    if (this.ie4) 	browser 	= "ie4";
    if (this.ie4up) 	browser 	= "ie4up";
    if (this.ie5) 	browser 	= "ie5"; 
    if (this.ie5_5) 	browser 	= "ie5_5"; 
    if (this.ie6) 	browser 	= "ie6"; 
    if (this.ie6up) 	browser 	= "ie6up"; 

    if (this.opera) 	bigbrowser 	= "opera";
    if (this.opera2) 	browser 	= "opera2";
    if (this.opera3) 	browser 	= "opera3";  
    if (this.opera4) 	browser 	= "opera4";
    if (this.opera5) 	browser 	= "opera5";
    if (this.opera5up) 	browser 	= "opera5up";

// ---------- fine browser sniffing -----------------




if (bigbrowser == "ne") {
aw = screen.width;
ah = screen.height;
}
if (bigbrowser == "ie") {
aw = screen.width;
ah = screen.height;

}
if (bigbrowser == "opera") {
aw = screen.width;
ah = screen.height;
}



function pop2(indirizzo,name,larg,alt,parscroll,parmenu,partool,parloc){


var url 	= indirizzo;
				
var nome	= name;
				
var largo800 	= larg;
				
var lungo800 	= alt;

var largo1024 	= larg ;
				
var lungo1024	= alt ;

var largo1280 	= larg ;
				
var lungo1280	= alt ;
				
var distx800 	= (800 - larg) / 2;
var distx800 	= Math.ceil(distx800)
				
var disty800 	= (600 - alt) / 2;
var disty800 	= Math.ceil(disty800)


var distx1024	=  (1024 - larg) / 2;
var distx1024	= Math.ceil(distx1024);

var disty1024	= (768 - alt) / 2;
var disty1024	= Math.ceil(disty1024);

var distx1280	=  (1280 - larg) / 2;
var distx1280	= Math.ceil(distx1280);

var disty1280	= (1024 - alt) / 2;
var disty1280	= Math.ceil(disty1280);

				
scroller 	= parscroll;
				
menu		= parmenu;

tool		= partool;
if (tool=='') tool = 'no'; 

loc		= parloc;
if (loc=='') loc = 'no';

	if (aw == 800 && bigbrowser == "ie") {
		window.open( url, nome, 'width=' + largo800 + ',' + 'height=' + lungo800 + ',' + 'left=' + distx800 + ',' + 'top=' + disty800 + ',' + 'scrollbars=' + scroller + ',' + 'menubar=' + menu + ',' + 'toolbar=' + tool + ',' + 'location=' + loc + ', resizable=1');
	}	

	if (aw == 1024 && bigbrowser == "ie") {
		window.open( url, nome, 'width=' + largo1024 + ',' + 'height=' + lungo1024 + ',' + 'left=' + distx1024 + ',' + 'top=' + disty1024 + ',' + 'scrollbars=' + scroller + ',' + 'menubar=' + menu + ',' + 'toolbar=' + tool + ',' + 'location=' + loc + ', resizable=1');
	}
	if (aw == 1280 && bigbrowser == "ie") {
		window.open( url, nome, 'width=' + largo1280 + ',' + 'height=' + lungo1280 + ',' + 'left=' + distx1280 + ',' + 'top=' + disty1280 + ',' + 'scrollbars=' + scroller + ',' + 'menubar=' + menu + ',' + 'toolbar=' + tool + ',' + 'location=' + loc + ', resizable=1');
	}
	
	if (aw == 800 && bigbrowser == "ne") {
		window.open( url, nome, 'width=' + largo800 + ',' + 'height=' + lungo800 + ',' + 'left=' + distx800 + ',' + 'top=' + disty800 + ',' + 'scrollbars=' + scroller + ',' + 'menubar=' + menu + ',' + 'toolbar=' + tool + ',' + 'location=' + loc + ', resizable=1');
	}	

	if (aw == 1024 && bigbrowser == "ne") {
		window.open( url, nome, 'width=' + largo1024 + ',' + 'height=' + lungo1024 + ',' + 'left=' + distx1024 + ',' + 'top=' + disty1024 + ',' + 'scrollbars=' + scroller + ',' + 'menubar=' + menu + ',' + 'toolbar=' + tool + ',' + 'location=' + loc + ', resizable=1');
	}
	if (aw == 1280 && bigbrowser == "ne") {
		window.open( url, nome, 'width=' + largo1280 + ',' + 'height=' + lungo1280 + ',' + 'left=' + distx1280 + ',' + 'top=' + disty1280 + ',' + 'scrollbars=' + scroller + ',' + 'menubar=' + menu + ',' + 'toolbar=' + tool + ',' + 'location=' + loc + ', resizable=1');
	}

	if (aw == 800 && bigbrowser == "opera") {
		window.open( url, nome, 'width=' + largo800 + ',' + 'height=' + lungo800 + ',' + 'left=' + distx800 + ',' + 'top=' + disty800 + ',' + 'scrollbars=' + scroller + ',' + 'menubar=' + menu + ',' + 'toolbar=' + tool + ',' + 'location=' + loc + ', resizable=1');
	}	

	if (aw == 1024 && bigbrowser == "opera") {
		window.open( url, nome, 'width=' + largo1024 + ',' + 'height=' + lungo1024 + ',' + 'left=' + distx1024 + ',' + 'top=' + disty1024 + ',' + 'scrollbars=' + scroller + ',' + 'menubar=' + menu + ',' + 'toolbar=' + tool + ',' + 'location=' + loc + ', resizable=1');
	}
	}
	if (aw == 1280 && bigbrowser == "opera") {
		window.open( url, nome, 'width=' + largo1280 + ',' + 'height=' + lungo1280 + ',' + 'left=' + distx1280 + ',' + 'top=' + disty1280 + ',' + 'scrollbars=' + scroller + ',' + 'menubar=' + menu + ',' + 'toolbar=' + tool + ',' + 'location=' + loc + ', resizable=1');

}