function sendRequest(b,e,a){var c=createXMLHTTPObject();if(!c){return;}var d=(a)?"POST":"GET";c.open(d,b,true);c.setRequestHeader("User-Agent","XMLHTTP/1.0");if(a){c.setRequestHeader("Content-type","application/x-www-form-urlencoded");}c.onreadystatechange=function(){if(c.readyState!=4){return;}if(c.status!=200&&c.status!=304){alert("HTTP error "+c.status);return;}e(c);};if(c.readyState==4){return;}c.send(a);}var XMLHttpFactories=[function(){return new XMLHttpRequest();},function(){return new ActiveXObject("Msxml2.XMLHTTP");},function(){return new ActiveXObject("Msxml3.XMLHTTP");},function(){return new ActiveXObject("Microsoft.XMLHTTP");}];function createXMLHTTPObject(){var b=false;for(var a=0;a<XMLHttpFactories.length;a++){try{b=XMLHttpFactories[a]();}catch(c){continue;}break;}return b;}function addEvent(c,b,a){if(c.attachEvent){c["e"+b+a]=a;c[b+a]=function(){c["e"+b+a](window.event);};c.attachEvent("on"+b,c[b+a]);}else{c.addEventListener(b,a,false);}}function removeEvent(c,b,a){if(c.detachEvent){c.detachEvent("on"+b,c[b+a]);c[b+a]=null;}else{c.removeEventListener(b,a,false);}}function showLogin(){document.getElementById("login-box-shadow").style.display="block";document.getElementById("login-box").style.display="block";}function hideLogin(){document.getElementById("login-box").style.display="none";document.getElementById("login-box-shadow").style.display="none";}var tbn_temp=getCookie("tbn");var tbn=(tbn_temp!==null&&tbn_temp!=="")?tbn_temp:"";var username=getCookie("username");if(typeof COMMENTS!=="undefined"&&COMMENTS&&COMMENTS.comments){var textOutput="";for(var i=0;i<COMMENTS.comments.length;i++){textOutput+='<div class="comment"><a name="comment_'+COMMENTS.comments[i].auto_id+'" id="comment_'+COMMENTS.comments[i].auto_id+'"></a>'+COMMENTS.comments[i].body+'<div class="comment-footer"><div class="comment-details"><span class="posted">Posted by:</span> <span class="commenter"><a href="http://www.mybuffalo.com/service/displayKickPlace.kickAction?as=85283&u='+COMMENTS.comments[i].userid+'">'+COMMENTS.comments[i].username+'</a> </span> <span class="comment-date">on '+COMMENTS.comments[i].date+"  at "+COMMENTS.comments[i].time+' </span></div><div class="comment-flag"><a href="http://account.mybuffalo.com/comments/flag_comments.php?tbn='+tbn+"&headline="+escape(storyMeta.headline)+"&author="+escape(storyMeta.author)+"&url="+escape(storyMeta.url)+"&auto_id="+COMMENTS.comments[i].auto_id+"&storyId="+escape(storyMeta.storyId)+"&page=1&order=F&pubdate="+escape(storyMeta.pubdate)+'">Report abuse</a></div><div class="comment-reply"><a href="http://account.mybuffalo.com/comments/reply_comments.php?tbn='+tbn+"&headline="+escape(storyMeta.headline)+"&author="+escape(storyMeta.author)+"&url="+escape(storyMeta.url)+"&auto_id="+COMMENTS.comments[i].auto_id+"&storyId="+escape(storyMeta.storyId)+"&page=1&order=F&pubdate="+escape(storyMeta.pubdate)+'">Reply</a></div></div></div>';}document.getElementById("commentsContent").innerHTML=textOutput;}if(tbn!==""){var isrc="http://account.mybuffalo.com/comments/commentForm.php?url="+escape(storyMeta.url)+"&headline="+escape(storyMeta.headline)+"&author="+escape(storyMeta.author)+"&tbn="+tbn+"&storyId="+escape(storyMeta.storyId)+"&pubdate="+escape(storyMeta.pubdate);document.getElementById("iframePlaceholder").innerHTML='<iframe src="'+isrc+'" frameborder="0" width="580" height="500" marginheight="0" scrolling="no"></iframe>';if(username&&username!==""){document.getElementById("loginLink").innerHTML="You are logged in as "+username+". <a href='http://account.mybuffalo.com/logout/?dest="+escape(storyMeta.url)+"'>Log out</a>";}else{document.getElementById("loginLink").innerHTML="You are logged in. <a href='http://account.mybuffalo.com/logout/?dest="+escape(storyMeta.url)+"'>Log out</a>";}}else{document.getElementById("loginLink").innerHTML="You must be <a href='#' onclick='showLogin(); return false;'>logged in</a> to comment on or rate articles.";}if(typeof PAGINATION!=="undefined"&&PAGINATION){if(PAGINATION.showing&&PAGINATION.showing.totalPages&&PAGINATION.showing.totalPages==1){document.getElementById("numComments").innerHTML=(PAGINATION.showing.totalRows==1)?"is <strong>1</strong> comment":"are <strong>"+PAGINATION.showing.totalRows+"</strong> comments";document.getElementById("dateline-comment-count").innerHTML='<a href="#comment">'+PAGINATION.showing.totalRows+((PAGINATION.showing.totalRows==1)?" comment ":" comments ")+"</a>";document.getElementById("paginationWrapper").style.display="none";}else{if(PAGINATION.showing){document.getElementById("numComments").innerHTML=(PAGINATION.showing.totalRows==1)?"is <strong>1</strong> comment":"are <strong>"+PAGINATION.showing.totalRows+"</strong> comments";document.getElementById("dateline-comment-count").innerHTML='<a href="#comment">'+PAGINATION.showing.totalRows+((PAGINATION.showing.totalRows==1)?" comment ":" comments ")+"</a>";document.getElementById("showingMin").innerHTML=PAGINATION.showing.min+" ";document.getElementById("showingMax").innerHTML=PAGINATION.showing.max+" ";document.getElementById("showingTotalRows").innerHTML=PAGINATION.showing.totalRows+" ";document.getElementById("showingTotalPages").innerHTML=PAGINATION.showing.totalPages;}}if(PAGINATION.pages){var out="";for(var obj in PAGINATION.pages){if(obj==="next"){out+='<a href="'+PAGINATION.pages[obj]+'#comment">Next &rsaquo;</a>';}else{if(obj==="prev"){out+='<a href="'+PAGINATION.pages[obj]+'#comment">&lsaquo; Previous</a>';}else{if(obj==="firstpage"){out+='<a href="'+PAGINATION.pages[obj]+'#comment">&laquo; First page </a>';}else{if(obj==="lastpage"){out+='<a href="'+PAGINATION.pages[obj]+'#comment">Last page &raquo;</a>';}else{if(PAGINATION.pages[obj].toString().indexOf("http")==-1){out+=obj;}else{out+='<a href="'+PAGINATION.pages[obj]+'#comment">'+obj+"</a>";}}}}}}document.getElementById("paginationLinks").innerHTML=out;}}else{document.getElementById("numComments").innerHTML=" no comments ";document.getElementById("dateline-comment-count").innerHTML='<a href="#comment">0 comments</a>';document.getElementById("paginationWrapper").innerHTML="";document.getElementById("paginationWrapper").className="";}RATING.starIds=["star1","star2","star3","star4","star5"];RATING.avg=(RATING.data.avgRating)?Math.round(2*RATING.data.avgRating)/2:0;RATING.resetStars=function(){if(RATING.data.avgRating){document.getElementById("ratingText").innerHTML=RATING.avg+"/5 after "+RATING.data.numOfVotes+((RATING.data.numOfVotes==1)?" vote":" votes");for(var a=0;a<RATING.starIds.length;a++){if(a<=RATING.avg-1){document.getElementById(RATING.starIds[a]).className="star-on";}else{if(a<RATING.avg&&RATING.avg.toString().indexOf(".5")!==-1){document.getElementById(RATING.starIds[a]).className="star-half";}else{document.getElementById(RATING.starIds[a]).className="star-off";}}}}else{for(var a=0;a<RATING.starIds.length;a++){document.getElementById(RATING.starIds[a]).className="star-off";}document.getElementById("ratingText").innerHTML="No votes yet.";}};RATING.isOn=(tbn!=="")?true:false;RATING.resetStars();addEvent(document.getElementById("ratingContainer"),"mouseout",function(){if(RATING.isOn){RATING.resetStars();}});for(var i=0;i<RATING.starIds.length;i++){addEvent(document.getElementById(RATING.starIds[i]),"mouseover",function(){if(RATING.isOn){var c=this.id;var b=0;for(var a=0;a<RATING.starIds.length;a++){if(c===RATING.starIds[a]){b=a;}}for(var a=0;a<RATING.starIds.length;a++){if(a<=b){document.getElementById(RATING.starIds[a]).className="star-over";}else{document.getElementById(RATING.starIds[a]).className="star-off";}}}});addEvent(document.getElementById(RATING.starIds[i]),"click",function(){if(RATING.isOn){var b=this.id;for(var a=0;a<RATING.starIds.length;a++){if(b===RATING.starIds[a]){RATING.isOn=false;sendRequest("http://www.buffalonews.com/cgi-bin/ka_ratings_passthru.cgi?passto="+escape("http://account.mybuffalo.com/comments/ratings.php?tbn="+tbn+"pubdate="+storyMeta.pubdate+"&rating="+(a-1)+"&storyId="+storyMeta.storyId+"&url="+window.location.href),function(c){});document.getElementById("ratingThx").innerHTML="You have voted.";}}}});}document.getElementById("loginDest").value=window.location.href;var url=window.location.href;var found=url.indexOf("page=");var orderSelected=url.indexOf("order=");if(found>0||orderSelected>0){window.location.href="#comment";}if(window.location.search.indexOf("Invalid+Username+or+Password")!=-1){window.alert("Invalid user name or password. Please try again.");}