/* * protofunc.com */(function() {    window.pf = {        inherit: function(sb, superClass) {            var F = function() {};            F.prototype = superClass.prototype;            sb.prototype = new F();            sb.prototype.constructor = sb;            sb.superClass = superClass.prototype;            if (superClass.prototype.constructor === Object.prototype.constructor) {                superClass.prototype.constructor = superClass;            }        },        extend: function(o, d) {            o = o || {};            for (var prop in d) {                if (typeof o[prop] == 'undefined') {                    o[prop] = d[prop];                }            }            return o;        },        q: function(s, c) {            return new pf.Q(s, c);        },        Q: function(s, c) {            this.stack = [];            if (typeof c == 'string') {                c = document.getElementById(c);            }            this.setArray((c) ? [c] : [document]);            return ((typeof s == 'object') ? this.setArray((!s.clearInterval && !s.tagName) && (s.length || s.length === 0) ? s: [s]) : this.find(s, c));        },        a: function(a) {            return new pf.A(a);        },        A: function(a) {            this.setArray(a);        }    };    pf.A.prototype = {        inArray: function(c) {            var r = false;            for (var i = 0,            len = this.length; i < len; i++) {                if (this[i] === c) {                    r = true;                    break;                }            }            return r;        },        length: 0,        setArray: function(a) {            this.length = 0;            Array.prototype.push.apply(this, a);            return this;        },        each: function(fn, num) {            if (typeof num == 'number') {                if (this[num]) {                    fn.call(this[num], num);                }            } else {                var start = (typeof num != 'string' || !num.match(/(\d+)\+/)) ? 0 : parseInt(num.match(/(\d+)\+/)[1], 10);                var len = (typeof num != 'string' || !num.match(/(\d+)\-/)) ? this.length: parseInt(num.match(/(\d+)\-/)[1], 10);                for (var i = start; i < len; ++i) {                    if (fn.call(this[i], i) === false) {                        break;                    }                }            }            return this;        }    };    var Apro = pf.A.prototype;    pf.inherit(pf.Q, pf.A);    var Qpro = pf.Q.prototype;    Qpro.pushStack = function(a) {        var r = pf.q(a);        r.stack = this.stack;        r.stack.push(this.get());        return r;    };    Qpro.each = function(fn, num) {        if (typeof num == 'number') {            if (this[num]) {                fn.call(this[num], num);            }        } else {            var start = (typeof num != 'string' || !num.match(/(\d+)\+/)) ? 0 : parseInt(num.match(/(\d+)\+/)[1], 10);            var len = (typeof num != 'string' || !num.match(/(\d+)\-/)) ? this.length: parseInt(num.match(/(\d+)\-/)[1], 10);            for (var i = start; i < len; ++i) {                if (!this[i] || fn.call(this[i], i) === false) {                    break;                }            }        }        return this;    };    Qpro.find = function(s, c) {        var htmlStack = [],        o,        elms,        i,        len,        elmsLen;        if (c === null || this[0] === null) {            return this.pushStack([null]);        }        o = filter.extractSel(s);        var get = function() {            var sel;            if (o[1]) {                sel = o[1];                o[1] = false;                return {                    elementBy: function(that) {                        return [that.getElementById(sel)];                    }                };            } else if (document.getElementsByClassName && o[2] && o[2][0] && o[2][0][1]) {                sel = o[2][0][1];                o[2].shift();                if (!o[2].length) {                    o[2] = false;                }                return {                    elementBy: function(that) {                        return that.getElementsByClassName(sel);                    }                };            } else {                sel = o[0];                o[0] = false;                return {                    elementBy: function(that) {                        return that.getElementsByTagName(sel);                    }                };            }        } ();        len = this.length;        for (i = 0; i < len; i++) {            if (this[i].querySelectorAll) {                elms = this[i].querySelectorAll(s);                elmsLen = elms.length;                for (i = 0; i < elmsLen; i++) {                    htmlStack.push(elms[i]);                }            } else {                elms = get.elementBy(this[i]);                htmlStack = filter.elements(elms, o, htmlStack);            }        }        if (len > 1) {            var n = [],            d = {};            for (i = 0, elmsLen = htmlStack.length; i < elmsLen; i++) {                if (!d[id = filter.getId(htmlStack[i])]) {                    n.push(htmlStack[i]);                    d[id] = true;                }            }            htmlStack = n;        }        return this.pushStack(htmlStack);    };    Qpro.get = function(n) {        if (n || n === 0) {            return (this[n] && this.length > n) ? this[n] : null;        }        var a = [];        for (var i = 0,        len = this.length; i < len; i++) {            a.push(this[i]);        }        return a;    };    var pfExpando = "pf" + (new Date()).getTime();    pf.filter = {        id: 0,        add: function(expr, hasF) {            filter.exp.push(expr);            filter.has.push(hasF);        },        exp: [/([a-z][-_a-z0-9]*)*/i, /#([a-z][-_a-z0-9]*)*/i, /\.([a-z][-_a-z0-9]*)*/gi],        has: [function(elm, na) {            return (na === '*' || elm.tagName.toLowerCase() === na);        },        function(elm, ni) {            return (elm.getAttribute('id') == ni);        },        function(elm, sC) {            var rVal = true,            eCl = elm.className,            p;            if (typeof sC == 'string') {                sC = [[null, sC]];            }            for (var i = 0,            sClen = sC.length; i < sClen; i++) {                if (eCl.indexOf(sC[i][1]) === -1) {                    rVal = false;                    break;                } else {                    if (!pf.a(eCl.split(' ')).inArray(sC[i][1])) {                        rVal = false;                        break;                    }                }            }            return rVal;        }],        extractSel: function(s) {            if (!s) {                return null;            }            var o = [],            tmp,            ex = filter.exp;            o[0] = ex[0].exec(s);            o[0] = o[0][1] || '*';            o[1] = ex[1].exec(s);            o[1] = o[1] ? o[1][1] : false;            for (var i = 2,            exLen = ex.length; i < exLen; i++) {                while ((tmp = ex[i].exec(s))) {                    if (tmp && !o[i]) {                        o[i] = [];                    }                    o[i].push(tmp);                }            }            return o;        },        getId: function(elem) {            var id = elem[pfExpando];            if (!id) {                id = elem[pfExpando] = ++filter.id;            }            return id;        },        elements: function(elms, s, a) {            var n = a || [],            o = typeof s == 'string' ? filter.extractSel(s) : s;            for (var i = 0,            elmsLen = elms.length; i < elmsLen; i++) {                if (!o || filter.bySelector(elms[i], o)) {                    n.push(elms[i]);                }            }            return n;        },        bySelector: function(el, o) {            var rVal = true;            for (var i = 0,            len = filter.exp.length; i < len; i++) {                if (o[i] && o[i] != '*' && !filter.has[i](el, o[i])) {                    rVal = false;                    break;                }            }            return rVal;        }    };    var filter = pf.filter;    Qpro = pf.extend(Qpro, {        children: function(s, n) {            return this.relatives(true, s, n);        },        siblings: function(s, n) {            return this.relatives(false, s, n);        },        relatives: function(ch, s, num) {            ch = ch || false;            var n = [],            d = {},            id;            this.each(function() {                var elem = ch ? this.firstChild: this.parentNode.firstChild;                while (elem) {                    if (elem.nodeType == 1 && (this != elem) && !d[id = filter.getId(elem)]) {                        d[id] = true;                        n.push(elem);                    }                    elem = elem.nextSibling;                }            },            num);            if (typeof s == 'string') {                n = filter.elements(n, s);            }            return this.pushStack(n);        }    });    Qpro.parent = function(s, num) {        var n = [],        d = {};        this.each(function() {            var elem = this.parentNode;            var id = filter.getId(elem);            if (elem.nodeType == 1 && (this != elem) && !d[id]) {                d[id] = true;                n.push(elem);            }        },        num);        if (typeof s == 'string') {            n = filter.elements(n, s);        }        return this.pushStack(n);    };    Qpro = pf.extend(Qpro, {        next: function(num) {            return this.neighbor(false, num);        },        prev: function(num) {            return this.neighbor(true, num);        },        neighbor: function(prev, num) {            var n = [];            this.each(function() {                var elem = this;                do {                    elem = prev ? elem.previousSibling: elem.nextSibling;                } while ( elem && elem . nodeType != 1 );                n.push(elem);            });            if (typeof s == 'string') {                n = filter.elements(n, s);            }            return this.pushStack(n);        }    });    Qpro.add = function(s, c) {        var tAdd = (s.constructor == Array) ? s: (s.get) ? s.get() : pf.q(s, c).get();        return this.pushStack(this.get().concat(tAdd));    };    Qpro.end = function() {        var n = this.stack.pop();        this.setArray(n);        return this;    };    Qpro.html = function(html, num) {        if (typeof html != 'undefined') {            this.each(function() {                this.innerHTML = html;            },            num);        } else {            num = num || 0;            if (this[num]) {                return this[num].innerHTML;            }        }        return this;    };    pf.createDom = function(hS) {        var d = document.createElement('div'),        ar = [],        s;        d.innerHTML = hS;        ar.push(d.firstChild);        while ((s = ar[ar.length - 1].nextSibling)) {            ar.push(s);        }        return pf.q(ar);    };    Qpro.append = function(html, num) {        var n = [];        html = (typeof html == 'string') ? pf.createDom(html) : (html.constructor == Array) ? html: [html];        this.each(function() {            for (var i = 0,            hLen = html.length; i < hLen; i++) {                n.push(this.appendChild(html[i]));            }        },        num);        return this.pushStack(n);    };    Qpro.after = function(html, num) {        var n = [],        elm;        html = (typeof html == 'string') ? pf.createDom(html) : ((!html.tagName) && (html.length || html.length === 0)) ? html: [html];        this.each(function() {            for (var i = 0,            hLen = html.length; i < hLen; i++) {                n.push(this.parentNode.insertBefore(html[i], this.nextSibling));            }        },        num);        return this.pushStack(n);    };    Qpro.remove = function(num) {        var n = [],        p,        d = {},        id;        this.each(function() {            p = pf.q(this).parent()[0];            p.removeChild(this);            if (!d[id = filter.getId(p)]) {                n.push(p);                d[id] = true;            }        },        num);        return this.pushStack(n);    };    var attrProps = {        "for": "htmlFor",        "class": "className",        innerHTML: "innerHTML",        className: "className",        value: "value",        disabled: "disabled",        checked: "checked",        readonly: "readOnly",        selected: "selected",        maxlength: "maxLength"    };    Qpro.attr = function(aV, num) {        if (typeof aV == 'object') {            return this.each(function() {                for (var p in aV) { (attrProps[p] ? this[attrProps[p]] = aV[p] : this.setAttribute(p, aV[p]));                }            },            num);        }        num = num || 0;        if (this[num]) {            return attrProps[aV] ? this[num][attrProps[aV]] : this[num].getAttribute(aV);        }    };    Qpro.css = function(o, num) {        if (typeof o == 'string') {            num = num || 0;            var cV = "";            if (document.defaultView && document.defaultView.getComputedStyle) {                o = pf.dasherize(o);                cV = document.defaultView.getComputedStyle(this[0], "").getPropertyValue(o);            } else if (this[0].currentStyle) {                o = pf.camelize(o);                o = (o === 'opacity' && window.ActiveXObject) ? 'filter': o;                cV = this[0].currentStyle[o];                if (o === 'filter') {                    var p = /opacity=([\d]+)/.exec(cV);                    cV = (p) ? parseFloat(p[1]) / 100 : 1;                }            }            return cV;        } else {            this.each(function() {                var eS = this.style;                for (var p in o) {                    var pN = pf.camelize(p);                    if (pN == 'opacity' && window.ActiveXObject) {                        eS.filter = "alpha(opacity=" + parseFloat(o[p], 10) * 100 + ")";                    } else {                        eS[pN] = o[p];                    }                }            },            num);        }        return this;    };    Qpro.addClass = function(c, num) {        this.each(function() {            if (!filter.has[2](this, c)) {                var oC = this.className;                this.className = (oC) ? oC + ' ' + c: c;            }        },        num);        return this;    };    Qpro.removeClass = function(c, num) {        this.each(function() {            var p = new RegExp("(^|\\s)" + c + "(\\s|$)");            this.className = this.className.replace(p, '');        },        num);        return this;    };    Qpro.width = function(num) {        num = num || 0;        var o;        if (this[num]) {            if (this[num] === window) {                var de = document.documentElement;                if (window.innerWidth) {                    o = window.innerWidth;                } else if (de && de.clientWidth !== 0) {                    o = de.clientWidth;                } else if (document.body) {                    o = document.body.clientWidth;                }                return o;            }            o = (this.css('display', num) == 'none') ? 0 : parseInt(this.css('width', num), 10);            return (isNaN(o)) ? this[num].offsetWidth: o;        }    };    Qpro.height = function(num) {        num = num || 0;        var o;        if (this[num]) {            if (this[num] === window) {                var de = document.documentElement;                if (window.innerHeight) {                    o = window.innerHeight;                } else if (de && de.clientHeight !== 0) {                    o = de.clientHeight;                } else if (document.body) {                    o = document.body.clientHeight;                }                return o;            }            o = (this.css('display', num) == 'none') ? 0 : parseInt(this.css('height', num), 10);            return (isNaN(o)) ? this[num].offsetHeight: o;        }    };    pf.interval = (function() {        var intervals = [],        running = false,        intervalID;        function internalFu() {            for (var i = 0,            len = intervals.length; i < len; i++) {                if (intervals[i]) {                    intervals[i]();                }            }            if (running) {                intervalID = setTimeout(internalFu, 17);            }        }        function clearIT() {            var clear = true;            for (var i = 0,            len = intervals.length; i < len; i++) {                if (intervals[i]) {                    clear = false;                    break;                }            }            if (clear) {                running = false;                clearTimeout(intervalID);                intervals = [];            }        }        return {            set: function(fn) {                var r = intervals.push(fn);                if (!running) {                    running = true;                    internalFu();                }                return r - 1;            },            clear: function(ref) {                if (intervals[ref]) {                    clearIT();                    intervals[ref] = false;                }                return false;            }        };    })();    pf.extend(Qpro, {        animate: function(s, o) {            var animation = new pf.fx(this, s, o);            return this.each(function(i) {                this.pfAnim = animation;            });        },        abortAnim: function() {            return this.each(function(i) {                if (this.pfAnim) {                    this.pfAnim.abort();                }            });        },        fullheight: function(num) {            num = num || 0;            if (this[num]) {                var el = this[num],                dis = this.css('display', num),                eS = el.style;                if (dis != 'none' && parseInt(eS.height, 10) !== 0) {                    return this.height(num);                }                var oC = {                    visibility: eS.visibility,                    position: eS.position,                    display: eS.display,                    height: eS.height                },                nC = pf.extend({                    visibility: 'hidden',                    position: 'absolute',                    display: 'block'                },                (dis == 'none') ? {                    display: 'block'                }: {                    height: ''                });                this.css(nC, num);                var h = (isFinite(el.clientHeight)) ? el.clientHeight: parseInt($this.css('height'), 10);                this.css(oC, num);                return h;            }        },        fullwidth: function(num) {            num = num || 0;            if (this[num]) {                var el = this[num],                dis = this.css('display', num),                eS = el.style;                if (dis != 'none' && parseInt(eS.width, 10) !== 0) {                    return this.width(num);                }                var oC = {                    visibility: eS.visibility,                    position: eS.position,                    display: eS.display,                    width: eS.width                },                nC = pf.extend({                    visibility: 'hidden',                    position: 'absolute',                    display: 'block'                },                (dis == 'none') ? {                    display: 'block'                }: {                    width: ''                });                this.css(nC, num);                var h = (isFinite(el.clientWidht)) ? el.clientWidht: parseInt(this.css('width', num), 10);                this.css(oC, num);                return h;            }        }    });    pf.fx = function(elms, s, o) {        this.elm = elms;        this.o = pf.extend(o, pf.fx.defaults);        this.start = [];        this.end = [];        this.reset = [];        this.unit = {};        this.now = 0;        this.timer = null;        this.time = null;        this.props = [];        this.unit = {};        this.state = 0;        this.s = (s.constructor == Array) ? s: [s];        this.init();    };    pf.fx.prototype = {        init: function() {            var that = this,            elms = [],            elm,            show = [],            jS,            s = [],            j = 0;            this.elm.each(function(i) {                elm = pf.q(this);                if (!that.props[i]) {                    that.props[i] = [];                    that.start[i] = {};                    that.end[i] = {};                    that.unit[i] = {};                    that.reset[i] = [];                    if (that.s[i]) {                        jS = pf.extend({},                        that.s[i]);                        s[i] = jS;                        j++;                    } else {                        s[i] = jS;                    }                }                for (var prop in s[i]) {                    var cssProp = pf.camelize(prop);                    that.start[i][prop] = parseFloat((Qpro[cssProp]) ? elm[cssProp]() : elm.css(cssProp));                    if (s[i][prop] == 'toggle') {                        s[i][prop] = (that.start[i][prop]) ? 'hide': 'show';                    }                    var sF = /^([0-9\.]+)?(.*)/.exec(s[i][prop]);                    that.unit[i][prop] = /^show$|^hide$/.test(sF[2]) ? (/^height$|^width$/.test(cssProp)) ? 'px': '': sF[2];                    that.end[i][prop] = (s[i][prop] == 'hide') ? 0 : (s[i][prop] == 'show' && (/^height$|^width$/.test(cssProp))) ? elm['full' + cssProp]() | that.reset[i].push(cssProp) : ((s[i][prop] == 'show' || s[i][prop] == 1) && cssProp == 'opacity') ? 0.9999 : parseFloat(sF[1]);                    that.props[i].push(prop);                    show.push((elm.css('display') == 'none') ? elm: false);                }                elms.push(this);            });            this.s = s;            this.elm = elms;            this.time = new Date().getTime();            this.computeStep();            this.state = 1;            for (var i = 0,            len = show.length; i < len; i++) {                if (show[i]) {                    show[i].css({                        display: 'block'                    });                }            } (function() {                that.timer = pf.interval.set(function() {                    that.computeStep.call(that);                });            })();        },        step: function(num, prop) {            var res = ((this.end[num][prop] - this.start[num][prop]) * this.now) + this.start[num][prop];            if (prop == 'opacity' && window.ActiveXObject) {                this.elm[num].style.filter = "alpha(opacity=" + res * 100 + ")";            } else {                this.elm[num].style[prop] = res + this.unit[num][prop];            }        },        computeStep: function() {            var time = new Date().getTime(),            finisched = false,            i,            len,            j,            props,            porpLen;            if (time < this.time + this.o.duration) {                var cTime = time - this.time;                this.now = pf.fx.transition[this.o.easin](cTime, 0, 1, this.o.duration);            } else {                pf.interval.clear(this.timer);                this.timer = null;                this.now = 1;                finisched = true;            }            for (j = 0, len = this.elm.length; j < len; j++) {                for (i = 0, props = this.props[j], porpLen = props.length; i < porpLen; i++) {                    var prop = props[i]; ((this[prop]) ? this[prop](j, prop) : this.step(j, prop));                }            }            if (finisched) {                var resetStyle = {};                for (i = 0, len = this.elm.length; i < len; i++) {                    this.elm[i].pfAnim = null;                    if (this.reset[i].length) {                        for (var num = 0; num < this.reset[i].length; num++) {                            resetStyle[this.reset[i][num]] = '';                        }                        pf.q(this.elm[i]).css(resetStyle);                    }                    this.o.complete.call(this.elm[i], 'aborted');                }            }        },        abort: function() {            pf.interval.clear(this.elm[0].pfAnim.timer);            this.elm[0].pfAnim.timer = null;            for (var i = 0,            len = this.elm.length; i < len; i++) {                this.elm[i].pfAnim = null;                this.o.complete.call(this.elm[i], 'aborted');            }        }    };    pf.fx.defaults = {        duration: 500,        complete: function() {},        easin: 'sineInOut'    };    pf.fx.transition = {        linear: function(t, b, c, d) {            return c * t / d + b;        },        sineInOut: function(t, b, c, d) {            return - c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;        }    };    pf.extend(pf.fx.transition, {        quadIn: function(t, b, c, d) {            return c * (t /= d) * t + b;        },        quadOut: function(t, b, c, d) {            return - c * (t /= d) * (t - 2) + b;        },        quadInOut: function(t, b, c, d) {            if ((t /= d / 2) < 1) {                return c / 2 * t * t + b;            }            return - c / 2 * ((--t) * (t - 2) - 1) + b;        },        cubicIn: function(t, b, c, d) {            return c * (t /= d) * t * t + b;        },        cubicOut: function(t, b, c, d) {            return c * ((t = t / d - 1) * t * t + 1) + b;        },        cubicInOut: function(t, b, c, d) {            if ((t /= d / 2) < 1) {                return c / 2 * t * t * t + b;            }            return c / 2 * ((t -= 2) * t * t + 2) + b;        },        quartIn: function(t, b, c, d) {            return c * (t /= d) * t * t * t + b;        },        quartOut: function(t, b, c, d) {            return - c * ((t = t / d - 1) * t * t * t - 1) + b;        },        quartInOut: function(t, b, c, d) {            if ((t /= d / 2) < 1) {                return c / 2 * t * t * t * t + b;            }            return - c / 2 * ((t -= 2) * t * t * t - 2) + b;        },        quintIn: function(t, b, c, d) {            return c * (t /= d) * t * t * t * t + b;        },        quintOut: function(t, b, c, d) {            return c * ((t = t / d - 1) * t * t * t * t + 1) + b;        },        quintInOut: function(t, b, c, d) {            if ((t /= d / 2) < 1) {                return c / 2 * t * t * t * t * t + b;            }            return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;        },        sineIn: function(t, b, c, d) {            return - c * Math.cos(t / d * (Math.PI / 2)) + c + b;        },        sineOut: function(t, b, c, d) {            return c * Math.sin(t / d * (Math.PI / 2)) + b;        },        expoIn: function(t, b, c, d) {            return (t === 0) ? b: c * Math.pow(2, 10 * (t / d - 1)) + b;        },        expoOut: function(t, b, c, d) {            return (t == d) ? b + c: c * ( - Math.pow(2, -10 * t / d) + 1) + b;        },        expoInOut: function(t, b, c, d) {            if (t === 0) {                return b;            }            if (t == d) {                return b + c;            }            if ((t /= d / 2) < 1) {                return c / 2 * Math.pow(2, 10 * (t - 1)) + b;            }            return c / 2 * ( - Math.pow(2, -10 * --t) + 2) + b;        },        circIn: function(t, b, c, d) {            return - c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;        },        circOut: function(t, b, c, d) {            return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;        },        circInOut: function(t, b, c, d) {            if ((t /= d / 2) < 1) {                return - c / 2 * (Math.sqrt(1 - t * t) - 1) + b;            }            return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;        },        elasticIn: function(t, b, c, d, a, p) {            var s;            if (t === 0) {                return b;            }            if ((t /= d) == 1) {                return b + c;            }            if (!p) {                p = d * 0.3;            }            if (!a) {                a = 1;            }            if (a < Math.abs(c)) {                a = c;                s = p / 4;            } else {                s = p / (2 * Math.PI) * Math.asin(c / a);            }            return - (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;        },        elasticOut: function(t, b, c, d, a, p) {            var s;            if (t === 0) {                return b;            }            if ((t /= d) == 1) {                return b + c;            }            if (!p) {                p = d * 0.3;            }            if (!a) {                a = 1;            }            if (a < Math.abs(c)) {                a = c;                s = p / 4;            } else {                s = p / (2 * Math.PI) * Math.asin(c / a);            }            return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;        },        elasticInOut: function(t, b, c, d, a, p) {            var s;            if (t === 0) {                return b;            }            if ((t /= d / 2) == 2) {                return b + c;            }            if (!p) {                p = d * (0.3 * 1.5);            }            if (!a) {                a = 1;            }            if (a < Math.abs(c)) {                a = c;                s = p / 4;            } else {                s = p / (2 * Math.PI) * Math.asin(c / a);            }            if (t < 1) {                return - 0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;            }            return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * 0.5 + c + b;        },        backIn: function(t, b, c, d, s) {            if (!s) {                s = 1.70158;            }            return c * (t /= d) * t * ((s + 1) * t - s) + b;        },        backOut: function(t, b, c, d, s) {            if (!s) {                s = 1.70158;            }            return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;        },        backInOut: function(t, b, c, d, s) {            if (!s) {                s = 1.70158;            }            if ((t /= d / 2) < 1) {                return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;            }            return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;        },        bounceIn: function(t, b, c, d) {            return c - pf.fx.transition.bounceOut(d - t, 0, c, d) + b;        },        bounceOut: function(t, b, c, d) {            if ((t /= d) < (1 / 2.75)) {                return c * (7.5625 * t * t) + b;            } else if (t < (2 / 2.75)) {                return c * (7.5625 * (t -= (1.5 / 2.75)) * t + 0.75) + b;            } else if (t < (2.5 / 2.75)) {                return c * (7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375) + b;            } else {                return c * (7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375) + b;            }        },        bounceInOut: function(t, b, c, d) {            if (t < d / 2) {                return pf.fx.transition.bounceIn(t * 2, 0, c, d) * 0.5 + b;            }            return pf.fx.transition.bounceOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;        }    });    Qpro.addEvent = function(t, h, num) {        return this.each(function() {            addDeanEvent(this, t, h);        },        num);    };    Qpro.removeEvent = function(t, h, num) {        return this.each(function() {            removeDeanEvent(this, t, h);        },        num);    };    function addDeanEvent(el, t, h) {        if (!h.$$guid) {            h.$$guid = deanEvent.guid++;        }        if (!el.events) {            el.events = {};        }        var hs = el.events[t];        if (!hs) {            hs = el.events[t] = {};            if (el["on" + t]) {                hs[0] = el["on" + t];            }        }        hs[h.$$guid] = h;        el["on" + t] = handleEvent;    }    var deanEvent = {};    deanEvent.guid = 1;    function removeDeanEvent(el, t, h) {        if (el.events && el.events[t]) {            delete el.events[t][h.$$guid];        }    }    function handleEvent(e) {        var returnValue = true;        e = e || fixE(window.event);        var handlers = this.events[e.type];        if (!pf.event.fix(e, this)) {            return;        }        for (var i in handlers) {            this.$$handleEvent = handlers[i];            if (this.$$handleEvent(e) === false) {                returnValue = false;            }        }        return returnValue;    }    pf.event = {        add: function(t, f) {            var j = 0;            t = (t.constructor == Array) ? t: [t];            for (var i = 0,            len = t.length; i < len; i++) {                if (!pf.event.fixMethods[t[i]]) {                    pf.event.fixMethods[t[i]] = [];                }                pf.event.fixMethods[t[i]].push(f);            }        },        fix: function(e, elm) {            var rV = true,            fix = this.fixMethods[e.type];            if (fix) {                for (var i = 0,                len = fix.length; i < len; i++) {                    if (!fix[i](e, elm)) {                        rV = false;                        break;                    }                }            }            return rV;        },        fixMethods: {}    };    pf.event.add(['mouseout', 'mouseover'],    function(e, elm) {        var rT = e.relatedTarget;        while (rT && rT !== elm && rT.parentNode) {            rT = rT.parentNode;        }        if (rT === elm) {            return false;        } else {            return true;        }    });    function fixE(e) {        e.preventDefault = fixE.preventDefault;        e.stopPropagation = fixE.stopPropagation;        return e;    }    fixE.preventDefault = function() {        this.returnValue = false;    };    fixE.stopPropagation = function() {        this.cancelBubble = true;    };    pf.dom = (function() {        var isReady = false,        isStarted = false,        fuList = [],        readyTimer,        readyTimeout;        function execute() {            clearInterval(readyTimer);            clearTimeout(readyTimeout);            isReady = true;            pf.q(window).removeEvent('load', execute);            for (var i = 0,            len = fuList.length; i < len; i++) {                fuList[i]();            }            fuList = [];        }        function observe() {            if (document && document.getElementsByTagName && document.getElementById && document.body) {                clearInterval(readyTimer);                readyTimeout = setTimeout(execute, 16);            }        }        pf.q(window).addEvent('load', execute);        function start() {            if (document.addEventListener) {                document.addEventListener("DOMContentLoaded", observe, false);            }            readyTimer = setInterval(observe, 16);        }        return {            ready: function(fn) {                if (isReady) {                    fn();                } else {                    fuList.push(fn);                    if (!isStarted) {                        isStarted = true;                        start();                    }                }            }        };    })();    pf.dasherize = function(s) {        return s.replace(/([A-Z])/g,        function(m, p1) {            return '-' + p1.toLowerCase();        });    };    pf.camelize = function(s) {        return s.replace(/\-(\w)/g,        function(m, p1) {            return p1.toUpperCase();        });    };})();function productViews() {    var photos = pf.q('ul', 'product-photos'),    pHeight = photos.height();    if (pHeight > 100) {        photos.css({            height: pHeight + 'px',            overflow: 'hidden'        });        pf.q('div.product-photos-box', 'product-photos').append('<a href="#" class="more">' + langs.lessPix + '</a>').addEvent('click',        function() {            var curHeight = photos.height(),            nHeight,            text,            dur;            if (curHeight > 120) {                nHeight = '101px';                text = langs.moPix;            } else {                nHeight = pHeight + 'px';                text = langs.lessPix;            }            dur = parseInt(pHeight * 1.5, 10);            dur = (dur > 1000) ? 1000 : dur;            photos.animate({                height: nHeight            },            {                duration: dur,                easin: 'backOut'            });            pf.q(this).html(text);            return false;        });    }}pf.Q.prototype.foldNavi = function(s) {    s = pf.extend(s, {        extraSpace: 0,        mulitply: 4,        duration: 250    });    var that = this;    function over(b, s, d) {        var sisters = pf.q(this).siblings().get();        pf.q(this).add(pf.q(this).siblings()).abortAnim().animate([{            width: b        },        {            width: s        }], {            duration: d        });    }    function out(n, d) {        pf.q('li', this).abortAnim().animate({            width: n        },        {            duration: d        });    }    return this.each(function(i) {        var totalWidth = that.width(i),        lis = that.find('li'),        amount = lis.length,        startWidth = parseFloat(totalWidth / amount - s.extraSpace, 10);        totalWidth = totalWidth - (s.extraSpace * amount);        var minWidth = parseFloat(totalWidth / (amount - 1 + s.mulitply), 10),        bigWidth = parseFloat(minWidth * s.mulitply, 10);        lis.addEvent('mouseover',        function(e) {            over.call(this, bigWidth + 'px', minWidth + 'px', s.duration);        }).end().addEvent('mouseout',        function() {            out.call(this, startWidth + 'px', s.duration);        });    });};var homeSlide = {    init: function() {        var elms = pf.q('#company-showcases');        if (elms[0] && typeof companyShowcases !== 'undefined') {            var cS = companyShowcases;            var j = 1;            for (var i = 0,            len = cS.n.length; i < len; i++) {                elms.append('<li class="l' + j + '"><a href="' + cS.u[i] + '"><img src="' + cS.s[i] + '" alt="' + cS.n[i] + '"></a></li>').css({                    display: 'none',                    opacity: '0'                }).end();                j++;            } (function() {                setTimeout(homeSlide.nextAnimate, 1999);            })();        }    },    nextAnimate: function() {        var elms = pf.q('li.active', 'company-showcases'),        nextElms = elms.next('li');        if (!nextElms[0]) {            nextElms = pf.q(elms.end().siblings('li')[0]);        }        elms.animate({            opacity: 0        },        {            duration: 900        }).removeClass('active');        nextElms.animate({            opacity: 1        },        {            duration: 900,            complete: function() {                setTimeout(homeSlide.nextAnimate, 3000);            }        }).addClass('active');    }};var lightBox = (function() {    var overlay = pf.q('body').append('<div id="overlay"></div>'),    box,    next,    prev,    nextLink,    prevLink;    setTimeout(function() {        pf.q('ul', 'product-photos').find('a').addEvent('click', lightBox.clickProductEnlarge);        pf.q('a', 'patterns-colors').addEvent('click', lightBox.clickFurnierEnlarge);        overlay.addEvent('click', lightBox.close);    },    19);    function create(title, src, cpro, pagination, sClass) {	    var objOverlay = document.getElementById('overlay');        var arrayPageSize = getPageSize();		objOverlay.style.height = (arrayPageSize[1] + 'px');		objOverlay.style.width = (arrayPageSize[0] + 'px');        var html = '<div id="pf-box"' + sClass + '><div class="main-view"><a href="#" class="prev">' + langs.prevPic + '</a> <a href="#" class="next">' + langs.nextPic + '</a><a href="#" class="close">' + langs.close + ' x</a>';        html += '<div class="main-view-inner"><div><div id="dhtmlgoodies_control"><b><a href="#" onclick="slidedown_showHide(\'box1\');return false;" class="lbg">Th&#244;ng tin chi ti&#7871;t</a></b></div><div class="dhtmlgoodies_contentBox" id="box1"><div class="dhtmlgoodies_content" id="subBox1">' + cpro + '</div></div></div><img src="' + src + '" alt=" "></div></div>';        html += '<ul id="picture-select">' + pagination + '</ul></div>';        var topPos = document.documentElement.scrollTop - 130;        box = pf.q('body').append(html).css({            'top': topPos + 'px'        });        nextLink = pf.q('a.next', box[0]).addEvent('click',        function() {            lightBox.pictureChange('next');            return false;        });        prevLink = pf.q('a.prev', box[0]).addEvent('click',        function() {            lightBox.pictureChange('prev');            return false;        });        pf.q('a.close', box[0]).addEvent('click', lightBox.close);        pf.q('a', 'picture-select').addEvent('click',        function() {            lightBox.pictureChange(pf.q(this));            return false;        });        createPrevNext();    }    function createPrevNext() {        var active = pf.q('a.active', 'picture-select'),        newIMG,        imgSrc;        next = active.parent().next().children('a');        prev = active.parent().prev().children('a');        style = (next.length) ? 'block': 'none';        nextLink.css({            display: style        });        style = (prev.length) ? 'block': 'none';        prevLink.css({            display: style        });        setTimeout(function() {            if (next.length) {                imgSrc = next.attr('href');                newIMG = document.createElement('img');                newIMG.src = imgSrc;            }            if (prev.length) {                imgSrc = prev.attr('href');                newIMG = new Image();                newIMG.src = imgSrc;            }        },        500);    }    return {        clickFurnierEnlarge: function() {            pf.q('a', 'patterns-colors').removeClass('active');            overlay.css({                opacity: 0.1            }).animate({                opacity: 0.8            },            {                duration: 150            });            var elm = pf.q(this),            title = elm.attr('title'),            src = elm.attr('href');			cpro = elm.attr('title');            elm.addClass('active');            var pagination = pf.q('#patterns-colors').html(),            sClass = ' class="furnier-box"';            create(title, src, cpro, pagination, sClass);            return false;        },        pictureChange: function(elm) {            if (typeof elm == 'string') {                elm = (elm === 'next') ? next: prev;            }            pf.q('a.active', 'picture-select').removeClass('active');            var src = elm.attr('href'),cpro = elm.attr('title'),            changed = pf.createDom('<div class="main-view-inner"><div><div id="dhtmlgoodies_control"><b><a href="#" onclick="slidedown_showHide(\'box1\');return false;" class="lbg">Th&#244;ng tin chi ti&#7871;t</a></b></div><div class="dhtmlgoodies_contentBox" id="box1"><div class="dhtmlgoodies_content" id="subBox1">' + cpro + '</div></div></div><img src="' + src + '" alt=" "></div>').css({                display: 'none',                opacity: '0.1'            }),            title = elm.attr('title');            if (title) {                pf.q('h3', box[0]).html(title);            }            pf.q('div.main-view-inner', box[0]).animate({                opacity: 0.1            },            {                duration: 100,                complete: function() {                    pf.q(this).remove();                }            }).after(changed).animate({                opacity: 1            },            {                duration: 100            });            elm.addClass('active');            createPrevNext();        },        close: function() {            overlay.animate({                opacity: 0.1            },            {                duration: 250,                complete: function() {                    pf.q(this).css({                        display: 'none'                    });                }            });            box.remove();            return false;        },        clickProductEnlarge: function() {            pf.q('a', 'product-photos').removeClass('active');            overlay.css({                opacity: 0.1            }).animate({                opacity: 0.8            },            {                duration: 150            });            var title = langs.diffViews + pf.q('h1', 'product-main-photo').html(),            elm = pf.q(this),            src = elm.attr('href');			cpro = elm.attr('title');            elm.addClass('active');            var pagination = pf.q('ul', 'product-photos').html(),            sClass = '';            create(title, src, cpro, pagination, sClass);            return false;        }    };})();productViews();pf.q('#product-nav').foldNavi({    extraSpace: 3});pf.q(window).addEvent('load', homeSlide.init);pf.q('#lang').addEvent('change',function() {    pf.q(this).parent().parent()[0].submit();});function getPageSize(){		var xScroll, yScroll;		if (window.innerHeight && window.scrollMaxY) {			xScroll = document.body.scrollWidth;		yScroll = window.innerHeight + window.scrollMaxY;	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac		xScroll = document.body.scrollWidth;		yScroll = document.body.scrollHeight;	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari		xScroll = document.body.offsetWidth;		yScroll = document.body.offsetHeight;	}		var windowWidth, windowHeight;	if (self.innerHeight) {	// all except Explorer		windowWidth = self.innerWidth;		windowHeight = self.innerHeight;	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode		windowWidth = document.documentElement.clientWidth;		windowHeight = document.documentElement.clientHeight;	} else if (document.body) { // other Explorers		windowWidth = document.body.clientWidth;		windowHeight = document.body.clientHeight;	}			// for small pages with total height less then height of the viewport	if(yScroll < windowHeight){		pageHeight = windowHeight;	} else { 		pageHeight = yScroll;	}	// for small pages with total width less then width of the viewport	if(xScroll < windowWidth){			pageWidth = windowWidth;	} else {		pageWidth = xScroll;	}	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 	return arrayPageSize;}
