﻿function initFlashAGT() {
    var divAGT = document.getElementById("flash_agt");
    if (divAGT != null && divAGT.childNodes.length == 0) {
        if (navigator.appName.indexOf("Microsoft") != -1) {
            divAGT.innerHTML = '<OBJECT width="122" height="53" align="top" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><PARAM value="flash/AGT.swf" name="movie" /><PARAM value="flashvars" name="xml=Standard" /><PARAM value="high" name="quality" /><PARAM value="true" name="play" /><PARAM value="true" name="loop" /><PARAM value="noscale" name="scale" /><PARAM value="transparent" name="wmode" /><PARAM value="false" name="devicefont" /><PARAM value="#FFFFFF" name="bgcolor" /><PARAM value="true" name="menu" /><PARAM value="false" name="allowFullScreen" /><PARAM value="always" name="allowScriptAccess" /><PARAM value="t" name="salign" />';

        } else {
            var fls = document.createElement("embed");
            fls.setAttribute("width", "122");
            fls.setAttribute("height", "53");
            fls.setAttribute("align", "top");
            fls.setAttribute("type", "application/x-shockwave-flash");
            fls.setAttribute("salign", "t");
            fls.setAttribute("allowscriptaccess", "sameDomain");
            fls.setAttribute("allowfullscreen", "false");
            fls.setAttribute("menu", "true");
            fls.setAttribute("name", "inicio_tendencias");
            fls.setAttribute("bgcolor", "#ffffff");
            fls.setAttribute("flashvars", "xml=Standard");
            fls.setAttribute("devicefont", "false");
            fls.setAttribute("wmode", "transparent");
            fls.setAttribute("scale", "noscale");
            fls.setAttribute("loop", "true");
            fls.setAttribute("play", "true");
            fls.setAttribute("pluginspage", "http://www.macromedia.com/go/getflashplayer");
            fls.setAttribute("quality", "high");
            fls.setAttribute("src", "flash/AGT.swf");
            divAGT.appendChild(fls);
        }
    }
}

if (window.addEventListener)
    window.addEventListener("load", initFlashAGT, false);
else
    window.attachEvent("onload", initFlashAGT);