Created
August 30, 2012 03:33
-
-
Save Hebo/3522042 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.RMIFOnLoad = function(AV, AZ) { | |
| var AT = AV.frameElement; | |
| var AR = AT.parentNode; | |
| var AS = AT.parentNode.parentNode; | |
| var AW = AZ.getElementById("adDiv"); | |
| var AU; | |
| var Aa; | |
| AS.style.width = "auto"; | |
| AS.style.height = "auto"; | |
| AS.overrideAdObj = new Object(); | |
| if (AR.callbackObj.isBlank == 1) { | |
| AR.callbackObj.isFloat = 0; | |
| if (AS.localAdObj.DEFHTML == undefined) { | |
| AS.style.display = "none"; | |
| n("RMIFOnLoad: ad is blank and there is no DEFHTML. Hiding the placeholder.") | |
| } else { | |
| var AX = document.createElement("span"); | |
| AX.className = "defhtml"; | |
| if (typeof (AS.localAdObj.DEFHTML) != "undefined") { | |
| AX.innerHTML = AS.localAdObj.DEFHTML | |
| } | |
| AS.insertBefore(AX, AR); | |
| AT.style.display = "none"; | |
| n("RMIFOnLoad: ad is blank but there is DEFHTML. Hiding the iframe.") | |
| } | |
| } else { | |
| var AY = document.createElement("span"); | |
| AY.className = "fifpre"; | |
| if (typeof (AR.callbackObj.FIFPRE) != "undefined") { | |
| AY.innerHTML = AR.callbackObj.FIFPRE | |
| } | |
| AS.insertBefore(AY, AR); | |
| var Ab = document.createElement("span"); | |
| Ab.className = "fifpost"; | |
| if (typeof (AR.callbackObj.FIFPOST) != "undefined") { | |
| Ab.innerHTML = AR.callbackObj.FIFPOST | |
| } | |
| AS.insertBefore(Ab, null); | |
| if (AR.childNodes.length == 1) { | |
| Aa = AW.offsetWidth; | |
| AU = AW.offsetHeight; | |
| AR.callbackObj.isFloat = 0; | |
| AT.style.width = Aa + "px"; | |
| AT.style.height = AU + "px"; | |
| AT.style.marginRight = "auto"; | |
| AT.style.marginLeft = "auto"; | |
| n("RMIFOnLoad: ad is not blank and not float. Setting height/width of iframe. h= " + AU + " w=" + Aa) | |
| } else { | |
| AR.callbackObj.isFloat = 1; | |
| AT.style.width = "0px"; | |
| AT.style.height = "0px"; | |
| AT.style.display = "none"; | |
| n("RMIFOnLoad: ad is not blank but is a float ad. Hiding the iframe.") | |
| } | |
| } | |
| if (typeof AR.callback == "function") { | |
| n("RMIFOnLoad: calling single ad 'onload' callback"); | |
| AR.callback(AR.callbackObj) | |
| } | |
| AN.fireEvent("adOnload", AR.callbackObj); | |
| x.trackDivLoaded(AR.reqId, AS.getAttribute("id"), AR.callbackObj); | |
| if (AS.metaAdObj) { | |
| AS.metaAdObj.isLoaded = 1 | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment