<!--
//testBrowserCheck();  
checkForMathPlayer();
//jmolOldBrowser();

function checkForMathPlayer() {

var version = parseFloat(navigator.appVersion);
var message1 ="<div id='cnx_header'><p class='cnx_warning'><span class='cnx_before'>Note:</span> Your browser cannot correctly display MathML.  To be able to view the math in this document, \
please consider using another \
browser or download a plug-in. Browsers that can view MathML include <a href='http://www.mozilla.org/'>Mozilla browsers</a>, <a href='http://channels.netscape.com/ns/browsers/'>Netscape 7 or above</a>, or <a \
href='http://www.microsoft.com/windows/ie/downloads/ie6/default.asp'>Microsoft \
Internet Explorer 5.5 or above</a>. A plug-in such as <a href='http://www.dessci.com/webmath/mathplayer/'>MathPlayer</a> is required for \
Internet Explorer. The character encoding of the MathML content is Unicode (UTF-8). If the characters look strange after you install the correct browser or plug-in, go to your browser's menu bar and select \"View\", \"Encoding\", \"Unicode (UTF-8)\". \
More information on how to view the MathML content can be found in the <a href='http://www.scifree.org/devnotes.html'>development notes</a>.</p></div>";

var message2 ="<div id='cnx_header'><p class='cnx_warning'><span class='cnx_before'>Note:</span> If you are using MathPlayer 1.0 please consider upgrading to <a href='http://www.dessci.com/webmath/mathplayer/'>MathPlayer 2.0</a>. \
The character encoding of the MathML content is Unicode (UTF-8). If the characters look strange after you install the correct browser or plug-in, go to your browser's menu bar and select \"View\", \"Encoding\", \"Unicode (UTF-8)\". \
More information on how to view the MathML content can be found in the <a href='http://www.scifree.org/devnotes.html'>development notes</a>.</p></div>";

var message3 ="The character encoding of the MathML content is Unicode (UTF-8). If the characters look strange, go to your browser's menu bar and select \"View\", \"Encoding\", \"Unicode (UTF-8)\". ";

//if (navigator.appName == "Netscape" && version >= 5.0) {
//       document.writeln("you are big Mozilla 5.0");  }
//alert(message3);
//document.writeln(message1);
  // first test platform, as the MathPlayer-specific code only works in IE
  if( isIEWindows()) {
    // check browser version since MathPlayer 2 requires IE 6
    if (ieVersion() >= 6.0) {
      if (isMPInstalled()) {       
        var start = navigator.appVersion.indexOf("MathPlayer");
        if (start != -1) { 
          // notify reader their browser is properly set up
//          alert(message3);
//document.writeln("you are IE"+ieVersion());

        }
        else {             
          // notify reader they need to upgrade to MathPlayer 2
          document.writeln(message2);
//          var where_to= confirm("Do you want to be redirected to instructions on how to view the MathML content?");
//if (where_to== true)  window.location="http://www.scifree.org/devnotes.html";
        }
      }
      else {               
        // direct reader to MathPlayer installation page
        document.writeln(message1);
//        var where_to= confirm("Do you want to be redirected to instructions on how to view the MathML content?");
//if (where_to== true)  window.location="http://www.scifree.org/devnotes.html";
      }
    }
    else { 
      // notify reader they need to upgrade IE 
      document.writeln(message1);
//      var where_to= confirm("Do you want to be redirected to instructions on how to view the MathML content?");
//if (where_to== true)  window.location="http://www.scifree.org/devnotes.html";
    }
  }
 // else { 
    // direct reader to information about other browsers 
 // }
  
 else if (navigator.appName == "Netscape" &&
                 version >= 4.7 && version < 5.0) {
        
        document.writeln(message1);
//      var where_to= confirm("Do you want to be redirected to instructions on how to view the MathML content?");
//if (where_to== true)  window.location="http://www.scifree.org/devnotes.html";
      
}else if (navigator.appName == "Netscape" &&
                 version >= 5.0) {
//                 alert(message3);
//        document.writeln("You are using a Mozilla or Netscape browser");         

 }else { 
//  document.writeln("you are groovy baby"); 
 }
// document.writeln("you are big out"); 
}


// returns True if MathPlayer is installed
function isMPInstalled()
{
  try {
    var oMP = new ActiveXObject("MathPlayer.Factory.1");
    return true;
  }
  catch(e) {
    return false;
  }
}

// returns True if running on any version of IE Windows
function isIEWindows()
{
  return( (navigator.appName=="Microsoft Internet Explorer") && 
    (navigator.appVersion.indexOf("Windows") != -1) );
}

// returns version of Internet Explorer
function ieVersion()
{
  var ieVer = 0;
  var start = navigator.appVersion.indexOf("MSIE "); 
  if (start != -1) { 
    ieVer = parseFloat(navigator.appVersion.substring(start+5)); 
  }
  return ieVer;
}


-->

 