var extra_ads = {
    "top": 0,
    "height": 0,
    "width": "336px",
    "size": 0,
    "containerDivStart": '<div style="padding: 81px 0pt 0pt; position: absolute; top: 573px;left: 0px; width: 336px; background-image: url(http://www.cav.org.ve/cms/templates/cav/images/300x600_banner_bkgr.gif);background-position: left top; background-repeat: no-repeat;"><div style="margin: 0pt 12px 64px 24px;"><div class="moduletable">',
    "containerDivEnd": "</div></div></div>",
    "c2DivStart":'<div style="background-color:#667799; padding-left:23px;padding-bottom:15px"><p align="center" class="small">Publicidad  / <a href="http://www.cav.org.ve/cms/notas-de-prensa/oferta-de-espacios-publicitarios-en-el-portal-cav.html">Anuncie aqu&iacute;</a></p>',
    "c2DivEnd":'</div>',
    "ids": {
        "ids": []
    },
    "regex": /campaignid=\d+/,
    "init": function() {
        var D = $$("base")[0].getProperty("href");
        var B = $("mainimage").getNext();
        this.parentDiv = $("contentimage");
        this.top = this.parentDiv.getTop() + this.parentDiv.getSize().size.y;
        this.height = window.getSize().scrollSize.y - this.top;
        this.size = this.height - this.top;
        if (this.height < 680) {
            var F = new Element("div").setHTML(this.c2DivStart + OA_output[8].replace('script','script defer') + this.c2DivEnd).setStyle("width", "336px").setStyle("position", "absolute").setStyle("top", "590px");
            F.injectInside($("contentimage"));
          
        } else {
            var I = 573;
            var H = 8;
			if(window.ie){
				var G = new Element("div");
				G.injectInside($("contentimage"));
				G.setHTML(this.containerDivStart + OA_output[7].replace('script','script defer') + this.containerDivEnd).setStyle("width", "336px").setStyle("paddingLeft", "5px");
			}
			 else if(window.gecko){
				 var G = new Element("div").setHTML(this.containerDivStart + OA_output[7].replace('script','script defer') + this.containerDivEnd).setStyle("width", "336px").setStyle("paddingLeft", "5px");
				 G.injectInside($("contentimage"));
			}
			else{
				var G = new Element("div").setHTML(this.containerDivStart + OA_output[7].replace('script','script defer') + this.containerDivEnd).setStyle("width", "336px").setStyle("paddingLeft", "5px");
				G.injectInside($("contentimage"));
				var match = /ox_.{32}/.exec(OA_output[7]);
				if(match){
					eval(document.getElementById(match[0]).parentNode.getElementsByTagName('script')[0].innerHTML);
				}
			}
            
            this.height = this.height - 680 - 81 - 40 - 36;
            I = I + 796;
            var E = Math.floor(this.height / 306);
            if (E > 3) {
                E = 3;
            }
            this.getBanners(H, I, E);
            /*var A = new Ajax(myBaseURI + "myincludes/openads_zona7.php", {
                onComplete: function(F) {
                    var J = this.regex.exec(F) ? this.regex.exec(F)[0].split("=")[1] : "";
                    if (J) {
                        this.ids.ids[this.ids.ids.length] = J
                    }
                    var I = 573;
                    var H = 8;
                    var G = new Element("div").setHTML(this.containerDivStart + OA_output[7] + this.containerDivEnd).setStyle("width", "336px").setStyle("paddingLeft", "5px");
                    G.injectInside($("contentimage"));
                    this.height = this.height - 680 - 81 - 40 - 36;
                    I = I + 796;
                    var E = Math.floor(this.height / 306);
                    if (E > 3) {
                        E = 3
                    }
                    this.getBanners(H, I, E)
                }.bind(this)
            }).request()*/
        }
    },
    "getBanners": function(A, D, B) {
        if (B <= 0) {
            return;
        }
        console.log('Running OA_output['+A+']');
        if (window.ie) {
        	var F = new Element("div");
        	F.injectInside($("contentimage"));
        	F.setHTML(this.c2DivStart + OA_output[A].replace('script','script defer') + this.c2DivEnd).setStyle("width", "336px").setStyle("position", "absolute").setStyle("top", D + "px");
        }
        else if(window.gecko){
        	var F = new Element("div").setHTML(this.c2DivStart + OA_output[A] + this.c2DivEnd).setStyle("width", "336px").setStyle("position", "absolute").setStyle("top", D + "px");
        	F.injectInside($("contentimage"));
        }
        else{
        	var F = new Element("div").setHTML(this.c2DivStart + OA_output[A] + this.c2DivEnd).setStyle("width", "336px").setStyle("position", "absolute").setStyle("top", D + "px");
        	F.injectInside($("contentimage"));
        	var match = /ox_.{32}/.exec(OA_output[A]);
        	if(match){
        		eval(document.getElementById(match[0]).parentNode.getElementsByTagName('script')[0].innerHTML);
        	}
        }
        
        B--;
        if (B > 0) {
            this.getBanners(++A, D + 300, B);
        }
        /*var C = new Ajax("myincludes/openads_zona" + A + ".php", {
            postBody: Object.toQueryString(this.ids),
            onComplete: function(E) {
                if (!E) {
                    return
                }
                var G = this.regex.exec(E) ? this.regex.exec(E)[0].split("=")[1] : "";
                if (G) {
                    this.ids.ids[this.ids.ids.length] = G
                }
                var F = new Element("div").setHTML(E).setStyle("width", "336px").setStyle("position", "absolute").setStyle("top", D + "px");
                F.injectInside($("contentimage"));
                B--;
                if (B > 0) {
                    this.getBanners(++A, D + 300, B)
                }
            }.bind(this)
        }).request()*/
    }
};
if (!window.console || !console.firebug) {
    var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
    window.console = {};
    for (var i = 0; i < names.length; ++i) {
        window.console[names[i]] = function() {};
    }
}


//javascript:eval(document.getElementById('ox_7d05253483763951a1049b57f64bf5a5').parentNode.getElementsByTagName('script')[0].innerHTML)
//regex = /ox_.{32}/

