var needToConfirm = true;

window.onbeforeunload = confirmExit;
function confirmExit()
{
if (needToConfirm)
return "If you navigate away from this page, the bookmark will stop playing.  Are you sure you want to exit this page?";
}

