   // These are the generated api keys for your account and they allow all /video/* calls
   var my_username = 'urbanwide,d35c1c82d2c1f529f2ed7d5eca1e4049e07024f9';
   var my_password = '5a3bedc0ae788aaeebb6e5c44745d15e0cbe94b7';
   var flashObj = null;

   // When the page is done loading (which means the Flash is done too) we
   // need to tell the Flash the username and password so that it can authorize
   // requests for the video file.
   function doOnload() {
     flashObj.authorize_requests(my_username, my_password);
	 //flashObj.load_media("<?=$id ?>", true);
   }
	function getSWF(movieName) {
		if (navigator.appName.indexOf("Microsoft") != -1) {
			return window[movieName];
		}
		else {
		  if(document[movieName].length != undefined){
			  return document[movieName][1];
		  }
			return document[movieName];
		}
	}	
   	getFlashObj = function() {
		 var el = null;
		 el = getSWF("simpleplayer_object");
		 if(el && el.load_media) {
		   flashObj = el;
		   setTimeout(doOnload, 0);
		 } else {
		   setTimeout(getFlashObj, 1000);
		 }
   	};
	window.onload = getFlashObj;
	function playBeat(id)  {
   		//flashObj = getSWF("simpleplayer_object");
		flashObj.load_media(id, true);
   }
   function stopBeat(id)  {
		flashObj.load_media("nothing", true);
   }



