function Uppod(k) {
    function xa() {
        if (k.id) {
            Da = navigator.userAgent.toLowerCase();
            if (Da.indexOf("ipad") > 0 || Da.indexOf("iphone") > 0) Ea = true;
            else {
                if (Da.indexOf("webkit") > 0) ib = true;
                if (Da.indexOf("firefox") > 0) Ob = true
            }
			var stopall = false;
            if (Da.indexOf("firefox") != -1) stopall = true;
            if (Da.indexOf("opera") != -1) stopall = true;
			if (Da.indexOf("msie") != -1) stopall = true;
			
            //if (navigator.vendor.indexOf("Apple") > -1) jb = true;
            (Sa = !! document.createElement("canvas").getContext) && (Sa = !! document.createElement("video").canPlayType);
            a = new Pb;
            if (Sa && !stopall) {
                e(a.stg, {
                    textAlign: "left",
                    "background-color": "#" + a.bgcolor,
                    "text-align": "left"
                });
                L = new ea({
                    w: a.sw,
                    h: a.sh,
                    bgc: a.bodycolor,
                    brd: a.brd,
                    brdc: a.brdcolor,
                    h0: a.cntrlout == 1 ? a.sh - a.cntrloutheight : 0
                });
                a.stg.appendChild(L.c);
                e(L.c, {
                    position: "relative",
                    top: 0,
                    left: 0
                });
                kb();
                na = new ea({
                    w: a.scrn_w,
                    h: a.scrn_h,
                    bgc: a.screencolor
                });
                L.c.appendChild(na.c);
                e(na.c, {
                    position: "absolute",
                    top: a.padding,
                    left: a.padding,
                    "z-index": 1
                });
                if (a.pl) {
                    if (typeof a.pl == "string") {
                        var c = lb(a.pl);
                        if (c) try {
                            if (c.indexOf("@") == 0) c = mb(c);
                            a.pl = JSON.parse(c);
                            a.pl.playlist && (a.pl = a.pl.playlist)
                        } catch (d) {
                            R(a.lang2.errjson_decode + " " + Ta(a.pl), true)
                        }
                    }
                    if (a.file == "") for (var g in a.pl[0]) a[g] = a.pl[0][g]
                }
                alrt = document.createElement("div");
                e(alrt, {
                    width: "100%",
                    position: "absolute",
                    top: a.padding,
                    left: a.padding,
                    color: "#" + a.commentcolor,
                    "z-index": 3
                });
                L.c.appendChild(alrt);
                a.commentbgcolor.indexOf("|") == -1 && (a.commentbgcolor = a.commentbgcolor + "|" + a.commentbgcolor);
                alrt_bg = new ea({
                    w: a.sw - a.padding * 2,
                    h: "20",
                    o: 0,
                    bgc: a.commentbgcolor,
                    bga1: a.commentbgalpha1,
                    bga2: a.commentbgalpha2
                });
                alrt.appendChild(alrt_bg.c);
                alrt_txt = document.createElement("div");
                alrt.appendChild(alrt_txt);
                e(alrt_txt, {
                    position: "absolute",
                    top: 0,
                    left: 0,
                    paddingTop: a.commentmargin + a.commenttopmargin,
                    paddingLeft: a.commentmargin + 5,
                    paddingBottom: a.commentmargin * 1.3,
                    fontFamily: a.namefont,
                    fontSize: a.namefontsize,
                    fontStyle: nb(a.namefontstyle),
                    fontWeight: ob(a.namefontstyle)
                });
                alrt_x = document.createElement("div");
                alrt.appendChild(alrt_x);
                e(alrt_x, {
                    position: "absolute",
                    top: 0,
                    right: 0,
                    paddingTop: 5,
                    paddingRight: 10,
                    cursor: "pointer",
                    color: "#" + a.commentcolor
                });
                alrt_x.innerHTML = "x";
                alrt_x.onclick = Fa;
                alrt.style.display = "none";
                if (a.comment != undefined && a.comment != "" && a.showname == 1) if (a.shownameliketip == 1) {
                    c = a.comment;
                    S = document.createElement("div");
                    e(S, {
                        width: "100%",
                        position: "absolute",
                        top: 5 + a.namemargin_v + a.padding,
                        left: 5 + a.namemargin_h + a.padding,
                        color: "#" + a.namecolor
                    });
                    L.c.appendChild(S);
                    g = document.createElement("div");
                    S.appendChild(g);
                    e(g, {
                        position: "absolute",
                        top: 0,
                        left: 0,
                        padding: a.namepadding / 2 + "px " + a.namepadding + "px",
                        fontFamily: a.namefont,
                        fontSize: a.namefontsize,
                        fontStyle: nb(a.namefontstyle),
                        fontWeight: ob(a.namefontstyle),
                        "z-index": 2
                    });
                    g.innerHTML = c;
                    c = new ea({
                        w: g.offsetWidth,
                        h: g.offsetHeight,
                        o: a.namebgo / 2,
                        bgc: a.namebgcolor + "|" + a.namebgcolor,
                        bga1: a.namebgalpha,
                        bga2: a.namebgalpha
                    });
                    S.appendChild(c.c);
                    e(c.canvas, {
                        "z-index": 1
                    });
                    a.shownameonover == 1 && a.shownameonstop == 0 && Hide(S)
                } else R(a.comment, false);
                z();
                Qb();
                Ga();
                Ua(m);
                Ua(alrt);
                Ua(a.stg);
                Va != "" && R(Va, true);
                sizeInterval = setInterval(Rb, 100)
            } else if (a.nohtml5.indexOf(".swf") > 0) {
                k.file.replace("|", "or");
                new swfobject.embedSWF(a.nohtml5, a.id, '100%', '100%', "10.0.0", false, k, {
                    allowFullScreen: "true",
                    allowScriptAccess: "always",
					scale: 'noscale'
                })
            } else a.stg.innerHTML = a.nohtml5
        } else alert("uppod:" + a.id + " id?")
    }
    function R(c, d) {
        Show(alrt);
        alrt_txt.innerHTML = c;
        e(alrt_bg.canvas, {
            height: alrt_txt.offsetHeight,
            width: a.sw - a.padding * 2
        });
        d ? Show(alrt_x) : Hide(alrt_x)
    }
    function Fa() {
        Hide(alrt)
    }
    function Ga() {
        window.onkeydown = function (c) {
            var d = c.which;
            if (d == undefined) d = c.keyCode;
            n && d == 27 && pb();
            if ((x || n) && d == 32) l()
        };
        a.stg.onmousemove = function (c) {
            if (Wa) {
                qb = rb - (c.clientX + c.clientY);
                if (qb != 0) {
                    clearInterval(oa);
                    e(m, {
                        visibility: "visible"
                    });
                    q && e(q, {
                        visibility: "visible"
                    });
                    Wa = false;
                    if (a.cntrlhide == 1 || n) {
                        clearInterval(oa);
                        oa = setInterval(Xa, 3E3)
                    }
                }
            }
            rb = c.clientX + c.clientY
        };
        a.stg.onmouseup = function () {
            C && (C.active = false);
            p && (p.active = false)
        };
        a.stg.onmouseover = function () {
            Ya = true;
            a.shownameonover == 1 && Show(S)
        };
        a.stg.onmouseout = function () {
            Ya = false;
            a.shownameonover == 1 && (a.shownameonstop == 1 && x || a.shownameonstop == 0) && Hide(S)
        };
        a.stg.oncontextmenu = function (c) {
            if (!c) c = window.event;
            c.cancelBubble = true;
            c.stopPropagation && c.stopPropagation();
            if (la) e(la, {
                display: "block",
                position: "absolute",
                top: c.clientY,
                left: c.clientX
            });
            else {
                la = document.createElement("div");
                la.id = "rmenu";
                document.body.appendChild(la);
                var d = document.createElement("div");
                la.appendChild(d);
                d.innerHTML = "<b>Uppod</b> HTML5 0.1.8";
                d.onclick = function () {
                    window.open("http://uppod.com", "_blank")
                };
                e(la, {
                    "border-radius": "0px",
                    cursor: "pointer",
                    position: "absolute",
                    top: c.clientY,
                    left: c.clientX,
                    backgroundColor: "#000",
                    color: "#fff",
                    borderStyle: "solid",
                    borderColor: "#000000",
                    borderWidth: "1px",
                    padding: "2px 5px 3px 5px",
                    font: "9px Tahoma",
                    opacity: "1"
                })
            }
            setTimeout('document.getElementById("rmenu").style.display="none";', 3E3);
            return false
        };
        document.onclick = function () {
            la && e(la, {
                display: "none"
            })
        }
    }
    function z() {
        if (f) {
            if (I) for (var c = 0; c < I.length; c++) {
                I[c].setAttribute("src", "");
                f.removeChild(I[c]);
                delete I[c];
                I[c] = undefined
            }
            if (Za) {
                clearInterval(Za);
                f.removeEventListener("play", $a, false);
                f.removeEventListener("pause", ab, false);
                f.removeEventListener("ended", sb, false);
                f.removeEventListener("loadedmetadata", tb, false);
                f.removeEventListener("volumechange", ub, false)
            }
            f.pause();
            f.src = "";
            fa.removeChild(f);
            delete f;
            f = undefined;
            a.events = [];
            if (p) {
                e(Y.canvas, {
                    width: "0"
                });
                e(Z.canvas, {
                    width: "0"
                })
            }
            sa = bb = false
        }
        if (!fa) {
            fa = document.createElement("div");
            e(fa, {
                backgroundColor: "transparent",
                position: "absolute",
                left: 0,
                top: 0
            });
            na.c.appendChild(fa);
            fa.onclick = l
        }
        f = document.createElement(a.m);
        fa.appendChild(f);
        if (f) {
            f.setAttribute("width", a.sw - (!n ? a.padding * 2 : 0) + "px");
            f.setAttribute("height", a.sh - (!n ? a.padding * 2 : 0) - (a.cntrlout == 1 ? a.cntrloutheight : 0) + "px")
        }
        f && ib && a.airplay == 1 && f.setAttribute("x-webkit-airplay", "allow");
        f.controls = Ea ? true : false;
        e(f, {
            position: "absolute",
            top: 0,
            left: 0
        });
        a.m == "audio" && e(f, {
            width: "0px",
            height: "0px"
        });
        f.preload = a.auto == "none" ? "none" : jb ? "auto" : "metadata";
        a.auto == "play" ? f.autoplay = true : f.autoplay = false;
        setTimeout(B, 33);
        a.poster != "" && f.setAttribute("poster", a.poster);
        a.auto != "none" && ga();
        if (Ea) f.onclick = l;
        D || ta()
    }
    function ta() {
        D && $("#layer").remove();
        D = document.createElement("div");
        D.setAttribute("id", "layer");
        L.c.appendChild(D);
        e(D, {
            width: "100%",
            height: "100%",
            position: "absolute",
            top: 0,
            left: 0,
            "z-index": 2
        });
        D.onclick = l;
        D.style.zIndex = 2;
        alrt.style.zIndex = 3;
        S && (S.style.zIndex = 4);
        m && (m.style.zIndex = 5);
        if (a.o > 0) {
            ya = document.createElement("canvas");
            var c = ya.getContext("2d");
            ya.height = a.o;
            ya.width = a.o;
            c.fillStyle = "#" + a.bgcolor;
            c.beginPath();
            c.moveTo(0, 0);
            c.lineTo(a.o / 2, 0);
            c.quadraticCurveTo(0, 0, 0, a.o / 2);
            c.closePath();
            c.fill();
            D.appendChild(ya);
            za = document.createElement("canvas");
            c = za.getContext("2d");
            za.height = a.o;
            za.width = a.o;
            c.fillStyle = "#" + a.bgcolor;
            c.beginPath();
            c.moveTo(0, 0);
            c.quadraticCurveTo(a.o / 2, 0, a.o / 2, a.o / 2);
            c.lineTo(a.o / 2, 0);
            c.closePath();
            c.fill();
            D.appendChild(za);
            Aa = document.createElement("canvas");
            c = Aa.getContext("2d");
            Aa.height = a.o;
            Aa.width = a.o;
            c.fillStyle = "#" + a.bgcolor;
            c.beginPath();
            c.moveTo(a.o / 2, 0);
            c.quadraticCurveTo(a.o / 2, a.o / 2, 0, a.o / 2);
            c.lineTo(a.o / 2, a.o / 2);
            c.closePath();
            c.fill();
            D.appendChild(Aa);
            Ba = document.createElement("canvas");
            c = Ba.getContext("2d");
            Ba.height = a.o;
            Ba.width = a.o;
            c.fillStyle = "#" + a.bgcolor;
            c.beginPath();
            c.moveTo(0, 0);
            c.quadraticCurveTo(0, a.o / 2, a.o / 2, a.o / 2);
            c.lineTo(0, a.o / 2);
            c.closePath();
            c.fill();
            D.appendChild(Ba);
            Ka()
        }
    }
    function Ka() {
        e(ya, {
            position: "absolute",
            top: 0,
            left: 0
        });
        e(za, {
            position: "absolute",
            top: 0,
            left: Math.round(a.sw - a.o / 2)
        });
        e(Aa, {
            position: "absolute",
            top: Math.round(a.sh - a.o / 2),
            left: Math.round(a.sw - a.o / 2)
        });
        e(Ba, {
            position: "absolute",
            top: Math.round(a.sh - a.o / 2),
            left: 0
        })
    }
    function ga() {
        I = [];
        if (a.file != "") if (a.file.indexOf("|") > 0) for (var c = a.file.split("|"), d = 0; d < c.length; d++) {
            I[d] = document.createElement("source");
            I[d].setAttribute("src", c[d]);
            f.appendChild(I[d])
        } else {
            I[0] = document.createElement("source");
            I[0].setAttribute("src", a.file);
            f.appendChild(I[0])
        }
    }
    function t() {
        if (q) ShowHide(q);
        else {
            if (a.plplace == "inside") {
                q = document.createElement("div");
                Q = document.createElement("div");
                q.appendChild(Q);
                M = [];
                plbg = [];
                pltext = [];
                Ha = [];
                for (i = 0; i < a.pl.length; i++) {
                    M[i] = document.createElement("div");
                    Q.appendChild(M[i]);
                    e(M[i], {
                        cursor: "pointer",
                        color: "#" + a.plcolor,
                        width: a.plw,
                        height: a.plh,
                        position: "absolute",
                        top: 0,
                        left: a.plw * i + a.plmargin * i
                    });
                    Q.appendChild(M[i]);
                    e(M[i], {
                        color: "#" + a.plcolor,
                        width: a.plw,
                        height: a.plh,
                        position: "absolute",
                        top: 0,
                        left: a.plw * i + a.plmargin * i
                    });
                    plbg[i] = document.createElement("div");
                    M[i].appendChild(plbg[i]);
                    e(plbg[i], {
                        opacity: a.plalpha,
                        backgroundColor: "#" + a.plbgcolor,
                        width: a.plw,
                        height: a.plh
                    });
                    if (a.pl[i].poster) {
                        plbg[i].innerHTML = "<img src='" + a.pl[i].poster + "' width='100%' id='plim" + i + "'>";
                        e(plbg[i], {
                            opacity: 1
                        })
                    }
                    pltext[i] = document.createElement("div");
                    M[i].appendChild(pltext[i]);
                    e(pltext[i], {
                        padding: 5,
                        position: "absolute",
                        top: 0,
                        left: 0,
                        fontFamily: a.plfont,
                        fontSize: a.plfontsize,
                        height: a.plh
                    });
                    if (a.pl[i].comment) pltext[i].innerHTML = a.pl[i].comment;
                    if (a.pl[i].poster) {
                        e(pltext[i], {
                            backgroundColor: "#" + a.plbgcolor
                        });
                        e(plbg[i], {
                            background: "none"
                        });
                        Hide(pltext[i])
                    }
                    M[i].setAttribute("id", "plmc" + i);
                    plbg[i].setAttribute("id", "plbg" + i);
                    pltext[i].setAttribute("id", "pltx" + i);
                    M[i].onmouseover = u;
                    M[i].onmouseout = A;
                    M[i].onclick = J;
                    Ha[i] = false
                }
                L.c.appendChild(q);
                e(q, {
                    position: "absolute",
                    width: a.sw - a.plmargin_h * 2,
                    height: a.plh + 10,
                    overflow: "hidden"
                });
                ua = a.pl.length * a.plw + (a.pl.length - 1) * a.plmargin;
                Sb = Q.offsetHeight;
                e(Q, {
                    position: "absolute",
                    top: 10,
                    left: 0
                });
                q.style.zIndex = 6
            }
            E()
        }
    }
    function E() {
        if (a.plplace == "inside") {
            e(q, {
                width: a.sw - a.plmargin_h * 2
            });
            e(q, {
                top: (n ? a.sh : mediaHeight) - a.plh - (a.cntrlout == 0 ? a.cntrloutheight : 0) - 10,
                left: a.plmargin_h
            });
            Q.offsetLeft < -ua + q.offsetWidth && e(Q, {
                position: "absolute",
                top: 10,
                left: -ua + q.offsetWidth
            });
            ua <= a.sw - a.plmargin_h * 2 && e(Q, {
                position: "absolute",
                top: 10,
                left: 0
            });
            N && ha(N)
        }
    }
    function u(c) {
        c = c.target.getAttribute("id").substr(4);
        plbg[c].style.opacity = 1;
        ua > a.sw - a.plmargin_h * 2 && ha(c);
        a.pl[c].poster && a.pl[c].comment && Show(pltext[c])
    }
    function A(c) {
        c = c.target.getAttribute("id").substr(4);
        if (a.pl[c].poster) {
            if (N != c) {
                Hide(pltext[c]);
                plbg[c].style.opacity = Ha[c] ? 0.5 : 1
            }
        } else if (N != c) e(plbg[c], {
            opacity: Ha[c] ? a.plalpha2 : a.plalpha
        })
    }
    function J(c) {
        if (N) {
            if (a.pl[N].poster) {
                Hide(pltext[N]);
                e(plbg[N], {
                    opacity: 0.5
                })
            } else e(plbg[N], {
                opacity: a.plalpha2
            });
            Ha[N] = true;
            e(M[N], {
                top: 0
            })
        }
        N = c.target.getAttribute("id").substr(4);
        c = a.pl[N].file;
        a.auto = "play";
        a.file = c;
        z();
        e(plbg[N], {
            opacity: 0.8
        });
        Hide(q)
    }
    function ha(c) {
        clearInterval(cb);
        c = -M[c].offsetLeft + q.offsetWidth / 2 - a.plw / 2;
        if (c > 0) c = 10;
        if (c < -ua + q.offsetWidth - 10) c = -ua + q.offsetWidth - 10;
        cb = setInterval(T, 20, c)
    }
    function T(c) {
        Math.abs((Q.offsetLeft - c) / 10) <= 1 ? clearInterval(cb) : e(Q, {
            position: "absolute",
            top: 10,
            left: Q.offsetLeft - (Q.offsetLeft - c) / 10
        })
    }
    function B() {
        if (f) if (f.networkState > 0) {
            sa = true;
            e(f, {
                opacity: 1
            });
            Za = setInterval(Tb, 100);
            f.addEventListener("play", $a, false);
            f.addEventListener("pause", ab, false);
            f.addEventListener("ended", sb, false);
            f.addEventListener("loadedmetadata", tb, false);
            f.addEventListener("volumechange", ub, false);
            f.volume = db ? 0 : La;
            if (!vb) {
                ma("init");
                vb = true
            }
        } else setTimeout(B, 33)
    }
    function l() {
        if (a.auto == "none") {
            f.autoplay = true;
            ga();
            Ia = true
        }
        a.auto = "play";
        if (!a.file || a.file == "") ma("error", "nofile");
        if (sa) {
            Ia = true;
            if (x) {
                f.pause();
                ab()
            } else {
                f.play();
                $a()
            }
        } else if (!x) if (F != undefined) {
            F.c.style.display = "none";
            O.c.style.display = "block"
        }
    }
    function Ma() {
        x && l();
        a.auto = "none";
        z();
        ma("stop")
    }
    function Na(c) {
        var d = false;
        if (I) if (I.length > 0) {
            wb || (d = true);
            if (f.webkitSupportsFullscreen) {
                f.webkitEnterFullscreen();
                d = true
            }
            if (!d) {
                if (!n || c == "re") {
                    a.iframe != "" && e(window.parent.document.getElementById(a.iframe), {
                        width: window.parent.innerWidth,
                        height: window.parent.innerHeight,
                        position: "fixed",
                        left: 0,
                        top: 0
                    });
                    if (c != "re") {
                        n = true;
                        mediaWidth = a.sw;
                        mediaHeight = a.sh;
                        e(L.canvas, {
                            visibility: "hidden"
                        });
                        e(na.canvas, {
                            visibility: "hidden"
                        });
                        e(fa, {
                            backgroundColor: "#000",
                            position: "fixed",
                            left: 0,
                            top: 0
                        })
                    }
                    G.c.style.display = "none";
                    ia.c.style.display = "block";
                    if (a.stageposition = "") a.stageposition = a.stg.style.position;
                    a.stageleft = a.stg.style.left;
                    a.stagetop = a.stg.style.top;
                    e(a.stg, {
                        width: a.iframe != "" ? window.parent.innerWidth : window.innerWidth,
                        height: a.iframe != "" ? window.parent.innerHeight : window.innerHeight,
                        position: "fixed",
                        left: 0,
                        top: 0,
                        "z-index": "9999",
                        overflow: "hidden"
                    });
                    a.debug == 0 && e(a.stg, {
                        "z-index": "990"
                    });
                    D != undefined && (D.style.display = "none");
                    clearInterval(oa);
                    oa = setInterval(Xa, 3E3);
                    ma("fullscreen")
                } else pb();
                setTimeout(xb, 100);
                q && e(q, {
                    top: -1000
                })
            }
        }
    }
    function pb() {
        n = false;
        a.iframe != "" && e(window.parent.document.getElementById(a.iframe), {
            width: mediaWidth,
            height: mediaHeight,
            position: "static",
            left: 0,
            top: 0
        });
        e(fa, {
            backgroundColor: "transparent",
            position: "absolute",
            left: 0,
            top: 0
        });
        e(a.stg, {
            width: mediaWidth,
            height: mediaHeight,
            position: a.stageposition == "" ? "static" : a.stageposition,
            left: a.stageleft,
            top: a.stagetop
        });
        a.debug == 0 && e(a.stg, {
            "z-index": "1"
        });
        e(L.canvas, {
            visibility: "visible"
        });
        e(na.canvas, {
            visibility: "visible"
        });
        D != undefined && (D.style.display = "block");
        G.c.style.display = "block";
        ia.c.style.display = "none";
        q && e(q, {
            top: -1000
        });
        ma("exitfullscreen")
    }
    function yb() {
        if (H) ShowHide(H);
        else {
            H = document.createElement("div");
            var c = a.scrn_w < 320 ? a.scrn_w - 30 : 350,
                d = (a.download != "" && a.download != 0 ? 45 : 0) + (a.menu_nocode == 1 ? 0 : 45) + (a.link != "" ? 45 : 0) + 11;
            a.menu_w = c;
            a.menu_h = d;
            var g = new ea({
                w: c,
                h: d,
                o: 10,
                bgc: "000000|000000",
                bga1: 0.5,
                bga2: 0.5
            });
            H.appendChild(g.c);
            e(g.c, {
                position: "relative",
                top: "0",
                left: "0"
            });
            if (a.download != "" && a.download != 0) eb("menu_download", a.download == 1 ? a.file : a.download, c, d);
            a.link != "" && eb("menu_link", a.link, c, d);
            e(H, {
                color: "#ffffff",
                font: "10px Verdana"
            });
            eb("menu_code", a.iframelink != "" ? '<iframe title="sample" width="' + a.w + '" height="' + a.h + '" src="' + a.iframelink + '" frameborder="0" allowfullscreen></iframe>' : a.embedcode != "" ? a.embedcode : "", c, d);
            d = document.createElement("div");
            d.innerHTML = "&nbsp; x &nbsp;";
            H.appendChild(d);
            e(d, {
                position: "absolute",
                top: 3,
                left: c - 25
            });
            d.onclick = Ub;
            L.c.appendChild(H);
            xb()
        }
    }
    function eb(c, d, g) {
        var h = document.createElement("div");
        h.innerHTML = a.lang2[c];
        H.appendChild(h);
        e(h, {
            position: "absolute",
            top: 5 + Oa * 45,
            left: 15
        });
        c = new ea({
            w: g - 20,
            h: 23,
            o: 5,
            bgc: "ffffff"
        });
        e(c.c, {
            position: "absolute",
            top: 22 + Oa * 45,
            left: 10
        });
        H.appendChild(c.c);
        c = document.createElement("input");
        H.appendChild(c);
        e(c, {
            position: "absolute",
            outline: "none",
            font: "10px Verdana",
            top: 25 + Oa * 45,
            left: 13,
            width: g - 28,
            height: 15,
            color: "#000000",
            border: 0,
            background: "none"
        });
        c.value = d;
        c.onclick = function () {
            this.select()
        };
        Oa++
    }
    function Ub() {
        H && e(H, {
            display: "none"
        })
    }
    function xb() {
        if (H) e(H, {
            position: "absolute",
            top: ((n ? a.sh : mediaHeight) - a.menu_h) / 2,
            left: ((n ? a.sw : mediaWidth) - a.menu_w) / 2
        })
    }
    function Xa() {
        if (x && f.currentTime > 0 && 1) if (!Ya && a.cntrlhide == 1 || n) {
            clearInterval(oa);
            e(m, {
                visibility: "hidden"
            });
            q && e(q, {
                visibility: "hidden"
            });
            Wa = true
        }
    }
    function kb() {
        a.scrn_w = a.sw - a.padding * 2;
        a.scrn_h = a.sh - a.padding * 2 - (a.cntrlout == 1 ? a.cntrloutheight : 0)
    }
    function zb() {
        a.sw = a.stg.offsetWidth;
        a.sh = a.stg.offsetHeight;
        kb();
        if (!n) {
            e(L.canvas, {
                width: a.sw,
                height: a.sh
            });
            e(na.canvas, {
                width: a.sw - a.padding * 2,
                height: a.sh - a.padding * 2 - (a.cntrlout == 1 ? a.cntrloutheight : 0)
            })
        }
        if (alrt) {
            e(alrt_bg.canvas, {
                width: "" + a.sw - (n ? 0 : a.padding * 2) + "px"
            });
            if (a.padding > 0) e(alrt, {
                top: n ? 0 : a.padding,
                left: n ? 0 : a.padding
            })
        }
        e(fa, {
            width: "" + a.sw - (!n ? a.padding * 2 : 0) + "px",
            height: "" + a.sh - (!n ? a.padding * 2 : 0) - (a.cntrlout == 1 && !n ? a.cntrloutheight : 0) + "px"
        });
        e(f, {
            width: "" + a.sw - (!n ? a.padding * 2 : 0) + "px",
            height: "" + a.sh - (!n ? a.padding * 2 : 0) - (a.cntrlout == 1 && !n ? a.cntrloutheight : 0) + "px"
        });
        a.o > 0 && Ka();
        e(m, {
            top: a.sh - a.cntrloutheight - (a.cntrlout == 1 ? a.padding / 2 : 0) - (!n ? a.padding : 0),
            left: !n ? a.padding : 0
        });
        pa && e(pa.canvas, {
            width: "" + (a.sw - (n ? 0 : a.padding * 2)) + "px",
            height: "" + a.cntrloutheight + "px"
        });
        P && e(P.c, {
            left: a.sw / 2 - P.w / 2,
            top: a.sh / 2 - P.h / 2
        });
        Ab();
        q && E()
    }
    function Bb() {
        Cb(0)
    }
    function Db() {
        if (f.muted) {
            f.muted = false;
            U.c.style.display = "block";
            ja.c.style.display = "none";
            db = false
        } else {
            f.muted = true;
            ja.c.style.display = "block";
            U.c.style.display = "none";
            db = true
        }
    }
    function $a() {
        if (!x) {
            Ea && e(m, {
                visibility: "hidden"
            });
            if (F != undefined) {
                F.c.style.display = "none";
                O.c.style.display = "block"
            }
            x = true;
            if (a.cntrlhide == 1 && a.cntrlout == 0 || n) {
                clearInterval(oa);
                oa = setInterval(Xa, 3E3)
            }
            if (a.comment != undefined && a.comment != "" && a.showname == 1) a.shownameliketip == 1 ? Hide(S) : Hide(alrt);
            P && (P.c.style.display = "none");
            ma("play")
        }
    }
    function ab() {
        if (x) {
            if (F != undefined) {
                F.c.style.display = "block";
                O.c.style.display = "none"
            }
            x = false;
            if (a.comment != undefined && a.comment != "" && a.showname == 1) a.shownameliketip == 1 ? Show(S) : Show(alrt);
            P && (P.c.style.display = "block");
            ma("pause")
        }
    }
    function ma(c, d) {
        a.events[c] = d;
        var g = document.createEvent("Events");
        g.initEvent(c, true, true);
        a.stg.dispatchEvent(g)
    }
    function tb() {
        wb = true
    }
    function ub() {
        ka && Eb(f.volume * ka.w)
    }
    function sb() {
        if (f.ended && x) if (a.radio == 1) {
            Ma();
            l()
        } else {
            Bb();
            l();
            if (a.menuauto == 1 && V) {
                var c = false;
                if (H) H.style.visible != "none" && (c = true);
                c || yb()
            }
        }
    }
    function Rb() {
        if (a.stg.offsetWidth != a.sw || a.stg.offsetHeight != a.sh) zb()
    }
    function Tb() {
        if (f != undefined) {
            qa != undefined && (qa.c.innerHTML = fb(f.currentTime));
            ra != undefined && (ra.c.innerHTML = fb(!f.duration || f.duration == "Infinity" ? 0 : f.duration));
            loaded = 0;
            var c = false;
            if (Pa) {
                if (f.buffered) {
                    var d = f.buffered;
                    if (d.length > 0) {
                        for (var g = 0; g < d.length; g++) {
                            var h = d.start(g) / f.duration * K.w,
                                r = d.end(g) / f.duration * K.w;
                            if (Qa[g]) if (r - h != Qa[g]) {
                                gb[g]++;
                                if (gb[g] > 5) {
                                    Fb = g;
                                    Ra = h
                                }
                            } else gb[g] = 0;
                            Qa[g] = r - h
                        }
                        d = Math.floor(Qa[Fb]);
                        g = Math.round(f.currentTime / f.duration * K.w - Ra);
                        e(Z.canvas, {
                            left: Ra + "px",
                            width: "" + d + "px"
                        });
                        !p.active && e(Y.canvas, {
                            left: Ra + "px",
                            width: "" + (d >= g ? g : 0) + "px"
                        })
                    } else c = true
                } else c = true;
                if (c) {
                    g = Math.round(f.currentTime / f.duration * K.w);
                    !p.active && e(Y.canvas, {
                        width: "" + g + "px"
                    })
                }
                if (va && !bb) if (f.currentTime > 0) {
                    Gb();
                    bb = true
                }
                if (x && f.currentTime == Hb) if (hb > 5) {
                    va || W && e(W.c, {
                        display: "block"
                    });
                    va = true
                } else hb++;
                else {
                    if (va) {
                        va = false;
                        Gb()
                    }
                    hb = 0
                }
                Hb = f.currentTime
            }
            if (x && a.reloader == 1) {
                if (f.currentTime == a.reloadertime) {
                    a.reloadercounter++;
                    if (a.reloadercounter > 50) {
                        a.reloadercounter = 0;
                        Ma();
                        l()
                    }
                } else a.reloadercounter = 0;
                a.reloadertime = f.currentTime
            }
            x && a.eventtime > 0 && !a.events.time && f.currentTime > a.eventtime && ma("time", f.currentTime);
            x && a.eventplayed > 0 && !a.events.played && f.currentTime / f.duration * 100 > a.eventplayed && ma("played", f.currentTime / f.duration * 100)
        }
        if (n) if (a.iframe != "")(window.parent.innerWidth != a.stg.offsetWidth || window.parent.innerHeight != a.stg.offsetHeight) && Na("re");
        else(window.innerWidth != a.stg.offsetWidth || window.innerHeight != a.stg.offsetHeight) && Na("re")
    }
    function nb(c) {
        var d = "normal";
        if (c == "i" || c == "b><i") d = "italic";
        return d
    }
    function ob(c) {
        var d = "normal";
        if (c == "b" || c == "b><i") d = "bold";
        return d
    }
    function Gb() {
        W && e(W.c, {
            display: "none"
        });
        va = false
    }
    function fb(c) {
        c = Math.round(c);
        minutes = Math.floor(c / 60);
        minutes = minutes >= 10 ? minutes : minutes;
        c = Math.floor(c % 60);
        c = c >= 10 ? c : "0" + c;
        return minutes + ":" + c
    }
    function Qb() {
        m = document.createElement("div");
        L.c.appendChild(m);
        e(m, {
            position: "absolute",
            top: a.scrn_h - (a.cntrlout == 1 ? -a.padding / 2 : a.cntrloutheight) + a.padding,
            left: a.padding
        });
        m.style.zIndex = 5;
        Ib();
        s = a.controls.split(",");
        X = 0;
        o = [];
        v = [];
        for (var c = 0; c < s.length; c++) {
            if (s[c] == "play") {
                F = new y("play", 20, 20);
                m.appendChild(F.c);
                e(F.c, {
                    cursor: "pointer",
                    position: "absolute",
                    top: (a.cntrloutheight - F.h) / 2
                });
                F.c.onclick = l;
                a.tip == 1 && F.s.notip == 0 && (F.c.title = F.s.play_tip ? F.s.play_tip : a.lang2.play);
                O = new y("pause", 20, 20, "", "play");
                m.appendChild(O.c);
                e(O.c, {
                    cursor: "pointer",
                    display: "none",
                    position: "absolute",
                    top: (a.cntrloutheight - O.h) / 2
                });
                O.c.onclick = l;
                o[c] = O.w + a.cntrlmargin;
                X += o[c];
                v[c] = F;
                a.tip == 1 && O.s.notip == 0 && (O.c.title = O.s.pause_tip ? O.s.pause_tip : a.lang2.pause)
            }
            if (s[c] == "back") {
                aa = new y("back", 30, 20);
                m.appendChild(aa.c);
                e(aa.c, {
                    cursor: "pointer",
                    position: "absolute",
                    top: (a.cntrloutheight - aa.h) / 2
                });
                aa.c.onclick = Bb;
                o[c] = aa.w + a.cntrlmargin;
                X += o[c];
                v[c] = aa;
                a.tip == 1 && aa.s.notip == 0 && (aa.c.title = aa.s.tip ? aa.s.tip : a.lang2.back)
            }
            if (s[c] == "stop") {
                ba = new y("stop", 20, 20);
                m.appendChild(ba.c);
                e(ba.c, {
                    cursor: "pointer",
                    position: "absolute",
                    top: (a.cntrloutheight - ba.h) / 2
                });
                ba.c.onclick = Ma;
                o[c] = ba.w + a.cntrlmargin;
                X += o[c];
                v[c] = ba;
                a.tip == 1 && ba.s.notip == 0 && (ba.c.title = ba.s.tip ? ba.s.tip : a.lang2.stop)
            }
            if (s[c] == "time_play") {
                qa = new y("time_play", 30, 20);
                m.appendChild(qa.c);
                e(qa.c, {
                    cursor: "default",
                    position: "absolute",
                    top: (a.cntrloutheight - qa.h) / 2 + 3
                });
                o[c] = qa.w + a.cntrlmargin;
                X += o[c] + 3;
                v[c] = qa
            }
            if (s[c] == "time_all") {
                ra = new y("time_all", 30, 20);
                m.appendChild(ra.c);
                e(ra.c, {
                    cursor: "default",
                    position: "absolute",
                    top: (a.cntrloutheight - ra.h) / 2 + 3
                });
                o[c] = ra.w + a.cntrlmargin;
                X += o[c] + 3;
                v[c] = ra
            }
            if (s[c] == "sound") {
                s[c] = "volume";
                a.cntrl_volume = a.cntrl_sound
            }
            if (s[c] == "volume") {
                U = new y("volume", 20, 20);
                m.appendChild(U.c);
                e(U.c, {
                    cursor: "pointer",
                    position: "absolute",
                    top: (a.cntrloutheight - U.h) / 2
                });
                U.c.onclick = Db;
                ja = new y("volume_mute", 20, 20, "", "volume");
                m.appendChild(ja.c);
                e(ja.c, {
                    display: "none",
                    cursor: "pointer",
                    position: "absolute",
                    top: (a.cntrloutheight - ja.h) / 2
                });
                o[c] = ja.w + a.cntrlmargin;
                X += o[c];
                ja.c.onclick = Db;
                v[c] = U;
                a.tip == 1 && U.s.notip == 0 && (U.c.title = U.s.tip ? U.s.tip : a.lang2.volume)
            }
            if (s[c] == "tune") {
                s[c] = "volbarline";
                a.cntrl_volbarline = a.cntrl_tune
            }
            if (s[c] == "volbarline") {
                C = document.createElement("div");
                m.appendChild(C);
                ka = new y("volbarline", a.cntrl_volbarline.w ? a.cntrl_volbarline.w : a.cntrlvolbarline.w, 20, "all");
                C.appendChild(ka.c);
                C.active = false;
                e(ka.c, {
                    opacity: ka.s.all_a,
                    position: "absolute",
                    top: 0,
                    left: 0
                });
                Ca = new y("volbarline", a.cntrl_volbarline.w ? a.cntrl_volbarline.w : a.cntrlvolbarline.w, 20, "play");
                C.appendChild(Ca.c);
                e(Ca.c, {
                    opacity: Ca.s.play_a,
                    position: "absolute",
                    top: 0,
                    left: 0
                });
                e(C, {
                    cursor: "pointer",
                    position: "absolute",
                    top: (a.cntrloutheight - ka.h) / 2
                });
                o[c] = ka.w + a.cntrlmargin;
                X += o[c];
                e(Ca.canvas, {
                    width: ka.w * a.volume
                });
                C.onmousedown = function (d) {
                    C.active = true;
                    if (!d) d = window.event;
                    Jb(d)
                };
                C.onmousemove = function (d) {
                    if (!d) d = window.event;
                    Jb(d)
                };
                C.onmouseup = function () {
                    C.active = false
                };
                v[c] = C
            }
            if (s[c] == "full") {
                G = new y("full", 20, 20);
                m.appendChild(G.c);
                e(G.c, {
                    cursor: "pointer",
                    position: "absolute",
                    top: Math.floor((a.cntrloutheight - G.h) / 2)
                });
                o[c] = G.w + a.cntrlmargin;
                G.c.onclick = Na;
                ia = new y("full_back", 20, 20, "", "full");
                m.appendChild(ia.c);
                e(ia.c, {
                    cursor: "pointer",
                    display: "none",
                    position: "absolute",
                    top: (a.cntrloutheight - ia.h) / 2
                });
                ia.c.onclick = Na;
                o[c] = G.w + a.cntrlmargin;
                X += o[c];
                v[c] = G;
                a.tip == 1 && G.s.notip == 0 && (G.c.title = G.s.tip ? G.s.tip : a.lang2.full);
                a.tip == 1 && ia.s.notip == 0 && (ia.c.title = G.s.tip_off ? G.s.tip_off : a.lang2.full_back)
            }
            if (s[c] == "playlist") if (a.pl != "") {
                ca = new y("playlist", 20, 20);
                m.appendChild(ca.c);
                e(ca.c, {
                    cursor: "pointer",
                    position: "absolute",
                    top: (a.cntrloutheight - ca.h) / 2
                });
                ca.c.onclick = t;
                o[c] = ca.w + a.cntrlmargin;
                X += o[c];
                v[c] = ca;
                a.tip == 1 && ca.s.notip == 0 && (ca.c.title = ca.s.tip ? ca.s.tip : a.lang2.playlist)
            }
            if (s[c] == "menu") {
                V = new y("menu", 20, 20);
                m.appendChild(V.c);
                e(V.c, {
                    cursor: "pointer",
                    position: "absolute",
                    top: (a.cntrloutheight - V.h) / 2
                });
                V.c.onclick = yb;
                o[c] = V.w + a.cntrlmargin;
                X += o[c];
                v[c] = V;
                a.tip == 1 && V.s.notip == 0 && (V.c.title = V.s.tip ? V.s.tip : a.lang2.menu)
            }
            if (s[c] == "buffer") if (p) {
                W = new y("buffer", 30, 14);
                m.appendChild(W.c);
                e(W.c, {
                    cursor: "default",
                    position: "absolute",
                    top: (a.cntrloutheight - W.h) / 2 - (p ? K.s.h + 4 : 0)
                });
                v[c] = W;
                o[c] = 0;
                W.c.innerHTML = a.lang2.loading
            }
            if (s[c] == "start") {
                P = new y("start", 20, 20);
                L.c.appendChild(P.c);
                e(P.c, {
                    cursor: "pointer",
                    position: "absolute",
                    top: a.h / 2 - P.h / 2,
                    left: a.w / 2 - P.w / 2,
                    "z-index": 5
                });
                P.c.onclick = l
            }
            if (s[c] == "space") {
                wa = document.createElement("div");
                m.appendChild(wa);
                e(wa, {
                    position: "absolute",
                    top: (a.cntrloutheight - 20) / 2
                });
                v[c] = wa
            }
            if (s[c] == "line") {
                Pa = true;
                p = document.createElement("div");
                m.appendChild(p);
                K = new y("line", 20, 20, "all");
                p.appendChild(K.c);
                p.active = false;
                e(K.c, {
                    opacity: K.s.all_a,
                    position: "absolute",
                    top: 0,
                    left: 0
                });
                Z = new y("line", 20, 20, "load");
                p.appendChild(Z.c);
                e(Z.c, {
                    opacity: Z.s.load_a,
                    position: "absolute",
                    top: 0,
                    left: 0
                });
                Y = new y("line", 20, 20, "play");
                p.appendChild(Y.c);
                e(Y.c, {
                    opacity: Y.s.play_a,
                    position: "absolute",
                    top: 0,
                    left: 0
                });
                e(p, {
                    position: "absolute",
                    top: (a.cntrloutheight - K.h) / 2,
                    cursor: "pointer"
                });
                e(Y.canvas, {
                    width: "0"
                });
                e(Z.canvas, {
                    width: "0"
                });
                p.onmousedown = function (d) {
                    if (Ia) {
                        p.active = true;
                        if (!d) d = window.event;
                        Kb(d)
                    }
                };
                p.onmouseup = function (d) {
                    if (Ia) {
                        Kb(d);
                        x && f.play();
                        p.active = false
                    }
                };
                v[c] = p
            }
        }
        Ab()
    }
    function Ib() {
        pa && $("#uibg").remove();
        if (a.cntrlout != 1 && a.cntrlbg == 1) {
            a.cntrlbgcolor.indexOf("|") == -1 && (a.cntrlbgcolor = a.cntrlbgcolor + "|" + a.cntrlbgcolor);
            pa = new ea({
                w: a.scrn_w,
                h: a.cntrloutheight,
                o: a.o / 2 - a.padding,
                onotop: 1,
                bgc: a.cntrlbgcolor,
                bga1: a.cntrlbgalpha1,
                bga2: a.cntrlbgalpha2
            })
        }
        if (a.cntrlout == 1 && a.padding == 0) {
            a.cntrlbgcolor.indexOf("|") == -1 && (a.cntrlbgcolor = a.cntrlbgcolor + "|" + a.cntrlbgcolor);
            pa = new ea({
                w: a.scrn_w,
                h: a.cntrloutheight,
                o: a.o / 2 - a.padding,
                onotop: 1,
                bgc: a.bodycolor,
                bga1: 1,
                bga2: 1
            })
        }
        if (pa) {
            pa.c.setAttribute("id", "uibg");
            m.appendChild(pa.c)
        }
    }
    function Ab() {
        var c = a.sw - X - a.cntrlendmargin * 2 - a.cntrlmargin * 2 - (!n ? a.padding * 2 : 0) - a.cntrlmarginleft - a.cntrlmarginright,
            d = a.cntrlendmargin + a.cntrlmarginleft;
        for (i = 0; i < s.length; i++) if (v[i]) {
            c -= 2.5;
            if (v[i] != p && v[i] != wa) {
                e(v[i].c != undefined ? v[i].c : v[i], {
                    left: d
                });
                s[i] == "play" && e(O.c, {
                    left: d
                });
                s[i] == "full" && e(ia.c, {
                    left: d
                });
                if (s[i] == "volume") e(ja.c, {
                    left: d,
                    opacity: ja.s.icon == 2 ? 0.5 : 1
                });
                d += Math.floor(o[i] + a.cntrlmargin) - 0.2 * i
            } else {
                if (p) {
                    e(p, {
                        left: d + 3
                    });
                    K.w = c;
                    Y.w = c;
                    Z.w = c;
                    e(K.canvas, {
                        width: "" + c + "px"
                    });
                    o[i] = c;
                    d += Math.floor(o[i] + a.cntrlmargin + 6)
                }
                if (wa) {
                    e(wa, {
                        left: d + 3,
                        width: "" + c + "px"
                    });
                    o[i] = c;
                    d += Math.floor(o[i] + a.cntrlmargin + 6)
                }
            }
            W && e(W.c, {
                left: p.offsetLeft
            })
        }
    }
    function Lb(c) {
        var d = 0;
        if (c.offsetParent) for (d = c.offsetLeft; c = c.offsetParent;) d += c.offsetLeft;
        return d
    }
    function Jb(c) {
        if (C.active) {
            if (!c) c = window.event;
            c = c.clientX - Lb(C);
            Eb(c)
        }
    }
    function Eb(c) {
        e(Ca.canvas, {
            width: "" + c + "px"
        });
        La = Math.max(0, Math.min(1, c / ka.w));
        f.volume = La
    }
    function Kb(c) {
        c = c.clientX - Lb(p);
        p.active && Cb(c);
        if (a.tip == 1 && Z.s.notip == 0 && f.duration) {
            c = fb(c / K.w * f.duration);
            K.c.title = Z.c.title = Y.c.title = c
        }
    }
    function Cb(c) {
        if (f.duration && Pa) {
            f.currentTime = Math.max(0, Math.min(1, c / K.w)) * f.duration;
            if (Pa && c == 0) {
                e(Z.canvas, {
                    left: 0
                });
                e(Y.canvas, {
                    left: 0
                })
            }
        }
    }
    function y(c, d, g, h, r) {
        this.c = document.createElement("div");
        this.s = {};
        r == undefined && (r = c);
        for (var da in a.cntrlstyle) this.s[da] = a.cntrlstyle[da];
        for (da in a["cntrl" + r]) this.s[da] = a["cntrl" + r][da];
        for (da in a["cntrl_" + r]) this.s[da] = a["cntrl_" + r][da];
        if (h == "all") this.s.color = this.s.color_all;
        if (h == "load") this.s.color = this.s.color_load;
        if (h == "play") this.s.color = this.s.color_play;
        if (c == "start") if (this.s.bg == 1) if (g * this.s.scale2 > this.s.bg_h || d * this.s.scale2 > this.s.bg_w) {
            g *= this.s.scale2;
            d *= this.s.scale2
        } else {
            g = this.s.bg_h;
            d = this.s.bg_w
        } else {
            g *= this.s.scale2;
            d *= this.s.scale2
        }
        this.canvas = document.createElement("canvas");
        this.canvas.height = g * this.s.scale;
        this.canvas.width = d * this.s.scale;
        this.ctx = this.canvas.getContext("2d");
        if (this.s.bg == 1) {
            h = new ea({
                w: d * this.s.scale,
                h: g * this.s.scale,
                o: g / 2 * this.s.bg_o * this.s.scale,
                bgc: this.s.bgcolor,
                sh: this.s.bg_sh,
                sh_c: this.s.sh_c,
                sh_a: this.s.sh_a
            });
            this.c.appendChild(h.c);
            this.s.bg_a && (h.c.style.opacity = this.s.bg_a);
            if (this.s.bg_gl == 1) {
                h = new ea({
                    w: d * this.s.scale,
                    h: g * this.s.scale,
                    o: g / 2 * this.s.bg_o * this.s.scale,
                    bgc: this.s.gl_color + "|" + this.s.gl_color,
                    bga1: this.s.gl_a1,
                    bga2: this.s.gl_a2
                });
                this.c.appendChild(h.c);
                e(h.canvas, {
                    position: "absolute",
                    top: 0,
                    left: d * this.s.scale / 8,
                    height: g * this.s.scale / 2,
                    width: d * this.s.scale - d * this.s.scale / 4
                })
            }
        }
        this.fstyle = "";
        if (this.s.color.indexOf("|") > 0) {
            h = this.s.color.split("|");
            r = this.ctx.createLinearGradient(0, 0, 0, g * this.s.scale);
            for (this.j = 0; this.j < h.length - 1; this.j++) r.addColorStop(this.j / (h.length - 1), "#" + h[this.j]);
            r.addColorStop(1, "#" + h[h.length - 1]);
            this.fstyle = r
        } else this.fstyle = "#" + this.s.color;
        this.ctx.fillStyle = this.fstyle;
        if (this.s.sh == 1) {
            this.ctx.shadowOffsetX = 0;
            this.ctx.shadowOffsetY = this.s.sh_under == 1 ? 2 : 0;
            this.ctx.shadowBlur = 5;
            this.ctx.shadowColor = "rgba(" + HTR("#" + this.s.sh_c) + "," + HTG("#" + this.s.sh_c) + "," + HTB("#" + this.s.sh_c) + "," + this.s.sh_a + ")"
        }
        if (c == "play" || c == "start") {
            h = c == "play" ? this.s.scale : this.s.scale2;
            if (this.s.icon == 0) {
                this.ctx.beginPath();
                this.ctx.moveTo(6 * h, 4 * h);
                this.ctx.lineTo(16 * h, 9 * h);
                this.ctx.lineTo(6 * h, 15 * h);
                this.ctx.lineTo(6 * h, 4 * h);
                this.ctx.closePath();
                this.ctx.fill()
            }
            if (this.s.icon == 1) {
                this.ctx.beginPath();
                this.ctx.moveTo(6 * h, 5 * h);
                this.ctx.quadraticCurveTo(6 * h, 4 * h, 7 * h, 4 * h);
                this.ctx.lineTo(15 * h, 9 * h);
                this.ctx.quadraticCurveTo(16 * h, 10 * h, 15 * h, 11 * h);
                this.ctx.lineTo(7 * h, 16 * h);
                this.ctx.quadraticCurveTo(6 * h, 16 * h, 6 * h, 15 * h);
                this.ctx.lineTo(6 * h, 5 * h);
                this.ctx.closePath();
                this.ctx.fill()
            }
            if (this.s.icon == 2) {
                this.ctx.moveTo(6 * h, 5 * h);
                this.ctx.lineTo(15 * h, 10 * h);
                this.ctx.lineTo(6 * h, 15 * h);
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.lineWidth = 3 * h;
                this.ctx.stroke()
            }
            if (this.s.icon == 3) {
                this.ctx.beginPath();
                this.ctx.moveTo(6 * h, 4 * h);
                this.ctx.lineTo(16 * h, 10 * h);
                this.ctx.lineTo(6 * h, 16 * h);
                this.ctx.lineTo(6 * h, 4 * h);
                this.ctx.lineTo(6 * h, 5 * h);
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.lineWidth = 1.5 * h;
                this.ctx.stroke()
            }
        }
        if (c == "pause") {
            if (this.s.icon == 0) {
                this.ctx.beginPath();
                this.ctx.fillRect(6 * this.s.scale, 5 * this.s.scale, 3 * this.s.scale, 10 * this.s.scale);
                this.ctx.fillRect(12 * this.s.scale, 5 * this.s.scale, 3 * this.s.scale, 10 * this.s.scale);
                this.ctx.closePath();
                this.ctx.fill()
            }
            if (this.s.icon > 0) {
                this.ctx.beginPath();
                this.ctx.moveTo(7 * this.s.scale, 5 * this.s.scale);
                this.ctx.lineTo(7 * this.s.scale, 15 * this.s.scale);
                this.ctx.moveTo(14 * this.s.scale, 5 * this.s.scale);
                this.ctx.lineTo(14 * this.s.scale, 15 * this.s.scale);
                this.ctx.closePath();
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.lineWidth = 3 * this.s.scale;
                this.ctx.stroke()
            }
        }
        if (c == "stop") {
            if (this.s.icon == 0) {
                this.ctx.beginPath();
                this.ctx.moveTo(5 * this.s.scale, 5 * this.s.scale);
                this.ctx.lineTo(15 * this.s.scale, 5 * this.s.scale);
                this.ctx.lineTo(15 * this.s.scale, 15 * this.s.scale);
                this.ctx.lineTo(5 * this.s.scale, 15 * this.s.scale);
                this.ctx.closePath();
                this.ctx.lineWidth = 0.1;
                this.ctx.stroke();
                this.ctx.fill()
            }
            if (this.s.icon == 1) {
                this.ctx.beginPath();
                this.ctx.moveTo(6 * this.s.scale, 6 * this.s.scale);
                this.ctx.lineTo(14 * this.s.scale, 15 * this.s.scale);
                this.ctx.lineTo(6 * this.s.scale, 6 * this.s.scale);
                this.ctx.moveTo(14 * this.s.scale, 6 * this.s.scale);
                this.ctx.lineTo(6 * this.s.scale, 15 * this.s.scale);
                this.ctx.lineTo(14 * this.s.scale, 6 * this.s.scale);
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.lineWidth = 3 * this.s.scale;
                this.ctx.stroke();
                this.ctx.fill()
            }
            if (this.s.icon == 2) {
                this.ctx.beginPath();
                this.ctx.moveTo(6 * this.s.scale, 6 * this.s.scale);
                this.ctx.lineTo(14 * this.s.scale, 6 * this.s.scale);
                this.ctx.lineTo(14 * this.s.scale, 14 * this.s.scale);
                this.ctx.lineTo(6 * this.s.scale, 14 * this.s.scale);
                this.ctx.closePath();
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.lineWidth = 4 * this.s.scale;
                this.ctx.stroke();
                this.ctx.fill()
            }
            if (this.s.icon == 3) {
                this.ctx.beginPath();
                this.ctx.lineWidth = 1.5 * this.s.scale;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.strokeRect(5 * this.s.scale, 5 * this.s.scale, 11 * this.s.scale, 11 * this.s.scale);
                this.ctx.closePath();
                this.ctx.stroke()
            }
        }
        if (c == "back") {
            if (this.s.icon == 0) {
                this.ctx.beginPath();
                this.ctx.moveTo(4 * this.s.scale, 10 * this.s.scale);
                this.ctx.lineTo(14 * this.s.scale, 5 * this.s.scale);
                this.ctx.lineTo(14 * this.s.scale, 10 * this.s.scale);
                this.ctx.lineTo(24 * this.s.scale, 5 * this.s.scale);
                this.ctx.lineTo(24 * this.s.scale, 15 * this.s.scale);
                this.ctx.lineTo(14 * this.s.scale, 10 * this.s.scale);
                this.ctx.lineTo(14 * this.s.scale, 15 * this.s.scale);
                this.ctx.closePath();
                this.ctx.lineWidth = 0.1;
                this.ctx.stroke();
                this.ctx.fill()
            }
            if (this.s.icon == 1 || this.s.icon == 2) {
                this.ctx.beginPath();
                this.ctx.moveTo(5 * this.s.scale, 10 * this.s.scale);
                this.ctx.lineTo(13 * this.s.scale, 6 * this.s.scale);
                this.ctx.lineTo(13 * this.s.scale, 10 * this.s.scale);
                this.ctx.lineTo(23 * this.s.scale, 5 * this.s.scale);
                this.ctx.lineTo(23 * this.s.scale, 15 * this.s.scale);
                this.ctx.lineTo(13 * this.s.scale, 10 * this.s.scale);
                this.ctx.lineTo(13 * this.s.scale, 15 * this.s.scale);
                this.ctx.closePath();
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.lineWidth = 2 * this.s.scale;
                this.ctx.stroke();
                this.ctx.fill()
            }
            if (this.s.icon == 3) {
                this.ctx.beginPath();
                this.ctx.moveTo(5 * this.s.scale, 10 * this.s.scale);
                this.ctx.lineTo(15 * this.s.scale, 4 * this.s.scale);
                this.ctx.lineTo(15 * this.s.scale, 10 * this.s.scale);
                this.ctx.lineTo(25 * this.s.scale, 4 * this.s.scale);
                this.ctx.lineTo(25 * this.s.scale, 16 * this.s.scale);
                this.ctx.lineTo(15 * this.s.scale, 10 * this.s.scale);
                this.ctx.lineTo(15 * this.s.scale, 16 * this.s.scale);
                this.ctx.lineTo(5 * this.s.scale, 10 * this.s.scale);
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.lineWidth = 1.5 * this.s.scale;
                this.ctx.stroke()
            }
        }
        if (c == "volume" || c == "volume_mute") {
            if (this.s.icon == 0) {
                this.ctx.beginPath();
                this.ctx.moveTo(5 * this.s.scale, 8 * this.s.scale);
                this.ctx.lineTo(9 * this.s.scale, 8 * this.s.scale);
                this.ctx.lineTo(14 * this.s.scale, 4 * this.s.scale);
                this.ctx.lineTo(14 * this.s.scale, 15 * this.s.scale);
                this.ctx.lineTo(9 * this.s.scale, 11 * this.s.scale);
                this.ctx.lineTo(5 * this.s.scale, 11 * this.s.scale);
                this.ctx.lineTo(5 * this.s.scale, 8 * this.s.scale);
                if (c == "volume") {
                    this.ctx.moveTo(15 * this.s.scale, 7 * this.s.scale);
                    this.ctx.lineTo(16 * this.s.scale, 7 * this.s.scale);
                    this.ctx.lineTo(16 * this.s.scale, 12 * this.s.scale);
                    this.ctx.lineTo(15 * this.s.scale, 12 * this.s.scale);
                    this.ctx.lineTo(15 * this.s.scale, 7 * this.s.scale)
                }
                this.ctx.closePath();
                this.ctx.lineWidth = 0.1;
                this.ctx.stroke();
                this.ctx.fill()
            }
            if (this.s.icon == 1) {
                this.ctx.beginPath();
                this.ctx.moveTo(4 * this.s.scale, 7 * this.s.scale);
                this.ctx.lineTo(6 * this.s.scale, 7 * this.s.scale);
                this.ctx.lineTo(6 * this.s.scale, 13 * this.s.scale);
                this.ctx.lineTo(4 * this.s.scale, 13 * this.s.scale);
                this.ctx.lineTo(4 * this.s.scale, 7 * this.s.scale);
                this.ctx.moveTo(7 * this.s.scale, 7 * this.s.scale);
                this.ctx.lineTo(13 * this.s.scale, 2 * this.s.scale);
                this.ctx.lineTo(13 * this.s.scale, 17 * this.s.scale);
                this.ctx.lineTo(7 * this.s.scale, 13 * this.s.scale);
                this.ctx.closePath();
                if (c == "volume") {
                    this.ctx.moveTo(15 * this.s.scale, 8 * this.s.scale);
                    this.ctx.arc(15 * this.s.scale, 10 * this.s.scale, 4 * this.s.scale, Math.PI * 1.6, Math.PI / 2.3, false);
                    this.ctx.lineTo(15 * this.s.scale, 12 * this.s.scale);
                    this.ctx.arc(14 * this.s.scale, 10 * this.s.scale, 4 * this.s.scale, Math.PI / 2.3, Math.PI * 1.6, true);
                    this.ctx.moveTo(16 * this.s.scale, 9 * this.s.scale);
                    this.ctx.lineTo(16 * this.s.scale, 11 * this.s.scale);
                    this.ctx.lineTo(15 * this.s.scale, 11 * this.s.scale);
                    this.ctx.lineTo(15 * this.s.scale, 9 * this.s.scale)
                }
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.lineWidth = 0.1;
                this.ctx.stroke();
                this.ctx.fill()
            }
            if (this.s.icon == 2) {
                this.ctx.beginPath();
                ovalX = 8 * this.s.scale;
                ovalY = 14 * this.s.scale;
                ovalW = 7 * this.s.scale;
                ovalH = 3 * this.s.scale;
                this.ctx.moveTo(ovalX, ovalY - ovalH / 2);
                this.ctx.bezierCurveTo(ovalX - ovalW / 2, ovalY - ovalH / 2, ovalX - ovalW / 2, ovalY + ovalH / 2, ovalX, ovalY + ovalH / 2);
                this.ctx.bezierCurveTo(ovalX + ovalW / 2, ovalY + ovalH / 2, ovalX + ovalW / 2, ovalY - ovalH / 2, ovalX, ovalY - ovalH / 2);
                this.ctx.moveTo(10 * this.s.scale, 14 * this.s.scale);
                this.ctx.lineTo(11 * this.s.scale, 3 * this.s.scale);
                this.ctx.quadraticCurveTo(13 * this.s.scale, 4 * this.s.scale, 13 * this.s.scale, 5 * this.s.scale);
                this.ctx.quadraticCurveTo(15 * this.s.scale, 6 * this.s.scale, 17 * this.s.scale, 6 * this.s.scale);
                this.ctx.quadraticCurveTo(14 * this.s.scale, 8 * this.s.scale, 11 * this.s.scale, 5 * this.s.scale);
                this.ctx.lineTo(10 * this.s.scale, 14 * this.s.scale);
                this.ctx.closePath();
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineWidth = 0.7;
                this.ctx.stroke();
                this.ctx.fill()
            }
            if (this.s.icon == 3) {
                this.ctx.beginPath();
                this.ctx.lineWidth = 1.5 * this.s.scale;
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.moveTo(3 * this.s.scale, 8 * this.s.scale);
                this.ctx.lineTo(6 * this.s.scale, 8 * this.s.scale);
                this.ctx.lineTo(12 * this.s.scale, 4 * this.s.scale);
                this.ctx.lineTo(12 * this.s.scale, 16 * this.s.scale);
                this.ctx.lineTo(6 * this.s.scale, 12 * this.s.scale);
                this.ctx.lineTo(3 * this.s.scale, 12 * this.s.scale);
                this.ctx.lineTo(3 * this.s.scale, 8 * this.s.scale);
                this.ctx.lineTo(6 * this.s.scale, 8 * this.s.scale);
                this.ctx.lineTo(6 * this.s.scale, 12 * this.s.scale);
                if (c == "volume") {
                    this.ctx.moveTo(15 * this.s.scale, 7 * this.s.scale);
                    this.ctx.lineTo(18 * this.s.scale, 4 * this.s.scale);
                    this.ctx.moveTo(15 * this.s.scale, 10 * this.s.scale);
                    this.ctx.lineTo(19 * this.s.scale, 10 * this.s.scale);
                    this.ctx.moveTo(15 * this.s.scale, 13 * this.s.scale);
                    this.ctx.lineTo(18 * this.s.scale, 16 * this.s.scale)
                }
                this.ctx.stroke()
            }
        }
        if (c == "playlist") if (this.s.icon == 0) {
            this.ctx.beginPath();
            this.ctx.moveTo(6 * this.s.scale, 7 * this.s.scale);
            this.ctx.lineTo(13 * this.s.scale, 7 * this.s.scale);
            this.ctx.lineTo(13 * this.s.scale, 14 * this.s.scale);
            this.ctx.lineTo(6 * this.s.scale, 14 * this.s.scale);
            this.ctx.closePath();
            this.ctx.strokeStyle = "#" + this.s.color;
            this.ctx.lineCap = "round";
            this.ctx.lineJoin = "round";
            this.ctx.lineWidth = 4 * this.s.scale;
            this.ctx.stroke();
            this.ctx.fill();
            this.ctx.clearRect(5 * this.s.scale, 6 * this.s.scale, 9 * this.s.scale, 9 * this.s.scale);
            this.ctx.fillRect(6 * this.s.scale, 7 * this.s.scale, 7 * this.s.scale, 1 * this.s.scale);
            this.ctx.fillRect(6 * this.s.scale, 9 * this.s.scale, 7 * this.s.scale, 1 * this.s.scale);
            this.ctx.fillRect(6 * this.s.scale, 11 * this.s.scale, 7 * this.s.scale, 1 * this.s.scale);
            this.ctx.fillRect(6 * this.s.scale, 13 * this.s.scale, 7 * this.s.scale, 1 * this.s.scale);
            this.ctx.closePath()
        }
        if (c == "full" || c == "full_back") {
            if (this.s.icon == 0) {
                this.ctx.beginPath();
                this.ctx.moveTo(6 * this.s.scale, 7 * this.s.scale);
                this.ctx.lineTo(13 * this.s.scale, 7 * this.s.scale);
                this.ctx.lineTo(13 * this.s.scale, 14 * this.s.scale);
                this.ctx.lineTo(6 * this.s.scale, 14 * this.s.scale);
                this.ctx.closePath();
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.lineWidth = 4 * this.s.scale;
                this.ctx.stroke();
                this.ctx.fill();
                this.ctx.clearRect(5 * this.s.scale, 6 * this.s.scale, 9 * this.s.scale, 9 * this.s.scale);
                if (c == "full_back") {
                    this.ctx.fillRect(6 * this.s.scale, 13 * this.s.scale, 3 * this.s.scale, 1 * this.s.scale);
                    this.ctx.fillRect(6 * this.s.scale, 10 * this.s.scale, 1 * this.s.scale, 3 * this.s.scale)
                } else {
                    this.ctx.fillRect(10 * this.s.scale, 7 * this.s.scale, 3 * this.s.scale, 1 * this.s.scale);
                    this.ctx.fillRect(12 * this.s.scale, 7 * this.s.scale, 1 * this.s.scale, 3 * this.s.scale)
                }
                this.ctx.closePath()
            }
            if (this.s.icon == 1) {
                this.ctx.beginPath();
                if (c == "full_back") {
                    this.ctx.fillRect(7 * this.s.scale, 4 * this.s.scale, 11 * this.s.scale, 7 * this.s.scale);
                    this.ctx.clearRect(8 * this.s.scale, 5 * this.s.scale, 9 * this.s.scale, 5 * this.s.scale);
                    this.ctx.fillRect(2 * this.s.scale, 7 * this.s.scale, 13 * this.s.scale, 8 * this.s.scale);
                    this.ctx.clearRect(3 * this.s.scale, 8 * this.s.scale, 11 * this.s.scale, 6 * this.s.scale)
                } else {
                    this.ctx.fillRect(2 * this.s.scale, 8 * this.s.scale, 11 * this.s.scale, 7 * this.s.scale);
                    this.ctx.clearRect(3 * this.s.scale, 9 * this.s.scale, 9 * this.s.scale, 5 * this.s.scale);
                    this.ctx.fillRect(5 * this.s.scale, 4 * this.s.scale, 13 * this.s.scale, 8 * this.s.scale);
                    this.ctx.clearRect(6 * this.s.scale, 5 * this.s.scale, 11 * this.s.scale, 6 * this.s.scale)
                }
                this.ctx.closePath()
            }
            if (this.s.icon == 2) {
                this.ctx.beginPath();
                this.ctx.moveTo(2 * this.s.scale, 2 * this.s.scale);
                this.ctx.lineTo(6 * this.s.scale, 2 * this.s.scale);
                this.ctx.lineTo(5 * this.s.scale, 3 * this.s.scale);
                this.ctx.lineTo(7 * this.s.scale, 5.5 * this.s.scale);
                this.ctx.lineTo(5.5 * this.s.scale, 7 * this.s.scale);
                this.ctx.lineTo(3 * this.s.scale, 5 * this.s.scale);
                this.ctx.lineTo(2 * this.s.scale, 6 * this.s.scale);
                this.ctx.lineTo(2 * this.s.scale, 2 * this.s.scale);
                this.ctx.moveTo(14 * this.s.scale, 2 * this.s.scale);
                this.ctx.lineTo(18 * this.s.scale, 2 * this.s.scale);
                this.ctx.lineTo(18 * this.s.scale, 6 * this.s.scale);
                this.ctx.lineTo(17 * this.s.scale, 5 * this.s.scale);
                this.ctx.lineTo(14.5 * this.s.scale, 7 * this.s.scale);
                this.ctx.lineTo(13 * this.s.scale, 5.5 * this.s.scale);
                this.ctx.lineTo(15 * this.s.scale, 3 * this.s.scale);
                this.ctx.lineTo(14 * this.s.scale, 2 * this.s.scale);
                this.ctx.moveTo(14.5 * this.s.scale, 13 * this.s.scale);
                this.ctx.lineTo(17 * this.s.scale, 15 * this.s.scale);
                this.ctx.lineTo(18 * this.s.scale, 14 * this.s.scale);
                this.ctx.lineTo(18 * this.s.scale, 18 * this.s.scale);
                this.ctx.lineTo(14 * this.s.scale, 18 * this.s.scale);
                this.ctx.lineTo(15 * this.s.scale, 17 * this.s.scale);
                this.ctx.lineTo(13 * this.s.scale, 14.5 * this.s.scale);
                this.ctx.lineTo(14.5 * this.s.scale, 13 * this.s.scale);
                this.ctx.moveTo(5.5 * this.s.scale, 13 * this.s.scale);
                this.ctx.lineTo(7 * this.s.scale, 14.5 * this.s.scale);
                this.ctx.lineTo(5 * this.s.scale, 17 * this.s.scale);
                this.ctx.lineTo(6 * this.s.scale, 18 * this.s.scale);
                this.ctx.lineTo(2 * this.s.scale, 18 * this.s.scale);
                this.ctx.lineTo(2 * this.s.scale, 14 * this.s.scale);
                this.ctx.lineTo(3 * this.s.scale, 15 * this.s.scale);
                this.ctx.lineTo(5.5 * this.s.scale, 13 * this.s.scale);
                this.ctx.closePath();
                this.ctx.fill();
                this.ctx.save();
                this.ctx.beginPath();
                this.ctx.fillStyle = "rgba(" + HTR(this.s.color) + "," + HTG(this.s.color) + "," + HTB(this.s.color) + ",0.5)";
                this.ctx.fillRect(7 * this.s.scale, 7 * this.s.scale, 6 * this.s.scale, 6 * this.s.scale);
                this.ctx.closePath()
            }
            if (this.s.icon == 3) {
                this.ctx.beginPath();
                if (c == "full_back") {
                    this.ctx.moveTo(18 * this.s.scale, 2 * this.s.scale);
                    this.ctx.lineTo(2 * this.s.scale, 16 * this.s.scale);
                    this.ctx.lineTo(5 * this.s.scale, 10 * this.s.scale);
                    this.ctx.moveTo(2 * this.s.scale, 16 * this.s.scale);
                    this.ctx.lineTo(10 * this.s.scale, 14 * this.s.scale)
                } else {
                    this.ctx.moveTo(3 * this.s.scale, 18 * this.s.scale);
                    this.ctx.lineTo(17 * this.s.scale, 2 * this.s.scale);
                    this.ctx.lineTo(8 * this.s.scale, 6 * this.s.scale);
                    this.ctx.moveTo(17 * this.s.scale, 2 * this.s.scale);
                    this.ctx.lineTo(15 * this.s.scale, 11 * this.s.scale)
                }
                this.ctx.closePath();
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.lineWidth = 1 * this.s.scale;
                this.ctx.stroke();
                this.ctx.closePath()
            }
        }
        if (c == "menu") {
            if (this.s.icon == 0) {
                this.ctx.beginPath();
                this.ctx.moveTo(6 * this.s.scale, 7 * this.s.scale);
                this.ctx.lineTo(13 * this.s.scale, 7 * this.s.scale);
                this.ctx.lineTo(13 * this.s.scale, 14 * this.s.scale);
                this.ctx.lineTo(6 * this.s.scale, 14 * this.s.scale);
                this.ctx.closePath();
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.lineWidth = 4 * this.s.scale;
                this.ctx.stroke();
                this.ctx.fill();
                this.ctx.clearRect(5 * this.s.scale, 6 * this.s.scale, 9 * this.s.scale, 9 * this.s.scale);
                this.ctx.fillRect(9 * this.s.scale, 10 * this.s.scale, 1 * this.s.scale, 6 * this.s.scale);
                this.ctx.fillRect(9 * this.s.scale, 8 * this.s.scale, 1 * this.s.scale, 1 * this.s.scale);
                this.ctx.closePath()
            }
            if (this.s.icon == 1) {
                this.ctx.moveTo(8.5 * this.s.scale, 5.5 * this.s.scale);
                this.ctx.lineTo(3 * this.s.scale, 9 * this.s.scale);
                this.ctx.lineTo(8.5 * this.s.scale, 12.5 * this.s.scale);
                this.ctx.moveTo(11.5 * this.s.scale, 5.5 * this.s.scale);
                this.ctx.lineTo(17 * this.s.scale, 9 * this.s.scale);
                this.ctx.lineTo(11.5 * this.s.scale, 12.5 * this.s.scale);
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.lineWidth = 2 * this.s.scale;
                this.ctx.stroke()
            }
            if (this.s.icon == 2) {
                this.ctx.arc(10 * this.s.scale, 7 * this.s.scale, 3 * this.s.scale, Math.PI / 2, -Math.PI, true);
                this.ctx.moveTo(10 * this.s.scale, 10 * this.s.scale);
                this.ctx.lineTo(10 * this.s.scale, 12 * this.s.scale);
                this.ctx.moveTo(10 * this.s.scale, 15 * this.s.scale);
                this.ctx.arc(10 * this.s.scale, 15 * this.s.scale, 0.5 * this.s.scale, 0, Math.PI * 2);
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.lineWidth = 2 * this.s.scale;
                this.ctx.stroke()
            }
            if (this.s.icon == 3) {
                this.ctx.arc(6 * this.s.scale, 10 * this.s.scale, 2 * this.s.scale, 0, Math.PI * 2);
                this.ctx.moveTo(14 * this.s.scale, 6 * this.s.scale);
                this.ctx.arc(14 * this.s.scale, 6 * this.s.scale, 2 * this.s.scale, 0, Math.PI * 2);
                this.ctx.moveTo(14 * this.s.scale, 14 * this.s.scale);
                this.ctx.arc(14 * this.s.scale, 14 * this.s.scale, 2 * this.s.scale, 0, Math.PI * 2);
                this.ctx.moveTo(6 * this.s.scale, 10 * this.s.scale);
                this.ctx.lineTo(14 * this.s.scale, 6 * this.s.scale);
                this.ctx.moveTo(6 * this.s.scale, 10 * this.s.scale);
                this.ctx.lineTo(14 * this.s.scale, 14 * this.s.scale);
                this.ctx.strokeStyle = "#" + this.s.color;
                this.ctx.lineCap = "round";
                this.ctx.lineJoin = "round";
                this.ctx.lineWidth = 1.5 * this.s.scale;
                this.ctx.stroke();
                this.ctx.fill()
            }
        }
        if (c == "line" || c == "volbarline") {
            this.ctx.beginPath();
            this.ctx.moveTo(0, 10 - this.s.h / 2);
            this.ctx.lineTo(d, 10 - this.s.h / 2);
            this.ctx.lineTo(d, 10 + this.s.h / 2);
            this.ctx.lineTo(0, 10 + this.s.h / 2);
            this.ctx.lineTo(0, 10 - this.s.h / 2);
            this.ctx.lineWidth = 0.1;
            this.ctx.stroke();
            this.ctx.closePath();
            this.ctx.fill()
        }
        if (c.indexOf("time") == 0) {
            this.c.innerHTML = "0:00";
            this.s.icon == 0 && (this.font = 10 * this.s.scale + "px Verdana");
            this.s.icon == 1 && (this.font = 9 * this.s.scale + "px Tahoma");
            this.s.icon == 2 && (this.font = 10 * this.s.scale + "px Arial");
            this.s.icon == 3 && (this.font = 11 * this.s.scale + "px _serif");
            e(this.c, {
                width: d,
                color: "#" + this.s.color,
                font: this.font,
                "text-align": "center",
                margin: (10 * this.s.scale - 10) / 2 + "px 0 0 0"
            })
        }
        if (c == "buffer") {
            this.c.innerHTML = "";
            e(this.c, {
                display: "none",
                width: d,
                color: "#" + this.s.color,
                font: "10px Arial",
                "text-align": "left"
            })
        }
        this.c.appendChild(this.canvas);
        e(this.canvas, {
            width: d * this.s.scale * (this.s.bg == 1 && this.s.bg_smallicon == 1 ? 0.8 : 1),
            height: g * this.s.scale * (this.s.bg == 1 && this.s.bg_smallicon == 1 ? 0.8 : 1),
            position: "absolute",
            top: Math.round(c == "start" ? g / 2 - 10 * this.s.scale2 + 2 * this.s.scale : this.s.bg == 1 && this.s.bg_smallicon == 1 ? 2 * this.s.scale : 0),
            left: Math.round(c == "start" ? d / 2 - 10 * this.s.scale2 + 2 * this.s.scale : (this.s.bg == 1 && this.s.bg_smallicon == 1 ? 2 * this.s.scale : 0) + (1 - this.s.scale) * 10),
            opacity: this.s.alpha
        });
        this.w = d;
        this.h = g * this.s.scale
    }
    function e(c, d) {
        for (var g in d) {
            typeof d[g] == "number" && g != "opacity" && (d[g] += "px");
            c.style[g] = d[g]
        }
    }
    function Ua(c) {
        if (typeof c.onselectstart != "undefined") c.onselectstart = function () {
            return false
        };
        else if (typeof c.style.MozUserSelect != "undefined") c.style.MozUserSelect = "none";
        else c.onmousedown = function () {
            return false
        };
        c.style.cursor = "default"
    }
    function ea(c) {
        this.c = document.createElement("div");
        this.canvas = document.createElement("canvas");
        this.canvas.height = c.h;
        this.canvas.width = c.w;
        var d = this.canvas.getContext("2d");
        !c.h0 && (c.h0 = 0);
        if (c.bgc.indexOf("|") > 0) {
            for (var g = c.bgc.split("|"), h = d.createLinearGradient(0, c.h0, 0, c.h), r = 0; r < g.length - 1; r++) h.addColorStop(r / (g.length - 1), "#" + g[r]);
            h.addColorStop(1, "#" + g[g.length - 1]);
            c.bga1 != undefined && h.addColorStop(0, "rgba(" + HTR(g[0]) + "," + HTG(g[0]) + "," + HTB(g[0]) + "," + c.bga1 + ")");
            c.bga2 != undefined && h.addColorStop(0.999, "rgba(" + HTR(g[g.length - 1]) + "," + HTG(g[g.length - 1]) + "," + HTB(g[g.length - 1]) + "," + c.bga2 + ")");
            d.fillStyle = h
        } else d.fillStyle = "#" + c.bgc;
        if (c.o > 0) {
            if (c.o == c.w / 2) {
                d.beginPath();
                d.arc(c.w / 2, c.h / 2, c.w / 2, 0, Math.PI * 2);
                d.closePath()
            } else {
                d.beginPath();
                d.moveTo(c.onotop == 1 ? 0 : c.o, 0);
                d.lineTo(c.w - (c.onotop == 1 ? 0 : c.o), 0);
                c.onotop == 1 || d.quadraticCurveTo(c.w, 0, c.w, c.o);
                d.lineTo(c.w, c.h - c.o);
                d.quadraticCurveTo(c.w, c.h, c.w - c.o, c.h);
                d.lineTo(c.o, c.h);
                d.quadraticCurveTo(0, c.h, 0, c.h - c.o);
                d.lineTo(0, c.o);
                c.onotop == 1 || d.quadraticCurveTo(0, 0, c.o, 0);
                !c.brdc && (c.brdc = "cccccc");
                d.strokeStyle = "#" + c.brdc;
                if (c.brd == 0 || !c.brd) c.brd = 0.1;
                d.lineWidth = c.brd;
                d.stroke()
            }
            d.fill()
        } else d.fillRect(0, 0, c.w, c.h);
        this.c.appendChild(this.canvas)
    }
    function Pb() {
        this.auto = "firstframe";
        this.addcontrols = "";
        this.airplay = 0;
        this.bgcolor = "ffffff";
        this.bodycolor = "000000";
        this.brd = 0;
        this.brdcolor = "cccccc";
        this.buffersec = 5;
        this.cntrlbg = 1;
        this.cntrlbgcolor = "000000|000000";
        this.cntrlbgalpha1 = 0.15;
        this.cntrlbgalpha2 = 0.7;
        this.cntrlendmargin = 7;
        this.cntrlhide = 0;
        this.cntrlmargin = 3;
        this.cntrlout = this.cntrlmarginleft = this.cntrlmarginright = 0;
        this.cntrloutheight = 35;
        this.cntrlsize = 1;
        this.cntrlbuffer = {
            center: 0
        };
        this.cntrl_buffer = {};
        this.cntrlfull = {
            out: 0
        };
        this.cntrl_full = {};
        this.cntrlstyle = {
            icon: 0,
            color: "ffffff",
            bg: 0,
            bg_o: 1,
            bg_smallicon: 1,
            bgcolor: "000000",
            bg_sh: "0",
            bg_in: "0",
            bg_gl: "0",
            gl_a1: 0.9,
            gl_a2: 0.1,
            gl_color: "FFFFFF",
            sh_blur: 6,
            sh_dist: 0,
            bg_a: 1,
            bg_w: 20,
            bg_h: 20,
            scale: 1,
            eff: 0,
            effE: "Cubic",
            sh: 0,
            sh_c: "000000",
            sh_a: 0.5,
            sh_under: 1,
            notip: 0,
            text: 0,
            center: 0,
            marginleft: 0,
            marginright: 0,
            margintop: 0,
            marginbottom: 0,
            alpha: 1
        };
        this.cntrlplay = {};
        this.cntrl_play = {};
        this.cntrlpause = {};
        this.cntrl_pause = {};
        this.cntrlstop = {};
        this.cntrl_stop = {};
        this.cntrlline = {
            h: 4,
            all_a: 0.3,
            load_a: 0.4,
            play_a: 1,
            click: 1,
            color_play: "ffffff",
            color_all: "ffffff",
            color_load: "ffffff"
        };
        this.cntrl_line = {};
        this.cntrl_volbarline = {};
        this.cntrlvolbarline = {
            h: 4,
            w: 40,
            all_a: 0.4,
            play_a: 1,
            color_play: "ffffff",
            color_all: "ffffff"
        };
        this.cntrl_tune = {};
        this.cntrl_volume = {};
        this.cntrlvolume = {};
        this.cntrl_sound = {};
        this.cntrlmenu = {};
        this.cntrl_menu = {};
        this.cntrlplaylist = {};
        this.cntrl_playlist = {};
        this.cntrlstart = {
            bg: 1,
            bg_sh: 1,
            bgcolor: "ffffff",
            bg_a: 0.1,
            bg_w: 75,
            bg_h: 75,
            gl_a1: 0.8,
            gl_a2: 0,
            eff: 1,
            scale2: 2,
            curtain: "0",
            curtainColor: "000000",
            curtainAlpha: 0.5,
            notip: 1,
            bg_smallicon: 0
        };
        this.cntrl_start = {};
        this.comment = "";
        this.shownameonstop = this.shownameonover = this.shownameliketip = this.showname = 0;
        this.stageposition = "";
        this.stagetop = this.stageleft = 0;
        this.commentcolor = "ffffff";
        this.commentbgcolor = "000000";
        this.commentbgcolor_k = false;
        this.commentbgalpha1 = 0.5;
        this.commentbgalpha2 = 0.1;
        this.commentalign = "left";
        this.commenttopmargin = 0;
        this.commentmargin = 10;
        this.controls = "";
        this.videocontrols = "play,back,time_play,line,time_all,volume,volbarline,full,buffer";
        this.audiocontrols = "play,back,time_play,line,time_all,volume,volbarline,buffer";
        this.streamcontrols = "play,time_play,volume,volbarline";
        this.debug = 0;
        this.embedcode = this.download = "";
        this.events = [];
        this.eventplayed = this.eventtime = 0;
        this.file = "";
        this.htmlsize = 0;
        this.link = this.plr = this.iframelink = this.iframe = this.id = "";
        this.m = "video";
        this.menuauto = this.menu_w = this.menu_h = this.menu_nocode = 0;
        this.namefont = "Verdana";
        this.namefontsize = 11;
        this.namefontstyle = "normal";
        this.namebgalpha = 0;
        this.namebgcolor = "000000";
        this.namebgo = 8;
        this.namebgshadow = 0;
        this.namecolor = "ffffff";
        this.namemargin_v = this.namemargin_h = 0;
        this.namepadding = 6;
        this.nametopanel = this.nameleading = 0;
        this.nohtml5 = "uppod.swf";
        this.padding = this.o = 0;
        this.pl = this.poster = "";
        this.plplace = "inside";
        this.plw = 100;
        this.plh = 70;
        this.plcolor2 = this.plcolor = "ffffff";
        this.plbgcolor = "000000";
        this.plalpha = 0.2;
        this.plalpha2 = 0.1;
        this.plmargin = 0;
        this.plmargin_h = 10;
        this.plmargin_v = 0;
        this.pltags2 = this.pltags1 = "";
        this.plfont = "Arial";
        this.plfontsize = 11;
        this.reloadertime = this.reloadercounter = this.reloader = this.radio = 0;
        this.screencolor = "000000";
        this.scrn_h = this.scrn_w = 0;
        this.volume = 0.8;
        this.w = 232;
        this.h = 174;
        this.st = "";
        this.stg = document.getElementById(k.id);
        this.stg == null && alert("Uppod: ID (" + k.id + ") not found");
        this.sw = mediaWidth = this.stg.offsetWidth;
        this.sh = mediaHeight = this.stg.offsetHeight;
        this.lang = "ru";
        this.lang_ru = {
            lang: "ru",
            localization: {
                back: "\u0412 \u043d\u0430\u0447\u0430\u043b\u043e",
                play: "\u041f\u0443\u0441\u043a",
                pause: "\u041f\u0430\u0443\u0437\u0430",
                stop: "\u0421\u0442\u043e\u043f",
                full: "\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c",
                full_back: "\u0421\u0432\u0435\u0440\u043d\u0443\u0442\u044c",
                list: "\u041f\u043b\u0435\u0439\u043b\u0438\u0441\u0442",
                next: "\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439",
                download: "\u0421\u043a\u0430\u0447\u0430\u0442\u044c",
                prev: "\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439",
                sound_off: "\u0412\u043a\u043b. \u0437\u0432\u0443\u043a",
                sound: "\u0412\u044b\u043a\u043b. \u0437\u0432\u0443\u043a",
                volume: "\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c",
                menu: "\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f",
                menu_code: "\u041a\u043e\u0434",
                menu_link: "\u0421\u0441\u044b\u043b\u043a\u0430",
                menu_download: "\u0424\u0430\u0439\u043b",
                menu_copy: "\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c",
                menu_mail: "\u0421\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 e-mail",
                sent: "\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e",
                menu_message: "\u0422\u0435\u043a\u0441\u0442",
                menu_send: "\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c",
                fontsize: "\u0420\u0430\u0437\u043c\u0435\u0440",
                bgalpha: "\u0424\u043e\u043d",
                fontcolor: "\u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430",
                off: "\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c",
                on: "\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c",
                hq: "\u041b\u0443\u0447\u0448\u0435\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e",
                hd: "\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e",
                hq_off: "\u041e\u0431\u044b\u0447\u043d\u043e\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e",
                sub: "\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b",
                traffic: "\u0422\u0440\u0430\u0444\u0438\u043a (\u041c\u0411)",
                smoothing: "\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435",
                smoothing_off: "\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435",
                smoothing_ok: "\u0421\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e",
                smoothing_off_ok: "\u0421\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043e",
                password: "\u041f\u0430\u0440\u043e\u043b\u044c",
                startlive: "\u041d\u0430\u0447\u0430\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044e",
                live: "\u0422\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044f",
                rec: "\u0417\u0430\u043f\u0438\u0441\u044c",
                rerec: "\u0417\u0430\u043d\u043e\u0432\u043e",
                playrec: "\u0418\u0433\u0440\u0430\u0442\u044c",
                contrec: "\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c",
                settings: "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438",
                done: "\u0413\u043e\u0442\u043e\u0432\u043e",
                shownotes: "\u0428\u043e\u0443\u043d\u043e\u0442\u044b",
                loading: "\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430",
                startplay: "\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u043f\u043b\u0435\u0435\u0440",
                notype: "\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u0440\u0435\u0436\u0438\u043c \u043f\u043b\u0435\u0435\u0440\u0430 (m)",
                err: "\u041e\u0448\u0438\u0431\u043a\u0430",
                errjson: "\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438",
                errjson_decode: "\u041e\u0448\u0438\u0431\u043a\u0430 \u0432",
                errjsonpl_decode: "\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u0435",
                err_pl: "\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u0430",
                err_img: "\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",
                file: "\u0424\u0430\u0439\u043b",
                notfound: "\u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d",
                copy_link: "\u0421\u0441\u044b\u043b\u043a\u0430 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430",
                copy_code: "\u041a\u043e\u0434 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430",
                no_data: "\u041d\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0445",
                ads: "\u0420\u0435\u043a\u043b\u0430\u043c\u0430",
                like: "\u041f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c",
                like: "\u041c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f",
                unlike: "\u041d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f"
            }
        };
        this.lang_en = {
            lang: "en",
            localization: {
                back: "Back",
                play: "Play",
                pause: "Pause",
                stop: "Stop",
                full: "Fullscreen",
                full_back: "Original",
                list: "Playlist",
                next: "Next",
                download: "Download",
                prev: "Previous",
                sound_off: "On",
                sound: "Off",
                volume: "Volume",
                menu: "Share",
                menu_code: "Code",
                menu_link: "Link",
                menu_download: "File",
                menu_copy: "Copy",
                menu_mail: "Email to a Friend",
                sent: "Sent",
                menu_message: "Text",
                menu_send: "Send",
                fontsize: "Size",
                bgalpha: "BG",
                fontcolor: "Text color",
                off: "Switch off",
                on: "Switch on",
                hq: "High quality",
                hd: "Quality",
                hq_off: "Low quality",
                sub: "Subtitles",
                traffic: "Traffic (MB)",
                smoothing: "Enable smoothing",
                smoothing_off: "Disable smoothing",
                smoothing_ok: "Smoothing on",
                smoothing_off_ok: "Smoothing off",
                password: "Password",
                startlive: "Start broadcast",
                live: "Broadcast",
                rec: "Record",
                rerec: "Re-record",
                playrec: "Play",
                contrec: "\u0421ontinue record",
                settings: "Settings",
                done: "Done",
                shownotes: "Shownotes",
                loading: "Loading",
                startplay: "Turn on the player",
                notype: "No player mode (m)",
                err: "Error",
                errjson: "Error loading",
                errjson_decode: "Incorrect",
                errjsonpl_decode: "Incorrect playlist",
                err_pl: "Error loading playlist",
                err_img: "Error loading image",
                file: "File",
                notfound: "not found",
                streamnotfound: "Stream not found",
                fileinvalid: "File structure is invalid",
                copy_link: "Link is copied to clipboard",
                copy_code: "Code is copied to clipboard",
                no_data: "No data",
                ads: "Ad",
                like: "Like",
                unlike: "Unlike"
            }
        };
        this.lang2 = this.lang_ru.localization;
        Mb(k);
        var c = false;
        if (this.st0) for (var d in this.st0) this[d] = this.st0[d];
        for (d in k) this[d] = k[d];
        if (k.video) {
            this.m = "video";
            this.file = k.video
        }
        if (k.audio) {
            this.m = "audio";
            this.file = k.audio
        }
        k.controls && (c = true);
        if (this.m == "audio") {
            this.cntrlhide = 0;
            this.controls == "" && (this.controls = this.audiocontrols);
            this.uibg = 0;
            Ea = false
        } else this.controls == "" && (this.controls = this.videocontrols);
        if (this.st != "") {
            str = this.st.indexOf("@") == 0 ? this.st : lb(this.st);
            try {
                if (str.indexOf("@") == 0) str = mb(str);
                style = JSON.parse(str);
                Mb(style);
                for (d in style) {
                    if (typeof style[d] === "string" && d.indexOf("color") > -1) style[d] = style[d].replace("#", "");
                    this[d] = style[d]
                }
                style.controls && (c = true)
            } catch (g) {
                Va = this.lang2.errjson_decode + " " + Ta(this.st)
            }
        }
        if (this.sh == 0) {
            if (this.w == 500 && this.h == 375 && this.m == "audio") {
                this.w = 300;
                this.h = 90
            }
            e(this.stg, {
                width: this.w + "px",
                height: this.h + "px"
            });
            this.sw = mediaWidth = this.w;
            this.sh = mediaHeight = this.h
        }
        if (this.radio == 1 && this.controls == this.audiocontrols) {
            this.controls = this.streamcontrols;
            defaultcontrols = true
        }
        if (this.pl != "" && !c) this.controls += ",playlist";
        if (this.htmlsize == 1) {
            this.w = this.sw;
            this.h = this.sh
        }
        if (this.lang == "ru") this.lang2 = this.lang_ru.localization;
        if (this.addcontrols) this.controls += "," + this.addcontrols;
        if (this.plr) this.iframe = this.plr;
        La = this.volume
    }
    function Mb(c) {
        for (var d in c) {
            if (d.indexOf("pltumbs0") == 0) c[d.replace("pltumbs0", "pl")] = c[d];
            if (d.indexOf("pl0") == 0) c[d.replace("pl0", "pl")] = c[d];
            if (d.indexOf("plcomment") == 0) c[d.replace("plcomment", "pl")] = c[d]
        }
    }
    function mb(c) {
        cd1 = Array("v", "7", "e", "c", "4", "1", "D", "6", "G", "p", "B", "t", "X", "x", "3", "Q", "J", "R", "i", "N", "5", "W", "w", "M", "f", "=");
        cd2 = Array("n", "g", "U", "0", "8", "I", "u", "l", "d", "V", "H", "o", "s", "T", "m", "Z", "z", "9", "k", "Y", "L", "2", "b", "a", "y", "E");
        var d = c.substr(-1),
            g = cd1.slice(0, d);
        d = cd1.slice(d);
        c = c.substr(1, c.length - 2);
        cd11 = d.concat(g);
        for (j = 0; j < cd11.length; j++) {
            g = cd2[j];
            d = cd11[j];
            c = c;
            c = c.replace(RegExp(g, "g"), "___");
            c = c.replace(RegExp(d, "g"), g);
            c = c = c.replace(/___/g, d)
        }
        for (i = 0; i < c.length; i++) {
            w = c.substr(i, 1);
            w = w.charCodeAt(w) >= 65 && w.charCodeAt(w) <= 90 ? w.toLowerCase() : w.toUpperCase();
            c = c.substr(0, i) + w + c.substr(i + 1)
        }
        c = c;
        var h, r, da, Ja = 0,
            Nb = "";
        do {
            h = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(c.charAt(Ja++));
            r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(c.charAt(Ja++));
            g = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(c.charAt(Ja++));
            d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(c.charAt(Ja++));
            b = h << 18 | r << 12 | g << 6 | d;
            h = b >> 16 & 255;
            r = b >> 8 & 255;
            da = b & 255;
            Nb += g == 64 ? String.fromCharCode(h) : d == 64 ? String.fromCharCode(h, r) : String.fromCharCode(h, r, da)
        } while (Ja < c.length);
        return unescape(Nb)
    }
    function Ta(c) {
        if (c.indexOf("/") > 0) c = c.substr(c.lastIndexOf("/") + 1);
        return c
    }
    function lb(c) {
        if (c) {
            req = new XMLHttpRequest;
            req.open("GET", c + "?" + Math.random(), false);
            try {
                req.send(null);
                if (req.status == 200) return req.responseText;
                else R(req.status)
            } catch (d) {
                R(a.lang2.errjson + " " + Ta(c), true)
            }
        }
    }
    var a, Da, Va = "",
        Ea = false,
        Sa = false,
        sa = false,
        vb = false,
        x = false,
        n = false,
        Wa = false,
        rb = 0,
        qb = 0,
        va = false,
        Ya = false,
        Ia = false,
        Pa = false,
        bb = false,
        ib = false,
        Ob = false,
        jb = false,
        wb = false,
        S, m, q, Q, M, ua, Sb, N, Ha, La, db, oa, la;
    if (k.uid) k.id = k.uid;
    if (document.getElementById(k.id)) xa();
    else window.onload = function () {
        xa()
    };
    var L, na, ya, za, Ba, Aa, fa, f, I, Za, cb, H, Oa = 0,
        Hb = 0,
        hb = 0,
        Qa = [],
        Fb = 0,
        gb = [],
        Ra = 0,
        D, pa, F, O, aa, ba, P, qa, ra, U, ja, C, ka, Ca, G, ia, p, K, Z, Y, wa, W, V, ca, X, s, o, v;
    this.getStatus = function () {
        return !Ia ? 0 : va ? 3 : x ? 1 : 2
    };
    this.Play = function (c) {
        if (c) {
            a.auto = "play";
            a.file = c;
            z()
        } else!x && l()
    };
    this.Pause = function () {
        x && l()
    };
    this.Toggle = function () {
        l()
    };
    this.Stop = function () {
        sa && Ma()
    };
    this.Resize = function () {
        zb()
    };
    this.Alert = function (c) {
        R(c, true)
    };
    this.Comment = function (c) {
        R(c, false)
    };
    this.CurrentTime = function () {
        return sa && f ? f.currentTime : -1
    };
    this.Duration = function () {
        return sa && f ? f.duration : -1
    };
    this.Played = function () {
        return sa && f ? Math.round(f.currentTime / f.duration * 100) : -1
    };
    this.Change = function (c, d) {
        a[c] = d;
        ta();
        Ib()
    };
    this.ChangeColor = function (c, d) {
        a[c] = d;
        if (c == "screencolor") {
            var g = na.canvas.getContext("2d");
            g.fillStyle = d;
            g.fillRect(0, 0, g.canvas.width, g.canvas.height)
        }
    };
    this.EventDetail = function (c) {
        return a.events[c]
    }
}

