var isIE = document.createElementNS==null;

function AMcreateElementXHTML(t) {
  if (isIE) return document.createElement(t);
  else return document.createElementNS("http://www.w3.org/1999/xhtml",t);
}

function MathML_Check_Available() {
  var nd = AMcreateElementXHTML("center");
  nd.style.backgroundColor="yellow";
  nd.appendChild(document.createTextNode("www.mathfan.com 友情提示 为了正确的显示数学公式,请使用FireFox 或者 IE+"));
  
  var an = AMcreateElementXHTML("a");
  an.appendChild(document.createTextNode("MathPlayer"));
  an.setAttribute("href","http://www.dessci.com/en/products/mathplayer/download.htm");
  
  nd.appendChild(an);
  
  nd.appendChild(document.createTextNode("  "));
  
  an = AMcreateElementXHTML("a");
  an.appendChild(document.createTextNode("(MathPlayer插件)"));
  an.setAttribute("href","http://www.dessci.com/en/dl/MathPlayerSetup.asp");
  nd.appendChild(an);
  
  //nd.appendChild(document.createTextNode(" or Netscape/Mozilla/Firefox"));
  
  if (navigator.appName.slice(0,8)=="Netscape") 
    if (navigator.appVersion.slice(0,1)>="5") return nd;//null;
    else return nd;
  else if (navigator.appName.slice(0,9)=="Microsoft")
    try {
        var ActiveX = new ActiveXObject("MathPlayer.Factory.1");
        return null;
    } catch (e) {
        return nd;
    }
  else return nd;
}