var map_url = "http://pulsemaps.com/maps/526958181/"; var div = document.getElementById('widget-div'); var a = document.createElement('a'); a.href = map_url; a.title = 'Click for more details! Visitor map widget by PulseMaps.com.'; a.target = '_blank'; div.appendChild(a); var span = document.createElement('span'); span.className = 'pulsemaps-widget'; span.style.display = 'inline-block'; a.appendChild(span); var div = document.createElement('div'); div.id = 'pulsemaps_div_526958181'; div.style.width = '392px'; div.style.height = '214px'; div.style.backgroundColor = 'transparent'; div.style.backgroundImage = 'url(http://pulsemaps.com/data/maps/world-map3-392-94928E.png)'; div.style.backgroundPosition = 'bottom'; div.style.backgroundRepeat = 'no-repeat'; div.style.backgroundSize = '100%'; div.style.position = 'relative'; span.appendChild(div); var ovl = document.createElement('div'); ovl.style.width = '100%'; ovl.style.height = '100%'; ovl.style.padding = '0px'; ovl.style.border = '0px'; ovl.style.backgroundColor = 'transparent'; var widget_image_url = "http://pulsemaps.com/widget.png?id=526958181&c4=ff0000&c5=ffff00&c6=ffffff&width=392"; ovl.style.backgroundImage = 'url(' + widget_image_url + ')'; ovl.style.backgroundPosition = 'bottom'; ovl.style.backgroundRepeat = 'no-repeat'; ovl.style.backgroundSize = '100%'; div.appendChild(ovl); var meta = document.createElement('div'); meta.id = 'pulsemaps_meta_526958181'; meta.style.position = 'absolute'; meta.style.fontFamily = 'Helvetica'; meta.style.fontWeight = 'bold'; meta.style.fontSize = '10px'; meta.style.lineHeight = '12px'; meta.style.color = '#94928E'; meta.style.backgroundColor = 'transparent'; meta.style.left = 0; meta.style.top = 0; meta.style.paddingTop = '5px'; meta.style.width = '100%'; meta.style.textAlign = 'center'; div.appendChild(meta); var pulsemaps = pulsemaps || {}; pulsemaps.hit_flash = function(i) { var hit = document.getElementById('pulsemaps_hit_' + i); if (hit) { hit.style.backgroundPosition = '-9px 0px'; hit.style.zIndex = 10; } } pulsemaps.hit_normal = function(i) { var hit = document.getElementById('pulsemaps_hit_' + i); if (hit) { hit.style.backgroundPosition = '0px 0px'; hit.style.zIndex = 1; } } pulsemaps.flasher = null; pulsemaps.stop_flashing = function() { if (pulsemaps.flasher) { clearTimeout(pulsemaps.flasher); pulsemaps.flasher = null; } } pulsemaps.num_recents = 0; pulsemaps.hit_flasher = function() { if (pulsemaps.num_recents == 0) { return; } pulsemaps.stop_flashing(); i = Math.floor(Math.random() * pulsemaps.num_recents); pulsemaps.hit_flash(i); setTimeout(function() { pulsemaps.hit_normal(i); }, 500); pulsemaps.flasher = setTimeout(pulsemaps.hit_flasher, Math.floor(Math.random() * 2000) + 2000); } pulsemaps.recent = function(recent) { if (recent.x == 0 && recent.y == 0) { return; } i = pulsemaps.num_recents++; var hit = document.createElement('div'); hit.id = 'pulsemaps_hit_' + i; var root_url = "http://pulsemaps.com/"; hit.style.backgroundImage = 'url(' + root_url + '/data/dots/dots-ffffff.png)'; hit.style.backgroundPosition = '0px 0px'; hit.style.width = '9px'; hit.style.height = '9px'; hit.style.position = 'absolute'; hit.style.left = Math.round(recent.x * 392 - 4) + 'px'; hit.style.top = Math.round(recent.y * 392 + 1) + 'px'; hit.style.zIndex = 1; div.appendChild(hit); } var scr = document.createElement('script'); var recents_url = "http://pulsemaps.com/index.php?_p=recents_js&id=526958181"; scr.src = recents_url; document.body.appendChild(scr); setTimeout(pulsemaps.hit_flasher, 2000); if (typeof(ga) === 'undefined') { (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); } ga('create', 'UA-23001252-6', {'name': 'pulsemaps'}); ga('pulsemaps.send', 'pageview');