/*
 * $Log: xbDOMDocument.js,v $
 * Revision 1.1  2002/11/02 20:41:48  chregu
 * pres
 *
 * Revision 1.1.1.1  2002/10/15 06:59:51  chregu
 * initial commit
 *
 * Revision 1.6  2002/07/22 14:27:33  bc6ix
 * fix license path, remove registerFile, remove ua.js detection
 *
 * Revision 1.5  2002/07/07 08:23:07  bc6ix
 * fix line endings
 *
 * Revision 1.4  2002/05/14 16:52:52  bc6ix
 * use CVS Log for revision history
 *
 */

/* ***** BEGIN LICENSE BLOCK *****
 * Licensed under Version: MPL 1.1/GPL 2.0/LGPL 2.1
 * Full Terms at /xbProjects-license/mpl-tri-license.txt
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is Bob Clary code.
 *
 * The Initial Developer of the Original Code is
 * Bob Clary.
 * Portions created by the Initial Developer are Copyright (C) 2000
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s): Bob Clary <bc@bclary.com>
 *
 * ***** END LICENSE BLOCK ***** */


var bxe_id = 0;
var isMSIE = false;
var isMozi = false;

if (navigator.userAgent.indexOf("MSIE") > 0) {
    isMSIE = true;
	document.write('<script language="javascript" src="xbDOM-msie.js"><\/script>');
} else {
    isMozi = true;
	document.write('<script language="javascript" src="xbDOM-mozi.js"><\/script>');

}


function XMLDocument(namespaceURI, nodeName, doctype)
{
    this.doc = null;
    this.isDocument = false;
    this.nodes = new Array();
    if (namespaceURI == "isDocument") {
        this.doc = document;
        this.isDocument = true;
        return;
    }

    if (document.implementation && document.implementation.createDocument)
    {
        //Mozilla incorrectly uses '' as no-namespaceURI
        if (!namespaceURI)
            namespaceURI = '';

        if (!doctype)
            doctype = null;
        this.doc = document.implementation.createDocument(namespaceURI, nodeName, doctype);
    }

    else if (typeof(ActiveXObject) == 'function')
    {
        var eError;

        if (!namespaceURI)
            namespaceURI = null;

        if (!doctype)
            doctype = null;

        this.doc = new ActiveXObject('MSXML2.DOMDocument.4.0');
        if (this.doc)
        {
            this.doc.appendChild(this.doc.createElement(nodeName));
            //doc.namespaceURI = namespaceURI;
            //doc.doctype = doctype;
        }

    }

}
//</script>

