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 VideoWallCache={};var CurrentChannelID={};function clickChannel(H,I,M){var K=H+"_clist";var C=document.getElementById(K);var E=C.getElementsByTagName("a");var D;for(D=0;D<E.length;D++){var N=E[D];if(N.id==M){N.className="tv_splash_vmenu_fc_selected"}else{N.className=""}if(D==(E.length-1)){N.className=N.className+" tv_fv_vmenu_last_item"}}var F=null;if(this.VideoWallCache[H]){F=this.VideoWallCache[H][I];if(F&&(new Date()>=F.expire)){F=null}}if(F){if(F.channelID!=CurrentChannelID[H]){_onGetContentComplete(F.response,[H,I])}}else{var B="featuredvideostab_";var G=H.substring(B.length);var L=getHandlerUrl();var A="action=fvcd&tabid="+G+"&channelid="+I;var J=L+"?"+A;MySpace.WebRequest.invoke(J,true,"",Function.createDelegate(this,_onGetContentComplete),Function.createDelegate(this,_onGetContentFail),[H,I],0)}}function _onGetContentComplete(B,A){try{var K=getSuccessCodeFromHandlerResponse(B);if(!K){_clearVideoWall(F);return}var F=A[0];var G=A[1];var L=B.getElementsByTagName("markup");var M=L[0].text;if(M==null){M=L[0].textContent}var H=F+"_allclink";var I=document.getElementById(H);I.innerHTML=M;var E=B.getElementsByTagName("data");var C=E[0].text;if(C==null){C=E[0].textContent}var J=F+"_VideoWall";currentFeaturedVideosVideoWallData[J]=C;setCurrentFeaturedVideosVideoWallData(J);CacheVideoWallData(F,G,B);CurrentChannelID[F]=G}catch(D){}}function CacheVideoWallData(C,D,B){var A=new Date();A.setTime(A.getTime()+120000);if(!this.VideoWallCache[C]){this.VideoWallCache[C]=new Array()}var E=this.VideoWallCache[C];if(!E[D]){E[D]={response:B,expire:A,channelID:D}}}function _onGetContentFail(A){try{var C=A[0];var D=A[1];_clearVideoWall(C)}catch(B){}}function _clearVideoWall(A){var B=A+"_VideoWall";currentFeaturedVideosVideoWallData[B]="";getVideoWall(B).clearData()}function getVideoWall(A){return document[A]}function getHandlerUrl(){var A="/modules/videos/services/SplashPageAjaxCall.ashx";return A}function getSuccessCodeFromHandlerResponse(A){var C=A.getElementsByTagName("response");if(C&&(C.length>0)){var D=C[0];var B=D.getAttribute("success");if(B.toLowerCase()=="true"){return true}}return false}var pc=function(){var B={all:"All",videos:"Videos"};var D={source:"#tv_pop-channels-carousel",target:"#tv_pop-channels-videolist",itemselector:"li",prev:".leftnav a",next:".rightnav a",axis:"x",lock:true,duration:0.5,start:0,force:false,cycle:false,step:2,lazy:false,exclude:1};var C;var G;var H;var F;var E;var A;return{init:function(){D=mySpaceTv.extend(mySpaceTv.extend({},D),arguments[0]||{});B=mySpaceTv.extend(mySpaceTv.extend({},B),arguments[1]||{});G=$$("tv_pop-channels-left-enabled");H=$$("tv_pop-channels-left-disabled");F=$$("tv_pop-channels-right-enabled");E=$$("tv_pop-channels-right-disabled");A=$$("tv_pop-channels-carousel");this.hookEvents()},create:function(){C=$create(MySpace.Slider,{source:D.source,target:D.target,itemselector:D.itemselector,prev:D.prev,next:D.next,axis:D.axis,lock:D.lock,duration:D.duration,start:D.start,force:D.force,cycle:D.cycle,step:D.step,lazy:D.lazy,exclude:D.exclude,onBefore:function(K,J,I,M,L){G.style.display="block";H.style.display="none";F.style.display="block";E.style.display="none";if(L==0){G.style.display="none";H.style.display="block"}else{if(L==M.length-2){F.style.display="none";E.style.display="block"}}}},null,null)},hookEvents:function(){function J(O){if(O.wrapper_inner){O.wrapper_inner.onmouseout=function(){pc.hidePlayButton(this,O.id);return false}}if(O.wrapper_inner){O.wrapper_inner.onmouseover=function(){pc.showPlayButton(this,O.id);return false}}if(O.play_thumb){O.play_thumb.onclick=function(){pc.playVideo(this,O.id);return false}}if(O.play_title){O.play_title.onclick=function(){pc.playVideo(this,O.id);return false}}}function M(P,O){this.id=P;this.play_thumb=$$("play-thumb-"+P);this.play_title=$$("play-title-"+P);if(typeof(O)!=="undefined"){this.authorId=O;this.wrapper_inner=$$("wrapperinner-"+P+"-"+O);this.author_profile=$$("author-profile-"+P+"-"+O);this.gotovideo=$$("play-video-"+P)}else{this.wrapper_inner=$$("wrapperinner-"+P)}}var I=mySpaceTv.getElementsByClassName($$("tv_pop-channels-carousel"),"div","v120WrapperInner");if(I.length>4){G.style.display="none";H.style.display="block";F.style.display="block";E.style.display="none"}else{G.style.display="none";H.style.display="none";F.style.display="none";E.style.display="none"}for(var L=0;L<I.length;L++){var N=I[L].id.split("-")[1];var K=new M(N);J(K)}},hidePlayButton:function(I,J){$$("play120-"+J).style.display="none"},showPlayButton:function(I,J){$$("play120-"+J).style.display="block"},playVideo:function(I,J){location.href="http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID="+J},st:function(T){var K=$$("pctab_"+T);if(K&&A){K.appendChild(A);A.style.display="block";G.style.display="none";H.style.display="none";F.style.display="none";E.style.display="none"}this.getData(T);var U="";var I="";var N=MySpace.Utils.Selector.query(".tv_splash_vmenu li a");if(N){for(var O=0;O<N.length;O++){mySpaceTv.removeClass(N[O],"tv_splash_vmenu_selected")}}var J=MySpace.Utils.Selector.query("#pc_"+T+" a");if(J&&J.length==1){mySpaceTv.addClass(J[0],"tv_splash_vmenu_selected")}var Q=MySpace.Utils.Selector.query(".pctab");if(Q&&Q.length>0){for(var O=0;O<Q.length;O++){Q[O].style.display="none"}}var K=$$("pctab_"+T);if(K){K.style.display="block"}var M=MySpace.Utils.Selector.query("#pc_"+T+" a")[0].getAttribute("branding");var P=MySpace.Utils.Selector.query("#tv_spl_pc .header img")[0];if(P){P.src=M}var L=MySpace.Utils.Selector.query("#tv_spl_pc .header a")[0];if(L){L.href="http://vids.myspace.com/index.cfm?fuseaction=vids.channel&channelid="+T}var R=MySpace.Utils.Selector.query("#pc_"+T+" a")[0].getAttribute("title");var S=MySpace.Utils.Selector.query("#tv_spl_pc .footer a")[0];if(S){if(T!="all_channels"){S.innerHTML=B.all+" "+R+" "+B.videos+'<img src="http://x.myspacecdn.com/modules/videos/static/img/splash/pixel.gif">';MySpace.Utils.Selector.query("#tv_spl_pc .footer a")[0].href="http://vids.myspace.com/index.cfm?fuseaction=vids.channel&channelid="+T}else{S.innerHTML=R+'<img src="http://x.myspacecdn.com/modules/videos/static/img/splash/pixel.gif">';MySpace.Utils.Selector.query("#tv_spl_pc .footer a")[0].href="http://vids.myspace.com/index.cfm?fuseaction=vids.channels"}}return false},getData:function(J){mySpaceTv.showLoading("tv_pop-channels-videolist");var K=new Date();var I="/modules/videos/services/splashpageajaxcall.ashx?action=PCCD&channel="+J+"&"+K.getTime();mySpaceTv.getAjaxRequest(I,function(L){$$("tv_pop-channels-videolist").innerHTML=L;pc.hookEvents()})}}}();sc=function(){var G={displaying:"Displaying",of:"of",noPages:"No Pages",page:"Page",novideosfound:"No videos found"};var M={source:"#tv_my-subscriptions-carousel",target:"#tv_my-subscriptions-videolist",itemselector:"li",prev:".leftnav a",next:".rightnav a",axis:"x",lock:true,duration:0.5,start:0,force:false,cycle:false,step:2,lazy:false,exclude:1};var J=0;var L=0;var B=8;var K=2;var I=0;var F=null;var A;var C;var H;var D;var E;return{init:function(){M=mySpaceTv.extend(mySpaceTv.extend({},M),arguments[0]||{});G=mySpaceTv.extend(mySpaceTv.extend({},G),arguments[1]||{});C=$$("tv_my-subscriptions-left-enabled");H=$$("tv_my-subscriptions-left-disabled");D=$$("tv_my-subscriptions-right-enabled");E=$$("tv_my-subscriptions-right-disabled");C.style.display="none";H.style.display="block";function P(U){if(U.wrapper_inner){U.wrapper_inner.onmouseout=function(){sc.hidePlayButton(this,U.id);return false}}if(U.wrapper_inner){U.wrapper_inner.onmouseover=function(){sc.showPlayButton(this,U.id);return false}}if(U.play_thumb){U.play_thumb.onclick=function(){sc.playVideo(this,U.id);return false}}if(U.play_title){U.play_title.onclick=function(){sc.playVideo(this,U.id);return false}}if(U.gotovideo){U.gotovideo.onclick=function(){sc.playVideo(this,U.id);return false}}}function O(V,U){this.id=V;this.play_thumb=$$("play-thumb-"+V);this.play_title=$$("play-title-"+V);if(typeof(U)!=="undefined"){this.authorId=U;this.wrapper_inner=$$("wrapperinner-"+V+"-"+U);this.author_profile=$$("author-profile-"+V+"-"+U);this.gotovideo=$$("play-video-"+V)}else{this.wrapper_inner=$$("wrapperinner-"+V)}}var N=mySpaceTv.getElementsByClassName($$("tv_my-subscriptions-videolist"),"div","v120WrapperInner");for(var R=0;R<N.length;R++){var T=N[R].id.split("-")[1];var S=N[R].id.split("-")[2];var Q=new O(T,S);P(Q)}},create:function(){A=$create(MySpace.Slider,{source:M.source,target:M.target,itemselector:M.itemselector,prev:M.prev,next:M.next,axis:M.axis,lock:M.lock,duration:M.duration,start:M.start,force:M.force,cycle:M.cycle,step:M.step,lazy:M.lazy,exclude:M.exclude,onBefore:function(P,O,N,R,Q){C.style.display="block";H.style.display="none";D.style.display="block";E.style.display="none";if(Q==0){C.style.display="none";H.style.display="block"}else{if(Q==R.length-2){D.style.display="none";E.style.display="block"}}}},null,null)},hidePlayButton:function(N,O){$$("scplay120-"+O).style.display="none"},showPlayButton:function(N,O){$$("scplay120-"+O).style.display="block"},playVideo:function(N,O){location.href="http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID="+O},toggleHelp:function(R,Q,N,O){var P=$$(R);if(!Q){var Q=window.event}if(N!=undefined&&O!=undefined){if(Q.pageX||Q.pageY){posx=Q.pageX;posy=Q.pageY}else{posx=Q.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;posy=Q.clientY+document.body.scrollTop+document.documentElement.scrollTop}P.style.left=(posx-N)+"px";P.style.top=(posy-O)+"px"}if(P.style.display!="none"){mySpaceTv.hideDiv(P)}else{mySpaceTv.showDiv(P)}}}}();var tv=function(){var A={allVideos:"See All Top Videos"};var B={videoDiv:"TopVideos"};return{init:function(){B=mySpaceTv.extend(mySpaceTv.extend({},B),arguments[0]||{});A=mySpaceTv.extend(mySpaceTv.extend({},A),arguments[1]||{});this.hookEvents()},hidePlayButton:function(C,D){$$("play90-"+D).style.display="none"},showPlayButton:function(C,D){$$("play90-"+D).style.display="block"},playVideo:function(C,D){location.href="http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID="+D},getTopVideos:function(C){mySpaceTv.showLoading(B.videoDiv);var E=new Date();var D="/Modules/Videos/Services/SplashPageAjaxCall.ashx?action=4&showFor="+C+"&"+E.getTime();mySpaceTv.getAjaxRequest(D,function(F){$$(B.videoDiv).innerHTML=F;$$("top-videos-more-videos").innerHTML="<h6><a href='/index.cfm?fuseaction=vids.charts&show_for="+C+"'>"+A.allVideos+"&nbsp;<img src='http://x.myspacecdn.com/modules/videos/static/img/tv/spacer.gif'  /></a></h6>";tv.hookEvents()})},hookEvents:function(){function D(I){if(I.wrapper_inner){I.wrapper_inner.onmouseout=function(){tv.hidePlayButton(this,I.id);return false}}if(I.wrapper_inner){I.wrapper_inner.onmouseover=function(){tv.showPlayButton(this,I.id);return false}}if(I.play_thumb){I.play_thumb.onclick=function(){tv.playVideo(this,I.id);return false}}}function G(J,I){this.id=J;this.play_thumb=$$("play-thumb-"+J);this.play_title=$$("play-title-"+J);if(typeof(I)!=="undefined"){this.authorId=I;this.wrapper_inner=$$("wrapperinner-"+J+"-"+I);this.author_profile=$$("author-profile-"+J+"-"+I);this.gotovideo=$$("play-video-"+J)}else{this.wrapper_inner=$$("wrapperinner-"+J)}}var C=mySpaceTv.getElementsByClassName($$("TopVideos"),"div","topVideoItem");for(var F=0;F<C.length;F++){var H=C[F].id.split("-")[1];var E=new G(H);D(E)}}}}();(function(){FeaturedVideosFlap=function(A,B){this.options={flapViewJS:null,flapContainerId:"",dataSource:"",loaded:false};this.flap;this.tabClicked=0;return this.init(A,B)};FeaturedVideosFlap.prototype={init:function(A,C){this.options=mySpaceTv.extend(mySpaceTv.extend({},this.options),arguments[0]||{});this.localize=mySpaceTv.extend(mySpaceTv.extend({},this.localize),arguments[1]||{});Object.Event.extend(this);var B=this.options.flapViewJS;if(typeof(B)!="undefined"){B.observe("beforeChange",this.onBeforeChanging.bind(this));B.observe("afterChange",this.onAfterChanging.bind(this))}this.flap=$$(this.options.flapContainerId);return this},showLoading:function(){this.flap.innerHTML="<br/><br/><br/><br/><br/><br/><br/><center><img src='http://x.myspacecdn.com/modules/videos/static/img/mysubs/white_loading.gif'></center>";this.flap.focus()},showError:function(){},getSuccessCodeFromHandlerResponse:function(D){var B=D.getElementsByTagName("response");if(B&&(B.length>0)){var C=B[0];var A=C.getAttribute("success");if(A.toLowerCase()=="true"){return true}}return false},makeAjaxRequest:function(){var B=new Date();var A="/modules/videos/services/SplashPageAjaxCall.ashx?action=fvtc&tabid="+this.options.dataSource;+"&"+B.getTime();mySpaceTv.getAjaxRequest(A,function(C){var F=String(C);var L;if(Browser.msie){try{L=new ActiveXObject("Microsoft.XMLDOM");L.async="false";L.loadXML(C)}catch(E){}}else{try{parser=new DOMParser();L=parser.parseFromString(C,"text/xml")}catch(E){}}if(!L){return false}var I=this.getSuccessCodeFromHandlerResponse(L);if(!I){this.showError();return}var J=L.getElementsByTagName("markup");var K=J[0].text;if(K==null){K=J[0].textContent}this.flap.innerHTML=K;var G=L.getElementsByTagName("data");if(G.length>0){var H=this.options.flapContainerId+"_VideoWall";if(currentFeaturedVideosVideoWallData[H]==null){var D=G[0].text;if(D==null){D=G[0].textContent}currentFeaturedVideosVideoWallData[H]=D}}}.bind(this))},onBeforeChanging:function(C,B){if(this.options.flapContainerId==C){var A=1}},onAfterChanging:function(B,A){if(this.options.flapContainerId==A){if(this.tabClicked>1||!this.options.loaded){this.showLoading();this.makeAjaxRequest();this.options.loaded=true;this.tabClicked=0}else{this.tabClicked+=1}}}}})();(function(){WhatsBeingWatchedFlap=function(A,B){this.options={flapViewJS:null,flapContainerId:"",dataSource:"",loaded:false,action:""};this.mode=1;this.flap;this.tabClicked=0;return this.init(A,B)};WhatsBeingWatchedFlap.prototype={init:function(A,C){this.options=mySpaceTv.extend(mySpaceTv.extend({},this.options),arguments[0]||{});this.localize=mySpaceTv.extend(mySpaceTv.extend({},this.localize),arguments[1]||{});Object.Event.extend(this);var B=this.options.flapViewJS;if(typeof(B)!="undefined"){B.observe("beforeChange",this.onBeforeChanging.bind(this));B.observe("afterChange",this.onAfterChanging.bind(this))}this.addRefreshHandler();this.flap=$$(this.options.flapContainerId);return this},showLoading:function(){this.flap.innerHTML="<br/><br/><br/><br/><center><img src='http://x.myspacecdn.com/modules/videos/static/img/mysubs/white_loading.gif'></center><br/><br/><br/>";this.flap.focus()},makeAjaxRequest:function(){var B=new Date();var A="/modules/videos/services/SplashPageAjaxCall.ashx?action=wvtc&tabid="+this.options.dataSource+"&userid="+MySpace.ClientContext.UserId+"&mode="+this.mode+"&"+B.getTime();mySpaceTv.getAjaxRequest(A,function(C){this.flap.innerHTML=C;this.addRefreshHandler();this.mode=1}.bind(this))},onBeforeChanging:function(C,B){if(this.options.flapContainerId==C){var A=1}},forceRefresh:function(A){this.showLoading();this.mode=2;this.makeAjaxRequest()},addRefreshHandler:function(){var A=$get("watchedVideosRefresh_"+this.options.dataSource);if(A){mySpaceTv.addEvent(A,"click",this.forceRefresh.bind(this))}},onAfterChanging:function(B,A){if(this.options.flapContainerId==A){if(this.tabClicked>1||!this.options.loaded){this.showLoading();this.makeAjaxRequest();this.options.loaded=true;this.tabClicked=0}else{this.tabClicked+=1}}}}})();(function(){TopVideosHorizontalFlap=function(A,B){this.localize={};this.options={flapViewJS:null,flapContainerId:"",dataSource:"",loaded:false,language:""};this.flap;this.tabClicked=0;return this.init(A,B)};TopVideosHorizontalFlap.prototype={init:function(A,C){this.options=mySpaceTv.extend(this.options,arguments[0]||{});this.localize=mySpaceTv.extend(this.localize,arguments[1]||{});Object.Event.extend(this);var B=this.options.flapViewJS;if(typeof(B)!="undefined"){B.observe("beforeChange",this.onBeforeChanging.bind(this));B.observe("afterChange",this.onAfterChanging.bind(this))}this.flap=$$(this.options.flapContainerId);return this},showLoading:function(){this.flap.innerHTML="<br/><br/><br/><br/><br/><center><img src='http://x.myspacecdn.com/modules/videos/static/img/mysubs/white_loading.gif'></center>";this.flap.focus()},showError:function(){},getSuccessCodeFromHandlerResponse:function(D){var B=D.getElementsByTagName("response");if(B&&(B.length>0)){var C=B[0];var A=C.getAttribute("success");if(A.toLowerCase()=="true"){return true}}return false},makeAjaxRequest:function(){var B=new Date();var A="/index.cfm?fuseaction=vids.ajaxAction&action=GETCHARTSVIDEOS&ds="+this.options.dataSource+"&c="+this.options.language+"&"+B.getTime();mySpaceTv.getAjaxRequest(A,function(C){this.flap.innerHTML=C}.bind(this))},onBeforeChanging:function(C,B){if(this.options.flapContainerId==C){var A=1}},onAfterChanging:function(B,A){if(this.options.flapContainerId==A){if(this.tabClicked>1||!this.options.loaded){this.showLoading();this.makeAjaxRequest();this.options.loaded=true;this.tabClicked=0}else{this.tabClicked+=1}}}}})();(function(){PopularChannelFlap=function(A,B){this.localize={};this.options={flapViewJS:null,flapContainerId:"",dataSource:"",loaded:false};this.flap;this.tabClicked=0;return this.init(A,B)};PopularChannelFlap.prototype={init:function(A,C){this.options=mySpaceTv.extend(this.options,arguments[0]||{});this.localize=mySpaceTv.extend(this.localize,arguments[1]||{});Object.Event.extend(this);var B=this.options.flapViewJS;if(typeof(B)!="undefined"){B.observe("beforeChange",this.onBeforeChanging.bind(this));B.observe("afterChange",this.onAfterChanging.bind(this))}this.flap=$$(this.options.flapContainerId);return this},showLoading:function(){this.flap.innerHTML="<br/><br/><br/><br/><br/><center><img src='http://x.myspacecdn.com/modules/videos/static/img/mysubs/white_loading.gif'></center>";this.flap.focus()},showError:function(){},getSuccessCodeFromHandlerResponse:function(D){var B=D.getElementsByTagName("response");if(B&&(B.length>0)){var C=B[0];var A=C.getAttribute("success");if(A.toLowerCase()=="true"){return true}}return false},makeAjaxRequest:function(){var B=new Date();var A="/index.cfm?fuseaction=vids.ajaxAction&action=GETPOPULARCHANNELVIDEOS&ds="+this.options.dataSource+"&"+B.getTime();mySpaceTv.getAjaxRequest(A,function(C){this.flap.innerHTML=C}.bind(this))},onBeforeChanging:function(C,B){if(this.options.flapContainerId==C){var A=1}},onAfterChanging:function(B,A){if(this.options.flapContainerId==A){if(this.tabClicked>1||!this.options.loaded){this.showLoading();this.makeAjaxRequest();this.options.loaded=true;this.tabClicked=0}else{this.tabClicked+=1}}}}})();(function(){MyVideosVerticalFlap=function(opts,resources){this.options={flapViewJS:null,flapContainerId:"",flapContentContainer:"",flapMainContainerId:"",flapNoRecordsContainerId:"",dataSource:"",loaded:false,action:""};this.mode=1;this.flap;this.mainContainer;this.flapContentContainer;this.flapNoRecordsContainerId;this.tabClicked=0;return this.init(opts,resources)};MyVideosVerticalFlap.prototype={init:function(opts,resources){this.options=mySpaceTv.extend(mySpaceTv.extend({},this.options),arguments[0]||{});this.localize=mySpaceTv.extend(mySpaceTv.extend({},this.localize),arguments[1]||{});Object.Event.extend(this);var fv=this.options.flapViewJS;if(typeof(fv)!="undefined"){fv.observe("beforeChange",this.onBeforeChanging.bind(this));fv.observe("afterChange",this.onAfterChanging.bind(this))}this.flap=$$(this.options.flapContainerId);this.mainContainer=$$(this.options.flapMainContainerId);this.flapContentContainer=$$(this.options.flapContentContainer);this.flapNoRecordsContainerId=$$(this.options.flapNoRecordsContainerId);return this},showLoading:function(){this.mainContainer.innerHTML="<br/><br/><br/><br/><br/><center><img src='http://x.myspacecdn.com/modules/videos/static/img/mysubs/white_loading.gif'></center>";this.mainContainer.focus()},showError:function(){},getSuccessCodeFromHandlerResponse:function(fakeDiv){var elements=fakeDiv.getElementsByTagName("response");if(elements&&(elements.length>0)){var responseElement=elements[0];var successAttribute=responseElement.getAttribute("success");if(successAttribute.toLowerCase()=="true"){return true}}return false},makeAjaxRequest:function(){var d=new Date();var ajaxUrl="/index.cfm?fuseaction=vids.ajaxAction&action=GETMYVIDEOS&ds="+this.options.dataSource+"&"+d.getTime();mySpaceTv.getAjaxRequest(ajaxUrl,function(response){try{var json=eval("("+response+")")}catch(e){}if(typeof(json)=="undefined"){this.mainContainer.innerHTML=response}else{if(!json.ServerResponse.IsRequestSuccessful){Element.hide(this.flapContentContainer);Element.show(this.flapNoRecordsContainerId)}}}.bind(this))},onBeforeChanging:function(current,goingto){if(this.options.flapContainerId==current){var a=1}},onAfterChanging:function(current,goingto){if(this.options.flapContainerId==goingto){if(this.tabClicked>1||!this.options.loaded){this.showLoading();this.makeAjaxRequest();this.options.loaded=true;this.tabClicked=0}else{this.tabClicked+=1}}}}})();(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()}})();var ttSearch;var searchBar=function(){var A;return{init:function(){return this},showErrorMessage:function(B){this.clearErrorTimeout();this.startErrorTimeout(B)},clearErrorTimeout:function(){if(A){window.clearInterval(A)}},startErrorTimeout:function(B){if(typeof(ttSearch)=="undefined"){return false}ttSearch.show();errorTimout=window.setTimeout(function(){ttSearch.hide()},4000)}}}();function showSearchError(A){searchBar.showErrorMessage.call(searchBar,A)}(function(){var A=13;SearchControl=function(C,B){this.localize={defaultSearchText:"",searchError:""};this.options={linkId:"searchSubmit",textId:"searchText",onInputError:null,orig:null};this.eleLink;this.eleText;return this.init(C,B)};SearchControl.prototype={init:function(C,B){this.options=mySpaceTv.extend(this.options,arguments[0]||{});this.localize=mySpaceTv.extend(this.localize,arguments[1]||{});this.eleLink=$$(this.options.linkId);this.eleText=$$(this.options.textId);if(this.eleText){mySpaceTv.addEvent(this.eleText,"keypress",this.textOnKeyPress.bindAsEventListener(this));if(this.localize.defaultSearchText!==""){mySpaceTv.addEvent(this.eleText,"focus",this.onFocus.bind(this));mySpaceTv.addEvent(this.eleText,"blur",this.onBlur.bind(this))}}if(this.eleLink){mySpaceTv.addEvent(this.eleLink,"click",this.subminOnClick.bindAsEventListener(this))}return this},trim:function(B){return B.replace(/^([ \t\r\n\f])*/gi,"")},onFocus:function(){var B=this.trim(this.eleText.value);if(B===this.localize.defaultSearchText){this.eleText.value=""}},onBlur:function(){var B=this.trim(this.eleText.value);if(B.length<1){this.eleText.value=this.localize.defaultSearchText}},textOnKeyPress:function(C){if(!C){C=window.event}var B=C.keyCode;if(B==A){mySpaceTv.stopPropagation(C);this.doSearch(C)}},subminOnClick:function(B){this.doSearch(B)},doSearch:function(C){var D=this.trim(this.eleText.value);if(this.localize.defaultSearchText!==""&&D===this.localize.defaultSearchText){if(this.options.onInputError){this.options.onInputError(this.localize.searchError)}mySpaceTv.stopPropagation(C)}else{if(D===""){mySpaceTv.stopPropagation(C)}else{var B="http://searchservice.myspace.com/index.cfm?fuseaction=sitesearch.results&type=MySpaceTV&submit=+Search+&orig="+this.options.orig+"&qry="+D;window.location.href=B}}}}})();var myVideos=function(){return{init:function(){},imgError:function(A){A=$$(A);A.src="http://x.myspacecdn.com/modules/videos/static/img/mysubs/no-thumbnail.gif";A.onload=null},imgLoad:function(C,A,B){C=$$(C);if(C.width<=5||C.height<=5){C.src="http://x.myspacecdn.com/modules/videos/static/img/mysubs/no-thumbnail.gif";C.onload=null;return}mySpaceTv.adjustImage(C,A,B);C.onload=null;C.onerror=null}}}();(function(){function A(C,B){this.id=C;this.wrapper_inner=$$(B+"-wrapperinner-"+C)}MyVideosCarousel=function(B,C){this.options={source:"",target:"",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,flapContainerId:"",leftEnabledId:"",leftDisabledId:"",rightEnabledId:"",rightDisabledId:"",videoListId:"",playSuffix:"",dataSource:"2",loadingId:"",notLoggedOnId:"",noVideosId:"",hasVideosId:"",loaded:false,isActive:true,pageSize:4,count:0};this.mycarousel;this.eleLeftEnabled;this.eleLeftDisabled;this.eleRightEnabled;this.eleRightDisabled;this.tabClicked=0;return this.init(B,C)};MyVideosCarousel.prototype={init:function(B,C){this.options=mySpaceTv.extend(mySpaceTv.extend({},this.options),arguments[0]||{});this.localize=mySpaceTv.extend(mySpaceTv.extend({},this.localize),arguments[1]||{});this.eleLeftEnabled=$$(this.options.leftEnabledId);this.eleLeftDisabled=$$(this.options.leftDisabledId);this.eleRightEnabled=$$(this.options.rightEnabledId);this.eleRightDisabled=$$(this.options.rightDisabledId);this.disableLeftNav();if(this.options.loaded){if(this.options.count<=this.options.pageSize){this.disableRightNav()}}this.initVideoList();Object.Event.extend(this);return this},create:function(){this.mycarousel=$create(MySpace.Slider,{source:this.options.source,target:this.options.target,itemselector:this.options.itemselector,prev:this.options.prev,next:this.options.next,axis:this.options.axis,lock:this.options.lock,duration:this.options.duration,start:this.options.start,force:this.options.force,cycle:this.options.cycle,step:this.options.step,lazy:this.options.lazy,exclude:this.options.exclude,onBefore:function(D,C,B,F,E){this.enableLeftNav();this.enableRightNav();if(E==0){this.disableLeftNav()}else{if(E==F.length-4){this.disableRightNav()}}}.bind(this)},null,null)},initVideoList:function(){var B=mySpaceTv.getElementsByClassName($$(this.options.videoListId),"div","v120WrapperInner");for(var D=0;D<B.length;D++){var E=B[D].id.split("-")[2];var C=new A(E,this.options.playSuffix);this.addEvents(C)}},enableLeftNav:function(){this.eleLeftEnabled.style.display="block";this.eleLeftDisabled.style.display="none"},disableLeftNav:function(){this.eleLeftEnabled.style.display="none";this.eleLeftDisabled.style.display="block"},enableRightNav:function(){this.eleRightEnabled.style.display="block";this.eleRightDisabled.style.display="none"},disableRightNav:function(){this.eleRightEnabled.style.display="none";this.eleRightDisabled.style.display="block"},addEvents:function(B){if(!this.mouseOutEventsCache){this.mouseOutEventsCache=[]}if(B.wrapper_inner){var D=this.hidePlayButton.bindAsEventListener(this,B.id);this.mouseOutEventsCache.push(D);mySpaceTv.addEvent(B.wrapper_inner,"mouseout",D)}if(!this.mouseOverEventsCache){this.mouseOverEventsCache=[]}if(B.wrapper_inner){var C=this.showPlayButton.bindAsEventListener(this,B.id);this.mouseOverEventsCache.push(C);mySpaceTv.addEvent(B.wrapper_inner,"mouseover",C)}},destroyVideoList:function(){var B=mySpaceTv.getElementsByClassName($$(this.options.videoListId),"div","v120WrapperInner");for(var D=0;D<B.length;D++){var E=B[D].id.split("-")[2];var C=new A(E,this.options.playSuffix);this.removeEvents(C)}},removeEvents:function(B){if(B.wrapper_inner){if(this.mouseOutEventsCache){var D=this.mouseOutEventsCache.shift();mySpaceTv.removeEvent(B.wrapper_inner,"mouseout",D)}}if(B.wrapper_inner){if(this.mouseOverEventsCache){var C=this.mouseOverEventsCache.shift();mySpaceTv.removeEvent(B.wrapper_inner,"mouseover",C)}}},hidePlayButton:function(B,C){$$(this.options.playSuffix+"-play120-"+C).style.display="none";return false},showPlayButton:function(B,C){$$(this.options.playSuffix+"-play120-"+C).style.display="block";return false},clearAllScreens:function(){Element.hide(this.options.notLoggedOnId);Element.hide(this.options.noVideosId);Element.hide(this.options.hasVideosId)},showNotLoggedOnScreen:function(){this.clearAllScreens();Element.show(this.options.notLoggedOnId)},showNoVideosScreen:function(){this.clearAllScreens();Element.show(this.options.noVideosId)},showHasVideosScreen:function(){this.clearAllScreens();Element.show(this.options.hasVideosId)},showLoading:function(){this.showHasVideosScreen();Element.show(this.options.loadingId);Element.hide(this.options.videoListId)},showCarousel:function(){this.showHasVideosScreen();Element.hide(this.options.loadingId);Element.show(this.options.videoListId);if(Browser.msie){}},makeAjaxRequest:function(){var C=new Date();var B="/index.cfm?fuseaction=vids.ajaxAction&action=GETMYVIDEOSCAROUSEL&ds="+this.options.dataSource+"&"+C.getTime();mySpaceTv.getAjaxRequest(B,function(F){var E=String(F);this.destroyVideoList();E.evalScripts();if(retval.ServerResponse.isSuccess){if(retval.ServerResponse.hasVideos){$$(this.options.videoListId).innerHTML=E.stripScripts();this.showCarousel();this.initVideoList();if(retval.ServerResponse.count<=retval.ServerResponse.pageSize){this.disableRightNav()}}else{this.showNoVideosScreen()}}else{var D}}.bind(this))},onBeforeChanging:function(D,C){if(!this.options.isActive){return}if(this.options.flapContainerId==D){var B}},onAfterChanging:function(C,B){if(!this.options.isActive){return}if(this.options.flapContainerId==B){if(this.tabClicked>1||!this.options.loaded){this.showLoading();this.makeAjaxRequest();this.options.loaded=true;this.tabClicked=0}else{this.tabClicked+=1}}}}})();(function(){HotVideosFlap=function(A,B){this.options={flapViewJS:null,flapContainerId:"",dataSource:"",loaded:false};this.flap;this.tabClicked=0;return this.init(A,B)};HotVideosFlap.prototype={init:function(A,C){this.options=mySpaceTv.extend(mySpaceTv.extend({},this.options),arguments[0]||{});this.localize=mySpaceTv.extend(mySpaceTv.extend({},this.localize),arguments[1]||{});Object.Event.extend(this);var B=this.options.flapViewJS;if(typeof(B)!="undefined"){B.observe("beforeChange",this.onBeforeChanging.bind(this));B.observe("afterChange",this.onAfterChanging.bind(this))}this.flap=$$(this.options.flapContainerId);return this},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()},showError:function(){},getSuccessCodeFromHandlerResponse:function(D){var B=D.getElementsByTagName("response");if(B&&(B.length>0)){var C=B[0];var A=C.getAttribute("success");if(A.toLowerCase()=="true"){return true}}return false},makeAjaxRequest:function(){var B=new Date();var A="/modules/videos/services/SplashPageAjaxCall.ashx?action=fvtc&tabid="+this.options.dataSource;+"&"+B.getTime();mySpaceTv.getAjaxRequest(A,function(F){var E=String(F);var G;if(Browser.msie){try{G=new ActiveXObject("Microsoft.XMLDOM");G.async="false";G.loadXML(F)}catch(H){}}else{try{parser=new DOMParser();G=parser.parseFromString(F,"text/xml")}catch(H){}}if(!G){return false}var I=this.getSuccessCodeFromHandlerResponse(G);if(!I){this.showError();return}var D=G.getElementsByTagName("markup");var C=D[0].text;if(C==null){C=D[0].textContent}this.flap.innerHTML=C}.bind(this))},onBeforeChanging:function(C,B){if(this.options.flapContainerId==C){var A=1}},onAfterChanging:function(B,A){if(this.options.flapContainerId==A){if(this.tabClicked>1||!this.options.loaded){this.showLoading();this.makeAjaxRequest();this.options.loaded=true;this.tabClicked=0}else{this.tabClicked+=1}}}}})();(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(){FlapView=function(A,B){this.options={flapViewClass:"flap_view",flapTabHeadersClass:"flap_header",flapPagesClass:"flap_pages",flapPageClass:"flap_page",flapPageActive:"flap_page_active",flapPageIds:[],flapHeaderIds:[],activeFlap:-1,useCookie:false,cookieName:"",cookiePersistance:false,flapHeaderActive:"tv-imageless-button-active"};this.currentFlapIndex;this.el;return this.init(A,B)};FlapView.prototype={init:function(B,C){this.el=$$(arguments[0]);this.options=mySpaceTv.extend(mySpaceTv.extend({},this.options),arguments[1]||{});Object.Event.extend(this);if(this.options.activeFlap>=0){this.currentFlapIndex=this.options.activeFlap;this.showSelectedFlap(this.options.activeFlap)}var D=this.options.flapHeaderIds;for(var A=0;A<D.length;A++){mySpaceTv.addEvent($$(D[A]),"click",this.onFlapClick.bindAsEventListener(this,A))}return this},clearFlaps:function(){var B=this.options.flapHeaderIds;for(var A=0;A<B.length;A++){Element.removeClassName(B[A],this.options.flapHeaderActive)}},clearFlapPages:function(){var B=this.options.flapPageIds;for(var A=0;A<B.length;A++){Element.removeClassName(B[A],this.options.flapPageActive)}},showFirstFlap:function(){this.showSelectedFlap(0)},onFlapClick:function(B,A){this.showSelectedFlap(A)},showSelectedFlap:function(A,C){var D=$$(this.options.flapHeaderIds[A]);var B=$$(this.options.flapPageIds[A]);C=C||false;if(D){this.notifyBeforeFlapChanged(this.options.flapPageIds[this.currentFlapIndex],this.options.flapPageIds[A],C);this.clearFlaps();this.clearFlapPages();Element.addClassName(B,this.options.flapPageActive);Element.addClassName(D,this.options.flapHeaderActive);this.notifyAfterFlapChanged(this.options.flapPageIds[this.currentFlapIndex],this.options.flapPageIds[A],C);this.currentFlapIndex=A}},refreshSelectedFlap:function(){this.showSelectedFlap(this.currentFlapIndex,true)},selectFlapFromCookie:function(){},notifyBeforeFlapChanged:function(B,A,C){if(this.notify("beforeChange",B,A,C)===false){return false}},notifyAfterFlapChanged:function(B,A,C){if(this.notify("afterChange",B,A,C)===false){return false}}}})();