var _cep=[]; var _ceL={}; var _ceLT=new Date(); var _ceET=null; var _ceAID=new Array(); //creates a unique id for elements that have no id tag function CreateUniqueID(_1) { var _2=false; var _3=""; for(i=0; i<_ceAID.length;i++) { if(_1==_ceAID[i].name) { _2=true; break; } } if(_2) { _ceAID[i].count+=1; count=_ceAID[i].count; } else { _ceAID.push({name:_1,count:1}); count=1; } return (_1+count); } //We wanna have a good name for all the elements that we have on the heatmap afterwards. //An anchorElements element is either a Link or an Image function CreateNameForElement(anchorElement) { imgCollection = anchorElement.getElementsByTagName("img"); //check if the object that the user clicked on is an image, if yes, //we can either use the alt tag, the title or some other tags. if(imgCollection.length>0) { img=imgCollection[0]; if(img.alt) { link_text=img.alt; } else { if(img.title) { link_text=img.title; } else { if(img.longDesc) { link_text=img.longDesc; } else { link_text=img.src; } } } } //if it is not an image, lets see if we can use the inner //text or a title or something else { if(anchorElement.innerText) { link_text=anchorElement.innerText; } else { if(anchorElement.text) { link_text=anchorElement.text; } else { if(anchorElement.title) { link_text=anchorElement.title; } else { link_text=anchorElement.href; } } } } if(link_text=="") { link_text="No Text Found"; } return link_text; } //checks if the links points to a different site function IsSameSite(linkHostname ,locationHostname) { same=(linkHostname.indexOf(locationHostname)>=0 || locationHostname.indexOf(linkHostname)>=0)? true : false; return same; } //for all pics on the page we set a link to crazyegg.com //for links, we replace them with links to crazyegg.com //QUESTION? not sure how they track html controls like buttons? function PlaceLinksToCrazyEgg() { var anchorElements = document.getElementsByTagName("a"); for(var i=0; i