// // Definicion de Objetos para navegador cruzado // // función para instanciar objetos de ecualizador function setup() { numcapa = new Array(document.layers.length); nomcapa = new Array(document.layers.length); for (i = 0; i < document.layers.length; i++){ numcapa[i] = new ns_object(document.layers[i]); nomcapa[document.layers[i].name] = new ns_object(document.layers[i]); } } // crear objeto ecualizador NS en DHTML function ns_object(obj) { this.style = obj; this.hide = hide_me; this.show = show_me; this.move = move_object; this.moveby = moveby; } // ocultar elemento function hide_me() { this.style.visibility = "hidden"; } // mostrar elemento function show_me() { this.style.visibility = "inherit"; } // realizar movimiento absoluto function move_object(newleft, newtop) { this.style.left = newleft; this.style.top = newtop; } // mover relativo a la posición actual function moveby(left, top) { this.style.left = this.style.left + left; this.style.top = this.style.top + top; }