
/* Macromedia - Flash External Interface Scripting.
-------------------------------------------------------------*/
function mpLoadVideo(movieSettings) {
    thisMovie("mediaplayer").initNewVideo(movieSettings);
    return false;
}


/* Macromedia - Flash External Interface Scripting.
-------------------------------------------------------------*/
function stopVideo() {
    thisMovie("mediaplayer").haltVideoNow();
    return false;
}

/* Macromedia - Flash External Interface Scripting.
-------------------------------------------------------------*/
function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName];
    }
    else {
        return document[movieName];
    }
}

/* Written by James A Helly - Flash interaction functions.
-------------------------------------------------------------*/

//Called by flash when we want to track the click of the play button.
function mtrx_track(trkdata) {
	//alert("Loaded: "+trkdata);
	window.status = "Loaded: "+trkdata;
}

//Called to popup the share this button.
function popupTearOff(trkdata) {
	//alert("Tear Off: "+trkdata);
	//window.status = "Tear Off: "+trkdata;
	window.open("embeddable-video/"+trkdata+"/","TearOff");
}

//Called to show the full episode popup, link, or whatever.	
function popupFullEpisode(trkdata) {
	//alert("Full Episode: "+trkdata);
	//window.status = "Full Episode: "+trkdata;
	 window.open (trkdata,"sevenagesfullEpisode","status=0,toolbar=0,location=0,width=623,height=502");
}

//Called to show the media player guide popup.	
function popupPlayerGuide(trkdata) {
	 window.open ("http://www.bbc.co.uk/webwise/categories/plug/winmedia/winmedia.shtml?intro", "sevenagesfullEpisode", "status=0,toolbar=0,location=0,width=623,height=502");
}



