var dhtml_objects = new Array()
function create_object_array() {
var div_tags
var span_tags
var css_tags
if (document.getElementById) {
div_tags = document.getElementsByTagName("div")
for (var counter = 0; counter < div_tags.length; counter++) {
current_object = div_tags[counter]
object_css = current_object.style
object_id = current_object.id
if (object_id) {
	dhtml_objects[object_id] = new dhtml_object(current_object,
	                object_css, 
	                object_id)
}
}
span_tags = document.getElementsByTagName("span")
for (var counter = 0; counter < span_tags.length; counter++) {
current_object = span_tags[counter]
object_css = current_object.style
object_id = current_object.id
if (object_id) {
dhtml_objects[object_id] = new dhtml_object(current_object,
                 object_css, 
                 object_id)
}
}
}
else if (document.all) {
div_tags = document.all.tags("div")
for (var counter = 0; counter < div_tags.length; counter++) {
current_object = div_tags[counter]
object_css = current_object.style
object_id = current_object.id
if (object_id) {
dhtml_objects[object_id] = new dhtml_object(current_object,
                 object_css, 
                 object_id)
}
}
span_tags = document.all.tags("span")
for (var counter = 0; counter < span_tags.length; counter++) {
current_object = span_tags[counter]
object_css = current_object.style
object_id = current_object.id
if (object_id) {
dhtml_objects[object_id] = new dhtml_object(current_object,
                 object_css, 
                 object_id)
}
}
}
else if (document.layers) {
css_tags = document.layers
for (var counter = 0; counter < css_tags.length; counter++) {
current_object = css_tags[counter]
object_css = current_object
object_id = current_object.id
if (object_id) {
dhtml_objects[object_id] = new dhtml_object(current_object,
                 object_css, 
                 object_id)
}
}
}
}
function dhtml_object (obj, css, id) {
this.obj = obj
this.css = css
this.id = id
this.get_left = get_left
this.get_right = get_right
this.get_top = get_top
this.get_bottom = get_bottom
this.get_width = get_width
this.get_height = get_height
this.get_display = get_display
this.set_left = set_left
this.set_top = set_top
this.set_width = set_width
this.set_height = set_height
this.set_display = set_display
this.set_zIndex = set_zIndex
}
function get_left() {
return parseInt(this.css.left)
}
function get_right() {
return this.left() + this.width()
}
function get_top() {
return parseInt(this.css.top)
}
function get_bottom() {
return this.top() + this.height()
}
function get_width() {
if (!document.layers) {
if (this.css.width) {
return parseInt(this.css.width)
}
else {
return parseInt(this.obj.offsetWidth)
}
}
else {
return parseInt(this.obj.document.width)
}
}
function get_height() {
if (!document.layers) {
if (this.css.height) {
return parseInt(this.css.height)
}
else {
return parseInt(this.obj.offsetHeight)
}
}
else {
return parseInt(this.obj.document.height)
}
}


function get_display() {
if (this.css.display) {
return this.css.display
}
else return "inherit"
}


function set_left (new_left) {
this.css.left = new_left
}
function set_top (new_top) {
this.css.top = new_top
}
function set_width (new_width) {
if (!document.layers) {
this.css.width = new_width
}
}
function set_height (new_height) {
if (!document.layers) {
this.css.height = new_height
}
}

function set_display (new_display) {
if (this.css.display) {
this.css.display = new_display
}
}
function set_zIndex(new_zindex) {
if (new_zindex > 0) {
this.css.zIndex = new_zindex
}
else {
this.css.zIndex = 0
}
}

