function DetectSvg(loud)
{
var agnt=navigator.userAgent.toLowerCase()
var major = parseInt(navigator.appVersion)



if (agnt.indexOf('msie') != -1)
  {
    re1 = /msie\s/
    wordlist = agnt.split(re1)
    var versio=parseInt(wordlist[1])
    if ((versio>=5) && (major >=4))
    {
      document.writeln('<scr'+'ipt type="text/vbscript">');
      document.writeln('If ScriptEngineMajorVersion >= 2 Then');
      document.writeln('  If IsObject(CreateObject("Adobe.SVGCtl")) Or IsObject(CreateObject("Corel.SVGCtl")) Then ');
      document.writeln('    plugin.svg.value=1');
      document.writeln('  Else');
      document.writeln('    plugin.svg.value=2');
      document.writeln('  End If');
      document.writeln('Else');
      document.writeln('  plugin.svg.value=3');
      document.writeln('End If');
      document.writeln('</scr' + 'ipt>');
    }
    else
    {
      document.plugin.svg.value=4
    }
  }
  else
  {
    if ((agnt.indexOf('mozilla')!=-1) && (major>=4))
    {
      if ( (navigator.mimeTypes["image/svg"] && (navigator.mimeTypes["image/svg"].enabledPlugin!=null)) ||
           (navigator.mimeTypes["image/svg-xml"] && (navigator.mimeTypes["image/svg-xml"].enabledPlugin!=null)) ||
           (navigator.mimeTypes["image/svg+xml"] && (navigator.mimeTypes["image/svg+xml"].enabledPlugin!=null)))
      {
        document.plugin.svg.value=1
      }
      else
      {
        document.plugin.svg.value=2
      }
    }
    else
    {
      document.plugin.svg.value=4
    }
  }
  if (loud !=0)
  {
    if (document.plugin.svg.value==2)
    {
      alert("PenDraw Information:-\n\nYour user agent=" && agnt && "\n\nMajor version =" && major && "\n\nYou do not have an SVG Viewer. You will need to download and install one - see the PenDraw Home page for details.");
    }
    if (document.plugin.svg.value>=3)
    {
      alert("PenDraw Information:-\n\nYour user agent=" && agnt && "\n\nMajor version =" && major && "\n\nWe are sorry, but your Browser is too old for SVG to be reliable.\n\n SVG technology is very recent. Here's what to do if you want to use SVG.\n\n1. Get the very latest version of Internet Explorer, or Netscape Navigator, or Mozilla, or Opera etc.\n\n2. Then download and install an SVG Viewer.\n\n\nTip: Internet Explorer 6 or later is probably the safest bet for SVG, until the Mozilla SVG project is complete (that's one worth watching).");
    }
  }
}

function SetFarLeftCol()
{
  if (document.plugin.svg.value==1)
  {
    document.writeln('  <BR><BR><BR>');
    document.writeln('  <OBJECT data="/a/img/righthalf.svg" type="image/svg-xml" width="60" height="200" alt="This is a picture and test: if you can not see the picture, get an SVG plug-in!" pluginspage="http://www.adobe.com/svg/viewer/install/"></OBJECT>');
    document.writeln('  <BR><BR>');
    document.writeln('  The above half-ball is 420 bytes in SVG.<BR><BR> THE .gif VERSION IS OVER TEN TIMES AS BIG AT 4520!!!');
  }
}

function SetRightColHead()
{
  if (document.plugin.svg.value==1)
  {
    document.writeln('<H3>VIEWER SITES</H3><BR>')
  }
  else
  {
    document.writeln('<H3>NO SVG VIEWER?</H3><BR>')
  }
}

function SetFarRightCol()
{
  if (document.plugin.svg.value==1)
  {
    document.writeln('  <BR><BR><BR>');
    document.writeln('  <OBJECT data="/a/img/lefthalf.svg" type="image/svg-xml" width="60" height="200" alt="This is a picture and test: if you can not see the picture, get an SVG plug-in!" pluginspage="http://www.adobe.com/svg/viewer/install/"></OBJECT>');
  }
  else if (document.plugin.svg.value>=2)
  {
    document.writeln('<P class="svgviewnote"><BR><BR><BR><BR><BR><BR><BR><BR><strong>Which viewer?</strong><BR><BR>');
    document.writeln('  <strong>Adobe</strong> prints but its zoom stops at 16x.<BR><BR>');
    document.writeln('  <strong>Corel</strong> zoom is unlimited, but it does not print yet.<BR><BR><BR>');
    document.writeln('  Then there is the <A class="anchor" rel="Help" href=http://www.mozilla.org/projects/svg/><strong>Mozilla</strong></A> browser: unusually: <em>native</em> SVG capability.  (We have not tried it)<BR><BR><BR>');
    document.writeln('  And <A class="anchor" rel="Help" href=http://www.mozilla.org/projects/svg/><strong>Opera</strong></A> can have plug-ins. (We have not tried it)');
    document.writeln('</P>');
  }
}

function tellMore(moreText)
{
moreWindow = window.open("simplehouse.svg", "moreWin", "width=140,height=160")
moreWindow.focus()
}

