//  Copyright (c) 2008-2009, Amit Green.  All Rights Reserved.
//  License: MIT License, see http://zixie.org/license.html

//  quixie-started.mix
try
{
  (
    function quixie_started_mix()
    {
      var now = new Date()
    
      if ( ! window.Zixie)
        Zixie = {}
    
      if ( ! Zixie.r0)
        Zixie.r0 = {}
    
      var Z = Zixie.r0
    
      Z.configuration = {}
      Z.console = { view: document.createElement('div') /*,*/ }
      Z.monitor = { displayName: 'Z.monitor' }
    
      if ( ! Z.timing)
        Z.timing = {}
    
      Z.timing.zixie_loaded = now
    
      Z.toolkit = { name: 'Zixie', version: '2009-01-18#1' /*,*/ }
    
      var keys = {}
    
      for (var k in window)
        keys[k] = true
    
      Z.window_keys = keys
    }
  ) ();
}
catch (e)
{
  alert('Exception in quixie-started.mix\n' + e)
}

//  zixie_name.mix
try
{
  (
    function zixie_name_mix(Z)
    {
      Z.script_name = 'zixie.js'
    }
  ) (Zixie.r0);
}
catch (e)
{
  alert('Exception in zixie_name.mix\n' + e)
}

//  quixie-configuration.mix
try
{
  (
    function quixie_configuration_mix(Z)
    {
      Z.configuration.testExceptions = false
    
      Z.ie = /*@cc_on ! @*/ false
    }
  ) (Zixie.r0);
}
catch (e)
{
  alert('Exception in quixie-configuration.mix\n' + e)
}

