//globals var commentTipPopUp = ''; var commentTipHeading = ''; var commentTipContent = ''; var thisLastLink = ''; // add event handlers function addEvent( obj, type, fn ){ if (obj.addEventListener){ obj.addEventListener( type, fn, false ); }else if (obj.attachEvent){ obj["e"+type+fn] = fn; obj[type+fn] = function() { obj["e"+type+fn]( window.event ); } obj.attachEvent( "on"+type, obj[type+fn] ); } } // add the tooltip to the doc and event handlers function setCommentTips(){ //create the comment tool tip div and add to document var commentToolTip = document.createElement("DIV"); commentToolTip.id = "commentTipPopUp"; commentToolTip.style.display ='none'; commentToolTip.innerHTML = "
» loading...
"; addEvent(commentToolTip, 'mouseout', hideTip); //create a div to hold the content var tipContentArea = document.createElement("DIV"); tipContentArea.id = "commentTipContent"; tipContentArea.style.display ='none'; commentToolTip.appendChild(tipContentArea); //add to the body var bodyRef = document.getElementsByTagName("BODY")[0]; //bodyRef.parentNode.insertBefore(commentToolTip, bodyRef.firstSibling); bodyRef.appendChild(commentToolTip); //add events to all spans with class "commentTipWrapper" var allA = document.getElementsByTagName("SPAN"); for(var i=0; i times in this blog"; commentTipContent.innerHTML = splitResponse[0]; commentTipContent.style.display = 'block'; } } commentTipHeading.innerHTML = displayResponse; }