﻿/*  The heart of the problem is there are two browsers with a groing number of users - Safari 3.x and Google Chrome, that ASP.NET AJAX framework
    is not compatible with. One part of the problem is induced by a fact that both browsers report themselves as "Webkit" which is not supported 
    by ASP.NET AJAX. This part of the problem affects both Safari and Chrome users. The second part of the problem mostly affects Safari users 
    because ASP.NET AJAX framework does "support" Safari (version 2.x) but in such a manner that makes your web application look a total disaster 
    in Safari version 3.x. The suggested fix will help both cases. At least my tests showed quite a success.
    
    So to the point, ASP.NET AJAX framework has a class Sys.Browser that represents a current browser and supports cross-browser compatibility 
    for everything else. The solution simply extends the Sys.Browser class to support a Webkit browser
*/
Sys.Browser.WebKit = {};
if (navigator.userAgent.indexOf('WebKit/') > -1) {
    Sys.Browser.agent = Sys.Browser.WebKit;
    Sys.Browser.version = parseFloat(navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);
    Sys.Browser.name = 'WebKit';
}
