var defaultFuseAction="vids.ajaxAction";var defaultMethod="get";var url="/index.cfm";var pageTypeId="";var commentsAction="";var addCommentsAction="";var lastCommentAuthorId="";var deleteCommentAction="";var progressBarPath="http://x.myspace.com/images/myspacetv/progressbar.gif";function LoginAlert(A) {if(confirm(A)){new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"ENFORCELOGIN"},onSuccess:function(C) {var B=C.responseText.evalJSON();if(B.ServerResponse.IsRequestSuccessful){ _proxy_jslib_assign('',  _proxy_jslib_handle(null, 'location', location, 0, 0), 'href', '=', (B.ServerResponse.DisplayText))}else{alert(B.ServerResponse.DisplayText)}}})}}function GetMoreVideos(A) {switch(A){case"related":$("morevideos_related").className="more_from_user";$("morevideos_user").className="";$("morevids_related").style.display="block";$("morevids_user").style.display="none";break;case"user":default:$("morevideos_user").className="more_from_user";$("morevideos_related").className="";$("morevids_user").style.display="block";$("morevids_related").style.display="none";break}}function ChannelSubscription(C,B,A,D) {new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:A,id:C,h:D},onSuccess:function(G) {var E=G.responseText.evalJSON();if(!E.ServerResponse.IsRequestSuccessful){alert(E.ServerResponse.DisplayText)}else{if(B===""){ _proxy_jslib_assign('',  _proxy_jslib_handle(null, 'location', location, 0, 0), 'href', '=', (url+"?fuseaction=vids.mySubscriptions"))}else{var F=$(B);F.update('<span class="successfulRequest">'+E.ServerResponse.DisplayText+"</span>")}}}})}function DeleteVideo(A) {if(confirm(Resources.playlist_areyousure)){new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"DELETEVIDEO",videoid:A},onSuccess:function(C) {var B=C.responseText.evalJSON();if(B.ServerResponse.IsRequestSuccessful){ _proxy_jslib_assign('',  _proxy_jslib_handle(null, 'location', location, 0, 0), 'href', '=', (url+"?fuseaction=vids.myVideos"))}else{alert(B.ServerResponse.DisplayText)}}})}}function RemoveFavoriteVideo(A) {if(confirm(Resources.playlist_areyousure)){new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"DELETEFAVOURITEVIDEO",videoid:A},onSuccess:function(C) {var B=C.responseText.evalJSON();if(B.ServerResponse.IsRequestSuccessful){ _proxy_jslib_assign('',  _proxy_jslib_handle(null, 'location', location, 0, 0), 'href', '=', (url+"?fuseaction=vids.myFavorites"))}else{alert(B.ServerResponse.DisplayText)}}})}}function SetVideoPublic(A) {new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"SETVIDEOPUBLIC",videoid:A},onSuccess:function(E) {var C=E.responseText.evalJSON();var B=$("videostatus_"+A);var D=$("makeprivate_"+A);if(C.ServerResponse.IsRequestSuccessful){B.update(Resources.subscription_public);D.update('<a href="javascript:SetVideoPrivate('+A+');">'+Resources.videoitem_makeprivate+"</a>")}alert(C.ServerResponse.DisplayText)}})}function SetVideoPrivate(A) {new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"SETVIDEOPRIVATE",videoid:A},onSuccess:function(E) {var C=E.responseText.evalJSON();var B=$("videostatus_"+A);var D=$("makeprivate_"+A);if(C.ServerResponse.IsRequestSuccessful){B.update(Resources.subscription_private);D.update('<a href="javascript:SetVideoPublic('+A+');">'+Resources.videoitem_makepublic+"</a>")}alert(C.ServerResponse.DisplayText)}})}function AddToChannel(C,A,B) {new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"ADDTOCHANNEL",videoid:C,h:B},onSuccess:function(F) {var D=F.responseText.evalJSON();if(A===""||!D.ServerResponse.IsRequestSuccessful){alert(D.ServerResponse.DisplayText)}else{var E=$(A);E.update('<span class="successfulRequest">'+D.ServerResponse.DisplayText+"</span>")}}})}function AddToProfile(C,A,B) {new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"ADDTOPROFILE",videoid:C,h:B},onSuccess:function(F) {var D=F.responseText.evalJSON();if(A===""||!D.ServerResponse.IsRequestSuccessful){alert(D.ServerResponse.DisplayText)}else{var E=$(A); _proxy_jslib_assign('', E, 'innerHTML', '=', ('<span class="successfulRequest">'+D.ServerResponse.DisplayText+"</span>"))}}})}function RemoveFromProfile(C,A,B) {new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"REMOVEPROFILEVIDEO",videoid:C,h:B},onSuccess:function(F) {var D=F.responseText.evalJSON();if(A===""||!D.ServerResponse.IsRequestSuccessful){alert(D.ServerResponse.DisplayText)}else{var E=$(A); _proxy_jslib_assign('', E, 'innerHTML', '=', ('<span class="successfulRequest">'+D.ServerResponse.DisplayText+"</span>"))}}})}function AddToFavorites(C,A,B) {new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"SAVETOFAVOURITE",videoid:C,h:B},onSuccess:function(F) {var D=F.responseText.evalJSON();var E=$(A);if(D.ServerResponse.IsRequestSuccessful){ _proxy_jslib_assign('', E, 'innerHTML', '=', ('<span class="successfulRequest">'+D.ServerResponse.DisplayText+"</span>"))}else{alert(D.ServerResponse.DisplayText)}}})}function FlagVideoAsInappropriate(C,A,B) {new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"FLAGVIDEO",videoid:C,h:B},onSuccess:function(F) {var D=F.responseText.evalJSON();var E=$(A);if(D.ServerResponse.IsRequestSuccessful){E.update('<span class="successfulRequest">'+D.ServerResponse.DisplayText+"</span>")}else{alert(D.ServerResponse.DisplayText)}}})}function rateVideo(D,B,C,A) {new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"RATING",videoid:D,h:C,rating:A},onSuccess:function(G) {var E=G.responseText.evalJSON();var F=$(B);if(E.ServerResponse.IsRequestSuccessful){ _proxy_jslib_assign('', F, 'innerHTML', '=', ('<span class="successfulRequest">'+E.ServerResponse.DisplayText+"</span>"))}else{alert(E.ServerResponse.DisplayText)}}})}function SetChannelPublic(A) {new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"SETCHANNELPUBLIC",channelid:A},onSuccess:function(E) {var C=E.responseText.evalJSON();var B=$("videostatus");var D=$("changevideostatus");if(C.ServerResponse.IsRequestSuccessful){B.update(Resources.subscription_public);D.update('<a href="javascript:SetChannelPrivate('+A+');">'+Resources.videoitem_makeprivate+"</a>");alert(C.ServerResponse.DisplayText)}else{alert(C.ServerResponse.DisplayText)}}})}function SetChannelPrivate(A) {new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"SETCHANNELPRIVATE",channelid:A},onSuccess:function(E) {var C=E.responseText.evalJSON();var B=$("videostatus");var D=$("changevideostatus");if(C.ServerResponse.IsRequestSuccessful){B.update(Resources.subscription_private);D.update('<a href="javascript:SetChannelPublic('+A+');">'+Resources.videoitem_makepublic+"</a>");alert(C.ServerResponse.DisplayText)}else{alert(C.ServerResponse.DisplayText)}}})}function SetNotificationsOn(A) {new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"SETNOTIFICATIONSON",channelid:A},onSuccess:function(E) {var C=E.responseText.evalJSON();var B=$("notificationstatus");var D=$("changenotificationstatus");if(C.ServerResponse.IsRequestSuccessful){B.update(Resources.subscription_notificationon);D.update('<a href="javascript:SetNotificationsOff('+A+');">'+Resources.subscription_turnoff+"</a>");alert(C.ServerResponse.DisplayText)}else{alert(C.ServerResponse.DisplayText)}}})}function SetNotificationsOff(A) {new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"SETNOTIFICATIONSOFF",channelid:A},onSuccess:function(E) {var C=E.responseText.evalJSON();var B=$("notificationstatus");var D=$("changenotificationstatus");if(C.ServerResponse.IsRequestSuccessful){B.update(Resources.subscription_notificationoff);D.update('<a href="javascript:SetNotificationsOn('+A+');">'+Resources.subscription_turnon+"</a>");alert(C.ServerResponse.DisplayText)}else{alert(C.ServerResponse.DisplayText)}}})}var CommentPlacement={ViewVideoTop:1,ViewVideoBottom:2,ViewChannelTop:3,ViewVideoChannelTop:4,Video_Video:1,Channel_Channel:21,Channel_ChannelBeFirst:22,Channel_Profile:23,Channel_Video:24,Home_HotVideo:41};var commentlicious={posLeft:0,posTop:0,captchaURL:"",captchaGuid:"",_hasForm:false,addForm:function() {if(this._hasForm){return}getPageType();var B= _proxy_jslib_handle(document, 'getElementsByTagName', '', 1, 0)("BODY")[0];var C=document.createElement("div");C.id="comment_form";var A=document.createElement("div");A.id="popupMask"; _proxy_jslib_assign('', C, 'innerHTML', '=', ('<div id="comment_form_inner0"><div id="comment_form_inner1"><h2 onmousedown="dragStart(event, \'comment_form\')" title="'+Resources.comment_title_hover+'"><a href="#" onclick="return commentlicious.hide(false);" id="hide_button" title="'+Resources.comment_close_hover+'">X</a>'+Resources.comment_title+'</h2><fieldset><div id="commentArea"><label for="ajax_comment">'+Resources.comment_instructions+"</label><br /><small>"+Resources.comment_characterremaining+' <span id="ajax_comment_length">250</span></small><textarea class="commenttext" name="ajax_comment" id="ajax_comment" rows="4"></textarea></div><div id="comment_form_captcha" style="display: none;">'+Resources.captcha_enter_text+'<img id="captchaImg" src="" /><a href="#" onclick="return commentlicious.refreshCaptcha();"><img id="captchaRefresh" src="http://x.myspace.com/images/icons/refreshicon2.jpg"></a><div id="captcha_response"><input name="captcha_text" id="captcha_text" type="text" size="8" maxlength="10" />&nbsp;<label for="captcha_text">'+Resources.captcha_user_input+'</label></div></div><div id="comment_buttons"><input type="button" name="addcomment" id="addcomment" value="'+Resources.btn_submit+'" onclick="commentlicious.commentSubmitClick();" /><input type="button" name="cancel" id="cancel" value="'+Resources.btn_cancel+'" onclick="commentlicious.hide(false);" style="margin-left:20px;" /></div></fieldset></div></div> <div id="comment_shadow"> </div> '));B.appendChild(A);B.appendChild(C); _proxy_jslib_handle(document, 'getElementById', '', 1, 0)("ajax_comment").onkeyup=function() {showCharsRemaining("ajax_comment","ajax_comment_length",250)};this._hasForm=true},addEmbeddedForm:function(B) {if(this._hasForm){return}getPageType();var C=document.createElement("div");C.id="embedded_comment_form";var A=MS.Videos.sp+"img/refresh_icon1.gif"; _proxy_jslib_assign('', C, 'innerHTML', '=', ('<div id="comment_embedded_inner0"><div id="comment_embedded_inner1"><h2 style="color:White;">'+Resources.comment_title+'</h2><div style="margin-top:5px; padding: 2px 5px 2px 2px;" id="commentArea"><label for="ajax_comment">'+Resources.comment_instructions+"</label><br /><small>"+Resources.comment_characterremaining+' <span id="ajax_comment_length">250</span></small><textarea class="commenttext" name="ajax_comment" id="ajax_comment" rows="4"></textarea></div><div style="margin-top:5px; padding: 5px 5px 2px 2px; display: none;" id="comment_embedded_captcha" >'+Resources.captcha_enter_text+'<img id="captchaImg" src="" /><a href="#" onclick="return commentlicious.refreshCaptcha();"><img id="captchaRefresh" src="'+A+'" /></a><div id="captcha_response" style="margin-left:2px;" ><input name="captcha_text" id="captcha_text" type="text" size="8" maxlength="10" />&nbsp;<label for="captcha_text">'+Resources.captcha_user_input+'</label></div></div><div id="comment_embedded_buttons"><input type="button" class="comment_btn" id="addcomment" value="'+Resources.btn_submit+'" onclick="commentlicious.commentSubmitClick();" onmouseover="this.className=\'comment_btn btnhov\';" onmouseout="this.className=\'comment_btn\'" /><input type="button" class="comment_btn" id="cancel" value="'+Resources.btn_cancel+'" onclick="commentlicious.hide(false);" style="margin-left:20px;" onmouseover="this.className=\'comment_btn btnhov\';" onmouseout="this.className=\'comment_btn\'" /></div></div></div> '));new (Insertion.After)(B, _proxy_jslib_handle(C, 'innerHTML', '', 0, 0)); _proxy_jslib_handle(document, 'getElementById', '', 1, 0)("ajax_comment").onkeyup=function() {showCharsRemaining("ajax_comment","ajax_comment_length",250)};this._hasForm=true},getCoords:function(A) {var B=A;this.posLeft=0;this.posTop=0;while(B){this.posLeft+=B.offsetLeft;this.posTop+=B.offsetTop;B=B.offsetParent}},showForm:function(B,C,A) {if(!A){this.getCoords(C);if((B==CommentPlacement.ViewVideoTop)||(B==CommentPlacement.ViewVideoBottom)||(B==CommentPlacement.Video_Video)){this.posTop+=10;this.posLeft+=15}else{if(B==CommentPlacement.ViewVideoChannelTop){this.posTop+=70;this.posLeft+=15}else{if(B==CommentPlacement.Channel_Channel){this.posTop=this.posTop+((this.posTop<250)?10:-80);this.posLeft-=410}else{if(B==CommentPlacement.Channel_ChannelBeFirst){this.posTop=this.posTop+((this.posTop<250)?-40:-170);this.posLeft+=15}}}}return this.show(this.posTop,this.posLeft)}else{var D=$("comments_header");return this.showEmbeddedForm(D)}},show:function(C,B) {if(!this._hasForm){this.addForm()}$("commentArea").style.display="block";var A= _proxy_jslib_handle(document, 'getElementById', '', 1, 0)("comment_form");A.style.position="absolute"; _proxy_jslib_assign('', A.style, 'top', '=', (C+"px"));A.style.left=B+"px";A.style.display="block"; _proxy_jslib_handle(document, 'getElementById', '', 1, 0)("ajax_comment").focus();this.getCaptchaData();return false},showEmbeddedForm:function(A) {if(!this._hasForm){this.addEmbeddedForm(A)}else{$("comment_embedded_inner0").show()}$("commentArea").show(); _proxy_jslib_handle(document, 'getElementById', '', 1, 0)("ajax_comment").focus();this.getCaptchaData();return false},hide:function() {var C=$("comment_embedded_inner0");if(C){C.hide();$("comment_embedded_captcha").hide()}else{var B= _proxy_jslib_handle(document, 'getElementsByTagName', '', 1, 0)("BODY")[0];B.style.overflow="";$("popupMask").style.display="none";$("comment_form").style.display="none";$("comment_form_captcha").hide()} _proxy_jslib_assign('',  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)("ajax_comment"), 'value', '=', ("")); _proxy_jslib_assign('', $("ajax_comment_length"), 'innerHTML', '=', ("250"));$("addcomment").onclick=function A(D) {commentlicious.commentSubmitClick()}; _proxy_jslib_assign('', $("captcha_text"), 'value', '=', ("")); _proxy_jslib_assign('', $("captchaImg"), 'src', '=', (""));this.captchaURL="";this.captchaGuid="";return false},commentSubmitClick:function() {var B= _proxy_jslib_handle($("ajax_comment"), 'value', '', 0, 0);if($("posterId")){lastCommentAuthorId= _proxy_jslib_handle($("posterId"), 'innerHTML', '', 0, 0)}if(B.length===0){alert(Resources.comment_error1);$("ajax_comment").focus();return false}if(B.length>250){alert(Resources.comment_error2);$("ajax_comment").focus();return false}if(this.captchaURL===""){AddCommentWithCaptchaClick(B,"","")}else{$("addcomment").onclick=function A(C) {commentlicious.captchaSubmitClick()};this.showCaptcha()}},captchaSubmitClick:function() {var A= _proxy_jslib_handle($("captcha_text"), 'value', '', 0, 0);if(A===""||A.length===0){alert(Resources.captcha_not_valid);$("captcha_text").focus()}else{AddCommentWithCaptchaClick( _proxy_jslib_handle($("ajax_comment"), 'value', '', 0, 0),A,this.captchaGuid)}},showCaptcha:function() {$("commentArea").hide();if($("comment_form_captcha")){$("comment_form_captcha").style.display="block"}if($("comment_embedded_captcha")){$("comment_embedded_captcha").show()} _proxy_jslib_assign('', $("captchaImg"), 'src', '=', (this.captchaURL)); _proxy_jslib_assign('', $("captcha_text"), 'value', '=', (""));$("captcha_text").focus()},refreshCaptcha:function() {this.getCaptchaData();this.showCaptcha();return false},getCaptchaData:function() {var A=new (Date)().getMilliseconds();new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:captchaTypeCheck,uid:A},onComplete:function(B) {this.setCaptchaData(B)}.bind(this)})},setCaptchaData:function(B) {var A=B.responseText.evalJSON();this.captchaURL=A.ServerResponse.CaptchaUrl;this.captchaGuid=A.ServerResponse.CaptchaGuid}};function ShowCommentForm(B,C,A) {return commentlicious.showForm(B,C,A)}function DeleteComment(A) {getPageType();if(confirm(Resources.Comments_DeleteConfirm)){new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:deleteCommentAction,id:pageTypeId,commentid:A},onSuccess:function(C) {var B=C.responseText.evalJSON();if(B.ServerResponse.IsRequestSuccessful){CommentsPageClick(PagingContext.currentPage);PagingContext.totalRows=PagingContext.totalRows-1}else{alert(B.ServerResponse.DisplayText)}}})}}function MarkAsSpam(A) {getPageType();if(confirm(Resources.Comments_ConfirmMarkAsSpam)){new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:markAsSpamAction,id:pageTypeId,commentid:A},onSuccess:function(C) {var B=C.responseText.evalJSON();alert(B.ServerResponse.DisplayText);controlToHide= _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(A).getElementsByClassName("markAsSpam");controlToHide[0].style.visibility="hidden"}})}}function AddCommentWithCaptchaClick(C,B,A) {new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:addCommentsAction,id:pageTypeId,body:C,ctext:B,cguid:A,lcaid:lastCommentAuthorId},onSuccess:function(E) {var D=E.responseText.evalJSON();if(D.ServerResponse.IsRequestSuccessful){commentlicious.hide();CommentsPageClick(0);PagingContext.totalRows=PagingContext.totalRows+1;if($("hypFirstComment")!==null){$("hypFirstComment").style.display="none"}if($("firstCommentRow")!==null){$("firstCommentRow").style.display="none"}}else{if(D.ServerResponse.CaptchaUrl!==null){commentlicious.captchaURL=D.ServerResponse.CaptchaUrl;commentlicious.captchaGuid=D.ServerResponse.CaptchaGuid;alert(D.ServerResponse.DisplayText);commentlicious.showCaptcha()}else{commentlicious.hide();alert(D.ServerResponse.DisplayText)}}}})}function getPageType() {try{pageTypeId=ChannelID;commentsAction="GETCHANNELCOMMENTS";addCommentsAction="ADDCHANNELCOMMENTWITHCAPTCHA";deleteCommentAction="DELETECHANNELCOMMENT";captchaTypeCheck="CHECKWHETHERTODISPLAYCAPTCHAFORCHANNEL";markAsSpamAction="MARKCHANNELCOMMENTASSPAM"}catch(A){pageTypeId=videoID;commentsAction="GETVIDEOCOMMENTS";addCommentsAction="ADDVIDEOCOMMENTWITHCAPTCHA";deleteCommentAction="DELETEVIDEOCOMMENT";captchaTypeCheck="CHECKWHETHERTODISPLAYCAPTCHA";markAsSpamAction="MARKVIDEOCOMMENTASSPAM"}}function CommentsPageClick(A) {getPageType();new (commentsData)(A);return false}var commentsData=Class.create();commentsData.prototype={requestedPageNumber:1,currentPageNumber:2,lastCommentId:1,firstCommentId:1,pageSize:10,commentsTable:1,initialize:function(A) {this.currentPageNumber=A+1;this.requestedPageNumber=PagingContext.currentPage+1;this.commentsTable=$("tblComments").tBodies[0];this.getNewData()},getNewData:function() {if(this.commentsTable.rows.length>0){this.firstCommentId=this.commentsTable.rows[0].id;this.lastCommentId= _proxy_jslib_handle(this.commentsTable.rows, ((this.commentsTable.rows.length)-1), 0, 0).id}var A=this.showNewData.bind(this);new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:commentsAction,id:pageTypeId,rpn:this.requestedPageNumber,cpn:this.currentPageNumber,lcid:this.lastCommentId,fcid:this.firstCommentId,ps:this.pageSize},onSuccess:A})},showNewData:function(C) {var B=C.responseText.evalJSON();this.clearExistingData(this.commentsTable);this.makePaging();for(var A=0;A<B.Comments.length;A++){this.insertComment( _proxy_jslib_handle(B.Comments, (A), 0, 0),B.HasCommentOptions)}wordBreakerDoComments()},clearExistingData:function(A) {while(A.rows.length>0){A.deleteRow(0)}},makePaging:function() {PagingContext.currentPage=this.currentPageNumber-1;PagingContext.startRow=1+PagingContext.currentPage*PagingContext.pageSize;var A=makePaging(); _proxy_jslib_assign('',  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)("PagingHeader"), 'innerHTML', '=', (A)); _proxy_jslib_assign('',  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)("PagingFooter"), 'innerHTML', '=', (A))},insertComment:function(obj,hasCommentOptions) {if($("firstCommentRow")){$("firstCommentRow").style.display="none"}{var _proxy_jslib_with_objs= [] ;with(_proxy_jslib_with_objs[_proxy_jslib_with_objs.length]= (obj.Comment)){var cells="";var opts="";var tblRow=document.createElement("TR");var tdFriend=document.createElement("TD");var tdComment=document.createElement("TD");if(hasCommentOptions){opts=String.format('<ul class="commentTools"><li><a class="deleteComment" href="javascript:DeleteComment({0});" title="{1}">{2}</a></li><li><a class="postBackComment" href="#" title="{3}">{4}</a></li><li><a class="sendMessage" href="#" title="{5}">{6}</a></li></ul>',CommentID,Resources.tooltip_DeleteComment,Resources.link_DeleteComment,Resources.tooltip_PostBackComment,Resources.link_PostBackComment,Resources.tooltip_SendMessage,Resources.link_SendMessage)}else{if(commentTool_EnableDeleteMine&&(MySpace.ClientContext.UserId==AuthorID)){opts=String.format('<ul class="commentTools"><li><a class="deleteComment" href="javascript:DeleteComment({0});" title="{1}">{2}</a></li></ul>',CommentID,Resources.tooltip_DeleteComment,Resources.link_DeleteComment)}else{if(MySpace.ClientContext.IsLoggedIn&&commentTool_EnableMarkAsSpam){opts=String.format('<ul class="commentTools"><li><a class="markAsSpam" href="javascript:MarkAsSpam({0});" title="{1}">{2}</a></li></ul>',CommentID,Resources.tooltip_MarkAsSpam,Resources.link_MarkAsSpam)}}}tdFriend.className="poster"; _proxy_jslib_assign('', tdFriend, 'innerHTML', '=', (String.format('<a href="{0}"><div class="friendName">{1}</div><img src="{2}" class="friendPicture" /></a>',ChannelURL,DisplayName,PicSrc)));tdComment.className="comment"; _proxy_jslib_assign('', tdComment, 'innerHTML', '=', (String.format('<p class="posting_date">{0}</p><div>{1}</div>{2}',PostingDate,Body,opts)));tblRow.id=CommentID;tblRow.appendChild(tdFriend);tblRow.appendChild(tdComment);this.commentsTable.appendChild(tblRow)}; _proxy_jslib_with_objs.length-- ;}}};function SortedVideosClick(C,B,A) {new (videosData)(C,B,A);return false}var videosData=Class.create();videosData.prototype={channelId:1,startPage:1,numOfRecords:20,sortBy:5,dateTimePeriod:"all",videosTable:1,selectedLink:"",initialize:function(C,B,A) {this.channelId=C;this.sortBy=B;this.selectedLink=A;this.videosTable=$("myVideosList").tBodies[0];this.getNewData()},getNewData:function() {var A=this.showNewData.bind(this);new (Ajax.Request)(url,{method:defaultMethod,parameters:{fuseaction:defaultFuseAction,action:"GETSORTEDVIDEOS",channelid:this.channelId,sp:this.startPage,nor:this.numOfRecords,sb:this.sortBy,f:this.dateTimePeriod},onSuccess:A})},showNewData:function(C) {var B=C.responseText.evalJSON();this.clearExistingData(this.videosTable);for(var A=0;A<B.Videos.length;A++){this.insertVideoRow( _proxy_jslib_handle(B.Videos, (A), 0, 0),A)}this.setLinksStyle();wordBreakerVideoDescription()},clearExistingData:function(A) {while(A.rows.length>0){A.deleteRow(0)}},setLinksStyle:function() {var sortedLinksCollection= _proxy_jslib_handle($("myVideosSortingLinks"), 'getElementsByTagName', '', 1, 0)("a");for(var i=0;i<sortedLinksCollection.length;i++){{var _proxy_jslib_with_objs= [] ;with(_proxy_jslib_with_objs[_proxy_jslib_with_objs.length]= ( _proxy_jslib_handle(sortedLinksCollection, (i), 0, 0).style)){color="";textDecoration="underline"; cursor= _proxy_jslib_with_assign_rval(_proxy_jslib_with_objs, '', 'cursor', '=', ("pointer"), cursor)}; _proxy_jslib_with_objs.length-- ;}}{var _proxy_jslib_with_objs= [] ;with(_proxy_jslib_with_objs[_proxy_jslib_with_objs.length]= (this.selectedLink.style)){color="#000000";textDecoration="none"; cursor= _proxy_jslib_with_assign_rval(_proxy_jslib_with_objs, '', 'cursor', '=', ("text"), cursor)}; _proxy_jslib_with_objs.length-- ;}},insertVideoRow:function(B,A) {if(A%2===0){this.insertVideoCell(true,B,A)}else{this.insertVideoCell(false,B,A)}},insertVideoCell:function(isNewRow,obj,counter) {var tdCell1=document.createElement("TD");var tdCell2=document.createElement("TD");var divTag1=document.createElement("DIV");var divTag2=document.createElement("DIV");var divTag3=document.createElement("DIV");var divTag4=document.createElement("DIV");var aTag=document.createElement("A");var aTag2=document.createElement("A");var h2Tag=document.createElement("H2");{var _proxy_jslib_with_objs= [] ;with(_proxy_jslib_with_objs[_proxy_jslib_with_objs.length]= (obj.Video)){aTag.className="video_picture"; _proxy_jslib_assign('', aTag, 'href', '=', (VideoURL)); _proxy_jslib_assign('', aTag, 'innerHTML', '=', ("<img src='"+PicSrc+"' />")); _proxy_jslib_assign('', aTag2, 'innerHTML', '=', (Title)); _proxy_jslib_assign('', aTag2, 'href', '=', (VideoURL));tdCell1.className="video_still";tdCell1.appendChild(aTag);tdCell2.className="video_info";h2Tag.className="title";h2Tag.appendChild(aTag2);divTag1.className="text"; _proxy_jslib_assign('', divTag1, 'innerHTML', '=', ("<strong>"+Runtime+"</strong>"));divTag2.className="description"; _proxy_jslib_assign('', divTag2, 'innerHTML', '=', (Description));divTag3.className="rating"; _proxy_jslib_assign('', divTag3, 'innerHTML', '=', (Resources.rating+": <strong>"+Rating+"%</strong>"));divTag4.className="text"; _proxy_jslib_assign('', divTag4, 'innerHTML', '=', ("<span>"+Resources.added+": "+DateAdded+"</span>")); _proxy_jslib_assign('', divTag4, 'innerHTML', '+=', ("<br /><span>"+Resources.plays+": "+Plays+"</span>")); _proxy_jslib_assign('', divTag4, 'innerHTML', '+=', ("<br /><span>"+Resources.comments+": "+Comments+"</span>"))}; _proxy_jslib_with_objs.length-- ;}tdCell2.appendChild(h2Tag);tdCell2.appendChild(divTag1);tdCell2.appendChild(divTag2);tdCell2.appendChild(divTag3);tdCell2.appendChild(divTag4);if(isNewRow){var tblRow=document.createElement("TR");tblRow.appendChild(tdCell1);tblRow.appendChild(tdCell2);this.videosTable.appendChild(tblRow)}else{var tblRow= _proxy_jslib_handle(this.videosTable.rows, ((this.videosTable.rows.length)-1), 0, 0);tblRow.appendChild(tdCell1);tblRow.appendChild(tdCell2)}if(counter%2===0){this.videosTable.appendChild(tblRow)}}}; ;
_proxy_jslib_flush_write_buffers() ;