/*
 this file should be the only include needed
 the rest of the files are downloaded from the
 server using a non-asynchronous call to the server
 this should protect the source code, will have it
 compressed by an online tool before uploading to
 the web
*/

//as per the ECMA script lang ref, this forces
//all browsers into compliance, and must be called once per
//page load on every page, hence it is in the initialization file
//for the framework, it is used in the DOMDocument class to distinguish
//between HTML_nodes (i.e. 1), and all others
if (!window.Node) var Node =
    {
      ELEMENT_NODE                :  1,
      ATTRIBUTE_NODE              :  2,
      TEXT_NODE                   :  3,
      CDATA_SECTION_NODE          :  4,
      ENTITY_REFERENCE_NODE       :  5,
      ENTITY_NODE                 :  6,
      PROCESSING_INSTRUCTION_NODE :  7,
      COMMENT_NODE                :  8,
      DOCUMENT_NODE               :  9,
      DOCUMENT_TYPE_NODE          : 10,
      DOCUMENT_FRAGMENT_NODE      : 11,
      NOTATION_NODE               : 12
    }



var GLOBAL = new Object()
    GLOBAL["BROWSER"] = null
    GLOBAL["SYSTEM"] = null
    GLOBAL["HTMLDOC"] = null
    GLOBAL["ANIMATOR"] = null
    GLOBAL["PANEL"] = null
    GLOBAL["ANIMATOR"] = null
    
DOMNODE = null
//to be called on the body's onload event
function initialize()
{
    //call the server for the needed scripts
    GLOBAL["SYSTEM"] = new System()
    //used as a global reference to the class and its defined enumerations
    //moved from the DOMNode.js file to this due to include conflicts
    DOMNODE = new DOMNode("div",null); 
    GLOBAL["BROWSER"] = getBrowser()
    GLOBAL["ANIMATOR"] = new Animator()
    GLOBAL["HTMLDOC"] = new DOMDocument(new DOMNode(document.body));
    GLOBAL["HTMLDOC"].initialize(GLOBAL["HTMLDOC"].root,GLOBAL["HTMLDOC"].root.HTMLNode.childNodes)
    
    if(initialize.arguments[0])
      document.title = initialize.arguments[0]
}
