mySpaceTv.extend(mySpaceTv,function(){var listEvents=[];return{getElementsByTagNames:function(){var els,i,results=[];if(document.evaluate){var _tagNames=[];for(i=0;i<arguments.length;i++){_tagNames.push(".//"+arguments[i])}els=document.evaluate(_tagNames.join("|"),this,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(i=0;i<els.snapshotLength;i++){results.push(els.snapshotItem(i))}}else{for(i=0;i<arguments.length;i++){els=this.getElementsByTagName(arguments[i]);for(var j=0;j<els.length;j++){results.push(els[j])}}}return results},getElementsByClassName:function(oElm,strTagName,strClassName){var arrElements=(strTagName=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(strTagName);var arrReturnElements=new Array();strClassName=strClassName.replace(/\-/g,"\\-");var oRegExp=new RegExp("(^|\\s)"+strClassName+"(\\s|$)");var oElement;for(var i=0;i<arrElements.length;i++){oElement=arrElements[i];if(oRegExp.test(oElement.className)){arrReturnElements.push(oElement)}}return(arrReturnElements)},extractId:function(e){var chunks=e.id.split("-");if(chunks.length<=1){return 0}else{return parseInt(chunks[chunks.length-1],10)}},showLoading:function(div_id){var temp_HTML="<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>";$$(div_id).innerHTML=temp_HTML;document.body.focus()},hideDiv:function(divName){return Element.hide(divName)},showDiv:function(divName){return Element.show(divName)},togglePanel:function(panel){if(typeof(panel)=="string"){panel=$$(panel)}if(this.isPanelExpanded(panel)){this.collapsePanel(panel)}else{this.expandPanel(panel)}},getDisplayStyleByTagName:function(o){var n=o.nodeName.toLowerCase();return(n=="span"||n=="img"||n=="a")?"inline":(n=="tr"||n=="td"?"":"block")},toggleClass:function(element,className){return Element.toggleClassName(element,className)},hasClass:function(element,_className){return Element.hasClassName(element,_className)},addClass:function(element,_class){return Element.addClassName(element,_class)},removeClass:function(element,_class){return Element.removeClassName(element,_class)},isPanelExpanded:function(panel){return this.hasClass(panel,"expanded")},expandPanel:function(panel){if(!this.isPanelExpanded(panel)){this.addClass(panel,"expanded")}},collapsePanel:function(panel){if(this.isPanelExpanded(panel)){this.removeClass(panel,"expanded")}},setInnerHTML:function(div_id,value){var dstDiv=$$(div_id);dstDiv.innerHTML=value},buildUrl:function(url,params){var pairs=new Array();var result=url;if(params){for(var key in params){pairs.push(key+"="+encodeURIComponent(params[key].toString()))}result+="?"+pairs.join("&")}return result},stopPropagation:function(e){if(e===null){return}if(!e){e=window.event}if(e.preventDefault){e.preventDefault();e.stopPropagation()}else{e.returnValue=false;e.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"))},$:function(){var elements=[];for(var i=0;i<arguments.length;i++){var element=arguments[i];if(typeof element=="string"){element=document.getElementById(element)}if(arguments.length==1){return element}elements.push(element)}return elements},addLoadEvent:function(func){this.onReady(func)},addEvent:function(elm,evType,fn,useCapture){useCapture=useCapture||false;if(elm.addEventListener){elm.addEventListener(evType,fn,useCapture);this.eventCacheAdd(elm,evType,fn);return true}else{if(elm.attachEvent){elm["e"+evType+fn]=fn;elm[evType+fn]=function(){elm["e"+evType+fn](window.event)};var r=elm.attachEvent("on"+evType,elm[evType+fn]);this.eventCacheAdd(elm,evType,fn);return r}else{elm["on"+evType]=elm["e"+evType+fn]}}},removeEvent:function(elm,evType,fn,useCapture){useCapture=useCapture||false;if(elm.removeEventListener){elm.removeEventListener(evType,fn,useCapture)}if(evType.substring(0,2)!="on"){evType="on"+evType}if(elm.detachEvent){elm.detachEvent(evType,fn)}elm[evType]=null},eventCacheAdd:function(node,sEventName,fHandler){listEvents.push(arguments)},eventCacheFlush:function(){var i,item;for(i=listEvents.length-1;i>=0;i=i-1){item=listEvents[i];if(item[0].removeEventListener){item[0].removeEventListener(item[1],item[2],item[3])}if(item[1].substring(0,2)!="on"){item[1]="on"+item[1]}if(item[0].detachEvent){item[0].detachEvent(item[1],item[2])}item[0][item[1]]=null}},padZeros:function(num,totalLen){var numStr=num.toString();var numZeros=totalLen-numStr.length;for(var i=1;i<=numZeros;i++){numStr="0"+numStr}return numStr},formatNumber:function(num,prefix){prefix=prefix||"";num+="";var splitStr=num.split(".");var splitLeft=splitStr[0];var splitRight=splitStr.length>1?"."+splitStr[1]:"";var regx=/(\d+)(\d{3})/;while(regx.test(splitLeft)){splitLeft=splitLeft.replace(regx,"$1,$2")}return prefix+splitLeft+splitRight},unformatNumber:function(num){return num.replace(/([^0-9\.\-])/g,"")*1},isArray:function(testObject){return testObject&&!(testObject.propertyIsEnumerable("length"))&&typeof testObject==="object"&&typeof testObject.length==="number"},wordWrap:function(str,int_width,str_break,cut){var m=((arguments.length>=2)?arguments[1]:75);var b=((arguments.length>=3)?arguments[2]:"\n");var c=((arguments.length>=4)?arguments[3]:false);var i,j,l,s,r;if(m<1){return str}for(i=-1,l=(r=str.split("\n")).length;++i<l;r[i]+=s){for(s=r[i],r[i]="";s.length>m;r[i]+=s.slice(0,j)+((s=s.slice(j)).length?b:"")){j=c==2||(j=s.slice(0,m+1).match(/\S*(\s)?$/))[1]?m:j.input.length-j[0].length||c==1&&m||j.input.length+(j=s.slice(m).match(/^\S*/)).input.length}}return r.join("\n")},getElementsByClass:function(searchClass,tag,node){var classElements=new Array();if(node==null){node=document}if(tag==null){tag="*"}var els=node.getElementsByTagName(tag);var elsLen=els.length;var pattern=new RegExp("(^|\\\\s)"+searchClass+"(\\\\s|$)");for(i=0,j=0;i<elsLen;i++){if(pattern.test(els[i].className)){classElements[j]=els[i];j++}}return classElements},toggle:function(obj){var el=document.getElementById(obj);if(el.style.display!="none"){el.style.display="none"}else{el.style.display=""}},insertAfter:function(parent,node,referenceNode){parent.insertBefore(node,referenceNode.nextSibling)},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},createPostVars:function(nameValuePairsArray){var postVars="";if(!(nameValuePairsArray&&!(nameValuePairsArray.propertyIsEnumerable("length"))&&typeof nameValuePairsArray==="object"&&typeof nameValuePairsArray.length==="number")){return""}for(var i=0;i<nameValuePairsArray.length;i++){postVars+=nameValuePairsArray[i][0]+"="+escape(nameValuePairsArray[i][1]);if(i!=(nameValuePairsArray.length-1)){postVars+="&"}}return postVars},postAjaxRequest:function(url,vars,callbackFunction){var request=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("MSXML2.XMLHTTP.3.0");request.open("POST",url,true);request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");request.setRequestHeader("Content-length",vars.length);request.setRequestHeader("Connection","close");request.onreadystatechange=function(){if(request.readyState==4&&request.status==200){if(request.responseText){callbackFunction(request.responseText)}}else{if(request.readyState==4&&request.status!=200){callbackFunction("<response><status>-1</status><message>failed connection</message><response>")}}};request.send(vars)},getAjaxRequest:function(url,callbackFunction){var request=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("MSXML2.XMLHTTP.3.0");request.open("GET",url,true);request.onreadystatechange=function(){if(request.readyState==4){if(request.status==200){if(request.responseText){callbackFunction(request.responseText)}else{callbackFunction("<response><status>-1</status><message>no response text was received</message><response>")}}else{callbackFunction("<response><status>-1</status><message>request failed</message><response>")}}};request.send(null)},getXmlDoc:function(xml){var xmlDoc;if(window.ActiveXObject){xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async="false";xmlDoc.loadXML(xml)}else{if(document.implementation.createDocument){var parser=new DOMParser();xmlDoc=parser.parseFromString(xml,"text/xml")}else{alert("Your browser cannot handle this script");return}}return xmlDoc},overlayDialog:function(title,message,buttons,defaultButton,cancelButton,state,callback){var p=MySpace.UI.Popup.create("","");p._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>";p._box=p._element.firstChild;p.set_content(message);p.set_title(title);for(var i=0;i<buttons.length;i++){var button=buttons[i];if((button==defaultButton)&&(button==cancelButton)){p.add_button(button,true).isCancel=true}else{if(button==defaultButton){p.add_button(button,true)}else{if(button==cancelButton){p.add_button(button).isCancel=true}else{p.add_button(button)}}}}p.set_state(state);p.show(callback)},overlayAlert:function(title,message){this.overlayDialog(title,message,["Ok"],"Ok","",null,null)},makeBeaconRequest:function(videoid,userId,eventtype,eventvalue){var beacon=MySpace.Application.keyDisabled("MSV_IVP_DWBeacon");if(!beacon){MySpace.Beacon.Request({ivvid:videoid,ivuid:userId,ivet:eventtype,ivev:eventvalue})}}}}());mySpaceTv.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.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.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}}}};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}};var mySpaceTvAjax=new MySpaceTvAjax();mySpaceTv.addEvent(window,"unload",mySpaceTv.eventCacheFlush.bind(mySpaceTv));(function(){Slider=function(B,A){this.localize={defaultSearchText:"",searchError:""};this.options={animationType:"quadInOut",animationDuration:0.5,animationFPS:20,duration:0.5,axis:"x",event:"click",start:0,step:1,lock:true,cycle:true,constant:false,prev:null,next:null,source:null,target:null,navigation:null,interval:0,lazy:false,stop:false,force:false,itemselector:null,onBefore:function(){},exclude:0};this.context;this.$pane;this.pane;this.active;this.auto;this.nav;this.timer;this.queue;this.offsets;this.over;return this.init(B,A)};Slider.prototype={init:function(D,A){this.options=mySpaceTv.extend(this.options,arguments[0]||{});this.localize=mySpaceTv.extend(this.localize,arguments[1]||{});this.context=this.options.source?$CSS(this.options.source)[0]:document;this.$pane=$CSS(this.options.target||this,this.context);if(this.$pane){this.pane=this.$pane[0]}this.active=this.options.start;this.auto=this.options.interval;this.nav=this.options.navigation;this.timer;this._animation={target:this.pane,property:"scrollLeft",startValue:0,endValue:0,duration:this.options.animationDuration*1000,fps:this.options.animationFPS,unit:0,isPlaying:false};if(!this.options.lazy){this.items=this.getItems()}if(this.options.force){this.jump({},this.active)}var C=$CSS(this.options.prev||[],this.context);for(var B=0;B<C.length;B++){mySpaceTv.addEvent(C[B],this.options.event,this.movePrev.bindAsEventListener(this))}C=$CSS(this.options.next||[],this.context);for(var B=0;B<C.length;B++){mySpaceTv.addEvent(C[B],this.options.event,this.moveNext.bindAsEventListener(this))}return this},scrollTo:function(K,R,A){if(typeof A=="object"){settings=A;A=0}A=A||this.options.duration;this.queue=this.queue&&this.options.axis.length>1;if(this.queue){A/=2}this.offsets=this.both(this.offsets);this.over=this.both(this.over);var P=$$(K),I=$$(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.options.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.options.onAfter,this._animation);function F(Y,W){var X;for(var V in L){if(L.hasOwnProperty(V)){W.property=""+V+"";X=L[V]}}var T=W.endValue;if(isNaN(T)){T=0}W.endValue=X;W.startValue=T;W.duration=A;if(!W.isPlaying){window.setTimeout(U,W.duration)}function U(){var Z=W.target[W.property];if(W.startValue<W.endValue){if(Z>=W.endValue){W.isPlaying=false;return false}if((W.fps+Z)>W.endValue){W.target[W.property]=W.endValue}else{W.target[W.property]+=W.fps}}else{if(Z<=W.endValue){W.isPlaying=false;return false}if((Z-W.fps)<W.endValue){W.target[W.property]=W.endValue}else{W.target[W.property]-=W.fps}}window.setTimeout(U,W.duration)}}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=$$(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.options.step;this.jump(A,this)},moveNext:function(A){A.data=this.active+this.options.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(F,E){if(!isNaN(E)){F.data=E;E=this.pane}var H=F.data,A,I=F.type,G=this.options.exclude?this.getItems().slice(0,-this.options.exclude):this.getItems(),D=G.length,B=G[H],C=this.options.duration;if(I){mySpaceTv.stopPropagation(F)}if(this.auto){this.clear();timer=setTimeout(this.options.next,this.options.interval)}if(!B){A=H<0?0:D-1;if(this.active!=A){H=A}else{if(!this.options.cycle){return}else{H=D-A-1}}B=G[H]}if(!B){return}if(this.options.onBefore&&this.options.onBefore.call(E,F,B,this.$pane,this.getItems(),H)===false){return}if(this.options.stop){this.$pane.queue("fx",[]).stop()}if(this.options.constant){C=Math.abs(C/this.options.step*(this.active-H))}this.scrollTo(this.pane,B,C);this.notify(H)},clear:function(){clearTimeout(timer)},getItems:function(){return $CSS(this.options.itemselector,this.pane)},index:function(C){if(!isNaN(C)){return C}var A=this.getItems(),B;while((B=A.index(C))==-1&&C!=this.pane){C=C.parentNode}return B},dispose:function(){}}})();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=new 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"}}}},{})},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=new 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"}}}},{})},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=new 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)},{})},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}}}})();