// pnhObjectLibrary.js // This is an object from my personal library, not written for distribution purposes // If you'd like to use this code, please let me know, but be warned, // use of these objects does not entitle you to support from me - chris (placenamehere.com) // library info at http://placenamehere.com/pnhObjectLibrary/ function pnhGetLayerX() { if (document.layers) { return this.layer.left; } else if (document.all) { return parseInt(this.layer.currentStyle.left); } else if (document.getElementById) { return parseInt(document.defaultView.getComputedStyle(this.layer, null).getPropertyValue('left')); } else { return null; } } function pnhGetLayerY() { if (document.layers) { return this.layer.top; } else if (document.all) { return parseInt(this.layer.currentStyle.top);} else if (document.getElementById) { return parseInt(document.defaultView.getComputedStyle(this.layer, null).getPropertyValue('top')); } else { return null; } } function pnhSetLayerX(iPixels) { if (document.layers) { this.layer.left = iPixels; } else if (document.all) { this.layer.style.pixelLeft = iPixels; } else if (document.getElementById) { this.layer.style.left = iPixels + "px"; } else { /* ???? */ } } function pnhSetLayerY(iPixels) { if (document.layers) { this.layer.top = iPixels; } else if (document.all) { this.layer.style.pixelTop = iPixels; } else if (document.getElementById) { this.layer.style.top = iPixels + "px"; } else { /* ???? */ } } function pnhSetLayerZ(iIndex) { if (document.layers) { this.layer.zIndex = iIndex; } else if (document.all) { this.layer.style.zIndex = iIndex; } else if (document.getElementById) { this.layer.style.zIndex = iIndex; } else { /* ???? */ } } function pnhLayerMoveBy(iLeft,iTop) { if (document.layers) { this.layer.top = this.getY() + iTop; this.layer.left = this.getX() + iLeft; } else if (document.all) { this.layer.style.pixelTop = this.getY() + iTop; this.layer.style.pixelLeft = this.getX() + iLeft; } else if (document.getElementById) { this.layer.style.top = this.getY() + iTop; this.layer.style.left = this.getX() + iLeft; } else { /* ???? */ } } function pnhRewriteLayerHTML(sHTML, iWidth) { // width is a must have for Navigator 4.x - otherwise text won't wrap at same width as it had previous to the rewrite if (document.layers) { sHTML = "
" + sHTML + " |