if(typeof (renderStartTime)!="undefined"){Event.observe(window,"load",function(B){var A="http://sense.dailymotion.com/images/vs/tag.gif";var C=new Hash({vs_version:"version",vs_locale:"locale",vs_country:"country",vs_channel:"actionchannel",vs_pagename:"actionpage"});var D=new Hash();D.set("action","timer");D.set("npd",Math.round((new Date()-renderStartTime)/10));if(typeof (vskeys)=="object"){C.each(function(E){if($H(vskeys).get(E.key)!=undefined){D.set(E.value,$H(vskeys).get(E.key))}})}if(typeof (memoryPeakUsage)!="undefined"){D.set("memory_peak_usage",memoryPeakUsage)}if(typeof (memoryUsage)!="undefined"){D.set("memory_usage",memoryUsage)}(new Image()).src=A+"?"+D.toQueryString()})}function cookieSet(A,B,C){d=new Date();d.setTime(d.getTime()+(C*1000));expiry="; expires="+d.toGMTString();document.cookie=A+"="+B+expiry+"; path=/"}function instrument(C){var B;for(B=0;B<C.length;B++){var A={rank:B,call:function(D){var E=location.href.substring((location.href.lastIndexOf("/"))+1);if(E[0]<"0"||E[0]>"9"){E=0}else{E=parseInt(E)-1}cookieSet("rn",""+E+","+this.rank,60)}};Event.observe(C[B],"click",A.call.bindAsEventListener(A))}}var instrumentActionCounter=new Array();function instrumentAction(G,F,D){var C;for(C=0;C<G.length;C++){if(G[C].is_vs_obs){return }var B=vsRedUrl+"log=1&action="+encodeURIComponent(F);if(D=="video"){B+="&video="+encodeURIComponent(vskeys["vs_video"]);B+="&videotitle="+encodeURIComponent(vskeys["vs_videotitle"]);B+="&user="+encodeURIComponent(vskeys["vs_user"]);B+="&usertype="+encodeURIComponent(vskeys["vs_usertype"]);B+="&version="+encodeURIComponent(vskeys["vs_version"]);B+="&actionpage="+encodeURIComponent(vskeys["vs_pagename"]);B+="&spa="+encodeURIComponent(vskeys["vs_spa"]);if(F.indexOf("related")==0){if(!instrumentActionCounter[F]){instrumentActionCounter[F]=0}instrumentActionCounter[F]++;B+="&spb="+instrumentActionCounter[F]}}if(D=="list"){B+="&experience="+encodeURIComponent(vskeys["vs_experience"]);B+="&actionpage="+encodeURIComponent(vskeys["vs_pagename"]);var E="0";if("vs_page" in vskeys){E=vskeys["vs_page"]}B+="&rank="+encodeURIComponent(E+","+C);B+="&version="+encodeURIComponent(vskeys["vs_version"]);B+="&actionchannel="+encodeURIComponent(vskeys["vs_channel"])}var A={url:B,call:function(I){var H=new Ajax.Request(this.url,{method:"get",onComplete:function(J){if(200==J.status){}}})}};Event.observe(G[C],"click",A.call.bindAsEventListener(A));G[C].is_vs_obs=true}}function vsStat(){var G=vskeys;var C=screen;var F=document;if(F.referrer){G["vs_dr"]=F.referrer}G["vs_dh"]=location.href;G["vs_cb"]=new Date().getTime();var E=vsUrl;var D=true;for(cKey in G){if(!D){E+="&"}E+=cKey.substr(3)+"="+encodeURIComponent(G[cKey]);D=false}var B=F.createElement("img");B.src=E;B.id="vstag";var A=F.getElementById("vstag");A.parentNode.insertBefore(B,A.nextSibling)}function vsInstrument(){Event.observe(window,"load",function(){instrument($$("div#videos_list div.videoitem_list a.preview"));instrument($$("div#videos_list div.videoitem_list a.video_title"));instrument($$("div.right_boxes div.videoitem_list a.preview"));instrument($$("div.right_boxes div.videoitem_list a.video_title"));instrumentAction($$("div#mc_close"),"ad/close","all");instrumentAction($$("a#dm_toggle_bookmark_link"),"video/bookmark_toggle","video");instrumentAction($$("a.name_blog_post"),"video/blog_post","video");instrumentAction($$("a.name_playlist_add"),"video/playlist_add","video");instrumentAction($$("a.name_social_tools"),"video/social_tools","video");instrumentAction($$("a.name_share"),"video/share","video");instrumentAction($$("a.name_feedback"),"video/feedback","video");instrumentAction($$("div.prevnext_prev"),"video/prev","video");instrumentAction($$("div.prevnext_next"),"video/next","video");instrumentAction($$("div.dm_button"),"video/channel_add","video");instrumentAction($$("div.dm_widget_videocontext div#tabs a.tab_featured"),"tabs/featured","video");instrumentAction($$("div.dm_widget_videocontext div#tabs a.tab_related"),"tabs/related","video");instrumentAction($$("div.dm_widget_videocontext div#tabs a.tab_channel"),"tabs/channel","video");instrumentAction($$("div.dm_widget_videocontext div#tabs a.tab_group"),"tabs/group","video");instrumentAction($$("div.dm_widget_videocontext div#tabs a.tab_playlist"),"tabs/playlist","video");instrumentAction($$("div.dm_widget_videocontext div#tabs a.tab_member"),"tabs/member","video");instrumentAction($$("div.dm_widget_videocontext div#tabs a.tab_video"),"tabs/video","video");if("vs_experience" in vskeys){instrumentAction($$("div#grid_button"),"list/button/v3/grid","list");instrumentAction($$("div#list_button"),"list/button/v3/list","list");instrumentAction($$("div.dmpi_pagination div div.next a.label"),"list/button/v3/nextpage","list");instrumentAction($$("div.dmpi_pagination div div.prev a.label"),"list/button/v3/prevpage","list");instrumentAction($$("div.dm_widget_pagination div.next a.label"),"list/button/v1/nextpage","list");instrumentAction($$("div.dm_widget_pagination div.prev a.label"),"list/button/v1/prevpage","list");instrumentAction($$("div.videos_list img.preview"),"list/result/v1/thumb","list");instrumentAction($$("div.videos_list a.video_title"),"list/result/v1/title","list");instrumentAction($$("div.dmpi_video_preview img.dmco_image"),"list/result/v3/thumb","list");instrumentAction($$("h4.dmco_title"),"list/result/v3/title","list");instrumentAction($$("div.mc_Right1"),"autopromo/1","list");instrumentAction($$("div.mc_Right2"),"autopromo/2","list");instrumentAction($$("div.mc_Right3"),"autopromo/3","list")}})}if(typeof (vskeys)!="undefined"&&$$("img#vstag").length==0){vsStat();vsInstrument();vsContextInstrument=function(){instrumentAction($$("div#contexts div.tab_list_featured a.preview"),"related/featured/preview","video");instrumentAction($$("div#contexts div.tab_list_featured a.video_title"),"related/featured/title","video");instrumentAction($$("div#contexts div.tab_list_related a.preview"),"related/related/preview","video");instrumentAction($$("div#contexts div.tab_list_related a.video_title"),"related/related/title","video");instrumentAction($$("div#contexts div.tab_list_channel a.preview"),"related/channel/preview","video");instrumentAction($$("div#contexts div.tab_list_channel a.video_title"),"related/channel/title","video");instrumentAction($$("div#contexts div.tab_list_group a.group_icon"),"related/group/preview","video");instrumentAction($$("div#contexts div.tab_list_group a.group_name"),"related/group/title","video");instrumentAction($$("div#contexts div.tab_list_playlist div.playlist_preview a"),"related/playlist/preview","video");instrumentAction($$("div#contexts div.tab_list_playlist a.playlist_name"),"related/playlist/title","video");instrumentAction($$("div#contexts div.tab_list_member a.preview"),"related/member/preview","video");instrumentAction($$("div#contexts div.tab_list_member a.video_title"),"related/member/title","video");instrumentAction($$("div#contexts div.tab_list_video a.preview"),"related/video/preview","video");instrumentAction($$("div#contexts div.tab_list_video a.video_title"),"related/video/title","video")};vsContextInstrument()}function vsSimpleCall(B){if(B.indexOf("/lang/")>0){B=B.substr(B.indexOf("/lang/")+6,2)}else{B="All"}var A=vsRedUrl+"log=1&action=selectcomment/"+B;A+="&Video="+encodeURIComponent(vskeys["vs_video"]);A+="&Videotitle="+encodeURIComponent(vskeys["vs_videotitle"]);A+="&user="+encodeURIComponent(vskeys["vs_user"]);A+="&usertype="+encodeURIComponent(vskeys["vs_usertype"]);A+="&version="+encodeURIComponent(vskeys["vs_version"]);A+="&actionpage="+encodeURIComponent(vskeys["vs_pagename"]);A+="&spa="+encodeURIComponent(vskeys["vs_spa"]);new Ajax.Request(A)}