
var Namespace = new function() {

    function Advert() {
        this.init_widget();
        this.title = "Reklama";
    }

    Advert.prototype = new Widget;
    Advert.name = "Advert";

    Advert.prototype.init = function(div_name) {
        this.div_name = div_name;
    }

    Advert.prototype.start = function() {
        //alert('start');
    }

    Advert.prototype.build = function() {
        this.core_build();
        this.spolocne = document.createElement("div");
        set_class(this.spolocne, "spolocne");
        this.spolocne.style.position = "absolute";
        this.spolocne.style.width = "250px";
        this.spolocne.style.height = "250px";

        var text = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="250" height="250" id="www.magulky.sk" align="middle">';
        text += '<param name="allowScriptAccess" value="sameDomain" />';
        text += '<param name="movie" value="images/yodon.sk.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="images/yodon.sk.swf" quality="high" bgcolor="#000000" width="250" height="250" name="www.magulky.sk" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
        text += '</object>';
        this.spolocne.innerHTML = text;

/*
        var iframe = document.createElement("iframe");
        iframe.setAttribute("width", "250px");
        iframe.setAttribute("height", "250px");
        iframe.setAttribute("src", "adsense.magulky.html");
        iframe.setAttribute("frameborder", "0");
        iframe.setAttribute("border", "0");
        iframe.setAttribute("marginwidth", "0");
        iframe.setAttribute("marginheight", "0");
        iframe.setAttribute("scrolling", "no");
        iframe.style.border = "0";
*/

//        this.spolocne.appendChild(iframe);
        this.canvas_div.appendChild(this.spolocne);
    }

    return {
        Advert: Advert
    }
}

register_widget(Namespace.Advert);

