//--------Constructor-------------------- function Tools() { this.dom=document.getElementById&&!document.all; this.topLevelElement=this.dom? "HTML" : "BODY" this.debug = Tools_debug; this.debugEnabled = false; this.getElementChildren = Tools_getElementChildren; this.showObject = Tools_showObject; this.hideObject = Tools_hideObject; this.cancelEvent = Tools_cancelEvent; this.setCookie = Tools_setCookie; this.getCookie = Tools_getCookie; this.deleteCookie = Tools_deleteCookie; this.addParamDelimiter = Tools_addParamDelimiter; this.getHostName = Tools_getHostName; document.write('
'); this.debugArea = document.getElementById("tools_debugArea"); } function Tools_getHostName(url) { var serverParts = url.split("/"); return serverParts[2]; } //returns a ? or & based on contents of url function Tools_addParamDelimiter(url) { if (url.indexOf("?") == -1) { return url + "?"; }else { return url + "&"; } } //---------Method Implementations ------------- //utility method to cancle a build in event. //ex. Assume you do not want a link to work. // var tools = new Tools(); // document.getElementById("linkID").onclick=tools.cancleEvent function Tools_cancelEvent() { return false; } //shows a positionable element by toggling the style display property function Tools_showObject(obj) { if (obj) { obj.style.visibility="visible"; obj.style.display="block"; } } //hides a positionable element by toggling the style display property function Tools_hideObject(obj) { if (obj) { obj.style.display="none"; } } //gets the element children of a dom object function Tools_getElementChildren(obj) { var myArray= new Array(); mycnt = 0; for (i=0;i