I hope this can be a bit more clear:
<!-- Script to check SVG availability and version -->
<!-- Detect IE/ASV and Firefox SVG support -->
<!-- MOST OF THIS IS FROM SUN and another guy I don't
remember. Sorry. -->
<!-- Check if browsers have SVG support and record if
we need to use VBScript detection method if the
number of MIME types is 0. -->
«script language="JavaScript1.1"»
// Variable to keep track of user's SVG support
var hasSVGSupport = false;
var svgVersion;
var svgCtl;
// Variable to indicate whether we need to use
// VBScript method to detect SVG support
var useVBMethod = false;
// Internet Explorer returns 0 as the number of
// MIME types, so this code will not be executed
// by it. This is our indication to use VBScript
// to detect SVG support.
if (navigator.mimeTypes != null
&& navigator.mimeTypes.length > 0) {
var plugin = 0;
if (navigator.mimeTypes
&& navigator.mimeTypes["image/svg+xml"]){
plugin =
navigator.mimeTypes["image/svg+xml"].enabledPlugin;
}
if (plugin) {
hasSVGSupport = true;
svgVersion = plugin.description;
}
else{
// Firefox 1.5+ has SVG native support.
// Checking with a user agent match.
// If there is a more refined way
// to do this, please tell me.
var xua = window.navigator.userAgent;
var xpos_firefox
= xua.toLowerCase().indexOf('firefox');
if(xpos_firefox != -1){
xversion =
xua.substr(xpos_firefox).split('/')[1].split('.');
var xnum_ver = parseInt(xversion[0]) * 100
+ parseInt(xversion[1]);
if(xnum_ver >= 105){
hasSVGSupport = true;
svgVersion = xversion.join('.');
}
}
}
}
else {
useVBMethod = true;
}
</script>
<!-- Visual Basic Script to detect support of Adobe
SVG plugin. This code is not run on browsers
which report they have MIME types, and it is
also not run by browsers which do not have
VBScript support. -->
«script language="VBScript"»
On Error Resume Next
If useVBMethod = true Then
Set svgCtl = CreateObject("Adobe.SVGCtl")
svgVersion = svgCtl.getSVGViewerVersion()
hasSVGSupport = IsObject(svgCtl)
End If
</script>
«script language="JavaScript1.2"»
if (!hasSVGSupport) {
location.href =
location.href.replace(location.href.split('/').pop(),
'svgerror.htm');
}
else{ //that is only for testing:
alert('SVG SUPPORT!\nsvgVersion: '+svgVersion);
}
</script>
__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.espanol.yahoo.com/
------------------------ Yahoo! Groups Sponsor --------------------~-->
AIDS in India: A "lurking bomb." Click and help stop AIDS now.
http://us.click.yahoo.com/9QUssC/lzNLAA/TtwFAA/1U_rlB/TM
--------------------------------------------------------------------~->
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/