
function CJL_BrowserSniffer() {
   	var ua = navigator.userAgent;	
   	this.isOpera = function() { return /Opera/.test(ua); }
   	this.isSafari = function() { return /Safari/.test(ua); }
   	this.isGecko = function() { return navigator.product == "Gecko" && ! ( this.isOpera() || this.isSafari() ); }
	this.isIEWin = function() { return window.external && /Win/.test(ua); }
   	this.isIEMac = function() { return window.external && /Mac/.test(ua); }
   	this.getVersion = function(){
      if((this.isIEWin() || this.isIEMac()) && (navigator.product != "Gecko")){ return Number(ua.match(/MSIE ([0-9.]+)/)[1]); 
      } else if( this.isSafari() ) { return Number(ua.match(/[0-9.]+$/)); 
      } else if( this.isGecko() ) {
         var n = ua.match(/rv:([0-9.]+)/)[1];
         var ar = n.split(".");
         var s = ar[0] + ".";
         for(var i = 1; i < ar.length; ++i) { s += ("0" + ar[i]).match(/.{2}$/)[0]; }
         return Number(s);
      } else if( this.isOpera() ) { return Number(ua.match(/Opera.([0-9.]+)/)[1]);
      } else { return null; }
   }
}
sniffer = new CJL_BrowserSniffer();
if( sniffer.isIEWin() ) {
    if (sniffer.getVersion() >= 7){ browserType = "<style>#sgl #container {min-height: 600px;}</style>"; prova = "explowin7";
    } else {
		if (navigator.product == "Gecko") { browserType = "<style>#sgl #container {min-height: 690px;}</style>"; prova = "explowin6";
		} else {  browserType = "<style>#sgl #container {height: 550px;}</style>"; prova = "geckomac";
		}
    }
} else if( sniffer.isIEMac() ) { browserType = "<style>#sgl #container {min-height: 600px;}</style>"; prova = "explomac";
} else if( sniffer.isSafari() ) { browserType = "<style>#sgl #container {min-height: 600px;}</style>"; prova = "safari";
} else if( sniffer.isGecko() ) {    
       	var agt=navigator.userAgent.toLowerCase();
		if (navigator.appVersion.indexOf("Mac") != -1){ browserType = "<style>#sgl #container {height: 600px;}</style>"; prova ="geckomac";
		} else { browserType = "<style>#sgl #container {min-height: 600px;}</style>"; prova = "geckopc";
		} 
} else if( sniffer.isOpera() ) { browserType = "<style>#sgl #container {min-height: 600px;}</style>"; prova = "opera";
} else { browserType = "<style>#sgl #container {min-height: 600px;}</style>"; }