var Browser=function(){var A=navigator.userAgent.toLowerCase();return{version:(A.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(A),opera:/opera/.test(A),msie:/msie/.test(A)&&!(/opera/.test(A)),mozilla:/mozilla/.test(A)&&!(/(compatible|webkit)/.test(A))}}();var ScriptFragment="<script[^>]*>([\\S\\s]*?)<\/script>";var JSONFilter=/^\/\*-secure-([\s\S]*)\*\/\s*$/;var $break={};function $A(C){if(!C){return[]}if(C.toArray){return C.toArray()}var B=C.length||0,A=new Array(B);while(B--){A[B]=C[B]}return A}if(Browser.opera){$A=function(C){if(!C){return[]}if(!(typeof C=="function"&&C=="[object NodeList]")&&C.toArray){return C.toArray()}var B=C.length||0,A=new Array(B);while(B--){A[B]=C[B]}return A}}function $$(A){return typeof(A)=="string"?document.getElementById(A):A}function $CSS(A,B,C){return MySpace.Utils.Selector.query(A,B,C)}function MySpaceTv(){this.listEvents=[]}MySpaceTv.prototype={extend:function(A,C){for(var B in C){A[B]=C[B]}return A},_domReady:function(){if(arguments.callee.done){return}arguments.callee.done=true;if(this._timer){clearInterval(this._timer)}for(var A=0;A<mySpaceTv._readyCallbacks.length;A++){var B=mySpaceTv._readyCallbacks[A];B.call()}mySpaceTv._readyCallbacks=null},onReady:function(B){if(!mySpaceTv._readyCallbacks){var A=this._domReady;if(A.done){return B()}if(document.addEventListener){if(navigator.userAgent.indexOf("AppleWebKit/")>-1){this._timer=window.setInterval(function(){if(/loaded|complete/.test(document.readyState)){A()}},0);window.onload=A}else{document.addEventListener("DOMContentLoaded",A,false)}}else{(function(){try{document.documentElement.doScroll("left")}catch(C){this._timer=window.setTimeout(arguments.callee,50);return}A()})();document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;A()}}}mySpaceTv._readyCallbacks=[]}mySpaceTv._readyCallbacks.push(B)},getElementsByTagNames:function(){var E,D,C=[];if(document.evaluate){var A=[];for(D=0;D<arguments.length;D++){A.push(".//"+arguments[D])}E=document.evaluate(A.join("|"),this,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(D=0;D<E.snapshotLength;D++){C.push(E.snapshotItem(D))}}else{for(D=0;D<arguments.length;D++){E=this.getElementsByTagName(arguments[D]);for(var B=0;B<E.length;B++){C.push(E[B])}}}return C},getElementsByClassName:function(B,F,A){var E=(F=="*"&&B.all)?B.all:B.getElementsByTagName(F);var H=new Array();A=A.replace(/\-/g,"\\-");var G=new RegExp("(^|\\s)"+A+"(\\s|$)");var D;for(var C=0;C<E.length;C++){D=E[C];if(G.test(D.className)){H.push(D)}}return(H)},extractId:function(A){var B=A.id.split("-");if(B.length<=1){return 0}else{return parseInt(B[B.length-1],10)}},showLoading:function(A){var B="<br><br><br><br><br><center><img src='http://x.myspacecdn.com/modules/videos/static/img/comment/white_loading.gif'></center><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>";$$(A).innerHTML=B;document.body.focus()},hideDiv:function(A){return Element.hide(A)},showDiv:function(A){return Element.show(A)},togglePanel:function(A){if(typeof(A)=="string"){A=$$(A)}if(this.isPanelExpanded(A)){this.collapsePanel(A)}else{this.expandPanel(A)}},getDisplayStyleByTagName:function(A){var B=A.nodeName.toLowerCase();return(B=="span"||B=="img"||B=="a")?"inline":(B=="tr"||B=="td"?"":"block")},toggleClass:function(A,B){return Element.toggleClassName(A,B)},hasClass:function(A,B){return Element.hasClassName(A,B)},addClass:function(B,A){return Element.addClassName(B,A)},removeClass:function(B,A){return Element.removeClassName(B,A)},isPanelExpanded:function(A){return this.hasClass(A,"expanded")},expandPanel:function(A){if(!this.isPanelExpanded(A)){this.addClass(A,"expanded")}},collapsePanel:function(A){if(this.isPanelExpanded(A)){this.removeClass(A,"expanded")}},setInnerHTML:function(A,B){var C=$$(A);C.innerHTML=B},buildUrl:function(B,E){var D=new Array();var A=B;if(E){for(var C in E){D.push(C+"="+encodeURIComponent(E[C].toString()))}A+="?"+D.join("&")}return A},stopPropagation:function(A){if(A===null){return}if(!A){A=window.event}if(A.preventDefault){A.preventDefault();A.stopPropagation()}else{A.returnValue=false;A.cancelBubble=true}},enforceLogin:function(){var d=new Date();var ajaxUrl="/index.cfm?fuseaction=vids.ajaxAction&action=ENFORCELOGIN&"+d.getTime();mySpaceTv.getAjaxRequest(ajaxUrl,function(xmlHttpReq){var obj=eval("("+xmlHttpReq+")");if(obj.ServerResponse.IsRequestSuccessful){location.href=obj.ServerResponse.DisplayText}})},onCommentsClicked:function(){Element.scrollTo(document,$$("ivpComments"))}};MySpaceTv.prototype.$=function(){var C=new Array();for(var B=0;B<arguments.length;B++){var A=arguments[B];if(typeof A=="string"){A=document.getElementById(A)}if(arguments.length==1){return A}C.push(A)}return C};MySpaceTv.prototype.addLoadEvent=function(A){var B=window.onload;if(typeof window.onload!="function"){window.onload=A}else{window.onload=function(){B();A()}}};MySpaceTv.prototype.addEvent=function(E,D,B,A){A=A||false;if(E.addEventListener){E.addEventListener(D,B,A);this.eventCacheAdd(E,D,B);return true}else{if(E.attachEvent){E["e"+D+B]=B;E[D+B]=function(){E["e"+D+B](window.event)};var C=E.attachEvent("on"+D,E[D+B]);this.eventCacheAdd(E,D,B);return C}else{E["on"+D]=E["e"+D+B]}}};MySpaceTv.prototype.removeEvent=function(D,C,B,A){A=A||false;if(D.removeEventListener){D.removeEventListener(C,B,A)}if(C.substring(0,2)!="on"){C="on"+C}if(D.detachEvent){D.detachEvent(C,B)}D[C]=null};MySpaceTv.prototype.eventCacheAdd=function(A,C,B){this.listEvents.push(arguments)};MySpaceTv.prototype.eventCacheFlush=function(){var A,B;for(A=this.listEvents.length-1;A>=0;A=A-1){B=this.listEvents[A];if(B[0].removeEventListener){B[0].removeEventListener(B[1],B[2],B[3])}if(B[1].substring(0,2)!="on"){B[1]="on"+B[1]}if(B[0].detachEvent){B[0].detachEvent(B[1],B[2])}B[0][B[1]]=null}};MySpaceTv.prototype.padZeros=function(B,A){var E=B.toString();var D=A-E.length;for(var C=1;C<=D;C++){E="0"+E}return E};MySpaceTv.prototype.formatNumber=function(B,E){E=E||"";B+="";var D=B.split(".");var A=D[0];var C=D.length>1?"."+D[1]:"";var F=/(\d+)(\d{3})/;while(F.test(A)){A=A.replace(F,"$1,$2")}return E+A+C};MySpaceTv.prototype.unformatNumber=function(A){return A.replace(/([^0-9\.\-])/g,"")*1};MySpaceTv.prototype.isArray=function(A){return A&&!(A.propertyIsEnumerable("length"))&&typeof A==="object"&&typeof A.length==="number"};MySpaceTv.prototype.wordWrap=function(H,K,B,J){var C=((arguments.length>=2)?arguments[1]:75);var I=((arguments.length>=3)?arguments[2]:"\n");var G=((arguments.length>=4)?arguments[3]:false);var F,E,D,L,A;if(C<1){return H}for(F=-1,D=(A=H.split("\n")).length;++F<D;A[F]+=L){for(L=A[F],A[F]="";L.length>C;A[F]+=L.slice(0,E)+((L=L.slice(E)).length?I:"")){E=G==2||(E=L.slice(0,C+1).match(/\S*(\s)?$/))[1]?C:E.input.length-E[0].length||G==1&&C||E.input.length+(E=L.slice(C).match(/^\S*/)).input.length}}return A.join("\n")};MySpaceTv.prototype.getElementsByClass=function(G,A,E){var D=new Array();if(E==null){E=document}if(A==null){A="*"}var C=E.getElementsByTagName(A);var B=C.length;var F=new RegExp("(^|\\\\s)"+G+"(\\\\s|$)");for(i=0,j=0;i<B;i++){if(F.test(C[i].className)){D[j]=C[i];j++}}return D};MySpaceTv.prototype.toggle=function(B){var A=document.getElementById(B);if(A.style.display!="none"){A.style.display="none"}else{A.style.display=""}};MySpaceTv.prototype.insertAfter=function(B,C,A){B.insertBefore(C,A.nextSibling)};MySpaceTv.prototype.getCookie=function(C){var D=document.cookie.indexOf(C+"=");var A=D+C.length+1;if((!D)&&(C!=document.cookie.substring(0,C.length))){return null}if(D==-1){return null}var B=document.cookie.indexOf(";",A);if(B==-1){B=document.cookie.length}return unescape(document.cookie.substring(A,B))};MySpaceTv.prototype.setCookie=function(C,E,A,H,D,G){var B=new Date();B.setTime(B.getTime());if(A){A=A*1000*60*60*24}var F=new Date(B.getTime()+(A));document.cookie=C+"="+escape(E)+((A)?";expires="+F.toGMTString():"")+((H)?";path="+H:"")+((D)?";domain="+D:"")+((G)?";secure":"")};MySpaceTv.prototype.deleteCookie=function(A,C,B){if(getCookie(A)){document.cookie=A+"="+((C)?";path="+C:"")+((B)?";domain="+B:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}};MySpaceTv.prototype.cookiesAllowed=function(){setCookie("checkCookie","test",1);if(getCookie("checkCookie")){deleteCookie("checkCookie");return true}return false};MySpaceTv.prototype.getEventTarget=function(B){var A;if(!B){B=window.event}if(B.target){A=B.target}else{if(B.srcElement){A=B.srcElement}}if(A.nodeType==3){A=A.parentNode}return A};MySpaceTv.prototype.createPostVars=function(C){var A="";if(!(C&&!(C.propertyIsEnumerable("length"))&&typeof C==="object"&&typeof C.length==="number")){return""}for(var B=0;B<C.length;B++){A+=C[B][0]+"="+escape(C[B][1]);if(B!=(C.length-1)){A+="&"}}return A};MySpaceTv.prototype.postAjaxRequest=function(B,D,A){var C=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("MSXML2.XMLHTTP.3.0");C.open("POST",B,true);C.setRequestHeader("Content-Type","application/x-www-form-urlencoded");C.setRequestHeader("Content-length",D.length);C.setRequestHeader("Connection","close");C.onreadystatechange=function(){if(C.readyState==4&&C.status==200){if(C.responseText){A(C.responseText)}}else{if(C.readyState==4&&C.status!=200){A("<response><status>-1</status><message>failed connection</message><response>")}}};C.send(D)};MySpaceTv.prototype.getAjaxRequest=function(B,A){var C=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("MSXML2.XMLHTTP.3.0");C.open("GET",B,true);C.onreadystatechange=function(){if(C.readyState==4){if(C.status==200){if(C.responseText){A(C.responseText)}else{A("<response><status>-1</status><message>no response text was received</message><response>")}}else{A("<response><status>-1</status><message>request failed</message><response>")}}};C.send(null)};MySpaceTv.prototype.getXmlDoc=function(A){var B;if(window.ActiveXObject){B=new ActiveXObject("Microsoft.XMLDOM");B.async="false";B.loadXML(A)}else{if(document.implementation.createDocument){var C=new DOMParser();B=C.parseFromString(A,"text/xml")}else{alert("Your browser cannot handle this script");return}}return B};MySpaceTv.prototype.overlayDialog=function(H,J,G,F,C,A,I){var B=MySpace.UI.Popup.create("","");B._element.innerHTML="<div class='tv_vid_popup_box2'><a class='tv_vid_popup_ex'></a><div class='tv_vid_popup_title'></div><div class='tv_vid_popupcontent2'></div><div class='tv_vid_popup_buttons'></div></div>";B._box=B._element.firstChild;B.set_content(J);B.set_title(H);for(var D=0;D<G.length;D++){var E=G[D];if((E==F)&&(E==C)){B.add_button(E,true).isCancel=true}else{if(E==F){B.add_button(E,true)}else{if(E==C){B.add_button(E).isCancel=true}else{B.add_button(E)}}}}B.set_state(A);B.show(I)};MySpaceTv.prototype.overlayAlert=function(B,A){mySpaceTv.overlayDialog(B,A,["Ok"],"Ok","",null,null)};MySpaceTv.prototype.makeBeaconRequest=function(D,C,E,B){var A=MySpace.Application.keyDisabled("MSV_IVP_DWBeacon");if(!A){MySpace.Beacon.Request({ivvid:D,ivuid:C,ivet:E,ivev:B})}};MySpaceTv.prototype.adjustImage=function(E,F,B){if(!(E=$$(E))){return}function C(){return(E.height/E.width)}function D(){return(B/F)}function A(J,I){if(J>I){var H=Math.ceil((F/E.clientWidth)*E.clientHeight);E.style.height=H+"px";E.style.width=auto}else{var G=Math.ceil((B/E.clientHeight)*E.clientWidth);E.style.width=G+"px";E.style.height="auto"}}return A(C(),D())};MySpaceTv.prototype.trim=function(A){return A.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};MySpaceTv.prototype.extend(String.prototype,{camelize:function(){var D=this.split("-"),A=D.length;if(A==1){return D[0]}var C=this.charAt(0)=="-"?D[0].charAt(0).toUpperCase()+D[0].substring(1):D[0];for(var B=1;B<A;B++){C+=D[B].charAt(0).toUpperCase()+D[B].substring(1)}return C},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},extractScripts:function(){var B=new RegExp(ScriptFragment,"img");var A=new RegExp(ScriptFragment,"im");return(this.match(B)||[]).map(function(C){return(C.match(A)||["",""])[1]})},include:function(A){return this.indexOf(A)>-1},interpolate:function(B){var C=this;for(i in B){if(B.hasOwnProperty(i)){var A=new RegExp("#{"+i+"}","g");C=C.replace(A,B[i])}}return C},multiReplace:function(B){var C=this,A;for(A in B){C=C.replace(new RegExp(A,"g"),B[A])}return C},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripScripts:function(){return this.replace(new RegExp(ScriptFragment,"img"),"")},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()}});MySpaceTv.prototype.extend(Function.prototype,{argumentNames:function(){var A=this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip");return A.length==1&&!A[0]?[]:A},bind:function(){if(arguments.length<2&&typeof arguments[0]=="undefined"){return this}var A=this,C=$A(arguments),B=C.shift();return function(){return A.apply(B,C.concat($A(arguments)))}},bindAsEventListener:function(){var A=this,C=$A(arguments),B=C.shift();return function(D){return A.apply(B,[D||window.event].concat(C))}}});MySpaceTv.prototype.extend(Array.prototype,{});if(!Array.prototype.map){Array.prototype.map=function(B){var A=this.length;if(typeof B!="function"){throw new TypeError()}var E=new Array(A);var D=arguments[1];for(var C=0;C<A;C++){if(C in this){E[C]=B.call(D,this[C],C,this)}}return E}}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(C,A){A||(A=0);var B=this.length;if(A<0){A=B+A}for(;A<B;A++){if(this[A]===C){return A}}return -1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(B,A){A=isNaN(A)?this.length:(A<0?this.length+A:A)+1;var C=this.slice(0,A).reverse().indexOf(B);return(C<0)?C:A-C-1}}var Element=function(){var A={};return{addClassName:function(B,C){if(!(B=$$(B))){return}if(!Element.hasClassName(B,C)){B.className+=(B.className?" ":"")+C}return B},cumulativeOffset:function(C){var B=0,D=0;do{B+=C.offsetTop||0;D+=C.offsetLeft||0;C=C.offsetParent}while(C);return Element._returnOffset(D,B)},cumulativeScrollOffset:function(C){var B=0,D=0;do{B+=C.scrollTop||0;D+=C.scrollLeft||0;C=C.parentNode}while(C);return Element._returnOffset(D,B)},ellipsis:function(C,E){var B=E.lines||1;var M=E.enableUpdating||false;var L=E.optimize||0;var P=document.documentElement.style;if(!("textOverflow" in P||"OTextOverflow" in P)){if(!(C=$$(C))){return}var V=C.innerHTML;var R=Element.getStyle(C,"display");if(R!="none"&&R!=null){var K=C.offsetWidth}else{var K=Element.getDimensions(C).width}var N=$$("_ellipsis_calc");var T=(N==null);if(T){N=document.createElement("span");N.style.display="none";N.id="_ellipsis_calc";N.innerHTML=V;document.body.appendChild(N)}var F=Element.getStyle(C,"fontSize");N.style.fontSize=F;var S=Element.getStyle(C,"fontWeight");N.style.fontWeight=S;var O=V;N.style.display="inline";var U=F.substr(0,F.length-2);var Q=(typeof E.padding=="undefined")?U:E.padding;var H=((B*K)-(B*Q));var J=false,D=L;N.innerHTML="";var G=true;if(O.length<D){N.innerHTML=O.substr(0,D);G=false}if(G){N.innerHTML=O;if(N.offsetWidth<=H){G=false}}if(G){N.innerHTML="";while(D<O.length&&N.offsetWidth<H){if(O[D]=="<"){J=true}if(O[D]==">"&&J){J=false}if(J){N.innerHTML=O.substr(0,D)}else{N.innerHTML=(O.substr(0,D)+"\u2026")}D++}}N.style.display="none";C.innerHTML=N.innerHTML;if(M==true){var I=Element.getDimensions(C).width;mySpaceTv.addEvent(window,"resize",function(){if(Element.getDimensions(C).width!=I){I=Element.getDimensions(C).width;C.innerHTML=V;Element.ellipsis(C)}})}}else{return element}},getDimensions:function(D){D=$$(D);var H=this.getStyle(D,"display");if(H!="none"&&H!=null){return{width:D.offsetWidth,height:D.offsetHeight}}var C=D.style;var G=C.visibility;var E=C.position;var B=C.display;C.visibility="hidden";C.position="absolute";C.display="block";var I=D.clientWidth;var F=D.clientHeight;C.display=B;C.position=E;C.visibility=G;return{width:I,height:F}},getOffsetParent:function(B){if(B.offsetParent){return $$(B.offsetParent)}if(B==document.body){return $$(B)}while((B=B.parentNode)&&B!=document.body){if(Element.getStyle(B,"position")!="static"){return $(B)}}return $$(document.body)},getStyle:function(C,D){if(!(C=$$(C))){return}D=D=="float"?"cssFloat":D.camelize();var E;if(C.currentStyle){E=C.currentStyle[D]}else{if(window.getComputedStyle){var B=document.defaultView.getComputedStyle(C,"");E=B?B.getPropertyValue(D):null}else{if(C.style){E=C.style[D]}}}if(D=="opacity"){return E?parseFloat(E):1}return E=="auto"?null:E},hasClassName:function(B,C){if(!(B=$$(B))){return}var D=B.className;return(D.length>0&&(D==C||new RegExp("(^|\\s)"+C+"(\\s|$)").test(D)))},hide:function(B){if(!(B=$$(B))){return}if(B.style.display=="inline"){this.addClassName(B,"wasinline")}else{if(B.style.display=="block"){this.addClassName(B,"wasblock")}else{if(B.style.display=="list-item"){this.addClassName(B,"waslistitem")}}}B.style.display="none";return B},positionedOffset:function(C){var B=0,E=0;do{B+=C.offsetTop||0;E+=C.offsetLeft||0;C=C.offsetParent;if(C){if(C.tagName=="BODY"){break}var D=Element.getStyle(C,"position");if(D!=="static"){break}}}while(C);return Element._returnOffset(E,B)},readAttribute:function(D,B){D=$$(D);if(Browser.msie){var C={names:{"class":"className","for":"htmlFor"},values:{style:function(E){return E.style.cssText.toLowerCase()},title:function(E){return E.title}}};if(C.values[B]){return C.values[B](D,B)}if(C.names[B]){B=C.names[B]}if(B.include(":")){return(!D.attributes||!D.attributes[B])?null:D.attributes[B].value}}return D.getAttribute(B)},remove:function(B){B=$$(B);B.parentNode.removeChild(B);return B},removeClassName:function(B,C){if(!(B=$$(B))){return}B.className=B.className.replace(new RegExp("(^|\\s+)"+C+"(\\s+|$)")," ").strip();return B},scrollTo:function(B,G,C){var H=function(K){return typeof K=="object"?K:{top:K,left:K}};var I=function(){return B.map(function(){var L=arguments[0],K=!L.nodeName||$A(["iframe","#document","html","body"]).indexOf(L.nodeName.toLowerCase())>0;if(!K){return L}var M=(L.contentWindow||L).document||L.ownerDocument||L;return Browser.safari||M.compatMode=="BackCompat"?M.body:M.documentElement})};var E=function(L){for(var K in L){if(typeof L[K]=="string"){var M=L[K].indexOf("px");if(M>0){L[K]=L[K].substring(0,M)}}}};var D={axis:"xy",margin:false,offset:0,over:0};C=mySpaceTv.extend(mySpaceTv.extend({},D),arguments[2]||{});C.offset=H(C.offset);C.over=H(C.over);if(!B.length){B=new Array(B)}if(G=="max"){G=9000000000}var J=I();for(var F=0;F<J.length;F++){(function(){var Q=J[F],M=$$(Q),P=G,L,K={},R=/^body|html$/i.test(Q.tagName)?true:false;switch(typeof P){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px)?$/.test(P)){P=H(P);E(P);break}P=$CSS(P)[0];case"object":if(P.nodeName){P=$$(P);L=Element.cumulativeOffset(P)}else{E(P)}}var O=C.axis.split("");for(var N=0;N<O.length;N++){(function(W){var X=W=="x"?"Left":"Top",Y=X.toLowerCase(),V="scroll"+X,T=Q[V],U=W=="x"?"Width":"Height";if(L){K[V]=L[Y]+(R?0:0-Element.cumulativeOffset(Q)[Y]);if(C.margin){K[V]-=parseInt(Element.getStyle(P,"margin"+X))||0;K[V]-=parseInt(Element.getStyle(P,"border"+X+"Width"))||0}K[V]+=C.offset[Y]||0;if(C.over[Y]){K[V]+=Element.getDimensions(P)[U.toLowerCase()]*C.over[Y]}}else{K[V]=P[Y]}if(/^\d+$/.test(K[V])){K[V]=K[V]<=0?0:Math.min(K[V],S(U))}M[V]=K[V];function S(d){var a="scroll"+d;if(!R){return Q[a]}var c="client"+d,b=Q.ownerDocument.documentElement,Z=Q.ownerDocument.body;return Math.max(b[a],Z[a])-Math.min(b[c],Z[c])}})(O[N])}})()}},show:function(B){if(!(B=$$(B))){return}if(this.hasClassName(B,"wasinline")){B.style.display="inline";this.removeClassName(B,"wasinline")}else{if(this.hasClassName(B,"wasblock")){B.style.display="block";this.removeClassName(B,"block")}else{if(this.hasClassName(B,"waslistitem")){B.style.display="list-item";this.removeClassName(B,"waslistitem")}else{B.style.display=mySpaceTv.getDisplayStyleByTagName(B)}}}return B},toggle:function(B){B=$$(B);Element[Element.visible(B)?"hide":"show"](B);return B},toggleClassName:function(B,C){if(!(B=$$(B))){return}if(this.hasClassName(B,C)){this.removeClassName(B,C)}else{this.addClassName(B,C)}return B},viewportOffset:function(E){var B=0,D=0;var C=E;do{B+=C.offsetTop||0;D+=C.offsetLeft||0;if(C.offsetParent==document.body&&this.getStyle(C,"position")=="absolute"){break}}while(C=C.offsetParent);C=E;do{if(!Browser.opera||C.tagName=="BODY"){B-=C.scrollTop||0;D-=C.scrollLeft||0}}while(C=C.parentNode);return Element._returnOffset(D,B)},visible:function(B){if(!(B=$$(B))){return}if(this.getStyle(B,"visibility")=="hidden"||this.getStyle(B,"display")=="none"){return false}else{return true}},writeAttribute:function(F,D,G){F=$$(F);var C={},E={names:{className:"class",htmlFor:"for"},values:{}};if(Browser.msie){E={names:mySpaceTv.extend({cellpadding:"cellPadding",cellspacing:"cellSpacing"},E.names),values:{checked:function(H,I){H.checked=!!I},style:function(H,I){H.style.cssText=I?I:""}}}}if(typeof D=="object"){C=D}else{C[D]=(typeof G=="undefined")?true:G}for(var B in C){D=E.names[B]||B;G=C[B];if(E.values[B]){D=E.values[B](F,G)}if(G===false||G===null){F.removeAttribute(D)}else{if(G===true){F.setAttribute(D,D)}else{F.setAttribute(D,G)}}}return F},_endMarker:function(){alert("end")}}}();Element._returnOffset=function(B,C){var A=[B,C];A.left=B;A.top=C;return A};if(Browser.msie){Element.getStyle=function(A,B){A=$$(A);B=(B=="float"||B=="cssFloat")?"styleFloat":B.camelize();var C=A.style[B];if(!C&&A.currentStyle){C=A.currentStyle[B]}if(B=="opacity"){if(C=(A.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(C[1]){return parseFloat(C[1])/100}}return 1}if(C=="auto"){if((B=="width"||B=="height")&&(A.getStyle("display")!="none")){return A["offset"+B.capitalize()]+"px"}return null}return C};Element.setOpacity=function(B,E){function F(G){return G.replace(/alpha\([^\)]*\)/gi,"")}B=$$(B);var A=B.currentStyle;if((A&&!A.hasLayout)||(!A&&B.style.zoom=="normal")){B.style.zoom=1}var D=B.getStyle("filter"),C=B.style;if(E==1||E===""){(D=F(D))?C.filter=D:C.removeAttribute("filter");return B}else{if(E<0.00001){E=0}}C.filter=F(D)+"alpha(opacity="+(E*100)+")";return B}}else{if(Browser.safari){Element.setOpacity=function(A,B){A=$$(A);A.style.opacity=(B==1||B==="")?"":(B<0.00001)?0:B;if(B==1){if(A.tagName=="IMG"&&A.width){A.width++;A.width--}else{try{var D=document.createTextNode(" ");A.appendChild(D);A.removeChild(D)}catch(C){}}}return A}}}document.viewport={getDimensions:function(){var C={};var G=Browser;var F=["width","height"];for(var A=0;A<F.length;A++){var E=F[A].capitalize();C[F[A]]=(G.safari&&!document.evaluate)?self["inner"+E]:(G.opera)?document.body["client"+E]:document.documentElement["client"+E]}return C},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};Object.Event={extend:function(A){A._objectEventSetup=function(B){this._observers=this._observers||{};this._observers[B]=this._observers[B]||[]};A.observe=function(D,B){if(typeof(D)=="string"&&typeof(B)!="undefined"){this._objectEventSetup(D);if(!this._observers[D].indexOf(B)>-1){this._observers[D].push(B)}}else{for(var C in D){this.observe(C,D[C])}}};A.stopObserving=function(C,B){this._objectEventSetup(C);if(C&&B){this._observers[C]=this._observers[C].without(B)}else{if(C){this._observers[C]=[]}else{this._observers={}}}};A.observeOnce=function(D,C){var B=function(){C.apply(this,arguments);this.stopObserving(D,B)}.bind(this);this._objectEventSetup(D);this._observers[D].push(B)};A.notify=function(F){this._objectEventSetup(F);var D=[];var B=$A(arguments).slice(1);try{for(var C=0;C<this._observers[F].length;++C){D.push(this._observers[F][C].apply(this._observers[F][C],B)||null)}}catch(E){if(E==$break){return false}else{throw E}}return D};if(A.prototype){A.prototype._objectEventSetup=A._objectEventSetup;A.prototype.observe=A.observe;A.prototype.stopObserving=A.stopObserving;A.prototype.observeOnce=A.observeOnce;A.prototype.notify=function(F){if(A.notify){var B=$A(arguments).slice(1);B.unshift(this);B.unshift(F);A.notify.apply(A,B)}this._objectEventSetup(F);var B=$A(arguments).slice(1);var D=[];try{if(this.options&&this.options[F]&&typeof(this.options[F])=="function"){D.push(this.options[F].apply(this,B)||null)}for(var C=0;C<this._observers[F].length;++C){D.push(this._observers[F][C].apply(this._observers[F][C],B)||null)}}catch(E){if(E==$break){return false}else{throw E}}return D}}}};var VidImages=function(){var C;var A="http://x.myspacecdn.com/modules/videos/static/img/mysubs/no-thumbnail.gif";var B="http://x.myspacecdn.com/modules/common/static/img/no_pic.gif";return{imageError:function(E,D){E=typeof(E)=="string"?$$(E):E;E.src=D;E.onload=null},imageLoad:function(G,D,F,E){G=typeof(G)=="string"?$$(G):G;if(G.width<=5||G.height<=5){G.src=E;G.onload=null;return}mySpaceTv.adjustImage(G,D,F);G.onload=null;G.onerror=null},perr:function(D){this.imageError(D,B)},pload:function(F,D,E){this.imageLoad(F,D,E,B)},verr:function(D){this.imageError(D,A)},vload:function(F,D,E){this.imageLoad(F,D,E,A)}}}();function perr(A){VidImages.perr.call(VidImages,A)}function pload(C,A,B){VidImages.pload.call(VidImages,C,A,B)}function verr(A){VidImages.verr.call(VidImages,A)}function vload(C,A,B){VidImages.vload.call(VidImages,C,A,B)}var mySpaceTv=new MySpaceTv();mySpaceTv.addEvent(window,"unload",mySpaceTv.eventCacheFlush.bind(mySpaceTv));function MySpaceTvAjax(){}MySpaceTvAjax.prototype.ajaxUrl="/index.cfm";MySpaceTvAjax.prototype.localize={subscribe_success:"You've now subscribed!",unsubscribe_success:"You've now unsubscribed!"};MySpaceTvAjax.prototype.init=function(A){MySpaceTvAjax.prototype.localize=mySpaceTv.extend(mySpaceTv.extend({},MySpaceTvAjax.prototype.localize),A||{})};MySpaceTvAjax.prototype.subscribeChannel=function(channelId,displayTagId,handlerAction,hash,callback){var url="/index.cfm";var postVarsArray=new Array(4);var postVars;for(var i=0;i<postVarsArray.length;i++){postVarsArray[i]=new Array(2)}postVarsArray[0][0]="fuseaction";postVarsArray[0][1]="vids.ajaxAction";postVarsArray[1][0]="action";postVarsArray[1][1]=handlerAction;postVarsArray[2][0]="id";postVarsArray[2][1]=channelId;postVarsArray[3][0]="h";postVarsArray[3][1]=hash;postVars=mySpaceTv.createPostVars(postVarsArray);mySpaceTv.getAjaxRequest(url+"?"+postVars,function(response){var json=eval("("+response+")");if(!json.ServerResponse.IsRequestSuccessful){alert(json.ServerResponse.DisplayText)}else{if(handlerAction=="SUBSCRIBECHANNEL"){alert(MySpaceTvAjax.prototype.localize.subscribe_success)}else{alert(MySpaceTvAjax.prototype.localize.unsubscribe_success)}var successMsg=MySpaceTv.prototype.$("tv_usr_info_subscribe");successMsg.innerHTML='<span class="successfulRequest">'+json.ServerResponse.DisplayText+"</span>"}})};MySpaceTvAjax.prototype.loginAlert=function(A){if(confirm(A)){return mySpaceTv.enforceLogin()}else{return}};MySpaceTvAjax.prototype.flagVideoAsInappropriate=function(videoId,displayTagId,hash){var url=MySpaceTvAjax.prototype.ajaxUrl;var postVarsArray=new Array(4);var postVars;for(var i=0;i<postVarsArray.length;i++){postVarsArray[i]=new Array(2)}postVarsArray[0][0]="fuseaction";postVarsArray[0][1]="vids.ajaxAction";postVarsArray[1][0]="action";postVarsArray[1][1]="FLAGVIDEO";postVarsArray[2][0]="videoId";postVarsArray[2][1]=videoId;postVarsArray[3][0]="h";postVarsArray[3][1]=hash;postVars=mySpaceTv.createPostVars(postVarsArray);mySpaceTv.getAjaxRequest(url+"?"+postVars,function(response){var json=eval("("+response+")");if(json.ServerResponse.IsRequestSuccessful){MySpaceTv.prototype.$("hypReportAbuse").style.display="none"}else{alert(json.ServerResponse.DisplayText)}})};var mySpaceTvAjax=new MySpaceTvAjax();Type.registerNamespace("MySpace");MySpace.Slider=function(A){MySpace.Slider.initializeBase(this);this.animationType="quadInOut";this.animationDuration=0.5;this.animationFPS=20;this.duration=0.5;this.axis="x";this.event="click";this.start=0;this.step=1;this.lock=true;this.cycle=true;this.constant=false;this.prev=null;this.next=null;this.source=null;this.target=null;this.navigation=null;this.interval=0;this.lazy=false;this.stop=false;this.force=false;this.itemselector=null;this.onBefore=function(){};this.exclude=0};MySpace.Slider.prototype={initialize:function(){var B=MySpace.Utils.Selector;this.context=this.source?B.query(this.source)[0]:document;this.$pane=B.query(this.target||this,this.context);if(this.$pane){this.pane=this.$pane[0]}this.active=this.start;this.auto=this.interval;this.nav=this.navigation;this.timer;this._animation=$create(MySpace.UI.Effects.LengthAnimation,{target:this.pane,property:"scrollLeft",startValue:0,endValue:0,duration:this.animationDuration,fps:this.animationFPS,unit:0,easingFunction:MySpace.UI.Effects.Easing[this.animationType]});if(!this.lazy){this.items=this.getItems()}if(this.force){this.jump({},this.active)}var C=B.query(this.prev||[],this.context);for(var A=0;A<C.length;A++){$addHandler(C[A],this.event,Function.createDelegate(this,this.movePrev))}C=B.query(this.next||[],this.context);for(var A=0;A<C.length;A++){$addHandler(C[A],this.event,Function.createDelegate(this,this.moveNext))}},scrollTo:function(K,R,A){if(typeof A=="object"){settings=A;A=0}A=A||this.speed||this.duration;this.queue=this.queue&&this.axis.length>1;if(this.queue){A/=2}this.offsets=this.both(this.offsets);this.over=this.both(this.over);var P=$get(K),I=$get(R),D,L={},E=false;if(typeof K!="string"){P=K}if(typeof R!="string"){I=R}switch(typeof I){case"number":case"string":if(/^([+-]=)?\d+(px)?$/.test(I)){I=both(I);break}I=$(I,this);case"object":if(I.style){D=this.offset(I)}}var O,G=this.axis.split("");for(O=0;O<G.length;O++){var C=G[O];var J=C=="x"?"Left":"Top",H=J.toLowerCase(),S="scroll"+J,Q=P[S],B=C=="x"?"Width":"Height",M=B.toLowerCase();if(D){L[S]=D[H]+(E?0:Q-this.offset(P)[H]);if(this.margin){L[S]-=parseInt(I.style["margin"+J])||0;L[S]-=parseInt(I.style["border"+J+"Width"])||0}L[S]+=this.offsets[H]||0;if(this.over[H]){L[S]+=I[M]()*this.over[H]}}else{L[S]=I[H]}if(/^\d+$/.test(L[S])){L[S]=L[S]<=0?0:Math.min(L[S],N(B))}if(!O&&this.queue){if(Q!=L[S]){F(this.onAfterFirst)}delete L[S]}}F(this.onAfter,this._animation);function F(X,V){var W;for(var U in L){V.set_property(""+U+"");W=L[U]}var T=V.get_endValue();if(isNaN(T)){T=0}V.set_endValue(W);V.set_startValue(T);V.set_duration(A);if(!V.get_isPlaying()){V.play()}}function N(T){var U=E?Browser.opera?document.body:document.documentElement:P;return U["scroll"+T]-U["client"+T]}},offset:function(A){var C=0,J=0,D=A,G;if(typeof A=="string"){D=$get(A)}if(D){var L=D.parentNode,I=D,B=D.offsetParent,K=D.ownerDocument,N=false,F=(D.style.position=="fixed")?true:false;if(D.getBoundingClientRect){var H=D.getBoundingClientRect();M(H.left+Math.max(K.documentElement.scrollLeft,K.body.scrollLeft),H.top+Math.max(K.documentElement.scrollTop,K.body.scrollTop));M(-K.documentElement.clientLeft,-K.documentElement.clientTop)}else{M(D.offsetLeft,D.offsetTop);while(B){M(B.offsetLeft,B.offsetTop);if(Browser.mozilla&&!/^t(able|d|h)$/i.test(B.tagName)||Browser.safari&&!N){E(B)}if(!F&&B.style.position=="fixed"){F=true}I=/^body$/i.test(B.tagName)?I:B;B=B.offsetParent}while(L&&L.tagName&&!/^body|html$/i.test(L.tagName)){if(!/^inline|table.*$/i.test(L.style.display)){M(-L.scrollLeft,-L.scrollTop)}if(Browser.mozilla&&L.style.overflow!="visible"){E(L)}L=L.parentNode}if((N&&(F||I.style.position=="absolute"))||(Browser.mozilla&&I.style.position!="absolute")){M(-K.body.offsetLeft,-K.body.offsetTop)}if(F){M(Math.max(K.documentElement.scrollLeft,K.body.scrollLeft),Math.max(K.documentElement.scrollTop,K.body.scrollTop))}}G={top:J,left:C}}function E(O){M(O.style.borderLeftWidth,O.style.borderTopWidth)}function M(O,P){C+=parseInt(O,10)||0;J+=parseInt(P,10)||0}return G},both:function(A){return typeof A=="object"?A:{top:A,left:A}},movePrev:function(A){A.data=this.active-this.step;this.jump(A,this)},moveNext:function(A){A.data=this.active+this.step;this.jump(A,this)},moveJump:function(A){this.jump({},A)},notify:function(B){var A=this.index(B);if(A>-1){this.active=A}},jump:function(G,E){if(!isNaN(E)){G.data=E;E=this.pane}var H=G.data,A,I=G.type,F=this.exclude?this.getItems().slice(0,-this.exclude):this.getItems(),D=F.length,B=F[H],C=this.duration;if(I){G.preventDefault()}if(this.auto){this.clear();timer=setTimeout(this.next,this.interval)}if(!B){A=H<0?0:D-1;if(this.active!=A){H=A}else{if(!this.cycle){return}else{H=D-A-1}}B=F[H]}if(!B){return}if(this.onBefore&&this.onBefore.call(E,G,B,this.$pane,this.getItems(),H)===false){return}if(this.stop){this.$pane.queue("fx",[]).stop()}if(this.constant){C=Math.abs(C/this.step*(this.active-H))}this.scrollTo(this.pane,B,C);this.notify(H)},clear:function(){clearTimeout(timer)},getItems:function(){return MySpace.Utils.Selector.query(this.itemselector,this.pane)},index:function(B){if(!isNaN(B)){return B}var C=this.getItems(),A;while((A=C.index(B))==-1&&B!=this.pane){B=B.parentNode}return A},dispose:function(){}};MySpace.Slider.registerClass("MySpace.Slider",Sys.Component);if(typeof(Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}var Form=function(){var A={input:function(B,C){switch(B.type.toLowerCase()){case"checkbox":case"radio":return this.inputSelector(B,C);default:return this.textarea(B,C)}},inputSelector:function(B,C){if(typeof(C)=="undefined"){return B.checked?B.value:null}else{B.checked=!!C}},textarea:function(B,C){if(typeof(C)=="undefined"){return B.value}else{B.value=C}},select:function(E,B){if(typeof(B)=="undefined"){return this[E.type=="select-one"?"selectOne":"selectMany"](E)}else{var D,G,H=!Object.isArray(B);for(var C=0,F=E.length;C<F;C++){D=E.options[C];G=this.optionValue(D);if(H){if(G==B){D.selected=true;return}}else{D.selected=B.include(G)}}}},selectOne:function(C){var B=C.selectedIndex;return B>=0?this.optionValue(C.options[B]):null},selectMany:function(E){var B=[];var F=E.length;if(!F){return null}for(var D=0;D<F;D++){var C=E.options[D];if(C.selected){B.push(this.optionValue(C))}}return B},optionValue:function(C){var B=false;if(C.hasAttribute){B=C.hasAttribute("value")}else{B=this.hasAttribute(C,"value")}return B?C.value:C.text},hasAttribute:function(B,D){var C=$$(B).getAttributeNode(D);return C&&C.specified}};return{serialize:function(B){B=$$(B);if(!B.disabled&&B.name){var C=this.getValue(B);if(typeof(C)!=undefined){var D={};D[B.name]=C;return Form.toQueryString(D)}}return""},toQueryString:function(D){var B=encodeURIComponent(D.key),C=D.value;if(typeof(C)=="undefined"){return B}return B+"="+encodeURIComponent(C)},getFormFields:function(B){B=$$(B);return mySpaceTv.getElementsByTagNames.apply(B,["input","select","textarea"])},getValue:function(B){B=$$(B);var C=B.tagName.toLowerCase();return A[C](B)},setValue:function(B,C){B=$$(B);var D=B.tagName.toLowerCase();A[D](B,C);return B},clear:function(B){$$(B).value="";return B},present:function(B){return $$(B).value!==""},focus:function(B){if(!(B=$$(B))){return}if(B.autofocus===false||B.autofocus===true){return}B.autofocus=true;if(B.disabled){return}var C=B;while(C&&C.nodeType==1){if(!Element.visible(C)){return}C=C.parentNode}B.focus();return B},select:function(B){$$(B).select();return B},activate:function(B){B=$$(B);try{this.focus(B);if(B.select&&(B.tagName.toLowerCase()!="input")){B.select()}}catch(C){}return B},disable:function(B){B=$$(B);B.blur();if(B.disable){B.disable()}B.disabled=true;return B},enable:function(B){B=$$(B);if(B.enable){B.enable()}B.disabled=false;return B}}}();var mstv_href=window.location.href;var mstv_hashIndex=mstv_href.indexOf("#");if(mstv_hashIndex!=-1){mstv_href=mstv_href.substring(0,mstv_hashIndex)}if(typeof(mstv_container_id)=="undefined"){mstv_container_id="mstv_thread"}var il=function(){return{init:function(){},ei:function(A){A=$$(A);A.src="http://x.myspacecdn.com/modules/common/static/img/no_pic.gif";A.onload=null},li:function(C,A,B){C=$$(C);if(C.width<=5||C.height<=5){C.src="http://x.myspacecdn.com/modules/common/static/img/no_pic.gif";C.onload=null;return}mySpaceTv.adjustImage(C,A,B);C.onload=null;C.onerror=null}}}();(function(){var KEY_BACKSPACE=8;var KEY_DELETE=46;var KEY_LEFT=37;var KEY_UP=38;var KEY_RIGHT=39;var KEY_DOWN=40;var KEY_HOME=36;var KEY_END=35;var ALLOWED_KEYS=[KEY_BACKSPACE,KEY_DELETE,KEY_LEFT,KEY_UP,KEY_RIGHT,KEY_DOWN,KEY_HOME,KEY_END];function MsTvComment(id){this.id=id;this.container=$$("mstv_comment-"+id);this.header=$$("mstv_comment-header-"+id);this.avatar=$$("mstv_avatar-"+id);this.datetime=$$("mstv_time-"+id);this.footer=$$("mstv_comment-footer-"+id);this.flag_span=$$("mstv_post-report-"+id);this.flag_link=$$("mstv_post-report-a-"+id);this.remove=$$("mstv_remove-"+id);this.remove_span=$$("mstv_remove-wrap"+id);this.login_link=$$("mstv_login-link"+id);this.reply_link=$$("mstv_reply-link-"+id);this.avatar_img=$$("mstv_avatar-img-"+id);this.author_id=$$("mstv_author_id-"+id).innerHTML;this.owner_id=$$("mstv_owner_id-"+id).innerHTML}ThreadedComments=function(opts,resources,content,thread){this.localize={post:"Add Comment",discard:"Cancel",exceeded:"Number of characters over the limit: ",remaining:"Remaining character count: ",add:"Adding comment...",delete_confirm:"Are you sure you want to delete this comment?",report_confirm:"Are you sure you want to report this comment as spam?",message:"Type your comment here.",alert1:"Please enter a comment to post.",alert2:"Your comment must have at least 2 characters.",alert3:"The text you entered does not match the text from the image. Please try again.",captcha_enter:"Please enter the text from the image (numbers and letters only, no spaces and not case-sensitive).",captcha_input:"Image Text",login_alert:"You must be logged-in to do that! Do you wish to login?",comment_message:"Type your comment here."};this.options={startRow:6,totalRows:200,currentPage:0,pageSize:5,onClickFunction:"mt.appendPage",maxChars:300,commentDivId:"mstv_comments",numberOfPageLinksToShow:5,videoId:0,isLoggedIn:false,commentClass:"mstv_comment",userId:null,videoAuthorId:null,failedImage:"http://x.myspacecdn.com/modules/common/static/img/no_pic.gif",cDigest:null,releaseId:0};this.captcha={guid:null,url:null};this.eleContent=$$(content);this.eleThread=$$(thread);return this.init(opts,resources)};ThreadedComments.prototype={init:function(opts,resources){mySpaceTv.extend(this.options,arguments[0]||{});mySpaceTv.extend(this.localize,arguments[1]||{});if(this.eleContent){this.eleContent.className="clearfix"}this.initContainerEvents();this.enableForm();this.initComments();return this},initContainerEvents:function(){var post_comment=$$("add_comment_btn");if(post_comment){mySpaceTv.addEvent(post_comment,"click",this.toggleCommentReplyForm.bindAsEventListener(this,"main_comment_top"))}var refreshTop=$$("refreshTopCaptcha");if(refreshTop){mySpaceTv.addEvent(refreshTop,"click",this.refreshCaptcha.bindAsEventListener(this,"main_comment_top_captchaImg"))}var refreshBottom=$$("refreshBottomCaptcha");if(refreshBottom){mySpaceTv.addEvent(refreshBottom,"click",this.refreshCaptcha.bindAsEventListener(this,"main_comment_bottom_captchaImg"))}this.eleTopDiscard=$$("main_comment_top_discard_comment");this.eleTopPost=$$("main_comment_top_add_comment");this.eleBottomDiscard=$$("main_comment_bottom_discard_comment");this.eleBottomPost=$$("main_comment_bottom_add_comment");this.addTextBoxEvents($$("message"));this.addTextBoxEvents($$("message1"))},addTextBoxEvents:function(ele){if(ele){mySpaceTv.addEvent(ele,"focus",this.handleOnFocus.bindAsEventListener(this,ele,this.localize.comment_message));mySpaceTv.addEvent(ele,"blur",this.handleOnBlur.bindAsEventListener(this,ele,this.localize.comment_message));mySpaceTv.addEvent(ele,"keydown",this.onKeyDown.bindAsEventListener(this,this.options.maxChars));if(Browser.msie){mySpaceTv.addEvent(ele,"paste",this.onAfterPaste.bindAsEventListener(this,this.options.maxChars));mySpaceTv.addEvent(ele,"beforepaste",this.onBeforePaste.bindAsEventListener(this))}else{mySpaceTv.addEvent(ele,"input",this.checkForPaste.bindAsEventListener(this,this.options.maxChars))}}},initComments:function(){var p={};var comments=mySpaceTv.getElementsByClassName(this.eleThread,"li",this.options.commentClass);for(var i=0;i<comments.length;i++){var id=comments[i].id.split("-")[1];var post_meta=p[id];var post=new MsTvComment(id);this.addEvents(post)}},addEvents:function(post){if(post.video_link){mySpaceTv.addEvent(post.video_link,"click",this.videoReply.bindAsEventListener(this,post.id))}if(post.reply_link){mySpaceTv.addEvent(post.reply_link,"click",this.printCommentReplyForm.bindAsEventListener(this,post.id))}if(post.remove){mySpaceTv.addEvent(post.remove,"click",this.removePost.bindAsEventListener(this,post))}if(post.flag_link){mySpaceTv.addEvent(post.flag_link,"click",this.report.bindAsEventListener(this,post))}if(post.login_link){mySpaceTv.addEvent(post.login_link,"click",mySpaceTv.enforceLogin.bindAsEventListener(this,post.id))}},showLoading:function(){this.flap.innerHTML="<br/><br/><br/><br/><br/><br/><br/><center><img src='/modules/videos/static/img/mysubs/white_loading.gif'></center>";this.flap.focus()},getEventTarget:function(e){var targ;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType==3){targ=targ.parentNode}return targ},onKeyDown:function(e,max){if(!e){e=window.event}var charCode=e.keyCode;if(ALLOWED_KEYS.indexOf(charCode)<0){var node=e.target;var elt=$$(this.getEventTarget(e));var value=Form.getValue(elt);if(value.length>max-1){mySpaceTv.stopPropagation(e)}else{return true}}},checkForPaste:function(e,max){if(!e){e=window.event}var node=e.target;var elt=$$(this.getEventTarget(e));var value=Form.getValue(elt);if((elt.previousValue&&elt.value.length>elt.previousValue.length+1)||(!elt.previousValue&&elt.value.length>1)){if(value.length>max-1){elt.value=elt.value.substr(0,max);mySpaceTv.stopPropagation(e)}}elt.previousValue=elt.value},onBeforePaste:function(e){mySpaceTv.stopPropagation(e)},onAfterPaste:function(e,max){if(!e){e=window.event}var node=e.target;var elt=$$(this.getEventTarget(e));var value=Form.getValue(elt);mySpaceTv.stopPropagation(e);var oTR=elt.document.selection.createRange();var iInsertLength=max-value.length+oTR.text.length;var sData=window.clipboardData.getData("Text").substr(0,iInsertLength);oTR.text=sData},updateCharCount:function(e,charCount_id,label_id,textArea){if(textArea.value.length>this.options.maxChars){if($$(label_id).innerHTML!=mt.localize.exceeded){$$(label_id).innerHTML=mt.localize.exceeded}$$(charCount_id).value=textArea.value.length-mt.options.maxChars}else{if($$(label_id).innerHTML!=mt.localize.remaining){$$(label_id).innerHTML=mt.localize.remaining}$$(charCount_id).value=mt.options.maxChars-textArea.value.length}},hideCommentReplyForm:function(form_id){Element.hide("mstv_reply-"+form_id);Element.show("mstv_comment-footer-"+form_id)},hideCommentForm:function(form_id){var div_id="mstv_reply-"+form_id;var form=$CSS("#"+div_id+" #message")[0];if(form){form.value=this.localize.message}Element.show(form_id+"_comment");Element.hide(form_id+"_captcha");if(typeof(this.bottomAddCommentOnClick)!=="undefined"){this.eleBottomPost.onclick=this.bottomAddCommentOnClick}},hideTopCommentForm:function(form_id){var div_id="mstv_reply-"+form_id;var form=$CSS("#"+div_id+" #message1")[0];if(form){form.value=this.localize.message}Element.show(form_id+"_comment");Element.hide(form_id+"_captcha");this.hideCommentReplyForm(form_id);if(typeof(this.topAddCommentOnClick)!=="undefined"){this.eleTopPost.onclick=this.topAddCommentOnClick}},toggleCommentReplyForm:function(e,form_id,reply_parent_id){mySpaceTv.stopPropagation(e);if(typeof(form_id)=="string"){var div_id=$$("mstv_reply-"+form_id)}if(div_id.style.display=="block"||div_id.style.display===""&&div_id.className.indexOf("hid")===0){this.hideCommentReplyForm(form_id);return false}else{if(div_id.style.display=="none"||div_id.className.indexOf("hid")!==0){this.showCommentReplyForm(form_id,reply_parent_id);return true}}},showCommentReplyForm:function(form_id,reply_parent_id){if(!this.options.isLoggedIn){if(confirm(this.localize.login_alert)){mySpaceTv.enforceLogin()}return false}var div_id="mstv_reply-"+form_id;Element.hide("mstv_comment-footer-"+form_id);Element.hide("mstv_edit-"+form_id);Element.show(div_id)},printCommentReplyForm:function(e,form_id){mySpaceTv.stopPropagation(e);var div_id="mstv_reply-"+form_id;var reply_comment_form="comment_form"+form_id;var maxCharLabelId="maxCharLabel"+form_id;var charCountId="charCount"+form_id;var discard_visible="";var reply_parent_id;var innerHTMLContent="";if(reply_parent_id&&$$("comment_body_"+reply_parent_id).style.display=="none"){this.displayHideCommentLink(reply_parent_id)}Element.hide("mstv_comment-footer-"+form_id);Element.hide("mstv_edit-"+form_id);mySpaceTv.setInnerHTML(div_id,innerHTMLContent);Element.show(div_id)},handleOnFocus:function(e,el,defaultValue){if(el.value==defaultValue){el.value=""}el.style.color="#333"},handleOnBlur:function(e,el,defaultValue){if(el.value===""){el.value=defaultValue;el.style.color="#888"}else{el.style.color="#333"}},postThreadedComment:function(form_id){var div_id="mstv_reply-"+form_id;var retval=this.validateSubmit(div_id,false,"message1");if(retval){if(this.options.cDigest!==null&&this.options.cDigest!==""){this.nonCaptchaSubmit("message1")}else{this.refreshCaptcha(null,form_id+"_captchaImg");Element.hide(form_id+"_comment");Element.show(form_id+"_captcha");$$(form_id+"_captcha_text").value="";$$(form_id+"_captcha_text").focus();this.topAddCommentOnClick=this.eleTopPost.onclick;this.eleTopPost.onclick=function(event){this.captchaSubmit(form_id,"message1")}.bind(this)}}},postComment:function(form_id){var div_id="mstv_reply-"+form_id;var retval=this.validateSubmit(div_id,false,"message");if(retval){if(this.options.cDigest!==null&&this.options.cDigest!==""){this.nonCaptchaSubmit("message")}else{this.refreshCaptcha(null,form_id+"_captchaImg");Element.hide(form_id+"_comment");Element.show(form_id+"_captcha");$$(form_id+"_captcha_text").value="";$$(form_id+"_captcha_text").focus();this.bottomAddCommentOnClick=this.eleBottomPost.onclick;this.eleBottomPost.onclick=function(event){this.captchaSubmit(form_id,"message")}.bind(this)}}},nonCaptchaSubmit:function(div_id){var form=$$(div_id);var default_message=this.localize.message;if(typeof(form.value)!="undefined"){var message=form.value}else{var message=false}var d=new Date();var ajaxUrl="/index.cfm?fuseaction=vids.ajaxAction&action=ADDVIDEOCOMMENTWITHOUTCAPTCHA&id="+this.options.videoId+"&body="+encodeURIComponent(message)+"&d="+encodeURIComponent(this.options.cDigest)+"&lcaid="+this.options.userId+"&releaseid="+this.options.releaseId+"&"+d.getTime();this.disableForm();mySpaceTv.getAjaxRequest(ajaxUrl,function(xmlHttpReq){var obj=eval("("+xmlHttpReq+")");if(obj.ServerResponse.IsRequestSuccessful){this.enableForm();this.options.totalRows++;this.notify("CommentAdded",this.options.totalRows);this.hideTopCommentForm("main_comment_top");this.appendPage(0,true);form.value=default_message}else{alert(obj.ServerResponse.DisplayText);this.enableForm()}}.bind(this))},captchaSubmit:function(form_id,txtMsg){var div_id="mstv_reply-"+form_id;var default_message=this.localize.message;var form=$$(txtMsg);if(typeof(form.value)!="undefined"){var message=form.value}else{var message=false}var captchaValueEle=$$(form_id+"_captcha_text");if(captchaValueEle){var userCaptchaValue=captchaValueEle.value}if(userCaptchaValue===""||userCaptchaValue.length===0){alert(this.localize.alert3);$$(form_id+"_captcha_text").focus();return false}var d=new Date();var ajaxUrl="/index.cfm?fuseaction=vids.ajaxAction&action=ADDVIDEOCOMMENTWITHCAPTCHA&id="+this.options.videoId+"&body="+encodeURIComponent(message)+"&ctext="+encodeURIComponent(userCaptchaValue)+"&cguid="+encodeURIComponent(this.captcha.guid)+"&lcaid="+this.options.userId+"&releaseid="+this.options.releaseId+"&"+d.getTime();this.disableForm();mySpaceTv.getAjaxRequest(ajaxUrl,function(xmlHttpReq){var obj=eval("("+xmlHttpReq+")");if(obj.ServerResponse.IsRequestSuccessful){Element.show(form_id+"_comment");Element.hide(form_id+"_captcha");this.enableForm();this.options.totalRows++;this.notify("CommentAdded",this.options.totalRows);this.appendPage(0,true);form.value=default_message}else{Element.show(form_id+"_comment");Element.hide(form_id+"_captcha");alert(obj.ServerResponse.DisplayText);this.enableForm()}if(txtMsg=="message1"){if(typeof(this.eleTopPost.onclick)!="undefined"){this.eleTopPost.onclick=function(event){this.postThreadedComment("main_comment_top")}.bind(this)}}if(txtMsg=="message"){if(typeof(this.eleBottomPost.onclick)!="undefined"){this.eleBottomPost.onclick=function(event){this.postComment("main_comment_bottom")}.bind(this)}}}.bind(this))},validateSubmit:function(form_id,is_video,txt){is_video=is_video||false;var form=$$(txt);if(typeof(form.value)!="undefined"){var message=form.value}else{var message=false}if(!is_video){if(message.length>mt.options.maxChars){var alertMsg=this.localize.exceeded+(message.length-mt.options.maxChars);alert(alertMsg);return false}if(message==this.localize.message){alert(this.localize.alert1);return false}else{if(!message||message.length<2){alert(this.localize.alert2);return false}}}return true},report:function(e,post){mySpaceTv.stopPropagation(e);if(!this.options.isLoggedIn){return this.loginAlert()}else{if(confirm(this.localize.report_confirm)){var d=new Date();var ajaxUrl="/index.cfm?fuseaction=vids.ajaxAction&action=MARKVIDEOCOMMENTASSPAM&id="+this.options.videoId+"&commentid="+post.id+"&ownerId="+post.owner_id+"&authorId="+post.author_id+"&releaseid="+this.options.releaseId+"&"+d.getTime();mySpaceTv.getAjaxRequest(ajaxUrl,function(xmlHttpReq){var obj=eval("("+xmlHttpReq+")");if(obj.ServerResponse.IsRequestSuccessful){$$("mstv_post-report-"+post.id).innerHTML=obj.ServerResponse.DisplayText}else{$$("mstv_post-report-"+post.id).innerHTML=obj.ServerResponse.DisplayText}}.bind(this))}}},removePost:function(e,post){mySpaceTv.stopPropagation(e);if(!this.options.isLoggedIn){return this.loginAlert()}else{if(confirm(this.localize.delete_confirm)){var d=new Date();var ajaxUrl="/index.cfm?fuseaction=vids.ajaxAction&action=DELETEVIDEOCOMMENT&id="+this.options.videoId+"&commentid="+post.id+"&ownerId="+post.owner_id+"&authorId="+post.author_id+"&releaseid="+this.options.releaseId+"&"+d.getTime();mySpaceTv.getAjaxRequest(ajaxUrl,function(xmlHttpReq){var obj=eval("("+xmlHttpReq+")");if(obj.ServerResponse.IsRequestSuccessful){this.options.totalRows--;this.notify("CommentRemoved",this.options.totalRows);$$("mstv_remove-wrap-"+post.id).innerHTML=obj.ServerResponse.DisplayText;if(this.options.totalRows%this.options.pageSize==0){this.options.currentPage--}this.appendPage(this.options.currentPage,true)}else{$$("mstv_remove-wrap-"+post.id).innerHTML=obj.ServerResponse.DisplayText}}.bind(this))}}},loginAlert:function(){if(confirm(this.localize.login_alert)){return mySpaceTv.enforceLogin()}else{return false}},appendPage:function(page,forceDb){var comments=mySpaceTv.getElementsByClassName($$(mstv_container_id),"li","mstv_comment");var firstCommentId="";var lastCommentId="";forceDb=forceDb||false;if(comments&&comments.length>0){firstCommentId=comments[0].id.split("-")[1];lastCommentId=comments[comments.length-1].id.split("-")[1]}var div_id=$$(this.options.commentDivId);mySpaceTv.showLoading(div_id);var d=new Date();var forceIt=forceDb?1:0;var ajaxUrl="/index.cfm?fuseaction=vids.ajaxAction&action=GETVIDEOVIEWCOMMENTS&id="+this.options.videoId+"&vaid="+this.options.videoAuthorId+"&rpn="+(this.options.currentPage+1)+"&cpn="+(page+1)+"&lcid="+lastCommentId+"&fcid="+firstCommentId+"&ps="+this.options.pageSize+"&db="+forceIt+"&"+d.getTime();mySpaceTv.getAjaxRequest(ajaxUrl,function(xmlHttpObj){this.options.currentPage=page;$$(this.options.commentDivId).innerHTML=xmlHttpObj;this.initComments()}.bind(this))},refreshCaptcha:function(e,opt_img){mySpaceTv.stopPropagation(e);var d=new Date();var ajaxUrl="/index.cfm?fuseaction=vids.ajaxAction&action=CHECKWHETHERTODISPLAYCAPTCHA&"+d.getTime();mySpaceTv.getAjaxRequest(ajaxUrl,function(xmlHttpReq){var obj=eval("("+xmlHttpReq+")");if(obj.ServerResponse.IsRequestSuccessful){this.captcha.url=obj.ServerResponse.CaptchaUrl;this.captcha.guid=obj.ServerResponse.CaptchaGuid;var l=this.captcha.url.indexOf("localhost");if(l>0){this.captcha.url="http://security.myspace.com"+this.captcha.url.substring(16)}if(opt_img!=+null){$$(opt_img).src=this.captcha.url}}}.bind(this))},disableForm:function(){if(this.options.isLoggedIn){Form.disable(this.eleTopDiscard);Form.disable(this.eleTopPost);Form.disable(this.eleBottomDiscard);Form.disable(this.eleBottomPost);$$("message1").disabled="true";$$("message").disabled="true";this.eleTopDiscard.onclick=null;this.eleTopPost.onclick=null;this.eleBottomDiscard.onclick=null;this.eleBottomPost.onclick=null}},enableForm:function(){if(this.options.isLoggedIn){Form.enable(this.eleTopDiscard);Form.enable(this.eleTopPost);Form.enable(this.eleBottomDiscard);Form.enable(this.eleBottomPost);$$("message1").disabled="";$$("message").disabled="";this.eleTopDiscard.onclick=function(event){this.hideTopCommentForm("main_comment_top")}.bind(this);this.eleTopPost.onclick=function(event){this.postThreadedComment("main_comment_top")}.bind(this);this.eleBottomDiscard.onclick=function(event){this.hideCommentForm("main_comment_bottom")}.bind(this);this.eleBottomPost.onclick=function(event){this.postComment("main_comment_bottom")}.bind(this)}}}})();Object.Event.extend(ThreadedComments);(function(){CommentsTitleBar=function(A,B){this.localize={be_the_first:""};this.options={titleHeaderId:"#ivpComments .tv_titlebar h3 span"};this.eleHeader=$CSS(this.options.titleHeaderId)[0];return this.init(A,B)};CommentsTitleBar.prototype={init:function(A,B){mySpaceTv.extend(this.options,A||{});mySpaceTv.extend(this.localize,B||{});if(typeof(ThreadedComments)!="undefined"){ThreadedComments.observe("CommentRemoved",this.onCommentRemoved.bind(this));ThreadedComments.observe("CommentAdded",this.onCommentAdded.bind(this))}return this},onCommentRemoved:function(A,B){this.eleHeader.innerHTML="("+B+")";if(B===0){var C=$$("mstv_alerts");if(C){C.innerHTML=this.localize.be_the_first;Element.show(C)}}},onCommentAdded:function(C,A){this.eleHeader.innerHTML="("+A+")";if(A===1){var B=$$("mstv_alerts");if(B){Element.hide(B)}}}}})();Object.Event.extend(CommentsTitleBar);var ec=function(){var localize={flag_confirm:"Are you sure you want to flag this video as inappropriate?",login_alert:"You must be logged-in to do that! Do you wish to login?"};var options={videoId:0,isLoggedIn:false,hash:null};var eleReportAbuse;return{init:function(){options=mySpaceTv.extend(mySpaceTv.extend({},options),arguments[0]||{});localize=mySpaceTv.extend(mySpaceTv.extend({},localize),arguments[1]||{});eleReportAbuse=$$("tv_embedcode_reportAbuse")},loginAlert:function(){if(confirm(localize.login_alert)){return mySpaceTv.enforceLogin()}else{return false}},flag:function(){if(!options.isLoggedIn){return this.loginAlert()}else{if(confirm(localize.flag_confirm)){var d=new Date();var ajaxUrl="/index.cfm?fuseaction=vids.ajaxAction&action=FLAGVIDEO&videoId="+options.videoId+"&h="+encodeURIComponent(options.hash)+"&"+d.getTime();mySpaceTv.getAjaxRequest(ajaxUrl,function(xmlHttpReq){var obj=eval("("+xmlHttpReq+")");if(obj.ServerResponse.IsRequestSuccessful){eleReportAbuse.innerHTML='<div class="notice">'+obj.ServerResponse.DisplayText+"</div>"}else{eleReportAbuse.innerHTML='<div class="error">'+obj.ServerResponse.DisplayText+"</div>"}})}}}}}();function MoreUserVideos(){}MoreUserVideos.prototype.muv_carousel=function(){var B={source:"#muv_carousel",target:"#muv_videoslist",itemselector:"li",prev:".leftnav a",next:".rightnav a",axis:"x",lock:true,duration:0.5,start:0,force:false,cycle:false,step:4,lazy:false,exclude:3};var A;var E;var F;var D;var C;return{init:function(){B=mySpaceTv.extend(mySpaceTv.extend({},B),arguments[0]||{});E=$$("muvVideoList_left_enabled");F=$$("muvVideoList_left_disabled");D=$$("muvVideoList_right_enabled");C=$$("muvVideoList_right_disabled");E.style.display="none";F.style.display="block";function I(M){if(M.wrapper_inner){M.wrapper_inner.onmouseout=function(){moreUserVideos.muv_carousel.hidePlayButton(this,M.id);return false}}if(M.wrapper_inner){M.wrapper_inner.onmouseover=function(){moreUserVideos.muv_carousel.showPlayButton(this,M.id);return false}}if(M.play_thumb){M.play_thumb.onclick=function(){moreUserVideos.muv_carousel.playVideo(this,M.id);return false}}if(M.play_title){M.play_title.onclick=function(){moreUserVideos.muv_carousel.playVideo(this,M.id);return false}}}function H(M){this.id=M;this.wrapper_inner=$$("wrapperinner-"+M);this.play_thumb=$$("play-thumb-"+M);this.play_title=$$("play-title-"+M);this.run_time=$$("run-time-"+M)}var G=mySpaceTv.getElementsByClassName($$("muv_videoslist"),"div","muv_VideoEntryInner");if(G.length<5){E.style.display="none";F.style.display="block";D.style.display="none";C.style.display="block"}for(var K=0;K<G.length;K++){var L=G[K].id.split("-")[1];var J=new H(L);I(J)}},create:function(){A=$create(MySpace.Slider,{source:B.source,target:B.target,itemselector:B.itemselector,prev:B.prev,next:B.next,axis:B.axis,lock:B.lock,duration:B.duration,start:B.start,force:B.force,cycle:B.cycle,step:B.step,lazy:B.lazy,exclude:B.exclude,onBefore:function(I,H,G,K,J){E.style.display="block";F.style.display="none";D.style.display="block";C.style.display="none";if(J==0){E.style.display="none";F.style.display="block"}else{if(J==K.length-4){D.style.display="none";C.style.display="block"}}}},null,null)},hidePlayButton:function(G,H){$$("muvVideoPlay-"+H).style.display="none";$$("ve_"+H).style.backgroundColor="#FFFFFF"},showPlayButton:function(G,H){$$("muvVideoPlay-"+H).style.display="block";$$("ve_"+H).style.backgroundColor="#EEEEEE"},playVideo:function(G,H){location.href="http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID="+H}}}();var moreUserVideos=new MoreUserVideos();var vtb=function(){var localize={add_to_profile:"Add to Profile",confirm_add_to_profile:"Are you sure you want to add this to your Profile?",yes:"Yes",no:"No",success_add_to_profile:"You have successfully added this video to your Profile.",return_to_video:"Return to video",goto_myprofile:"Go to My Profile",error_title:"",save_to_favorites:"Save to Favorites",confirm_save_to_favorites:"Are you sure you want to save this as a Favorite?",success_save_to_favorites:"You have successfully added this video to your Favorites.",goto_myfavorites:"Go to My Favorites"};var options={videoId:0,releaseId:0,userId:-1,isLoggedIn:false,rate_hash:null,fav_hash:null,profile_hash:null};var eleReportAbuse;return{init:function(){mySpaceTv.extend(options,arguments[0]||{});mySpaceTv.extend(localize,arguments[1]||{})},addToProfile:function(){mySpaceTv.overlayDialog(localize.add_to_profile,localize.confirm_add_to_profile,[localize.yes,localize.no],localize.no,localize.no,{},this.doAddToProfile.bind(this))},doAddToProfile:function(sender,args){if(args.target.isCancel){return}var d=new Date();var ajaxUrl="/index.cfm?fuseaction=vids.ajaxAction&action=ADDTOPROFILE&videoid="+options.videoId+"&releaseid="+options.releaseId+"&h="+encodeURIComponent(options.profile_hash)+"&"+d.getTime();mySpaceTv.getAjaxRequest(ajaxUrl,function(xmlHttpReq){var json=eval("("+xmlHttpReq+")");if(json.ServerResponse.IsRequestSuccessful){Element.hide("tv_vid_vtb_atp");Element.show("tv_vid_vtb_atp_done");mySpaceTv.overlayDialog(localize.add_to_profile,localize.success_add_to_profile,[localize.return_to_video,localize.goto_myprofile],localize.return_to_video,localize.return_to_video,{},this.addToProfileComplete.bind(this));mySpaceTv.makeBeaconRequest(options.videoId,options.userId,"55","")}else{mySpaceTv.overlayAlert("Error",json.ServerResponse.DisplayText)}}.bind(this))},addToProfileComplete:function(sender,args){if(args.target.isCancel){return}window.location.href="http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendId="+options.userId},saveToFavorites:function(){mySpaceTv.overlayDialog(localize.save_to_favorites,localize.confirm_save_to_favorites,[localize.yes,localize.no],localize.no,localize.no,{},this.doSaveToFavorites.bind(this))},doSaveToFavorites:function(sender,args){if(args.target.isCancel){return}var d=new Date();var ajaxUrl="/index.cfm?fuseaction=vids.ajaxAction&action=SAVETOFAVOURITE&videoid="+options.videoId+"&releaseid="+options.releaseId+"&h="+encodeURIComponent(options.fav_hash)+"&"+d.getTime();mySpaceTv.getAjaxRequest(ajaxUrl,function(xmlHttpReq){var json=eval("("+xmlHttpReq+")");if(json.ServerResponse.IsRequestSuccessful){Element.hide("tv_vid_vtb_stf");Element.show("tv_vid_vtb_stf_done");mySpaceTv.overlayDialog(localize.save_to_favorites,localize.success_save_to_favorites,[localize.return_to_video,localize.goto_myfavorites],localize.return_to_video,localize.return_to_video,null,this.saveToFavoritesComplete.bind(this))}else{mySpaceTv.overlayAlert("Error",json.ServerResponse.DisplayText)}}.bind(this))},saveToFavoritesComplete:function(sender,args){if(args.target.isCancel){return}window.location.href="/index.cfm?fuseaction=vids.myFavorites"},rateVideo:function(rating){var d=new Date();var ajaxUrl="/index.cfm?fuseaction=vids.ajaxAction&action=RATING&videoid="+options.videoId+"&releaseid="+options.releaseId+"&rating="+rating+"&h="+encodeURIComponent(options.rate_hash)+"&"+d.getTime();mySpaceTv.getAjaxRequest(ajaxUrl,function(response){var json=eval("("+response+")");if(json.ServerResponse.IsRequestSuccessful){Element.hide("tv_vid_vtb_ratecontrols");Element.show("tv_vid_vtb_rate_done");if(rating===0){mySpaceTv.makeBeaconRequest(options.videoId,options.userId,"1002","")}else{mySpaceTv.makeBeaconRequest(options.videoId,options.userId,"1001","")}}else{mySpaceTv.overlayAlert("Error",json.ServerResponse.DisplayText)}}.bind(this))},loginAlert:function(){if(confirm(localize.login_alert)){return mySpaceTv.enforceLogin()}else{return false}}}}();(function(){var B=[];var A=function(){for(var D=0;D<B.length;D=D+2){var E=B[D];var C=B[D+1];mySpaceTv.removeEvent(E,"mousedown",C.onActiveEvent);mySpaceTv.removeEvent(E,"mouseup",C.offActiveEvent);mySpaceTv.removeEvent(E,"mouseover",C.onHover);mySpaceTv.removeEvent(E,"mouseout",C.offHover)}};_clearTimeout=function(C){clearTimeout(C);clearInterval(C);return null};ImagelessButton=function(C,D){this.options={};this.el;this.disabled=false;return this.init(C,D)};ImagelessButton.prototype={init:function(C,D){this.el=$$(arguments[0]);this.options=mySpaceTv.extend(mySpaceTv.extend({},this.options),arguments[1]||{});this.onActiveEvent=this.onActive.bindAsEventListener(this);this.offActiveEvent=this.offActive.bindAsEventListener(this);this.onHoverEvent=this.onHover.bindAsEventListener(this);this.offHoverEvent=this.offHover.bindAsEventListener(this);mySpaceTv.addEvent(this.el,"mousedown",this.onActiveEvent);mySpaceTv.addEvent(this.el,"mouseup",this.offActiveEvent);mySpaceTv.addEvent(this.el,"mouseover",this.onHoverEvent);mySpaceTv.addEvent(this.el,"mouseout",this.offHoverEvent);B.push(this.el,this);this.el.disable=this.disable.bind(this);this.el.enable=this.enable.bind(this);return this},disable:function(){Element.addClassName(this.el,"tv-imageless-button-disabled");this.disabled=true},enable:function(){Element.removeClassName(this.el,"tv-imageless-button-disabled");this.disabled=false},onHover:function(){if(!this.disabled){Element.addClassName(this.el,"tv-imageless-button-hover")}},offHover:function(){if(!this.disabled){Element.removeClassName(this.el,"tv-imageless-button-hover")}},onFocus:function(){if(!this.disabled){Element.addClassName(this.el,"tv-imageless-button-focused")}},offFocus:function(){if(!this.disabled){Element.removeClassName(this.el,"tv-imageless-button-focused")}},onActive:function(){if(!this.disabled){Element.addClassName(this.el,"tv-imageless-button-active")}},offActive:function(){if(!this.disabled){Element.removeClassName(this.el,"tv-imageless-button-active")}}};ImagelessButton.removeButtons=function(){A()}})();(function(){var B=[];var A=function(){for(var D=0;D<B.length;D=D+2){var E=B[D];var C=B[D+1];mySpaceTv.removeEvent(E,"mousedown",C.onActiveEvent);mySpaceTv.removeEvent(E,"mouseup",C.offActiveEvent);mySpaceTv.removeEvent(E,"mouseover",C.onHover);mySpaceTv.removeEvent(E,"mouseout",C.offHover)}};_clearTimeout=function(C){clearTimeout(C);clearInterval(C);return null};ImageButton=function(C,D){this.options={};this.el;this.disabled=false;return this.init(C,D)};ImageButton.prototype={init:function(C,D){this.el=$$(arguments[0]);this.options=mySpaceTv.extend(mySpaceTv.extend({},this.options),arguments[1]||{});this.onActiveEvent=this.onActive.bindAsEventListener(this);this.offActiveEvent=this.offActive.bindAsEventListener(this);this.onHoverEvent=this.onHover.bindAsEventListener(this);this.offHoverEvent=this.offHover.bindAsEventListener(this);mySpaceTv.addEvent(this.el,"mousedown",this.onActiveEvent);mySpaceTv.addEvent(this.el,"mouseup",this.offActiveEvent);mySpaceTv.addEvent(this.el,"mouseover",this.onHoverEvent);mySpaceTv.addEvent(this.el,"mouseout",this.offHoverEvent);B.push(this.el,this);this.el.disable=this.disable.bind(this);this.el.enable=this.enable.bind(this);return this},disable:function(){Element.addClassName(this.el,"tv-image-button-disabled");this.disabled=true},enable:function(){Element.removeClassName(this.el,"tv-image-button-disabled");this.disabled=false},onHover:function(){if(!this.disabled){Element.addClassName(this.el,"tv-image-button-hover")}},offHover:function(){if(!this.disabled){Element.removeClassName(this.el,"tv-image-button-hover")}},onFocus:function(){if(!this.disabled){Element.addClassName(this.el,"tv-image-button-focused")}},offFocus:function(){if(!this.disabled){Element.removeClassName(this.el,"tv-image-button-focused")}},onActive:function(){if(!this.disabled){Element.addClassName(this.el,"tv-image-button-active")}},offActive:function(){if(!this.disabled){Element.removeClassName(this.el,"tv-image-button-active")}}};ImageButton.removeButtons=function(){A()}})();(function(){var A=[];var B=function(){for(var D=0;D<A.length;D=D+2){var E=A[D];var C=A[D+1];E.title=C.content;mySpaceTv.removeEvent(E,"mousemove",C.updateEvent);mySpaceTv.removeEvent(E,"mouseover",C.showEvent);mySpaceTv.removeEvent(E,"mouseout",C.hideEvent)}};_clearTimeout=function(C){clearTimeout(C);clearInterval(C);return null};ImagelessTooltip=function(D,C){this.options={maxWidth:230,delay:50,mouseFollow:true,useClose:false,theme:"canary",width:null,target:null,hook:null,stem:null,useEvents:true};this.eleTarget;this.xCord=0;this.yCord=0;this.eleTooltip;this.initialized=false;this.useHookPositioning=false;this.useStem=false;return this.init(D,C)};ImagelessTooltip.prototype={init:function(){this.options=mySpaceTv.extend(mySpaceTv.extend({},this.options),arguments[1]||{});this.eleTooltip=$$(arguments[0]);this.eleTarget=$$(this.options.target);if(!this.eleTarget){return}if(this.options.width&&this.options.width!=null){this.eleTooltip.style.width=this.options.width}if(this.options.hook&&this.options.hook!=null){this.useHookPositioning=true;if(this.options.hook.location){this.target=$$(this.options.hook.location)}else{this.target=this.eleTarget}}if(this.options.stem&&this.options.stem!=null){this.useStem=true;this.getStemVars()}if(this.options.useEvents){this.updateEvent=this.update.bindAsEventListener(this);this.showEvent=this.show.bindAsEventListener(this);this.hideEvent=this.hide.bindAsEventListener(this);mySpaceTv.addEvent(this.eleTarget,"mouseover",this.showEvent);if(this.options.useClose){var C=$$(arguments[0]+"-close");mySpaceTv.addEvent(C,"click",this.hideEvent);mySpaceTv.addEvent(this.target,"click",this.hideEvent)}else{mySpaceTv.addEvent(this.eleTarget,"mouseout",this.hideEvent)}}this.content=this.eleTarget.title;this.eleTarget.title="";A.push(this.eleTarget,this);return this},setText:function(C){if(Browser.msie){this.eleTooltip.firstChild.nodeValue=C}else{this.eleTooltip.firstChild.textContent=C}},updateXY:function(C){if(!this.useHookPositioning){if(document.captureEvents){this.xCord=C.pageX;this.yCord=C.pageY}else{if(window.event.clientX){this.xCord=window.event.clientX+document.documentElement.scrollLeft;this.yCord=window.event.clientY+document.documentElement.scrollTop}}}else{this.xCord=Element.cumulativeOffset(this.target).left;this.yCord=Element.cumulativeOffset(this.target).top}},show:function(C){this.updateXY(C);if(!this.initialized){this.timeout=window.setTimeout(this.appear.bind(this),this.options.delay)}},hide:function(){if(this.initialized){if(this.options.mouseFollow&&!this.useHookPositioning){mySpaceTv.removeEvent(this.eleTarget,"mousemove",this.updateEvent)}Element.hide(this.eleTooltip)}_clearTimeout(this.timeout);this.initialized=false},update:function(C){this.updateXY(C);this.setup()},appear:function(){var E=this.stemPosition;var D=this.options.theme;if(!this.eleTooltip){this.eleTooltip=document.createElement("div");this.eleTooltip.className="tv-tooltip tv-tooltip-"+E.y+" corner-all "+D;if(this.useStem){if(this.stemPosition.x=="left"){this.eleTooltip.style.textAlign="left"}else{if(this.stemPosition.x=="right"){this.eleTooltip.style.textAlign="right"}}}var C="	"+this.content+'  <div class="tv-tooltip-pointer-'+E.x+" "+D+'">	  <div class="tv-tooltip-pointer-'+E.x+'-inner">	    <div class=""></div>	  </div>	</div>';this.eleTooltip.innerHTML=C;document.body.insertBefore(this.eleTooltip,document.body.childNodes[0])}else{Element.show(this.eleTooltip)}this.tooltipWidth=Element.getDimensions(this.eleTooltip).width;if(Browser.msie){this.eleTooltip.style.width=this.tooltipWidth+"px"}this.setup();if(this.options.mouseFollow&&!this.useHookPositioning){mySpaceTv.addEvent(this.eleTarget,"mousemove",this.updateEvent)}this.initialized=true},getStemVars:function(){this.stemTarget=this.options.stem.target;this.stemPosition;if(this.stemTarget.startsWith("left")){this.stemPosition={x:"left",y:this.stemTarget.substring(4).toLowerCase()}}else{if(this.stemTarget.startsWith("top")){this.stemPosition={x:"top",y:this.stemTarget.substring(3).toLowerCase()}}else{if(this.stemTarget.startsWith("right")){this.stemPosition={x:"right",y:this.stemTarget.substring(5).toLowerCase()}}else{if(this.stemTarget.startsWith("bottom")){this.stemPosition={x:"bottom",y:this.stemTarget.substring(6).toLowerCase()}}}}}},setup:function(){if(this.tooltipWidth>this.options.maxWidth){this.eleTooltip.style.width=this.options.maxWidth+"px"}if(!this.useHookPositioning){if(this.xCord+this.tooltipWidth>=Element.getDimensions(document.body).width){this.options.align="right";this.xCord=this.xCord-this.tooltipWidth+20}}else{var F=this.getHookElementPos(this.target,this.options.hook.target);var E=this.getHookElementPos(this.eleTooltip,this.options.hook.tip);var C=this.xCord;var G=this.yCord;C+=F.x;G+=F.y;C-=E.x;G-=E.y;if(this.options.hook.offset){C+=this.options.hook.offset.x;G+=this.options.hook.offset.y}if(this.useStem){var D=this.getStemOffset();C-=D.x;G-=D.y}this.xCord=C;this.yCord=G}this.eleTooltip.style.left=this.xCord+"px";this.eleTooltip.style.top=this.yCord+"px"},getHookElementPos:function(C,E){var D=Element.getDimensions(C);if(E.startsWith("top")){if(E.endsWith("Left")){return{x:0,y:0}}else{if(E.endsWith("Middle")){return{x:Math.round(D.width/2),y:0}}else{if(E.endsWith("Right")){return{x:D.width,y:0}}}}}else{if(E.startsWith("right")){if(E.endsWith("Top")){return{x:D.width,y:0}}else{if(E.endsWith("Middle")){return{x:D.width,y:Math.round(D.height/2)}}else{if(E.endsWith("Bottom")){return{x:D.width,y:D.height}}}}}else{if(E.startsWith("bottom")){if(E.endsWith("Right")){return{x:D.width,y:D.height}}else{if(E.endsWith("Middle")){return{x:Math.round(D.width/2),y:D.height}}else{if(E.endsWith("Left")){return{x:0,y:D.height}}}}}else{if(E.startsWith("left")){if(E.endsWith("Bottom")){return{x:0,y:D.height}}else{if(E.endsWith("Middle")){return{x:0,y:Math.round(D.height/2)}}else{if(E.endsWith("Top")){return{x:0,y:0}}}}}}}}},getStemOffset:function(){var C;if(this.stemPosition.x=="left"){C={x:-14,y:0}}else{if(this.stemPosition.x=="right"){C={x:14,y:0}}else{if(this.stemPosition.x=="top"){C={x:0,y:-14}}else{if(this.stemPosition.x=="bottom"){C={x:0,y:14}}}}}return C}};ImagelessTooltip.removeTips=function(){B()}})();