(function() {
    var y = "block",
    x = "over",
    r = "lid",
    i = false,
    q = null,
    p = true,
    b = "";
    if (typeof SugPara != "object") SugPara = {};
    var A = navigator.userAgent.indexOf("MSIE") != -1 && !window.opera,
    f = document,
	key=f.getElementById('key').value,
    T = SugPara.inputid || "s",
    w = SugPara.sugType || key,
    jb = SugPara.productId || w,
    nb = SugPara.postFix || b,
    lb = SugPara.preFix || b,
    kb = SugPara.revsd || 0,
    cb = SugPara.suggestRid || b,
    t = SugPara.normalRid || b,
    ob = p,
    F = SugPara.useParent || 0,
    db = SugPara.abtestid || b,
    hb = SugPara.domain || "www.izda.com",
    eb = SugPara.uri || "/?m=keyword&c=index&a=init",
    v = hb + eb,
    G = 1,
    d,
    e = q,
    k,
    a,
    c,
    D = 0,
    m = b,
    W = b,
    s = 0,
    g = -1,
    j = [],
    n = b,
    E = {},
    o = q,
    mb = b,
    h = -1;
    function R(a) {
        return f.getElementById(a)
    }
    function u(a, c, b) {
        if (a) return a.addEventListener ? a.addEventListener(c, b, i) : a.attachEvent("on" + c, b)
    }
    function I() {
        if (!R(T)) {
            setTimeout(I, 50);
            return
        }
        a = R(T);
        c = a.parentNode;
        while (c && c.tagName.toLowerCase() != "form") c = c.parentNode;
        if (!c) return;
        a.setAttribute("autocomplete", "off");
        u(a, "mousedown", N);
        u(a, "keydown", ab)
    }
    function Z() {
        var b = "px",
        c = gb(F ? a.parentNode: a);
        d.style.top = c[1] + c[3] + b;
        d.style.left = c[0] + b;
        d.style.width = c[2] + b;
        if (e) {
            e.style.top = c[1] + c[3] + b;
            e.style.left = c[0] + b;
            e.style.width = c[2] + b;
            e.style.height = d.offsetHeight + b;
            setTimeout(function() {
                e.style.height = d.offsetHeight + b
            },
            1)
        }
    }
    function gb(a) {
        var c = 0,
        b = 0,
        d = a.offsetWidth+43,
        e = a.offsetHeight;
        if (a) {
            c += a.offsetLeft-26;
            b += a.offsetTop-1;
            a = a.offsetParent
        }
        return [c, b, d, e]
    }
    function H() {
        return a.value.replace(/^\s+|\s+$/g, b)
    }
    function L() {
        var a = H();
        if (a && m != a && W == a) {
            if (!s) s = setTimeout(function() {
                m = b;
                h = -1;
                M(a)
            },
            100)
        } else {
            clearTimeout(s);
            s = 0;
            W = a; ! a && l()
        }
        setTimeout(L, 10)
    }
    function M(a) {
        if (E[a]) {
            var b = +new Date;
            U(E[a])
        } else {
            var c;
            try {
                f.body.removeChild(o)
            } catch(c) {}
            o = f.createElement("script");
            o.src = v + "&q=" + encodeURIComponent(a) + "&type=" + w + "&pr=" + jb;
            o.charset = "utf-8";
            f.body.appendChild(o)
        }
    }
    if (typeof window.izda != "object" || window.izda == q) window.izda = {};
    window.izda.key = function(a) {
        E[a[0]] = a;
        U(a)
    };
    function O(a) {
        return a != q ? a.replace(/&/g, "&amp;").replace(/ /g, "&nbsp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;") : b
    }
    function bb(a, b) {
        var c = a;
        if (a.indexOf(b) == 0) c = b + "<span>" + a.substr(b.length) + "</span>";
        return c
    }
    function ib(a) {
        return a.replace("<span>", b).replace("</span>", b)
    }
    function U(e) {
        n = e[0];
        j = e[1];
        var c = 0,
        i;
        C();
        g = -1;
        var h = f.createElement("ul"),
        a;
        k = [];
        for (var c = 0; c < j.length && c < 10; c++) {
            a = f.createElement("li");
            a.onmouseover = V;
            a.onmousedown = S;
            a.onclick = J;
            a.setAttribute(r, c);
            a.innerHTML =bb(O(j[c]), O(n));
            k.push(a);
            h.appendChild(a)
        }
        d.innerHTML = b;
        d.appendChild(h);
        if (j.length > 0) {
            X();
            Z()
        } else l()
    }
    function z(a) {
        a.preventDefault && a.preventDefault();
        a.cancelBubble = p;
        return a.returnValue = i
    }
    function ab(a) {
        G && N();
        a = a || window.event;
        if (a.keyCode == 27) B() && l();
        else if (a.keyCode == 13) {
            l();
            try {
                if (c.enter) c.enter.value = "1"
            } catch(b) {}
            c.onsubmit && c.onsubmit() == i || c.submit();
            return z(a)
        } else if (B()) {
            if (a.keyCode == 38) {
                Y();
                return z(a)
            } else if (a.keyCode == 9 || a.keyCode == 40) {
                fb();
                return z(a)
            }
        } else if (a.keyCode == 38 || a.keyCode == 40) H() && M(H())
    }
    function fb() {
        g++;
        if (g == j.length) g = -1;
        K()
    }
    function Y() {
        g--;
        if (g == -2) g = j.length - 1;
        K()
    }
    function K() {
        C();
        if (g >= 0) {
            k[g].className = x;
            a.value = ib(j[g])
        } else a.value = n;
        h = g;
        m = a.value
    }
    function C() {
        for (var a = 0; a < k.length; a++) k[a].className = b
    }
    function P() {
        C();
        g = -1
    }
    function V() {
        if (this.className != x) {
            P();
            this.className = x;
            g = parseInt(this.getAttribute(r))
        }
    }
    function S(a) {
        a && a.stopPropagation && a.stopPropagation();
        D = 1;
        return i
    }
    function J() {
        h = parseInt(this.getAttribute(r));
        a.value = j[h];
        m = a.value;
        l();
        c.onsubmit && c.onsubmit() == i || c.submit()
    }
    function B() {
        return d.style.display == y
    }
    function X() { ! B();
        d.style.display = y;
        if (e) e.style.display = y
    }
    function l() {
        d.style.display = "none";
        if (e) e.style.display = "none"
    }
    function N() {
        if (!G) return;
        G = 0;
        m = a.value;
        t = t || (c.w && c.w.value ? c.w.value: t);
        if (v.indexOf("http://") != 0) v = "http://" + v;
        var g = c.onsubmit ||
        function() {};
        function o(k, j, l) {
            if (typeof g == "function") if (g(k, j, l) == i) return i;
            var d = {
                w: t
            };
            if (h != -1) d = {
                w: cb,
                oq: n,
                ri: h,
                sourceid: "sugg"
            };
            var e = c.getElementsByTagName("input"),
            a,
            b;
            for (var f in d) {
                for (a = 0; a < e.length; a++) if (e[a].getAttribute("name") == f) {
                    e[a].value = d[f];
                    break
                }
                if (a == e.length) {
                    b = document.createElement("input");
                    b.type = "hidden";
                    b.name = f;
                    b.value = d[f];
                    c.appendChild(b)
                }
            }
          
            return p
        }
        c.onsubmit = o;
        u(a, "blur", l);
        u(a, "beforedeactivate",
        function() {
            if (D) {
                window.event.cancelBubble = p;
                window.event.returnValue = i;
                D = 0
            }
        });
        function j() {
            var d = [];
            function a(b, a) {
                d.push(b, "{", a, "}")
            }
            a(".izda_b", "font:12pt/14pt Alpida Unicode System;position:absolute;text-align:right;direction:rtl;z-index:2001;display:none;");
            a(".izda_f", "position:absolute;display:none;");
            a(".izda_b ul", "list-style:none;border:1px solid #87A3C6;border-top:none;margin:0;padding-left:0;");
            a(".izda_b li", "height:auto;cursor:pointer;padding-right:6px;background:#fff;color:#333;position:relative;line-height:24px;height:24px;direction:rtl;font:12pt/14pt Alpida Unicode System;");
			a(".izda_b li span", ";color:#888;direction:rtl;font:12pt/14pt Alpida Unicode System;");
            a(".izda_b li.over,.izda_b li.over span", "background:#4A68B3;color:#fff;font:12pt/14pt Alpida Unicode System;");
            var c = f.createElement("style");
            c.setAttribute("type", "text/css");
            f.getElementsByTagName("head")[0].appendChild(c);
            if (A) c.styleSheet.cssText = d.join(b);
            else c.appendChild(f.createTextNode(d.join(b)))
        }
        function q() {
            if (A) {
                a.offsetParent.style.position = "relative";
                var c = a.offsetParent;
                while (c) {
                    if (!parseInt(c.currentStyle.zIndex)) c.style.zIndex = "2000";
                    c = c.offsetParent
                }
            }
            d = f.createElement("div");
            d.className = "izda_b";
            var h = f.createElement("ul"),
            b;
            k = [];
            for (var g = 0; g < 10; g++) {
                b = f.createElement("li");
                b.onmouseover = V;
                b.onmousedown = S;
                b.onclick = J;
                b.setAttribute(r, g);
                k.push(b);
                h.appendChild(b)
            }
            d.appendChild(h);
            d.onmouseout = P;
            if (!F) a.offsetParent.appendChild(d);
            else a.parentNode.offsetParent.appendChild(d);
            if (A) {
                e = f.createElement("iframe");
                e.className = "izda_f";
                e.setAttribute("frameBorder", "0");
                if (!F) a.offsetParent.appendChild(e);
                else a.parentNode.offsetParent.appendChild(e)
            }
        }
        j();
        q();
        L()
    }
    I()
})();
