height of arrow at the top of tooltip this.tooltipCornerSize = 10; this.displayArrow = false; this.cookieName = 'DHTMLgoodies_tooltipVisibility'; this.disableTooltipByCookie = true; this.tooltipDisabled = false; this.disableTooltipPossibility = false; this.tooltipIframeObj = false; this.pageBgColor = '#FFFFFF'; DHTMLgoodies_globalTooltipObj = this; if(navigator.userAgent.indexOf('MSIE')>=0)this.isMSIE = true; else this.isMSIE = false;}DHTMLgoodies_formTooltip.prototype = { // {{{ initFormFieldTooltip() /** * * * Initializes the tooltip script. Most set methods needs to be executed before you call this method. * * @public */ initFormFieldTooltip : function() { var formElements = new Array(); var inputs = document.getElementsByTagName('INPUT'); for(var no=0;no0){ this.roundedCornerObj = new DHTMLgoodies_roundedCorners(); // (divId,xRadius,yRadius,color,backgroundColor,padding,heightOfContent,whichCorners) this.roundedCornerObj.addTarget('DHTMLgoodies_formTooltipDiv',this.tooltipCornerSize,this.tooltipCornerSize,this.tooltipBgColor,this.pageBgColor,5); this.roundedCornerObj.init(); } this.tooltipContentDiv = document.getElementById('DHTMLgoodies_formTooltipContent'); } // }}} , addEvent : function(whichObject,eventType,functionName) { if(whichObject.attachEvent){ whichObject['e'+eventType+functionName] = functionName; whichObject[eventType+functionName] = function(){whichObject['e'+eventType+functionName]( window.event );} whichObject.attachEvent( 'on'+eventType, whichObject[eventType+functionName] ); } else whichObject.addEventListener(eventType,functionName,false); } // }}} , __positionCurrentToolTipObj : function() { if(DHTMLgoodies_globalTooltipObj.activeInput)this.__positionTooltip(DHTMLgoodies_globalTooltipObj.activeInput); } // }}} , // {{{ __positionTooltip() /** * * * This function positions the tooltip * * @param Obj inputObj = Reference to text input * * @private */ __positionTooltip : function(inputObj) { var offset = 0; if(!this.displayArrow)offset = 3; if(this.tooltipPosition=='below'){ this.tooltipDiv.style.left = this.getLeftPos(inputObj)+ 'px'; this.tooltipDiv.style.top = (this.getTopPos(inputObj) + inputObj.offsetHeight + offset) + 'px'; }else{ this.tooltipDiv.style.left = (this.getLeftPos(inputObj) + inputObj.offsetWidth + offset)+ 'px'; this.tooltipDiv.style.top = this.getTopPos(inputObj) + 'px'; } this.tooltipDiv.style.width=this.tooltipWidth + 'px'; } , // {{{ getTopPos() /** * This method will return the top coordinate(pixel) of an object * * @param Object inputObj = Reference to HTML element * @public */ getTopPos : function(inputObj) { var returnValue = inputObj.offsetTop; while((inputObj = inputObj.offsetParent) != null){ if(inputObj.tagName!='HTML'){ returnValue += inputObj.offsetTop; if(document.all)returnValue+=inputObj.clientTop; } } return returnValue; } // }}} , // {{{ getLeftPos() /** * This method will return the left coordinate(pixel) of an object * * @param Object inputObj = Reference to HTML element * @public */ getLeftPos : function(inputObj) { var returnValue = inputObj.offsetLeft; while((inputObj = inputObj.offsetParent) != null){ if(inputObj.tagName!='HTML'){ returnValue += inputObj.offsetLeft; if(document.all)returnValue+=inputObj.clientLeft; } } return returnValue; } , // {{{ getCookie() /** * * These cookie functions are downloaded from * http://www.mach5.com/support/analyzer/manual/html/General/CookiesJavaScript.htm * * This function returns the value of a cookie * * @param String name = Name of cookie * @param Object inputObj = Reference to HTML element * @public */ getCookie : function(name) { var start = document.cookie.indexOf(name+"="); var len = start+name.length+1; if ((!start) && (name != document.cookie.substring(0,name.length))) return null; if (start == -1) return null; var end = document.cookie.indexOf(";",len); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(len,end)); } // }}} , // {{{ setCookie() /** * * These cookie functions are downloaded from * http://www.mach5.com/support/analyzer/manual/html/General/CookiesJavaScript.htm * * This function creates a cookie. (This method has been slighhtly modified) * * @param String name = Name of cookie * @param String value = Value of cookie * @param Int expires = Timestamp - days * @param String path = Path for cookie (Usually left empty) * @param String domain = Cookie domain * @param Boolean secure = Secure cookie(SSL) * * @public */ setCookie : function(name,value,expires,path,domain,secure) { expires = expires * 60*60*24*1000; var today = new Date(); var expires_date = new Date( today.getTime() + (expires) ); var cookieString = name + "=" +escape(value) +