var ytplayer=null; function embedYtPlayer(a,c,b){motionLineCoordinates=c;motionLineDelay=b!=null?b:0;if(playerWidth===undefined||playerWidth===null)playerWidth=480;if(playerHeight===undefined||playerHeight===null)playerHeight=360;if(playerAutoplay===undefined||playerAutoplay===null)playerAutoplay=1;swfobject.embedSWF("http://www.youtube.com/v/"+a+"?enablejsapi=1&version=2&playerapiid=ytplayer&fs=1&rel=0&autoplay="+playerAutoplay+"&color1=0xff9933&color2=0xff9933&ap=%2526fmt%3D18","flashPlayerDiv",playerWidth,playerHeight, "8",null,null,{allowScriptAccess:"always",bgcolor:"#000000",allowFullScreen:true,wmode:"transparent"},{id:"myytplayer"})}function onYouTubePlayerReady(){ytplayer=document.getElementById("myytplayer");ytplayer.addEventListener("onStateChange","onYtPlayerStateChange")}function onYtPlayerStateChange(a){if(a!==null)switch(a){case -1:stopGPSPositioning();break;case 0:stopGPSPositioning();break;case 1:startGPSPositioning(41);break;case 2:startGPSPositioning(500)}};
