Index: branches/2.2.0.1/phpgwapi/js/browser/browserDetect.js
===================================================================
--- branches/2.2.0.1/phpgwapi/js/browser/browserDetect.js	(revision 4455)
+++ branches/2.2.0.1/phpgwapi/js/browser/browserDetect.js	(revision 4455)
@@ -0,0 +1,180 @@
+(function()
+{		
+        // NAVIGATOR USER AGENT
+        var agt 		= navigator.userAgent.toLowerCase();
+        var appVer		= navigator.appVersion.toLowerCase();
+
+        var is_minor            = parseFloat(appVer);
+        var is_major            = parseInt(is_minor);
+
+        var iePos		= appVer.indexOf('msie');
+
+        if ( iePos != -1 )
+        {
+            is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
+            is_major = parseInt(is_minor);
+        }
+
+        //Konqueror
+
+        var is_konq = false;
+        var kqPos   = agt.indexOf('konqueror');
+        
+        if ( kqPos !=-1 )
+        {
+            is_konq  = true;
+            is_minor = parseFloat(agt.substring(kqPos+10,agt.indexOf(';',kqPos)));
+            is_major = parseInt(is_minor);
+        }
+
+        //Is_Khtml
+        var is_khtml 	= (((agt.indexOf('safari')!=-1) && (agt.indexOf('mac')!=-1)) && ( is_konq ));
+
+        //Is_Opera
+        var is_opera	= (agt.indexOf("opera") != -1 );
+
+        //Is_IE
+        var is_ie		= ((iePos!=-1) && (!is_opera) && (!is_khtml));
+
+        // Gecko
+        var is_gecko = ((!is_khtml)&&(navigator.product)&&(navigator.product.toLowerCase()=="gecko"))?true:false;
+        var is_gver  = 0;
+        
+        if (is_gecko)
+            is_gver = navigator.productSub;
+
+        // Moz
+        var is_moz   = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&
+                        (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  &&
+                        (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)     &&
+                        (is_gecko) && ((navigator.vendor=="")||(navigator.vendor=="Mozilla")));
+
+        var _browser = [
+
+            // Chrome	
+            ['chrome8', ( agt.indexOf('chrome/8') != -1 ) ],
+
+            // EPIPHANY	
+            ['epiphany2', ( agt.indexOf('epiphany/2') != -1 ) ],
+
+            // FIREFOX
+            ['firefox1', ( agt.indexOf('firefox/1') != -1 ) ],
+            ['firefox2', ( agt.indexOf('firefox/2') != -1 ) ],
+            ['firefox3', ( agt.indexOf('firefox/3') != -1 ) ],
+            ['firefox4', ( agt.indexOf('firefox/4') != -1 ) ],
+
+            // ICEWEASEL
+            ['iceweasel3', (agt.indexOf('iceweasel/3') != -1 ) ],
+
+            // IE
+            ['ie3',	(((iePos!=-1) && (!is_opera) && (!is_khtml)) && (is_major < 4 )) ],
+            ['ie4', (((iePos!=-1) && (!is_opera) && (!is_khtml)) && (is_major == 4 )) ],
+            ['ie5', (((iePos!=-1) && (!is_opera) && (!is_khtml)) && (is_major == 5 )) ],
+            ['ie55', (((iePos!=-1) && (!is_opera) && (!is_khtml)) && (agt.indexOf("msie 5.5") !=-1 )) ], 
+            ['ie6', (((iePos!=-1) && (!is_opera) && (!is_khtml)) && (is_major == 6 )) ],
+            ['ie7', (((iePos!=-1) && (!is_opera) && (!is_khtml)) && (is_major == 7 )) ],
+            ['ie8', (((iePos!=-1) && (!is_opera) && (!is_khtml)) && (is_major == 8 )) ],
+
+            //IS?
+            ['is_ie', ((iePos!=-1) && (!is_opera) && (!is_khtml)) ],
+            ['is_gecko', is_gecko ],
+            ['is_opera', is_opera ],
+            ['is_khtml', is_khtml ],
+            ['is_moz', is_moz ],
+
+            // OPERA
+            ['is_opera', is_opera],
+            ['opera2', ( agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1) ],
+            ['opera3', ( agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1) ],
+            ['opera4', ( agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1) ],
+            ['opera5', ( agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1) ],
+            ['opera6', ( agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1) ],
+            ['opera7', ( agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1) ],
+            ['opera8', ( agt.indexOf("opera 8") != -1 || agt.indexOf("opera/8") != -1) ],
+            ['opera9', ( agt.indexOf("opera 9") != -1 || agt.indexOf("opera/9") != -1) ],
+
+            // IS SAFARI/KHTML
+            ['safari', ((agt.indexOf('safari')!=-1) && (agt.indexOf('mac')!=-1)) ],
+            ['khtml', is_khtml ]
+        ];
+
+        function isCompatible()
+        {
+            if( arguments.length > 0 )
+            {
+                var _args = arguments;
+
+                for( i = 0; i < _args.length; i++ )
+                {
+                    for( j = 0; j < _browser.length; j++ )
+                    {
+                        if( _args[i].toLowerCase() === _browser[j][0] )
+                        {
+                            if( _browser[j][1] )
+                                return true;
+                        }
+                    }	
+                }
+
+                return false;
+            }
+        }
+
+        function SnifferBrowser()
+        {
+        }
+
+        SnifferBrowser.prototype.isCompatible = isCompatible;
+
+        window.SnifferBrowser = new SnifferBrowser;
+	
+})();
+
+/*  Script utilizado para detectar o browser
+
+	Variaveis Globais no Expresso:
+
+	OS 		-> retorna o Sistema Operacional
+	browser -> retorna o nome do Browser
+	version -> retorna a versão do Browser
+	isExplorer -> retorna true se Browser for Internet Explorer
+*/
+	var detect = navigator.userAgent.toLowerCase();
+	var OS,browser,version,total,thestring;
+	var isExplorer = false;
+
+	if (checkIt('konqueror'))
+	{
+		browser = "Konqueror";
+		OS = "Linux";
+	}
+	else if (checkIt('safari')) browser = "Safari"
+	else if (checkIt('omniweb')) browser = "OmniWeb"
+	else if (checkIt('opera')) browser = "Opera"
+	else if (checkIt('webtv')) browser = "WebTV";
+	else if (checkIt('icab')) browser = "iCab";
+	else if (checkIt('msie')) {browser = "Internet Explorer";isExplorer=true;}
+	else if (!checkIt('compatible'))
+	{
+		browser = "Netscape Navigator"
+		version = detect.charAt(8);
+	}
+	else browser = "An unknown browser";
+	
+	if (!version) version = detect.charAt(place + thestring.length);
+	
+	if (!OS)
+	{
+		if (checkIt('linux')) OS = "Linux";
+		else if (checkIt('x11')) OS = "Unix";
+		else if (checkIt('mac')) OS = "Mac"
+		else if (checkIt('win')) OS = "Windows"
+		else OS = "an unknown operating system";
+	}
+	
+	function checkIt(string)
+	{
+		place = detect.indexOf(string) + 1;
+		thestring = string;
+		return place;
+	}