//  quixie-language.mix
try
{
  (
    function quixie_language_mix(Z)
    {
      Z.assertion_failed = function assertion_failed(name /* ... */)
      {
        var s = name
    
        for (var i = 1; i < arguments.length; i ++)
          s += ' ' + arguments[i]
    
        var stack = null
    
        try { Z.Y.X } catch (e) { stack = e.stack }
    
        if (typeof stack == 'string')
        {
          var cr = stack.indexOf('\n')
    
          if (cr != -1 && cr + 1 < stack.length)
          {
            stack = stack.substring(cr + 1)
            throw { name: 'Assertion failed', message: s, stack: stack }
          }
        }
    
        throw { name: 'Assertion failed', message: s }
      }
    
    
      Z.failed_message = function failed_message(message /* ... */)
      {
        var s = message
    
        for (var i = 1; i < arguments.length; i ++)
          s += ' ' + arguments[i]
    
        var stack = null
    
        try { Z.Y.X } catch (e) { stack = e.stack }
    
        if (typeof stack == 'string')
        {
          var cr = stack.indexOf('\n')
    
          if (cr != -1 && cr + 1 < stack.length)
          {
            stack = stack.substring(cr + 1)
            throw { name: 'Internal Failure', message: s, stack: stack }
          }
        }
    
        throw { name: 'Internal Failure', message: s }
      }
    
    
      Z.displayName = 'Z'
    
    
      Z.display = function display(v)
      {
        if (arguments.length == 1) {}
        else
        {
          Z.failed_message('Z.display passed', arguments.length, 'arguments',
                           '(1 argument expected)')
        }
    
        if (v === null)
        {
          return 'null'
        }
    
        if (v === undefined)
        {
          return 'undefined'
        }
    
        var type = typeof v
    
        if (type == 'function')
        {
          if ( ! v.displayName)
          {
            try
            {
              var s = v.toString()
              var result = /^\s*function\s+(\w+)\s*\(/.exec(s)
    
              if (result && result.length == 2)
                v.displayName = result[1]
            }
            catch (e)
            {
            }
    
            if ( ! v.displayName)
              v.displayName = '?'
          }
    
          return v.displayName
        }
    
        if (type == 'object')
        {
          if (v.toDisplay)
            return v.toDisplay()
    
          if (v.displayName)
            return v.displayName
        }
    
        return v.toString()
      }
    
    
      Z.dotDisplay = function dotDisplay(left, right /* ... */)
      {
        var s = Z.display(left) + '.' + Z.display(right)
    
        for (var i = 2; i < arguments.length; i ++)
          s += '.' + Z.display(arguments[i])
    
        return s
      }
    
    
      Z.assert_className = function assert_className(name)
      {
        var i = name.charCodeAt(0)
    
        if (65 <= i && i <= 90) {}          //  'A' <= i && i <= 'Z'
        else
        {
          Z.failed_message("constructor function '" + name + "'",
                           'must begin with an uppercase letter')
        }
      }
    
    
      Z.assert_functionName = function assert_functionName(name)
      {
        var i = name.charCodeAt(0)
    
        if (97 <= i && i <= 122) {}        //  'a' <= i && i <= 'z'
        else
        {
          Z.failed_message("function '" + name + "'"
                           + ' must begin with a lowercase letter')
        }
      }
    
    
      Z.declare = function declare(name, f)
      {
        Z.assert_functionName(name)
    
        if (this[name])
          Z.failed_message(Z.dotDisplay(this, name) + ' has already been declared')
    
        if (typeof f == 'function') {}
        else
        {
          Z.failed_message("'f' is of type '" + typeof f + "'"
                           + " (expected 'function')")
        }
    
        this[name] = f
        f.displayName = name
      }
    
    
      function declare_member(name, f)
      {
        if (typeof this != 'function')
        {
          Z.failed_message("'this' is of type '" + typeof this + "'"
                           + " (expected 'function')")
        }
    
        if ( ! this.prototype)
          Z.failed_message(Z.dotDisplay(this, 'prototype') + ' does not exist')
    
        Z.assert_functionName(name)
    
        if (typeof f != 'function')
        {
          Z.failed_message("'f' is of type '" + typeof f + "'"
                           + " (expected 'function')")
        }
    
        if (this.prototype[name] !== undefined && name != 'toString')
        {
          Z.failed_message(Z.display(this) + '.prototype.' + Z.display(name)
                           + ' already exists')
        }
    
        this.prototype[name] = f
        f.displayName = name
      }
    
    
      function declare_derived_member(name, f)
      {
        if (typeof this != 'function')
        {
          Z.failed_message("'this' is of type '" + typeof this + "'"
                           + " (expected 'function')")
        }
    
        if ( ! this.prototype)
          Z.failed_message(Z.dotDisplay(this, 'prototype') + ' does not exist')
    
        var Base = this.prototype.Base
    
        if (Base === undefined)
          Z.failed_message(Z.dotDisplay(this) + ' is not a derived class')
    
        Z.assert_functionName(name)
    
        if (typeof f != 'function')
        {
          Z.failed_message("'f' is of type '" + typeof f + "'"
                           + " (expected 'function')")
        }
    
        var previous = this.prototype[name]
    
        if (previous !== undefined && previous != Base.prototype[name])
        {
          Z.failed_message(Z.display(this) + '.prototype.' + Z.display(name)
                           + ' already exists')
        }
    
        this.prototype[name] = f
        f.displayName = name
      }
    
    
      Z.declare(
        'declare_class',
    
        function declare_class(className, f)
        {
          Z.assert_className(className)
    
          if (typeof f != 'function')
          {
            Z.failed_message("'f' is of type '" + typeof f + "'"
                             + " (expected 'function')")
          }
    
          if (this[className] !== undefined)
          {
            Z.failed_message(Z.display(this) + '.' + className
                             + ' already exists')
          }
    
          this[className] = f
          f.displayName = className
          f.declare_member = declare_member
          f.declare_static_member = Z.declare
        }
      )
    
    
      Z.declare(
        'declare_derived_class',
    
        function declare_derived_class(className, f, Base)
        {
          Z.assert_className(className)
    
          if (typeof f != 'function')
          {
            Z.failed_message("'f' is of type '" + typeof f + "'"
                             + " (expected 'function')")
          }
    
          if (typeof Base != 'function')
          {
            Z.failed_message("'Base' is of type '" + typeof Base + "'"
                             + " (expected 'function')")
          }
    
          if (this[className] !== undefined)
          {
            Z.failed_message(Z.display(this) + '.' + className
                             + ' already exists')
          }
    
          this[className] = f
    
          for (var k in Base)
          {
            if (k != 'prototype')
              f[k] = Base[k]
          }
    
          f.displayName = className
          f.declare_member = declare_derived_member
          f.declare_static_member = Z.declare
    
          for (var k in Base.prototype)
            f.prototype[k] = Base.prototype[k]
    
          f.prototype.Base = Base
        }
      )
    
    
      Z.declare(
        'local_class',
    
        function local_class(className, f)
        {
          Z.assert_className(className)
    
          if (typeof f != 'function')
          {
            Z.failed_message("'f' is of type '" + typeof f + "'"
                             + " (expected 'function')")
          }
    
          f.displayName = className
          f.declare_member = declare_member
          f.declare_static_member = Z.declare
        }
      )
    
    
      Z.declare(
        'local_derived_class',
    
        function local_derived_class(className, f, Base)
        {
          Z.assert_className(className)
    
          if (typeof f != 'function')
          {
            Z.failed_message("'f' is of type '" + typeof f + "'"
                             + " (expected 'function')")
          }
    
          if (typeof Base != 'function')
          {
            Z.failed_message("'Base' is of type '" + typeof Base + "'"
                             + " (expected 'function')")
          }
    
          for (var k in Base)
          {
            if (k != 'prototype')
              f[k] = Base[k]
          }
    
          f.displayName = className
          f.declare_member = declare_derived_member
          f.declare_static_member = Z.declare
    
          for (var k in Base.prototype)
            f.prototype[k] = Base.prototype[k]
    
          f.prototype.Base = Base
        }
      )
    
    
      Z.declare(
        'declare_with_initialize',
        
        function declare_with_initialize(name, f_init, f)
        {
          Z.declare(
            name,
    
            function initialize()
            {
              Z[name] = f
    
              f_init()
              return f()
            }
          )
        }
      )
    }
  ) (Zixie.r0);
}
catch (e)
{
  alert('Exception in quixie-language.mix\n' + e)
}

//  quixie-debug.mix
try
{
  (
    function quixie_debug_mix(Z)
    {
      var V = Z.console.view
    
      Z.declare(
        'debug',
    
        function debug(s)
        {
          V.appendChild(document.createTextNode(s))
          V.appendChild(document.createElement('br'))
        }
      )
    
      Z.declare(
        'green',
    
        function green(s)
        {
          var line = document.createElement('div')
          
          line.style.color = 'green'
          line.appendChild(document.createTextNode(s))
          V.appendChild(line)
        }
      )
    }
  ) (Zixie.r0);
}
catch (e)
{
  alert('Exception in quixie-debug.mix\n' + e)
}

//  quixie-error.mix
try
{
  (
    function quixie_error_mix(Z)
    {
      var V = Z.console.view
    
      Z.declare(
        'error',
    
        function error(s)
        {
          var line = document.createElement('div')
          
          line.style.color = 'red'
          line.appendChild(document.createTextNode(s))
          V.appendChild(line)
        }
      )
    
      Z.declare(
        'indentError',
    
        function indentError(s)
        {
          var line = document.createElement('div')
          
          line.style.marginLeft = '1em'
          line.style.color = 'red'
          line.appendChild(document.createTextNode(s))
          V.appendChild(line)
        }
      )
    }
  ) (Zixie.r0);
}
catch (e)
{
  alert('Exception in quixie-error.mix\n' + e)
}

//  quixie-exception.mix
try
{
  (
    function quixie_exception_mix(Z)
    {
      Z.declare(
        'sortedKeys',
    
        function sortedKeys(o)
        {
          var keys = []
    
          for (var k in o)
            keys.push(k)
    
          keys.sort()
    
          return keys
        }
      )
    
    
      Z.declare(
        'hex32',
    
        function hex32(v)
        {
          if (-0x80000000 <= v && v < 0)
            return '0x' + (v + 0x100000000).toString(16)
    
          return '0x' + v.toString(16)
        }
      )
    
    
      Z.declare_class(
        'ExceptionDetails',
    
        function ExceptionDetails(e)
        {
          this.e = e
        }
      )
    
    
      Z.ExceptionDetails.declare_member(
        'analyze',
    
        function ExceptionDetails__analyze()
        {
          if (typeof this.e == 'string')
            return
    
          for (var k in this.e)
          {
            var v
            var vs
    
            try
            {
              v = this.e[k]
    
              if (v === null)
                vs = 'null'
              else if (v === undefined)
                vs = 'undefined'
              else
              {
                vs = v.toString()
              }
            }
            catch (e2)
            {
              try
              {
                v = '<' + e2 + '>'
              }
              catch (e3)
              {
                v = '<exception>'
              }
    
              vs = v
            }
    
            if (k == 'description' || k == 'message')
            {
              var i = 0
              var j = vs.length
    
              while (i < j)
              {
                var o = vs.charCodeAt(i)
    
                if (o == 9 || o == 10 || o == 13 || o == 32)    //  '\t\r\n '
                  i ++
                else
                  break
              }
    
              while (j > i)
              {
                var o = vs.charCodeAt(j - 1)
    
                if (o == 9 || o == 10 || o == 13 || o == 32)    //  '\t\r\n '
                  j --
                else
                  break
              }
    
              if (i > 0 || j < vs.length)
                vs = vs.substring(i, j)
            }
    
            if (k == 'description')
              this.description = vs
            else if (k == 'fileName' || k == 'filename')
              this.fileName = vs
            else if (k == 'lineNumber')
              this.lineNumber = vs
            else if (k == 'message')
              this.message = vs
            else if (k == 'name')
              this.name = vs
            else if (k == 'number')
            {
              if (typeof v == 'number' && ! (-10000 <= v && v <= 10000))
                vs = Z.hex32(v)
    
              this.number = vs
            }
            else if (k == 'result')
            {
              if (typeof v == 'number' && ! (-10000 <= v && v <= 10000))
                vs = Z.hex32(v)
    
              this.result = vs
            }
            else if (k == 'stack')
              this.stack = vs
            else if (k == 'columnNumber' && v == 0)           /*  ignore  */  ;
            else if (k == 'data' && v == null)                /*  ignore  */  ;
            else if (k == 'filename' && v == null)            /*  ignore  */  ;
            else if (k == 'inner' && v == null)               /*  ignore  */  ;
            else if (k == 'INDEX_SIZE_ERR' && v == 1)         /*  ignore  */  ;
            else
            {
              if ( ! this.other)
                this.other = {}
    
              this.other[k] = vs
            }
          }
        }
      )
    
    
      Z.ExceptionDetails.declare_member(
        'location',
    
        function ExceptionDetails__location()
        {
          if (this.fileName && this.lineNumber)
            return '"' + this.fileName + '", line ' + this.lineNumber
    
          if (this.fileName)
            return '"' + this.fileName + '"'
    
          if (this.fileName && this.lineNumber)
            return 'line ' + this.lineNumber
    
          return undefined
        }
      )
    
    
      Z.ExceptionDetails.declare_member(
        'displayLines',
    
        function ExceptionDetails__displayLines(lines)
        {
          if (typeof this.e == 'string')
          {
            lines.push('Exception: ' + this.e)
            return
          }
    
          if (this.name && this.message)
          {
            var extra = ''
    
            if (this.number && this.result)
            {
              extra = ' (number: ' + this.number
                      + '; result: ' + this.result + ')'
            }
            else if (this.number)
              extra = ' (number: ' + this.number + ')'
            else if (this.result)
              extra = ' (result: ' + this.result + ')'
    
            lines.push(this.name + ': ' + this.message + extra)
          }
          else
          {
            if (this.name)
              lines.push('Name: ' + this.name)
    
            if (this.message)
              lines.push('Message: ' + this.message)
    
            if (this.number)
              lines.push('Number: ' + this.number)
    
            if (this.result)
              lines.push('Result: ' + this.result)
          }
    
          if (this.description && this.description != this.message)
            lines.push('Description: ' + this.description)
    
          if (this.stack)
          {
            lines.push('Stack:')
    
            var stack = this.stack.split('\n')
            var length = stack.length
    
            if (length && stack[length - 1] == '')
              length --
    
            for (var i = 0; i < length; i ++)
            {
              var s = stack[i]
    
              if (length > 20 && 7 <= i && i < length - 7)
              {
                if (i == 7)
                {
                  lines.push(' ... another ' + (length - 14) + ' entries ...')
                }
    
                continue
              }
    
              var at = s.indexOf('@')
              var colon = s.lastIndexOf(':')
    
              if (0 <= at && at < colon)
              {
                var location = '"' + s.substring(at + 1, colon) + '"'
                               + ', line ' + s.substring(colon + 1)
    
                if (at == 0)
                  lines.push(' ' + location)
                else
                  lines.push(' ' + s.substring(0, at) + ' at ' + location)
              }
              else
                lines.push(' ' + s)
            }
          }
    
          if (this.other)
          {
            var keys = Z.sortedKeys(this.other)
    
            for (var k in keys)
            {
              var k2 = keys[k]
    
              lines.push(k2 + ': ' + this.other[k2])
            }
          }
        }
      )
    
    
      Z.declare(
        'exception',
    
        function exception(context, e, step)
        {
          Z.error('Sorry: An internal error occurred from this web page.')
    
          try
          {
            var lines = []
            var details = new Z.ExceptionDetails(e)
    
            details.analyze()
    
            var s = 'Details: A javascript exception was caught in ' + context
    
            if (step)
              s += ' #' + step
    
            var location = details.location()
    
            if (location)
              lines.push(s + ' at ' + location)
            else
              lines.push(s)
    
            details.displayLines(lines)
    
            for (var i = 0; i < lines.length; i ++)
            {
              var s = lines[i]
    
              if (s.charCodeAt(0) == 32)            //  ' '
                Z.indentError(s.substring(1))
              else
                Z.error(s)
            }
    
            if (Z.configuration.testExceptions)
            {
              (
                function recurse(depth)
                {
                  if (depth < 5)
                    recurse(depth + 1)
                }
              ) (1)
            }
          }
          catch (e2)
          {
            Z.error('Sorry: Another exception caught'
                    + ' while processing original exception.')
    
            try
            {
              var s = e2.toString()
    
              if (   s == '[object Error]'
                  && typeof e2 == 'object'
                  && e2.name
                  && e2.message
              )
              {
                s = e2.name + ': ' + e2.message
              }
    
              Z.error(s)
            }
            catch (e3)
            {
            }
          }
        }
      )
    }
  ) (Zixie.r0);
}
catch (e)
{
  alert('Exception in quixie-exception.mix\n' + e)
}

//  quixie-testException.mix
try
{
  if (window.Zixie)
    delete Zixie.r0.step;

  (
    function quixie_testException_mix(Z)
    {
      if (Z.configuration.testExceptions)
      {
        function ieVersion_or_null()
        {
          if (navigator.appName == 'Microsoft Internet Explorer')
          {
            var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})")
            var match = re.exec(navigator.userAgent)
            if (match)
              return parseFloat(match[1])
          }
    
          return null
        }
    
        var ieVersion = ieVersion_or_null()
    
        Z.step = 1
    
        if (document.addEventListener)
        {
          Z.debug('Testing catching an exception in addEventListener ...')
          try
          {
            document.addEventListener('xyzzy', undefined, false)
          }
          catch (e)
          {
            Z.exception("addEventListener('xyzzy', undefined, false)", e)
          }
        }
    
        Z.step = 2
    
        if (document.addEventListener)
        {
          Z.debug('Testing catching an exception in addEventListener'
                  + ' (with wrong value for this) ...')
    
          try
          {
            var o = { addEventListener: document.addEventListener }
    
            o.addEventListener('keydown', function (event) {}, false)
          }
          catch (e)
          {
            Z.exception("{}.addEventListener(...)", e)
          }
        }
    
        Z.step = 3
    
        if (document.attachEvent)
        {
          Z.debug('Testing catching an exception in attachEvent'
                  + ' (with wrong value for this) ...')
    
          try
          {
            var o = { attachEvent: document.attachEvent }
    
            o.attachEvent('onkeydown', function (event) {})
    
            Z.error('Hmm: No exception thrown from attachEvent'
                    + ' (with wrong value for this) ...')
          }
          catch (e)
          {
            Z.exception("{}.attachEvent(...)", e)
          }
        }
    
    
        Z.step = 4
    
        Z.debug('Testing catching an exception of an undefined variable ...')
    
        var recursive = function recursive(depth)
        {
          try
          {
            if (depth == 100)
            {
              try
              {
                UndefinedVariableAtDepth100
              }
              catch (e)
              {
                Z.exception('recursive call #' + depth, e)
              }
            }
            else
              recursive(depth + 1)
          }
          catch (e)
          {
            Z.exception('recursive call #' + depth, e)
          }
        }
    
        recursive(1)
    
        Z.step = 5
    
        Z.debug('Testing catching an exception of stack overflow ...')
    
        if (ieVersion && ieVersion < 7.0)
        {
          Z.error('Avoiding stack overflow test on IE ' + ieVersion
                  + ' (tends to crash browser)')
        }
        else
        {
          var recursive = function recursive(depth)
          {
            try
            {
              if (depth < 10000)
                recursive(depth + 1)
              else
              {
                Z.debug('stack did not overflow even with ' + depth
                        + ' recursive calls!')
              }
            }
            catch (e)
            {
              Z.exception('recursive call #' + depth, e)
            }
          }
    
          recursive(1)
        }
    
    
        Z.step = 6
    
        Z.debug('Testing Wrapper code catching an error ...')
    
        UndefinedVariable
      }
    }
  ) (Zixie.r0);
}
catch (e)
{
  var s = 'quixie-testException.mix'

  if (window.Zixie && Zixie.r0.step)
    s += ' #' + Zixie.r0.step

  Zixie.r0.exception(s, e)
}

