var current_video=0;function getIMM(){var b=new RegExp("[\\?&]hs444=([^&#]*)");var a=b.exec(window.location.href);if(a!=null){urchinTracker("/ajax/ad/hs444/"+pageTracking.toLowerCase()+a[0]);return"1"}else{return"0"}}function getM(){var b=new RegExp("[\\?&]m=([^&#]*)");var a=b.exec(window.location.href);if(a!=null){return a[1]}else{return"0"}}function initVideoPlayer(){if(YAHOO.util.Dom.get("VideoPlayer")!=null){var d=getIMM();var a=getM();var f=GetID();var b={i:((isNaN(f))?video:f),imm:d,m:a,p:playlistPath,sct:pageCategory,si:"1",uid:getCookie("user","id"),usn:getCookie("user","name")};var e={allowscriptaccess:"always",bgcolor:"#000000",loop:"false",menu:"false",quality:"high",scale:"noscale",wmode:"transparent",allowfullscreen:"true"};var c={id:"myFlash"};if(YAHOO.util.Dom.get("FlashRequired")){YAHOO.util.Dom.get("FlashRequired").style.display="block"}swfobject.embedSWF(playerPath,"VideoPlayer","640","480","9.0.115.0",jsPath+"/swf/expressInstall.swf",b,e,c)}}function get_flash_movie(){if(BrowserDetect.browser=="Explorer"){return window.myFlash}else{return document.myFlash}}var firstVideo=true;function video_ShowVideo(b){current_video=b;video_TrackVideo(b);video_MoveIndicator(b);try{window.location.href="#"+b}catch(a){}}function video_TrackVideo(a){urchinTracker("/ajax/video/"+a+"/")}var video_IndicatorID;function video_MoveIndicator(a){if(video_IndicatorID!=null&&YAHOO.util.Dom.get("ChartVideo_"+video_IndicatorID)){YAHOO.util.Dom.get("ChartVideo_"+video_IndicatorID).style.backgroundColor="transparent";YAHOO.util.Dom.get("ChartThumb_"+video_IndicatorID).style.display="block";YAHOO.util.Dom.get("ChartPlay_"+video_IndicatorID).style.display="none"}video_IndicatorID=a;if(YAHOO.util.Dom.get("ChartVideo_"+a)){YAHOO.util.Dom.get("ChartVideo_"+a).className="selected";YAHOO.util.Dom.get("ChartThumb_"+a).style.display="none";YAHOO.util.Dom.get("ChartPlay_"+a).style.display="block"}}function video_ShowTitle(b){YAHOO.util.Dom.get("VideoTitle").innerHTML="<span>"+b+"</span>";YAHOO.util.Dom.get("VideoTitle").style.display="block";try{document.title=b}catch(a){}}function video_HideTitle(){YAHOO.util.Dom.get("VideoTitle").style.display="none"}function video_ShowMetadata(a){YAHOO.util.Dom.get("ContainsMetadata").innerHTML=a;YAHOO.util.Dom.get("ContainsMetadata").style.display="block";Tag.Load(1,current_video);updateFavoriteVideoBlock(current_video)}function video_HideMetadata(){YAHOO.util.Dom.get("ContainsMetadata").innerHTML="";YAHOO.util.Dom.get("ContainsMetadata").style.display="none"}function video_HideComments(){YAHOO.util.Dom.get("CommentHolder").style.display="none";YAHOO.util.Dom.get("Comments").innerHTML=""}var refreshads_timer;function video_RefreshAds(a){clearTimeout(refreshads_timer);if(typeof(a)!="undefined"&&a==true){refreshads_timer=setTimeout("video_RefreshAds(false);",40000)}else{refreshAds()}}function video_ShowCompanionLREC(a){var b=unescape(a);clearAdTimers();if(YAHOO.util.Dom.get("ContainsHLREC")){YAHOO.util.Dom.get("ContainsHLREC").style.display="none"}urchinTracker("/ajax/ad/PRL/"+pageTracking.toLowerCase());YAHOO.util.Dom.get("ContainsLREC").innerHTML='<iframe src="/ads/index.php?cat=Load&ad='+escape(b)+'" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="true" wmode="transparent"></iframe>'}function video_ShowCompanionBANNER(a){clearAdTimers();if(YAHOO.util.Dom.get("ContainsBANNER")){urchinTracker("/ajax/ad/PRB/"+pageTracking.toLowerCase());YAHOO.util.Dom.get("ContainsBANNER").style.display="block";YAHOO.util.Dom.get("ContainsBANNER").innerHTML='<iframe src="/ads/index.php?type=banner&pos=Banner&cat='+a+'" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="true" wmode="transparent"></iframe>'}}function video_FireVideoAdRoll(a){urchinTracker("/ajax/ad/PR/"+pageTracking.toLowerCase());if(a==true){refreshAds()}}function updateFavoriteVideoBlock(b){if(getCookie("user","id")==0){var a='<div><center><a href="#" onclick="Login();return false;">You must be logged in to add this video to your favorites.</a></center></div>'}else{var a='<div id="AddFavorite_'+b+'" style="display:none;">';a+="<center>";a+="You can favorite this video.";a+="<br /><br />";a+='<a class="grey" style="float:none;padding:3px 15px;" href="#" onclick="Favorite.Add('+b+');return false;">Add to Favorites</a>';a+="</center>";a+="</div>";a+='<div id="RemoveFavorite_'+b+'" style="display:none;">';a+="<center>";a+='You have favorited this video.  Do you want to remove it from your <a href="/profile/'+getCookie("user","name")+'/videos/?tab=favorites">favorites</a>?';a+="<br /><br />";a+='<a class="grey" style="float:none;padding:3px 15px;" href="#" onclick="Favorite.Remove('+b+');return false;">Remove from Favorites</a>';a+="</center>";a+="</div>"}document.getElementById("Favorite").innerHTML=a;Favorite.UpdateToUser(b)}function switch_metadata(d){var b=[];b[0]="info";b[1]="share";b[2]="favorite";for(var e=0;e<b.length;e++){var c=b[e]+"_metadata";var a=b[e].substr(0,1).toUpperCase()+b[e].substr(1);if(d==b[e]){var f=d+"_metadata";document.getElementById(c).className="selected";document.getElementById(a).style.display="block"}else{document.getElementById(c).className="off";document.getElementById(a).style.display="none"}}}function send_video(a){};