//<![CDATA[




function CJL_BrowserSniffer()
{
   var ua = navigator.userAgent;

	//alert(ua);

   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() )
      {
         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 false;
      }
   }
}
   
   sniffer = new CJL_BrowserSniffer();

	if( sniffer.isGecko() )
   {
		//alert("isGecko");
	   	   document.write('<link rel="stylesheet" type="text/css" href="stile/tosca_opera.css">'); 
      browserType = "Gecko family";
   }   
   else if( sniffer.isIEMac() )
   {
		//alert("isMac");
	   	   document.write('<link rel="stylesheet" type="text/css" href="stile/tosca.css">'); 
      browserType = "Internet Explorer per Macintosh";
   }
   else if( sniffer.isSafari() )
   {
		//alert("isSafari");
	   	   	   document.write('<link rel="stylesheet" type="text/css" href="stile/tosca_opera.css">'); 

      browserType = "Safari"
   }
   else if( sniffer.isIEWin() )
   {
		//alert("isIEWind");
	    if(sniffer.getVersion()==6) 
		document.write('<link rel="stylesheet" type="text/css" href="stile/tosca.css">');
		else
		document.write('<link rel="stylesheet" type="text/css" href="stile/tosca.css">');
   }
   else if( sniffer.isOpera() )
   {
		//alert("isOpera");
	   	   document.write('<link rel="stylesheet" type="text/css" href="stile/tosca_opera.css">'); 
      browserType = "Opera";
   }
   else
   {
		//alert("isElse");
	   	   document.write('<link rel="stylesheet" type="text/css" href="stile/tosca_opera.css">'); 
      browserType = "Unknown";
   }
//]]>

