var objects = new Array();

function dom_object(ob)
{
	this.css = ob;
	this.hide = hide_object;
	this.show = show_object;
	this.query_zindex = query_object_zindex;
	this.set_zindex = set_object_zindex;
	this.query_left = query_object_left;
	this.query_top = query_object_top;
	this.query_height = query_object_height;
	this.query_width = query_object_width;
	this.set_height = set_object_height;
	this.set_width = set_object_width;
	this.move = move_object;
	this.set_html = dom_set_object_html;
	this.set_bgcolor = set_object_bgcolor;
}

function ie_object(ob)
{
	this.css = ob;
	this.hide = hide_object;
	this.show = show_object;
	this.query_zindex = query_object_zindex;
	this.set_zindex = set_object_zindex;
	this.query_left = query_object_left;
	this.query_top = query_object_top;
	this.query_height = ie_query_object_height;
	this.query_width = ie_query_object_width;
	this.set_height = ie_set_object_height;
	this.set_width = ie_set_object_width;
	this.move = move_object;
	this.set_html = dom_set_object_html;
	this.set_bgcolor = set_object_bgcolor;
}

function ns_object(ob)
{
	this.css = ob;
	this.hide = ns_hide_object;
	this.show = ns_show_object;
	this.query_zindex = ns_query_object_zindex;
	this.set_zindex = ns_set_object_zindex;
	this.query_left = ns_query_object_left;
	this.query_top = ns_query_object_top;
	this.query_height = ns_query_object_height;
	this.query_width = ns_query_object_width;
	this.set_height = ns_set_object_height;
	this.set_width = ns_set_object_width;
	this.move = ns_move_object;
	this.set_html = ns_set_object_html;
	this.set_bgcolor = ns_set_object_bgcolor;
}

function create_ie_objects()
{
	objects = new Array();
	foo = document.all.tags("DIV");
	for (var nr = 0; nr < foo.length; nr++) {
		if (foo[nr].id != "") {
			objects[foo[nr].id] = new ie_object(foo[nr]);
		}
	}
}

function create_navigator_objects(layer_arr)
{
	for (var nr = 0; nr < layer_arr.layers.length; nr++) {
		if (layer_arr.layers[nr].name != "") {
			objects[layer_arr.layers[nr].name] = new ns_object(layer_arr.layers[nr]);

			if (layer_arr.layers[nr].layers != null && layer_arr.layers[nr].layers.length > 0) {
				create_navigator_objects(layer_arr.layers[nr]);
			}
		}
	}
}

function create_dom_objects()
{
	foo = document.getElementsByTagName("DIV");
	objects = new Array();

	for (var nr = 0; nr < foo.length; nr++) {
		if (foo[nr].id != "") {
			objects[foo[nr].id] = new dom_object(foo[nr]);
		}
	}
}

function create_objects()
{
	if (agent.ie) {
		create_ie_objects();
		return;
	}

	if (agent.ns) {
		create_navigator_objects(document);
		return;
	}

		create_dom_objects();
		return;
}
