/* 
 * This function hides the Google ad and displays the Tremor companion 
 * banner. The call comes from the player when the Tremor ad response 
 * has been loaded and parsed.
 */
function getTremorBanner(bannerURL, bannerClickURL)
{
	if(bannerClickURL == undefined || bannerClickURL == null)
	{
		document.getElementById('banner').style.display = "none";
		document.getElementById('tremorBanner').style.display = "block";
		document.getElementById('ifrBanner').src = bannerURL;
	}
}

/*
 * This function hides the Tremor banner and displays the Google ad. This
 * call comes from the player when the Tremor ad (video) has ended.
 */
function endTremorBanner()
{
	document.getElementById('banner').style.display = "block";
	document.getElementById('tremorBanner').style.display = "none";
}					

/*
 * This function re-loads the player with new content. You must pass a 
 * CAMS content (Program, Playlist, or Category) ID that represents the 
 * content to be displayed. It is being used on the home page to load 
 * programs from the side menu. This function requires the "writeNewDiv" 
 * option added to the permissiontv.js file by WhittmanHart.
 */
function changePlayer(cid)
{
	player.addVariable("CID", cid);
	player.write(false);
}
