/* CO BRANDED [ header ] - [ post ] */

/* ::::: ............................................................. global functions
- push ads
*/
function pushAdsDown (pushHeight, absIframeBanner, absAdBanner) {
	if (absIframeBanner) { absIframeBanner.style.top = pushHeight; }
	if (absAdBanner) { absAdBanner.style.top = pushHeight; }
}


/* ::::: ............................................................. set global variables
- identify ads placed absolutely (for legacy content where ad unit code is not in tophat include file)
*/
var theHeaderHeight = "";

var absIframeBanner = document.getElementById("absIframeBanner");
var absAdBanner = document.getElementById("absAdBanner");


/* ::::: ............................................................. call function
- if (cookie exists) call pushAdsDown function
	- getCookie() comes from [cookies.js] loaded earlier in the page
	- (splitCharacter) values come from [coBrandedPre.js] loaded earlier in the page
	- the cookie value =
		iFrameHeight_iFramePageSRC_XXX_channel_uniqueIdentifier
		iFrameHeight-iFramePageSRC-x##-###-##-####
*/
var theSourceCookie = getCookie("iMediaHeaders");
if (theSourceCookie) {
	var theSourceCookieSplit = theSourceCookie.split(splitCharacter);
	var totalHeight = theSourceCookieSplit[0] + "px";
	pushAdsDown(totalHeight, absIframeBanner, absAdBanner);
}

/* END CO BRANDED */