//<[CDATA[


function tryPlayPlayer(pid) {
   try {
		var p = new allvideos.API(pid);
        p.play();
   } catch (e) {
       // Starting the player may fail, if the page is not yet
       // fully loaded and it does not exist yet.
       // So we retry it a little bit later.
       window.setTimeout('tryPlayPlayer("'+pid+'")', 500);
   }
}

function tryStopPlayer(pid) {
   try {
		var p = new allvideos.API(pid);
        p.stop();
   } catch (e) {
       // Starting the player may fail, if the page is not yet
       // fully loaded and it does not exist yet.
       // So we retry it a little bit later.
       window.setTimeout('tryStopPlayer("'+pid+'")', 500);
   }
}


function playPlayer(id) {

   tryPlayPlayer('p_'+id);
}

function stopPlayer(id) {

   tryStopPlayer('p_'+id);
}

function mutePlayer(id) {
	var p = new allvideos.API('p_'+id)
	
	if (p.volume(0) = true) {
	p.volume(100);
	} else {
	p.volume(0);
	}
	
   
}






// ]]>