function Tween(k) {
    k.dur == undefined && (k.dur = 1E3);
    k.what == "a" && (new Fx.Morph(k.mc, {
        duration: k.dur
    })).start({
        opacity: [k.from, k.to]
    })
}
function HTR(k) {
    return parseInt(cutHex(k).substring(0, 2), 16)
}
function HTG(k) {
    return parseInt(cutHex(k).substring(2, 4), 16)
}
function HTB(k) {
    return parseInt(cutHex(k).substring(4, 6), 16)
}
function cutHex(k) {
    return k.charAt(0) == "#" ? k.substring(1, 7) : k
}
function ShowHide(k) {
    k.style.display == "none" ? k.style.display = "block" : k.style.display = "none"
}

function Show(k) {
    if (k) k.style.display = "block"
}
function Hide(k) {
    if (k) k.style.display = "none"
}
if (!this.JSON) this.JSON = {};
(function () {
    function k(t) {
        return t < 10 ? "0" + t : t
    }
    function xa(t) {
        Ga.lastIndex = 0;
        return Ga.test(t) ? '"' + t.replace(Ga, function (E) {
            var u = Ka[E];
            return typeof u === "string" ? u : "\\u" + ("0000" + E.charCodeAt(0).toString(16)).slice(-4)
        }) + '"' : '"' + t + '"'
    }
    function R(t, E) {
        var u, A, J, ha, T = z,
            B, l = E[t];
        if (l && typeof l === "object" && typeof l.toJSON === "function") l = l.toJSON(t);
        if (typeof ga === "function") l = ga.call(E, t, l);
        switch (typeof l) {
        case "string":
            return xa(l);
        case "number":
            return isFinite(l) ? String(l) : "null";
        case "boolean":
        case "null":
            return String(l);
        case "object":
            if (!l) return "null";
            z += ta;
            B = [];
            if (Object.prototype.toString.apply(l) === "[object Array]") {
                ha = l.length;
                for (u = 0; u < ha; u += 1) B[u] = R(u, l) || "null";
                J = B.length === 0 ? "[]" : z ? "[\n" + z + B.join(",\n" + z) + "\n" + T + "]" : "[" + B.join(",") + "]";
                z = T;
                return J
            }
            if (ga && typeof ga === "object") {
                ha = ga.length;
                for (u = 0; u < ha; u += 1) {
                    A = ga[u];
                    if (typeof A === "string") if (J = R(A, l)) B.push(xa(A) + (z ? ": " : ":") + J)
                }
            } else for (A in l) if (Object.hasOwnProperty.call(l, A)) if (J = R(A, l)) B.push(xa(A) + (z ? ": " : ":") + J);
            J = B.length === 0 ? "{}" : z ? "{\n" + z + B.join(",\n" + z) + "\n" + T + "}" : "{" + B.join(",") + "}";
            z = T;
            return J
        }
    }
    if (typeof Date.prototype.toJSON !== "function") {
        Date.prototype.toJSON = function () {
            return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + k(this.getUTCMonth() + 1) + "-" + k(this.getUTCDate()) + "T" + k(this.getUTCHours()) + ":" + k(this.getUTCMinutes()) + ":" + k(this.getUTCSeconds()) + "Z" : null
        };
        String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function () {
            return this.valueOf()
        }
    }
    var Fa = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
        Ga = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
        z, ta, Ka = {
            "\u0008": "\\b",
            "\t": "\\t",
            "\n": "\\n",
            "\u000c": "\\f",
            "\r": "\\r",
            '"': '\\"',
            "\\": "\\\\"
        },
        ga;
    if (typeof JSON.stringify !== "function") JSON.stringify = function (t, E, u) {
        var A;
        ta = z = "";
        if (typeof u === "number") for (A = 0; A < u; A += 1) ta += " ";
        else if (typeof u === "string") ta = u;
        if ((ga = E) && typeof E !== "function" && (typeof E !== "object" || typeof E.length !== "number")) throw Error("JSON.stringify");
        return R("", {
            "": t
        })
    };
    if (typeof JSON.parse !== "function") JSON.parse = function (t, E) {
        function u(J, ha) {
            var T, B, l = J[ha];
            if (l && typeof l === "object") for (T in l) if (Object.hasOwnProperty.call(l, T)) {
                B = u(l, T);
                if (B !== undefined) l[T] = B;
                else delete l[T]
            }
            return E.call(J, ha, l)
        }
        var A;
        t = String(t);
        Fa.lastIndex = 0;
        if (Fa.test(t)) t = t.replace(Fa, function (J) {
            return "\\u" + ("0000" + J.charCodeAt(0).toString(16)).slice(-4)
        });
        if (/^[\],:{}\s]*$/.test(t.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) {
            A = eval("(" + t + ")");
            return typeof E === "function" ? u({
                "": A
            }, "") : A
        }
        throw new SyntaxError("JSON.parse");
    }
})();
