// domobjsx.js -- Object Creation Script with Full Feature Set://	theobjs.objHide				hide the object //	theobjs.objShow				show the object//	theobjs.objGetTop			find the object's top coordinate (y)//	theobjs.objGetLeft			find the object's left coordinate (x)//	theobjs.objSetTop			set the object's top coordinate (y)//	theobjs.objSetLeft			set the object's top coordinate (x)//	theobjs.objMoveAbsolute		move the object to coordinate x,y//	theobjs.objMoveRelative		move the object x and/or y pixels//	theobjs.objSetZIndex		reset the objet's z-index//	theobjs.objGetWidth			find the object's width//	theobjs.objGetHeight		find the object's height//	theobjs.objSetClipRect		clip the object to rectangle// BEGIN Create objects from Divsfunction create_objects() {	if (domdata.isNN4) { create_nn_objects(); 	} else if (domdata.isIE45) { create_ie_objects(); 	} else if (domdata.isNN6) { create_dom_objects(); }} // END create_objects() function// BEGIN For IE, pull DIV blocks into object arrayfunction create_ie_objects() {	thedivs = document.all.tags("div");	theobjs = new Array();	for (i = 0; i < thedivs.length; i++) {		if (thedivs[i].id != "") {			theobjs[thedivs[i].id] = new dom_object(thedivs[i]);		}	}} // END create_ie_objects()// BEGIN For Navigator 4.x, pull layer blocks into object arrayfunction create_nn_objects() {	theobjs = new Array();	for (i = 0; i < document.layers.length; i++) {		if (document.layers[i].name != "") {			theobjs[document.layers[i].name] = new nn_object(document.layers[i]);		}	}} // END create_nn_ojbects()// BEGIN For W3C DOM (Navigator 6.x, Mozilla), pull DIV blocks into object arrayfunction create_dom_objects() {	thedivs = document.getElementsByTagName("div");	theobjs = new Array();	for (i = 0; i < thedivs.length; i++) {		var obj = thedivs[i];		if (obj.id != "") { 			theobjs[obj.id] = new dom_object(obj); 		}	}} // END create_dom_objects()// BEGIN Establish properities of the DOM; also works for IE 4.x and 5.x Objectfunction dom_object(obj) {	this.css2 = obj;	this.name = obj.id;	this.objHide = domHide; 	this.objShow = domShow;	this.objGetTop = domGetTop;	this.objGetLeft = domGetLeft;	this.objSetTop = domSetTop;	this.objSetLeft = domSetLeft;	this.objMoveAbsolute = domMoveAbsolute;	this.objMoveRelative = domMoveRelative;	this.objSetZIndex = domSetZIndex;	this.objGetWidth = domGetWidth;	this.objGetHeight = domGetHeight;	this.objSetClipRect = domSetClipRect;} // END ie_object(obj)// BEGIN Establish properities of the Netscape objectfunction nn_object(obj) {	this.css2 = obj;	this.name = obj.name;	this.objGetTop = nnGetTop;	this.objGetLeft = nnGetLeft;	this.objHide = nnHide;	this.objShow = nnShow;	this.objSetTop = nnSetTop;	this.objSetLeft = nnSetLeft;	this.objGetWidth = nnGetWidth;	this.objGetHeight = nnGetHeight;	this.objMoveAbsolute = domMoveAbsolute;	this.objMoveRelative = domMoveRelative;	this.objSetZIndex = nnSetZIndex;	this.objSetClipRect = nnSetClipRect;} // END nn_object(obj)// BEGIN DOM and IE get element's top positionfunction domGetTop(top) {	var tp = parseInt(this.css2.style.top);	return tp;} // END domGetTop(top)// BEGIN DOM and IE get element's left positionfunction domGetLeft(left) {	var lt = parseInt(this.css2.style.left);	return lt;} // END domGetLeft()// BEGIN DOM and IE set element's top positionfunction domSetTop(top) {	this.css2.style.top = top + "px";} // END domSetTop(top)// BEGIN DOM and IE set element's left positionfunction domSetLeft(left) {	this.css2.style.left = left + "px";} // END domSetLeft(left)// BEGIN DOM and IE hide elementfunction domHide() {   this.css2.style.visibility = "hidden";} // END domHide()// BEGIN DOM and IE show elementfunction domShow() {   this.css2.style.visibility = "visible";} // END domShow()// BEGIN DOM and IE get element's widthfunction domGetWidth() {	var wd = parseInt(this.css2.style.width);	return wd;} // END domGetWidth// BEGIN DOM and IE get element's heightfunction domGetHeight() {	var ht = parseInt(this.css2.style.height);	return ht;} // END domGetHeight()// BEGIN DOM and IE set element's zindex orderfunction domSetZIndex(zindex) {   this.css2.style.zIndex = zindex;} // END domSetZIndex(zindex)// BEGIN make absolute movefunction domMoveAbsolute(newleft,newtop) {   this.objSetLeft(newleft);   this.objSetTop(newtop);} // END domMoveAbsolute// BEGIN make relative movefunction domMoveRelative(left,top) {   this.objSetLeft(left + this.objGetLeft());   this.objSetTop(top + this.objGetTop());    } // END domMoveRelative// BEGIN Netscape 4.x hide elementfunction nnHide() {	this.css2.visibility = "hidden";} // END nnHide// BEGIN Netscape 4.x show elementfunction nnShow() {	this.css2.visibility = "inherit";} // END nnShow()// BEGIN Netscape 4.x get element's left positionfunction nnGetLeft() {	return this.css2.left;} // END nnGetLeft()// BEGIN Netscape 4.x get element's top positionfunction nnGetTop () {	return this.css2.top;} // END nnGetTop()// BEGIN Netscape 4.x set element's top positionfunction nnSetTop(top) {	this.css2.top = top;} // END nnSetTop(top)// BEGIN Netscape 4.x set element's left positionfunction nnSetLeft(left) {	this.css2.left = left;} // END nnSetLeft(left)// BEGIN Netscape 4.x get element's widthfunction nnGetWidth() {	return this.css2.clip.width;} // END nnGetWidth()// BEGIN Netscape 4.x get element's heightfunction nnGetHeight() {	return this.css2.clip.height;} // END nnGetHeight()// BEGIN Netscape 4.x set element's zindex orderfunction nnSetZIndex(zindex) {	this.css2.zIndex = zindex;} // END nnSetZindex(zindex)// Clipping Objects// BEGIN DOM and IE clip objectfunction domSetClipRect(left,top,right,bottom) {	var strng = "rect(" + top + "px, " + right + "px, " + bottom + "px, " + left + "px)";	this.css2.style.clip = strng;} // END domSetClipRect(...)// BEGIN Netscape 4.x clip object// clip objectfunction nnSetClipRect(left,top,right,bottom) {	this.css2.clip.top = top;	this.css2.clip.right = right;	this.css2.clip.bottom = bottom;	this.css2.clip.left = left;} // END nnSetClipRect(...)