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(C,I,E,B,G,H,D,F){if((document.location+"").match(/(stage\.|localhost).*[\?&]reload=/i)){LiveBlog.LoadPageReload()}if(I==null){I=true}if(E==null){E=(new Date()).toUTCString()}if(F==null){this.Width=600}else{this.Width=F}this.UserId=B;this.NewestAtBottom=I;this.Time=new Date(E);if((C+"").match(/^[0-9]+$/)){this.ThreadId=C;this.ThreadKey=""}else{this.ThreadId="";this.ThreadKey=C}if(D==null){this.PostsList=document.getElementById("Posts")}else{this.PostsList=D}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.IsPostUIAvailable=false;try{this.IsPostUIAvailable=(PostUI!=null)}catch(A){}this.IsSoundManagerAvailable=false;try{this.IsSoundManagerAvailable=(soundManager!=null&&soundManager.createSound!=null)}catch(A){}this.IsCrossDomain=false;if(!(document.location+"").match(/(https?:\/\/[a-z0-9\-]*\.?scribblelive\.com\/|https?:\/\/localhost|https?:\/\/liveblogs.thescore.com|https?:\/\/live.reuters.com|http:\/\/live.reuters.com)/i)){this.IsCrossDomain=true}this.AllowedToEdit=(G==true);this.FadeColor_Start="#0099cc";this.FadeColor_End="#ffffff";this.FadeColor_End_Comment=null;this.NumPolls=0;this.IsEmergency=false;this.CurrentVisitors=0;this.DisplayLanguage=H;this.CurrentRequestId=null;this.HasShownReloadPrompt=false;if(this.DisplayLanguage){this.TranslateAllPosts()}LiveBlog.StoreInstance(this);this.LastModeratedCommentsPulsate=null;this.PollForModeratedComments();this.PollForMetrics();this.NewPostSound=null;this.MaxCommentsDisplayed=10;this.MaxTweetsDisplayed=10;this.MaxListItems=200;this.UseCDN=true;this.IsModerated=true;LiveBlog.StartAdReload();this.IsCometAvailable=false}LiveBlog.CheckIfjQueryAvailable=function(){if(LiveBlog.IsjQueryAvailable!=null){return LiveBlog.IsjQueryAvailable}else{LiveBlog.IsjQueryAvailable=false;try{LiveBlog.IsjQueryAvailable=(jQuery!=null&&jQuery.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(B){if(!B){if(!this.DisplayLanguage){return}else{B=this.DisplayLanguage}}else{this.DisplayLanguage=B}if(!this.IsCrossDomain){var F=document.getElementsByTagName("h2");for(var D=0;D<F.length;D++){this.TranslateContent(F[D].innerHTML,F[D])}var E=document.getElementsByTagName("h3");for(var D=0;D<E.length;D++){this.TranslateContent(E[D].innerHTML,E[D])}var A=this.PostsList.getElementsByTagName("div");for(var D=0;D<A.length;D++){var C=A[D];if(C.className.match("Content")&&!C.innerHTML.match(/<(img|embed|object)/i)){this.TranslateContent(C.innerHTML,C)}}}else{var A=this.PostsList.getElementsByTagName("li");for(var D=0;D<A.length;D++){var C=A[D];if(!C.innerHTML.match(/<(embed|object|img)/i)){this.TranslateContent(C.innerHTML,C)}}}};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(){if((document.location+"").match(/http:\/\/(www\.scribblelive\.com\/|localhost)/i)){return"English (United States)"}else{if(navigator.userLanguage!=null){return navigator.userLanguage}else{if(navigator.language!=null){return navigator.language}else{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.PollForNew_Handler=function(A){var K=A;var B=K.Time;var I=new Date(K.Time);var E=K.Posts;var J=0;if(E!=null){var C=false;if(!this.IsCrossDomain&&E.length>0&&this.NewestAtBottom){C=((LiveBlog.YPosition()+50)>=LiveBlog.PageHeight())}try{if(!this.UserId){this.UserId=-1}}catch(G){this.UserId=-1}var D;var H;for(var F=0;F<E.length;F++){H=new Date(E[F].Date);if(H<=this.Time){}else{if(this.GetGroupPostsList(E[F].Group)==null){}else{if(this.NewestAtBottom&&!this.IsCrossDomain&&!E[F].IsDeleted&&(E[F].EditorId==null||E[F].EditorId=="")&&document.getElementById("LiveBlog_Post"+E[F].Id)==null&&E[F].Type=="1"){if(!this.HasShownReloadPrompt){E[F].Rank=0;E[F].Content="<em>This event is now going live! <a href='#' onclick='return LiveBlog.ReloadPage()'>Click here to reload</a> to see all the new posts</em>";this.AttachNewPost(E[F]);C=false;LiveBlog.ScrollToBottom();this.HasShownReloadPrompt=true}}else{if(E[F].Type=="4"&&(this.AllowedToEdit||E[F].CreatorId==this.Userid||E[F].EditorId==this.UserId)){if(this.EditorId==this.UserId&&E[F].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(E[F],5)}}else{if(E[F].IsDeleted&&document.getElementById("LiveBlog_Post"+E[F].Id)!=null){this.DisconnectPost(document.getElementById("LiveBlog_Post"+E[F].Id),J);J++}else{if(document.getElementById("LiveBlog_Post"+E[F].Id)!=null&&document.getElementById("LiveBlog_Post"+E[F].Id).parentNode==document.getElementById("VideoHolderList")){if(E[F].Rank>0){D=document.getElementById("LiveBlog_Post"+E[F].Id);D.id+="DELETING";this.DisconnectPost(D,J);if(this.IsCrossDomain){this.AttachNewCrossposting(E[F])}else{if(!E[F].IsComment){this.AttachNewPost(E[F],null,null,J)}else{this.AttachNewComment(E[F],null,null,J)}}J++}}else{if((!E[F].IsDeleted&&document.getElementById("LiveBlog_Post"+E[F].Id)==null)||(document.getElementById("LiveBlog_Post"+E[F].Id)!=null&&document.getElementById("LiveBlog_Post"+E[F].Id).parentNode!=this.GetGroupPostsList(E[F].Group)&&document.getElementById("LiveBlog_Post"+E[F].Id).parentNode!=document.getElementById("VideoHolderList"))){if(document.getElementById("LiveBlog_Post"+E[F].Id)!=null){D=document.getElementById("LiveBlog_Post"+E[F].Id);D.id+="DELETING";this.DisconnectPost(D,J)}if(this.IsCrossDomain){this.AttachNewCrossposting(E[F])}else{if(!E[F].IsComment){this.AttachNewPost(E[F],null,null,J);if(E[F].Source==""){this.UpdateWhosBlogging(E[F].CreatorName,LiveBlog.GetUrlWithCorrectSecurity(E[F].CreatorThumbnail))}}else{this.AttachNewComment(E[F],null,null,J)}}J++}else{if(document.getElementById("LiveBlog_Post"+E[F].Id)!=null&&((E[F].EditorId!=null&&E[F].EditorId!=""&&E[F].EditorId!=this.UserId)||(E[F].EditorId==""&&E[F].CreatorId!=this.UserId))&&!this.IsCrossDomain){D=document.getElementById("LiveBlog_Post"+E[F].Id);if(D.firstChild.className.match("IsEditing")==null&&D.LastModified!=E[F].Date){if(!E[F].Content.match(/(<img|<embed|<object)/i)&&E[F].Type=="1"){D.firstChild.innerHTML=this.TranslateContent(E[F].Content.replace(/&quot;/g,'"'),document.getElementById("LiveBlog_Post"+E[F].Id).firstChild)}D.getElementsByTagName("div")[1].innerHTML="by <em>"+(E[F].CreatorId==this.UserId?"you":E[F].CreatorName)+"</em>"+(E[F].Source!=null?" <span class='Source'>via "+E[F].Source+"</span> ":"")+"</em> edited by <em>"+(E[F].EditorId==this.UserId?"you":(E[F].EditorName!=""?E[F].EditorName:E[F].CreatorName))+"</em> at "+LiveBlog.ConvertServerTimeToLocalTimeFriendlyString(E[F].Date);this.SetPostRank(D,E[F].Rank,E[F].Group);this.OnEditPost(D,D.parentNode,E[F].Id,E[F].Rank,E[F].Group);this.FlashEdited(D);J++}}else{if(document.getElementById("LiveBlog_Post"+E[F].Id)!=null&&((E[F].EditorId!=null&&E[F].EditorId!=""&&E[F].EditorId!=this.UserId)||(E[F].EditorId==""&&E[F].CreatorId!=this.UserId))&&this.IsCrossDomain&&!E[F].Content.match(/(<img|<object|<embed)/i)&&E[F].Type=="1"){D=document.getElementById("LiveBlog_Post"+E[F].Id);D.innerHTML=D.innerHTML.replace(/^(.*?<\/em>).*$/i,"$1 "+E[F].Content);this.SetPostRank(D,E[F].Rank,E[F].Group);this.OnEditPost(D,D.parentNode,E[F].Id,E[F].Rank,E[F].Group);this.FadeIn(document.getElementById("LiveBlog_Post"+E[F].Id));J++}else{if(document.getElementById("LiveBlog_Post"+E[F].Id)!=null){this.SetPostRank(document.getElementById("LiveBlog_Post"+E[F].Id),E[F].Rank,E[F].Group)}}}}}}}}}}}}if(E!=null){this.Time=I}};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.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){C.IsDeleted=true;jQuery(C).animate({opacity:"0",height:"0"},500);setTimeout(function(){if(C!=null){C.parentNode.removeChild(C)}},600)}else{C.parentNode.removeChild(C)}};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="/UK/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="/UK/LastModified.aspx?ThreadId="+this.ThreadId+"&rand="+Math.round(100000000*Math.random())}else{if((document.location+"").match(/embed-stage\.scribblelive\.com/i)){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(A,E){this.CurrentVisitors=A;var D=document.getElementById("MetricsScript");D.parentNode.removeChild(D);if(parseInt(this.CurrentVisitors)>100){this.IsEmergency=true}var C=document.getElementsByTagName("em");for(var B=0;B<C.length;B++){if(C[B].className=="CurrentVisitors"){if(this.NewestAtBottom){C[B].innerHTML=""}else{C[B].innerHTML=(this.CurrentVisitors=="1"?"":"("+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(){this.GetMetrics();var B=this;var A=setInterval(function(){B.GetMetrics()},50000+Math.round(10000*Math.random()))};LiveBlog.prototype.GetMetrics=function(){var A=(LiveBlog.IsSecure()?"https":"http")+"://whos.amung.us/api/query/scribblelive/track/id="+this.ThreadId+"&rand="+Math.round(100000000*Math.random());var B=document.createElement("script");B.src=A;B.type="text/javascript";B.id="MetricsScript";document.getElementsByTagName("head")[0].appendChild(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","/UK/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"){_LiveBlog.AttachNewModeratedComment(ModeratedComments[i])}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 jQuery.makeArray(jQuery(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.prototype.IsStuck=function(A){return(A.className+"").match(/Sticky/)};LiveBlog.prototype.SetPostRank=function(C,B,A){return this.ConnectNewPost(C,null,null,null,B,A)};LiveBlog.prototype.OnEditPost=function(){return true};LiveBlog.prototype.OnConnectNewPost=function(){return true};LiveBlog.prototype.ConnectNewPost=function(M,F,I,E,L,N,D){if(!this.OnConnectNewPost(M,F,I,E,L,N)){return}if(D==null){D=0}if(N==null){N=0}if(F==null){F=this.GetGroupPostsList(N);if(F==null){return}}var K=false;if(F==this.GetGroupPostsList(0)&&L==0&&this.IsEmbed(M)&&document.getElementById("VideoHolderList")!=null){F=document.getElementById("VideoHolderList");K=true}if(F==M.parentNode){if(L==0&&this.IsStuck(M)){return}else{if(L>0&&!this.IsStuck(M)){return}}}if(K){var J=M.getElementsByTagName("div")[0];J.innerHTML=LiveBlog.ResizeObjectEmbed(J.innerHTML,300,500);var C=J.getElementsByTagName("span");if(C.length>0){for(var A=0;A<C.length;A++){if((C[A].className+"").match(/VideoEmbedHolder/)){C[A].style.width="auto";C[A].style.height="auto"}}}}if((M.className+"").match(/Comment/)){this.UpdateStats(0,1)}else{this.UpdateStats(1,0)}var G=false;if(D<10&&this.IsjQueryAvailable&&(M.parentNode==null||typeof M.parentNode=="object")){G=true;M.style.display="none"}if(I==null){I=this.GetGroupNewestAtBottom(N)}if(E==null){E=this.MaxListItems}else{if(E>this.MaxListItems){E=this.MaxListItems}}if(L==null||!this.IsjQueryAvailable){L=1}if(L==0){M.className+=" Sticky"}else{M.className=(M.className+"").replace(/Sticky/g,"")}if(I||F.getElementsByTagName("li").length<=0){F.appendChild(M);if(F.getElementsByTagName("li").length==1){M.className+=" First"}}else{var O=this.GetStickyPosts(F,M);if(O.length<=0){for(var A=0;A<F.childNodes.length&&A<3;A++){if(F.childNodes[A].className){F.childNodes[A].className=F.childNodes[A].className.replace("First","")}}M.className+=" First";if(this.IsjQueryAvailable){jQuery(F).prepend(M)}else{F.insertBefore(M,F.firstChild)}}else{if(O[O.length-1].nextSibling==null){F.appendChild(M)}else{F.insertBefore(M,O[O.length-1].nextSibling)}}}if(this.IsjQueryAvailable&&G){ItemHeight=jQuery(M).height()+"px";jQuery(M).css({"display":"block","height":"0","verticalAlign":"top"});jQuery(M).animate({height:ItemHeight},500);this.FadeIn(M);setTimeout(function(){jQuery(M).css({"height":"auto"})},550)}else{if(this.FadeColor_End!=null){M.style.backgroundColor=this.FadeColor_End;M.style.display="block"}}try{if(this.NewPostSound!=null&&this.IsSoundManagerAvailable&&(this.LastSoundPlay==null||this.LastSoundPlay+""!=new Date()+"")){if(soundManager.getSoundById("ScribbleLiveSoundEmbed")==null){soundManager.createSound({id:"ScribbleLiveSoundEmbed",url:this.NewPostSound,autoLoad:true,autoPlay:true})}else{if(soundManager.getSoundById("ScribbleLiveSoundEmbed").url!=this.NewPostSound){soundManager.getSoundById("ScribbleLiveSoundEmbed").destruct();soundManager.createSound({id:"ScribbleLiveSoundEmbed",url:this.NewPostSound,autoLoad:true,autoPlay:true})}else{soundManager.getSoundById("ScribbleLiveSoundEmbed").play()}}this.LastSoundPlay=new Date()}}catch(B){}if(F.childNodes.length>E){var H;if(I){H=F.getElementsByTagName("li")[0]}else{if(this.IsjQueryAvailable){H=jQuery(F).children("li:last-child").get(0)}else{H=F.getElementsByTagName("div")[F.getElementsByTagName("div").length-1].parentNode}}if(!(H.getElementsByTagName("div")[0].className+"").match(/IsEditing/)){F.removeChild(H)}else{if(H.previousSibling!=null){F.removeChild(H.previousSibling)}}}if(this.IsPostUIAvailable){PostUI.GetInstance().Setup(M)}};LiveBlog.AddThumbnailStyleToItem=function(B,A){if(!A){A=""}if(A!=null&&A!=""){B.className+=" Thumbnail";B.style.backgroundImage="url("+LiveBlog.GetUrlWithCorrectSecurity(A)+")"}};LiveBlog.prototype.AttachNewTweet=function(B,E){var D=E;if(document.getElementById("LiveBlog_Post"+B.Id)!=null){return}var A=document.createElement("li");A.id="LiveBlog_Post"+B.Id;A.className="Comment";var F=document.createElement("div");F.className="Content";F.innerHTML=this.TranslateContent(B.Content.replace(/&quot;/g,'"'),F);var C=document.createElement("div");C.className="Meta";C.innerHTML="<em>"+B.CreatorName+"</em>";LiveBlog.AddThumbnailStyleToItem(A,B.CreatorThumbnail);if(this.AllowedToEdit&&!B.Content.match(/<object/)){F.onmousedown=Wiki.ClickRegion}A.Meta=B;A.appendChild(F);A.appendChild(C);this.ConnectNewPost(A,D,false,this.MaxTweetsDisplayed)};LiveBlog.prototype.AttachNewModeratedComment=function(H,D){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"+H.Id)!=null){return}var F=document.createElement("li");F.id="LiveBlog_Post"+H.Id;F.className="Comment";var B=this.ConstructContentElement(H,300);var G=document.createElement("div");G.className="Meta";G.innerHTML="<em>"+H.CreatorName+"</em>";var E=(this.AllowedToEdit&&H.Type=="1"&&!H.Content.match(/<(object|embed)/)&&!B.innerHTML.match(/<img/));LiveBlog.AddThumbnailStyleToItem(F,H.CreatorThumbnail);if(this.AllowedToEdit&&E&&!H.Content.match(/<object/)){B.onmousedown=Wiki.ClickRegion}F.appendChild(B);F.appendChild(G);var A=this.MaxCommentsDisplayed;if(this.GroupPostsLists.length>1){A=null}this.ConnectNewPost(F,C,false,A);if(this.IsjQueryAvailable&&document.getElementById("Moderated")!=null&&document.getElementById("Moderated").parentNode!=null&&document.getElementById("Moderated").parentNode.parentNode!=null&&document.getElementById("Moderated").parentNode.parentNode.parentNode!=null&&document.getElementById("Moderated").parentNode.parentNode.parentNode.getElementsByTagName("dt").length>0){if(this.LastModeratedCommentsPulsate==null||this.LastModeratedCommentsPulsate!=this.ModCommentsSince){if(jQuery("#Moderated>li").length<50){jQuery(document.getElementById("Moderated").parentNode.parentNode.parentNode.getElementsByTagName("dt")[0]).effect("pulsate",{times:1},1000)}this.LastModeratedCommentsPulsate=this.ModCommentsSince}}};LiveBlog.prototype.AttachNewComment=function(H,B,C){var E=document.createElement("li");E.id="LiveBlog_Post"+H.Id;E.className="Comment";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 "+F+"</span>"}else{F=""}var G=document.createElement("div");G.className="Meta";G.innerHTML="by <em>"+(this.UserId==H.CreatorId?"you":H.CreatorName)+"</em>"+(H.EditorId!=""?" edited by <em>"+(this.UserId==H.EditorId?"you":H.EditorName)+"</em>":"")+F+(H.Group==0?" at "+LiveBlog.ConvertServerTimeToLocalTimeFriendlyString(H.Date):"");var D=(this.AllowedToEdit&&H.Type=="1"&&!H.Content.match(/<(object|embed)/)&&!A.innerHTML.match(/<img/));LiveBlog.AddThumbnailStyleToItem(E,H.CreatorThumbnail);if(this.AllowedToEdit&&D){A.onmousedown=Wiki.ClickRegion}E.appendChild(A);E.appendChild(G);this.ConnectNewPost(E,null,null,null,H.Rank,H.Group,C)};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}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);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);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(LiveBlog.IsSecure()){return A.replace(/^http:\/\/((images|media|avatars|embed)\.scribblelive.com.*)/i,"https://s3.amazonaws.com/$1")}else{return A}};LiveBlog.prototype.ConstructContentElement=function(B,D){var A=document.createElement("div");A.className="Content";if(D==null){D=this.Width}var G;try{G=B.Type}catch(F){G=1}B.Content=LiveBlog.GetUrlWithCorrectSecurity(B.Content);if(G==2){var C=B.Content.replace(/&quot;/g,'"');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}A.innerHTML="<img src='"+C+"' onload='LiveBlog.NewContentImageLoaded(this)'/>"}else{if(G==3){LiveBlog.DisplayVideo(B.Content,B.Id+Math.round(10000*Math.random()),A,null,null,D)}else{if(G==6){LiveBlog.DisplayAudio(B.Content,B.Id+Math.round(10000*Math.random()),A,null,D)}else{if(B.Content.match(/<(object|embed)/)){var E=B.Content;E=E.replace(/&quot;/g,'"');switch(D){case 300:A.innerHTML=LiveBlog.ResizeObjectEmbed(E,300,250);break;case 400:A.innerHTML=LiveBlog.ResizeObjectEmbed(E,400,334);break;default:A.innerHTML=E;break}}else{A.innerHTML=this.TranslateContent(B.Content.replace(/&quot;/g,'"'),A)}}}}return A};LiveBlog.DisplayAudio=function(D,B,A,C,E){return LiveBlog.DisplayVideo(D,B,A,C,0,E)};LiveBlog.DisplayVideo=function(B,F,D,G,E,C){if(G==null){G=518}if(E==null){E=288}E+=20;if(C==null){var H=LiveBlog.GetInstance();if(H!=null){if(D==H.GetGroupPostsList(0)){C=H.Width}else{C=280}}}if(G>C){if(E<=20){G=C}else{var A=LiveBlog.ResizeProportionally(G,E,C,C);G=A.Width;E=A.Height}}var I=null;I=document.createElement("span");I.style.width=G+"px";I.style.height=E+"px";I.id="Video"+F;I.className="VideoEmbedHolder";D.appendChild(I);setTimeout(function(){if(document.getElementById("Video"+F)!=null){var K=document.getElementById("Video"+F);if(false&&LiveBlog.CheckIfSWFObjectAvailable()){var J=new SWFObject("http://embed.scribblelive.com/js/jwflvplayer/player-licensed.swf","Player"+F,G,E,"9","#ffffff");J.addParam("allowfullscreen","true");J.addParam("allowscriptaccess","always");J.addParam("wmode","opaque");J.addParam("flashvars","file="+B+"&fullscreen=true");J.write(K.id)}else{K.innerHTML='<embed height="'+E+'" width="'+G+'" flashvars="file='+B+'&fullscreen=true" wmode="opaque" allowscriptaccess="always" allowfullscreen="true" quality="high" bgcolor="#ffffff" name="Player'+F+'" id="Player'+F+'" style="" src="http://embed.scribblelive.com/js/jwflvplayer/player-licensed.swf" type="application/x-shockwave-flash"/>'}}},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=300}}F.LastModified=H.Date;var D=H.Source;if(D!=null&&D!=""){D=" <span class='Source'>via "+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));LiveBlog.AddThumbnailStyleToItem(F,H.CreatorThumbnail);if(I==2){F.innerHTML+="<div class='Meta'>by <em>"+(this.UserId==H.CreatorId?"you":H.CreatorName)+"</em>"+(H.EditorId!=""?" edited by <em>"+(this.UserId==H.EditorId?"you":H.EditorName)+"</em>":"")+D+" at "+LiveBlog.ConvertServerTimeToLocalTimeFriendlyString(H.Date)+"</div>"}else{var G=document.createElement("div");G.className="Meta";G.innerHTML+="by <em>"+H.CreatorName+"</em>"+D+" at "+LiveBlog.ConvertServerTimeToLocalTimeFriendlyString(H.Date)+"";F.appendChild(G);if(this.AllowedToEdit&&H.Type=="1"&&!H.Content.match(/<(object|embed)/)&&I!=4&&I!=3){F.firstChild.onmousedown=Wiki.ClickRegion}}this.ConnectNewPost(F,null,null,null,H.Rank,H.Group,B);if(C!=null){setTimeout(function(){LiveBlog.GetInstance().DisconnectPost(F)},C*1000)}};LiveBlog.prototype.TranslateContent=function(B,D){if(this.DisplayLanguage&&!this.AllowedToEdit&&!B.match("(<embed|<object|<img)")){var C="<em>"+B+"</em>";try{C="<em>"+B+"</em>";var A=D;google.language.translate(B,"",this.DisplayLanguage,function(F){if(!F.error){A.innerHTML=F.translation}else{A.innerHTML=A.innerHTML.replace(/^<em>/,"");A.innerHTML=A.innerHTML.replace(/<\/em>$/,"")}})}catch(E){C=B}return C}else{return B}};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 jQuery(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 jQuery(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.ConvertServerTimeToLocalTimeFriendlyString=function(B){var G=LiveBlog.ConvertServerTimeToLocalTime(B);var F=(LiveBlog.UserLanguage().match(/^en/i)!=null);var E=new Date();E.setHours(0);E.setMinutes(0);E.setSeconds(0);var C=G.getMinutes();C=(C<10?"0"+C:C);var A=(G.getHours()%12);A=(A==0?"12":A);var D=E.getTime()-1000*60*60*24;D=(new Date()).setTime(D);if(G>E){if(F){return A+":"+C+" "+(G.getHours()<12?"AM":"PM")}else{return G.getHours()+":"+C}}else{if(G>D&&F){return A+":"+C+" "+(G.getHours()<12?"AM":"PM")+" yesterday"}else{if(!F){return(G.getMonth()+1)+"/"+(G.getDate())+"/"+G.getFullYear()+" "+G.getHours()+":"+C}else{return G.toLocaleString()}}}};LiveBlog.ResizeProportionally=function(E,D,A,B){E=parseInt(E);D=parseInt(D);var C=1;A=parseInt(A);B=parseInt(B);if(E>A){C=1*A/E}if(D>B){if(1*B/D<C){C=1*B/D}}A=Math.round(E*C);B=Math.round(D*C);return{Width:A,Height:B}};LiveBlog.ResizeObjectEmbed=function(C,B,F){var D=(new RegExp(/width=['"]?(\d+)['"]?/i)).exec(C);var E=(new RegExp(/height=['"]?(\d+)['"]?/i)).exec(C);if(D&&E){var A=LiveBlog.ResizeProportionally(D[1],E[1],B,F);B=A.Width;F=A.Height}C=C.replace(/width=['"]?([0-9]+)['"]?/g,"width='"+B+"'");C=C.replace(/height=['"]?([0-9]+)['"]?/g,"height='"+F+"'");return C};LiveBlog.prototype.FlashEdited=function(A){if(this.IsjQueryAvailable){jQuery(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){jQuery(B).animate({backgroundColor:A},{queue:false,duration:600})}else{B.style.backgroundColor=A}}};LiveBlog.prototype.RemoveTwitterQueryScript=function(){var A=document.getElementById("TwitterSearchQuery");if(A!=null){A.parentNode.removeChild(A)}};LiveBlog.GetInstanceTwitterPing=function(A,B){return LiveBlog.GetInstance().TwitterPing(A,B)};LiveBlog.prototype.TwitterPing=function(D,G){this.RemoveTwitterQueryScript();var B=document.getElementById("TwitterSearch");if(B!=null){B.style.fontStyle="normal"}var A;if(D!=null){A=D.results}else{A=new Array()}if(G!=null){this.TwitterSearchQuery=G}var H;var F=-1;var C;for(var E=A.length-1;E>=0;E--){C=A[E].text;C=C.replace(/(http:\/\/[\w\.\/\?:\#,~=&%\-\+]+)/gi,"<a href='$1'>$1</a>");C=C.replace(/@(\w+)/g,"@<a href='http://twitter.com/$1'>$1</a>");H=new Object();H.Content=C;H.CreatorName=A[E].from_user;H.Id="tweet"+A[E].id;H.Type=1;H.Date=new Date((new Date(Date.parse(A[E].created_at))).getTime()+(new Date()).getTimezoneOffset()*60000);H.CreatorThumbnail=A[E].profile_image_url;H.TwitterUserId=A[E].from_user_id;F=A[E].id;this.AttachNewTweet(H,document.getElementById("TwitterModerated"))}if(F==-1&&D!=null&&D.since_id){F=D.since_id}this.TwitterLastId=F;var I;if(D==null){I=1000}else{I=30000}this.IsTwitterPolling=true;if(this.TwitterSearchTimeout!=null){clearInterval(this.TwitterSearchTimeout)}this.TwitterSearchTimeout=setTimeout(function(){if(LiveBlog.GetInstance().TwitterSearchQuery!=null){LiveBlog.GetInstance().RemoveTwitterQueryScript();var K=document.createElement("script");K.src="http://search.twitter.com/search.json?q="+escape(LiveBlog.GetInstance().TwitterSearchQuery)+"&callback=LiveBlog.GetInstanceTwitterPing&rpp="+(LiveBlog.GetInstance().MaxTweetsDisplayed>10?10:4)+"&since_id="+LiveBlog.GetInstance().TwitterLastId+"&rand="+Math.round(10000000*Math.random());K.type="text/javascript";K.defer="defer";K.id="TwitterSearchQuery";document.getElementsByTagName("head")[0].appendChild(K);var J=document.getElementById("TwitterSearch");if(J!=null){J.style.fontStyle="italic"}}else{LiveBlog.GetInstance().TwitterPing()}},I)};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(jQuery("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=jQuery("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="+jQuery(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=(jQuery(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)}};