//  quixie-when.mix
try
{
  (
    function quixie_when_mix(Z)
    {
      Z.when = {
        declare: Z.declare,
        displayName: 'Z.when',
    
        EARLY: 1,
        DOM: 2,
        READY: 3,
    
        era: 1,             //  Initial era is EARLY
        era_name: 'early',
    
        dom: false,         //  Z.when.dom   = (Z.when.era >= Z.when.DOM)
        ready: false        //  Z.when.ready = (Z.when.era >= Z.when.READY)
      }
    
      var W = Z.when
    
    
      W.declare(
        'startEra_dom',
    
        function startEra_dom()
        {
          if (W.era < W.DOM)
          {
            W.era = W.DOM
            W.era_name = 'dom'
          }
    
          W.dom = true
        }
      )
    
    
      W.declare(
        'startEra_ready',
    
        function startEra_ready()
        {
          W.era = W.READY
          W.era_name = 'ready'
          W.dom = true
          W.ready = true
        }
      )
    
    
      if (Z.timing.window_onload)
        W.startEra_ready()
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-when.mix', e)
}

//  quixie-queue.mix
try
{
  if (window.Zixie)
    delete Zixie.r0.step;

  (
    function quixie_queue_mix(Z)
    {
      var debug = false
    
      Z.queue = {
        declare: Z.declare,
        displayName: 'Z.queue',
    
        exists: false,
    
        early_queue: [],
        dom_queue: [],
        ready_queue: []
      }
    
      var W = Z.when
      var Q = Z.queue
    
      Q.declare(
        'early',
    
        function queue__early(name, f, self)
        {
          Q.early_queue.push({ name: name, f: f, self: self })
          Q.exists = true
        }
      )
    
      Q.declare(
        'dom',
    
        function queue__dom(name, f, self)
        {
          Q.dom_queue.push({ name: name, f: f, self: self })
          Q.exists = true
        }
      )
    
      Q.declare(
        'ready',
    
        function queue__ready(name, f, self)
        {
          Q.ready_queue.push({ name: name, f: f, self: self })
          Q.exists = true
        }
      )
    
    
      Q.declare(
        'run',
    
        function queue__run()
        {
          var zap = false
    
          try
          {
            if (Z.running)
            {
              Z.failed_message('Queue.run: Zixie already running'
                               + ": '" + Z.running + "'")
            }
    
            zap = true
            Z.running = 'Queue.run'
    
            if (debug)
            {
              Z.debug('Queue.run'
                      + ', era: ' + W.era_name
                      + '; early ' + Q.early_queue.length
                      + ', dom ' + Q.dom_queue.length
                      + ', ready ' + Q.ready_queue.length)
            }
    
            delete Q.exists
    
            var era   = null
            var queue = null
    
            for (var i = W.EARLY; i <= W.READY; i ++)
            {
              if (i == W.EARLY)
              {
                era   = 'early'
                queue = Q.early_queue
              }
              else if (i == W.DOM)
              {
                if ( ! W.dom)
                {
                  Q.exists = true
                  continue
                }
    
                era   = 'dom'
                queue = Q.dom_queue
              }
              else
              {
                if ( ! W.ready)
                {
                  Q.exists = true
                  continue
                }
    
                era   = 'ready'
                queue = Q.ready_queue
              }
    
    
              for (var j = 0; j < queue.length; j ++)
              {
                var q = queue[j]
    
                if (debug)
                  Z.debug('Q.' + era + '_queue[' + j + ']: ' + q.name)
    
                q[j] = null
    
                if (j == queue.length - 1)
                {
                  while (queue.length)
                    queue.pop()
    
                  j = -1
                }
    
                Z.running = q.name
    
                if (q.self)
                {
                  delete q.step
                  delete Z.step
    
                  try
                  {
                    q.f.call(q.self)
                  }
                  catch (e)
                  {
                    Z.exception(q.name, e, q.step || Z.step)
                  }
                }
                else
                {
                  delete Z.step
    
                  try
                  {
                    q.f()
                  }
                  catch (e)
                  {
                    Z.exception(q.name, e, Z.step)
                  }
                }
    
                if (Z.running != q.name)
                {
                  Z.failed_message('Queue.run: Z.running != q.name'
                                   + ' (Z.running: ' + Z.running
                                   + '; name: ' + q.name
                                   + ')')
                }
    
                Z.running = 'Queue.run'
              }
            }
          }
          catch (e)
          {
            Z.exception('Queue.run', e)
          }
    
          if (zap)
            delete Z.running
        }
      )
    }
  ) (Zixie.r0);
}
catch (e)
{
  var s = 'quixie-queue.mix'

  if (window.Zixie && Zixie.r0.step)
    s += ' #' + Zixie.r0.step

  Zixie.r0.exception(s, e)
}

//  quixie-active.mix
try
{
  (
    function quixie_active_mix(Z)
    {
      var debug = false
      var Q = Z.queue
    
      Z.declare(
        'enter_script',
    
        function enter_script(name)
        {
          try
          {
            if (debug)
              Z.debug('enter_script: ' + name)
    
            if (Z.running)
            {
              Z.failed_message('enter_script: Zixie already running'
                               + ": '" + Z.running + "'")
            }
    
            Z.running = name
          }
          catch (e)
          {
            Z.exception('enter_script', e)
          }
        }
      )
    
      Z.declare(
        'leave_script',
    
        function leave_script(name)
        {
          try
          {
            if (debug)
              Z.debug('leave_script: ' + name)
    
            if (Z.running != name)
            {
              Z.failed_message('leave_script: Z.running != name'
                               + ' (Z.running: ' + Z.running
                               + '; name: ' + name
                               + ')')
            }
    
            delete Z.running
    
            if (Q.exists)
              Q.run()
          }
          catch (e)
          {
            Z.exception('leave_script', e)
          }
        }
      )
    
      Z.enter_script(Z.script_name)
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-active.mix', e)
}

//  quixie-timing.mix
try
{
  (
    function quixie_timing_mix(Z)
    {
      var now = new Date()
      var time0 = now
    
      if (window.Ajax && Ajax.r0 && Ajax.r0.started)
        time0 = Ajax.r0.started
      else if (Z.timing.fast_boot)
        time0 = Z.timing.fast_boot
      else if (Z.timing.zixie_loaded)
        time0 = Z.timing.zixie_loaded
    
      Z.timing.time0 = time0
    
      Z.timing.message = function(when, description)
      {
        Z.debug('+' + (when - Z.timing.time0) + ': ' + description)
      }
    
      Z.debug('+#: The # represents the number of milliseconds'
            + ' (1000ths of a second)')
    
      if (window.Ajax && Ajax.r0 && Ajax.r0.started)
        Z.timing.message(Ajax.r0.started, 'Ajax started')
    
      if (Z.timing.fast_boot)
        Z.timing.message(Z.timing.fast_boot, 'fast boot started')
    
      if (Z.timing.window_onload)
      {
        Z.timing.message(
          Z.timing.window_onload,
          'window.onload (from fast boot)'
        )
      }
    
      if (Z.timing.zixie_loaded)
        Z.timing.message(Z.timing.zixie_loaded, Z.script_name + ' loaded')
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-timing.mix', e)
}

//  quixie-string1.mix
try
{
  (
    function quixie_string1_mix(Z)
    {
      Z.string = { declare: Z.declare }
    
      Z.string.declare(
        'ends_with',
    
        function String__ends_with(s, ending)
        {
          return (
               s.length >= ending.length
            && s.substring(s.length - ending.length) == ending
          )
        }
      )
    
    
      Z.string.declare(
        'has_suffix',
    
        function String__has_suffix(s, suffix)
        {
          return (
               s.length > suffix.length
            && s.substring(s.length - suffix.length) == suffix
          )
        }
      )
    
      Z.string.declare(
        'starts_with',
    
        function String__starts_with(s, beginning)
        {
          return (
               s.length >= beginning.length
            && s.substring(0, beginning.length) == beginning
          )
        }
      )
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-string1.mix', e)
}

//  quixie-Callback.mix
try
{
  if (window.Zixie)
    delete Zixie.r0.step;

  (
    function quixie_Callback_mix(Z)
    {
      var Q = Z.queue
    
    
      function Callback(name, run, enclosing)
      {
        this.name = name
    
        if (run !== undefined)
          this.run = run
    
        if (enclosing !== undefined)
          this.enclosing = enclosing
      }
    
    
      Z.declare_class('Callback', Callback)
    
    
      Callback.declare_static_member(
        'blank',
    
        function Callback__blank()
        {
        }
      )
    
    
      Callback.declare_static_member(
        'enter',
    
        function Callback__enter(t)
        {
          try
          {
            if (Z.running)
            {
              Z.failed_message('Callback.enter: Zixie already running'
                               + ": '" + Z.running + "'"
                               + "; t.name: '" + t.name + "'")
            }
    
            delete t.step
            delete Z.step
    
            Z.running = t.name
          }
          catch (e)
          {
            Z.exception('Callback.enter', e)
            return false
          }
    
          return true
        }
      )
    
    
      Callback.declare_static_member(
        'leave',
    
        function Callback__leave(t)
        {
          try
          {
            if (Z.running != t.name)
            {
              Z.failed_message('Callback.leave: Z.running != t.name'
                               + ' (Z.running: ' + Z.running
                               + '; name: ' + t.name
                               + ')')
            }
    
            delete Z.running
    
            if (Q.exists)
              Q.run()
          }
          catch (e)
          {
            Z.exception('Callback.leave', e)
          }
        }
      )
    
    
      Callback.declare_member(
        'at_stop',
    
        function Callback__at_stop(f)
        {
          if (this.instance_stop)
          {
            Z.failed_message('at_stop called multiple times on instance'
                             + " '" + this.name + "'")
          }
    
          this.instance_stop = f
        }
      )
    
    
      Callback.declare_member(
        'at_zap',
    
        function Callback__at_zap(f)
        {
          if (this.instance_zap)
          {
            Z.failed_message('at_zap called multiple times on instance'
                             + " '" + this.name + "'")
          }
    
          this.instance_zap = f
        }
      )
    
    
      Callback.declare_member(
        'stop',
    
        function Callback__stop()
        {
          var f = this.instance_stop
    
          delete this.instance_stop
    
          if (f)
            f()
        }
      )
    
    
      Callback.declare_member(
        'zap',
    
        function Callback__zap()
        {
          this.stop()
    
          var f = this.instance_zap
    
          delete this.instance_zap
    
          if (f)
            f()
    
          delete this.handleEvent
          delete this.enclosing
        }
      )
    
    
      Callback.declare_static_member(
        'verify_arguments',
    
        function Callback__verify_arguments(function_name, passed)
        {
          if (2 <= passed.length && passed.length <= 3) {}
          else
          {
            var arguments_display = '1 argument'
    
            if (passed.length >= 1)
              arguments_display = passed.length + ' arguments'
    
            Z.failed_message(function_name + ': '
                             + arguments_display + ' given (expected 2 or 3)')
          }
    
          var name = passed[0]
          var run  = passed[1]
    
          if (typeof name != 'string')
          {
            Z.failed_message(function_name + ": argument 'name' is of type "
                             + (typeof name) + ' (expected string)')
          }
    
          if (run !== undefined && typeof run != 'function')
          {
            Z.failed_message(function_name + ": argument 'run' is of type "
                             + (typeof run) + ' (expected undefined or function)')
          }
    
          if (passed.length == 3)
          {
            var enclosing = passed[2]
    
            if (typeof enclosing != 'object')
            {
              Z.failed_message(function_name + ": argument 'enclosing' is of type "
                               + (typeof enclosing) + ' (expected object)')
            }
          }
        }
      )
    }
  ) (Zixie.r0);
}
catch (e)
{
  var s = 'quixie-Callback.mix'

  if (window.Zixie && Zixie.r0.step)
    s += ' #' + Zixie.r0.step

  Zixie.r0.exception(s, e)
}

//  quixie-HttpRequest.mix
try
{
  if (window.Zixie)
    delete Zixie.r0.step;

  (
    function quixie_HttpRequest_mix(Z)
    {
      var Callback = Z.Callback
    
    
      var native_request = false
    
      if (window.XMLHttpRequest)
        native_request = true
      else if (window.ActiveXObject)
      {
      }
      else
      {
        Z.failed_message('XMLHttpRequest (or ActiveXObject substitute)'
                         + ': neither exist')
      }
    
    
      function HttpRequest(name, run)
      {
        Callback.call(this, name, run)
      }
    
    
      Z.declare_derived_class('HttpRequest', HttpRequest, Callback)
    
    
      if (native_request)
      {
        HttpRequest.declare_member(
          'start',
    
          function HttpRequest__start(url)
          {
            if (this.request != undefined)
              Z.failed_message('HttpRequest.start: this.request already exists')
    
            this.request = new XMLHttpRequest()
    
            this.request.open('GET', url, true)
            this.request.onreadystatechange = this.handleEvent
    
            {
              if (this.sending)
              {
                Z.failed_message('HttpRequest__start'
                                 + ': this.reading_size already set')
              }
    
              this.sending = true
              this.request.send(null)
              this.sending = false
            }
          }
        )
      }
      else
      {
        var provider = [ 'Whatever', 'Msxml2.XMLHTTP', 'Microsoft.XMLHTTP' ]
        var provider_index = 0
    
        HttpRequest.declare_member(
          'start',
    
          function HttpRequest__start(url)
          {
            if (this.request != undefined)
              Z.failed_message('HttpRequest.start: this.request already exists')
    
            for (var i = provider_index; i < provider.length; i ++)
            {
              try
              {
                Z.error('Testing index #' + i + ' ...')
                this.request = new ActiveXObject(provider[i])
                provider_index = i
                break
              }
              catch (e)
              {
              }
            }
    
            if ( ! this.request)
            {
              Z.failed_message('ActiveXObject substitute for XMLHttpRequest'
                               + ': does not exist (or disabled)')
            }
    
            this.request.onreadystatechange = this.handleEvent
            this.request.open('GET', url, true)
            this.request.send(null)
          }
        )
      }
    
    
      HttpRequest.declare_member(
        'stop',
    
        function HttpRequest__stop()
        {
          this.request.onreadystatechange = Callback.blank
    
          if (this.request.readyState != 0 && this.request.readyState != 4)
            this.request.abort()
    
          this.request = null
    
          Callback.prototype.stop.call(this)
        }
      )
    
    
      function create__HttpRequest__onReadyStateChange(t)
      {
        return function HttpRequest__onReadyStateChange()
        {
          try
          {
            if (t.request.readyState != 4)
              return
    
            if (t.sending)
            {
              Z.queue.early(t.name, t.run, t)
              return
            }
    
            if ( ! Callback.enter(t))
              return
    
            t.run()
          }
          catch (e)
          {
            Z.exception('onReadyStateChange for ' + t.name, e, t.step || Z.step)
          }
    
          Callback.leave(t)
        }
      }
    
    
      Z.declare(
        'create_HttpRequest',
    
        function create_HttpRequest(name, run)
        {
          Callback.verify_arguments('create_HttpRequest', arguments)
    
          var t = new HttpRequest(name, run)
    
          t.handleEvent = create__HttpRequest__onReadyStateChange(t)
    
          return t
        }
      )
    }
  ) (Zixie.r0);
}
catch (e)
{
  var s = 'quixie-HttpRequest.mix'

  if (window.Zixie && Zixie.r0.step)
    s += ' #' + Zixie.r0.step

  Zixie.r0.exception(s, e)
}

//  quixie-Listener.mix
try
{
  if (window.Zixie)
    delete Zixie.r0.step;

  (
    function quixie_Listener_mix(Z)
    {
      var Callback = Z.Callback
    
    
      var dom_listen_method = false
    
      if (document.addEventListener)
        dom_listen_method = true
      else if (document.attachEvent)
      {
      }
      else
      {
        Z.failed_message('document.{addEventListener,attachEvent}: neither exist')
      }
    
    
      function Listener(name, run, enclosing)
      {
        Callback.call(this, name, run, enclosing)
      }
    
    
      Z.declare_derived_class('Listener', Listener, Callback)
    
    
      Listener.dom_listen_method = dom_listen_method
    
    
      if (dom_listen_method)
      {
        Listener.declare_member(
          'handleEvent',
    
          function Listener__handleEvent(event)
          {
            try
            {
              if ( ! Callback.enter(this))
                return
    
              this.run(event)
            }
            catch (e)
            {
              Z.exception('handleEvent for ' + this.name, e, this.step || Z.step)
            }
    
            Callback.leave(this)
          }
        )
      }
      else
      {
        function create_attachEvent_handler(t)
        {
          return function attachEvent_handler()
          {
            try
            {
              if ( ! Callback.enter(t))
                return
    
              t.run(window.event)
            }
            catch (e)
            {
              Z.exception('handler for ' + t.name, e, t.step || Z.step)
            }
    
            Callback.leave(t)
          }
        }
      }
    
    
      Listener.declare_member(
        'empty',
    
        function Timer__empty()
        {
          return (this.speaker === undefined)
        }
      )
    
    
      Listener.declare_member(
        'listen',
    
        function Listener__listen(speaker, eventType)
        {
          if (this.speaker)
          {
            Z.failed_message("listener '" + this.name + "'"
                             + " already listening to '" + this.eventType + '"')
          }
    
          this.listen_auxiliary(speaker, eventType)
          this.speaker = speaker
          this.eventType = eventType
        }
      )
    
    
      if (dom_listen_method)
      {
        Listener.declare_member(
          'listen_auxiliary',
    
          function Listener__listen_auxiliary(speaker, eventType)
          {
            speaker.addEventListener(eventType, this, false)
          }
        )
      }
      else
      {
        Listener.declare_member(
          'listen_auxiliary',
    
          function Listener__listen_auxiliary(speaker, eventType)
          {
            speaker.attachEvent('on' + eventType, this.handleEvent)
          }
        )
      }
    
    
      Listener.declare_member(
        'listen_knownEventType',
    
        function Listener__listen_knownEventType(speaker)
        {
          this.listen_auxiliary(speaker, this.eventType)
    
          if (this.speaker)
          {
            if (this.other_speakers)
              this.other_speakers.push(speaker)
            else
              this.other_speakers = [ this.speaker ]
          }
          else
            this.speaker = speaker
        }
      )
    
    
      Listener.declare_member(
        'stop',
    
        function Listener__stop()
        {
          if ( ! this.speaker)
            return
    
          Callback.prototype.stop.call(this)
    
          this.stop_auxiliary(this.speaker, this.eventType)
          delete this.speaker
    
          var other_speakers = this.other_speakers
    
          if (other_speakers)
          {
            delete this.other_speakers
    
            for (var i = 0; i < other_speakers.length; i ++)
              this.stop_auxiliary(other_speakers[i], this.eventType)
          }
    
          delete this.eventType
        }
      )
    
    
      if (dom_listen_method)
      {
        Listener.declare_member(
          'stop_auxiliary',
    
          function Listener__stop_auxiliary(speaker, eventType)
          {
            speaker.removeEventListener(eventType, this, false)
          }
        )
      }
      else
      {
        Listener.declare_member(
          'stop_auxiliary',
    
          function Listener__stop_auxiliary(speaker, eventType)
          {
            speaker.detachEvent('on' + eventType, this.handleEvent)
          }
        )
      }
    
    
      Z.declare(
        'create_Listener',
    
        function create_Listener(name, run)
        {
          Callback.verify_arguments('create_Listener', arguments)
    
          var t = new Listener(name, run)
    
          if ( ! dom_listen_method)
            t.handleEvent = create_attachEvent_handler(t)
    
          return t
        }
      )
    }
  ) (Zixie.r0);
}
catch (e)
{
  var s = 'quixie-Listener.mix'

  if (window.Zixie && Zixie.r0.step)
    s += ' #' + Zixie.r0.step

  Zixie.r0.exception(s, e)
}

//  quixie-Timer.mix
try
{
  if (window.Zixie)
    delete Zixie.r0.step;

  (
    function quixie_Timer_mix(Z)
    {
      var Callback = Z.Callback
    
      function Timer(name, run)
      {
        Callback.call(this, name, run)
      }
    
    
      Z.declare_derived_class('Timer', Timer, Callback)
    
    
      Timer.declare_member(
        'empty',
    
        function Timer__empty()
        {
          return (this.timeoutID === undefined)
        }
      )
    
    
      Timer.declare_member(
        'planned',
    
        function Timer__empty()
        {
          return (this.timeoutID !== undefined)
        }
      )
    
    
      Timer.declare_member(
        'schedule',
    
        function Timer__schedule(delay)
        {
          if (this.timeoutID !== undefined)
            Z.failed_message('timer already scheduled: ' + this.name)
    
          this.timeoutID = window.setTimeout(this.handleEvent, delay)
        }
      )
    
    
      Timer.declare_member(
        'stop',
    
        function Timer__stop()
        {
          Callback.prototype.stop.call(this)
    
          if (this.timeoutID !== undefined)
          {
            window.clearTimeout(this.timeoutID)
            delete this.timeoutID
          }
        }
      )
    
    
      function create__Timer__callback(t)
      {
        return function Timer__callback()
        {
          try
          {
            delete t.timeoutID      //  <----- This line has been added
    
            if ( ! Callback.enter(t))
              return
    
            t.run()
          }
          catch (e)
          {
            Z.exception('callback for ' + t.name, e, t.step || Z.step)
          }
    
          Callback.leave(t)
        }
      }
    
    
      Z.declare(
        'create_Timer',
    
        function create_Timer(name, run)
        {
          Callback.verify_arguments('create_Timer', arguments)
    
          var t = new Timer(name, run)
    
          t.handleEvent = create__Timer__callback(t)
    
          return t
        }
      )
    }
  ) (Zixie.r0);
}
catch (e)
{
  var s = 'quixie-Timer.mix'

  if (window.Zixie && Zixie.r0.step)
    s += ' #' + Zixie.r0.step

  Zixie.r0.exception(s, e)
}

//  quixie-UserCallback.mix
try
{
  if (window.Zixie)
    delete Zixie.r0.step;

  (
    function quixie_UserCallback_mix(Z)
    {
      var Callback = Z.Callback
    
    
      function UserCallback(name, run)
      {
        Callback.call(this, name, run)
      }
    
    
      Z.declare_derived_class('UserCallback', UserCallback, Callback)
    
    
      function create_handleEvent(t)
      {
        return function handleEvent()
        {
          try
          {
            if ( ! Callback.enter(t))
              return
    
            t.run()
          }
          catch (e)
          {
            Z.exception("handleEvent for '" + t.name + "'", e, t.step || Z.step)
          }
    
          Callback.leave(t)
        }
      }
    
    
      Z.declare(
        'create_UserCallback',
    
        function create_UserCallback(name, run)
        {
          Callback.verify_arguments('create_UserCallback', arguments)
    
          var t = new Z.UserCallback(name, run)
    
          t.handleEvent = create_handleEvent(t)
    
          return t
        }
      )
    }
  ) (Zixie.r0);
}
catch (e)
{
  var s = 'quixie-UserCallback.mix'

  if (window.Zixie && Zixie.r0.step)
    s += ' #' + Zixie.r0.step

  Zixie.r0.exception(s, e)
}

//  quixie-key.mix
try
{
  (
    function quixie_key_mix(Z)
    {
      var listener = Z.create_Listener(
        'keydown',
    
        function keydown__run(event)
        {
          var code = event.keyCode ? event.keyCode : event.which
    
          if (code == 90 /* && event.ctrlKey */)        //  'Z'
            Z.consoleFlip()
        }
      )
    
      listener.listen(document, 'keydown')
    
      Z.key_listener = listener
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-key.mix', e)
}

//  quixie-dom1.mix
try
{
  (
    function quixie_dom1_mix(Z)
    {
      Z.dom = {
        declare: Z.declare,
        declare_class: Z.declare_class,
        displayName: 'Z.dom'
      }
    
      var D = Z.dom
    
      if (document.documentElement) {}
      else
      {
        Z.assertion_failed('document.documentElement exists'
                           + ' (the <html> tag)')
      }
    
      D.root = document.documentElement
    
    
      var headTags = document.getElementsByTagName('head')
    
      if (headTags.length != 1)
      {
        Z.failed_message(
          'found ' + headTags.length + ' <head> tags' + ' (only one expected)'
        )
      }
    
      D.head = headTags[0]
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-dom1.mix', e)
}

//  quixie-css.mix
try
{
  (
    function quixie_css_mix(Z)
    {
      Z.css = { declare: Z.declare }
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-css.mix', e)
}

//  quixie-stylesheet1.mix
try
{
  (
    function quixie_stylesheet1_mix(Z)
    {
      Z.stylesheet = { declare: Z.declare }
    
      var SHEET = Z.stylesheet
    
      SHEET.declare(
        'find_or_null',
    
        function stylesheet__find_or_null(title)
        {
          if (document.styleSheets)
          {
            for (var i = 0; i < document.styleSheets.length; i ++)
            {
              var sheet = document.styleSheets[i]
    
              if (sheet.title == title)
                return sheet
            }
          }
    
          return null
        }
      )
    
      SHEET.declare(
        'create',
    
        function stylesheet__create(title)
        {
          var css = document.createElement('style')
    
          css.type = 'text/css'
          css.rel = 'stylesheet'
          css.title = title
    
          Z.dom.head.appendChild(css)
    
          result = Z.stylesheet.find_or_null(title)
    
          if ( ! result)
          {
            Z.failed_message(
              "can't find stylesheet (with title '" + title + "')"
              + " that was just created"
            )
          }
    
          return result
        }
      )
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-stylesheet1.mix', e)
}

//  quixie-onload.mix
try
{
  (
    function quixie_onload_mix(Z)
    {
      if ( ! Z.when.ready)
      {
        var listener = Z.create_Listener(
          'window load',
    
          function window_load__run(event)
          {
            var now = new Date()
    
            if (document.addEventListener)
            {
              if (event.target != document)
              {
                Z.debug('Ignore load event on: ' + event.target)
                return
              }
            }
    
            Z.timing.message(now, 'window load')
            Z.when.startEra_ready()
          }
        )
    
        listener.at_zap(
          function window_load__at_zap()
          {
            listener = null
          }
        )
    
        Z.queue.ready(
          'zap window load',
          listener.zap,
          listener
        )
    
        listener.listen(window, 'load')
      }
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-onload.mix', e)
}

//  quixie-ready-dom.mix
try
{
  (
    function quixie_ready_dom_mix(Z)
    {
      if (Z.when.dom)
        return
    
      var body_status = function body_status(description)
      {
        try
        {
          var now = new Date()
    
          if (Z.when.dom)
            Z.timing.message(now, description + ' (previously ready)')
          else if (document.body)
            Z.timing.message(now, description + ' (<body> available)')
          else
            Z.timing.message(now, description + ' (<body> missing)')
        }
        catch (e)
        {
          Z.exception('body_status', e)
        }
      }
    
      var tests_active = 0
    
      var tests_cleanup = function tests_cleanup()
      {
        body_status = null
        tests_active = null
        tests_cleanup = null
        tests_decrement = null
      }
    
      var tests_decrement = function tests_decrement()
      {
        tests_active --
    
        if (tests_active == 0)
          tests_cleanup()
      }
    
      if (document.addEventListener)
      {
        tests_active ++
    
        var event_name = 'DOMContentLoaded'
    
        var listener = Z.create_Listener(
          event_name,
    
          function DOMContentLoaded__run(event)
          {
            body_status('DOM content loaded')
            Z.when.startEra_dom()
          }
        )
    
        Z.queue.dom(
          event_name + ' cleanup',
    
          function DOMContentLoaded__cleanup()
          {
            listener.zap()
            listener = null
    
            tests_decrement()
          }
        )
    
        listener.listen(window, event_name)
      }
    
      if (tests_active == 0)
        tests_cleanup()
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-ready-dom.mix', e)
}

//  quixie-ready-ie.mix
try
{
  (
    function quixie_ready_ie_mix(Z)
    {
      if (Z.when.dom || ! Z.ie)
        return
    
    
      {
        var scroll_first_exception = true
        var scroll_element = document.createElement('div')
        var scroll_ready = false
    
        var scroll_test = function scroll_test()
        {
          if ( ! scroll_ready)
          {
            try
            {
              scroll_element.doScroll('left')
              scroll_ready = true
            }
            catch (e)
            {
              if (scroll_first_exception && Z.configuration.testExceptions)
              {
                scroll_first_exception = false
                Z.debug('Displaying the [internal] doScroll exception ...')
                Z.exception('doScroll', e)
              }
            }
          }
    
          return scroll_ready
        }
    
        Z.queue.dom(
          'scroll test cleanup',
    
          function scroll_test__cleanup()
          {
            scroll_element = null
            scroll_test = null
          }
        )
      }
    
    
      var body_status_test = function body_status_test(description)
      {
        try
        {
          var now = new Date()
    
          if (Z.when.dom)
            Z.timing.message(now, description + ' (previously ready)')
          else if (document.body)
          {
            if (scroll_test())
            {
              Z.timing.message(now, description + ' (<body> & scroll)')
              Z.when.startEra_dom()
            }
            else
              Z.timing.message(now, description + ' (<body> & no scroll)')
          }
          else
          {
            if (scroll_test())
              Z.timing.message(now, description + ' (no <body> & scroll)')
            else
              Z.timing.message(now, description + ' (no <body> & no scroll)')
          }
        }
        catch (e)
        {
          Z.exception('body_status_test', e)
        }
      }
    
      var tests_active = 0
    
      var tests_cleanup = function tests_cleanup()
      {
        body_status_test = null
        tests_active = null
        tests_cleanup = null
        tests_decrement = null
      }
    
      var tests_decrement = function tests_decrement()
      {
        tests_active --
    
        if (tests_active == 0)
          tests_cleanup()
      }
    
    
      if (Z.script_name == 'zixie.js')
      {
        tests_active ++
    
    
        Z.behaviorReady = Z.create_UserCallback(
          'behavior ready',
    
          function behavior_ready__run()
          {
            body_status_test('behavior on document ready')
            this.zap()
          }
        )
    
        Z.behaviorReady.at_zap(
          function behaviorReady__at_zap()
          {
            delete Z.behaviorReady
            tests_decrement()
    
          }
        )
    
        Z.stylesheet.create('zixie').addRule('body', 'behavior: url(zixie.htc)')
      }
    
    
      {
        tests_active ++
    
        var script = document.createElement('script')
    
        script.defer = 'defer'
    
        var script_callback = Z.create_UserCallback(
          'deferred script',
    
          function deferred_script__run()
          {
            body_status_test('deferred script: ' + script.readyState)
    
            script_callback.zap()
            script_callback = null
    
            Z.dom.head.removeChild(script)
            script = null
    
            tests_decrement()
          }
        )
    
        script_callback.at_stop(
          function deferred_script__stop()
          {
            script.onreadystatechange = null
          }
        )
    
        script.onreadystatechange = script_callback.handleEvent
        Z.dom.head.appendChild(script)
      }
    
    
      if (document.readyState != undefined && document.readyState != 'complete')
      {
        tests_active ++
    
        var document_callback = Z.create_Listener(
          'document onReadyStateChange',
    
          function document_onReadyStateChange__run()
          {
            body_status_test('document.readyState: ' + document.readyState)
          }
        )
    
        Z.queue.dom(
          'document onReadyStateChange cleanup',
    
          function document_onReadyStateChange__cleanup()
          {
            document_callback.zap()
            document_callback = null
            tests_decrement()
          }
        )
    
        document_callback.listen(document, 'readystatechange')
      }
    
    
      {
        tests_active ++
    
        var timer_wait = 0
    
        var timer = Z.create_Timer(
          'timing test',
    
          function timing_test__run()
          {
            body_status_test('timing test ' + timer_wait)
    
            if ( ! Z.when.dom)
            {
              timer_wait = (timer_wait * 2) + 1
    
              if (timer_wait > 14)
                timer_wait = 14
    
              timer.schedule(timer_wait)
            }
          }
        )
    
        Z.queue.dom(
          'timing test cleanup',
    
          function timing_test__cleanup()
          {
            timer.zap()
            timer = null
            tests_decrement()
          }
        )
    
        timer.schedule(timer_wait)
      }
    
      if (tests_active == 0)
        tests_cleanup()
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-ready-ie.mix', e)
}

//  quixie-console.mix
try
{
  (
    function quixie_console_mix(Z)
    {
      Z.declare_with_initialize(
        'consoleShow',
    
        function consoleShow_initialize()
        {
          var V = Z.console.view
          var S = V.style
    
          S.border = '2px inset #AAA'
          S.background = '#BBB'
          S.padding = '5px'
          S.width = '690px'
          S.height = '290px'
          S.overflow = 'auto'
    
          var W = document.createElement('div')
          var S = W.style
    
          S.position = 'absolute'
          S.bottom = '5px'
          S.left = '5px'
          S.border = '2px outset #AAA'
          S.width = '704px'
          S.height = '324px'
    
          var title = document.createElement('div')
          var S = title.style
    
          S.width = '700px'
          S.height = '20px'
          S.paddingLeft = '4px'
          S.background = '#999'
    
          title.appendChild(document.createTextNode('Zixie debug console'))
          W.appendChild(title)
          W.appendChild(V)
    
          document.body.appendChild(W)
    
          Z.console.visible = true
          Z.console.window = W
        },
    
        function consoleShow()
        {
          if ( ! Z.console.visible)
          {
            Z.console.window.style.visibility = 'visible'
            Z.console.visible = true
          }
        }
      )
    
    
      Z.declare(
        'consoleFlip',
    
        function consoleFlip()
        {
          if (Z.console.visible)
          {
            Z.console.window.style.visibility = 'hidden'
            Z.console.visible = false
          }
          else
            Z.consoleShow()
        }
      )
    
    
      if (location.pathname == '/eye.html')
        Z.queue.dom('consoleShow', Z.consoleShow)
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-console.mix', e)
}

//  quixie-validate.mix
try
{
  (
    function quixie_validate_mix(Z)
    {
      if (Z.validate === false)
      {
      }
      else
      {
        var div = document.createElement('div')
    
        div.innerHTML 
          = "<a href='http://validator.w3.org/check/referer'>Validate</a>"
    
        div.style.position = 'absolute'
        div.style.bottom = '5px'
        div.style.right = '5px'
        div.style.fontSize = '75%'
    
        Z.validate = { window: div /*,*/ }
    
        Z.queue.dom(
          'append_validate',
          
          function append_validate()
          {
            document.body.appendChild(Z.validate.window)
          }
        )
      }
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-validate.mix', e)
}

//  quixie-toolkit.mix
try
{
  (
    function quixie_toolkit_mix(Z)
    {
      if ( ! window.Ajax)           window.Ajax = {}
      if ( ! window.Ajax.r0)        window.Ajax.r0 = {}
    
      var Ajax = window.Ajax.r0
    
      if ( ! Ajax.toolkits)         Ajax.toolkits = {}
      if ( ! Ajax.toolkits.Zixie)   Ajax.toolkits.Zixie = Z.toolkit
    
      var toolkits = ''
    
      for (var k in Ajax.toolkits)
      {
        try
        {
          var e       = Ajax.toolkits[k]
          var toolkit = e.name + ' ' + e.version
    
          if (toolkits)
            toolkits = toolkits + ', ' + toolkit
          else
            toolkits = toolkit
        }
        catch (e)
        {
        }
      }
    
      Z.debug (new Date().toLocaleString() + ': Active toolkits: ' + toolkits)
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-toolkit.mix', e)
}

//  zixie_graph.mix
try
{
  (
    function zixie_graph_mix(Z)
    {
      Z.graph = [
        {
          names:    [ '/', 'index.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [ 'maine.html', 'license.html', 'eye.html' /*,*/ ] //,
        },
        {
          names:    [ 'license', 'license.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [ '/' /*,*/ ] //,
        },
        {
          names:    [ 'eye.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [ '/' /*,*/ ] //,
        },
        {
          names:    [ 'maine.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [ 'new-hampshire.html' /*,*/ ] //,
        },
        {
          names:    [ 'new-hampshire.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'massachusetts.html',
                      'maine.html',
                      'vermont.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'vermont.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'new-york.html',
                      'new-hampshire.html',
                      'massachusetts.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'massachusetts.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'new-york.html',
                      'vermont.html',
                      'new-hampshire.html',
                      'connecticut.html',
                      'rhode-island-and-providence-plantations.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'connecticut.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'new-york.html',
                      'massachusetts.html',
                      'rhode-island-and-providence-plantations.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'rhode-island-and-providence-plantations.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'connecticut.html',
                      'massachusetts.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'new-york.html' /*,*/ ],
          depends:  [ 'zixie.js', 'National-atlas-new-york.png' /*,*/ ],
          links:    [
                      'pennsylvania.html',
                      'vermont.html',
                      'massachusetts.html',
                      'connecticut.html',
                      'new-jersey.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'new-jersey.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'pennsylvania.html',
                      'new-york.html',
                      'delaware.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'pennsylvania.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'west-virginia.html',
                      'new-york.html',
                      'ohio.html',
                      'new-jersey.html',
                      'maryland.html',
                      'delaware.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'delaware.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'maryland.html',
                      'pennsylvania.html',
                      'new-jersey.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'maryland.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'capital.html',
                      'virginia.html',
                      'pennsylvania.html',
                      'west-virginia.html',
                      'delaware.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'capital.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'maryland.html',
                      'virginia.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'virginia.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'capital.html',
                      'west-virginia.html',
                      'maryland.html',
                      'kentucky.html',
                      'tennessee.html',
                      'north-carolina.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'north-carolina.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'south-carolina.html',
                      'virginia.html',
                      'tennessee.html',
                      'georgia.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'south-carolina.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'north-carolina.html',
                      'georgia.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'georgia.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'alabama.html',
                      'tennessee.html',
                      'north-carolina.html',
                      'south-carolina.html',
                      'florida.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'florida.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'georgia.html',
                      'alabama.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'west-virginia.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'ohio.html',
                      'pennsylvania.html',
                      'maryland.html',
                      'kentucky.html',
                      'virginia.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'ohio.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'indiana.html',
                      'michigan.html',
                      'pennsylvania.html',
                      'kentucky.html',
                      'west-virginia.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'kentucky.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'illinois.html',
                      'indiana.html',
                      'ohio.html',
                      'missouri.html',
                      'west-virginia.html',
                      'tennessee.html',
                      'virginia.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'tennessee.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'arkansas.html',
                      'missouri.html',
                      'kentucky.html',
                      'virginia.html',
                      'north-carolina.html',
                      'mississippi.html',
                      'alabama.html',
                      'georgia.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'alabama.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'mississippi.html',
                      'tennessee.html',
                      'georgia.html',
                      'florida.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'michigan.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'minnesota.html',
                      'wisconsin.html',
                      'illinois.html',
                      'indiana.html',
                      'ohio.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'indiana.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'illinois.html',
                      'michigan.html',
                      'ohio.html',
                      'kentucky.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'mississippi.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'arkansas.html',
                      'tennessee.html',
                      'alabama.html',
                      'louisiana.html',
                    ] //,
        },
        {
          names:    [ 'illinois.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'missouri.html',
                      'iowa.html',
                      'wisconsin.html',
                      'michigan.html',
                      'indiana.html',
                      'kentucky.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'wisconsin.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'minnesota.html',
                      'michigan.html',
                      'iowa.html',
                      'illinois.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'minnesota.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'north-dakota.html',
                      'michigan.html',
                      'south-dakota.html',
                      'iowa.html',
                      'wisconsin.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'iowa.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'south-dakota.html',
                      'minnesota.html',
                      'wisconsin.html',
                      'nebraska.html',
                      'illinois.html',
                      'missouri.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'missouri.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'kansas.html',
                      'nebraska.html',
                      'iowa.html',
                      'illinois.html',
                      'kentucky.html',
                      'oklahoma.html',
                      'arkansas.html',
                      'tennessee.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'arkansas.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'oklahoma.html',
                      'missouri.html',
                      'tennessee.html',
                      'texas.html',
                      'louisiana.html',
                      'mississippi.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'louisiana.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'texas.html',
                      'arkansas.html',
                      'mississippi.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'north-dakota.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'south-dakota.html',
                      'montana.html',
                      'minnesota.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'south-dakota.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'wyoming.html',
                      'montana.html',
                      'north-dakota.html',
                      'minnesota.html',
                      'nebraska.html',
                      'iowa.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'nebraska.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'colorado.html',
                      'wyoming.html',
                      'south-dakota.html',
                      'iowa.html',
                      'kansas.html',
                      'missouri.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'kansas.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'colorado.html',
                      'nebraska.html',
                      'missouri.html',
                      'oklahoma.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'oklahoma.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'new-mexico.html',
                      'colorado.html',
                      'kansas.html',
                      'missouri.html',
                      'arkansas.html',
                      'texas.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'texas.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'new-mexico.html',
                      'oklahoma.html',
                      'arkansas.html',
                      'louisiana.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'montana.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'idaho.html',
                      'north-dakota.html',
                      'south-dakota.html',
                      'wyoming.html',
                    ] //,
        },
        {
          names:    [ 'wyoming.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'idaho.html',
                      'montana.html',
                      'south-dakota.html',
                      'nebraska.html',
                      'colorado.html',
                      'utah.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'colorado.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'utah.html',
                      'wyoming.html',
                      'nebraska.html',
                      'kansas.html',
                      'oklahoma.html',
                      'new-mexico.html',
                      'arizona.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'new-mexico.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'arizona.html',
                      'utah.html',
                      'colorado.html',
                      'oklahoma.html',
                      'texas.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'idaho.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'oregon.html',
                      'washington.html',
                      'montana.html',
                      'wyoming.html',
                      'nevada.html',
                      'utah.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'utah.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'nevada.html',
                      'idaho.html',
                      'wyoming.html',
                      'colorado.html',
                      'arizona.html',
                      'new-mexico.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'arizona.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'california.html',
                      'nevada.html',
                      'utah.html',
                      'colorado.html',
                      'new-mexico.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'washington.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'oregon.html',
                      'idaho.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'oregon.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'california.html',
                      'washington.html',
                      'idaho.html',
                      'nevada.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'nevada.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'california.html',
                      'oregon.html',
                      'idaho.html',
                      'utah.html',
                      'arizona.html' /*,*/
                    ] //,
        },
        {
          names:    [ 'california.html' /*,*/ ],
          depends:  [ 'zixie.js' /*,*/ ],
          links:    [
                      'oregon.html',
                      'nevada.html',
                      'arizona.html' /*,*/
                    ] //,
        } //,
      ]
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('zixie_graph.mix', e)
}

//  quixie-run.mix
try
{
  (
    function quixie_run_mix(Z)
    {
      Z.run_createPages = function()
      {
        delete Z.run_createPages
    
        Z.pagesMap = {}
    
        for (var k in Z.graph)
        {
          var webPage = Z.graph[k]
    
          for (var k2 in webPage.names)
          {
            var name = webPage.names[k2]
    
            if (Z.pagesMap[name])
            {
              Z.error('zixie_graph.mix: '
                    + "'" + name + "'"
                    + ' appears more than once')
              Z.graphError = true
              return true
            }
    
            Z.pagesMap[name] = webPage
          }
        }
    
        return false
      }
    
    
      Z.sortedKeys = function(o)
      {
        var keys = []
    
        for (var k in o)
          keys.push(k)
    
        keys.sort()
    
        return keys
      }
    
    
      Z.printPathnames = function ()
      {
        var pathnames = Z.sortedKeys(Z.pathnamesMap)
    
        for (var k in pathnames)
        {
          var pathname = pathnames[k]
          var v = Z.pathnamesMap[pathname]        //  PathnameElement
          var v_keys = Z.sortedKeys(v)
          var s = ''
    
          for (var k2 in v_keys)
          {
            var k3 = v_keys[k2]
    
            if (s.length)
              s += ', '
    
            s += k3 + ': ' + v[k3]
          }
    
          Z.debug('Z.pathnamesMap[' + '"' + pathname + '"' + ']: { ' + s + ' }')
        }
      }
    
    
      var anchors = null
      var base_url = null
    
    
      function changeColor()
      {
        Z.changeColor_queued = false
    
        if ( ! Z.page.links)
          return
    
        if ( ! anchors)
          anchors = document.body.getElementsByTagName('a')
    
        if ( ! base_url)
        {
          base_url = location.protocol + '//' + location.host
    
          var slash = location.pathname.lastIndexOf('/')
    
          if (slash > 0)
            base_url += location.pathname.substring(0, slash)
        }
    
        for (var i = 0; i < Z.linkIndex; i ++)
        {
          var linkName = Z.page.links[i]
          var linkPage = Z.pagesMap[linkName]
    
          if (linkPage && linkPage.changeColor)
          {
            linkPage.changeColor = false
    
            if (linkName.length == 0 || linkName.charAt(0) != '/')
              href = base_url + '/' + linkName
            else
              href = base_url + linkName
    
            var href_pound = href + '#'
            var found = false
    
            for (var k = 0; k < anchors.length; k ++)
            {
              var e = anchors[k]
    
              if (e.href == href || Z.string.starts_with(e.href, href_pound))
              {
                Z.timing.message(new Date(), '"' + linkName + '": change to green')
    
                found = true
                e.style.color = 'green'
              }
            }
    
            if ( ! found)
              Z.error('Did not find <a> with href=' + href)
          }
        }
      }
    
    
      function increment_dependIndex()
      {
        Z.dependIndex ++
    
        if (Z.linkPage.depends && Z.dependIndex < Z.linkPage.depends.length)
          return
    
        Z.linkPage.changeColor = true
    
        increment_linkIndex()
    
        if (Z.changeColor_queued)
        {
          return
        }
    
        Z.changeColor_queued = true
        Z.queue.dom('changeColor', changeColor)
      }
    
    
      function increment_linkIndex()
      {
        Z.dependIndex = -1
        Z.linkIndex ++
        delete Z.linkPage
        delete Z.linkPathname
      }
    
    
      function http_request__run()
      {
        var linkPathname = Z.linkPathname
        var request = linkPathname.request.request
    
        if (request.readyState != 4)
          return
    
        linkPathname.request.zap()
    
        delete linkPathname.request
        delete linkPathname.ieCached
        delete linkPathname.probably
        delete linkPathname.unknown
    
        linkPathname.status = request.status
    
        var good_status = 200
    
        if (location.protocol == 'file:')
          good_status = 0
    
        if (request.status == good_status)
        {
          var date = request.getResponseHeader('Date')
    
          if (date)
          {
            linkPathname.date = date
            linkPathname.probably = true
          }
          else
            linkPathname.ieCached = true
    
          increment_dependIndex()
          Z.queue.early('runPageIndex', Z.runPageIndex)
        }
        else
        {
          Z.error('Error Response to HTML request: ' + request.status)
        }
      }
    
    
      Z.runPageIndex = function()
      {
        var step = 1
    
        try
        {
          var links_length = 0
    
          if (Z.page.links)
            links_length = Z.page.links.length
    
          step = 1
    
          for (; Z.linkIndex < links_length; increment_dependIndex())
          {
            if (0)
              Z.debug('runPageIndex: ' + Z.linkIndex + ',' + Z.dependIndex)
    
            var linkName = Z.page.links[Z.linkIndex]
    
            step = 2
    
            if ( ! Z.linkPage)
            {
              Z.linkPage = Z.pagesMap[linkName]
    
              if ( ! Z.linkPage)
              {
                Z.error('current page links to unknown page'
                      + ' ' + '"' + linkName + '"')
                Z.graphError = true
                break
              }
            }
    
            var findName = linkName
    
            if (Z.dependIndex != -1)
              findName = Z.linkPage.depends[Z.dependIndex]
    
            var linkPathname = Z.pathnamesMap[findName]
    
            if ( ! linkPathname)
            {
              linkPathname = { unknown: true /*,*/ }
              Z.pathnamesMap[findName] = linkPathname
            }
    
            Z.linkPathname = linkPathname
    
            if (linkPathname.unknown)
            {
              Z.timing.message(new Date(), '"' + findName + '": request')
    
              linkPathname.request = Z.create_HttpRequest(
                'http request',
                http_request__run
              )
    
              try
              {
                linkPathname.request.start(findName)
              }
              catch (e)
              {
                if (
                      location.protocol == 'file:'
                   && e.name == 'NS_ERROR_DOM_BAD_URI'
                )
                {
                  Z.error('no such file: ' + findName)
                }
                else
                  Z.exception('runPageIndex, request', e)
              }
    
              break
            }
            else if (linkPathname.ieCached)
            {
              Z.timing.message(
                new Date(),
                '"' + findName + '": already in cache'
              )
            }
            else if (linkPathname.onload)
            {
              Z.timing.message(
                new Date(),
                '"' + findName + '": will be in cache at window.onload'
              )
            }
            else if (linkPathname.probably)
            {
              Z.timing.message(
                new Date(),
                '"' + findName + '": probably already in cache'
              )
            }
            else
            {
              for (var e in linkPathname)
                Z.debug('linkPathname.' + e + ': ' + linkPathname[e])
    
              Z.error('Z.runPageIndex: incomplete for name: ' + findName)
              break
            }
          }
    
          if (Z.linkIndex >= links_length)
          {
            Z.timing.message(
                new Date(),
                'Z.runPageIndex: done: ' + links_length
            )
          }
        }
        catch (e)
        {
          Z.exception('runPageIndex', e, step)
        }
      }
    
    
      Z.run = function()
      {
        try
        {
          delete Z.run
    
          if (Z.run_createPages())
          {
            return
          }
    
          var pathname = location.pathname
    
          if (Z.string.starts_with(pathname, '/C:/sf/zixie-2008-04-27/'))
            pathname = pathname.substring(24)
          else if (pathname.length > 1 && pathname.charAt(0) == '/')
            pathname = pathname.substring(1)
    
          Z.page = Z.pagesMap[pathname]
    
          if ( ! Z.page)
          {
            Z.error('zixie_graph.mix: '
                  + "'" + pathname + "'"
                  + ' not found')
            Z.graphError = true
            return true
          }
    
          if ( ! Z.page.links)
          {
            return
          }
    
          Z.pathnamesMap = {}
    
          Z.pathnamesMap[pathname] = { probably: true, page: Z.page /*,*/ }
    
          var zixie_js = null
    
          if (Z.boot)
          {
            var date = Z.boot.getResponseHeader('Date')
    
            if (date)
              zixie_js = { probably: true, date: date /*,*/ }
            else
              zixie_js = { ieCached: true /*,*/ }
          }
          else
            zixie_js = { probably: true /*,*/ }
    
          Z.pathnamesMap[Z.script_name] = zixie_js
    
          if (Z.page.depends)
          {
            for (var k in Z.page.depends)
            {
              var e = Z.page.depends[k]
              var map = Z.pathnamesMap[e]
    
              if (map)
                map.onload = true
              else
                Z.pathnamesMap[e] = { onload: true /*,*/ }
            }
          }
    
          Z.linkIndex = 0
          Z.dependIndex = -1
          Z.runPageIndex()
        }
        catch (e)
        {
          Z.exception('run', e)
        }
      }
    
      Z.run()
    
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-run.mix', e)
}

//  quixie-cleanup.mix
try
{
  (
    function quixie_cleanup_mix(Z)
    {
    
      if (Z.boot)
      {
        Z.boot.onreadystatechange = Z.Callback.blank
    
        delete Z.boot
      }
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-cleanup.mix', e)
}

//  zixie_storage.mix
try
{
  (
    function zixie_storage_mix(Z)
    {
      var now = new Date()
      var debug = false
    
      if (window.sessionStorage)
      {
        {
          if (sessionStorage.zixie)
          {
            if (debug)
              Z.debug('previous sessionStorage.zixie: ' + sessionStorage.zixie)
          }
        }
    
        {
          sessionStorage.zixie = now.toLocaleString()
    
          if (debug)
            Z.debug('set sessionStorage.zixie: ' + sessionStorage.zixie)
        }
      }
      else
      {
        var storage = document.createElement('div')
        storage.style.behavior = 'url(#default#userdata)'
        storage.style.display = 'none'
        document.getElementsByTagName('head')[0].appendChild(storage)
    
        {
          storage.load('zixie')
    
          var value_date = storage.getAttribute('date')
          var expires = storage.expires
    
          if (value_date != undefined && expires != undefined)
          {
            if (debug)
            {
              Z.debug('Previous date: ' + value_date
                      + ' (expires: ' + expires + ')')
            }
          }
        }
    
        {
          var value_date = now.toLocaleString()
    
          var later = new Date()
          later.setMinutes(later.getMinutes() + 1)
    
          expires = later.toUTCString()
    
          storage.setAttribute('date', value_date)
          storage.expires = expires
          storage.save('zixie')
    
          if (debug)
          {
            Z.debug('Saved zixie.date: ' + value_date
                    + ' (expires: ' + expires + ')')
          }
        }
      }
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('zixie_storage.mix', e)
}

//  zixie_new.mix
try
{
  (
    function zixie_new_mix(Z)
    {
      Z.timing.message(new Date(), Z.script_name + ' finished')
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('zixie_new.mix', e)
}

//  quixie-end.mix
try
{
  (
    function quixie_end_mix(Z)
    {
      var Q = Z.queue
    
      if ( ! Z.check_window_keys)
      {
        Z.declare(
          'check_window_keys',
    
          function check_window_keys(report)
          {
            var keys = Z.window_keys
            var found = false
    
            for (var k in window)
            {
              if (keys[k])
                continue
    
              found = true
              Z.error('Accidently added: window.' + k)
            }
    
            if ( ! found && report)
              Z.green('No keys accidently added to: window object')
          }
        )
      }
    
      Z.check_window_keys(false)
    
      Q.dom(
        'check_windows_keys',
    
        function check_windows_key__later()
        {
          Z.check_window_keys(false)
        }
      )
    }
  ) (Zixie.r0);
}
catch (e)
{
  Zixie.r0.exception('quixie-end.mix', e)
}

//  leave zixie.js
Zixie.r0.leave_script('zixie.js')
