window.jsMath = {};
//jsMath.Font.Message = function () {
jsMath = {Font: {Message: function () {
    if (jsMath.Element("Warning")) return;
 jsMath.Font.Message = function () {alert("Hello!")};
/*    var div = jsMath.Setup.DIV("Warning",{});
    div.innerHTML =
      '<center><table><tr><td>'
      + '<div id="jsMath_noFont"><div class="message">' + "Hello"
      + '<div style="text-align:left"><span style="float:left; margin: 8px 0px 0px 20px">'
      + '<span onclick="jsMath.Controls.Panel()" title=" Open the jsMath Control Panel " class="link">jsMath Panel</span>'
      + '</span><span style="margin: 8px 20px 0px 0px; float:right">'
      + '<span onclick="jsMath.Font.HideMessage()" title=" Remove this font warning message " class="link">Hide this Message</span>'
      + '</span></div><div style="height:6px"></div><br clear="all"/></div></div>'
      + '<div style="width:22em; height:1px"></div>'
      + '</td></tr></table></center><hr/>';
*/
//};
}}};
window.jsMath.Setup = {};

jsMath.Box = {prototype: {}};
jsMath.Box.prototype.Remeasured = function () {
  if (this.w > 0) {
    this.w = jsMath.EmBoxFor(this.html).w;
    if (this.w > this.Mw) {this.Mw = this.w}
  }
  return this;
};

jsMath.Setup.Source = function () {
  if (jsMath.Autoload && jsMath.Autoload.root) {
    jsMath.root = jsMath.Autoload.root;
  } else {
    jsMath.root = '';
    var script = jsMath.document.getElementsByTagName('script');
    if (script) {
      for (var i = 0; i < script.length; i++) {
        var src = script[i].src;
        if (src && src.match('(^|/|\\\\)jsMath.js$')) {
          jsMath.root = src.replace(/jsMath.js$/,'');
          break;
        }
      }
    }
  }
  if (jsMath.root.charAt(0) == '\\') {jsMath.root = jsMath.root.replace(/\\/g,'/')}
  if (jsMath.root.charAt(0) == '/') {
    if (jsMath.root.charAt(1) != '/')
    {jsMath.root = '//' + jsMath.document.location.host + jsMath.root}
    jsMath.root = jsMath.document.location.protocol + jsMath.root;
  } else if (!jsMath.root.match(/^[a-z]+:/i)) {
    var src = new String(jsMath.document.location);
    var pattern = new RegExp('/[^/]*/\\.\\./')
      jsMath.root = src.replace(new RegExp('[^/]*$'),'') + jsMath.root;
    while (jsMath.root.match(pattern))
    {jsMath.root = jsMath.root.replace(pattern,'/')}
  }
  jsMath.Img.root = jsMath.root + "fonts/";
  jsMath.blank = jsMath.root + "blank.gif";
  this.Domain();
};

