if(!window.attributionapp){attributionapp={}}attributionapp.getSelected=function(){var a="";if(window.getSelection){a=window.getSelection()}else{if(document.getSelection){a=document.getSelection()}else{if(document.selection){a=document.selection.createRange().text}}}return a};attributionapp.oncopy=function(){var i=attributionapp.getSelected();if(i!=""){var d=document.getElementsByTagName("body")[0];var c,g;c=document.createElement("div");c.id="attributionapp:link";c.style.textDecoration="none";c.style.border="none";c.style.color="#000000";c.style.backgroundColor="transparent";c.style.textAlign="left";c.style.overflow="hidden";var j='Source: <a href="'+window.location.href+'">'+document.title+"</a> ";if(window.getSelection){if(typeof i.setBaseAndExtent!="undefined"){}else{g=document.createElement("div");g.style.display="none";d.appendChild(g);c.innerHTML=j;g.appendChild(document.createElement("br"));g.appendChild(c);g.appendChild(document.createElement("br"));var a=document.createRange();a.selectNode(c);i.addRange(a)}}else{if(document.selection){var e=document.documentElement.scrollLeft||document.body.scrollLeft;var f=document.documentElement.scrollTop||document.body.scrollTop;g=document.createElement("div");g.style.left=e+20+"px";g.style.top=f+20+"px";g.style.width="1px";g.style.height="1px";g.style.visibility="hidden";g.style.overflow="hidden";g.style.position="absolute";d.appendChild(g);var h=document.selection.createRange();c.innerHTML=h.htmlText+"<br><br>"+j+"<br>";g.appendChild(document.createElement("br"));g.appendChild(c);g.appendChild(document.createElement("br"));var b=d.createTextRange();b.moveToElementText(c);b.select();window.setTimeout(function(){g.parentNode.removeChild(g);if(h.text!=""){h.select();document.documentElement.scrollLeft=e;document.body.scrollLeft=e;document.documentElement.scrollTop=f;document.body.scrollTop=f}},0)}}}};function documentIsReady(){var a=document.getElementsByTagName("html")[0];return !(!a||!a.innerHTML||a.innerHTML.toLowerCase().indexOf("</body>")==-1||!document.getElementsByTagName("body")[0]||(typeof document.readyState=="string"&&document.readyState!="complete"))}function startAttributionApp(){if(window.addEventListener){if(!window.navigator.userAgent.match("Firefox/2")){document.getElementsByTagName("body")[0].addEventListener("copy",attributionapp.oncopy,false)}}else{document.getElementsByTagName("body")[0].attachEvent("oncopy",attributionapp.oncopy)}}function AttributionAppLoader(){window.setTimeout(documentIsReady()?startAttributionApp:AttributionAppLoader,300)}if(typeof AttributionAppLoaded=="undefined"){AttributionAppLoaded=true;AttributionAppLoader()};