﻿/*
Safari 3 is detected as Sys.Browser.Safari. There are specific hacks for Safari implemented in MicrosoftAjax.js. 
These hacks cause problems with Safari 3 as it uses a new javascript rendering engine called WebKit.

The hacks can cause dreaded errors like when updating a control's visibility from false to true in an updatepanel 
during a partial update. When that occurs it needs to download the supporting javascript to run the now visible server control. 
With the hacks in place it does not properly dynamically load the javascript file and it throws errors

See: http://forums.asp.net/p/1252014/2392110.aspx

*/

Sys.Browser.WebKit = {}; //Safari 3 is considered 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';
}