// called when template loads, this function stores a reference to the player and modules.
// Then event listeners will be added for when the template is ready and when a user 
// clicks on a video.
function onTemplateLoaded(experienceID) {
var bcExp;
var modVP;
    bcExp = brightcove.getExperience(experienceID);
    modVP = bcExp.getModule(APIModules.VIDEO_PLAYER);
    modVP.addEventListener(BCMediaEvent.PLAY, onVideoPlay); 
    modVP.addEventListener(BCMediaEvent.STOP, onVideoStop); 
}

function onVideoPlay(evt) {
    LockAutoRefresh_=true;
}

function onVideoStop(evt) {
    LockAutoRefresh_=false;
}

