IBSYS.using("features");IBSYS.features.storyTools=function(){var f=function(){if(!document.getElementById("toolbox")){var g=new Array();g.push({label:"buzz",align:"left",target:"_blank",type:"dynamic"});g.push({label:"delicious",align:"left",target:"_blank",type:"dynamic"});g.push({label:"digg",align:"left",target:"_blank",type:"dynamic"});g.push({label:"facebook",align:"left",target:"_blank",type:"dynamic"});g.push({label:"reddit",align:"left",target:"_blank",type:"dynamic"});g.push({label:"rss",align:"right",target:"_blank",type:"static"});g.push({label:"print",align:"right",target:"_self",type:"dynamic"});g.push({label:"email",align:"right",target:"_self",type:"dynamic"});b(e(g))}};var e=function(i){var h=document.createElement("div");h.id="toolbox";for(var g=0;g<i.length;g++){h.appendChild(c(i[g]))}return h};var c=function(g){var i=document.title.split(" - ")[0];var j=document.createElement("img");var h=document.createElement("a");j.src="/sh/storytools/storytools_"+g.label+".gif";j.align=g.align;j.title=g.label.toUpperCase();if(g.type=="dynamic"){j.title+=": "+i}j.id="st"+g.label+"Icon";j.border=0;h.href=a(g.label);h.target=g.target;j.className="storytool";h.appendChild(j);return h};var b=function(g){stel=document.getElementById("storytools");stel.appendChild(g);if(siteinfo.owner=="morgan"||siteinfo.owner=="scripps"||siteinfo.owner=="ibs"||siteinfo.owner=="mere"){try{d()}catch(h){}if(isNN&&siteinfo.owner=="ibs"){stel.style.display="block";stel.style.height="16px"}addEvent(window,"load",d);addEvent(window,"resize",d)}};var d=function(){var j;storyid=document.getElementById("story")||document.getElementById("story"+pageProps.coid);if(document.getElementById("sideSignup")){j=document.getElementById("sideSignup").offsetWidth+40}else{var h=storyid.getElementsByTagName("td");for(var g=0;g<h.length;g++){if(h[g].className=="AssocContentTD"){j=h[g].offsetWidth+40}else{j=290}}}storywidth=storyid.offsetWidth;document.getElementById("storytools").style.width=storywidth-j+"px"};var a=function(g){var h=document.title.split(" - ")[0];switch(g){case"rss":return"/rss/";case"email":return'javascript:popUp("http://cf.'+siteinfo.sitename.lc+"."+siteinfo.tld+"/"+siteinfo.sitekey.lc+"/sh/toafriend/index.cfm?page="+window.location.href+'","width=450,height=250");';case"print":return"javascript:popUp('/print/"+pageProps.coid+"/detail.html','width=460,height=400,scrollbars');";case"delicious":return"http://del.icio.us/post?title="+escape(h)+"&url="+window.location.href;case"digg":return"http://digg.com/submit?phase=2&title="+escape(h)+"&url="+window.location.href;case"buzz":return"http://buzz.yahoo.com/buzz?targetUrl="+window.location.href+"&headline="+escape(h);case"reddit":return"http://reddit.com/submit?url="+encodeURIComponent(window.location.href)+"&title="+encodeURIComponent(h);case"facebook":return"http://www.facebook.com/sharer.php?u="+window.location.href+"&src=sc&pos=top&from_posted=1"}};return{init:f}}();if(window.location.href.indexOf("/print/")==-1){IBSYS.features.storyTools.init()};