<?xml version="1.0" encoding = "utf-8"?>

<snippet xmlns:MMString="http://www.macromedia.com/schemes/dat/string/" MMString:name = "Snippets/JavaScript/browser_functions/platformDetect_csn/snippet/name/Platform" MMString:description = "Snippets/JavaScript/browser_functions/platformDetect_csn/snippet/description/Simple" preview="code" type="block">

<insertText location="beforeSelection">

<![CDATA[function platformDetect()

{

  if(navigator.appVersion.indexOf("Win") != -1)

  {

    alert("Windows");

  }

  else if(navigator.appVersion.indexOf("Mac") != -1)

  {

    alert("Macintosh");

  }

  else alert("Other");

}

]]>

</insertText>

<insertText location="afterSelection"><![CDATA[]]>

</insertText>

</snippet>

