Can you eyeball this and possibley test it and/or comment on it, please

//
//  hasSVG.js - Detect SVG
//

function hasSVG()
{
    var agent = navigator.userAgent;

    if (agent.indexOf("MSIE") != -1)
    {
        GenerateAdobeSVGCheck();
        return isSVGControlInstalled();
    }
    else if (agent.indexOf("Firefox") != -1)
    {
        var start = agent.indexOf( "Firefox") + 8;
        end = agent.indexOf( ".", agent.indexOf( ".", start) + 1);
        var version = new Number( agent.substr( start, end - start));

        return (version >= 1.5);
    }
    else if (agent.indexOf("Opera") != -1)
    {
        var start = agent.indexOf( "Opera") + 8;
        end = agent.indexOf( " ", start);
        var version = new Number( agent.substr( start, end - start));

        return (version >= 8);
    }
    else
        return false;
}

function GenerateAdobeSVGCheck()
{
    document.writeln( '<script language="VBScript">');
    document.writeln( 'Function isSVGControlInstalled()');
    document.writeln( 'on error resume next');
    document.writeln( 'isSVGControlInstalled = 
IsObject(CreateObject("Adobe.SVGCtl"))');
    document.writeln( 'end Function');
    document.writeln( '</scr' + 'ipt>');
}


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/hOt0.A/lOaOAA/yQLSAA/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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> 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/
 

Reply via email to