if(typeof(XMLHttpRequest)=="undefined"){XMLHttpRequest=function(){var A=["MSXML3","MSXML2","Microsoft"];for(var B=0;B<A.length;B++){try{return new ActiveXObject(A[B]+".XMLHTTP")}catch(C){}}throw new Error("No XML component installed")}}function LiveBlog(D,K,F,B,I,J,E,G,C){if((document.location+"").match(/(stage\.|localhost).*[\?&]reload=/i)){LiveBlog.LoadPageReload()}this.Title=null;this.Description=null;this.PreviewImage=null;this.URL=null;this.IsTopPostsWidget=false;this.OpenLinksType=(C!=null&&C!=undefined?C:0);if(K==null){K=true}if(F==null){F=(new Date()).toUTCString()}if(G==null){this.Width=600}else{this.Width=G}this.UserId=B;this.ASPSID=null;this.NewestAtBottom=K;this.Time=new Date(F);if((D+"").match(/^[0-9]+$/)){this.ThreadId=D;this.ThreadKey=""}else{this.ThreadId="";this.ThreadKey=D}if(E==null){this.PostsList=document.getElementById("Posts")}else{this.PostsList=E}this.StickyPostsList=null;try{this.StickyPostsList=document.getElementById("StickyPostHolder")}catch(A){}this.GroupPostsLists=new Array();this.GroupPostsLists[0]=this.PostsList;this.GroupNewestAtBottom=new Array();this.GroupNewestAtBottom[0]=this.NewestAtBottom;this.IsScriptaculousAvailable=false;this.IsjQueryAvailable=LiveBlog.CheckIfjQueryAvailable();this.IsCookiesAvailable=LiveBlog.CheckIfCookiesAvailable();this.IsPostUIAvailable=false;try{this.IsPostUIAvailable=(PostUI!=null)}catch(A){}this.IsWikiAvailable=false;this.IsSoundManagerAvailable=false;try{this.IsSoundManagerAvailable=(soundManager!=null&&soundManager.createSound!=null)}catch(A){}this.IsLivePollAvailable=LiveBlog.CheckIfLivePollAvailable();this.IsDeconceptAvailable=LiveBlog.CheckIfDeconceptAvailable();this.IsMdzrAvailable=LiveBlog.CheckIfMdzrAvailable();this.IsCrossDomain=false;this.HasWritePermission=false;this.HasModeratePermission=false;this.HasSkipModerationPermission=false;this.AllowedToEdit=(I==true);if(this.AllowedToEdit){this.HasWritePermission=true;this.HasModeratePermission=true;this.HasSkipModerationPermission=true}this.FadeColor_Start="#0099cc";this.FadeColor_End="#ffffff";this.FadeColor_End_Comment=null;this.NumPolls=0;this.IsEmergency=false;this.IsApprovingComment=null;this.CurrentVisitors=0;this.DisplayLanguage=J;if(this.DisplayLanguage==null||this.DisplayLanguage==""){this.DisplayLanguage="en";if(this.DisplayLanguage==null||this.DisplayLanguage==""){this.DisplayLanguage="en"}}this.CurrentDisplayLanguage=this.DisplayLanguage;this.CurrentRequestId=null;this.HasShownReloadPrompt=false;if(this.DisplayLanguage){this.TranslateAllPosts()}LiveBlog.StoreInstance(this);this.LastModeratedCommentsPulsate=null;this.PollForModeratedComments();this.MetricsDisplayThreshold=1;this.PollForMetrics();this.NewPostSound=null;this.MaxCommentsDisplayed=200;this.MaxTweetsDisplayed=10;this.MaxListItems=200;this.UseCDN=true;this.IsModerated=true;this.NextClass="Odd";this.DefaultThumbnail="http://avatars.scribblelive.com/default.png";this.FilteredPostIds="";this.SetupContentTransformMatrix();LiveBlog.StartAdReload();this.IsCometAvailable=false;if(this.IsPostUIAvailable){var H=(this.AllowedToEdit?1:this.OpenLinksType);PostUI.SetupLinksToOpen(this.StickyPostsList,H);PostUI.SetupLinksToOpen(this.PostsList,H)}}LiveBlog.CheckIfCookiesAvailable=function(){if(LiveBlog.IsCookiesAvailable!=null){return LiveBlog.IsCookiesAvailable}else{try{LiveBlog.IsCookiesAvailable=((LiveBlog.IsjQueryAvailable==true||LiveBlog.CheckIfjQueryAvailable())&&jQuerySL.cookie!=null&&jQuerySL.cookie!=undefined?true:false)}catch(A){}return LiveBlog.IsCookiesAvailable}};LiveBlog.CheckIfDeconceptAvailable=function(){if(LiveBlog.IsDeconceptAvailable!=null){return LiveBlog.IsDeconceptAvailable}else{LiveBlog.IsDeconceptAvailable=false;try{LiveBlog.IsDeconceptAvailable=(deconcept!=null&&deconcept.SWFObjectUtil!=null)}catch(A){}return LiveBlog.IsDeconceptAvailable}};LiveBlog.CheckIfLivePollAvailable=function(){if(LiveBlog.IsLivePollAvailable!=null){return LiveBlog.IsLivePollAvailable}else{LiveBlog.IsLivePollAvailable=false;try{LiveBlog.IsLivePollAvailable=(LivePoll!=null)}catch(A){}return LiveBlog.IsLivePollAvailable}};LiveBlog.CheckIfMdzrAvailable=function(){if(LiveBlog.IsMdzrAvailable!=null){return LiveBlog.IsMdzrAvailable}else{LiveBlog.IsMdzrAvailable=false;try{LiveBlog.IsMdzrAvailable=(Mdzr!=null)}catch(A){}return LiveBlog.IsMdzrAvailable}};LiveBlog.CheckIfjQueryAvailable=function(){if(LiveBlog.IsjQueryAvailable!=null){return LiveBlog.IsjQueryAvailable}else{LiveBlog.IsjQueryAvailable=false;try{LiveBlog.IsjQueryAvailable=(jQuerySL!=null&&jQuerySL.effects!=null)}catch(A){}return LiveBlog.IsjQueryAvailable}};LiveBlog.CheckIfSWFObjectAvailable=function(){if(LiveBlog.IsSWFObjectAvailable!=null){return LiveBlog.IsSWFObjectAvailable}else{LiveBlog.IsSWFObjectAvailable=false;try{LiveBlog.IsSWFObjectAvailable=(SWFObject!=null)}catch(A){}return LiveBlog.IsSWFObjectAvailable}};LiveBlog.prototype.AddGroupPostsList=function(C,A,B){this.GroupPostsLists[C]=A;if(B==null){B=this.NewestAtBottom}this.GroupNewestAtBottom[C]=B};LiveBlog.prototype.GetGroupNewestAtBottom=function(A){if(A==null){A=0}return this.GroupNewestAtBottom[A]};LiveBlog.prototype.GetGroupPostsList=function(A){if(A==null){A=0}return this.GroupPostsLists[A]};LiveBlog.prototype.TranslateAllPosts=function(I){if(!I){if(!this.DisplayLanguage){return}else{I=this.DisplayLanguage}}else{this.DisplayLanguage=I}if(!this.IsCrossDomain){var J=document.getElementsByTagName("h2");for(var A=0;A<J.length;A++){this.TranslateContent(J[A].innerHTML,J[A])}var C=document.getElementsByTagName("h3");for(var A=0;A<C.length;A++){if(C[A].className!="Schedule"){this.TranslateContent(C[A].innerHTML,C[A])}}if(this.PostsList){var G=this.PostsList.getElementsByTagName("div");for(var A=0;A<G.length;A++){var F=G[A];if(F.className.match("Content")&&!F.innerHTML.match(/<(img|embed|object)/i)){this.TranslateContent(F.innerHTML,F)}else{if(F.className.match("Content")){var H=F.getElementsByTagName("p");for(var B=0;B<H.length;B++){var E=H[B];this.TranslateContent(E.innerHTML,E)}}}}}if(this.StickyPostsList){var D=this.StickyPostsList.getElementsByTagName("div");for(var A=0;A<D.length;A++){var F=D[A];if(F.className.match("Content")&&!F.innerHTML.match(/<(img|embed|object)/i)){this.TranslateContent(F.innerHTML,F)}else{if(F.className.match("Content")){var H=F.getElementsByTagName("p");for(var B=0;B<H.length;B++){var E=H[B];this.TranslateContent(E.innerHTML,E)}}}}}}else{if(this.PostsList){var G=this.PostsList.getElementsByTagName("li");for(var A=0;A<G.length;A++){var F=G[A];if(!F.innerHTML.match(/<(embed|object|img)/i)){this.TranslateContent(F.innerHTML,F)}else{if(F.className.match("Content")){var H=F.getElementsByTagName("p");for(var B=0;B<Caption.length;B++){var E=H[B];this.TranslateContent(E.innerHTML,E)}}}}}if(this.StickyPostsList){var D=this.StickyPostsList.getElementsByTagName("li");for(var A=0;A<D.length;A++){var F=D[A];if(!F.innerHTML.match(/<(embed|object|img)/i)){this.TranslateContent(F.innerHTML,F)}else{if(F.className.match("Content")){var H=F.getElementsByTagName("p");for(var B=0;B<Caption.length;B++){var E=H[B];this.TranslateContent(E.innerHTML,E)}}}}}}this.CurrentDisplayLanguage=this.DisplayLanguage};LiveBlog.StoreInstance=function(B){if(LiveBlog.__instances==null){LiveBlog.__instances=new Array()}var A;if(B.ThreadId!=""){A=""+B.ThreadId}else{if(B.ThreadKey!=""){A=B.ThreadKey}else{A="0"}}if(LiveBlog.__instances[A]==null){LiveBlog.__instance=B;LiveBlog.__instances[A]=B;return true}else{return false}};LiveBlog.GetInstance=function(A){if(LiveBlog.__instances==null){return null}else{if(A==null){return LiveBlog.__instance}else{return LiveBlog.__instances[""+A]}}};LiveBlog.GetInstances=function(){return LiveBlog.__instances};LiveBlog.DestroyElement=function(A){A.parentNode.removeChild(A);return false};LiveBlog.UserLanguage=function(){return"en"};LiveBlog.Ping=function(F,A,D){var I=LiveBlog.GetInstance(F);if(I==null){return}if(D==null){D=false}var E=false;if(A.Posts!=null){E=true}var G=new Date(A.Time);if(D||G>=new Date(I.Time)){I.PollForNew_Handler(A)}var J=document.getElementsByTagName("script");for(var H=0;H<J.length;H++){if((J[H].src+"").match(/(liveupdate1\.scribblelive\.com|cdn\.cloudfront|lastmodified\.aspx)/i)){}}var B=6000;var C=Math.round(Math.random()*4000);if(C>2000){B+=C-2000}else{B-=C}if(E){setTimeout(function(){I.PollForNew(I.Time)},B)}else{if(new Date(A.Time)>new Date(I.Time)){I.PollForNew(I.Time,true)}else{setTimeout(function(){I.PollForNew(I.Time)},B)}}};LiveBlog.prototype.BlockPostDisplay=function(A){this.FilteredPostIds+=A+","};LiveBlog.prototype.PollForNew_Handler=function(N){var E=N;var T=E.Time;var G=new Date(E.Time);var Y=E.Posts;var D=0;if(Y!=null){var H=false;if(!this.IsCrossDomain&&Y.length>0&&this.NewestAtBottom){H=((LiveBlog.YPosition()+50)>=LiveBlog.PageHeight())}try{if(!this.UserId){this.UserId=-1}}catch(X){this.UserId=-1}var R;var K;var W=null;for(var M=0;M<Y.length;M++){K=new Date(Y[M].Date);if(K<=this.Time){}else{if(!this.FilteredPostIds.match(Y[M].Id+",")){W=null;if(document.getElementById("LiveBlog_Post"+Y[M].Id)!=null){W=document.getElementById("LiveBlog_Post"+Y[M].Id).LastEdit}if(this.GetGroupPostsList(Y[M].Group)==null&&!Y[M].Content.match(/^LiveArticleRevision[0-9]+$/)){}else{if(this.NewestAtBottom&&!this.IsCrossDomain&&!Y[M].IsDeleted&&(Y[M].EditorId==null||Y[M].EditorId=="")&&document.getElementById("LiveBlog_Post"+Y[M].Id)==null&&Y[M].Type=="1"){LiveBlog.Refresh(100)}else{if(Y[M].Type=="4"&&Y[M].Content.match(/^LiveArticleRevision[0-9]+$/)&&!LiveBlog.IsEmbed()){try{if(this.IsjQueryAvailable&&typeof(LiveArticle_Viewer)!="undefined"&&LiveArticle_Viewer.GetInstance()!=null){var V=Y[M].Content.match(/^LiveArticleRevision([0-9]+)$/)[1];if(V!=null){LiveArticle_Viewer.LoadRevision(V)}}else{if(this.IsjQueryAvailable&&typeof(LiveArticle_Viewer)!="undefined"&&LiveArticle_Viewer.GetInstance()==null){jQuerySL("#TopPagination").before('<div class="LiveArticle"></div>');var V=Y[M].Content.match(/^LiveArticleRevision([0-9]+)$/)[1];(new LiveArticle_Viewer(null,".LiveArticle")).AnimateEdits();if(V!=null){LiveArticle_Viewer.LoadRevision(V)}}}}catch(X){}}else{if(Y[M].Type=="4"&&(this.AllowedToEdit||Y[M].CreatorId==this.Userid||Y[M].EditorId==this.UserId)&&!Y[M].IsDeleted){if(this.EditorId==this.UserId&&Y[M].Content.match(/invited/)){if(confirm("You have been invited to join this live event as a writer.\nClick OK to load the writer interface immediately, or just reload when you have a chance.")){LiveBlog.ReloadPage()}}else{this.AttachNewPost(Y[M],5)}}else{if(Y[M].IsDeleted&&document.getElementById("LiveBlog_Post"+Y[M].Id)!=null){this.DisconnectPost(document.getElementById("LiveBlog_Post"+Y[M].Id),D);D++}else{if(document.getElementById("LiveBlog_Post"+Y[M].Id)!=null&&document.getElementById("LiveBlog_Post"+Y[M].Id).parentNode==document.getElementById("VideoHolderList")){if(Y[M].Rank>0){R=document.getElementById("LiveBlog_Post"+Y[M].Id);R.id+="DELETING";this.DisconnectPost(R,D);if(this.IsCrossDomain){this.AttachNewCrossposting(Y[M])}else{if(!Y[M].IsComment){this.AttachNewPost(Y[M],null,null,D)}else{this.AttachNewComment(Y[M],null,D)}}D++}}else{if((!Y[M].IsDeleted&&((this.IsTopPostsWidget&&Y[M].Type!="9")||!this.IsTopPostsWidget)&&document.getElementById("LiveBlog_Post"+Y[M].Id)==null)||(document.getElementById("LiveBlog_Post"+Y[M].Id)!=null&&((this.IsTopPostsWidget&&Y[M].Type!="9")||!this.IsTopPostsWidget)&&document.getElementById("LiveBlog_Post"+Y[M].Id).parentNode!=this.GetGroupPostsList(Y[M].Group)&&document.getElementById("LiveBlog_Post"+Y[M].Id).parentNode!=document.getElementById("VideoHolderList")&&document.getElementById("LiveBlog_Post"+Y[M].Id).parentNode!=document.getElementById("StickyPostHolder"))){if(document.getElementById("LiveBlog_Post"+Y[M].Id)!=null){R=document.getElementById("LiveBlog_Post"+Y[M].Id);R.id+="DELETING";this.DisconnectPost(R,D)}if(this.IsCrossDomain){this.AttachNewCrossposting(Y[M])}else{if(!Y[M].IsComment){this.AttachNewPost(Y[M],null,null,D);if(Y[M].Source==""){this.UpdateWhosBlogging(Y[M].CreatorName,LiveBlog.GetUrlWithCorrectSecurity(Y[M].CreatorThumbnail))}}else{this.AttachNewComment(Y[M],null,D)}}D++}else{if(document.getElementById("LiveBlog_Post"+Y[M].Id)!=null&&W!=Y[M].Date&&!this.IsCrossDomain){R=document.getElementById("LiveBlog_Post"+Y[M].Id);if(R.firstChild.className.match("IsEditing")==null&&R.LastModified!=Y[M].Date){if(Y[M].Type=="9"&&this.IsLivePollAvailable){var Q=null;Q=LivePoll.GetInstance(Y[M].Entities.Id);if(Q!=null){if(Y[M].Entities.IsOpen==1&&!Q.IsOpen){Q.Load(Y[M].Entities);Q.IsOpen=true;Q.Draw(Q.DrawHolder)}else{if(Y[M].Entities.IsOpen==0){Q.Load(Y[M].Entities);Q.IsOpen=false;Q.Update()}}}}else{if((Y[M].Type=="1"||Y[M].Type=="7")&&Y[M].Content.match(/<(object|embed)/i)){R.insertBefore(this.ConstructContentElement(Y[M]),R.firstChild);R.removeChild(R.childNodes[1]);if(this.IsjQueryAvailable){try{var A=jQuerySL(R.firstChild).find("p.Caption").html();jQuerySL("#LiveBlog_Post"+Y[M].Id).find("p.Caption").html(this.TranslateContent(A.replace(/&quot;/g,'"'),jQuerySL("#LiveBlog_Post"+Y[M].Id).find("p.Caption")[0]))}catch(U){}}}else{if(!Y[M].Content.match(/(<img)/i)&&Y[M].Type=="1"){R.firstChild.innerHTML=this.TranslateContent(Y[M].Content.replace(/&quot;/g,'"'),document.getElementById("LiveBlog_Post"+Y[M].Id).firstChild)}else{if(Y[M].Type=="2"||Y[M].Type=="3"||Y[M].Type=="6"){var F="#LiveBlog_Post"+Y[M].Id+" .Content textarea";var O="LiveBlog_Post"+Y[M].Id;var B=LiveBlog.getElementsByClassName("Caption","",R.firstChild);if(B.length>0){B=B[0]}else{B=null}if(Y[M].Caption!=null){if(B!=null&&B!=undefined){B.innerHTML=this.TranslateContent(Y[M].Caption.replace(/&quot;/g,'"'),B)}else{try{var S=LiveBlog.getElementsByClassName("Content","",document.getElementById(O))[0];S.removeChild(S.getElementsByTagName("textarea")[0])}catch(X){}var C=document.createElement("p");C.className="Caption";C.innerHTML=Y[M].Caption.replace(/&quot;/g,'"');R.firstChild.appendChild(C);C.innerHTML=this.TranslateContent(C.innerHTML,C)}}else{if(B!=null&&B!=undefined){try{LiveBlog.getElementsByClassName("Content","",document.getElementById(O))[0].removeChild(B)}catch(X){}}}if(Y[M].Type=="2"){var I=R.getElementsByTagName("img")[0].src;I=I.replace(/_\d+\.(jpg|png|gif)$/i,".$1");if(Y[M].Content.match(/^http:\/\/(.*?)\.(jpg|png|gif)$/i)&&I!=null&&I!=Y[M].Content){var S=this.ConstructContentElement(Y[M],null);R.replaceChild(S,R.childNodes[0])}}}}}}var J="";if(this.HasWritePermission||this.IsTopPostsWidget||(typeof(ShowPostPermalink)!="undefined"&&ShowPostPermalink==false)){J=LiveBlog.ConvertServerTimeToLocalTimeFriendlyString(Y[M].Date)}else{J='<span class="DisplayPostTime"><a href="javascript:void(0)" class="SinglePostLink" onmouseover="this.href=GetSinglePostPermalink ('+Y[M].Id+', true)" onclick="return GoToSinglePostPermalink('+Y[M].Id+');return false;">'+LiveBlog.ConvertServerTimeToLocalTimeFriendlyString(Y[M].Date)+"</a></span>"}var P=(this.UserId==Y[M].CreatorId);var L=((this.UserId==Y[M].EditorId)||(Y[M].EditorId==""&&this.UserId==Y[M].CreatorId));R.getElementsByTagName("div")[1].innerHTML='by <em class="Creator'+Y[M].CreatorId+(P?" Yourself":"")+'">'+(P?"you":Y[M].CreatorName)+"</em>"+(Y[M].Source!=null&&Y[M].Source!=""?" <span class='Source'>via "+LiveBlog.GetInstance().GetTranslation(Y[M].Source)+"</span> ":"")+'</em> edited by <em class="Editor'+(Y[M].EditorId!=""?" Editor"+Y[M].EditorId:" Editor"+Y[M].CreatorId)+(L?" Yourself":"")+'">'+(L?"you":(Y[M].EditorName!=""?Y[M].EditorName:Y[M].CreatorName))+"</em> "+J;this.SetPostRank(R,Y[M].Rank,Y[M].Group,Y[M]);this.OnEditPost(R,R.parentNode,Y[M].Id,Y[M].Rank,Y[M].Group,Y[M]);if(this.IsPostUIAvailable){PostUI.GetInstance().Setup(R)}this.FlashEdited(R);D++}}else{if(document.getElementById("LiveBlog_Post"+Y[M].Id)!=null&&W!=Y[M].Date&&this.IsCrossDomain&&!Y[M].Content.match(/(<img|<object|<embed)/i)&&Y[M].Type=="1"){R=document.getElementById("LiveBlog_Post"+Y[M].Id);R.innerHTML=R.innerHTML.replace(/^(.*?<\/em>).*$/i,"$1 "+Y[M].Content);this.SetPostRank(R,Y[M].Rank,Y[M].Group,Y[M]);this.OnEditPost(R,R.parentNode,Y[M].Id,Y[M].Rank,Y[M].Group,Y[M]);this.FadeIn(document.getElementById("LiveBlog_Post"+Y[M].Id));D++}else{if(document.getElementById("LiveBlog_Post"+Y[M].Id)!=null){this.SetPostRank(document.getElementById("LiveBlog_Post"+Y[M].Id),Y[M].Rank,Y[M].Group,Y[M])}}}}}}}}}}}}}}if(Y!=null){this.Time=G}};LiveBlog.getElementsByClassName=function(C,A,B){if(document.getElementsByClassName){getElementsByClassName=function(L,G,J){J=J||document;var F=J.getElementsByClassName(L),H=(G)?new RegExp("\\b"+G+"\\b","i"):null,I=[],E;for(var D=0,K=F.length;D<K;D+=1){E=F[D];if(!H||H.test(E.nodeName)){I.push(E)}}return I}}else{if(document.evaluate){getElementsByClassName=function(P,J,N){J=J||"*";N=N||document;var M=P.split(" "),I="",D="http://www.w3.org/1999/xhtml",K=(document.documentElement.namespaceURI===D)?D:null,L=[],E,H;for(var F=0,O=M.length;F<O;F+=1){I+="[contains(concat(' ', @class, ' '), ' "+M[F]+" ')]"}try{E=document.evaluate(".//"+J+I,N,K,0,null)}catch(G){E=document.evaluate(".//"+J+I,N,null,0,null)}while((H=E.iterateNext())){L.push(H)}return L}}else{getElementsByClassName=function(R,J,P){J=J||"*";P=P||document;var N=R.split(" "),I=[],H=(J==="*"&&P.all)?P.all:P.getElementsByTagName(J),E,M=[],O;for(var F=0,D=N.length;F<D;F+=1){I.push(new RegExp("(^|\\s)"+N[F]+"(\\s|$)"))}for(var G=0,K=H.length;G<K;G+=1){E=H[G];O=false;for(var Q=0,L=I.length;Q<L;Q+=1){O=I[Q].test(E.className);if(!O){break}}if(O){M.push(E)}}return M}}}return getElementsByClassName(C,A,B)};LiveBlog.prototype.DisconnectPost=function(C,A){if(C==null){return}if(A==null){A=0}if(C.IsDeleted!=null&&C.IsDeleted){return}if((C.className+"").match(/Comment/)){this.UpdateStats(0,-1)}else{this.UpdateStats(-1,0)}for(var D=0;D<C.parentNode.childNodes.length;D++){if(C.parentNode.childNodes[D].tagName==null||(C.parentNode.childNodes[D].tagName.toUpperCase()!="LI"&&!(C.parentNode.childNodes[D].className+"").match(/FloatingEdit/))){C.parentNode.removeChild(C.parentNode.childNodes[D])}}var B=false;if(C.id==C.parentNode.firstChild.id&&C.parentNode.childNodes.length>1){B=true;C.nextSibling.className=C.nextSibling.className+" First"}if(A<10&&this.IsjQueryAvailable&&!jQuerySL.browser.msie){C.IsDeleted=true;jQuerySL(C).animate({opacity:"0",height:"0"},500,function(){jQuerySL(this).remove()});this.OnStickPost(false)}else{this.OnStickPost(false);C.parentNode.removeChild(C)}};LiveBlog.prototype.OnStickPost=function(){};LiveBlog.prototype.PollForNew=function(C,E){if(this.IsCometAvailable){return}if(E==null){E=false}if(C==null){C=this.Time}var G=this;this.NumPolls++;var D;if(E){D="recentposts.js"}else{D="lastmodified.js"}var J;var F;if(this.ThreadKey!=""){F="/LastModified.aspx?ThreadKey="+this.ThreadKey+"&rand="+Math.round(100000000*Math.random())}else{if((document.location+"").match(/(scribblelive0|localhost|keebler\.net)/i)||this.AllowedToEdit||!this.UseCDN){F="/LastModified.aspx?ThreadId="+this.ThreadId+"&rand="+Math.round(100000000*Math.random())}else{if(("http://www.scribblelive.com").match(/(\Wdev\.scribblelive\.com|\.scribblelive\.me)/i)||(document.location+"").match(/(\Wdev\.scribblelive\.com|\.scribblelive\.me)/i)){if(LiveBlog.IsSecure()){J="https://s3.amazonaws.com/liveupdate1-stage.scribblelive.com/"}else{J="http://liveupdate1-stage.scribblelive.com/"}F=J+(this.ThreadId+"").replace(/([0-9])/g,"$1/")+D+"?rand="+Math.round(100000000*Math.random())}else{if(LiveBlog.IsSecure()){J="https://s3.amazonaws.com/liveupdate1.scribblelive.com/"}else{J="http://liveupdate1.scribblelive.com/"}F=J+(this.ThreadId+"").replace(/([0-9])/g,"$1/")+D+"?rand="+Math.round(100000000*Math.random())}}}var I=document.createElement("script");I.src=F;I.type="text/javascript";var A=Math.round(Math.random()*10000000000);G.CurrentRequestId=A;document.getElementsByTagName("head")[0].appendChild(I);var B=0;var H=setInterval(function(){if(G.CurrentRequestId!=A){I.parentNode.removeChild(I);clearInterval(H)}else{if(G.CurrentRequestId==A&&B>15){G.PollForNew(C,E);clearInterval(H)}}B++},1000)};LiveBlog.prototype.MetricsPing=function(C){if(typeof(C)!="undefined"&&typeof(C.people)!="undefined"&&C.people!=null&&C.people!=""){this.CurrentVisitors=C.people}if(parseInt(this.CurrentVisitors)>100){this.IsEmergency=true}var B=document.getElementsByTagName("em");for(var A=0;A<B.length;A++){if(B[A].className=="CurrentVisitors"){if(this.NewestAtBottom||parseInt(this.CurrentVisitors)<=this.MetricsDisplayThreshold){B[A].innerHTML=""}else{B[A].innerHTML=this.CurrentVisitors+"&nbsp;watchers"}}}if(document.getElementById("TotalVisitors")!=null){}};LiveBlog.prototype.UpdateWhosBlogging=function(B,D){var E=document.getElementById("WhosBloggingSidebar");if(E!=null){if(this.Writers==null){this.Writers=new Array();var H=E.getElementsByTagName("li");var C;for(var A=0;A<H.length;A++){try{C=(H[A].innerHTML+"").match(/([^>]+)\s*$/)[1];this.Writers[C]=1}catch(F){}}}if(this.Writers[B]==null){var G="<img src='http://avatars.scribblelive.com/default.png' />";if(D!=null&&D!=""){G="<img src='"+D+"' />"}E.getElementsByTagName("ul")[0].innerHTML+="<li>"+G+B+"</li>";this.Writers[B]=1}}};LiveBlog.prototype.UpdateStats=function(A,B){if(A!=null&&A!=0&&document.getElementById("TotalPosts")!=null){document.getElementById("TotalPosts").innerHTML=parseInt(document.getElementById("TotalPosts").innerHTML)+A}if(B!=null&&B!=0&&document.getElementById("TotalComments")!=null){document.getElementById("TotalComments").innerHTML=parseInt(document.getElementById("TotalComments").innerHTML)+B}};LiveBlog.prototype.PollForMetrics=function(){if(LiveBlog.IsEmbed()){return}this.GetMetrics();var B=this;var A=setInterval(function(){B.GetMetrics()},50000+Math.round(10000*Math.random()))};LiveBlog.prototype.GetMetrics=function(){if(this.MetricsScriptTag!=null){this.MetricsScriptTag.parentNode.removeChild(this.MetricsScriptTag)}var A=(LiveBlog.IsSecure()?"https://client.scribblelive.com/api.chartbeat.com":"http://metrics.scribblelive.com/api.chartbeat.com")+"/quickstats?host=scribblelive.com&apikey=92f9cd8c0ade19b8fea6155d785122f9&path=/"+this.ThreadId+"&jsonp=LiveBlog.GetInstance("+this.ThreadId+").MetricsPing&rand="+Math.round(10000000*Math.random());var B=document.createElement("script");B.src=A;B.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(B);this.MetricsScriptTag=B};LiveBlog.prototype.PollForModeratedComments=function(){if(!this.AllowedToEdit||this.IsCrossDomain||document.getElementById("Moderated")==null){return false}if(this.ModCommentsSince==null){this.ModCommentsSince=""}var req=new XMLHttpRequest();req.open("GET","/GetModeratedPosts.aspx?threadid="+this.ThreadId+"&since="+(this.ModCommentsSince)+"&rand="+Math.round(10000000*Math.random()),true);var _LiveBlog=this;req.onreadystatechange=function(){if(req.readyState==4){if(req.status==200&&req.responseText!=""){var ResponseObject=eval("("+req.responseText+")");if(this.ModCommentsSince!=""){var ModeratedComments=ResponseObject.ModeratedComments;if(ModeratedComments!=null){for(var i=0;i<ModeratedComments.length;i++){if(ModeratedComments[i].IsDeleted=="0"){if(document.getElementById("LiveBlog_Post"+ModeratedComments[i].Id)==null){_LiveBlog.AttachNewModeratedComment(ModeratedComments[i],null,ModeratedComments.length)}else{PostElement=document.getElementById("LiveBlog_Post"+ModeratedComments[i].Id);if(PostElement.LastEdit!=ModeratedComments[i].Date){if((ModeratedComments[i].Type=="1"||ModeratedComments[i].Type=="7")&&ModeratedComments[i].Content.match(/<(object|embed)/i)){PostElement.insertBefore(_LiveBlog.ConstructContentElement(ModeratedComments[i],240),PostElement.firstChild);PostElement.removeChild(PostElement.childNodes[1])}else{if(!ModeratedComments[i].Content.match(/(<img)/i)&&ModeratedComments[i].Type=="1"){PostElement.firstChild.innerHTML=_LiveBlog.TranslateContent(ModeratedComments[i].Content.replace(/&quot;/g,'"'),document.getElementById("LiveBlog_Post"+ModeratedComments[i].Id).firstChild)}else{if(ModeratedComments[i].Type=="2"||ModeratedComments[i].Type=="3"||ModeratedComments[i].Type=="6"){var ElementName="#LiveBlog_Post"+ModeratedComments[i].Id+" .Content textarea";if(_LiveBlog.IsjQueryAvailable){if(ModeratedComments[i].Caption!=null){if(jQuerySL(PostElement.firstChild).find("p.Caption").length>0){jQuerySL(PostElement.firstChild).find("p.Caption").html(ModeratedComments[i].Caption.replace(/&quot;/g,'"'))}else{jQuerySL(ElementName).remove();PostElement.firstChild.innerHTML+="<p class='Caption'>"+ModeratedComments[i].Caption.replace(/&quot;/g,'"')+"</p>"}}else{jQuerySL(PostElement.firstChild).find("p.Caption").remove()}if(ModeratedComments[i].Type=="2"){var ImageUrl=PostElement.getElementsByTagName("img")[0].src;ImageUrl=ImageUrl.replace(/_\d+\.(jpg|png|gif)$/i,".$1");if(ModeratedComments[i].Content.match(/^http:\/\/(.*?)\.(jpg|png|gif)$/i)&&ImageUrl!=null&&ImageUrl!=ModeratedComments[i].Content){var ContentElement=_LiveBlog.ConstructContentElement(ModeratedComments[i],null);PostElement.replaceChild(ContentElement,PostElement.childNodes[0])}}}}}}if(_LiveBlog.IsPostUIAvailable){PostUI.GetInstance().Setup(PostElement)}_LiveBlog.FlashEdited(PostElement)}}}else{_LiveBlog.DisconnectPost(document.getElementById("LiveBlog_Post"+ModeratedComments[i].Id))}}}}_LiveBlog.ModCommentsSince=ResponseObject.Time;setTimeout(function(){_LiveBlog.PollForModeratedComments()},5000)}else{setTimeout(function(){_LiveBlog.PollForModeratedComments()},10000)}}};req.send(null);return true};LiveBlog.prototype.GetStickyPosts=function(E,B){if(this.IsjQueryAvailable){return jQuerySL.makeArray(jQuerySL(E).children("li.Sticky:not(#"+B.id+")"))}else{var C=new Array();var A=E.getElementsByTagName("li");for(var D=0;D<A.length;D++){if((A[D].className+"").match(/Sticky/)&&A[D]!=B){C.push(A[D])}}return C}};LiveBlog.prototype.IsEmbed=function(A){if(A!=null&&A.getElementsByTagName("div").length>0){return(A.getElementsByTagName("div")[0].innerHTML.match(/<(object|embed)/i))}else{return false}};LiveBlog.HasEmbedCode=function(A){if(A!=null&&A!=undefined){var B=A.match(/(<)(object|embed|iframe)/i);if(B!=null&&B!=undefined&&B.length>=1){return true}}return false};LiveBlog.prototype.IsStuck=function(A){return(A.className+"").match(/Sticky/)};LiveBlog.prototype.SetPostRank=function(D,C,B,A){return this.ConnectNewPost(D,null,null,null,C,B,null,A)};LiveBlog.prototype.OnEditPost=function(){return true};LiveBlog.prototype.OnConnectNewPost=function(){return true};LiveBlog.prototype.ConnectNewPost=function(A,S,Q,N,M,E,I,D,K){if(!this.OnConnectNewPost(A,S,Q,N,M,E,D)){return}if(I==null){I=0}if(E==null){E=0}if(S==null){S=this.GetGroupPostsList(E);if(S==null){return}if(E==1){if(!this.HasAttachedFirstOnDeckComment){jQuerySL(".OnDecksComment").remove();this.HasAttachedFirstOnDeckComment=true}}}var L=false;if(S==this.GetGroupPostsList(0)&&M==0&&this.IsEmbed(A)&&document.getElementById("VideoHolderList")!=null){S=document.getElementById("VideoHolderList");L=true}if(S==this.GetGroupPostsList(0)&&M==0&&document.getElementById("StickyPostHolder")!=null){S=document.getElementById("StickyPostHolder");this.OnStickPost(true)}if(S==A.parentNode){if(M==0&&this.IsStuck(A)){return}else{if(M>0&&!this.IsStuck(A)){return}}}else{if((this.IsjQueryAvailable&&jQuerySL("a#ToggleStuckPosts").is(":visible"))&&A.parentNode!=null&&A.parentNode.id=="StickyPostHolder"&&jQuerySL(A).parent().children("li").length<=1){this.OnStickPost(false)}}if(L){var J=A.getElementsByTagName("div")[0];var G=jQuerySL(S).width();var F=J.getElementsByTagName("span");if(F.length>0){for(var H=0;H<F.length;H++){if((F[H].className+"").match(/VideoEmbedHolder/)){F[H].style.width="auto";F[H].style.height="auto"}}}}if((A.className+"").match(/Comment/)){this.UpdateStats(0,1)}else{this.UpdateStats(1,0)}var B=false;if(I<10&&this.IsjQueryAvailable&&(A.parentNode==null||typeof A.parentNode=="object")){B=true;A.style.display="none"}if(Q==null){Q=this.GetGroupNewestAtBottom(E)}if(N==null){N=this.MaxListItems}else{if(N>this.MaxListItems){N=this.MaxListItems}}if(M==null||!this.IsjQueryAvailable){M=1}if(M==0){A.className+=" Sticky"}else{A.className=(A.className+"").replace(/Sticky/g,"")}if(Q||S.getElementsByTagName("li").length<=0){S.appendChild(A);if(S.getElementsByTagName("li").length==1){A.className+=" First"}}else{var R=this.GetStickyPosts(S,A);if(R.length<=0){if(S.id!=null&&S.id=="Moderated"&&((typeof(ModeratedNewestAtBottom)!=undefined&&ModeratedNewestAtBottom)||(K!=null&&K))){S.appendChild(A)}else{for(var H=0;H<S.childNodes.length&&H<3;H++){if(S.childNodes[H].className){S.childNodes[H].className=S.childNodes[H].className.replace("First","")}}A.className+=" First";S.insertBefore(A,S.firstChild)}}else{if(R[R.length-1].nextSibling==null){S.appendChild(A)}else{S.insertBefore(A,R[R.length-1].nextSibling)}}}if(A.parentNode!=null&&A.parentNode.id=="Posts"){A.className+="  "+this.NextClass;if(this.NextClass==""){this.NextClass="Odd"}else{this.NextClass=""}}if(this.IsjQueryAvailable&&B){ItemHeight=jQuerySL(A).height()+"px";jQuerySL(A).css({"display":"block","height":"0","verticalAlign":"top"});jQuerySL(A).animate({height:ItemHeight},500,function(){jQuerySL(A).css({"height":"auto"})});this.FadeIn(A)}else{if(this.FadeColor_End!=null){A.style.backgroundColor=this.FadeColor_End;A.style.display="block"}}try{if(this.NewPostSound!=null&&this.IsSoundManagerAvailable&&(this.LastSoundPlay==null||this.LastSoundPlay+""!=new Date()+"")){var P=this.NewPostSound;soundManager.onready(function(){if(soundManager.getSoundById("ScribbleLiveSoundEmbed")==null){soundManager.createSound({id:"ScribbleLiveSoundEmbed",url:P,autoLoad:true,autoPlay:true})}else{if(soundManager.getSoundById("ScribbleLiveSoundEmbed").url!=P){soundManager.getSoundById("ScribbleLiveSoundEmbed").destruct();soundManager.createSound({id:"ScribbleLiveSoundEmbed",url:P,autoLoad:true,autoPlay:true})}else{soundManager.getSoundById("ScribbleLiveSoundEmbed").play()}}});this.LastSoundPlay=new Date()}}catch(C){}if(S.childNodes.length>N){var O;if(Q){O=S.getElementsByTagName("li")[0]}else{if(this.IsjQueryAvailable){O=jQuerySL(S).children("li:last-child").get(0)}else{O=S.getElementsByTagName("div")[S.getElementsByTagName("div").length-1].parentNode}}if(!(O.getElementsByTagName("div")[0].className+"").match(/IsEditing/)){S.removeChild(O)}else{if(O.previousSibling!=null){S.removeChild(O.previousSibling)}}}if(this.IsPostUIAvailable){PostUI.GetInstance().Setup(A)}};LiveBlog.AddThumbnailStyleToItem=function(B,A){if(!A&&LiveBlog.GetInstance().DefaultThumbnail!=null&&LiveBlog.GetInstance().DefaultThumbnail!=""){A=LiveBlog.GetUrlWithCorrectSecurity(LiveBlog.GetInstance().DefaultThumbnail)}if(A!=null&&A!=""){B.className+=" Thumbnail";B.style.backgroundImage="url("+LiveBlog.GetUrlWithCorrectSecurity(A)+")"}};LiveBlog.prototype.AttachNewTweet=function(H,C,E){var B=C;if(E==null||E==undefined){E=false}if(document.getElementById("LiveBlog_Post"+H.Id)!=null){return}var F=document.createElement("li");F.id="LiveBlog_Post"+H.Id;F.className="Comment";if(H.Coordinates!=null){F.className=F.className+" Lat"+H.Coordinates[0]+" Lon"+H.Coordinates[1]}var A=document.createElement("div");A.className="Content NoSave";A.innerHTML=this.TranslateContent(H.Content.replace(/&quot;/g,'"'),A);var G=this.ConstructMetaElement(H,true);LiveBlog.AddThumbnailStyleToItem(F);if(H.CreatorThumbnail!=null){jQuerySL("body").append("<img id="+F.id+" src="+H.CreatorThumbnail+" />");jQuerySL("img#"+F.id).load(function(){ImageWidth=jQuerySL("img#"+F.id).width();if(ImageWidth<=48){LiveBlog.AddThumbnailStyleToItem(F,H.CreatorThumbnail)}else{LiveBlog.AddThumbnailStyleToItem(F)}jQuerySL("img#"+F.id).remove()})}F.Meta=H;F.appendChild(A);F.appendChild(G);if(E){var D=this.ConstructTimestampElement(H);F.appendChild(D)}this.ConnectNewPost(F,B,false,this.MaxTweetsDisplayed)};LiveBlog.prototype.AttachNewFacebookPost=function(H,C,E){if(E==null||E==undefined){E=false}var B=C;if(document.getElementById("LiveBlog_Post"+H.Id)!=null){return}var F=document.createElement("li");F.id="LiveBlog_Post"+H.Id;F.className="Comment";var A=document.createElement("div");A.className="Content NoSave";A.innerHTML=this.TranslateContent(H.Content.replace(/&quot;/g,'"'),A);var G=this.ConstructMetaElement(H,true);LiveBlog.AddThumbnailStyleToItem(F);if(H.CreatorThumbnail!=null){jQuerySL("body").append("<img id="+F.id+" src="+H.CreatorThumbnail+" />");jQuerySL("img#"+F.id).load(function(){ImageWidth=jQuerySL("img#"+F.id).width();if(ImageWidth<=50){LiveBlog.AddThumbnailStyleToItem(F,H.CreatorThumbnail)}else{LiveBlog.AddThumbnailStyleToItem(F)}jQuerySL("img#"+F.id).remove()})}F.Meta=H;F.appendChild(A);F.appendChild(G);if(E){var D=this.ConstructTimestampElement(H);F.appendChild(D)}this.ConnectNewPost(F,B,false,this.MaxTweetsDisplayed)};LiveBlog.prototype.AttachNewModeratedComment=function(K,D,F,E){var C;if(D!=null){C=D}else{if(document.getElementById("Moderated")==null){return null}else{C=document.getElementById("Moderated")}}if(document.getElementById("LiveBlog_Post"+K.Id)!=null){return}var I=document.createElement("li");I.id="LiveBlog_Post"+K.Id;I.className="Comment";if(K.CreatorId==LiveBlog.GetInstance().UserId){I.className+=" You "}var B=this.ConstructContentElement(K,240);var J=this.ConstructMetaElement(K,true);var G=this.ConstructTimestampElement(K);var H=(this.AllowedToEdit&&K.Type=="1"&&!K.Content.match(/<(object|embed)/)&&!B.innerHTML.match(/<img/));LiveBlog.AddThumbnailStyleToItem(I,K.CreatorThumbnail);I.appendChild(B);I.appendChild(J);I.appendChild(G);var A=this.MaxCommentsDisplayed;if(this.GroupPostsLists.length>1){A=null}if(this.IsApprovingComment!=null){if(this.ModeratedCommentConnectQueue==null){this.ModeratedCommentConnectQueue=new Array()}this.ModeratedCommentConnectQueue.push({"NewItem":I,"ListElement":C,"pMaxCommentsDisplayed":A,"pAttachToBottom":E})}else{this.ConnectNewPost(I,C,false,A,null,null,F,E)}if(!this.HasAttachedFirstModeratedComment){jQuerySL(".CommentsInModerationComment").remove();this.HasAttachedFirstModeratedComment=true}};LiveBlog.prototype.ExecuteModeratedCommentConnectQueue=function(){if(this.ModeratedCommentConnectQueue==null||this.ModeratedCommentConnectQueue.length<=0){return}var B=null;for(var A=0;A<this.ModeratedCommentConnectQueue.length;A++){B=this.ModeratedCommentConnectQueue[A];this.ConnectNewPost(B.NewItem,B.ListElement,false,B.pMaxCommentsDisplayed,null,null,this.ModeratedCommentConnectQueue.length,null,B.pAttachToBottom)}this.ModeratedCommentConnectQueue=null};LiveBlog.prototype.HasAttachedFirstModeratedComment=false;LiveBlog.prototype.HasAttachedFirstOnDeckComment=false;LiveBlog.prototype.AttachNewComment=function(H,B,C){var E=document.createElement("li");E.id="LiveBlog_Post"+H.Id;E.className="Comment";if(H.CreatorId==LiveBlog.GetInstance().UserId){E.className+=" You "}if(this.FadeColor_End!=null){E.style.backgroundColor=this.FadeColor_Start}if(B==null){B=this.Width;if(document.getElementById("VideoHolderList")!=null&&H.Rank==0&&(H.Type=="3"||H.Content.match(/<(object|embed)/i))){B=300}}var A=this.ConstructContentElement(H,B);E.LastModified=H.Date;var F=H.Source;if(F!=null&&F!=""){F=" <span class='Source'>via "+LiveBlog.GetInstance().GetTranslation(F)+"</span>"}else{F=""}var G=this.ConstructMetaElement(H,(H.Group!=0));var D=(this.AllowedToEdit&&H.Type=="1"&&!H.Content.match(/<(object|embed)/)&&!A.innerHTML.match(/<img/));if(typeof(HideAvatars)=="undefined"||HideAvatars.length==0){LiveBlog.AddThumbnailStyleToItem(E,H.CreatorThumbnail)}else{if(HideAvatars[0]==0&&(H.Source.indexOf("twitter")==-1&&H.Source.indexOf("facebook")==-1)){LiveBlog.AddThumbnailStyleToItem(E,H.CreatorThumbnail)}else{if(HideAvatars[6]==0&&(H.Source.indexOf("twitter")!=-1||H.Source.indexOf("facebook")!=-1)){LiveBlog.AddThumbnailStyleToItem(E,H.CreatorThumbnail)}}}E.appendChild(A);E.appendChild(G);this.ConnectNewPost(E,null,null,null,H.Rank,H.Group,C,H)};LiveBlog.prototype.AttachNewCrossposting=function(B){var E=document.createElement("li");var F;try{F=B.Type}catch(D){F=1}E.id="LiveBlog_Post"+B.Id;E.className="Writer"+B.CreatorId;if(this.IsjQueryAvailable){E.style.backgroundColor=this.FadeColor_Start}if(F==2){var C=B.Content;switch(this.Width){case 300:C=C.replace(/\.(jpe?g|png|gif)$/,"_300.$1");break;case 400:C=C.replace(/\.(jpe?g|png|gif)$/,"_400.$1");break;case 800:C=C.replace(/\.(jpe?g|png|gif)$/,"_800.$1");break;case 500:if(new Date(B.Date)>new Date("June 12, 2010")){C=C.replace(/\.(jpe?g|png|gif)$/,"_500.$1")}else{C=C.replace(/\.(jpe?g|png|gif)$/,"_400.$1")}break}E.innerHTML="<strong>"+LiveBlog.ConvertServerTimeToLocalTimeFriendlyString(B.Date)+"<abbr title='Your local time'>*</abbr></strong> <em>"+B.CreatorName+" -</em><br /><img src='"+C+"'/>"}else{if(F==3){LiveBlog.DisplayVideo(B.Content,B.Id+Math.round(10000*Math.random()),E,null,null,this.Width,"",B.Id);E.innerHTML="<strong>"+LiveBlog.ConvertServerTimeToLocalTimeFriendlyString(B.Date)+"<abbr title='Your local time'>*</abbr></strong> <em>"+B.CreatorName+" -</em> "+E.innerHTML}else{if(F==6){LiveBlog.DisplayAudio(B.Content,B.Id+Math.round(10000*Math.random()),E,null,this.Width,"",B.Id);E.innerHTML="<strong>"+LiveBlog.ConvertServerTimeToLocalTimeFriendlyString(B.Date)+"<abbr title='Your local time'>*</abbr></strong> <em>"+B.CreatorName+" -</em> "+E.innerHTML}else{var A=B.Content;if(A.match(/(<object|<embed)/i)){A=A.replace(/&quot;/g,'"');switch(this.Width){case 300:A=LiveBlog.ResizeObjectEmbed(A,300,250);break;case 400:A=LiveBlog.ResizeObjectEmbed(A,400,334);break}A="<br />"+A}E.innerHTML="<strong>"+LiveBlog.ConvertServerTimeToLocalTimeFriendlyString(B.Date)+"<abbr title='Your local time'>*</abbr></strong> <em>"+B.CreatorName+" -</em> "+A}}}this.ConnectNewPost(E)};LiveBlog.IsSecure=function(){return("https:"==document.location.protocol)};LiveBlog.GetUrlWithCorrectSecurity=function(A){if(A==null||A==""){return""}else{if(LiveBlog.IsSecure()&&typeof(A)=="string"){return A.replace(/^http:\/\/((images|avatars|embed)\.scribblelive.com.*)/i,"https://s3.amazonaws.com/$1")}else{return A}}};LiveBlog.prototype.OnConstructMetaElement=function(B,A){return true};LiveBlog.prototype.OnConstructMetaElementComplete=function(B,A){return true};LiveBlog.prototype.ConstructMetaElement=function(J,F){if(F==null){F=false}var G=35;var I=document.createElement("div");I.className="Meta";var C=(this.UserId==J.CreatorId);var E=((this.UserId==J.EditorId)||(J.EditorId==""&&this.UserId==J.CreatorId));if(!this.OnConstructMetaElement(I,J)){return I}var H=J.Source;if(H!=null&&H!=""){H=" <span class='Source'>via "+LiveBlog.GetInstance().GetTranslation(H)+"</span>"}else{H=""}var B="";var A="";if(J.LoginProvider!=undefined){B='title="From: '+J.LoginProvider+'" ';A='<span class="'+J.LoginProvider+'"></span>'}if(F){I.innerHTML="<em "+B+'class="Creator'+J.CreatorId+(C?" Yourself":"")+'">'+A+(C?"you":LiveBlog.ShortenText(J.CreatorName,G,"..."))+"</em>"}else{var D="";if(this.HasWritePermission||this.IsTopPostsWidget||(typeof(ShowPostPermalink)!="undefined"&&ShowPostPermalink==false)){D=LiveBlog.ConvertServerTimeToLocalTimeFriendlyString(J.Date)}else{D='<span class="DisplayPostTime"><a href="javascript:void(0)" class="SinglePostLink" onmouseover="this.href=GetSinglePostPermalink ('+J.Id+', true) " onclick="return GoToSinglePostPermalink('+J.Id+');return false;">'+LiveBlog.ConvertServerTimeToLocalTimeFriendlyString(J.Date)+"</a></span>"}I.innerHTML="by <em "+B+'class="Creator'+J.CreatorId+(C?" Yourself":"")+'">'+A+(C?"you":LiveBlog.ShortenText(J.CreatorName,G,"..."))+"</em>"+H+(J.EditorId!=""?' edited by <em class="Editor Editor'+J.EditorId+(E?" Yourself":"")+'">'+(E?"you":J.EditorName)+"</em>":"")+(J.Group==0?" "+D:"")}this.OnConstructMetaElementComplete(I,J);return I};LiveBlog.prototype.ConstructTimestampElement=function(C){var E=document.createElement("span");E.className="DisplayPostTime";var A="";var B="";var D="";if(C.IsApproved=="0"||C.IsApproved==0){A=LiveBlog.ConvertServerTimeToLocalTimeFriendlyString(((C.ReceivedDate!=null&&C.Receiveddate!=undefined)?C.ReceivedDate:C.Date));D="Received";B="received"}else{A=LiveBlog.ConvertServerTimeToLocalTimeFriendlyString(C.Date);D="Posted"}if(C.IsComment=="1"||C.IsComment==0){D+=" Comment"}E.innerHTML+='<span class="ServerTime">'+C.Date+'</span><span class="'+D+'"> '+B+" "+A+" </span>";return E};LiveBlog.prototype.OnConstructContentElement=function(A,B){return true};LiveBlog.prototype.ContentTransformMatrix=new Array();LiveBlog.prototype.AddContentTransform=function(C,B,D){var A=new Object();A.Condition=C;A.Transform=B;if(D==null){this.ContentTransformMatrix.push(A)}else{this.ContentTransformMatrix.push(D,0,A)}};LiveBlog.prototype.AddContentTransformFirst=function(B,A){this.AddContentTransofmr(B,A,0)};LiveBlog.prototype.SetupContentTransformMatrix=function(){this.AddContentTransform(function(A){return(A.Type==2)},function(B,A,D){var C=B.Content;switch(D){case 300:C=C.replace(/\.(jpe?g|png|gif)$/,"_300.$1");break;case 400:C=C.replace(/\.(jpe?g|png|gif)$/,"_400.$1");break;case 800:C=C.replace(/\.(jpe?g|png|gif)$/,"_800.$1");break;case 500:if(new Date(B.Date)>new Date("June 12, 2010")){C=C.replace(/\.(jpe?g|png|gif)$/,"_500.$1")}else{C=C.replace(/\.(jpe?g|png|gif)$/,"_400.$1")}break}var E;if(B.Caption!=null){E=document.createElement("p");E.className="Caption";E.innerHTML=B.Caption.replace(/&quot;/g,'"')}A.innerHTML="<img src='"+C+"' onload='LiveBlog.NewContentImageLoaded(this)'/>";if(E!=null){A.appendChild(E);LiveBlog.GetInstance().TranslateContent(E.innerHTML,E)}});this.AddContentTransform(function(A){return(A.Type==3)},function(C,B,D){var A=null;if(typeof(C.Caption)!="undefined"&&C.Caption!=null){A=C.Caption.replace(/&quot;/g,'"')}B.className+=" Video";LiveBlog.DisplayVideo(C.Content,C.Id+Math.round(10000*Math.random()),B,null,null,D,A,C.Id)});this.AddContentTransform(function(A){return(A.Type==6)},function(C,B,D){var A=null;if(typeof(C.Caption)!="undefined"&&C.Caption!=null){A=C.Caption.replace(/&quot;/g,'"')}B.className+=" Audio";LiveBlog.DisplayAudio(C.Content,C.Id+Math.round(10000*Math.random()),B,null,D,A,C.Id)});this.AddContentTransform(function(A){return(A.Type==9)},function(B,A,C){if(LiveBlog.GetInstance().IsLivePollAvailable){var D=new LivePoll(B.Entities.Id,B.Entities);D.Draw(A)}else{A.innerHTML="Poll: "+B.Entities.Question}});this.AddContentTransform(function(A){return typeof(A.Content)=="string"},function(H,B,F){if(H.Content.match(/<(object|embed)/)){var C=H.Content;C=C.replace(/&quot;/g,'"');var G=C.match(/<p class="Caption">(.*)<\/p>/);var I;if(G){I=G[1];C=C.replace(/<p class="Caption">(.*)<\/p>/,"")}var D=-1;var A=-1;switch(F){case 240:D=240;A=200;break;case 300:D=300;A=250;break;case 400:D=400;A=334;break;case 500:D=500;A=416;break;case 800:D=800;A=666;break;default:D=600;A=500;break}if(false&&LiveBlog.IsSecure()&&jQuerySL.browser.msie){B.FlashHtml=LiveBlog.ResizeObjectEmbed(C,D,A);B.innerHTML="<!--<embed>-->To view this Flash content in Microsoft Internet Explorer, please <a href='#' onclick='this.parentNode.innerHTML=this.parentNode.FlashHtml; return false;'>click here</a>"}else{B.innerHTML=LiveBlog.ResizeObjectEmbed(C,D,A);if(I!=null){var E=document.createElement("p");E.className="Caption";E.innerHTML=I;B.appendChild(E);LiveBlog.GetInstance().TranslateContent(E.innerHTML,E)}}}else{B.innerHTML=LiveBlog.GetInstance().TranslateContent(H.Content.replace(/&quot;/g,'"'),B)}})};LiveBlog.prototype.ConstructContentElement=function(B,C){var A=document.createElement("div");A.className="Content";if(C==null){C=this.Width}if(!this.OnConstructContentElement(A,B)){return A}var F;try{F=B.Type}catch(E){F=1}if((F==1&&B.Content.match(/<object/i)!=null&&B.Content.match(/VideoEmbedHolder/)==null)||F==8){A.className+=" Embed"}B.Content=LiveBlog.GetUrlWithCorrectSecurity(B.Content);for(var D=0;D<this.ContentTransformMatrix.length;D++){if(this.ContentTransformMatrix[D].Condition==null||this.ContentTransformMatrix[D].Condition(B)){this.ContentTransformMatrix[D].Transform(B,A,C);break}}return A};LiveBlog.DisplayAudio=function(A,H,F,G,E,D,C,B){return LiveBlog.DisplayVideo(A,H,F,G,0,E,D,C,true,B)};LiveBlog.DisplayVideo=function(A,N,H,M,I,G,F,E,J,B){if(M==null){M=518}if(I==null){I=288}if(J==null||J==undefined){J=false}if(B==null||B==undefined){B=false}if(this.CheckIfjQueryAvailable()){jQuerySL(H).parents(".Posts li").addClass((J?"Audio":"Video"))}I+=20;var D=LiveBlog.GetInstance();if(G==null){if(D!=null){if(H==D.GetGroupPostsList(0)){G=D.Width}else{G=280}}}if(M>G){if(I<=20){M=G}else{var C=LiveBlog.ResizeProportionally(M,I,G,G);M=C.Width;I=C.Height}}var K=null;K=document.createElement("span");K.style.width=M+"px";K.style.height=I+"px";K.id="Video"+N;K.className="VideoEmbedHolder";H.appendChild(K);if(F!=null&&F!=""){var L=document.createElement("p");L.className="Caption";L.innerHTML=F;H.appendChild(L);D.TranslateContent(F,L)}CompleteHolder=function(){if(document.getElementById("Video"+N)!=null){var O="http://embed.scribblelive.com/MediaData.aspx";var Q=O+"?action=GetMediaFile&PostId="+E;var P=O+"?action=GetThumbnail&PostId="+E;if(LiveBlog.CheckIfDeconceptAvailable()&&deconcept.SWFObjectUtil.getPlayerVersion()!=null&&deconcept.SWFObjectUtil.getPlayerVersion().major>0){var S="";if(typeof(ThreadId)!="undefined"){S=ThreadId}K.innerHTML='<embed height="'+I+'" width="'+M+'" flashvars="file='+A+'&fullscreen=true" wmode="opaque" allowscriptaccess="always" allowfullscreen="true" quality="high" bgcolor="#ffffff" name="Player'+N+'" id="Player'+N+'" style="'+(J?"height: 20px;":"")+'" src="http://embed.scribblelive.com/js/jwflvplayer/player-licensed.swf?ThreadId='+S+'" type="application/x-shockwave-flash"/>'}else{if(LiveBlog.CheckIfMdzrAvailable()&&Mdzr.video&&Mdzr.video.h264&&J===false){K.innerHTML='<video src="'+Q+'" controls="controls" width="'+M+'" height="'+I+'" poster="'+P+'"></video>'}else{if(LiveBlog.CheckIfMdzrAvailable()&&Mdzr.audio&&Mdzr.audio.mp3&&J===true){K.innerHTML='<audio src="'+Q+'" controls="controls" width="'+M+'" height="'+I+'"></audio>'}else{var R="";if(J===true){R="Click to listen to the audio"}else{if(J===false){R="Click to watch the video"}}K.innerHTML='<a href="'+Q+'">'+R+"</a>"}}}}};if(B){CompleteHolder()}else{setTimeout(CompleteHolder,300)}};LiveBlog.prototype.AttachNewPost=function(H,C,E,B){var F=document.createElement("li");var I;try{I=H.Type}catch(A){I=1}if(E==null){E=this.Width;if(document.getElementById("VideoHolderList")!=null&&H.Rank==0&&(H.Type=="3"||H.Content.match(/<(object|embed)/i))){E=jQuerySL(document.getElementById("VideoHolderList")).width()}}F.LastModified=H.Date;var D=H.Source;if(D!=null&&D!=""){D=" <span class='Source'>via "+LiveBlog.GetInstance().GetTranslation(D)+"</span>"}else{D=""}F.id="LiveBlog_Post"+H.Id;F.className="";if(this.FadeColor_End!=null){F.style.backgroundColor=this.FadeColor_Start}F.appendChild(this.ConstructContentElement(H,E));if(typeof(HideAvatars)=="undefined"||HideAvatars.length==0){LiveBlog.AddThumbnailStyleToItem(F,H.CreatorThumbnail)}else{if(HideAvatars[1]==0&&(H.Source.indexOf("twitter")==-1&&H.Source.indexOf("facebook")==-1)){LiveBlog.AddThumbnailStyleToItem(F,H.CreatorThumbnail)}else{if(HideAvatars[6]==0&&(H.Source.indexOf("twitter")!=-1||H.Source.indexOf("facebook")!=-1)){LiveBlog.AddThumbnailStyleToItem(F,H.CreatorThumbnail)}}}if(I==2){F.appendChild(this.ConstructMetaElement(H))}else{var G=this.ConstructMetaElement(H);F.appendChild(G)}if(I==4){F.className+=" System "}if(H.CreatorId==LiveBlog.GetInstance().UserId){F.className+=" You "}this.ConnectNewPost(F,null,null,null,H.Rank,H.Group,B,H);if(C!=null){setTimeout(function(){LiveBlog.GetInstance().DisconnectPost(F)},C*1000)}};LiveBlog.TranslateCounter=0;LiveBlog.prototype.TranslateContent=function(B,D){if(this.DisplayLanguage==null||this.DisplayLanguage==undefined||this.AllowedToEdit||B.match("(<embed|<object|<img)")||this.DisplayLanguage==this.CurrentDisplayLanguage||B.match(/<dl class="Poll(\d)* Poll">/i)){return B}var A="AIzaSyBri61P0SIFI1KK-IpA4F_VMYWj83hq-Uk";var E=D;var C=B;LiveBlog["Translate_"+LiveBlog.TranslateCounter]=function(G){if(G.data){E.innerHTML=G.data.translations[0].translatedText}else{E.innerHTML=C}};var F=document.createElement("script");F.type="text/javascript";F.src="https://www.googleapis.com/language/translate/v2?key="+A+"&target="+this.DisplayLanguage+"&callback=LiveBlog.Translate_"+LiveBlog.TranslateCounter+"&q="+escape(B);document.getElementsByTagName("head")[0].appendChild(F);LiveBlog.TranslateCounter++};LiveBlog.PageHeight=function(){var A,B;if(window.innerHeight&&window.scrollMaxY){A=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight){A=document.body.scrollHeight}else{A=document.body.offsetHeight}}if(window.innerHeight){B=window.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){B=document.documentElement.clientHeight}else{if(document.body){B=document.body.clientHeight}}}return((A>B)?A+20-B:false)};LiveBlog.YPosition=function(){if(document.body&&document.body.scrollTop){return document.body.scrollTop}if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop}if(window.pageYOffset){return window.pageYOffset}return 0};LiveBlog.findPosX=function(B){if(LiveBlog.CheckIfjQueryAvailable()){return jQuerySL(B).offset().left}var A=0;if(B.offsetParent){while(1){A+=B.offsetLeft;if(!B.offsetParent){break}B=B.offsetParent}}else{if(B.x){A+=B.x}}return A};LiveBlog.findPosY=function(B){if(LiveBlog.CheckIfjQueryAvailable()){return jQuerySL(B).offset().top}var A=0;if(B.offsetParent){while(1){A+=B.offsetTop;if(!B.offsetParent){break}B=B.offsetParent}}else{if(B.y){A+=B.y}}return A};LiveBlog.NewContentImageLoaded=function(A){if((LiveBlog.YPosition()+50+A.clientHeight)>=LiveBlog.PageHeight()){if(LiveBlog.GetInstance().NewestAtBottom){LiveBlog.ScrollToBottom()}}};LiveBlog.ScrollToBottom=function(){try{clearInterval(LiveBlog.ScrollInterval)}catch(A){}LiveBlog.LastPosition=LiveBlog.YPosition();LiveBlog.ScrollInterval=setInterval("LiveBlog.Scroll_Handler(LiveBlog.YPosition()+15)",50)};LiveBlog.Scroll_Handler=function(A){PositionDiffFromLastScroll=A-LiveBlog.LastPosition;if(LiveBlog.YPosition()+10>=LiveBlog.PageHeight()||PositionDiffFromLastScroll<15){clearInterval(LiveBlog.ScrollInterval)}else{window.scrollTo(0,A);LiveBlog.LastPosition=A}};LiveBlog.ConvertServerTimeToLocalTime=function(A){var B=new Date(A);return new Date(B.getTime()-(new Date()).getTimezoneOffset()*60000)};LiveBlog.IsTodaysDate=function(A){var C=new Date();C.setHours(0);C.setMinutes(0);C.setSeconds(0);var B=C.getTime()+1000*60*60*24;B=new Date(B);if(A>C&&(A<B)){return true}else{return false}};LiveBlog.ConvertServerTimeToLocalTimeFriendlyString=function(B){var A=LiveBlog.ConvertServerTimeToLocalTime(B);var K=(LiveBlog.UserLanguage().match(/^en/i)!=null);var I=new Date();I.setHours(0);I.setMinutes(0);I.setSeconds(0);var E=A.getMinutes();E=(E<10?"0"+E:E);var F=(A.getHours()%12);F=(F==0?"12":F);var C=I.getTime()-1000*60*60*24;C=(new Date()).setTime(C);var D=I.getTime()+1000*60*60*24;D=new Date(D);if(A>I&&(A<D)){if(LiveBlog.CheckIfDateJSAvailable()){return A.toString(Date.CultureInfo.formatPatterns.shortTime.replace(/\bhh\b/,"h").replace(/\bHH\b/,"H"))}else{if(K){return F+":"+E+" "+(A.getHours()<12?"AM":"PM")}else{return A.getHours()+":"+E}}}else{if(A>C&&(A<D)&&K){return F+":"+E+" "+(A.getHours()<12?"AM":"PM")+" yesterday"}else{if(LiveBlog.CheckIfDateJSAvailable()){if(K){var G="";var J="";if(A.getYear()==new Date(new Date().getTime()).getYear()){G="MMMM d";TimeFormat="h:mm tt"}else{G="MMMM d, yyyy";TimeFormat="h:mm tt"}return A.toString(G)+" at "+A.toString(TimeFormat)}else{var H="";if(A.getYear()==new Date(new Date().getTime()).getYear()){H=Date.CultureInfo.formatPatterns.monthDay+" "+Date.CultureInfo.formatPatterns.shortTime}else{H=Date.CultureInfo.formatPatterns.longDate+" "+Date.CultureInfo.formatPatterns.shortTime}H=H.replace(/\bdd\b/,"d").replace(/(\bdddd\b)+,/,"").replace(/\bdddd\b/,"").replace(/\bhh\b/,"h").replace(/\bHH\b/,"H");return A.toString(H)}}else{if(!K){return(A.getMonth()+1)+"/"+(A.getDate())+"/"+A.getFullYear()+" "+A.getHours()+":"+E}else{return A.toLocaleString()}}}}};LiveBlog.ConvertServerTimeToLocalTimeOnlyFriendlyString=function(B){var E=LiveBlog.ConvertServerTimeToLocalTime(B);var D=(LiveBlog.UserLanguage().match(/^en/i)!=null);var C=E.getMinutes();C=(C<10?"0"+C:C);var A=(E.getHours()%12);A=(A==0?"12":A);if(D){return A+":"+C+" "+(E.getHours()<12?"AM":"PM")}return E.getHours()+":"+C};LiveBlog.ResizeProportionally=function(F,E,B,C,A){A=(A==null?false:true);F=parseInt(F);E=parseInt(E);var D=1;B=parseInt(B);C=parseInt(C);if(A||F>B){D=1*B/F}if(A||E>C){if(1*C/E<D){D=1*C/E}}B=Math.round(F*D);C=Math.round(E*D);return{Width:B,Height:C}};LiveBlog.ResizeObjectEmbed=function(I,G,D){var B=LiveBlog.ResizeObjectEmbedDimensions(I,G,D);I=I.replace(/width=([0-9]+)/g,"width="+B.Width);I=I.replace(/height=([0-9]+)/g,"height="+B.Height);I=I.replace(/\swidth=['"]?([0-9]+)['"]?/g," width='"+B.Width+"'");I=I.replace(/\sheight=['"]?([0-9]+)['"]?/g," height='"+B.Height+"'");var C="www.reuters.com,www.whitehouse.gov,www.msnbc.msn.com,download.macromedia.com,c.brightcove.com,www.sportsnet.ca,admin.brightcove.com,www.macromedia.com,img.widgets.video.s-msn.com,video.uk.msn.com,msn.com,theplatform.com,www.globalnews.ca,sports.cbsimg.net".toLowerCase();var J=I.match(/<param.?name=['"]?movie['"]?.?value=['"]?https?:\/\/([a-z0-9\.]+)['"]?|<param.?value=['"]?https?:\/\/([a-z0-9\.]+)['"]?.*?name=['"]?movie['"]?|<embed.*?src=['"]?https?:\/\/([a-z0-9\.]+)['"]?/ig);if(J){var E="";for(var A=0;A<J.length;A++){E+=J[A]}var J=E.match(/https?:\/\/([a-z0-9\.]+)/ig);var F=true;for(var A=0;A<J.length;A++){var H=J[A].replace(/https?:\/\/([a-z0-9\.]+)/i,"$1");if(C.indexOf(H)<0){F=false;break}}if(F){I=I.replace(/allowscriptaccess=(['"])([^'"]+)(['"])/i,"allowscriptaccess=$1always$3");I=I.replace(/(param\s+name=['"]allowscriptaccess['"]\s+value=)(['"])([^'"]+)(['"])/i,"$1$2always$4");I=I.replace(/(param\s+value=)(['"])([^'"]+)(['"])([^>]\s+name=['"]allowscriptaccess['"])/i,"$1$2always$4$5")}}return I};LiveBlog.ResizeObjectEmbedDimensions=function(I,J,F){var E=(new RegExp(/width=['"]?(\d+)['"]?/i)).exec(I);var G=(new RegExp(/height=['"]?(\d+)['"]?/i)).exec(I);if(!E){var H=new RegExp(/<(object|embed)[^>]+?style=['"][\s\S]*?width:\s?([0-9]+)(px)?[\s\S]*?[^'"]/i);var B=H.exec(I.replace(/&lt;/g,"<").replace(/&gt;/,">"));if(B){E=B[2]}}if(!G){var C=new RegExp(/<(object|embed)[^>]+?style=['"][\s\S]*?height:\s?([0-9]+)(px)?[\s\S]*?[^'"]/i);var D=C.exec(I.replace(/&lt;/g,"<").replace(/&gt;/,">"));if(D){G=D[2]}}if(E&&G){var A=LiveBlog.ResizeProportionally(E[1],G[1],J,F);J=A.Width;F=A.Height}return{Width:J,Height:F}};LiveBlog.prototype.FlashEdited=function(A){if(this.IsjQueryAvailable){jQuerySL(A).children("div.Content").fadeTo("fast",0.1).fadeTo("slow",1,function(){if(this.style.removeAttribute!=null){this.style.removeAttribute("filter")}})}};LiveBlog.prototype.FadeIn=function(B){if(this.FadeColor_End!=null){var A=this.FadeColor_End;if(this.FadeColor_End_Comment!=null&&B.className&&(B.className+"").match(/Comment/)&&(this.GetGroupPostsList(0)==B.parentNode)){A=this.FadeColor_End_Comment}if(this.IsjQueryAvailable){jQuerySL(B).animate({backgroundColor:A},{queue:false,duration:600})}else{B.style.backgroundColor=A}}};LiveBlog.prototype.RemoveTwitterQueryScript=function(){this.RemoveQueryScript("TwitterSearchQuery")};LiveBlog.prototype.RemoveSocialQueryScript=function(){this.RemoveQueryScript("SocialSearchQuery")};LiveBlog.prototype.RemoveQueryScript=function(B){var A=document.getElementById(B);if(A!=null){A.parentNode.removeChild(A)}};LiveBlog.prototype.SaveTwitterSearchQuery=function(B,A){if(this.IsjQueryAvailable&&jQuerySL.cookie!=null&&jQuerySL.cookie!=undefined){jQuerySL.cookie("TwitterSearchQuery_ThreadId"+B,A)}};LiveBlog.prototype.GetTwitterSearchQuery=function(A){if(this.IsjQueryAvailable&&jQuerySL.cookie!=null&&jQuerySL.cookie!=undefined){return jQuerySL.cookie("TwitterSearchQuery_ThreadId"+A)}else{return""}};LiveBlog.prototype.SaveSocialSearchQuery=function(B,A){if(this.IsjQueryAvailable&&jQuerySL.cookie!=null&&jQuerySL.cookie!=undefined){jQuerySL.cookie("SocialSearchQuery_ThreadId"+B,A)}};LiveBlog.prototype.GetSocialSearchQuery=function(A){if(this.IsjQueryAvailable&&jQuerySL.cookie!=null&&jQuerySL.cookie!=undefined){return jQuerySL.cookie("SocialSearchQuery_ThreadId"+A)}else{return""}};LiveBlog.prototype.SaveSocialSearchType=function(A,B){if(this.IsjQueryAvailable&&jQuerySL.cookie!=null&&jQuerySL.cookie!=undefined){jQuerySL.cookie("SocialSearchType_ThreadId"+A,B)}};LiveBlog.prototype.GetSocialSearchType=function(A){if(this.IsjQueryAvailable&&jQuerySL.cookie!=null&&jQuerySL.cookie!=undefined){return jQuerySL.cookie("SocialSearchType_ThreadId"+A)}else{return""}};LiveBlog.GetInstanceTwitterPing=function(A,B){return LiveBlog.GetInstance().TwitterPing(A,B)};LiveBlog.prototype.TwitterParseTweets=function(A,E,F){var D=A;var B="";for(var C=D.length-1;C>=0;C--){HtmlContent=D[C].text;HtmlContent=HtmlContent.replace(/(https?:\/\/([:\#\w\.,\?=&%\-\+]+)\/?[:\#\w\.,~\/\?=&%\-\+;@]*)/gi,"<a href='$1'>$2</a>");HtmlContent=HtmlContent.replace(/@(\w+)/g,"@<a href='http://twitter.com/$1'>$1</a>");CurrentTweet=new Object();CurrentTweet.Content=HtmlContent;CurrentTweet.CreatorName=D[C].from_user;CurrentTweet.Id="tweet"+D[C].id_str;CurrentTweet.Type=1;CurrentTweet.Date=new Date(D[C].created_at).getTime()+((new Date()).getTimezoneOffset()*60000);CurrentTweet.CreatorThumbnail=D[C].profile_image_url;CurrentTweet.TwitterUserId=D[C].from_user_id;CurrentTweet.LoginProvider="Twitter";if(D[C].geo!=null&&D[C].geo.coordinates!=null&&D[C].geo.coordinates.length>1){CurrentTweet.Coordinates=D[C].geo.coordinates}B=D[C].id_str;this.AttachNewTweet(CurrentTweet,document.getElementById(E),F)}if(B==""&&A!=null&&A.since_id){B=A.since_id_str}return B};LiveBlog.prototype.TwitterPing=function(A,C){this.RemoveTwitterQueryScript();var E=document.getElementById("TwitterSearch");if(E!=null){E.style.fontStyle="normal"}var F;if(A!=null){F=A.results}else{F=new Array()}if(C!=null){this.TwitterSearchQuery=C}var B="";jQuerySL("#TwitterInstructions").remove();B=this.TwitterParseTweets(F,"TwitterModerated",true);this.TwitterLastId=B;var D;if(A==null){D=1000}else{D=30000}this.IsTwitterPolling=true;if(this.TwitterSearchTimeout!=null){clearInterval(this.TwitterSearchTimeout)}this.TwitterSearchTimeout=setTimeout(function(){if(LiveBlog.GetInstance().TwitterSearchQuery!=null){LiveBlog.GetInstance().RemoveTwitterQueryScript();var H=document.createElement("script");H.src="http://search.twitter.com/search.json?q="+encodeURIComponent(LiveBlog.GetInstance().TwitterSearchQuery)+"&callback=LiveBlog.GetInstanceTwitterPing&rpp="+(LiveBlog.GetInstance().MaxTweetsDisplayed>10?10:4)+"&since_id="+LiveBlog.GetInstance().TwitterLastId+"&rand="+Math.round(10000000*Math.random());H.type="text/javascript";H.defer="defer";H.id="TwitterSearchQuery";document.getElementsByTagName("head")[0].appendChild(H);var G=document.getElementById("TwitterSearch");if(G!=null){G.style.fontStyle="italic"}}else{LiveBlog.GetInstance().TwitterPing()}if(LiveBlog.GetInstance().TwitterSearchQuery!=""&&LiveBlog.GetInstance().TwitterSearchQuery!=null&&LiveBlog.GetInstance().TwitterSearchQuery!=undefined){LiveBlog.GetInstance().SaveTwitterSearchQuery(this.ThreadId,LiveBlog.GetInstance().TwitterSearchQuery)}},D)};LiveBlog.prototype.FacebookParsePosts=function(C,D,G){var E=C;var H;var B="";for(var A=E.length-1;A>=0;A--){B="";if(E[A].message){B=E[A].message}if(E[A].name){if(B!=""){B+="<br />"}if(E[A].link){B+='<a href="'+E[A].link+'">'+E[A].name+"</a>"}else{B+=E[A].name}}H=new Object();H.Content=B;H.CreatorName=E[A].from.name;H.Id="post"+E[A].id;H.Type=1;var F=Date.parse(E[A].created_time.replace("+0000",""));H.Date=F;H.FacebookUserId=E[A].from.id;H.CreatorThumbnail="http://graph.facebook.com/"+E[A].from.id+"/picture";H.LoginProvider="Facebook";this.AttachNewFacebookPost(H,document.getElementById(D),G)}};LiveBlog.CheckIfDateJSAvailable=function(){if(Date.CultureInfo==null||Date.CultureInfo==undefined){return false}else{return true}};LiveBlog.ReloadPage=function(){window.location.hash="#";window.location.reload();return false};var Fat={make_hex:function(A,C,B){A=A.toString(16);if(A.length==1){A="0"+A}C=C.toString(16);if(C.length==1){C="0"+C}B=B.toString(16);if(B.length==1){B="0"+B}return"#"+A+C+B},fade_all:function(){var C=document.getElementsByTagName("*");for(var D=0;D<C.length;D++){var B=C[D];var A=/fade-?(\w{3,6})?/.exec(B.className);if(A){if(!A[1]){A[1]=""}if(B.id){Fat.fade_element(B.id,null,null,"#"+A[1])}}}},fade_element:function(L,N,C,S,K){if(!N){N=30}if(!C){C=3000}if(!S||S=="#"){S="#FFFF33"}if(!K){K=this.get_bgcolor(L)}var E=Math.round(N*(C/1000));var B=C/E;var A=B;var F=0;if(S.length<7){S+=S.substr(1,3)}if(K.length<7){K+=K.substr(1,3)}var P=parseInt(S.substr(1,2),16);var O=parseInt(S.substr(3,2),16);var J=parseInt(S.substr(5,2),16);var H=parseInt(K.substr(1,2),16);var Q=parseInt(K.substr(3,2),16);var R=parseInt(K.substr(5,2),16);var D,M,I,G;while(F<E){D=Math.floor(P*((E-F)/E)+H*(F/E));M=Math.floor(O*((E-F)/E)+Q*(F/E));I=Math.floor(J*((E-F)/E)+R*(F/E));G=this.make_hex(D,M,I);setTimeout("Fat.set_bgcolor('"+L+"','"+G+"')",A);F++;A=B*F}setTimeout("Fat.set_bgcolor('"+L+"','"+K+"')",A)},set_bgcolor:function(C,B){var A=document.getElementById(C);A.style.backgroundColor=B},get_bgcolor:function(D){var A=document.getElementById(D);while(A){var B;if(window.getComputedStyle){B=window.getComputedStyle(A,null).getPropertyValue("background-color")}if(A.currentStyle){B=A.currentStyle.backgroundColor}if((B!=""&&B!="transparent")||A.tagName=="BODY"){break}A=A.parentNode}if(B==undefined||B==""||B=="transparent"){B="#FFFFFF"}var C=B.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/);if(C){B=this.make_hex(parseInt(C[1]),parseInt(C[2]),parseInt(C[3]))}return B}};LiveBlog.PageLoadTime=null;LiveBlog.StartAdReload=function(){if(!LiveBlog.CheckIfjQueryAvailable()){return}if(jQuerySL("iframe.SL_Ad").length<=0){return}if(LiveBlog.PageLoadTime!=null){return}LiveBlog.PageLoadTime=new Date();setInterval(function(){LiveBlog.AdReload()},5000)};LiveBlog.AdReload=function(B){var G=90000;if(B==null){var H=jQuerySL("iframe.SL_Ad");var C=null;var F=new Date();var D=0;var I=G;for(var A=0;A<H.length;A++){B=H.get(A);if(B.className.match(/ReloadRate/)){try{I=parseInt(B.className.match(/ReloadRate([0-9]+)/)[1])}catch(E){I=G}}else{I=G}if(B.LastReload==null){B.LastReload=LiveBlog.PageLoadTime}D=(F-B.LastReload);if(D>I){break}else{B=null}}}if(B!=null){try{B.src=B.src;B.LastReload=new Date()}catch(E){}}};LiveBlog.LoadPageReload=function(){var A=(document.location+"").match(/reload=([0-9]+)/i)[1];document.getElementById("Discussion").style.height=A+"px"};LiveBlog.PageReload=function(){var A=document.getElementById("PageReloadFrame");if(A==null){var D="reload="+jQuerySL(document).height();if((document.location+"").match(/\?/)){D=document.location+"&"+D}else{D=document.location+"?"+D}A=document.createElement("iframe");A.frameBorder=0;A.id="PageReloadFrame";A.src=D;A.scrolling="no";A.style.height=(jQuerySL(document).height()-500)+"px";document.getElementById("Discussion").style.position="relative";document.getElementById("Discussion").style.zIndex=9999;document.getElementsByTagName("body")[0].appendChild(A);var C=document.getElementsByTagName("object");for(var B=0;B<C.length;B++){C[B].parentNode.removeChild(C[B])}C=document.getElementsByTagName("embed");for(var B=0;B<C.length;B++){C[B].parentNode.removeChild(C[B])}}else{A.contentWindow.location.reload(true)}};LiveBlog.Refresh=function(A){jQuerySL(".EventCountdown").countdown.stop();jQuerySL(".EventCountdown h3").html("This event is now going live! Click here to reload");jQuerySL(".EventCountdown").effect("pulsate",{times:4},1800);jQuerySL(".EventCountdown").css("cursor","pointer");jQuerySL(".EventCountdown").click(LiveBlog.ReloadPage);return false};LiveBlog.prototype.Filter=function(A,B){if(A==null||A==""){jQuerySL("#Posts").load(document.location+" #Posts>*",B);LiveBlog.prototype.OnConnectNewPost=function(){return true}}else{jQuerySL("#Posts").load(document.location+"&Filter="+encodeURIComponent(A)+" #Posts>*",B);LiveBlog.prototype.OnConnectNewPost=function(C){return(C.getElementsByTagName("div")[0].innerHTML.toLowerCase().indexOf(A.toLowerCase())>=0)}}};LiveBlog.prototype.GetTranslation=function(A){if(A==null||A==undefined||A==""){return A}var B=A.toLowerCase();switch(B){case"mobile":B="mobile";break;default:B=A;break}return B};LiveBlog.prototype.Linkize=function(A){var F='Please enter a URL:<br /> <input type="text" id="URLInput" name="URLInput" value="" />';F+="<br /><br />";F+='Title<br /><input type="text" id="URLTitle" name="URLTitle" value="" />';var C=this;A=A.get(0);if(A==null){A=document.getElementsByTagName("textarea")[0]}var G=null;var H=0;var E=0;if(A.setSelectionRange){G=A.value.substring(A.selectionStart,A.selectionEnd);H=A.selectionStart;E=A.selectionEnd}else{if(document.selection&&document.selection.createRange){A.focus();var B=document.selection.createRange();G=B.text;var D=B.duplicate();D.moveToElementText(A);D.setEndPoint("EndToEnd",B);H=D.text.length-B.text.length;E=H+B.text.length}}if(H==0&&E==0){H=A.value.length;E=H}jQuerySL.prompt(F,{selection:{Start:H,End:E},data:{UserSelectionText:G,Element:A},buttons:{Ok:true,Cancel:false},loaded:function(){jQuerySL("#URLInput").get(0).focus();jQuerySL("#URLInput").val("http://");jQuerySL("#URLTitle").val(G);jQuerySL("#URLInput, #URLTitle").keyup(function(I){if(I.keyCode==27){jQuerySL.prompt.close()}else{if(I.keyCode==13){jQuerySL("#jqi_state0_buttonOk").focus().trigger("click");return true}}})},callback:function(Q,K,P){if(Q==undefined||Q==false){return false}var O=this.data;var I=this.selection;var L=jQuerySL.trim(P.URLInput);if(L!="http://"&&L!=""){var N='<a href="'+L+'">';var J="</a>";var M=(jQuerySL.trim(P.URLTitle)!=""?P.URLTitle:(jQuerySL.trim(O.UserSelectionText)!=""?O.UserSelectionText:L));O.Element.value=O.Element.value.substring(0,I.Start)+N+M+J+O.Element.value.substring(I.End,O.Element.value.length)}}});return false};LiveBlog.IsEmbed=function(){var A=document.getElementById("Discussion");return(A!=null&&A.className&&A.className.match(/Embed/))};LiveBlog.ShortenText=function(A,B,F){if(LiveBlog.CheckIfjQueryAvailable()){if(A.length<=B){return A}var D=F;A=jQuerySL.trim(A);var C;var E=0;while(A.length>B-D.length){if(E==1000){break}A=A.substring(0,A.length-D.length);E++}A+=D}return A};
