function setCookie(c_name, value, expiredays) {
    var exdate = new Date();
    exdate.setDate(exdate.getDate() + expiredays);
    document.cookie = c_name + "=" + escape(value) + ((expiredays == null) ? "" : ";path=/;expires=" + exdate.toGMTString());
}
function getCookie(c_name) {
    if (document.cookie.length > 0) {
        c_start = document.cookie.indexOf(c_name + "=");
        if (c_start != -1) {
            c_start = c_start + c_name.length + 1;
            c_end = document.cookie.indexOf(";", c_start);
            if (c_end == -1) { c_end = document.cookie.length; }
            return unescape(document.cookie.substring(c_start, c_end));
        }
    }
    return "";
}

/* ORIGINAL AMEX.JS MGA 20091103 AEMXDEV-18 */
/*	imgPath is defined here to allow developpers to change the
*	images folder as some of them must be defined directly into
*	the javascript code.
* */
var imgPath = EMA.rootImagePath, airportXML = EMA.localization + EMA.airportXML, flag = 0, zindex = 999;
/* utils */
/* addOnloadEvent(fct)
* fct : function
* unobstructive addition of functions that must be run when page is loaded
* ex : addOnloadEvent(function(){alert("hello world");});
*/
document.isLoaded = false;
function addOnloadEvent(fct) {
    if (document.isLoaded) { fct(); }
    else {
        var oldonload = window.onload;
        if (typeof window.onload != 'function') { window.onload = fct; }
        else {
            window.onload = function() {
                oldonload();
                fct();
            }
        }
    }
}
addOnloadEvent(function() { document.isLoaded = true; });
function addOnresizeEvent(fct) {
    var oldonresize = window.onresize;
    if (typeof window.onresize != 'function') {
        window.onresize = fct;
    } else {
        window.onresize = function() {
            oldonresize();
            fct();
        }
    }
}

/* $i(val)
* val : String
* function that returns the HTML element with "id=val"
* ex: var a = $i("foo");
* */
function $i(val) { return document.getElementById(val); }
/* $t(elemType,o)
* elemType : String
* o : HTML element (optional, "centerContent" as default element)
* function that returns the list of every "elemType" HTML element childrens of "o"
* ex: var arrayLi = $t("li",$i("foo")); // returns all "li" inside "foo"
* */
function $t(elemType, o) {
    if (!o) o = $i("centerContent");
    return o.getElementsByTagName(elemType);
}

/* $c(elemType,cssClass,o)
* elemType : String
* cssClass : String
* o : HTML element (optional, "centerContent" as default element)
* function that returns the list of every "elemType" HTML element with className "cssClass" childrens of "o"
* ex: var arrayLiFoocss = $c("li","foocss",$i("foo")); // returns all "li" with class "foocss" inside "foo"
* */
function $c(elemType, cssClass, o) {
    if (!o) o = $i("centerContent");
    var listLcl = o.getElementsByTagName(elemType);
    var list2return = new Array();
    for (var i = 0; i < listLcl.length; i++) {
        if (listLcl[i].className.indexOf(cssClass + " ") > -1 || listLcl[i].className.indexOf(" " + cssClass) > -1 || listLcl[i].className == cssClass)
            list2return.push(listLcl[i]);
    }
    return list2return;
}


/* $t1L(elemType,o)
* elemType : String
* o : XML element
* function that returns the list of every 1st level childnode of "o" of tagname "elemType"
* ex: var arrayLi = $t1L("li",$i("foo"));
* */
function $t1L(elemType, o) {
    var lstLcl = new Array();
    for (var i = 0; i < o.childNodes.length; i++) {
        if (o.childNodes[i].tagName && o.childNodes[i].tagName.toLowerCase() == elemType) {
            lstLcl.push(o.childNodes[i]);
        }
    }
    return lstLcl;
}

/* $c1L(elemType,cssClass,o)
* elemType : String
* cssClass : String
* o : XML element
* function that returns the list of every 1st level childnode of "o" of tagname "elemType" and className "cssClass"
* ex: var arrayLiFoocss = $c1L("li",$i("foo"));
* */
function $c1L(elemType, cssClass, o) {
    var lstLcl = new Array();
    for (var i = 0; i < o.childNodes.length; i++) {
        var lcl = o.childNodes[i];
        if (lcl.tagName && lcl.tagName.toLowerCase() == elemType && (lcl.className.indexOf(cssClass + " ") > -1 || lcl.className.indexOf(" " + cssClass) > -1 || lcl.className == cssClass)) {
            lstLcl.push(lcl);
        }
    }
    return lstLcl;
}

/*shortcut to create an element*/
function $dc(v) { return document.createElement(v); }
/* utils */

var amex = (typeof (amex) != "undefined") ? amex : {};
amex.IE = navigator.appVersion.split('MSIE ')[1] != null;
amex.IE6 = (amex.IE && parseInt(navigator.appVersion.split('MSIE ')[1].substr(0, 1)) < 7);


/*	Instead of addOnloadEvent; Avoid to wait the loading of every images of the page.
* */
amex.initASAP = function(fct) {
    if (($i("centerContent") && amex.IE6) || document.readyState == "complete") {
        fct();
    } else {
        var fct1 = fct;
        setTimeout(function() { amex.initASAP(fct1) }, 100);
    }
}

/*	amex.IE6fix(o,forceIE)
* 	o : HTML element within fix must apply (optional, "centerContent" as default element)
* 	forceIE : boolean
* 	Function used to fix IE6 png transparency AND IE6+ png transparency when used with filter:Alpha
*
* note: this fix does not work on hidden element
* */

amex.IE6fix = function(o, forceIE) {
    try {
        if (amex.IE6 || forceIE && amex.IE) {
            var imgs = $t("img", o);
            var s = amex.IE6fix.arguments[2]; s = s ? s : 0;
            for (var i = s; i < imgs.length; i++) {
                if (imgs[i].src.indexOf(".png") > -1) {
                    var tmpDiv = $dc("DIV");
                    tmpDiv.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src=" + imgs[i].src + ")";
                    var w = imgs[i].offsetWidth;
                    var h = imgs[i].offsetHeight;
                    if (w > 0) w += "px"; else w = imgs[i].style.width;
                    if (h > 0) h += "px"; else h = imgs[i].style.height;
                    tmpDiv.style.width = w;
                    tmpDiv.style.height = h;
                    tmpDiv.className = imgs[i].className;
                    iPar = imgs[i].parentNode;
                    iPar.insertBefore(tmpDiv, imgs[i]);
                    iPar.removeChild(imgs[i]);
                    var o1 = o, fIE = forceIE, i1 = i;
                    setTimeout(function() { amex.IE6fix(o1, fIE, i1); }, 5);
                    break;
                }
            }
        }
    } catch (e) { }
}



amex.addPng = function(imUrl, o, classname) {
    if (o) {
        var i;
        if (amex.IE6 && imUrl.indexOf(".png") > -1) {
            i = $dc("DIV");
            i.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src=" + imUrl + ")";
        } else {
            var i = $dc("img");
            i.src = imUrl;
        }
        if (classname) i.className = classname;
        o.insertBefore(i, o.firstChild);
        return i;
    }
    return null;
}

/* amex.timer
* used as a timeline
* */
amex.timer = new Object();
amex.timer.isRunning = false;
amex.timer.fct = new Array();

/* amex.timer.addFct(fct,arg)
* fct : function
* arg : Array (of arguments)
* to add a function in the timeline
* ex : see "amex.displace" function
* */
amex.timer.addFct = function(fct, arg) {
    this.fct.push({ fct: fct, arg: arg });
    if (!this.isRunning) {
        this.isRunning = true;
        this.run();
    }
};

/* amex.timer.run()
* can be used directly to force timer to run
* note : the delay of timeout is located here (20ms)
* */
amex.timer.run = function() {
    if (amex.timer.fct.length > 0) {
        setTimeout(amex.timer.run, 50);
        var lastFct = 0;
        for (var i = 0; i < amex.timer.fct.length; i++) {
            if (!amex.timer.fct[i].fct(amex.timer.fct[i].arg)) {
                amex.timer.fct[i] = null;
            } else {
                if (lastFct < i) {
                    amex.timer.fct[lastFct] = amex.timer.fct[i];
                    amex.timer.fct[i] = null;
                }
                lastFct++;
            }
        }
        while (amex.timer.fct.length > 0 && !amex.timer.fct[amex.timer.fct.length - 1]) amex.timer.fct.pop();
    } else { amex.timer.isRunning = false; }
}

/* amex.timer.displace(o,property,val,inc,limit,nxtFct,eachFct)
* o : HTML element : item to displace
* property : String : css property to change
* val : int : starting value
* inc : int : incremental value
* limit : int : value to reach
* nxtFct : function (optional) : function to execute when displacement is over
* eachFct : function (optional) : function to execute at each occurence
*
* used to change a style property expressed in px of an element based on the timer timeline
*
* ex:amex.timer.displace($i("foo"),"height",500,-10,50,function(){alert("over")},function(){alert("running")});
* */
amex.displace = function(o, property, val, inc, limit, nxtFct, eachFct) {
    amex.timer.addFct(function(args) {
        args[2] += args[3];
        if ((args[3] > 0 && args[2] <= args[4]) || (args[3] < 0 && args[2] >= args[4])) {
            args[0].style[args[1]] = args[2] + "px";
        } else {
            args[0].style[args[1]] = args[4] + "px";
            if (args[6]) args[6](args);
            if (args[5]) args[5](args);
            return false;
        }
        if (args[6]) args[6](args);
        return true;
    }, amex.displace.arguments);
}

/* amex.timer.appear(o,inc,nxtFct)
* o : HTML element : item to fade
* inc : int : incremental value
* nxtFct : function (optional) : function to execute when fade is over
*
* used to fade in or fade out an HTML item
*
* ex:amex.timer.appear($i("foo"),-10,function(){alert("over")}});
*
* note:to avoid link supperposition or unclickable items, the display of o is set to "none"
* */
amex.appear = function(o, inc, nxtFct) {

    amex.timer.addFct(function(args) {
        if (!args[0].init) {
            args[0].init = true;
            args[0].opacity = args[1] > 0 ? 0 : 100;
        }
        args[0].opacity += args[1];
        if ((args[1] > 0 && args[0].opacity < 100) || (args[1] < 0 && args[0].opacity > 0)) {
            args[0].style.display = "block";
            if (amex.IE) args[0].style.filter = "Alpha(Opacity=" + args[0].opacity + ")";
            else args[0].style.opacity = args[0].opacity / 100;
        } else {
            args[0].init = false;
            args[0].style.display = args[1] < 0 ? "none" : "block";
            if (amex.IE) args[0].style.filter = "Alpha(Opacity=" + (args[1] < 0 ? 0 : 100) + ")";
            else args[0].style.opacity = args[1] < 0 ? 0 : 1;
            if (args[2]) args[2]();
            return false;
        }
        return true;
    }, amex.appear.arguments);
}

/*	amex.createCntBg() , amex.expandCntBg()
* main background generation and management with Alpha
* */
amex.createCntBg = function() {
    var d = $dc("div");
    d.style.position = "absolute";
    d.style.top = $i("header").offsetHeight + "px";
    d.style.left = "0px";
    d.style.width = $i("centerContent").offsetWidth + "px";
    d.style.backgroundColor = "#FFF";
    d.style.opacity = "0.5";
    d.style.filter = "Alpha(Opacity=50)";
    $i("centerContent").insertBefore(d, $i("centerContent").firstChild);
    amex.mainBackground = d;
    amex.expandCntBg();
}
amex.expandCntBg = function() {
    if (amex.mainBackground && amex.mainBackground.style) {
        amex.mainBackground.style.height = ($i("middle").offsetHeight < 20 ? 0 : ($i("middle").offsetHeight - 20)) + "px";
    }
}

/*MGA 20090608 - Background switching function*/
amex.bgs = {
    dflt: "/img/common/bg1.jpg",
    rotating: [
		"/img/common/bg1.jpg",
		"/img/common/bg2.jpg",
		"/img/common/bg3.jpg",
		"/img/common/bg4.jpg",
		"/img/common/bg5.jpg",
		"/img/common/bg6.jpg",
		"/img/common/bg7.jpg"
	]
}
amex.initBg = (function() {
    return {
        getImgUrl: function() {
            var ct = (new Date()).getHours();
            if (ct <= 4) { return amex.bgs.rotating[0]; }
            if (ct <= 8) { return amex.bgs.rotating[1]; }
            if (ct <= 12) { return amex.bgs.rotating[2]; }
            if (ct <= 16) { return amex.bgs.rotating[4]; }
            if (ct <= 20) { return amex.bgs.rotating[5]; }
            if (ct <= 24) { return amex.bgs.rotating[6]; }
            return amex.bgs.dflt;
        },
        setImg: function() { /*document.getElementsByTagName("body")[0].style.backgroundImage = "url(" + this.getImgUrl() + ")"; */}
    }
})();



/*	amex.initDrop()
* used to initialize every item of className "drop" to add functions to show/hide the sub "UL"
* add a png as background of items with "dropCustom1" className
* */
amex.initDrop = function() {
    var dList = $c("div", "drop");
    for (var i = 0; i < dList.length; i++) {
        $(dList[i]).bind("click", function() {
            if (!$(this).find("ul").is(":visible")) {
                amex.overlay.show(this, "ul");
                return false;
            } else {
                amex.overlay.hide();
                return true;
            }
        })

        if (dList[i].className.indexOf("dropCustom1") > -1) {
            amex.addPng(imgPath + "/common/dropCustom.png", dList[i], "bg");
        }
    }
}
amex.overlay = (function() {
    var show, hide, stack = [];
    show = function(container, tag) {
        var overlay = $(container).find(tag).show();
        stack.push(overlay);
        $("body").bind("mask_click", function() { amex.overlay.hide(); });
        $("body").bind("click", function() { $("body").trigger("mask_click"); })
        return false;
    }
    hide = function() {
        var i = stack.length;
        while (i--) { $(stack.pop()).hide(); }
        $("body").unbind("mask_click");
    }
    return { show: show, hide: hide }
})()
/*	amex.initNavStyle(aL)
* al : Array : list of all "a" items of a navigation
*
* used to initialize the png background of a navigation like the main navigation or "experience" navigation
*
* ex: amex.initNavStyle($t("a",$("foo")));
* */
amex.initNavStyle = function(aL) {
    for (var i = 0; i < aL.length; i++) {
        var d1 = $dc("div");
        var d2 = $dc("div");
        var d3 = $dc("div");
        d1.className = "bgNav"; d1.style.position = "absolute"; d1.style.top = "0px"; d1.style.left = "-6px"; d1.style.width = "6px"; d1.style.height = "28px"; d1.innerHTML = '<img class="bgImg" src="' + imgPath + '/common/nL.png" alt=""/>';
        d2.className = "bgNav"; d2.style.position = "absolute"; d2.style.top = "0px"; d2.style.right = "-6px"; d2.style.width = "6px"; d2.style.height = "28px"; d2.innerHTML = '<img class="bgImg" src="' + imgPath + '/common/nR.png" alt=""/>';
        d3.className = "bgNav"; d3.style.position = "absolute"; d3.style.top = "0px"; d3.style.left = "13px"; d3.style.width = aL[i].offsetWidth + "px"; d3.style.height = "28px"; d3.style.zIndex = 0; d3.style.overflow = "hidden"; d3.innerHTML = '<img class="bgImg" src="' + imgPath + '/common/nC.png" alt=""/>';
        aL[i].parentNode.insertBefore(d3, aL[i].parentNode.firstChild);
        aL[i].appendChild(d1);
        aL[i].appendChild(d2);
    }
}


amex.initNav3 = function() {
    amex.initNavStyle($t("a", $i("nav3")));
}

/* amex.initAlert01()
* to initialize the item "Info & booking tools" in the navigation and its extensions :
* tabs items on the homepage, expandable menu in the content
* */
amex.initAlert01 = function() {
    //handles the tab
    var tab = $("div.onglet", $i("alert01"));
    if (tab.length === 0) { return false; }

    //all the tab is clickable
    $($(tab)[0]).bind("click", function() { document.location = $(this).find("a").attr("href"); return false; });

    /*used on the homepage only*/
    var tb = $("div.tabs", $i("alert01"));
    if (tb.length > 0) {
        var t = $(".tabs_bottom").wrap("<div></div>").parent().html();
        $(".tabs_bottom").parent().remove();

        //creating alert01 booking engine content
        var div1 = document.createElement("div");
        $(div1).css({
            position: "absolute",
            top: "0",
            left: "0"
        }).addClass("alert01_cnt_top").html('<img src="' + imgPath + '/common/alert1t.png" alt=""/>');
        var div2 = $(div1).clone();
        $(div2).css({
            top: "auto",
            bottom: "-16px",
            height: "36px",
            width: "100%",
            background: "url(/img/alert01_bottom.png) no-repeat 0 0"
        }).addClass("alert01_cnt_bottom").html(t);
        var div3 = $(div1).clone();
        $(div3).css({
            top: "30px",
            width: "380px",
            height: ((tb[0].offsetHeight < 30) ? 0 : (tb[0].offsetHeight - 30) + "px"),
            zIndex: 0,
            overflow: "hidden"
        }).addClass("alert01_cnt_bg").html('<img src="' + imgPath + '/common/alert1n.png" alt=""/>');
        /*sets the bottom tabs at the right place*/
        $(tb[0]).append($(div1), $(div2), $(div3))
        $(".tabs_bottom").show();
        tb[0].bg = div3;
        tb[0].foot = div2;

        tb[0].fct = function() {
            var h = this.offsetHeight + 15;
            if (!$i("block1") || !$i("middle")) {
                setTimeout(amex.initAlert01, 100);
                return false;
            } else {
                $("#block1").height((h > 209) ? (h + 'px') : (209 + 'px'));
                amex.expandCntBg();
            }
        }
    }
}

//AEMXSUP-71
var bypassJSStuff = function(array) {
    //param: array of links
    //return: void
    array.each(function() {
        $(this).bind("click", function() {
            var url = $(this).attr("href");
            if ($(this).attr("rel") == "external") {
                var op = window.open(url, "aemx");
                op.focus();
            } else {
                document.location = url;
            }
            return false;
        });
    });
    return true;
}

/*	amex.initTabs()
* to initialize all tabs events of the page
*
* HTML structure :
<div class="tabs">
<ul>
<li>tab 1</li>
<li>tab 2</li>
</ul>
<div class="tabsContent">
<div class="cnt">
content 1
</div>
<div class="cnt">
content 2
</div>
</div>
</div>
*
*  note : className of clicked "li" is "selected"
*/
amex.initTabs = function() {
    var tabsList = $("div.tabs");
    var hasid = false;
    for (var i = 0; i < tabsList.length; i++) {
        //try{
        var tabs = $("li", $("ul:not(.tabsContent ul)", tabsList[i]));
        var cnts = $(".tabsContent > div", tabsList[i]);

        //AEMXSUP-71
        bypassJSStuff($(tabs).find("a"));
			
        if (!$("a", tabs[0])[0]) {
            var initTab = 0;
            for (var j = 0; j < tabs.length; j++) {
                if (tabs[j].className == "selected") initTab = j;
                tabs[j].tabs = tabs;
                tabs[j].cnts = cnts;
                tabs[j].cnt = cnts[j];
                tabs[j].ref = tabsList[i];
                $(tabs[j]).bind("click", function(ev, j) {

                    amex.overlay.hide();
                    var containerTabs = $(this).parents(".tabs");
                    //remove all previous highlight
                    //removing selected class on tabs
                    containerTabs.find("li:not(.tabsContent li)").each(function() { $(this).removeClass("selected").removeClass("tab_single_selected").removeClass("tab_first_selected").removeClass("tab_last_selected").css({ "cursor": "pointer" }); })
                    //hide all contents
                    containerTabs.find(".tabsContent > div").hide();
                    //show current
                    var classes = "selected";
                    if ($(this).parent().children().length === 1) {
                        classes += " tab_single_selected"
                    } else {
                        classes += ($(this).is(":first-child")) ? " tab_first_selected" : "";
                        classes += ($(this).is(":last-child")) ? " tab_last_selected" : "";
                    }
                    $(this).addClass(classes);
                    $(this.cnt).show();


                    /*CAL MESS*/
                    amex.initButton1(this.cnt);
                    amex.IE6fix(this.cnt);

                    this.ref.bg = $(this.ref).find(".alert01_cnt_bg").get(0);
                    this.ref.foot = $(this.ref).find(".alert01_cnt_bottom").get(0);
                    if (typeof (this.ref.bg) != "undefined") {
                        this.ref.bg.style.height = this.cnt.parentNode.offsetHeight + "px";
                        if (typeof (this.ref.foot) != "undefined") {
                            this.ref.foot.style.top = this.ref.bg.offsetTop + this.ref.bg.offsetHeight + "px";
                        }
                    }
                    if (typeof (this.ref.fct) != "undefined") { this.ref.fct(); }
                    amex.checkContentHeight();
                    amex.expandCntBg();
                    amex.rescaleContent2bgtabs();
                    if (this.id) { setCookie('AM_tabs', this.id, 365); }
                });
                hasid = (tabs[j].id != '');
            }
            if (hasid) {
                if (getCookie('AM_tabs') == "") {
                    setCookie('AM_tabs', "t_0", 365);
                }
                //MGA fix: cookies were supposed to be active
                var cookieVal = (getCookie('AM_tabs').length > 3) ? getCookie('AM_tabs').substring(2, 3) : 0;
                $(tabs[cookieVal]).trigger("click");
            }
            else {
                $(tabs[initTab]).trigger("click");
            }
        }

        /*}catch(ex){
        alert("tabs initialization error :\nmore tabs than content, see red tab");
        tabsList[i].style.border="solid 5px #F00";
        tabsList[i].style.background="#F00";
        }*/
    }
}

amex.rescaleContent2bgtabs = function() {
    var cnt = $i("content2");
    if (cnt && cnt.bg) {
        var h = cnt.offsetHeight;
        cnt.bg.style.height = (h - 45) + "px";
        cnt.b.style.top = h + "px";
    }
}

/*	amex.initButton1()
* to initialize dark blue png button "button1"
*/
amex.initButton1 = function(o) {
    var bL = $c("div", "button1", o);
    for (var i = 0; i < bL.length; i++) {
        var ipt = $t("input", bL[i])[0] || $(bL[i]).find("a")[0];
        if (ipt.offsetWidth == 0 || bL[i].set) continue;

        //AEMXSUP-81
        var suffix = ($(bL[i]).hasClass("button_highlight")) ? "_red_" : "";
		
        bL[i].set = true;
        var d1 = $dc("div");
        var d2 = $dc("div");
        var d3 = $dc("div");
        d1.style.position = "absolute"; d1.style.top = "0px"; d1.style.left = "0px"; d1.innerHTML = '<img src="' + imgPath + '/common/bt1' + suffix + 'l.png" width="11" height="20" alt=""/>';
        d2.style.position = "absolute"; d2.style.top = "0px"; d2.style.right = "0px"; d2.innerHTML = '<img src="' + imgPath + '/common/bt1' + suffix + 'r.png" width="18" height="20" alt=""/>';
        d3.style.position = "absolute"; d3.style.top = "0px"; d3.style.left = "11px"; d3.style.width = (ipt.offsetWidth < 29 ? 0 : (ipt.offsetWidth - 29)) + "px"; d3.style.height = "20px"; d3.style.zIndex = 0; d3.style.overflow = "hidden"; d3.innerHTML = '<img src="' + imgPath + '/common/bt1' + suffix + 'c.png" width="300" height="20" alt=""/>';
        bL[i].appendChild(d1);
        bL[i].appendChild(d2);
        bL[i].appendChild(d3);
        amex.IE6fix(bL[i]);
    }
}

/*	amex.initButton2()
* to initialize light blue png button "button2"
*/
amex.initButton2 = function() {
    var bL = $c("span", "button2");
    for (var i = 0; i < bL.length; i++) {
        var d1 = $dc("div");
        var d2 = $dc("div");
        var d3 = $dc("div");
        var ipt = $t("a", bL[i])[0];
        if (!ipt) ipt = $t("input", bL[i])[0];
        if (ipt) {
            d1.style.position = "absolute"; d1.style.top = amex.IE ? "0px" : "-1px"; d1.style.left = "0px"; d1.style.zIndex = 0; d1.innerHTML = '<img src="' + imgPath + '/common/bt2l.png" alt=""/>';
            d2.style.position = "absolute"; d2.style.top = amex.IE ? "0px" : "-1px"; d2.style.right = "0px"; d2.style.zIndex = 0; d2.innerHTML = '<img src="' + imgPath + '/common/bt2r.png" alt=""/>';
            d3.style.position = "absolute"; d3.style.top = amex.IE ? "0px" : "-1px"; d3.style.left = "15px"; d3.style.width = (ipt.offsetWidth < 37 ? 0 : (ipt.offsetWidth - 37)) + "px"; d3.style.height = "24px"; d3.style.zIndex = 0; d3.style.overflow = "hidden"; d3.innerHTML = '<img src="' + imgPath + '/common/bt2c.png" alt=""/>';
            bL[i].appendChild(d1);
            bL[i].appendChild(d2);
            bL[i].appendChild(d3);
        }
    }
}

/*	amex.initBoxW()
* to initialize boxes with gradient transparency of homepage
*/
amex.initBoxW = function() {
    var b = $c("div", "boxW490");
    for (var i = 0; i < b.length; i++) {
        amex.addPng(imgPath + "/common/boxW490.png", b[i], "bg");
    }
    b = $c("div", "boxW380");
    for (var i = 0; i < b.length; i++) {
        amex.addPng(imgPath + "/common/boxW380.png", b[i], "bg");
    }
}


/*	amex.initDefileur()
* to initialize javascript animated "defileur" item on the homepage
*/
/*
amex.hp_destinations={
url:"/en_us/handlers/destinationteaserhandler.ashx",
currentcity:0,
max:69
}*/
amex.initDefileur = function() {
    var d = $c("div", "defileur");
    var clickHandle = function(dir) {
        $(lList[0]).hide();
        var m = amex.hp_destinations.maxcount;
        var n = amex.hp_destinations.currentcity + dir;
        var target_city = (n > m) ? 0 : n;
        target_city = (target_city < 0) ? m : target_city;
        $(lList[0]).load(amex.hp_destinations.url + '?currentcity=' + target_city, function() {
            $(lList[0]).show('fast');
            amex.initButton2();
            amex.hp_destinations.currentcity = target_city;
        });
    }
    for (var i = 0; i < d.length; i++) {
        var lList = $t("li", d[i]);
        d[i].lList = lList;
        //on init shows li with index 0
        $(lList[0]).show("fast");
        var d1 = $dc("div");
        var d2 = $dc("div");
        d1.className = "arrL";
        d1.onclick = function() { clickHandle(-1); }
        d2.className = "arrR";
        d2.onclick = function() { clickHandle(1); }
        d[i].appendChild(d1);
        d[i].appendChild(d2);
        amex.addPng(imgPath + "/common/arr1L.png", d1, "arr1L");
        amex.addPng(imgPath + "/common/arr1R.png", d2, "arr1R");
    }
}

/*	amex.initQuickLinks1()
* to initialize javascript animated "defileur" item on the homepage
*/
amex.initQuickLinks1 = function() {
    var ql = $i("quickLinks1");
    if (ql) {
        amex.addPng(imgPath + "/common/bgQL.png", ql, "bg");
    }
}

/*	amex.initNavLeft1()
* to initialize left navigation with png as background
*/
amex.initNavLeft1 = function() {
    var o = $i("navLeft1");
    if (o) {
        var d2 = $dc("div");
        var d3 = $dc("div");
        d3.style.position = "absolute"; d3.style.width = "174px"; d3.style.top = "30px"; d3.style.left = "11px"; d3.className = "bg"; d3.style.zIndex = 0; d3.style.backgroundColor = '#FFF'; d3.style.opacity = '0.7'; d3.style.filter = 'Alpha(Opacity=70)'; d3.innerHTML = '&#160;';
        var im = $dc("img");
        d2.style.position = "absolute"; d2.style.width = "174px"; d2.style.top = "100%"; d2.style.left = "11px"; d2.style.zIndex = 5; d2.innerHTML = '<img src="' + imgPath + '/common/nLbg.png" width="174" height="16" alt="">';
        o.appendChild(d2);
        o.insertBefore(d3, o.firstChild);

        var nav = $t1L("li", $t("ul", o)[0]);
        for (var i = 0; i < nav.length; i++) {
            /*nav L2 highlight*/
            var subSel = $c("li", "selected", nav[i])[0];
            if (subSel) {
                var d4 = $dc("div");
                d4.style.position = "absolute"; d4.style.top = "-1px"; d4.style.left = "1px"; d4.style.zIndex = "1";
                d4.innerHTML = '<img src="' + imgPath + '/common/nLsub.png" width="185" height="22" alt=""/>';
                var lvl2 = $c("li", "selected", subSel)[0];
                if (lvl2) {
                    subSel = lvl2;
                    d4.style.left = "-10px";
                }
                subSel.insertBefore(d4, subSel.firstChild);
            }

            /*nav L1 bg*/
            var d1 = $dc("div");
            d1.style.position = "absolute"; d1.style.top = "0px"; d1.style.left = "0px"; d1.style.zIndex = "2";
            var img = "", h = "23";

            if (i == 0) { img = "nL1"; }
            else if (i == nav.length - 1) { img = "nL3"; h = "28"; }
            else { img = "nL2"; }
            if (nav[i].className == "selected") { img += "h"; h = "28"; }

            d1.innerHTML = '<img src="' + imgPath + '/common/' + img + '.png" width="175" height="' + h + '" alt=""/>';

            nav[i].insertBefore(d1, nav[i].firstChild);
        }

        d3.style.height = (o.offsetHeight < 30 ? 0 : (o.offsetHeight - 30)) + "px";
    }
}

amex.rescaleContent1bg = function() {
    var cnt = $i("content1");
    if (cnt && cnt.bg) {
        var h = cnt.offsetHeight;
        cnt.bg.style.height = (h - 45) + "px";
        cnt.b.style.top = h + "px";
    }
}

/* amex.initContent1()
* to initialize "content1" background transparency
* */
amex.initContent1 = function() {
    var cnt = $i("content1");
    if (cnt) {
        var d1 = $dc("div");
        var d2 = $dc("div");
        var d3 = $dc("div");
        d1.style.position = "absolute"; d1.style.top = "15px"; d1.style.left = "-164px"; d1.style.zIndex = 0; d1.innerHTML = '<img src="' + imgPath + '/common/cnt1Top.png" width="686" height="30" alt=""/>';
        d2.style.position = "absolute"; d2.style.top = "100%"; d2.style.left = "10px"; d2.style.zIndex = 0; d2.innerHTML = '<img src="' + imgPath + '/common/cnt1Bot.png" width="511" height="8" alt=""/>';
        d3.className = "bg"; d3.innerHTML = '&#160;';
        cnt.t = d1;
        cnt.b = d2;
        cnt.bg = d3;
        cnt.appendChild(cnt.t);
        cnt.appendChild(cnt.b);
        cnt.appendChild(cnt.bg);
        amex.rescaleContent1bg();
    }
}

/* amex.initCnt1Table()
* to initialize "content1" tables background transparency and rounded corners
* */
amex.initCnt1Table = function() {
    var cnt = $i("content1");
    if (cnt) {
        var tbl = $c("div", "table", cnt);
        for (var i = 0; i < tbl.length; i++) {
            var d1 = $dc("div");
            var d2 = $dc("div");
            var d3 = $dc("div");
            d1.style.position = "absolute"; d1.style.top = "0px"; d1.style.left = "0px"; d1.style.zIndex = 0; d1.innerHTML = '<img src="' + imgPath + '/common/tableTop.png" width="460" height="7" alt=""/>';
            d2.style.position = "absolute"; d2.style.top = "100%"; d2.style.left = "0px"; d2.style.zIndex = 0; d2.innerHTML = '<img src="' + imgPath + '/common/tableBot.png" width="460" height="8" alt=""/>';
            d3.className = "bg"; d3.innerHTML = '&#160;'; d3.style.height = (tbl[i].offsetHeight < 10 ? 0 : (tbl[i].offsetHeight - 10)) + "px";
            tbl[i].appendChild(d1);
            tbl[i].appendChild(d2);
            tbl[i].appendChild(d3);
        }
    }
}


/* amex.checkContentHeight(), amex.initAccordeon
* to initialize and manage accordion at the right of content
* */
amex.checkContentHeight = function() {
    var cnt = $i("content1");
    var bg1 = true;
    decay = -43;
    if (!cnt) {
        cnt = $i("content3");
        bg1 = false;
        decay = -3;
    }
    if (cnt) {
        cnt.style.height = "auto";

        if ($i("accordeon")) {
            var accordeonHeight = $i("accordeon").offsetHeight;
            if (cnt.offsetHeight <= accordeonHeight + decay + 10) {
                cnt.style.height = accordeonHeight + decay + "px";
            }
        }
        if (bg1) amex.rescaleContent1bg();
        amex.expandCntBg();
    }
}
amex.initAccordeon = function() {
    var ac = $i("accordeon");
    if (ac) {
        var d1 = $dc("div");
        var d2 = $dc("div");
        d1.style.position = "absolute"; d1.style.top = "0px"; d1.style.left = "0px"; d1.style.zIndex = 0; d1.innerHTML = '<img src="' + imgPath + '/common/accorTop.png" width="200" height="11" alt=""/>';
        d2.style.position = "absolute"; d2.id = "accordeonBottom"; d2.style.top = (ac.offsetHeight - 26) + "px"; d2.style.left = "0px"; d2.style.zIndex = 0; d2.innerHTML = '<img src="' + imgPath + '/common/accorBot.png" width="200" height="45" alt=""/>';
        ac.appendChild(d1);
        ac.appendChild(d2);

        //AEMXSUP-71
        bypassJSStuff($("div.item", $("#accordeon")).find("h2>a"));

        var items = $t1L("div", ac);
        for (var i = 0; i < items.length; i++) {
            if (items[i].className.indexOf("item") == -1) continue;
            items[i].lst = items[i];
            items[i].bottomForIE6fix = d2;
            items[i].ttl = $t1L("h2", items[i])[0];
            items[i].cnt = $t1L("div", items[i])[0];

            var d3 = $dc("div");
            var d4 = $dc("div");
            d3.className = "top";
            d4.className = "bot";
            items[i].cnt.appendChild(d3);
            items[i].cnt.appendChild(d4);

            items[i].ttl.onclick = function() {
                var curHeight = this.parentNode.cnt.offsetHeight + 24;
                if (this.parentNode.className.indexOf("selected") > -1) {
                    this.parentNode.parentNode.actuSel = null;
                    this.parentNode.className = this.parentNode.className.replace(/ selected/g, "").replace(/selected/g, "");
                    amex.displace(this.parentNode, "height", curHeight, -80, 24, function() { amex.checkContentHeight(); }, function() { $i("accordeonBottom").style.top = ($i("accordeon").offsetHeight - 26) + 'px'; });
                } else {
                    if (this.parentNode.parentNode.actuSel) {
                        this.parentNode.parentNode.actuSel.onclick();
                    }
                    this.parentNode.parentNode.actuSel = this;
                    this.parentNode.className += " selected";
                    amex.displace(this.parentNode, "height", 24, 30, curHeight, function() { amex.checkContentHeight(); }, function() { $i("accordeonBottom").style.top = ($i("accordeon").offsetHeight - 26) + 'px'; });
                }
                setCookie('AM_accordeon', this.parentNode.id, 365);
            }
            //added by hho - dont animate when showing default open item
            items[i].ttl.show = function() {
                var curHeight = this.parentNode.cnt.offsetHeight + 24;
                if (this.parentNode.className.indexOf("selected") > -1) {
                    this.parentNode.parentNode.actuSel = null;
                    this.parentNode.className = this.parentNode.className.replace(/ selected/g, "").replace(/selected/g, "");
                    amex.displace(this.parentNode, "height", curHeight, -80, 24, function() { amex.checkContentHeight(); }, function() { $i("accordeonBottom").style.top = ($i("accordeon").offsetHeight - 26) + 'px'; });
                } else {
                    if (this.parentNode.parentNode.actuSel) {
                        this.parentNode.parentNode.actuSel.onclick();
                    }
                    this.parentNode.parentNode.actuSel = this;
                    this.parentNode.className += " selected";
                    amex.displace(this.parentNode, "height", 24, curHeight, curHeight, function() { amex.checkContentHeight(); }, function() { $i("accordeonBottom").style.top = ($i("accordeon").offsetHeight - 26) + 'px'; });
                }
            }
            /*if (items[i].className.indexOf("opened") != -1) {
            var lclTtl = items[i].ttl;
            addOnloadEvent(function(){
            lclTtl.onclick();
            });
            }*/
            //added by hho to open last active acc item by default
            if (getCookie('AM_accordeon') == "")
                setCookie('AM_accordeon', 't_0', 365);
            if (items[i].id == getCookie('AM_accordeon')) {
                var lclTtl = items[i].ttl;
                addOnloadEvent(function() {
                    lclTtl.show();
                });
            }

        }
    }
}


/* amex.initContent2()
* to initialize "content2" background transparency
* */
amex.initContent2 = function() {
    var cnt = $i("content2");
    if (cnt) {
        var d1 = $dc("div");
        var d2 = $dc("div");
        var d3 = $dc("div");
        d1.style.position = "absolute"; d1.style.top = "15px"; d1.style.left = "-164px"; d1.style.zIndex = 0; d1.innerHTML = '<img src="' + imgPath + '/common/cnt2Top.png" width="894" height="30" alt=""/>';
        d2.style.position = "absolute"; d2.style.top = "100%"; d2.style.left = "10px"; d2.style.zIndex = 0; d2.innerHTML = '<img src="' + imgPath + '/common/cnt2Bot.png" width="710" height="15" alt=""/>';
        d3.className = "bg"; d3.innerHTML = '&#160;';
        cnt.t = d1;
        cnt.b = d2;
        cnt.bg = d3;
        cnt.appendChild(cnt.t);
        cnt.appendChild(cnt.b);
        cnt.appendChild(cnt.bg);
        amex.rescaleContent2bg();
    }
}

amex.rescaleContent2bg = function() {
    var cnt = $i("content2");
    if (cnt && cnt.bg) cnt.bg.style.height = (cnt.b.offsetTop - 45) + "px";
}

/* amex.initContent2()
* to initialize "aboutList" (all about your flight page) background transparency
* and sub navigation with shadows
* */
amex.initAboutList = function() {
    var aL = $i("aboutList");
    if (aL) {
        var li = $t1L("li", aL);

        $t1L("div", li[0])[0].style.left = "0px";
        $t1L("div", li[1])[0].style.left = "-7px";
        $t1L("div", li[2])[0].style.left = "-8px";
        $t1L("div", li[3])[0].style.right = "14px";
        $t1L("div", li[4])[0].style.right = "14px";

        for (var i = 0; i < li.length; i++) {
            li[i].lbl = $t1L("span", li[i])[0];
            li[i].sub = $t1L("div", li[i])[0];
            li[i].onmouseover = function(i) {
                aL.className = "about_" + this.id;
                this.sub.style.display = "block";
                this.lbl.className += " selected";
                this.d1.style.height = (this.sub.offsetHeight < 1 ? 0 : (this.sub.offsetHeight - 1)) + "px";
                this.d3.style.width = (this.sub.offsetWidth < 22 ? 0 : (this.sub.offsetWidth - 22)) + "px";
            }
            li[i].onmouseout = function() {
                aL.className = "";
                this.sub.style.display = "none";
                this.lbl.className = this.lbl.className.replace(/ selected/g, "");
            }
            var d1 = $dc("div");
            var d2 = $dc("div");
            var d3 = $dc("div");
            var d4 = $dc("div");
            d1.className = "shad1"; d1.innerHTML = '<img src="' + imgPath + '/common/shadV.png" style="width:7px;height:530px" alt=""/>';
            d2.className = "shad2"; d2.innerHTML = '<img src="' + imgPath + '/common/rCblueL.png" style="width:11px;height:19px" alt=""/>';
            d3.className = "shad3"; d3.innerHTML = '<img src="' + imgPath + '/common/shadH.png" style="width:1024px;height:19px" alt=""/>';
            d4.className = "shad4"; d4.innerHTML = '<img src="' + imgPath + '/common/rCblueR.png" style="width:18px;height:19px" alt=""/>';
            li[i].d1 = d1; li[i].d3 = d3;
            li[i].sub.appendChild(d1);
            li[i].sub.appendChild(d2);
            li[i].sub.appendChild(d3);
            li[i].sub.appendChild(d4);
        }
    }
}
/* amex.initExperience()
* to initialize "experience" animated section
* */
amex.initExperience = function() {
    var exp = $i("experience");
    if (exp) {
        // experience background
        amex.addPng(imgPath + "/common/expBg.png", exp, "expBg");

        // experience navigation background
        amex.addPng(imgPath + "/common/expNavBg.png", exp, "navBg");

        var cnt = $c1L("div", "cnt", $c1L("div", "contents", exp)[0]);
        exp.cnt = cnt;

        for (var i = 0; i < cnt.length; i++) {
            cnt[i].bg = $c1L("div", "bg", cnt[i])[0];

            //fix for all version of IE as IE does not display png transparency correctly with filter Alpha
            amex.IE6fix(cnt[i].bg, true);

            cnt[i].bg.style.display = "none";
            cnt[i].exp = exp;
            cnt[i].cnt = cnt;

            /*to initialize text block when it exists*/
            var t = $c1L("div", "text", cnt[i])[0];
            if (t) {
                cnt[i].txt = t;
                t.style.left = "720px";
                amex.addPng(imgPath + "/common/expCntBot.png", t, "bgBot");
                amex.addPng(imgPath + "/common/expCntTop.png", t, "bgTop");
                var d1 = $dc("div");
                d1.className = "bgMid"; d1.style.height = (t.offsetHeight < 43 ? 0 : (t.offsetHeight - 43)) + "px";
                t.appendChild(d1);
            }

            cnt[i].show = function() {
                this.style.display = "block";
                this.exp.actuSel = this;
                if (this.txt) amex.displace(this.txt, "left", this.txt.offsetLeft, -50, 400);
                this.exp.locked = true;
                var lclExp = this.exp;

                var lTs = this;
                /*when appear is over, sets all hidden cnt to display=none to allow links and text accessibility*/
                amex.appear(this.bg, 15, function() { lclExp.locked = false; for (var j = 0; j < lTs.cnt.length; j++) lTs.cnt[j].style.display = (lTs.cnt[j] == lTs ? "block" : "none"); });
            }
            cnt[i].hide = function(nxt) {
                if (this.txt) amex.displace(this.txt, "left", this.txt.offsetLeft, 50, 800);
                var lclNxt = nxt;
                var lclThis = this;
                amex.appear(this.bg, -15, function() { lclNxt.show(); });
            }
        }

        /*to initialize experience navigation*/
        var aL = $t("a", $c1L("div", "nav", exp)[0]);
        for (var i = 0; i < aL.length; i++) {
            aL[i].exp = exp;
            aL[i].cnt = cnt[i];
            aL[i].onclick = function() {
                if (!this.exp.locked) {
                    if (this.exp.actuNav) this.exp.actuNav.className = "";
                    this.exp.actuNav = this.parentNode;
                    this.parentNode.className = "selected";
                    this.blur();
                    if (this.exp.actuSel) this.exp.actuSel.hide(this.cnt);
                    else this.cnt.show();
                }
            }
        }
        amex.initNavStyle(aL);
        var lclaL0 = aL[0];
        addOnloadEvent(function() {
            lclaL0.onclick();
        });
    }
}

/* amex.initSplitbox()
* to initialize "splitbox" items (future flights)
* */
amex.initSplitbox = function() {
    var sb = $c("div", "splitBox");
    for (var i = 0; i < sb.length; i++) {
        amex.addPng(imgPath + "/common/bsT.png", sb[i], "top");
        amex.addPng(imgPath + "/common/bsB.png", sb[i], "bot");
    }
}

/* amex.initBoxBlue()
* to initialize "boxBlue" items
* */
amex.initBoxBlue = function() {
    var sb = $c("div", "boxBlue");
    for (var i = 0; i < sb.length; i++) {
        amex.addPng(imgPath + "/common/bBlueT.png", sb[i], "top");
        amex.addPng(imgPath + "/common/bBlueB.png", sb[i], "bot");
    }
}

/* amex.initBoxLBlue()
* to initialize "boxLBlue" items
* */
amex.initBoxLBlue = function() {
    var sb = $c("div", "boxLBlue");
    for (var i = 0; i < sb.length; i++) {
        amex.addPng(imgPath + "/common/bLBlueT.png", sb[i], "top");
        amex.addPng(imgPath + "/common/bLBlueB.png", sb[i], "bot");
    }
}

amex.popup = new Object();
amex.popup.visible = false;
amex.popup.delayresize = function() {
    if (amex.IE6) setTimeout(amex.popup.resize, 50);
    else amex.popup.resize();
}
amex.popup.resize = function() {
    if (amex.popup.visible) {
        amex.popup.bg.style.width = amex.body.clientWidth + "px";
        amex.popup.bg.style.height = amex.body.clientHeight + "px";
        amex.popup.win.style.left = (amex.body.clientWidth / 2) - (amex.popup.win.offsetWidth / 2) + "px";
        var top = (document.documentElement.clientHeight / 2) + document.documentElement.scrollTop + document.body.scrollTop - (amex.popup.win.offsetHeight / 2);
        top = top < 0 ? 0 : top;
        amex.popup.win.style.top = top + "px";
    }
}
amex.popup.show = function(uri, cfg) {
    //cfg
    //amex.popup.show("uri",{type:"iframe",height:650});
    //amex.popup.show("uri") <- ajax request automatic height
    cfg = cfg || { type: "ajax" }
    if (!amex.popup.bg) {
        amex.popup.bg = $dc("div");
        amex.popup.win = $dc("div");
        amex.popup.cnt = $dc("div");
        var s = amex.popup.bg.style;
        s.position = "absolute";
        s.background = "#303129";
        s.zIndex = "500";
        s.top = "0px";
        s.left = "0px";
        amex.popup.bg.innerHTML = "&#160;";
        if (amex.IE) {
            s.filter = "Alpha(Opacity:70);";
        } else { s.opacity = 0.7; }

        if (cfg.type === "iframe")
            amex.popup.win.className = "popupWin520";
        else
            amex.popup.win.className = "popupWin";

        s = amex.popup.win.style;
        s.position = "absolute";
        s.zIndex = "501";
        s.top = "0px";
        s.left = "0px";

        var topWin = $dc("div"), botWin = $dc("div");
        var tL = $dc("div"), tR = $dc("div"), bL = $dc("div"), bR = $dc("div");
        topWin.className = "topWin";
        topWin.innerHTML = "&#160;";
        botWin.className = "botWin";
        botWin.innerHTML = "&#160;";
        tL.className = "tL";
        tR.className = "tR";
        bL.className = "bL";
        bR.className = "bR";

        tR.onclick = amex.popup.hide;

        amex.addPng(imgPath + "/common/popup.png", tL, "corner");
        amex.addPng(imgPath + "/common/popup.png", tR, "corner");
        amex.addPng(imgPath + "/common/popup.png", bL, "corner");
        amex.addPng(imgPath + "/common/popup.png", bR, "corner");

        topWin.appendChild(tL);
        topWin.appendChild(tR);
        botWin.appendChild(bL);
        botWin.appendChild(bR);

        amex.popup.win.appendChild(topWin);
        amex.popup.win.appendChild(botWin);
        amex.popup.win.appendChild(amex.popup.cnt);

        amex.body.appendChild(amex.popup.bg);
        amex.body.appendChild(amex.popup.win);

        amex.popup.bg.onclick = amex.popup.hide;

        addOnresizeEvent(amex.popup.resize);
    }

    amex.popup.cnt.innerHTML = "";

    //AEMXDEV-2 MGA 20091015
    if (cfg.type === "ajax") {
        amex.HTMLrequest(function(val) { amex.popup.cnt.innerHTML = val; amex.popup.delayresize(); }, uri);
    } else if (cfg.type === "iframe") {
        amex.popup.cnt.innerHTML = '<iframe width="100%" height="' + cfg.height + '" src="' + uri + '" frameborder="0"></iframe>'
        amex.popup.delayresize();
    } else {

    }

    //hides select in IE6
    if (amex.IE6) { var sel = $t("select"); for (var i = 0; i < sel.length; i++) sel[i].style.visibility = "hidden"; }

    amex.popup.bg.style.display = "block";
    amex.popup.win.style.display = "block";
    amex.popup.visible = true;
    amex.popup.resize();
}

amex.popup.showdiv = function(divID) {
    if (!amex.popup.bg) {
        amex.popup.bg = $dc("div");
        amex.popup.win = $dc("div");
        amex.popup.cnt = $dc("div");
        var s = amex.popup.bg.style;
        s.position = "absolute";
        s.background = "#303129";
        s.zIndex = "500";
        s.top = "0px";
        s.left = "0px";
        amex.popup.bg.innerHTML = "&#160;";
        if (amex.IE) {
            s.filter = "Alpha(Opacity:70);";
        } else { s.opacity = 0.7; }

        amex.popup.win.className = "popupWin";
        s = amex.popup.win.style;
        s.position = "absolute";
        s.zIndex = "501";
        s.top = "0px";
        s.left = "0px";

        var topWin = $dc("div"), botWin = $dc("div");
        var tL = $dc("div"), tR = $dc("div"), bL = $dc("div"), bR = $dc("div");
        topWin.className = "topWin";
        topWin.innerHTML = "&#160;";
        botWin.className = "botWin";
        botWin.innerHTML = "&#160;";
        tL.className = "tL";
        tR.className = "tR";
        bL.className = "bL";
        bR.className = "bR";

        tR.onclick = amex.popup.hide;

        amex.addPng(imgPath + "/common/popup.png", tL, "corner");
        amex.addPng(imgPath + "/common/popup.png", tR, "corner");
        amex.addPng(imgPath + "/common/popup.png", bL, "corner");
        amex.addPng(imgPath + "/common/popup.png", bR, "corner");

        topWin.appendChild(tL);
        topWin.appendChild(tR);
        botWin.appendChild(bL);
        botWin.appendChild(bR);

        amex.popup.win.appendChild(topWin);
        amex.popup.win.appendChild(botWin);
        amex.popup.win.appendChild(amex.popup.cnt);

        amex.body.appendChild(amex.popup.bg);
        amex.body.appendChild(amex.popup.win);

        amex.popup.bg.onclick = amex.popup.hide;

        addOnresizeEvent(amex.popup.resize);
    }

    amex.popup.cnt.innerHTML = "";
    amex.popup.cnt.innerHTML = document.getElementById(divID).innerHTML;
    amex.popup.delayresize();
    //amex.HTMLrequest(function(val){amex.popup.cnt.innerHTML=val;amex.popup.delayresize();},uri);

    //hides select in IE6
    if (amex.IE6) { var sel = $t("select"); for (var i = 0; i < sel.length; i++) sel[i].style.visibility = "hidden"; }

    amex.popup.bg.style.display = "block";
    amex.popup.win.style.display = "block";
    amex.popup.visible = true;
    amex.popup.resize();
}

amex.popup.hide = function() {
    amex.popup.bg.style.display = "none";
    amex.popup.win.style.display = "none";
    amex.popup.visible = false;
    //shows select in IE6
    if (amex.IE6) { var sel = $t("select"); for (var i = 0; i < sel.length; i++) sel[i].style.visibility = "visible"; }
}

amex.HTMLrequest = function(fct, URI) {
    var lclFct = fct;
    var lclURI = URI;

    var xmlhttp = null;
    if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else if (window.ActiveXObject) { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
    xmlhttp.open("GET", lclURI, true);
    xmlhttp.setRequestHeader('content-type', 'text/xml');
    xmlhttp.send(lclURI);
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4) {
            if (xmlhttp.status == 200 || xmlhttp.status == 0) {
                lclFct(xmlhttp.responseText);
            }
        }
    }

}

amex.initMundo = function() {
    var mR = $c("div", "mundoRegister");
    for (var i = 0; i < mR.length; i++) {
        amex.addPng(imgPath + "/common/mundoBoxT.png", mR[i], "top");
        amex.addPng(imgPath + "/common/mundoBoxB.png", mR[i], "bot");
    }
}

amex.initOffices = function() {
    var mR = $c("div", "officesbox2");
    for (var i = 0; i < mR.length; i++) {
        amex.addPng(imgPath + "/common/mundoBoxT.png", mR[i], "top");
        amex.addPng(imgPath + "/common/mundoBoxB.png", mR[i], "bot");
    }
}


/* amex.initVideoTabs()
* to initialize "videoTabs" items (page discoverExperience)
* */
amex.initVideoTabs = function() {
    var vT = $c("div", "videoTabs");
    for (var i = 0; i < vT.length; i++) {
        amex.addPng(imgPath + "/common/discovBtop.png", vT[i], "top");
        amex.addPng(imgPath + "/common/discovBbot.png", vT[i], "bot");

        var tbList = $t1L("ul", vT[i])[0];
        var thumb = $t1L("li", tbList);
        vT[i].tb = thumb;

        if (thumb.length > 3) { /*arrows definition if more than 3 items*/
            vT[i].active = true;
            vT[i].goTo = function(val) {
                this.active = false;
                var lclThis = this;
                var fctAct = function() { lclThis.active = true; };
                for (var k = 0; k < this.tb.length; k++) {
                    var moveToX = this.tb[k].offsetLeft - (42 * val);
                    amex.displace(this.tb[k], "left", this.tb[k].offsetLeft, -10 * val, moveToX, ((k == this.tb.length - 1) ? fctAct : null), null);
                }

                var n = this.next;
                if (this.tb[this.tb.length - 1].offsetLeft - (42 * val) < 124) {
                    n.style.opacity = 0.3;
                    n.style.cursor = "default";
                    n.style.filter = "Alpha(Opacity=30)";
                    n.active = false;
                } else if (!n.active) {
                    n.style.opacity = 1;
                    n.style.cursor = "pointer";
                    n.style.filter = "Alpha(Opacity=100)";
                    n.active = true;
                }

                var p = this.prev;
                if (this.tb[0].offsetLeft - (42 * val) >= 0) {
                    p.style.opacity = 0.3;
                    p.style.cursor = "default";
                    p.style.filter = "Alpha(Opacity=30)";
                    p.active = false;
                } else if (!p.active) {
                    p.style.opacity = 1;
                    p.style.cursor = "pointer";
                    p.style.filter = "Alpha(Opacity=100)";
                    p.active = true;
                }
            }

            tbList.style.width = "124px";
            tbList.style.marginLeft = "27px";
            var d1 = $dc("div");
            var d2 = $dc("div");
            d1.className = "prevButton";
            d2.className = "nextButton";
            d1.onclick = function() { if (this.active && this.parentNode.active) this.parentNode.goTo(-3); }
            d2.onclick = function() { if (this.active && this.parentNode.active) this.parentNode.goTo(3); }
            vT[i].appendChild(d1);
            vT[i].appendChild(d2);
            vT[i].prev = d1;
            vT[i].next = d2;
            amex.addPng(imgPath + "/common/btArrPrev.png", d1, "");
            amex.addPng(imgPath + "/common/btArrNext.png", d2, "");
            amex.IE6fix(vT[i], true);
        }

        for (var j = 0; j < thumb.length; j++) {
            thumb[j].L = j * 42;
            thumb[j].style.left = thumb[j].L + "px";
        }

        if (thumb.length > 3) vT[i].goTo(0);
    }
}

/* amex.initVideoTab2()
* to initialize "videoTabs2" items (page travelers)
* */
amex.initVideoTab2 = function() {
    var vT = $c("div", "videoTab2");
    for (var i = 0; i < vT.length; i++) {
        if (vT[i].className.indexOf("noBG") == -1) {
            amex.addPng(imgPath + "/common/bBlue455T.png", vT[i], "top");
            amex.addPng(imgPath + "/common/bBlue455B.png", vT[i], "bot");
        }

        var tbList = $t1L("ul", vT[i])[0];
        var thumb = $t1L("li", tbList);
        vT[i].tb = thumb;

        if (thumb.length > 3) { /*arrows definition if more than 3 items*/
            vT[i].active = true;
            vT[i].goTo = function(val) {
                this.active = false;
                var lclThis = this;
                var fctAct = function() { lclThis.active = true; };
                for (var k = 0; k < this.tb.length; k++) {
                    var moveToX = this.tb[k].offsetTop - (53 * val);
                    amex.displace(this.tb[k], "top", this.tb[k].offsetTop, -10 * val, moveToX, ((k == this.tb.length - 1) ? fctAct : null), null);
                }

                var n = this.next;
                if (this.tb[this.tb.length - 1].offsetTop - (53 * val) < 124) {
                    n.style.opacity = 0.3;
                    n.style.cursor = "default";
                    n.style.filter = "Alpha(Opacity=30)";
                    n.active = false;
                } else if (!n.active) {
                    n.style.opacity = 1;
                    n.style.cursor = "pointer";
                    n.style.filter = "Alpha(Opacity=100)";
                    n.active = true;
                }

                var p = this.prev;
                if (this.tb[0].offsetTop - (53 * val) >= 0) {
                    p.style.opacity = 0.3;
                    p.style.cursor = "default";
                    p.style.filter = "Alpha(Opacity=30)";
                    p.active = false;
                } else if (!p.active) {
                    p.style.opacity = 1;
                    p.style.cursor = "pointer";
                    p.style.filter = "Alpha(Opacity=100)";
                    p.active = true;
                }
            }

            tbList.style.height = "156px";
            tbList.style.marginTop = "27px";
            var d1 = $dc("div");
            var d2 = $dc("div");
            d1.className = "prevButton";
            d2.className = "nextButton";
            d1.onclick = function() { if (this.active && this.parentNode.active) this.parentNode.goTo(-3); }
            d2.onclick = function() { if (this.active && this.parentNode.active) this.parentNode.goTo(3); }



            vT[i].appendChild(d1);
            vT[i].appendChild(d2);
            vT[i].prev = d1;
            vT[i].next = d2;
            amex.addPng(imgPath + "/common/btArrUp.png", d1, "");
            amex.addPng(imgPath + "/common/btArrDown.png", d2, "");
            amex.IE6fix(vT[i], true);
        }

        for (var j = 0; j < thumb.length; j++) {
            thumb[j].T = j * 53;
            thumb[j].style.top = thumb[j].T + "px";
        }

        if (thumb.length > 3) vT[i].goTo(0);
    }
}

/* amex.runWorldClock() amex.initWorldClock()
* to initialize "worldClock" items (page practicalInfo)
* to preinstanciate the clock the following div must be present and first div inside "worldClock" div
* <div>hh:mm:ss</div>
* */
amex.runWorldClock = function(o, time) {
    o.s.style.top = (0 - 85 * time[2]) + "px";
    o.m.style.top = (0 - 85 * time[1]) + "px";
    o.h.style.top = (0 - 85 * (time[0] % 12)) + "px";
    var s = (new Date()).getSeconds();
    if (time[2] > s) { time[1]++; time[2] = time[2] % 60; }
    if (time[1] >= 60) { time[0]++; time[1] = time[1] % 60; }
    if (time[0] >= 12) { time[0] = time[0] % 12; }
    time[2] = s;
    var o1 = o, time1 = time;
    setTimeout(function() { amex.runWorldClock(o1, time1); }, 1000);
}
amex.initWorldClock = function() {
    var wC = $c("div", "worldClock");
    for (var i = 0; i < wC.length; i++) {
        var d1 = $dc("div");
        d1.className = "clock";
        var time;

        var hDiv = $t1L("div", wC[i])[0];
        if (hDiv.innerHTML.indexOf(":") > -1) {
            time = hDiv.innerHTML.split(":");
            time[0] = parseInt(time[0]);
            time[1] = parseInt(time[1]);
            time[2] = parseInt(time[2]);
            wC[i].removeChild(hDiv)
        } else {
            var now = new Date();
            time = [now.getHours(), now.getMinutes(), now.getSeconds()];
        }

        wC[i].appendChild(d1);
        amex.addPng(imgPath + "/common/clockDeco.png", d1, "clockDeco");
        wC[i].s = amex.addPng(imgPath + "/common/clockS.png", d1, "clockS");
        wC[i].m = amex.addPng(imgPath + "/common/clockM.png", d1, "clockM");
        wC[i].h = amex.addPng(imgPath + "/common/clockH.png", d1, "clockH");
        amex.addPng(imgPath + "/common/clockBg.png", d1, "clockBg");

        amex.runWorldClock(wC[i], time);
    }
}

amex.initCurrencyConverter = function() {
    var cc = $i("currencyConverter");
    if (cc) {
        $t1L("select", cc)[0].onchange = function() {
            if (this[this.selectedIndex].value != 0) {
                $i("ccEur1").innerHTML = this[this.selectedIndex].value + "" + this[this.selectedIndex].text;
                $i("ccEur100").innerHTML = (this[this.selectedIndex].value * 100) + "" + this[this.selectedIndex].text;
            } else {
                $i("ccEur1").innerHTML = "";
                $i("ccEur100").innerHTML = "";
            }
        }
    }
}

/*amex.fixSelectIE6
* to hide select in IE6 that are under o (positionned in absolute) to avoid select to go through o
*/
amex.fixSelectIE6 = function(o) {
    if (amex.IE6) {
        var sLst = $t("select");
        if (o) {
            var cZone = CEDjs.getPos(o);
            cZone.x2 = cZone.x + o.offsetWidth;
            cZone.y2 = cZone.y + o.offsetHeight;
            for (var k = 0; k < sLst.length; k++) {
                if (!sLst[k].zone) {
                    sLst[k].zone = CEDjs.getPos(sLst[k]);
                    sLst[k].zone.x2 = sLst[k].zone.x + sLst[k].offsetWidth;
                    sLst[k].zone.y2 = sLst[k].zone.y + sLst[k].offsetHeight;
                }
                var x1 = cZone.x, x2 = cZone.x2, xa = sLst[k].zone.x, xb = sLst[k].zone.x2;
                var y1 = cZone.y, y2 = cZone.y2, ya = sLst[k].zone.y, yb = sLst[k].zone.y2;
                if (x1 < xb && xb - x1 < x2 - x1 + xb - xa && y1 < yb && yb - y1 < y2 - y1 + yb - ya) {
                    sLst[k].style.visibility = "hidden";
                } else {
                    sLst[k].style.visibility = "visible";
                }
            }
        } else {
            for (var k = 0; k < sLst.length; k++) {
                sLst[k].style.visibility = "visible";
            }
        }
    }
}

/*the calendar... too hard to comment... :-\ */
var CEDjs = new Object();
CEDjs.Calendar = new Object();
CEDjs.Calendar.DbyM = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
CEDjs.Calendar.display = function(o) { var o = o.parentNode; if (!o.cal) { o.cal = new Date(); o.input = $t1L("input", o); o.getDate = CEDjs.Calendar.getDate; o.target = $t1L("span", o)[$t1L("span", o).length - 1]; o.redraw = this.redraw; o.defDays = this.defDays; o.defMonth = this.defMonth; o.DbyM = this.DbyM; }; var ipt = o.input[0].value.split("/"); var Y = (ipt[2] && ipt[2] != "") ? parseInt(ipt[2]) : o.cal.getFullYear(); var M = (ipt[1] && ipt[1] != "") ? (parseInt(ipt[1].charAt(0) == "0" ? ipt[1].charAt(1) : ipt[1]) - 1) : o.cal.getMonth(); var D = (ipt[0] && ipt[0] != "") ? parseInt(ipt[0].charAt(0) == "0" ? ipt[0].charAt(1) : ipt[0]) : o.cal.getDate(); o.cal.setFullYear(Y, M, D); o.current = new Date(Y, M, D); o.redraw(o.current); }
CEDjs.Calendar.redraw = function(d) { var WR = ''; var y = d.getFullYear(); var m = d.getMonth(); var cP = 'style="cursor:pointer;"'; WR += '<span class="nav">'; WR += '<span class="year"><span onclick="CEDjs.Calendar.nextMonth(this,-12);" class="prv" ' + cP + '>&#171;</span>' + y + '<span onclick="CEDjs.Calendar.nextMonth(this,12);" class="nxt" ' + cP + '>&#187;</span></span>'; WR += '<span class="month"><span onclick="CEDjs.Calendar.nextMonth(this,-1);" class="prv" ' + cP + '>&#171;</span>' + this.defMonth[m] + '<span onclick="CEDjs.Calendar.nextMonth(this,1);" class="nxt" ' + cP + '>&#187;</span></span>'; WR += '</span>'; WR += '<table border="0" cellpadding="0" cellspacing="0">'; WR += '<thead><tr>'; for (var i = 0; i < 7; i++) { WR += '<th class="day' + i + '">' + this.defDays[i].charAt(0) + '</th>'; }; WR += '</tr></thead>'; WR += '<tbody><tr>'; var sD = new Date(y, m, 1).getDay(); var dL; if (m == 1 && y % 4 == 0) { dL = 29 + sD; } else { dL = this.DbyM[m] + sD; } var lines = Math.ceil(dL / 7) * 7; var YnMmatch = y == this.cal.getFullYear() && m == this.cal.getMonth(); for (var i = 0; i < lines; i++) { var cls = "day" + i % 7; if (YnMmatch && i - sD == this.cal.getDate() - 1) cls = "selected"; if (i - sD >= 0 && i < dL) { WR += "<td onmouseover='this.className=\"over\";' onmouseout='this.className=\"" + cls + "\";' onclick='CEDjs.Calendar.selDate(this," + y + "," + m + "," + (i - sD + 1) + ");' class='" + cls + "' " + cP + ">" + (i - sD + 1) + "</td>"; } else { WR += "<td class='empty'></td>"; }; if (i % 7 == 6 && i - sD < dL - 1) WR += "</tr><tr>"; }; WR += '</tr></tbody>'; WR += '</table>'; this.target.innerHTML = WR; this.target.style.display = "block"; }
CEDjs.Calendar.selDate = function(o, Y, M, D) { while (o && !o.cal) o = o.parentNode; if (o) { o.input[0].value = (D < 10 ? "0" : "") + D + "/" + (M < 9 ? "0" : "") + (M + 1) + "/" + Y; o.cal.setFullYear(Y, M, D); o.current.setFullYear(Y, M, D); o.target.style.display = "none"; o.style.zIndex = "5"; amex.fixSelectIE6(o.target); }; }
CEDjs.Calendar.nextMonth = function(o, m) { while (o && !o.cal) o = o.parentNode; if (o) { o.current.setFullYear(o.current.getFullYear(), o.current.getMonth() + m, 1); o.redraw(o.current); } }
CEDjs.Calendar.defDays = EMA.labels.dayNames.long;
CEDjs.Calendar.defMonth = EMA.labels.monthNames.long;
CEDjs.getPos = function(o) { var P = { x: 0, y: 0 }; while (o) { P.x += o.offsetLeft; P.y += o.offsetTop; o = o.offsetParent; }; return P; };

amex.initCalendar = function() {
    var cal = $c("a", "calendar");
    for (var i = 0; i < cal.length; i++) {
        var sp = cal[i].parentNode;
        sp.style.position = "relative";
        var spCal = $dc("span"); spCal.className = "cedcalendar"; sp.appendChild(spCal);
        var ipt = $t1L("input", sp)[0];
        cal[i].ipt = ipt;
        cal[i].href = "javascript:void(0);";
        cal[i].onclick = function() {
            if (this.parentNode.target && this.parentNode.target.style.display == "block") {
                this.parentNode.target.style.display = "none";
                this.parentNode.style.zIndex = 5;
            } else {
                CEDjs.Calendar.display(this);
                this.parentNode.style.zIndex = 5000;
            }
            amex.fixSelectIE6(this.parentNode.target);

        }
        ipt.cal = cal[i]
        ipt.style.cursor = "default";
        ipt.onfocus = function() {
            this.cal.focus();
            this.cal.onclick();
        }
        ipt.onmousedown = ipt.onkeyup = function() {
            this.value = "";
            this.blur();
        }

        sp.onmouseover = function() {
            this.off = false;
            if (this.TO) clearTimeout(this.TO);
        }
        sp.onmouseout = function() {
            var lclThis = this;
            this.off = true;
            this.TO = setTimeout(function() {
                if (lclThis.off && lclThis.target) {
                    lclThis.target.style.display = "none";
                    lclThis.style.zIndex = 5;
                    amex.fixSelectIE6(lclThis.target);
                }
            }, 300);
        }
    }
}

CEDjs.Xmlhttp = new Object();
CEDjs.Xmlhttp.get = function(url, fct, isXML) {
    var xmlhttp = null; try { xmlhttp = new XMLHttpRequest(); } catch (ex) { try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (ex) { return false; } }
    try {
        xmlhttp.open("GET", url, true);
        var lclFct = fct, lclisXML = isXML;
        xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4) { if (xmlhttp.status == 200 || xmlhttp.status == 0) { if (lclisXML) { lclFct(xmlhttp.responseXML); } else { lclFct(xmlhttp.responseText); }; }; }; };
        xmlhttp.send(url);
    } catch (ex) { alert(ex); }
}




//MGA 20090625 AEMXCOORD-105
amex.escapeString = function(str) {
    var i = 0, t = [];
    while (i < str.length) {
        t.push(amex.escapeChars(str.substring(i, i + 1)));
        i++;
    }
    return t.join("");
}

amex.escapeChars = function(t) {
    if (t.charCodeAt(0) < 224) { return t }
    t = t.toLowerCase();
    /*
    224 à 225 á 226 â 227 ã 228 ä 229 å 230 æ 231 ç 232 è 233 é 234 ê 235 ë 236 ì 237 í 238 î 239 ï 240 ð 241 ñ 242 ò 243 ó 244 ô 245 õ 246 ö 247 ÷ 248 ø 249 ù 250 ú 251 û 252 ü 253 ý
    */
    var n = t.charCodeAt(0);
    if (n >= 224 && n < 231) { return "a" }
    if (n === 231) { return "c" }
    if (n >= 232 && n < 235) { return "e" }
    if (n >= 236 && n < 239) { return "i" }
    if (n === 241) { return "n" }
    if (n >= 242 && n < 246) { return "o" }
    if (n >= 249 && n < 252) { return "u" }
    if (n === 253) { return "y" }
    return t;
}
//end of AEMXCOORD-105
/*airport management*/
amex.airport = new Object();
amex.airport.isLoading = false;
amex.airport.target;
amex.airport.drawList = function(o) {
    //MGA 20090625 AEMXCOOR-107 removes the currently displayed overlays
    /*try{
    if(o.id.indexOf("_txtFrom")>-1){amex.overlays[1].style.display="none";}
    if(o.id.indexOf("_txtTo")>-1){amex.overlays[0].style.display="none";}
    } catch (e) {}*/
    //end of AEMXCOOR-107
    o.expand.innerHTML = "";
    var ul = $dc("ul");
    var lst;
    //var flag=0;

    if (o.trg.listRestrict && o.trg.listRestrict.list && o.trg.listRestrict.instance != o) {
        lst = new Object();
        var Rlst = o.trg.listRestrict.list;
        for (var i = 0; i < Rlst.length; i++) {
            lst[Rlst[i]] = amex.airport.list[Rlst[i]];
        }
    } else {
        lst = amex.airport.list;
    }
    var str = o.value;
    o.sel = -1;
    var counter = 0;

    for (var i in lst) {
        //MGA 20090625 AEMXCOOR-105
        if (!lst[i] || !lst[i].t) { continue; }
        lst[i].escaped = amex.escapeString(lst[i].t);
        if ((lst[i].t.toLowerCase().indexOf(str.toLowerCase()) == -1 && lst[i].escaped.toLowerCase().indexOf(str.toLowerCase()) == -1) && lst[i].c.toLowerCase().indexOf(str.toLowerCase()) == -1) {
            continue;
        }
        // end of AEMXCOOR-105
        var li = $dc("li");
        li.innerHTML = lst[i].t + " (" + lst[i].c + ")";
        li.code = lst[i].c;
        li.ref = lst[i];
        li.input = o;
        li.count = counter;
        li.onmouseover = function() {
            if (this.input.sel > -1) this.input.list.childNodes[this.input.sel].style.backgroundColor = "";
            this.input.sel = this.count;
            this.input.list.childNodes[this.input.sel].style.backgroundColor = "#FFF";
        }
        li.onmouseout = function() {
            this.input.list.childNodes[this.input.sel].style.backgroundColor = "";
            this.input.sel = -1;
        }
        li.onclick = function() {
            this.input.code = this.code;
            this.input.value = this.innerHTML;
            this.input.expand.style.display = "none";
            this.input.blur();
            if (!this.input.trg.listRestrict || this.input.trg.listRestrict.instance == this.input) {
                if (this.input.trg.listRestrict && this.input.trg.listRestrict.toReset) {
                    this.input.trg.listRestrict.toReset[0].value = "";
                    this.input.trg.listRestrict.toReset[1].value = "";
                }
                if (!this.ref.r) this.ref.r = this.ref.xml.getAttribute("r").split(",");
                this.input.trg.listRestrict = { instance: this.input, list: this.ref.r };
            } else {
                this.input.trg.listRestrict.toReset = [this.input, $t1L("input", this.input.parentNode)[1]];
            }
            $t1L("input", this.input.parentNode)[1].value = this.code;
        }
        ul.appendChild(li);
        counter++;
    }
    o.list = o.expand.appendChild(ul);
    amex.fixSelectIE6(o.expand);
};
amex.airport.initInput = function(o, trg) {
    zindex = zindex + 1
    o.loading.style.display = "none";
    o.input.style.display = "inline";
    o.input.trg = trg;
    $(o.input).bind("click", function() {
        this.value = "";
        amex.overlay.hide();
        var parent = $(this).parent();
        parent.css({
            "zIndex": zindex
        });
        amex.overlay.show(parent, "span");
        amex.airport.drawList(this);
        flag = 1;
        return false;
    });

    o.input.onblur = function() {
        flag = 0;
        //this.expand.style.display="none";
        this.parentNode.style.zIndex = 2;
        if (this.sel > -1) {
            this.list.childNodes[this.sel].onclick();
        } else if (this.sel == -1 && this.list.childNodes.length == 1) {
            this.list.childNodes[0].onclick();
        } else {
            this.trg.listRestrict = null;
            this.value = "";
            $t1L("input", this.parentNode)[1].value = "";
        }
        amex.fixSelectIE6();
    }
    o.input.onkeyup = function(e) {
        if (!e) e = event;
        if (e.keyCode == 40 || e.keyCode == 38 || e.keyCode == 13) {
            return false;
        } else {
            this.expand.style.display = "block";
            amex.airport.drawList(this);
        }
    }
    o.input.onkeydown = function(e) {
        if (!e) e = event;
        if (e.keyCode == 40) { this.goTo(1); }
        else if (e.keyCode == 38) { this.goTo(-1); }
        else if (e.keyCode == 13) {
            this.list.childNodes[this.sel].onclick();
            return false;
        }
    };
    o.input.goTo = function(val) {
        var li = this.list.childNodes;
        if (this.sel >= 0) li[this.sel].style.backgroundColor = "";
        this.sel += val;
        if (this.sel < 0) this.sel = 0;
        if (this.sel >= li.length) this.sel = li.length - 1;
        if (this.sel > -1) {
            li[this.sel].style.backgroundColor = "#FFF";
            this.expand.scrollTop = li[this.sel].offsetTop;
        }
    }
}

amex.airport.init = function(ap) {
    if (!amex.airport.list) {
        amex.airport.list = new Object();
        var tmpLcl = $t1L("a", $t1L("airports", ap)[0]);
        for (var i = 0; i < tmpLcl.length; i++) {
            var code = tmpLcl[i].getAttribute("c");
            amex.airport.list[code] = { c: code, t: (amex.IE ? tmpLcl[i].text : tmpLcl[i].textContent), xml: tmpLcl[i] };
        }
    }
    var trg = amex.airport.target;
    for (var i = 0; i < trg.length; i++) {
        if (trg[i].F) { amex.airport.initInput(trg[i].F, trg[i]); }
        if (trg[i].T) { amex.airport.initInput(trg[i].T, trg[i]); }
    }
}
amex.airport.getXML = function() {
    CEDjs.Xmlhttp.get(airportXML, amex.airport.init, true);
};
amex.initFirstInput = function(o) {
    o.loading = amex.addPng(imgPath + "/common/loadingMini.gif", o, "pT pL");
    o.input = $t1L("input", o)[0];
    o.input.style.display = "none";
    o.input.expand = $dc("span");
    o.appendChild(o.input.expand);
}
amex.initAirportList = function() {
    var aL = amex.airport.target = $c("div", "airportList");
    for (var i = 0; i < aL.length; i++) {
        aL[i].F = $c("span", "airportFrom", aL[i])[0];
        aL[i].T = $c("span", "airportTo", aL[i])[0];
        if (aL[i].F) amex.initFirstInput(aL[i].F);
        if (aL[i].T) amex.initFirstInput(aL[i].T);
    }
    if (aL.length > 0) addOnloadEvent(function() { setTimeout(amex.airport.getXML, 1000); });
}

amex.initIconsList = function() {
    var iL = $c("ul", "iconsList");
    for (var i = 0; i < iL.length; i++) {
        var ic = $t1L("li", iL[i]);
        for (var j = 0; j < ic.length; j++) {
            var im = $t1L("img", ic[j])[0];
            if (!im) im = $t1L("div", ic[j])[0];
            im.onmouseover = function() {
                this.parentNode.style.zIndex = 300;
                $t1L("span", this.parentNode)[0].style.display = "block";
            }
            im.onmouseout = function() {
                this.parentNode.style.zIndex = 2;
                $t1L("span", this.parentNode)[0].style.display = "none";
            }
        }
    }
};


amex.initPage = function() {
    amex.body = document.documentElement.getElementsByTagName("body")[0];

    amex.addPng(imgPath + "/common/head1.png", $i("header"), "bg");
    amex.addPng(imgPath + "/common/foot1.png", $i("footer"), "bg");
    amex.initDrop();
    amex.initNav3();
    amex.initAlert01();
    amex.initTabs();
    amex.initVideoTabs();
    amex.initVideoTab2();
    amex.initButton1();
    amex.initButton2();
    amex.initBoxW();
    amex.initDefileur();
    amex.initQuickLinks1();
    amex.initNavLeft1();
    amex.initContent1();
    amex.initCnt1Table();
    amex.initAccordeon();
    amex.initContent2();
    amex.initAboutList();
    amex.initExperience();
    amex.initSplitbox();
    amex.initBoxBlue();
    amex.initBoxLBlue();
    amex.initMundo();
    amex.initOffices();
    amex.initWorldClock();
    amex.initCurrencyConverter();
    amex.initCalendar();
    amex.initAirportList();
    amex.initIconsList();
}

amex.isInitialized = false;

amex.initASAP(function() {
    if (!amex.isInitialized) {
        amex.isInitialized = true;
        amex.initPage();
        amex.createCntBg();
        amex.IE6fix();
    }
});

addOnloadEvent(function() {
    if (!amex.isInitialized) {
        amex.isInitialized = true;
        amex.initPage();
        amex.createCntBg();
        amex.IE6fix();
    }

    amex.rescaleContent1bg();
    amex.rescaleContent2bg();
    amex.checkContentHeight();
    amex.expandCntBg();

    amex.initBg.setImg();

    //MGA 20090625 AEMXCOOR-107
    /*if($c("span","airportFrom")[0]){
    amex.overlays=[$c("span","airportFrom")[0].getElementsByTagName("span")[0], $c("span","airportTo")[0].getElementsByTagName("span")[0]]
    document.getElementsByTagName("body")[0].onclick=function(){
    if(!flag){
    amex.overlays[0].style.display="none";
    amex.overlays[1].style.display="none";
    }
    };
    }*/
    //end of AEMXCOOR-107
});


//MGA 20090926 AEMXCOOR-143
amex.labels = {
    dow: EMA.labels.dayNames.short,
    ml: EMA.labels.monthNames.long,
    ms: EMA.labels.monthNames.short
}
amex.c = function() {
    /*Default calendar*/
    var cfg = arguments[1] || {};
    var x = new Date();
    this.trg = arguments[0];
    this.today = (!cfg.day) ? new Date(x.getFullYear(), x.getMonth(), x.getDate()) : cfg.day;
    this.aday = 86400000; //a day in milliseconds
    this.minDate = (!cfg.minDate) ? new Date(this.today.getUTCFullYear(), this.today.getMonth(), this.today.getDate()) : cfg.minDate;
    this.maxDate = (!cfg.maxDate) ? new Date(this.today.getUTCFullYear() + 1, this.today.getMonth(), this.today.getDate()) : cfg.maxDate;
    this.showMonth = (!cfg.showMonth) ? 1 : cfg.showMonth;
    this.modal = (!cfg.modal) ? false : cfg.modal;
    this.autoselect = (!cfg.autoselect) ? false : cfg.autoselect;
    this._callback = (!cfg.cb) ? function() { } : cfg.cb;
    this._init = false;
    this.options = {
        day: this.today,
        days: 1,
        showMonths: this.showMonth,
        modal: this.modal,
        minDate: this.minDate,
        maxDate: this.maxDate,
        monthSelect: false,
        autoselect: this.autoselect,
        _callback: this._callback,
        dayOffset: 0, // 0=week start with sunday, 1=week starts with monday
        dow: amex.labels.dow, // days of week - change this to reflect your dayOffset
        ml: amex.labels.ml,
        dCheck: function(day) {
            /*return false for disabled days || return false for alloweddays*/
            if (day.getTime() < (new Date(this.minDate)).getTime()) { return false; } // minDate = 10/01/2008
            else if (day.getTime() > (new Date(this.maxDate)).getTime()) { return false; } // maxDate = 11/01/2008
            else return true;
            /*if ( day.getTime() == (new Date('8/7/2008')).getTime() ) return false;
            return (day.getDate() != 3);*/
        },
        callback: function(day, days) {
            if (this.modal) { this._target.parent().hide(); };
            this._callback(day, days);
            return true;
        }
    }
    this.init = function() {
        var t = this.trg;
        if (this.modal) {
            var _id = t.replace("#", "");
            //putting calendar wrapper in the page
            $("body").append("<div id=\"wcal_" + _id + "_wrapper\" class=\"cal_wrapper\" onclick=\"event.cancelBubble=true;return false;\"><div id=\"wcal_" + _id + "\"></div><\/div>");
            //writing calendar
            $("#wcal_" + _id).css({ "float": "left" }).jCal(this.options);
            $(t).bind("click", function(e, opt) {
                //iframe blocker + positioning
                $(".cal_wrapper").hide();
                $("#wcal_" + $(this).attr("id") + "_wrapper").bgiframe().css({ left: $(this).offset().left - 101, top: $(this).offset().top + 5 + $(this).height() }).toggle();
                $("body").bind("click", function(e) { $(".cal_wrapper").hide(); });
                return false;
            });
        } else {
            $(t).jCal(this.options);
        }
        //setting default day
        $(t).data("day", this.options.day);
        $(t).val(this.options.day.getDate() + "/" + amex.labels.ms[this.options.day.getMonth()] + "/" + this.options.day.getFullYear())
        //click on the calendar icon simulates the click on the field
        $(t).parent().find(".jcalendar").bind("click", function() { $(t).trigger("click"); return false; });
        this._init = true;
    }
    this.redraw = function() {
        var cfg = arguments[0] || {};

        var _id = this.trg.replace("#", "");
        $("#wcal_" + _id + "_wrapper").remove(); //removing previous instance of calendar

        var selectedDay = (!cfg.day) ? new Date() : cfg.day;
        this.options.minDate = selectedDay;
        this.options.day = selectedDay;
        $("#wcal_" + _id).data("day", selectedDay);
        return this.init()
    }
    return this.init();
}
//end of AEMXCOOR-143



/*AMEX_COMMON.JS MERGED MGA 20091103 AEMXDEV-18 */
//Google Map Functionality
var clickHandler, map, lat, lng, locations, bounds, routes, pLines = [], startmarker, routeHandlerUrl;
function addGMap(mapID, x, y, z, url, routeurl) {
    /*
    mapID : id of div where map should be loaded
    x, y : initial position of map
    z : initial zoom of map
    url : callback url to fetch marker coordinates in JSON format
    */
    routeHandlerUrl = routeurl;
    if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById(mapID));
        map.setCenter(new GLatLng(x, y), z);
        CEDjs.Xmlhttp.get(url, processLocations, false);
        var customUI = map.getDefaultUI();
        customUI.controls.largemapcontrol3d = false;
        customUI.controls.smallzoomcontrol3d = true;
        customUI.controls.maptypecontrol = false;
        customUI.controls.menumaptypecontrol = true;
        map.setUI(customUI);
        map.disableScrollWheelZoom();
    }
}
function setNewMarker(point) {
    lat = point.lat();
    lng = point.lng();
}
function processLocations(content) {
    eval("locations = " + content);
    var i = 0;
    for (var l in locations) {
        var element = locations[l];
        map.addOverlay(CreateMarker(element));
        i++;
    }
}
function CreateMarker(element) {
    var baseIcon = new GIcon(G_DEFAULT_ICON);
    baseIcon.shadow = "/img/destshadow.png";
    baseIcon.iconSize = new GSize(32, 49);
    baseIcon.shadowSize = new GSize(39, 16);
    baseIcon.iconAnchor = new GPoint(16, 48);
    baseIcon.infoWindowAnchor = new GPoint(9, 2);
    var specialicon = new GIcon(baseIcon);
    specialicon.image = "/img/desticon.png";
    var markerOptions = { icon: specialicon, title: element.Name };
    var marker = new GMarker(new GLatLng(element.X, element.Y), markerOptions);
    GEvent.addListener(marker, 'click', function() { marker.openInfoWindowHtml(element.BubbleHTML); });
    return marker;
}
function CreateMarkerWithPopup(x, y, name, divID, type) {
    var baseIcon = new GIcon(G_DEFAULT_ICON);
    baseIcon.shadow = "/img/shadow.png";
    baseIcon.iconSize = new GSize(28, 44);
    baseIcon.shadowSize = new GSize(48, 17);
    baseIcon.iconAnchor = new GPoint(28, 44);
    baseIcon.infoWindowAnchor = new GPoint(9, 2);
    var specialicon = new GIcon(baseIcon);
    specialicon.image = "/img/" + type + ".png";
    var markerOptions = { icon: specialicon, title: name };
    var marker = new GMarker(new GLatLng(x, y), markerOptions);
    GEvent.addListener(marker, 'click', function() { amex.popup.showdiv(divID); });
    return marker;
}
function showDestinations(fromMarker, routeUrl, citycode, x, y) {
    startmarker = new GMarker(new GLatLng(x, y), { title: "" });
    for (var l in pLines) {
        var element = pLines[l];
        map.removeOverlay(element);
    }
    CEDjs.Xmlhttp.get(routeUrl + "?from=" + citycode, processRoutes, false);
}
function processRoutes(content) {
    eval("routes = " + content);
    for (var l in routes) {
        var element = routes[l];
        var endmarker = new GMarker(new GLatLng(element.X, element.Y), { title: "hello" });
        DrawRoute(startmarker.getPoint(), endmarker.getPoint());
    }
}
function DrawRoute(p1, p2) {
    var fPoints = new Array();
    with (Math) {
        var lat1 = p1.y * (PI / 180);
        var lon1 = p1.x * (PI / 180);
        var lat2 = p2.y * (PI / 180);
        var lon2 = p2.x * (PI / 180);
        var d = 2 * asin(sqrt(pow((sin((lat1 - lat2) / 2)), 2) + cos(lat1) * cos(lat2) * pow((sin((lon1 - lon2) / 2)), 2)));
        var bearing = atan2(sin(lon1 - lon2) * cos(lat2), cos(lat1) * sin(lat2) - sin(lat1) * cos(lat2) * cos(lon1 - lon2)) / -(PI / 180);
        bearing = bearing < 0 ? 360 + bearing : bearing;
        for (var n = 0; n < 51; n++) {
            var f = (1 / 50) * n;
            f = f.toFixed(6);
            var A = sin((1 - f) * d) / sin(d)
            var B = sin(f * d) / sin(d)
            var x = A * cos(lat1) * cos(lon1) + B * cos(lat2) * cos(lon2)
            var y = A * cos(lat1) * sin(lon1) + B * cos(lat2) * sin(lon2)
            var z = A * sin(lat1) + B * sin(lat2)

            var latN = atan2(z, sqrt(pow(x, 2) + pow(y, 2)))
            var lonN = atan2(y, x)
            var p = new GLatLng(latN / (PI / 180), lonN / (PI / 180));
            fPoints.push(p);
        }
    }
    var pLine = new GPolyline(fPoints, '#000000', 1, 1);
    pLines.push(pLine);
    map.addOverlay(pLine);
}
function RedirectSelectAction(selectBoxId) {
    var selectedLink = document.getElementById(selectBoxId).value //$("#" + selectBoxId).val();
    top.location.href = selectedLink;
    return false;
}
function ShowHide(id) {
    id.style.display = (id.style.display == "") ? "none" : "";
    amex.checkContentHeight();
}
sas_tmstp = Math.round(Math.random() * 10000000000); sas_masterflag = 1;
function SmartAdServer(sas_pageid, sas_formatid, sas_target) {
    if (sas_masterflag == 1) { sas_masterflag = 0; sas_master = 'M'; } else { sas_master = 'S'; };
    document.write('<scr' + 'ipt SRC="http://ww13.smartadserver.com/call/pubj/' +
sas_pageid + '/' + sas_formatid + '/' + sas_master + '/' + sas_tmstp + '/' +
escape(sas_target) + '?"></scr' + 'ipt>');
}
function fromTo(idTo, values, inittxt) {
    var result = eval('(' + values + ')');
    clearOptions(idTo);
    appendOption(inittxt, '', idTo);
    for (var i in result) {
        appendOption(result[i], i, idTo);
    }
}
function clearOptions(sel) {
    var tolist = document.getElementById(sel);
    while (tolist.options.length > 0) {
        tolist.options[0] = null;
    }
}
function appendOption(txt, val, sel) {
    var elOptNew = document.createElement('option');
    elOptNew.text = txt;
    elOptNew.value = val;
    var elSel = document.getElementById(sel);
    try {
        elSel.add(elOptNew, null); // standards compliant; doesn't work in IE
    } catch (ex) {
        elSel.add(elOptNew); // IE only
    }
}
function limitText(limitField, limitNum) {
    if (limitField.value.length > limitNum) {
        limitField.value = limitField.value.substring(0, limitNum);
    }
}
function getKeyCode(e) {// v1.0
    if (window.event) {
        return window.event.keyCode;
    } else if (e) {
        return e.which;
    } else {
        return null;
    }
}
function keyRestrict(e, validchars) { // v3.0
    if (validchars == '') { return true; }
    var key = '', keychar = '';
    key = getKeyCode(e);
    if (key == null) { return true; }
    keychar = String.fromCharCode(key);
    keychar = keychar.toLowerCase();
    validchars = validchars.toLowerCase();
    if (validchars.indexOf(keychar) != -1) { return true; }
    if (key == null || key == 0 || key == 8 || key == 9 || key == 13 || key == 27) { return true; }
    return false;
}
function toggledate(status, radiobutton, calendarID) {
    var cal = document.getElementById(calendarID);
    cal.style.visibility = (status === "off") ? 'hidden' : 'visible';
}
/*EOF AMEX_COMMON.JS MERGED MGA 20091103 AEMXDEV-18 */


/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject = function() { var D = "undefined", r = "object", S = "Shockwave Flash", W = "ShockwaveFlash.ShockwaveFlash", q = "application/x-shockwave-flash", R = "SWFObjectExprInst", x = "onreadystatechange", O = window, j = document, t = navigator, T = false, U = [h], o = [], N = [], I = [], l, Q, E, B, J = false, a = false, n, G, m = true, M = function() { var aa = typeof j.getElementById != D && typeof j.getElementsByTagName != D && typeof j.createElement != D, ah = t.userAgent.toLowerCase(), Y = t.platform.toLowerCase(), ae = Y ? /win/.test(Y) : /win/.test(ah), ac = Y ? /mac/.test(Y) : /mac/.test(ah), af = /webkit/.test(ah) ? parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, X = ! +"\v1", ag = [0, 0, 0], ab = null; if (typeof t.plugins != D && typeof t.plugins[S] == r) { ab = t.plugins[S].description; if (ab && !(typeof t.mimeTypes != D && t.mimeTypes[q] && !t.mimeTypes[q].enabledPlugin)) { T = true; X = false; ab = ab.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); ag[0] = parseInt(ab.replace(/^(.*)\..*$/, "$1"), 10); ag[1] = parseInt(ab.replace(/^.*\.(.*)\s.*$/, "$1"), 10); ag[2] = /[a-zA-Z]/.test(ab) ? parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0 } } else { if (typeof O.ActiveXObject != D) { try { var ad = new ActiveXObject(W); if (ad) { ab = ad.GetVariable("$version"); if (ab) { X = true; ab = ab.split(" ")[1].split(","); ag = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)] } } } catch (Z) { } } } return { w3: aa, pv: ag, wk: af, ie: X, win: ae, mac: ac} } (), k = function() { if (!M.w3) { return } if ((typeof j.readyState != D && j.readyState == "complete") || (typeof j.readyState == D && (j.getElementsByTagName("body")[0] || j.body))) { f() } if (!J) { if (typeof j.addEventListener != D) { j.addEventListener("DOMContentLoaded", f, false) } if (M.ie && M.win) { j.attachEvent(x, function() { if (j.readyState == "complete") { j.detachEvent(x, arguments.callee); f() } }); if (O == top) { (function() { if (J) { return } try { j.documentElement.doScroll("left") } catch (X) { setTimeout(arguments.callee, 0); return } f() })() } } if (M.wk) { (function() { if (J) { return } if (!/loaded|complete/.test(j.readyState)) { setTimeout(arguments.callee, 0); return } f() })() } s(f) } } (); function f() { if (J) { return } try { var Z = j.getElementsByTagName("body")[0].appendChild(C("span")); Z.parentNode.removeChild(Z) } catch (aa) { return } J = true; var X = U.length; for (var Y = 0; Y < X; Y++) { U[Y]() } } function K(X) { if (J) { X() } else { U[U.length] = X } } function s(Y) { if (typeof O.addEventListener != D) { O.addEventListener("load", Y, false) } else { if (typeof j.addEventListener != D) { j.addEventListener("load", Y, false) } else { if (typeof O.attachEvent != D) { i(O, "onload", Y) } else { if (typeof O.onload == "function") { var X = O.onload; O.onload = function() { X(); Y() } } else { O.onload = Y } } } } } function h() { if (T) { V() } else { H() } } function V() { var X = j.getElementsByTagName("body")[0]; var aa = C(r); aa.setAttribute("type", q); var Z = X.appendChild(aa); if (Z) { var Y = 0; (function() { if (typeof Z.GetVariable != D) { var ab = Z.GetVariable("$version"); if (ab) { ab = ab.split(" ")[1].split(","); M.pv = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)] } } else { if (Y < 10) { Y++; setTimeout(arguments.callee, 10); return } } X.removeChild(aa); Z = null; H() })() } else { H() } } function H() { var ag = o.length; if (ag > 0) { for (var af = 0; af < ag; af++) { var Y = o[af].id; var ab = o[af].callbackFn; var aa = { success: false, id: Y }; if (M.pv[0] > 0) { var ae = c(Y); if (ae) { if (F(o[af].swfVersion) && !(M.wk && M.wk < 312)) { w(Y, true); if (ab) { aa.success = true; aa.ref = z(Y); ab(aa) } } else { if (o[af].expressInstall && A()) { var ai = {}; ai.data = o[af].expressInstall; ai.width = ae.getAttribute("width") || "0"; ai.height = ae.getAttribute("height") || "0"; if (ae.getAttribute("class")) { ai.styleclass = ae.getAttribute("class") } if (ae.getAttribute("align")) { ai.align = ae.getAttribute("align") } var ah = {}; var X = ae.getElementsByTagName("param"); var ac = X.length; for (var ad = 0; ad < ac; ad++) { if (X[ad].getAttribute("name").toLowerCase() != "movie") { ah[X[ad].getAttribute("name")] = X[ad].getAttribute("value") } } P(ai, ah, Y, ab) } else { p(ae); if (ab) { ab(aa) } } } } } else { w(Y, true); if (ab) { var Z = z(Y); if (Z && typeof Z.SetVariable != D) { aa.success = true; aa.ref = Z } ab(aa) } } } } } function z(aa) { var X = null; var Y = c(aa); if (Y && Y.nodeName == "OBJECT") { if (typeof Y.SetVariable != D) { X = Y } else { var Z = Y.getElementsByTagName(r)[0]; if (Z) { X = Z } } } return X } function A() { return !a && F("6.0.65") && (M.win || M.mac) && !(M.wk && M.wk < 312) } function P(aa, ab, X, Z) { a = true; E = Z || null; B = { success: false, id: X }; var ae = c(X); if (ae) { if (ae.nodeName == "OBJECT") { l = g(ae); Q = null } else { l = ae; Q = X } aa.id = R; if (typeof aa.width == D || (!/%$/.test(aa.width) && parseInt(aa.width, 10) < 310)) { aa.width = "310" } if (typeof aa.height == D || (!/%$/.test(aa.height) && parseInt(aa.height, 10) < 137)) { aa.height = "137" } j.title = j.title.slice(0, 47) + " - Flash Player Installation"; var ad = M.ie && M.win ? "ActiveX" : "PlugIn", ac = "MMredirectURL=" + O.location.toString().replace(/&/g, "%26") + "&MMplayerType=" + ad + "&MMdoctitle=" + j.title; if (typeof ab.flashvars != D) { ab.flashvars += "&" + ac } else { ab.flashvars = ac } if (M.ie && M.win && ae.readyState != 4) { var Y = C("div"); X += "SWFObjectNew"; Y.setAttribute("id", X); ae.parentNode.insertBefore(Y, ae); ae.style.display = "none"; (function() { if (ae.readyState == 4) { ae.parentNode.removeChild(ae) } else { setTimeout(arguments.callee, 10) } })() } u(aa, ab, X) } } function p(Y) { if (M.ie && M.win && Y.readyState != 4) { var X = C("div"); Y.parentNode.insertBefore(X, Y); X.parentNode.replaceChild(g(Y), X); Y.style.display = "none"; (function() { if (Y.readyState == 4) { Y.parentNode.removeChild(Y) } else { setTimeout(arguments.callee, 10) } })() } else { Y.parentNode.replaceChild(g(Y), Y) } } function g(ab) { var aa = C("div"); if (M.win && M.ie) { aa.innerHTML = ab.innerHTML } else { var Y = ab.getElementsByTagName(r)[0]; if (Y) { var ad = Y.childNodes; if (ad) { var X = ad.length; for (var Z = 0; Z < X; Z++) { if (!(ad[Z].nodeType == 1 && ad[Z].nodeName == "PARAM") && !(ad[Z].nodeType == 8)) { aa.appendChild(ad[Z].cloneNode(true)) } } } } } return aa } function u(ai, ag, Y) { var X, aa = c(Y); if (M.wk && M.wk < 312) { return X } if (aa) { if (typeof ai.id == D) { ai.id = Y } if (M.ie && M.win) { var ah = ""; for (var ae in ai) { if (ai[ae] != Object.prototype[ae]) { if (ae.toLowerCase() == "data") { ag.movie = ai[ae] } else { if (ae.toLowerCase() == "styleclass") { ah += ' class="' + ai[ae] + '"' } else { if (ae.toLowerCase() != "classid") { ah += " " + ae + '="' + ai[ae] + '"' } } } } } var af = ""; for (var ad in ag) { if (ag[ad] != Object.prototype[ad]) { af += '<param name="' + ad + '" value="' + ag[ad] + '" />' } } aa.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + ah + ">" + af + "</object>"; N[N.length] = ai.id; X = c(ai.id) } else { var Z = C(r); Z.setAttribute("type", q); for (var ac in ai) { if (ai[ac] != Object.prototype[ac]) { if (ac.toLowerCase() == "styleclass") { Z.setAttribute("class", ai[ac]) } else { if (ac.toLowerCase() != "classid") { Z.setAttribute(ac, ai[ac]) } } } } for (var ab in ag) { if (ag[ab] != Object.prototype[ab] && ab.toLowerCase() != "movie") { e(Z, ab, ag[ab]) } } aa.parentNode.replaceChild(Z, aa); X = Z } } return X } function e(Z, X, Y) { var aa = C("param"); aa.setAttribute("name", X); aa.setAttribute("value", Y); Z.appendChild(aa) } function y(Y) { var X = c(Y); if (X && X.nodeName == "OBJECT") { if (M.ie && M.win) { X.style.display = "none"; (function() { if (X.readyState == 4) { b(Y) } else { setTimeout(arguments.callee, 10) } })() } else { X.parentNode.removeChild(X) } } } function b(Z) { var Y = c(Z); if (Y) { for (var X in Y) { if (typeof Y[X] == "function") { Y[X] = null } } Y.parentNode.removeChild(Y) } } function c(Z) { var X = null; try { X = j.getElementById(Z) } catch (Y) { } return X } function C(X) { return j.createElement(X) } function i(Z, X, Y) { Z.attachEvent(X, Y); I[I.length] = [Z, X, Y] } function F(Z) { var Y = M.pv, X = Z.split("."); X[0] = parseInt(X[0], 10); X[1] = parseInt(X[1], 10) || 0; X[2] = parseInt(X[2], 10) || 0; return (Y[0] > X[0] || (Y[0] == X[0] && Y[1] > X[1]) || (Y[0] == X[0] && Y[1] == X[1] && Y[2] >= X[2])) ? true : false } function v(ac, Y, ad, ab) { if (M.ie && M.mac) { return } var aa = j.getElementsByTagName("head")[0]; if (!aa) { return } var X = (ad && typeof ad == "string") ? ad : "screen"; if (ab) { n = null; G = null } if (!n || G != X) { var Z = C("style"); Z.setAttribute("type", "text/css"); Z.setAttribute("media", X); n = aa.appendChild(Z); if (M.ie && M.win && typeof j.styleSheets != D && j.styleSheets.length > 0) { n = j.styleSheets[j.styleSheets.length - 1] } G = X } if (M.ie && M.win) { if (n && typeof n.addRule == r) { n.addRule(ac, Y) } } else { if (n && typeof j.createTextNode != D) { n.appendChild(j.createTextNode(ac + " {" + Y + "}")) } } } function w(Z, X) { if (!m) { return } var Y = X ? "visible" : "hidden"; if (J && c(Z)) { c(Z).style.visibility = Y } else { v("#" + Z, "visibility:" + Y) } } function L(Y) { var Z = /[\\\"<>\.;]/; var X = Z.exec(Y) != null; return X && typeof encodeURIComponent != D ? encodeURIComponent(Y) : Y } var d = function() { if (M.ie && M.win) { window.attachEvent("onunload", function() { var ac = I.length; for (var ab = 0; ab < ac; ab++) { I[ab][0].detachEvent(I[ab][1], I[ab][2]) } var Z = N.length; for (var aa = 0; aa < Z; aa++) { y(N[aa]) } for (var Y in M) { M[Y] = null } M = null; for (var X in swfobject) { swfobject[X] = null } swfobject = null }) } } (); return { registerObject: function(ab, X, aa, Z) { if (M.w3 && ab && X) { var Y = {}; Y.id = ab; Y.swfVersion = X; Y.expressInstall = aa; Y.callbackFn = Z; o[o.length] = Y; w(ab, false) } else { if (Z) { Z({ success: false, id: ab }) } } }, getObjectById: function(X) { if (M.w3) { return z(X) } }, embedSWF: function(ab, ah, ae, ag, Y, aa, Z, ad, af, ac) { var X = { success: false, id: ah }; if (M.w3 && !(M.wk && M.wk < 312) && ab && ah && ae && ag && Y) { w(ah, false); K(function() { ae += ""; ag += ""; var aj = {}; if (af && typeof af === r) { for (var al in af) { aj[al] = af[al] } } aj.data = ab; aj.width = ae; aj.height = ag; var am = {}; if (ad && typeof ad === r) { for (var ak in ad) { am[ak] = ad[ak] } } if (Z && typeof Z === r) { for (var ai in Z) { if (typeof am.flashvars != D) { am.flashvars += "&" + ai + "=" + Z[ai] } else { am.flashvars = ai + "=" + Z[ai] } } } if (F(Y)) { var an = u(aj, am, ah); if (aj.id == ah) { w(ah, true) } X.success = true; X.ref = an } else { if (aa && A()) { aj.data = aa; P(aj, am, ah, ac); return } else { w(ah, true) } } if (ac) { ac(X) } }) } else { if (ac) { ac(X) } } }, switchOffAutoHideShow: function() { m = false }, ua: M, getFlashPlayerVersion: function() { return { major: M.pv[0], minor: M.pv[1], release: M.pv[2]} }, hasFlashPlayerVersion: F, createSWF: function(Z, Y, X) { if (M.w3) { return u(Z, Y, X) } else { return undefined } }, showExpressInstall: function(Z, aa, X, Y) { if (M.w3 && A()) { P(Z, aa, X, Y) } }, removeSWF: function(X) { if (M.w3) { y(X) } }, createCSS: function(aa, Z, Y, X) { if (M.w3) { v(aa, Z, Y, X) } }, addDomLoadEvent: K, addLoadEvent: s, getQueryParamValue: function(aa) { var Z = j.location.search || j.location.hash; if (Z) { if (/\?/.test(Z)) { Z = Z.split("?")[1] } if (aa == null) { return L(Z) } var Y = Z.split("&"); for (var X = 0; X < Y.length; X++) { if (Y[X].substring(0, Y[X].indexOf("=")) == aa) { return L(Y[X].substring((Y[X].indexOf("=") + 1))) } } } return "" }, expressInstallCallback: function() { if (a) { var X = c(R); if (X && l) { X.parentNode.replaceChild(l, X); if (Q) { w(Q, true); if (M.ie && M.win) { l.style.display = "block" } } if (E) { E(B) } } a = false } } } } ();


/*JQUERY 1.3.2 AEMXDEV-18*/
/*
* jQuery JavaScript Library v1.3.2
* http://jquery.com/
*
* Copyright (c) 2009 John Resig
* Dual licensed under the MIT and GPL licenses.
* http://docs.jquery.com/License
*
* Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
* Revision: 6246
*/
(function() {
    var l = this, g, y = l.jQuery, p = l.$, o = l.jQuery = l.$ = function(E, F) { return new o.fn.init(E, F) }, D = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, f = /^.[^:#\[\.,]*$/; o.fn = o.prototype = { init: function(E, H) { E = E || document; if (E.nodeType) { this[0] = E; this.length = 1; this.context = E; return this } if (typeof E === "string") { var G = D.exec(E); if (G && (G[1] || !H)) { if (G[1]) { E = o.clean([G[1]], H) } else { var I = document.getElementById(G[3]); if (I && I.id != G[3]) { return o().find(E) } var F = o(I || []); F.context = document; F.selector = E; return F } } else { return o(H).find(E) } } else { if (o.isFunction(E)) { return o(document).ready(E) } } if (E.selector && E.context) { this.selector = E.selector; this.context = E.context } return this.setArray(o.isArray(E) ? E : o.makeArray(E)) }, selector: "", jquery: "1.3.2", size: function() { return this.length }, get: function(E) { return E === g ? Array.prototype.slice.call(this) : this[E] }, pushStack: function(F, H, E) { var G = o(F); G.prevObject = this; G.context = this.context; if (H === "find") { G.selector = this.selector + (this.selector ? " " : "") + E } else { if (H) { G.selector = this.selector + "." + H + "(" + E + ")" } } return G }, setArray: function(E) { this.length = 0; Array.prototype.push.apply(this, E); return this }, each: function(F, E) { return o.each(this, F, E) }, index: function(E) { return o.inArray(E && E.jquery ? E[0] : E, this) }, attr: function(F, H, G) { var E = F; if (typeof F === "string") { if (H === g) { return this[0] && o[G || "attr"](this[0], F) } else { E = {}; E[F] = H } } return this.each(function(I) { for (F in E) { o.attr(G ? this.style : this, F, o.prop(this, E[F], G, I, F)) } }) }, css: function(E, F) { if ((E == "width" || E == "height") && parseFloat(F) < 0) { F = g } return this.attr(E, F, "curCSS") }, text: function(F) { if (typeof F !== "object" && F != null) { return this.empty().append((this[0] && this[0].ownerDocument || document).createTextNode(F)) } var E = ""; o.each(F || this, function() { o.each(this.childNodes, function() { if (this.nodeType != 8) { E += this.nodeType != 1 ? this.nodeValue : o.fn.text([this]) } }) }); return E }, wrapAll: function(E) { if (this[0]) { var F = o(E, this[0].ownerDocument).clone(); if (this[0].parentNode) { F.insertBefore(this[0]) } F.map(function() { var G = this; while (G.firstChild) { G = G.firstChild } return G }).append(this) } return this }, wrapInner: function(E) { return this.each(function() { o(this).contents().wrapAll(E) }) }, wrap: function(E) { return this.each(function() { o(this).wrapAll(E) }) }, append: function() { return this.domManip(arguments, true, function(E) { if (this.nodeType == 1) { this.appendChild(E) } }) }, prepend: function() { return this.domManip(arguments, true, function(E) { if (this.nodeType == 1) { this.insertBefore(E, this.firstChild) } }) }, before: function() { return this.domManip(arguments, false, function(E) { this.parentNode.insertBefore(E, this) }) }, after: function() { return this.domManip(arguments, false, function(E) { this.parentNode.insertBefore(E, this.nextSibling) }) }, end: function() { return this.prevObject || o([]) }, push: [].push, sort: [].sort, splice: [].splice, find: function(E) { if (this.length === 1) { var F = this.pushStack([], "find", E); F.length = 0; o.find(E, this[0], F); return F } else { return this.pushStack(o.unique(o.map(this, function(G) { return o.find(E, G) })), "find", E) } }, clone: function(G) { var E = this.map(function() { if (!o.support.noCloneEvent && !o.isXMLDoc(this)) { var I = this.outerHTML; if (!I) { var J = this.ownerDocument.createElement("div"); J.appendChild(this.cloneNode(true)); I = J.innerHTML } return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0] } else { return this.cloneNode(true) } }); if (G === true) { var H = this.find("*").andSelf(), F = 0; E.find("*").andSelf().each(function() { if (this.nodeName !== H[F].nodeName) { return } var I = o.data(H[F], "events"); for (var K in I) { for (var J in I[K]) { o.event.add(this, K, I[K][J], I[K][J].data) } } F++ }) } return E }, filter: function(E) { return this.pushStack(o.isFunction(E) && o.grep(this, function(G, F) { return E.call(G, F) }) || o.multiFilter(E, o.grep(this, function(F) { return F.nodeType === 1 })), "filter", E) }, closest: function(E) { var G = o.expr.match.POS.test(E) ? o(E) : null, F = 0; return this.map(function() { var H = this; while (H && H.ownerDocument) { if (G ? G.index(H) > -1 : o(H).is(E)) { o.data(H, "closest", F); return H } H = H.parentNode; F++ } }) }, not: function(E) { if (typeof E === "string") { if (f.test(E)) { return this.pushStack(o.multiFilter(E, this, true), "not", E) } else { E = o.multiFilter(E, this) } } var F = E.length && E[E.length - 1] !== g && !E.nodeType; return this.filter(function() { return F ? o.inArray(this, E) < 0 : this != E }) }, add: function(E) { return this.pushStack(o.unique(o.merge(this.get(), typeof E === "string" ? o(E) : o.makeArray(E)))) }, is: function(E) { return !!E && o.multiFilter(E, this).length > 0 }, hasClass: function(E) { return !!E && this.is("." + E) }, val: function(K) { if (K === g) { var E = this[0]; if (E) { if (o.nodeName(E, "option")) { return (E.attributes.value || {}).specified ? E.value : E.text } if (o.nodeName(E, "select")) { var I = E.selectedIndex, L = [], M = E.options, H = E.type == "select-one"; if (I < 0) { return null } for (var F = H ? I : 0, J = H ? I + 1 : M.length; F < J; F++) { var G = M[F]; if (G.selected) { K = o(G).val(); if (H) { return K } L.push(K) } } return L } return (E.value || "").replace(/\r/g, "") } return g } if (typeof K === "number") { K += "" } return this.each(function() { if (this.nodeType != 1) { return } if (o.isArray(K) && /radio|checkbox/.test(this.type)) { this.checked = (o.inArray(this.value, K) >= 0 || o.inArray(this.name, K) >= 0) } else { if (o.nodeName(this, "select")) { var N = o.makeArray(K); o("option", this).each(function() { this.selected = (o.inArray(this.value, N) >= 0 || o.inArray(this.text, N) >= 0) }); if (!N.length) { this.selectedIndex = -1 } } else { this.value = K } } }) }, html: function(E) { return E === g ? (this[0] ? this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : null) : this.empty().append(E) }, replaceWith: function(E) { return this.after(E).remove() }, eq: function(E) { return this.slice(E, +E + 1) }, slice: function() { return this.pushStack(Array.prototype.slice.apply(this, arguments), "slice", Array.prototype.slice.call(arguments).join(",")) }, map: function(E) { return this.pushStack(o.map(this, function(G, F) { return E.call(G, F, G) })) }, andSelf: function() { return this.add(this.prevObject) }, domManip: function(J, M, L) { if (this[0]) { var I = (this[0].ownerDocument || this[0]).createDocumentFragment(), F = o.clean(J, (this[0].ownerDocument || this[0]), I), H = I.firstChild; if (H) { for (var G = 0, E = this.length; G < E; G++) { L.call(K(this[G], H), this.length > 1 || G > 0 ? I.cloneNode(true) : I) } } if (F) { o.each(F, z) } } return this; function K(N, O) { return M && o.nodeName(N, "table") && o.nodeName(O, "tr") ? (N.getElementsByTagName("tbody")[0] || N.appendChild(N.ownerDocument.createElement("tbody"))) : N } } }; o.fn.init.prototype = o.fn; function z(E, F) { if (F.src) { o.ajax({ url: F.src, async: false, dataType: "script" }) } else { o.globalEval(F.text || F.textContent || F.innerHTML || "") } if (F.parentNode) { F.parentNode.removeChild(F) } } function e() { return +new Date } o.extend = o.fn.extend = function() { var J = arguments[0] || {}, H = 1, I = arguments.length, E = false, G; if (typeof J === "boolean") { E = J; J = arguments[1] || {}; H = 2 } if (typeof J !== "object" && !o.isFunction(J)) { J = {} } if (I == H) { J = this; --H } for (; H < I; H++) { if ((G = arguments[H]) != null) { for (var F in G) { var K = J[F], L = G[F]; if (J === L) { continue } if (E && L && typeof L === "object" && !L.nodeType) { J[F] = o.extend(E, K || (L.length != null ? [] : {}), L) } else { if (L !== g) { J[F] = L } } } } } return J }; var b = /z-?index|font-?weight|opacity|zoom|line-?height/i, q = document.defaultView || {}, s = Object.prototype.toString; o.extend({ noConflict: function(E) { l.$ = p; if (E) { l.jQuery = y } return o }, isFunction: function(E) { return s.call(E) === "[object Function]" }, isArray: function(E) { return s.call(E) === "[object Array]" }, isXMLDoc: function(E) { return E.nodeType === 9 && E.documentElement.nodeName !== "HTML" || !!E.ownerDocument && o.isXMLDoc(E.ownerDocument) }, globalEval: function(G) { if (G && /\S/.test(G)) { var F = document.getElementsByTagName("head")[0] || document.documentElement, E = document.createElement("script"); E.type = "text/javascript"; if (o.support.scriptEval) { E.appendChild(document.createTextNode(G)) } else { E.text = G } F.insertBefore(E, F.firstChild); F.removeChild(E) } }, nodeName: function(F, E) { return F.nodeName && F.nodeName.toUpperCase() == E.toUpperCase() }, each: function(G, K, F) { var E, H = 0, I = G.length; if (F) { if (I === g) { for (E in G) { if (K.apply(G[E], F) === false) { break } } } else { for (; H < I; ) { if (K.apply(G[H++], F) === false) { break } } } } else { if (I === g) { for (E in G) { if (K.call(G[E], E, G[E]) === false) { break } } } else { for (var J = G[0]; H < I && K.call(J, H, J) !== false; J = G[++H]) { } } } return G }, prop: function(H, I, G, F, E) { if (o.isFunction(I)) { I = I.call(H, F) } return typeof I === "number" && G == "curCSS" && !b.test(E) ? I + "px" : I }, className: { add: function(E, F) { o.each((F || "").split(/\s+/), function(G, H) { if (E.nodeType == 1 && !o.className.has(E.className, H)) { E.className += (E.className ? " " : "") + H } }) }, remove: function(E, F) { if (E.nodeType == 1) { E.className = F !== g ? o.grep(E.className.split(/\s+/), function(G) { return !o.className.has(F, G) }).join(" ") : "" } }, has: function(F, E) { return F && o.inArray(E, (F.className || F).toString().split(/\s+/)) > -1 } }, swap: function(H, G, I) { var E = {}; for (var F in G) { E[F] = H.style[F]; H.style[F] = G[F] } I.call(H); for (var F in G) { H.style[F] = E[F] } }, css: function(H, F, J, E) { if (F == "width" || F == "height") { var L, G = { position: "absolute", visibility: "hidden", display: "block" }, K = F == "width" ? ["Left", "Right"] : ["Top", "Bottom"]; function I() { L = F == "width" ? H.offsetWidth : H.offsetHeight; if (E === "border") { return } o.each(K, function() { if (!E) { L -= parseFloat(o.curCSS(H, "padding" + this, true)) || 0 } if (E === "margin") { L += parseFloat(o.curCSS(H, "margin" + this, true)) || 0 } else { L -= parseFloat(o.curCSS(H, "border" + this + "Width", true)) || 0 } }) } if (H.offsetWidth !== 0) { I() } else { o.swap(H, G, I) } return Math.max(0, Math.round(L)) } return o.curCSS(H, F, J) }, curCSS: function(I, F, G) { var L, E = I.style; if (F == "opacity" && !o.support.opacity) { L = o.attr(E, "opacity"); return L == "" ? "1" : L } if (F.match(/float/i)) { F = w } if (!G && E && E[F]) { L = E[F] } else { if (q.getComputedStyle) { if (F.match(/float/i)) { F = "float" } F = F.replace(/([A-Z])/g, "-$1").toLowerCase(); var M = q.getComputedStyle(I, null); if (M) { L = M.getPropertyValue(F) } if (F == "opacity" && L == "") { L = "1" } } else { if (I.currentStyle) { var J = F.replace(/\-(\w)/g, function(N, O) { return O.toUpperCase() }); L = I.currentStyle[F] || I.currentStyle[J]; if (!/^\d+(px)?$/i.test(L) && /^\d/.test(L)) { var H = E.left, K = I.runtimeStyle.left; I.runtimeStyle.left = I.currentStyle.left; E.left = L || 0; L = E.pixelLeft + "px"; E.left = H; I.runtimeStyle.left = K } } } } return L }, clean: function(F, K, I) { K = K || document; if (typeof K.createElement === "undefined") { K = K.ownerDocument || K[0] && K[0].ownerDocument || document } if (!I && F.length === 1 && typeof F[0] === "string") { var H = /^<(\w+)\s*\/?>$/.exec(F[0]); if (H) { return [K.createElement(H[1])] } } var G = [], E = [], L = K.createElement("div"); o.each(F, function(P, S) { if (typeof S === "number") { S += "" } if (!S) { return } if (typeof S === "string") { S = S.replace(/(<(\w+)[^>]*?)\/>/g, function(U, V, T) { return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? U : V + "></" + T + ">" }); var O = S.replace(/^\s+/, "").substring(0, 10).toLowerCase(); var Q = !O.indexOf("<opt") && [1, "<select multiple='multiple'>", "</select>"] || !O.indexOf("<leg") && [1, "<fieldset>", "</fieldset>"] || O.match(/^<(thead|tbody|tfoot|colg|cap)/) && [1, "<table>", "</table>"] || !O.indexOf("<tr") && [2, "<table><tbody>", "</tbody></table>"] || (!O.indexOf("<td") || !O.indexOf("<th")) && [3, "<table><tbody><tr>", "</tr></tbody></table>"] || !O.indexOf("<col") && [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"] || !o.support.htmlSerialize && [1, "div<div>", "</div>"] || [0, "", ""]; L.innerHTML = Q[1] + S + Q[2]; while (Q[0]--) { L = L.lastChild } if (!o.support.tbody) { var R = /<tbody/i.test(S), N = !O.indexOf("<table") && !R ? L.firstChild && L.firstChild.childNodes : Q[1] == "<table>" && !R ? L.childNodes : []; for (var M = N.length - 1; M >= 0; --M) { if (o.nodeName(N[M], "tbody") && !N[M].childNodes.length) { N[M].parentNode.removeChild(N[M]) } } } if (!o.support.leadingWhitespace && /^\s/.test(S)) { L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]), L.firstChild) } S = o.makeArray(L.childNodes) } if (S.nodeType) { G.push(S) } else { G = o.merge(G, S) } }); if (I) { for (var J = 0; G[J]; J++) { if (o.nodeName(G[J], "script") && (!G[J].type || G[J].type.toLowerCase() === "text/javascript")) { E.push(G[J].parentNode ? G[J].parentNode.removeChild(G[J]) : G[J]) } else { if (G[J].nodeType === 1) { G.splice.apply(G, [J + 1, 0].concat(o.makeArray(G[J].getElementsByTagName("script")))) } I.appendChild(G[J]) } } return E } return G }, attr: function(J, G, K) { if (!J || J.nodeType == 3 || J.nodeType == 8) { return g } var H = !o.isXMLDoc(J), L = K !== g; G = H && o.props[G] || G; if (J.tagName) { var F = /href|src|style/.test(G); if (G == "selected" && J.parentNode) { J.parentNode.selectedIndex } if (G in J && H && !F) { if (L) { if (G == "type" && o.nodeName(J, "input") && J.parentNode) { throw "type property can't be changed" } J[G] = K } if (o.nodeName(J, "form") && J.getAttributeNode(G)) { return J.getAttributeNode(G).nodeValue } if (G == "tabIndex") { var I = J.getAttributeNode("tabIndex"); return I && I.specified ? I.value : J.nodeName.match(/(button|input|object|select|textarea)/i) ? 0 : J.nodeName.match(/^(a|area)$/i) && J.href ? 0 : g } return J[G] } if (!o.support.style && H && G == "style") { return o.attr(J.style, "cssText", K) } if (L) { J.setAttribute(G, "" + K) } var E = !o.support.hrefNormalized && H && F ? J.getAttribute(G, 2) : J.getAttribute(G); return E === null ? g : E } if (!o.support.opacity && G == "opacity") { if (L) { J.zoom = 1; J.filter = (J.filter || "").replace(/alpha\([^)]*\)/, "") + (parseInt(K) + "" == "NaN" ? "" : "alpha(opacity=" + K * 100 + ")") } return J.filter && J.filter.indexOf("opacity=") >= 0 ? (parseFloat(J.filter.match(/opacity=([^)]*)/)[1]) / 100) + "" : "" } G = G.replace(/-([a-z])/ig, function(M, N) { return N.toUpperCase() }); if (L) { J[G] = K } return J[G] }, trim: function(E) { return (E || "").replace(/^\s+|\s+$/g, "") }, makeArray: function(G) { var E = []; if (G != null) { var F = G.length; if (F == null || typeof G === "string" || o.isFunction(G) || G.setInterval) { E[0] = G } else { while (F) { E[--F] = G[F] } } } return E }, inArray: function(G, H) { for (var E = 0, F = H.length; E < F; E++) { if (H[E] === G) { return E } } return -1 }, merge: function(H, E) { var F = 0, G, I = H.length; if (!o.support.getAll) { while ((G = E[F++]) != null) { if (G.nodeType != 8) { H[I++] = G } } } else { while ((G = E[F++]) != null) { H[I++] = G } } return H }, unique: function(K) { var F = [], E = {}; try { for (var G = 0, H = K.length; G < H; G++) { var J = o.data(K[G]); if (!E[J]) { E[J] = true; F.push(K[G]) } } } catch (I) { F = K } return F }, grep: function(F, J, E) { var G = []; for (var H = 0, I = F.length; H < I; H++) { if (!E != !J(F[H], H)) { G.push(F[H]) } } return G }, map: function(E, J) { var F = []; for (var G = 0, H = E.length; G < H; G++) { var I = J(E[G], G); if (I != null) { F[F.length] = I } } return F.concat.apply([], F) } }); var C = navigator.userAgent.toLowerCase(); o.browser = { version: (C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [0, "0"])[1], safari: /webkit/.test(C), opera: /opera/.test(C), msie: /msie/.test(C) && !/opera/.test(C), mozilla: /mozilla/.test(C) && !/(compatible|webkit)/.test(C) }; o.each({ parent: function(E) { return E.parentNode }, parents: function(E) { return o.dir(E, "parentNode") }, next: function(E) { return o.nth(E, 2, "nextSibling") }, prev: function(E) { return o.nth(E, 2, "previousSibling") }, nextAll: function(E) { return o.dir(E, "nextSibling") }, prevAll: function(E) { return o.dir(E, "previousSibling") }, siblings: function(E) { return o.sibling(E.parentNode.firstChild, E) }, children: function(E) { return o.sibling(E.firstChild) }, contents: function(E) { return o.nodeName(E, "iframe") ? E.contentDocument || E.contentWindow.document : o.makeArray(E.childNodes) } }, function(E, F) { o.fn[E] = function(G) { var H = o.map(this, F); if (G && typeof G == "string") { H = o.multiFilter(G, H) } return this.pushStack(o.unique(H), E, G) } }); o.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function(E, F) { o.fn[E] = function(G) { var J = [], L = o(G); for (var K = 0, H = L.length; K < H; K++) { var I = (K > 0 ? this.clone(true) : this).get(); o.fn[F].apply(o(L[K]), I); J = J.concat(I) } return this.pushStack(J, E, G) } }); o.each({ removeAttr: function(E) { o.attr(this, E, ""); if (this.nodeType == 1) { this.removeAttribute(E) } }, addClass: function(E) { o.className.add(this, E) }, removeClass: function(E) { o.className.remove(this, E) }, toggleClass: function(F, E) { if (typeof E !== "boolean") { E = !o.className.has(this, F) } o.className[E ? "add" : "remove"](this, F) }, remove: function(E) { if (!E || o.filter(E, [this]).length) { o("*", this).add([this]).each(function() { o.event.remove(this); o.removeData(this) }); if (this.parentNode) { this.parentNode.removeChild(this) } } }, empty: function() { o(this).children().remove(); while (this.firstChild) { this.removeChild(this.firstChild) } } }, function(E, F) { o.fn[E] = function() { return this.each(F, arguments) } }); function j(E, F) { return E[0] && parseInt(o.curCSS(E[0], F, true), 10) || 0 } var h = "jQuery" + e(), v = 0, A = {}; o.extend({ cache: {}, data: function(F, E, G) { F = F == l ? A : F; var H = F[h]; if (!H) { H = F[h] = ++v } if (E && !o.cache[H]) { o.cache[H] = {} } if (G !== g) { o.cache[H][E] = G } return E ? o.cache[H][E] : H }, removeData: function(F, E) { F = F == l ? A : F; var H = F[h]; if (E) { if (o.cache[H]) { delete o.cache[H][E]; E = ""; for (E in o.cache[H]) { break } if (!E) { o.removeData(F) } } } else { try { delete F[h] } catch (G) { if (F.removeAttribute) { F.removeAttribute(h) } } delete o.cache[H] } }, queue: function(F, E, H) { if (F) { E = (E || "fx") + "queue"; var G = o.data(F, E); if (!G || o.isArray(H)) { G = o.data(F, E, o.makeArray(H)) } else { if (H) { G.push(H) } } } return G }, dequeue: function(H, G) { var E = o.queue(H, G), F = E.shift(); if (!G || G === "fx") { F = E[0] } if (F !== g) { F.call(H) } } }); o.fn.extend({ data: function(E, G) { var H = E.split("."); H[1] = H[1] ? "." + H[1] : ""; if (G === g) { var F = this.triggerHandler("getData" + H[1] + "!", [H[0]]); if (F === g && this.length) { F = o.data(this[0], E) } return F === g && H[1] ? this.data(H[0]) : F } else { return this.trigger("setData" + H[1] + "!", [H[0], G]).each(function() { o.data(this, E, G) }) } }, removeData: function(E) { return this.each(function() { o.removeData(this, E) }) }, queue: function(E, F) { if (typeof E !== "string") { F = E; E = "fx" } if (F === g) { return o.queue(this[0], E) } return this.each(function() { var G = o.queue(this, E, F); if (E == "fx" && G.length == 1) { G[0].call(this) } }) }, dequeue: function(E) { return this.each(function() { o.dequeue(this, E) }) } });
    /*
    * Sizzle CSS Selector Engine - v0.9.3
    *  Copyright 2009, The Dojo Foundation
    *  Released under the MIT, BSD, and GPL Licenses.
    *  More information: http://sizzlejs.com/
    */
    (function() { var R = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g, L = 0, H = Object.prototype.toString; var F = function(Y, U, ab, ac) { ab = ab || []; U = U || document; if (U.nodeType !== 1 && U.nodeType !== 9) { return [] } if (!Y || typeof Y !== "string") { return ab } var Z = [], W, af, ai, T, ad, V, X = true; R.lastIndex = 0; while ((W = R.exec(Y)) !== null) { Z.push(W[1]); if (W[2]) { V = RegExp.rightContext; break } } if (Z.length > 1 && M.exec(Y)) { if (Z.length === 2 && I.relative[Z[0]]) { af = J(Z[0] + Z[1], U) } else { af = I.relative[Z[0]] ? [U] : F(Z.shift(), U); while (Z.length) { Y = Z.shift(); if (I.relative[Y]) { Y += Z.shift() } af = J(Y, af) } } } else { var ae = ac ? { expr: Z.pop(), set: E(ac)} : F.find(Z.pop(), Z.length === 1 && U.parentNode ? U.parentNode : U, Q(U)); af = F.filter(ae.expr, ae.set); if (Z.length > 0) { ai = E(af) } else { X = false } while (Z.length) { var ah = Z.pop(), ag = ah; if (!I.relative[ah]) { ah = "" } else { ag = Z.pop() } if (ag == null) { ag = U } I.relative[ah](ai, ag, Q(U)) } } if (!ai) { ai = af } if (!ai) { throw "Syntax error, unrecognized expression: " + (ah || Y) } if (H.call(ai) === "[object Array]") { if (!X) { ab.push.apply(ab, ai) } else { if (U.nodeType === 1) { for (var aa = 0; ai[aa] != null; aa++) { if (ai[aa] && (ai[aa] === true || ai[aa].nodeType === 1 && K(U, ai[aa]))) { ab.push(af[aa]) } } } else { for (var aa = 0; ai[aa] != null; aa++) { if (ai[aa] && ai[aa].nodeType === 1) { ab.push(af[aa]) } } } } } else { E(ai, ab) } if (V) { F(V, U, ab, ac); if (G) { hasDuplicate = false; ab.sort(G); if (hasDuplicate) { for (var aa = 1; aa < ab.length; aa++) { if (ab[aa] === ab[aa - 1]) { ab.splice(aa--, 1) } } } } } return ab }; F.matches = function(T, U) { return F(T, null, null, U) }; F.find = function(aa, T, ab) { var Z, X; if (!aa) { return [] } for (var W = 0, V = I.order.length; W < V; W++) { var Y = I.order[W], X; if ((X = I.match[Y].exec(aa))) { var U = RegExp.leftContext; if (U.substr(U.length - 1) !== "\\") { X[1] = (X[1] || "").replace(/\\/g, ""); Z = I.find[Y](X, T, ab); if (Z != null) { aa = aa.replace(I.match[Y], ""); break } } } } if (!Z) { Z = T.getElementsByTagName("*") } return { set: Z, expr: aa} }; F.filter = function(ad, ac, ag, W) { var V = ad, ai = [], aa = ac, Y, T, Z = ac && ac[0] && Q(ac[0]); while (ad && ac.length) { for (var ab in I.filter) { if ((Y = I.match[ab].exec(ad)) != null) { var U = I.filter[ab], ah, af; T = false; if (aa == ai) { ai = [] } if (I.preFilter[ab]) { Y = I.preFilter[ab](Y, aa, ag, ai, W, Z); if (!Y) { T = ah = true } else { if (Y === true) { continue } } } if (Y) { for (var X = 0; (af = aa[X]) != null; X++) { if (af) { ah = U(af, Y, X, aa); var ae = W ^ !!ah; if (ag && ah != null) { if (ae) { T = true } else { aa[X] = false } } else { if (ae) { ai.push(af); T = true } } } } } if (ah !== g) { if (!ag) { aa = ai } ad = ad.replace(I.match[ab], ""); if (!T) { return [] } break } } } if (ad == V) { if (T == null) { throw "Syntax error, unrecognized expression: " + ad } else { break } } V = ad } return aa }; var I = F.selectors = { order: ["ID", "NAME", "TAG"], match: { ID: /#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/, CLASS: /\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/, NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/, ATTR: /\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/, TAG: /^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/, CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/, POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/, PSEUDO: /:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/ }, attrMap: { "class": "className", "for": "htmlFor" }, attrHandle: { href: function(T) { return T.getAttribute("href") } }, relative: { "+": function(aa, T, Z) { var X = typeof T === "string", ab = X && !/\W/.test(T), Y = X && !ab; if (ab && !Z) { T = T.toUpperCase() } for (var W = 0, V = aa.length, U; W < V; W++) { if ((U = aa[W])) { while ((U = U.previousSibling) && U.nodeType !== 1) { } aa[W] = Y || U && U.nodeName === T ? U || false : U === T } } if (Y) { F.filter(T, aa, true) } }, ">": function(Z, U, aa) { var X = typeof U === "string"; if (X && !/\W/.test(U)) { U = aa ? U : U.toUpperCase(); for (var V = 0, T = Z.length; V < T; V++) { var Y = Z[V]; if (Y) { var W = Y.parentNode; Z[V] = W.nodeName === U ? W : false } } } else { for (var V = 0, T = Z.length; V < T; V++) { var Y = Z[V]; if (Y) { Z[V] = X ? Y.parentNode : Y.parentNode === U } } if (X) { F.filter(U, Z, true) } } }, "": function(W, U, Y) { var V = L++, T = S; if (!U.match(/\W/)) { var X = U = Y ? U : U.toUpperCase(); T = P } T("parentNode", U, V, W, X, Y) }, "~": function(W, U, Y) { var V = L++, T = S; if (typeof U === "string" && !U.match(/\W/)) { var X = U = Y ? U : U.toUpperCase(); T = P } T("previousSibling", U, V, W, X, Y) } }, find: { ID: function(U, V, W) { if (typeof V.getElementById !== "undefined" && !W) { var T = V.getElementById(U[1]); return T ? [T] : [] } }, NAME: function(V, Y, Z) { if (typeof Y.getElementsByName !== "undefined") { var U = [], X = Y.getElementsByName(V[1]); for (var W = 0, T = X.length; W < T; W++) { if (X[W].getAttribute("name") === V[1]) { U.push(X[W]) } } return U.length === 0 ? null : U } }, TAG: function(T, U) { return U.getElementsByTagName(T[1]) } }, preFilter: { CLASS: function(W, U, V, T, Z, aa) { W = " " + W[1].replace(/\\/g, "") + " "; if (aa) { return W } for (var X = 0, Y; (Y = U[X]) != null; X++) { if (Y) { if (Z ^ (Y.className && (" " + Y.className + " ").indexOf(W) >= 0)) { if (!V) { T.push(Y) } } else { if (V) { U[X] = false } } } } return false }, ID: function(T) { return T[1].replace(/\\/g, "") }, TAG: function(U, T) { for (var V = 0; T[V] === false; V++) { } return T[V] && Q(T[V]) ? U[1] : U[1].toUpperCase() }, CHILD: function(T) { if (T[1] == "nth") { var U = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2] == "even" && "2n" || T[2] == "odd" && "2n+1" || !/\D/.test(T[2]) && "0n+" + T[2] || T[2]); T[2] = (U[1] + (U[2] || 1)) - 0; T[3] = U[3] - 0 } T[0] = L++; return T }, ATTR: function(X, U, V, T, Y, Z) { var W = X[1].replace(/\\/g, ""); if (!Z && I.attrMap[W]) { X[1] = I.attrMap[W] } if (X[2] === "~=") { X[4] = " " + X[4] + " " } return X }, PSEUDO: function(X, U, V, T, Y) { if (X[1] === "not") { if (X[3].match(R).length > 1 || /^\w/.test(X[3])) { X[3] = F(X[3], null, null, U) } else { var W = F.filter(X[3], U, V, true ^ Y); if (!V) { T.push.apply(T, W) } return false } } else { if (I.match.POS.test(X[0]) || I.match.CHILD.test(X[0])) { return true } } return X }, POS: function(T) { T.unshift(true); return T } }, filters: { enabled: function(T) { return T.disabled === false && T.type !== "hidden" }, disabled: function(T) { return T.disabled === true }, checked: function(T) { return T.checked === true }, selected: function(T) { T.parentNode.selectedIndex; return T.selected === true }, parent: function(T) { return !!T.firstChild }, empty: function(T) { return !T.firstChild }, has: function(V, U, T) { return !!F(T[3], V).length }, header: function(T) { return /h\d/i.test(T.nodeName) }, text: function(T) { return "text" === T.type }, radio: function(T) { return "radio" === T.type }, checkbox: function(T) { return "checkbox" === T.type }, file: function(T) { return "file" === T.type }, password: function(T) { return "password" === T.type }, submit: function(T) { return "submit" === T.type }, image: function(T) { return "image" === T.type }, reset: function(T) { return "reset" === T.type }, button: function(T) { return "button" === T.type || T.nodeName.toUpperCase() === "BUTTON" }, input: function(T) { return /input|select|textarea|button/i.test(T.nodeName) } }, setFilters: { first: function(U, T) { return T === 0 }, last: function(V, U, T, W) { return U === W.length - 1 }, even: function(U, T) { return T % 2 === 0 }, odd: function(U, T) { return T % 2 === 1 }, lt: function(V, U, T) { return U < T[3] - 0 }, gt: function(V, U, T) { return U > T[3] - 0 }, nth: function(V, U, T) { return T[3] - 0 == U }, eq: function(V, U, T) { return T[3] - 0 == U } }, filter: { PSEUDO: function(Z, V, W, aa) { var U = V[1], X = I.filters[U]; if (X) { return X(Z, W, V, aa) } else { if (U === "contains") { return (Z.textContent || Z.innerText || "").indexOf(V[3]) >= 0 } else { if (U === "not") { var Y = V[3]; for (var W = 0, T = Y.length; W < T; W++) { if (Y[W] === Z) { return false } } return true } } } }, CHILD: function(T, W) { var Z = W[1], U = T; switch (Z) { case "only": case "first": while (U = U.previousSibling) { if (U.nodeType === 1) { return false } } if (Z == "first") { return true } U = T; case "last": while (U = U.nextSibling) { if (U.nodeType === 1) { return false } } return true; case "nth": var V = W[2], ac = W[3]; if (V == 1 && ac == 0) { return true } var Y = W[0], ab = T.parentNode; if (ab && (ab.sizcache !== Y || !T.nodeIndex)) { var X = 0; for (U = ab.firstChild; U; U = U.nextSibling) { if (U.nodeType === 1) { U.nodeIndex = ++X } } ab.sizcache = Y } var aa = T.nodeIndex - ac; if (V == 0) { return aa == 0 } else { return (aa % V == 0 && aa / V >= 0) } } }, ID: function(U, T) { return U.nodeType === 1 && U.getAttribute("id") === T }, TAG: function(U, T) { return (T === "*" && U.nodeType === 1) || U.nodeName === T }, CLASS: function(U, T) { return (" " + (U.className || U.getAttribute("class")) + " ").indexOf(T) > -1 }, ATTR: function(Y, W) { var V = W[1], T = I.attrHandle[V] ? I.attrHandle[V](Y) : Y[V] != null ? Y[V] : Y.getAttribute(V), Z = T + "", X = W[2], U = W[4]; return T == null ? X === "!=" : X === "=" ? Z === U : X === "*=" ? Z.indexOf(U) >= 0 : X === "~=" ? (" " + Z + " ").indexOf(U) >= 0 : !U ? Z && T !== false : X === "!=" ? Z != U : X === "^=" ? Z.indexOf(U) === 0 : X === "$=" ? Z.substr(Z.length - U.length) === U : X === "|=" ? Z === U || Z.substr(0, U.length + 1) === U + "-" : false }, POS: function(X, U, V, Y) { var T = U[2], W = I.setFilters[T]; if (W) { return W(X, V, U, Y) } } } }; var M = I.match.POS; for (var O in I.match) { I.match[O] = RegExp(I.match[O].source + /(?![^\[]*\])(?![^\(]*\))/.source) } var E = function(U, T) { U = Array.prototype.slice.call(U); if (T) { T.push.apply(T, U); return T } return U }; try { Array.prototype.slice.call(document.documentElement.childNodes) } catch (N) { E = function(X, W) { var U = W || []; if (H.call(X) === "[object Array]") { Array.prototype.push.apply(U, X) } else { if (typeof X.length === "number") { for (var V = 0, T = X.length; V < T; V++) { U.push(X[V]) } } else { for (var V = 0; X[V]; V++) { U.push(X[V]) } } } return U } } var G; if (document.documentElement.compareDocumentPosition) { G = function(U, T) { var V = U.compareDocumentPosition(T) & 4 ? -1 : U === T ? 0 : 1; if (V === 0) { hasDuplicate = true } return V } } else { if ("sourceIndex" in document.documentElement) { G = function(U, T) { var V = U.sourceIndex - T.sourceIndex; if (V === 0) { hasDuplicate = true } return V } } else { if (document.createRange) { G = function(W, U) { var V = W.ownerDocument.createRange(), T = U.ownerDocument.createRange(); V.selectNode(W); V.collapse(true); T.selectNode(U); T.collapse(true); var X = V.compareBoundaryPoints(Range.START_TO_END, T); if (X === 0) { hasDuplicate = true } return X } } } } (function() { var U = document.createElement("form"), V = "script" + (new Date).getTime(); U.innerHTML = "<input name='" + V + "'/>"; var T = document.documentElement; T.insertBefore(U, T.firstChild); if (!!document.getElementById(V)) { I.find.ID = function(X, Y, Z) { if (typeof Y.getElementById !== "undefined" && !Z) { var W = Y.getElementById(X[1]); return W ? W.id === X[1] || typeof W.getAttributeNode !== "undefined" && W.getAttributeNode("id").nodeValue === X[1] ? [W] : g : [] } }; I.filter.ID = function(Y, W) { var X = typeof Y.getAttributeNode !== "undefined" && Y.getAttributeNode("id"); return Y.nodeType === 1 && X && X.nodeValue === W } } T.removeChild(U) })(); (function() { var T = document.createElement("div"); T.appendChild(document.createComment("")); if (T.getElementsByTagName("*").length > 0) { I.find.TAG = function(U, Y) { var X = Y.getElementsByTagName(U[1]); if (U[1] === "*") { var W = []; for (var V = 0; X[V]; V++) { if (X[V].nodeType === 1) { W.push(X[V]) } } X = W } return X } } T.innerHTML = "<a href='#'></a>"; if (T.firstChild && typeof T.firstChild.getAttribute !== "undefined" && T.firstChild.getAttribute("href") !== "#") { I.attrHandle.href = function(U) { return U.getAttribute("href", 2) } } })(); if (document.querySelectorAll) { (function() { var T = F, U = document.createElement("div"); U.innerHTML = "<p class='TEST'></p>"; if (U.querySelectorAll && U.querySelectorAll(".TEST").length === 0) { return } F = function(Y, X, V, W) { X = X || document; if (!W && X.nodeType === 9 && !Q(X)) { try { return E(X.querySelectorAll(Y), V) } catch (Z) { } } return T(Y, X, V, W) }; F.find = T.find; F.filter = T.filter; F.selectors = T.selectors; F.matches = T.matches })() } if (document.getElementsByClassName && document.documentElement.getElementsByClassName) { (function() { var T = document.createElement("div"); T.innerHTML = "<div class='test e'></div><div class='test'></div>"; if (T.getElementsByClassName("e").length === 0) { return } T.lastChild.className = "e"; if (T.getElementsByClassName("e").length === 1) { return } I.order.splice(1, 0, "CLASS"); I.find.CLASS = function(U, V, W) { if (typeof V.getElementsByClassName !== "undefined" && !W) { return V.getElementsByClassName(U[1]) } } })() } function P(U, Z, Y, ad, aa, ac) { var ab = U == "previousSibling" && !ac; for (var W = 0, V = ad.length; W < V; W++) { var T = ad[W]; if (T) { if (ab && T.nodeType === 1) { T.sizcache = Y; T.sizset = W } T = T[U]; var X = false; while (T) { if (T.sizcache === Y) { X = ad[T.sizset]; break } if (T.nodeType === 1 && !ac) { T.sizcache = Y; T.sizset = W } if (T.nodeName === Z) { X = T; break } T = T[U] } ad[W] = X } } } function S(U, Z, Y, ad, aa, ac) { var ab = U == "previousSibling" && !ac; for (var W = 0, V = ad.length; W < V; W++) { var T = ad[W]; if (T) { if (ab && T.nodeType === 1) { T.sizcache = Y; T.sizset = W } T = T[U]; var X = false; while (T) { if (T.sizcache === Y) { X = ad[T.sizset]; break } if (T.nodeType === 1) { if (!ac) { T.sizcache = Y; T.sizset = W } if (typeof Z !== "string") { if (T === Z) { X = true; break } } else { if (F.filter(Z, [T]).length > 0) { X = T; break } } } T = T[U] } ad[W] = X } } } var K = document.compareDocumentPosition ? function(U, T) { return U.compareDocumentPosition(T) & 16 } : function(U, T) { return U !== T && (U.contains ? U.contains(T) : true) }; var Q = function(T) { return T.nodeType === 9 && T.documentElement.nodeName !== "HTML" || !!T.ownerDocument && Q(T.ownerDocument) }; var J = function(T, aa) { var W = [], X = "", Y, V = aa.nodeType ? [aa] : aa; while ((Y = I.match.PSEUDO.exec(T))) { X += Y[0]; T = T.replace(I.match.PSEUDO, "") } T = I.relative[T] ? T + "*" : T; for (var Z = 0, U = V.length; Z < U; Z++) { F(T, V[Z], W) } return F.filter(X, W) }; o.find = F; o.filter = F.filter; o.expr = F.selectors; o.expr[":"] = o.expr.filters; F.selectors.filters.hidden = function(T) { return T.offsetWidth === 0 || T.offsetHeight === 0 }; F.selectors.filters.visible = function(T) { return T.offsetWidth > 0 || T.offsetHeight > 0 }; F.selectors.filters.animated = function(T) { return o.grep(o.timers, function(U) { return T === U.elem }).length }; o.multiFilter = function(V, T, U) { if (U) { V = ":not(" + V + ")" } return F.matches(V, T) }; o.dir = function(V, U) { var T = [], W = V[U]; while (W && W != document) { if (W.nodeType == 1) { T.push(W) } W = W[U] } return T }; o.nth = function(X, T, V, W) { T = T || 1; var U = 0; for (; X; X = X[V]) { if (X.nodeType == 1 && ++U == T) { break } } return X }; o.sibling = function(V, U) { var T = []; for (; V; V = V.nextSibling) { if (V.nodeType == 1 && V != U) { T.push(V) } } return T }; return; l.Sizzle = F })(); o.event = { add: function(I, F, H, K) { if (I.nodeType == 3 || I.nodeType == 8) { return } if (I.setInterval && I != l) { I = l } if (!H.guid) { H.guid = this.guid++ } if (K !== g) { var G = H; H = this.proxy(G); H.data = K } var E = o.data(I, "events") || o.data(I, "events", {}), J = o.data(I, "handle") || o.data(I, "handle", function() { return typeof o !== "undefined" && !o.event.triggered ? o.event.handle.apply(arguments.callee.elem, arguments) : g }); J.elem = I; o.each(F.split(/\s+/), function(M, N) { var O = N.split("."); N = O.shift(); H.type = O.slice().sort().join("."); var L = E[N]; if (o.event.specialAll[N]) { o.event.specialAll[N].setup.call(I, K, O) } if (!L) { L = E[N] = {}; if (!o.event.special[N] || o.event.special[N].setup.call(I, K, O) === false) { if (I.addEventListener) { I.addEventListener(N, J, false) } else { if (I.attachEvent) { I.attachEvent("on" + N, J) } } } } L[H.guid] = H; o.event.global[N] = true }); I = null }, guid: 1, global: {}, remove: function(K, H, J) { if (K.nodeType == 3 || K.nodeType == 8) { return } var G = o.data(K, "events"), F, E; if (G) { if (H === g || (typeof H === "string" && H.charAt(0) == ".")) { for (var I in G) { this.remove(K, I + (H || "")) } } else { if (H.type) { J = H.handler; H = H.type } o.each(H.split(/\s+/), function(M, O) { var Q = O.split("."); O = Q.shift(); var N = RegExp("(^|\\.)" + Q.slice().sort().join(".*\\.") + "(\\.|$)"); if (G[O]) { if (J) { delete G[O][J.guid] } else { for (var P in G[O]) { if (N.test(G[O][P].type)) { delete G[O][P] } } } if (o.event.specialAll[O]) { o.event.specialAll[O].teardown.call(K, Q) } for (F in G[O]) { break } if (!F) { if (!o.event.special[O] || o.event.special[O].teardown.call(K, Q) === false) { if (K.removeEventListener) { K.removeEventListener(O, o.data(K, "handle"), false) } else { if (K.detachEvent) { K.detachEvent("on" + O, o.data(K, "handle")) } } } F = null; delete G[O] } } }) } for (F in G) { break } if (!F) { var L = o.data(K, "handle"); if (L) { L.elem = null } o.removeData(K, "events"); o.removeData(K, "handle") } } }, trigger: function(I, K, H, E) { var G = I.type || I; if (!E) { I = typeof I === "object" ? I[h] ? I : o.extend(o.Event(G), I) : o.Event(G); if (G.indexOf("!") >= 0) { I.type = G = G.slice(0, -1); I.exclusive = true } if (!H) { I.stopPropagation(); if (this.global[G]) { o.each(o.cache, function() { if (this.events && this.events[G]) { o.event.trigger(I, K, this.handle.elem) } }) } } if (!H || H.nodeType == 3 || H.nodeType == 8) { return g } I.result = g; I.target = H; K = o.makeArray(K); K.unshift(I) } I.currentTarget = H; var J = o.data(H, "handle"); if (J) { J.apply(H, K) } if ((!H[G] || (o.nodeName(H, "a") && G == "click")) && H["on" + G] && H["on" + G].apply(H, K) === false) { I.result = false } if (!E && H[G] && !I.isDefaultPrevented() && !(o.nodeName(H, "a") && G == "click")) { this.triggered = true; try { H[G]() } catch (L) { } } this.triggered = false; if (!I.isPropagationStopped()) { var F = H.parentNode || H.ownerDocument; if (F) { o.event.trigger(I, K, F, true) } } }, handle: function(K) { var J, E; K = arguments[0] = o.event.fix(K || l.event); K.currentTarget = this; var L = K.type.split("."); K.type = L.shift(); J = !L.length && !K.exclusive; var I = RegExp("(^|\\.)" + L.slice().sort().join(".*\\.") + "(\\.|$)"); E = (o.data(this, "events") || {})[K.type]; for (var G in E) { var H = E[G]; if (J || I.test(H.type)) { K.handler = H; K.data = H.data; var F = H.apply(this, arguments); if (F !== g) { K.result = F; if (F === false) { K.preventDefault(); K.stopPropagation() } } if (K.isImmediatePropagationStopped()) { break } } } }, props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), fix: function(H) { if (H[h]) { return H } var F = H; H = o.Event(F); for (var G = this.props.length, J; G; ) { J = this.props[--G]; H[J] = F[J] } if (!H.target) { H.target = H.srcElement || document } if (H.target.nodeType == 3) { H.target = H.target.parentNode } if (!H.relatedTarget && H.fromElement) { H.relatedTarget = H.fromElement == H.target ? H.toElement : H.fromElement } if (H.pageX == null && H.clientX != null) { var I = document.documentElement, E = document.body; H.pageX = H.clientX + (I && I.scrollLeft || E && E.scrollLeft || 0) - (I.clientLeft || 0); H.pageY = H.clientY + (I && I.scrollTop || E && E.scrollTop || 0) - (I.clientTop || 0) } if (!H.which && ((H.charCode || H.charCode === 0) ? H.charCode : H.keyCode)) { H.which = H.charCode || H.keyCode } if (!H.metaKey && H.ctrlKey) { H.metaKey = H.ctrlKey } if (!H.which && H.button) { H.which = (H.button & 1 ? 1 : (H.button & 2 ? 3 : (H.button & 4 ? 2 : 0))) } return H }, proxy: function(F, E) { E = E || function() { return F.apply(this, arguments) }; E.guid = F.guid = F.guid || E.guid || this.guid++; return E }, special: { ready: { setup: B, teardown: function() { } } }, specialAll: { live: { setup: function(E, F) { o.event.add(this, F[0], c) }, teardown: function(G) { if (G.length) { var E = 0, F = RegExp("(^|\\.)" + G[0] + "(\\.|$)"); o.each((o.data(this, "events").live || {}), function() { if (F.test(this.type)) { E++ } }); if (E < 1) { o.event.remove(this, G[0], c) } } } }} }; o.Event = function(E) { if (!this.preventDefault) { return new o.Event(E) } if (E && E.type) { this.originalEvent = E; this.type = E.type } else { this.type = E } this.timeStamp = e(); this[h] = true }; function k() { return false } function u() { return true } o.Event.prototype = { preventDefault: function() { this.isDefaultPrevented = u; var E = this.originalEvent; if (!E) { return } if (E.preventDefault) { E.preventDefault() } E.returnValue = false }, stopPropagation: function() { this.isPropagationStopped = u; var E = this.originalEvent; if (!E) { return } if (E.stopPropagation) { E.stopPropagation() } E.cancelBubble = true }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = u; this.stopPropagation() }, isDefaultPrevented: k, isPropagationStopped: k, isImmediatePropagationStopped: k }; var a = function(F) { var E = F.relatedTarget; while (E && E != this) { try { E = E.parentNode } catch (G) { E = this } } if (E != this) { F.type = F.data; o.event.handle.apply(this, arguments) } }; o.each({ mouseover: "mouseenter", mouseout: "mouseleave" }, function(F, E) { o.event.special[E] = { setup: function() { o.event.add(this, F, a, E) }, teardown: function() { o.event.remove(this, F, a) } } }); o.fn.extend({ bind: function(F, G, E) { return F == "unload" ? this.one(F, G, E) : this.each(function() { o.event.add(this, F, E || G, E && G) }) }, one: function(G, H, F) { var E = o.event.proxy(F || H, function(I) { o(this).unbind(I, E); return (F || H).apply(this, arguments) }); return this.each(function() { o.event.add(this, G, E, F && H) }) }, unbind: function(F, E) { return this.each(function() { o.event.remove(this, F, E) }) }, trigger: function(E, F) { return this.each(function() { o.event.trigger(E, F, this) }) }, triggerHandler: function(E, G) { if (this[0]) { var F = o.Event(E); F.preventDefault(); F.stopPropagation(); o.event.trigger(F, G, this[0]); return F.result } }, toggle: function(G) { var E = arguments, F = 1; while (F < E.length) { o.event.proxy(G, E[F++]) } return this.click(o.event.proxy(G, function(H) { this.lastToggle = (this.lastToggle || 0) % F; H.preventDefault(); return E[this.lastToggle++].apply(this, arguments) || false })) }, hover: function(E, F) { return this.mouseenter(E).mouseleave(F) }, ready: function(E) { B(); if (o.isReady) { E.call(document, o) } else { o.readyList.push(E) } return this }, live: function(G, F) { var E = o.event.proxy(F); E.guid += this.selector + G; o(document).bind(i(G, this.selector), this.selector, E); return this }, die: function(F, E) { o(document).unbind(i(F, this.selector), E ? { guid: E.guid + this.selector + F} : null); return this } }); function c(H) { var E = RegExp("(^|\\.)" + H.type + "(\\.|$)"), G = true, F = []; o.each(o.data(this, "events").live || [], function(I, J) { if (E.test(J.type)) { var K = o(H.target).closest(J.data)[0]; if (K) { F.push({ elem: K, fn: J }) } } }); F.sort(function(J, I) { return o.data(J.elem, "closest") - o.data(I.elem, "closest") }); o.each(F, function() { if (this.fn.call(this.elem, H, this.fn.data) === false) { return (G = false) } }); return G } function i(F, E) { return ["live", F, E.replace(/\./g, "`").replace(/ /g, "|")].join(".") } o.extend({ isReady: false, readyList: [], ready: function() { if (!o.isReady) { o.isReady = true; if (o.readyList) { o.each(o.readyList, function() { this.call(document, o) }); o.readyList = null } o(document).triggerHandler("ready") } } }); var x = false; function B() { if (x) { return } x = true; if (document.addEventListener) { document.addEventListener("DOMContentLoaded", function() { document.removeEventListener("DOMContentLoaded", arguments.callee, false); o.ready() }, false) } else { if (document.attachEvent) { document.attachEvent("onreadystatechange", function() { if (document.readyState === "complete") { document.detachEvent("onreadystatechange", arguments.callee); o.ready() } }); if (document.documentElement.doScroll && l == l.top) { (function() { if (o.isReady) { return } try { document.documentElement.doScroll("left") } catch (E) { setTimeout(arguments.callee, 0); return } o.ready() })() } } } o.event.add(l, "load", o.ready) } o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","), function(F, E) { o.fn[E] = function(G) { return G ? this.bind(E, G) : this.trigger(E) } }); o(l).bind("unload", function() { for (var E in o.cache) { if (E != 1 && o.cache[E].handle) { o.event.remove(o.cache[E].handle.elem) } } }); (function() { o.support = {}; var F = document.documentElement, G = document.createElement("script"), K = document.createElement("div"), J = "script" + (new Date).getTime(); K.style.display = "none"; K.innerHTML = '   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>'; var H = K.getElementsByTagName("*"), E = K.getElementsByTagName("a")[0]; if (!H || !H.length || !E) { return } o.support = { leadingWhitespace: K.firstChild.nodeType == 3, tbody: !K.getElementsByTagName("tbody").length, objectAll: !!K.getElementsByTagName("object")[0].getElementsByTagName("*").length, htmlSerialize: !!K.getElementsByTagName("link").length, style: /red/.test(E.getAttribute("style")), hrefNormalized: E.getAttribute("href") === "/a", opacity: E.style.opacity === "0.5", cssFloat: !!E.style.cssFloat, scriptEval: false, noCloneEvent: true, boxModel: null }; G.type = "text/javascript"; try { G.appendChild(document.createTextNode("window." + J + "=1;")) } catch (I) { } F.insertBefore(G, F.firstChild); if (l[J]) { o.support.scriptEval = true; delete l[J] } F.removeChild(G); if (K.attachEvent && K.fireEvent) { K.attachEvent("onclick", function() { o.support.noCloneEvent = false; K.detachEvent("onclick", arguments.callee) }); K.cloneNode(true).fireEvent("onclick") } o(function() { var L = document.createElement("div"); L.style.width = L.style.paddingLeft = "1px"; document.body.appendChild(L); o.boxModel = o.support.boxModel = L.offsetWidth === 2; document.body.removeChild(L).style.display = "none" }) })(); var w = o.support.cssFloat ? "cssFloat" : "styleFloat"; o.props = { "for": "htmlFor", "class": "className", "float": w, cssFloat: w, styleFloat: w, readonly: "readOnly", maxlength: "maxLength", cellspacing: "cellSpacing", rowspan: "rowSpan", tabindex: "tabIndex" }; o.fn.extend({ _load: o.fn.load, load: function(G, J, K) { if (typeof G !== "string") { return this._load(G) } var I = G.indexOf(" "); if (I >= 0) { var E = G.slice(I, G.length); G = G.slice(0, I) } var H = "GET"; if (J) { if (o.isFunction(J)) { K = J; J = null } else { if (typeof J === "object") { J = o.param(J); H = "POST" } } } var F = this; o.ajax({ url: G, type: H, dataType: "html", data: J, complete: function(M, L) { if (L == "success" || L == "notmodified") { F.html(E ? o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g, "")).find(E) : M.responseText) } if (K) { F.each(K, [M.responseText, L, M]) } } }); return this }, serialize: function() { return o.param(this.serializeArray()) }, serializeArray: function() { return this.map(function() { return this.elements ? o.makeArray(this.elements) : this }).filter(function() { return this.name && !this.disabled && (this.checked || /select|textarea/i.test(this.nodeName) || /text|hidden|password|search/i.test(this.type)) }).map(function(E, F) { var G = o(this).val(); return G == null ? null : o.isArray(G) ? o.map(G, function(I, H) { return { name: F.name, value: I} }) : { name: F.name, value: G} }).get() } }); o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(E, F) { o.fn[F] = function(G) { return this.bind(F, G) } }); var r = e(); o.extend({ get: function(E, G, H, F) { if (o.isFunction(G)) { H = G; G = null } return o.ajax({ type: "GET", url: E, data: G, success: H, dataType: F }) }, getScript: function(E, F) { return o.get(E, null, F, "script") }, getJSON: function(E, F, G) { return o.get(E, F, G, "json") }, post: function(E, G, H, F) { if (o.isFunction(G)) { H = G; G = {} } return o.ajax({ type: "POST", url: E, data: G, success: H, dataType: F }) }, ajaxSetup: function(E) { o.extend(o.ajaxSettings, E) }, ajaxSettings: { url: location.href, global: true, type: "GET", contentType: "application/x-www-form-urlencoded", processData: true, async: true, xhr: function() { return l.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest() }, accepts: { xml: "application/xml, text/xml", html: "text/html", script: "text/javascript, application/javascript", json: "application/json, text/javascript", text: "text/plain", _default: "*/*"} }, lastModified: {}, ajax: function(M) { M = o.extend(true, M, o.extend(true, {}, o.ajaxSettings, M)); var W, F = /=\?(&|$)/g, R, V, G = M.type.toUpperCase(); if (M.data && M.processData && typeof M.data !== "string") { M.data = o.param(M.data) } if (M.dataType == "jsonp") { if (G == "GET") { if (!M.url.match(F)) { M.url += (M.url.match(/\?/) ? "&" : "?") + (M.jsonp || "callback") + "=?" } } else { if (!M.data || !M.data.match(F)) { M.data = (M.data ? M.data + "&" : "") + (M.jsonp || "callback") + "=?" } } M.dataType = "json" } if (M.dataType == "json" && (M.data && M.data.match(F) || M.url.match(F))) { W = "jsonp" + r++; if (M.data) { M.data = (M.data + "").replace(F, "=" + W + "$1") } M.url = M.url.replace(F, "=" + W + "$1"); M.dataType = "script"; l[W] = function(X) { V = X; I(); L(); l[W] = g; try { delete l[W] } catch (Y) { } if (H) { H.removeChild(T) } } } if (M.dataType == "script" && M.cache == null) { M.cache = false } if (M.cache === false && G == "GET") { var E = e(); var U = M.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + E + "$2"); M.url = U + ((U == M.url) ? (M.url.match(/\?/) ? "&" : "?") + "_=" + E : "") } if (M.data && G == "GET") { M.url += (M.url.match(/\?/) ? "&" : "?") + M.data; M.data = null } if (M.global && !o.active++) { o.event.trigger("ajaxStart") } var Q = /^(\w+:)?\/\/([^\/?#]+)/.exec(M.url); if (M.dataType == "script" && G == "GET" && Q && (Q[1] && Q[1] != location.protocol || Q[2] != location.host)) { var H = document.getElementsByTagName("head")[0]; var T = document.createElement("script"); T.src = M.url; if (M.scriptCharset) { T.charset = M.scriptCharset } if (!W) { var O = false; T.onload = T.onreadystatechange = function() { if (!O && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) { O = true; I(); L(); T.onload = T.onreadystatechange = null; H.removeChild(T) } } } H.appendChild(T); return g } var K = false; var J = M.xhr(); if (M.username) { J.open(G, M.url, M.async, M.username, M.password) } else { J.open(G, M.url, M.async) } try { if (M.data) { J.setRequestHeader("Content-Type", M.contentType) } if (M.ifModified) { J.setRequestHeader("If-Modified-Since", o.lastModified[M.url] || "Thu, 01 Jan 1970 00:00:00 GMT") } J.setRequestHeader("X-Requested-With", "XMLHttpRequest"); J.setRequestHeader("Accept", M.dataType && M.accepts[M.dataType] ? M.accepts[M.dataType] + ", */*" : M.accepts._default) } catch (S) { } if (M.beforeSend && M.beforeSend(J, M) === false) { if (M.global && ! --o.active) { o.event.trigger("ajaxStop") } J.abort(); return false } if (M.global) { o.event.trigger("ajaxSend", [J, M]) } var N = function(X) { if (J.readyState == 0) { if (P) { clearInterval(P); P = null; if (M.global && ! --o.active) { o.event.trigger("ajaxStop") } } } else { if (!K && J && (J.readyState == 4 || X == "timeout")) { K = true; if (P) { clearInterval(P); P = null } R = X == "timeout" ? "timeout" : !o.httpSuccess(J) ? "error" : M.ifModified && o.httpNotModified(J, M.url) ? "notmodified" : "success"; if (R == "success") { try { V = o.httpData(J, M.dataType, M) } catch (Z) { R = "parsererror" } } if (R == "success") { var Y; try { Y = J.getResponseHeader("Last-Modified") } catch (Z) { } if (M.ifModified && Y) { o.lastModified[M.url] = Y } if (!W) { I() } } else { o.handleError(M, J, R) } L(); if (X) { J.abort() } if (M.async) { J = null } } } }; if (M.async) { var P = setInterval(N, 13); if (M.timeout > 0) { setTimeout(function() { if (J && !K) { N("timeout") } }, M.timeout) } } try { J.send(M.data) } catch (S) { o.handleError(M, J, null, S) } if (!M.async) { N() } function I() { if (M.success) { M.success(V, R) } if (M.global) { o.event.trigger("ajaxSuccess", [J, M]) } } function L() { if (M.complete) { M.complete(J, R) } if (M.global) { o.event.trigger("ajaxComplete", [J, M]) } if (M.global && ! --o.active) { o.event.trigger("ajaxStop") } } return J }, handleError: function(F, H, E, G) { if (F.error) { F.error(H, E, G) } if (F.global) { o.event.trigger("ajaxError", [H, F, G]) } }, active: 0, httpSuccess: function(F) { try { return !F.status && location.protocol == "file:" || (F.status >= 200 && F.status < 300) || F.status == 304 || F.status == 1223 } catch (E) { } return false }, httpNotModified: function(G, E) { try { var H = G.getResponseHeader("Last-Modified"); return G.status == 304 || H == o.lastModified[E] } catch (F) { } return false }, httpData: function(J, H, G) { var F = J.getResponseHeader("content-type"), E = H == "xml" || !H && F && F.indexOf("xml") >= 0, I = E ? J.responseXML : J.responseText; if (E && I.documentElement.tagName == "parsererror") { throw "parsererror" } if (G && G.dataFilter) { I = G.dataFilter(I, H) } if (typeof I === "string") { if (H == "script") { o.globalEval(I) } if (H == "json") { I = l["eval"]("(" + I + ")") } } return I }, param: function(E) { var G = []; function H(I, J) { G[G.length] = encodeURIComponent(I) + "=" + encodeURIComponent(J) } if (o.isArray(E) || E.jquery) { o.each(E, function() { H(this.name, this.value) }) } else { for (var F in E) { if (o.isArray(E[F])) { o.each(E[F], function() { H(F, this) }) } else { H(F, o.isFunction(E[F]) ? E[F]() : E[F]) } } } return G.join("&").replace(/%20/g, "+") } }); var m = {}, n, d = [["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"], ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"], ["opacity"]]; function t(F, E) { var G = {}; o.each(d.concat.apply([], d.slice(0, E)), function() { G[this] = F }); return G } o.fn.extend({ show: function(J, L) { if (J) { return this.animate(t("show", 3), J, L) } else { for (var H = 0, F = this.length; H < F; H++) { var E = o.data(this[H], "olddisplay"); this[H].style.display = E || ""; if (o.css(this[H], "display") === "none") { var G = this[H].tagName, K; if (m[G]) { K = m[G] } else { var I = o("<" + G + " />").appendTo("body"); K = I.css("display"); if (K === "none") { K = "block" } I.remove(); m[G] = K } o.data(this[H], "olddisplay", K) } } for (var H = 0, F = this.length; H < F; H++) { this[H].style.display = o.data(this[H], "olddisplay") || "" } return this } }, hide: function(H, I) { if (H) { return this.animate(t("hide", 3), H, I) } else { for (var G = 0, F = this.length; G < F; G++) { var E = o.data(this[G], "olddisplay"); if (!E && E !== "none") { o.data(this[G], "olddisplay", o.css(this[G], "display")) } } for (var G = 0, F = this.length; G < F; G++) { this[G].style.display = "none" } return this } }, _toggle: o.fn.toggle, toggle: function(G, F) { var E = typeof G === "boolean"; return o.isFunction(G) && o.isFunction(F) ? this._toggle.apply(this, arguments) : G == null || E ? this.each(function() { var H = E ? G : o(this).is(":hidden"); o(this)[H ? "show" : "hide"]() }) : this.animate(t("toggle", 3), G, F) }, fadeTo: function(E, G, F) { return this.animate({ opacity: G }, E, F) }, animate: function(I, F, H, G) { var E = o.speed(F, H, G); return this[E.queue === false ? "each" : "queue"](function() { var K = o.extend({}, E), M, L = this.nodeType == 1 && o(this).is(":hidden"), J = this; for (M in I) { if (I[M] == "hide" && L || I[M] == "show" && !L) { return K.complete.call(this) } if ((M == "height" || M == "width") && this.style) { K.display = o.css(this, "display"); K.overflow = this.style.overflow } } if (K.overflow != null) { this.style.overflow = "hidden" } K.curAnim = o.extend({}, I); o.each(I, function(O, S) { var R = new o.fx(J, K, O); if (/toggle|show|hide/.test(S)) { R[S == "toggle" ? L ? "show" : "hide" : S](I) } else { var Q = S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/), T = R.cur(true) || 0; if (Q) { var N = parseFloat(Q[2]), P = Q[3] || "px"; if (P != "px") { J.style[O] = (N || 1) + P; T = ((N || 1) / R.cur(true)) * T; J.style[O] = T + P } if (Q[1]) { N = ((Q[1] == "-=" ? -1 : 1) * N) + T } R.custom(T, N, P) } else { R.custom(T, S, "") } } }); return true }) }, stop: function(F, E) { var G = o.timers; if (F) { this.queue([]) } this.each(function() { for (var H = G.length - 1; H >= 0; H--) { if (G[H].elem == this) { if (E) { G[H](true) } G.splice(H, 1) } } }); if (!E) { this.dequeue() } return this } }); o.each({ slideDown: t("show", 1), slideUp: t("hide", 1), slideToggle: t("toggle", 1), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide"} }, function(E, F) { o.fn[E] = function(G, H) { return this.animate(F, G, H) } }); o.extend({ speed: function(G, H, F) { var E = typeof G === "object" ? G : { complete: F || !F && H || o.isFunction(G) && G, duration: G, easing: F && H || H && !o.isFunction(H) && H }; E.duration = o.fx.off ? 0 : typeof E.duration === "number" ? E.duration : o.fx.speeds[E.duration] || o.fx.speeds._default; E.old = E.complete; E.complete = function() { if (E.queue !== false) { o(this).dequeue() } if (o.isFunction(E.old)) { E.old.call(this) } }; return E }, easing: { linear: function(G, H, E, F) { return E + F * G }, swing: function(G, H, E, F) { return ((-Math.cos(G * Math.PI) / 2) + 0.5) * F + E } }, timers: [], fx: function(F, E, G) { this.options = E; this.elem = F; this.prop = G; if (!E.orig) { E.orig = {} } } }); o.fx.prototype = { update: function() { if (this.options.step) { this.options.step.call(this.elem, this.now, this) } (o.fx.step[this.prop] || o.fx.step._default)(this); if ((this.prop == "height" || this.prop == "width") && this.elem.style) { this.elem.style.display = "block" } }, cur: function(F) { if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null)) { return this.elem[this.prop] } var E = parseFloat(o.css(this.elem, this.prop, F)); return E && E > -10000 ? E : parseFloat(o.curCSS(this.elem, this.prop)) || 0 }, custom: function(I, H, G) { this.startTime = e(); this.start = I; this.end = H; this.unit = G || this.unit || "px"; this.now = this.start; this.pos = this.state = 0; var E = this; function F(J) { return E.step(J) } F.elem = this.elem; if (F() && o.timers.push(F) && !n) { n = setInterval(function() { var K = o.timers; for (var J = 0; J < K.length; J++) { if (!K[J]()) { K.splice(J--, 1) } } if (!K.length) { clearInterval(n); n = g } }, 13) } }, show: function() { this.options.orig[this.prop] = o.attr(this.elem.style, this.prop); this.options.show = true; this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur()); o(this.elem).show() }, hide: function() { this.options.orig[this.prop] = o.attr(this.elem.style, this.prop); this.options.hide = true; this.custom(this.cur(), 0) }, step: function(H) { var G = e(); if (H || G >= this.options.duration + this.startTime) { this.now = this.end; this.pos = this.state = 1; this.update(); this.options.curAnim[this.prop] = true; var E = true; for (var F in this.options.curAnim) { if (this.options.curAnim[F] !== true) { E = false } } if (E) { if (this.options.display != null) { this.elem.style.overflow = this.options.overflow; this.elem.style.display = this.options.display; if (o.css(this.elem, "display") == "none") { this.elem.style.display = "block" } } if (this.options.hide) { o(this.elem).hide() } if (this.options.hide || this.options.show) { for (var I in this.options.curAnim) { o.attr(this.elem.style, I, this.options.orig[I]) } } this.options.complete.call(this.elem) } return false } else { var J = G - this.startTime; this.state = J / this.options.duration; this.pos = o.easing[this.options.easing || (o.easing.swing ? "swing" : "linear")](this.state, J, 0, 1, this.options.duration); this.now = this.start + ((this.end - this.start) * this.pos); this.update() } return true } }; o.extend(o.fx, { speeds: { slow: 600, fast: 200, _default: 400 }, step: { opacity: function(E) { o.attr(E.elem.style, "opacity", E.now) }, _default: function(E) { if (E.elem.style && E.elem.style[E.prop] != null) { E.elem.style[E.prop] = E.now + E.unit } else { E.elem[E.prop] = E.now } } } }); if (document.documentElement.getBoundingClientRect) { o.fn.offset = function() { if (!this[0]) { return { top: 0, left: 0} } if (this[0] === this[0].ownerDocument.body) { return o.offset.bodyOffset(this[0]) } var G = this[0].getBoundingClientRect(), J = this[0].ownerDocument, F = J.body, E = J.documentElement, L = E.clientTop || F.clientTop || 0, K = E.clientLeft || F.clientLeft || 0, I = G.top + (self.pageYOffset || o.boxModel && E.scrollTop || F.scrollTop) - L, H = G.left + (self.pageXOffset || o.boxModel && E.scrollLeft || F.scrollLeft) - K; return { top: I, left: H} } } else { o.fn.offset = function() { if (!this[0]) { return { top: 0, left: 0} } if (this[0] === this[0].ownerDocument.body) { return o.offset.bodyOffset(this[0]) } o.offset.initialized || o.offset.initialize(); var J = this[0], G = J.offsetParent, F = J, O = J.ownerDocument, M, H = O.documentElement, K = O.body, L = O.defaultView, E = L.getComputedStyle(J, null), N = J.offsetTop, I = J.offsetLeft; while ((J = J.parentNode) && J !== K && J !== H) { M = L.getComputedStyle(J, null); N -= J.scrollTop, I -= J.scrollLeft; if (J === G) { N += J.offsetTop, I += J.offsetLeft; if (o.offset.doesNotAddBorder && !(o.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(J.tagName))) { N += parseInt(M.borderTopWidth, 10) || 0, I += parseInt(M.borderLeftWidth, 10) || 0 } F = G, G = J.offsetParent } if (o.offset.subtractsBorderForOverflowNotVisible && M.overflow !== "visible") { N += parseInt(M.borderTopWidth, 10) || 0, I += parseInt(M.borderLeftWidth, 10) || 0 } E = M } if (E.position === "relative" || E.position === "static") { N += K.offsetTop, I += K.offsetLeft } if (E.position === "fixed") { N += Math.max(H.scrollTop, K.scrollTop), I += Math.max(H.scrollLeft, K.scrollLeft) } return { top: N, left: I} } } o.offset = { initialize: function() { if (this.initialized) { return } var L = document.body, F = document.createElement("div"), H, G, N, I, M, E, J = L.style.marginTop, K = '<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>'; M = { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" }; for (E in M) { F.style[E] = M[E] } F.innerHTML = K; L.insertBefore(F, L.firstChild); H = F.firstChild, G = H.firstChild, I = H.nextSibling.firstChild.firstChild; this.doesNotAddBorder = (G.offsetTop !== 5); this.doesAddBorderForTableAndCells = (I.offsetTop === 5); H.style.overflow = "hidden", H.style.position = "relative"; this.subtractsBorderForOverflowNotVisible = (G.offsetTop === -5); L.style.marginTop = "1px"; this.doesNotIncludeMarginInBodyOffset = (L.offsetTop === 0); L.style.marginTop = J; L.removeChild(F); this.initialized = true }, bodyOffset: function(E) { o.offset.initialized || o.offset.initialize(); var G = E.offsetTop, F = E.offsetLeft; if (o.offset.doesNotIncludeMarginInBodyOffset) { G += parseInt(o.curCSS(E, "marginTop", true), 10) || 0, F += parseInt(o.curCSS(E, "marginLeft", true), 10) || 0 } return { top: G, left: F} } }; o.fn.extend({ position: function() { var I = 0, H = 0, F; if (this[0]) { var G = this.offsetParent(), J = this.offset(), E = /^body|html$/i.test(G[0].tagName) ? { top: 0, left: 0} : G.offset(); J.top -= j(this, "marginTop"); J.left -= j(this, "marginLeft"); E.top += j(G, "borderTopWidth"); E.left += j(G, "borderLeftWidth"); F = { top: J.top - E.top, left: J.left - E.left} } return F }, offsetParent: function() { var E = this[0].offsetParent || document.body; while (E && (!/^body|html$/i.test(E.tagName) && o.css(E, "position") == "static")) { E = E.offsetParent } return o(E) } }); o.each(["Left", "Top"], function(F, E) { var G = "scroll" + E; o.fn[G] = function(H) { if (!this[0]) { return null } return H !== g ? this.each(function() { this == l || this == document ? l.scrollTo(!F ? H : o(l).scrollLeft(), F ? H : o(l).scrollTop()) : this[G] = H }) : this[0] == l || this[0] == document ? self[F ? "pageYOffset" : "pageXOffset"] || o.boxModel && document.documentElement[G] || document.body[G] : this[0][G] } }); o.each(["Height", "Width"], function(I, G) { var E = I ? "Left" : "Top", H = I ? "Right" : "Bottom", F = G.toLowerCase(); o.fn["inner" + G] = function() { return this[0] ? o.css(this[0], F, false, "padding") : null }; o.fn["outer" + G] = function(K) { return this[0] ? o.css(this[0], F, false, K ? "margin" : "border") : null }; var J = G.toLowerCase(); o.fn[J] = function(K) { return this[0] == l ? document.compatMode == "CSS1Compat" && document.documentElement["client" + G] || document.body["client" + G] : this[0] == document ? Math.max(document.documentElement["client" + G], document.body["scroll" + G], document.documentElement["scroll" + G], document.body["offset" + G], document.documentElement["offset" + G]) : K === g ? (this.length ? o.css(this[0], J) : null) : this.css(J, typeof K === "string" ? K : K + "px") } })
})();
/*EOF JQUERY*/

/*JQUERY.BGIFRAME.JS AEMXDEV-18*/
/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* $LastChangedDate: 2007-07-21 18:44:59 -0500 (Sat, 21 Jul 2007) $
* $Rev: 2446 $
*
* Version 2.1.1
*/
eval(function(p, a, c, k, e, r) { e = function(c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function(e) { return r[e] } ]; e = function() { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p } ('(b($){$.m.E=$.m.g=b(s){h($.x.10&&/6.0/.I(D.B)){s=$.w({c:\'3\',5:\'3\',8:\'3\',d:\'3\',k:M,e:\'F:i;\'},s||{});C a=b(n){f n&&n.t==r?n+\'4\':n},p=\'<o Y="g"W="0"R="-1"e="\'+s.e+\'"\'+\'Q="P:O;N:L;z-H:-1;\'+(s.k!==i?\'G:J(K=\\\'0\\\');\':\'\')+\'c:\'+(s.c==\'3\'?\'7(((l(2.9.j.A)||0)*-1)+\\\'4\\\')\':a(s.c))+\';\'+\'5:\'+(s.5==\'3\'?\'7(((l(2.9.j.y)||0)*-1)+\\\'4\\\')\':a(s.5))+\';\'+\'8:\'+(s.8==\'3\'?\'7(2.9.S+\\\'4\\\')\':a(s.8))+\';\'+\'d:\'+(s.d==\'3\'?\'7(2.9.v+\\\'4\\\')\':a(s.d))+\';\'+\'"/>\';f 2.T(b(){h($(\'> o.g\',2).U==0)2.V(q.X(p),2.u)})}f 2}})(Z);', 62, 63, '||this|auto|px|left||expression|width|parentNode||function|top|height|src|return|bgiframe|if|false|currentStyle|opacity|parseInt|fn||iframe|html|document|Number||constructor|firstChild|offsetHeight|extend|browser|borderLeftWidth||borderTopWidth|userAgent|var|navigator|bgIframe|javascript|filter|index|test|Alpha|Opacity|absolute|true|position|block|display|style|tabindex|offsetWidth|each|length|insertBefore|frameborder|createElement|class|jQuery|msie'.split('|'), 0, {}))
/*EOF BGIFRAME*/



/*SHADOWBOX AEMXDEV-18*/
/*shadowbox-jquery.js*/
if (typeof jQuery == "undefined") { throw "Unable to load Shadowbox, jQuery library not found" } var Shadowbox = {}; Shadowbox.lib = { adapter: "jquery", getStyle: function(B, A) { return jQuery(B).css(A) }, setStyle: function(C, B, D) { if (D != "NaNpx") { if (typeof B != "object") { var A = {}; A[B] = D; B = A } jQuery(C).css(B) } }, get: function(A) { return (typeof A == "string") ? document.getElementById(A) : A }, remove: function(A) { jQuery(A).remove() }, getTarget: function(A) { return A.target }, getPageXY: function(A) { return [A.pageX, A.pageY] }, preventDefault: function(A) { A.preventDefault() }, keyCode: function(A) { return A.keyCode }, addEvent: function(C, A, B) { jQuery(C).bind(A, B) }, removeEvent: function(C, A, B) { jQuery(C).unbind(A, B) }, append: function(B, A) { jQuery(B).append(A) } }; (function(A) { A.fn.shadowbox = function(B) { return this.each(function() { var E = A(this); var D = A.extend({}, B || {}, A.metadata ? E.metadata() : A.meta ? E.data() : {}); var C = this.className || ""; D.width = parseInt((C.match(/w:(\d+)/) || [])[1]) || D.width; D.height = parseInt((C.match(/h:(\d+)/) || [])[1]) || D.height; Shadowbox.setup(E, D) }) } })(jQuery);
/*shadowbox.js*/
if (typeof Shadowbox == "undefined") { throw "Unable to load Shadowbox, no base library adapter found" } (function() { var version = "2.0"; var options = { animate: true, animateFade: true, animSequence: "wh", flvPlayer: "flvplayer.swf", modal: false, overlayColor: "#000", overlayOpacity: 0.8, flashBgColor: "#000000", autoplayMovies: true, showMovieControls: true, slideshowDelay: 0, resizeDuration: 0.55, fadeDuration: 0.35, displayNav: true, continuous: false, displayCounter: true, counterType: "default", counterLimit: 10, viewportPadding: 20, handleOversize: "resize", handleException: null, handleUnsupported: "link", initialHeight: 160, initialWidth: 320, enableKeys: true, onOpen: null, onFinish: null, onChange: null, onClose: null, skipSetup: false, errors: { fla: { name: "Flash", url: "http://www.adobe.com/products/flashplayer/" }, qt: { name: "QuickTime", url: "http://www.apple.com/quicktime/download/" }, wmp: { name: "Windows Media Player", url: "http://www.microsoft.com/windows/windowsmedia/" }, f4m: { name: "Flip4Mac", url: "http://www.flip4mac.com/wmv_download.htm"} }, ext: { img: ["png", "jpg", "jpeg", "gif", "bmp"], swf: ["swf"], flv: ["flv"], qt: ["dv", "mov", "moov", "movie", "mp4"], wmp: ["asf", "wm", "wmv"], qtwmp: ["avi", "mpg", "mpeg"], iframe: ["asp", "aspx", "cgi", "cfm", "htm", "html", "pl", "php", "php3", "php4", "php5", "phtml", "rb", "rhtml", "shtml", "txt", "vbs"]} }; var SB = Shadowbox; var SL = SB.lib; var default_options; var RE = { domain: /:\/\/(.*?)[:\/]/, inline: /#(.+)$/, rel: /^(light|shadow)box/i, gallery: /^(light|shadow)box\[(.*?)\]/i, unsupported: /^unsupported-(\w+)/, param: /\s*([a-z_]*?)\s*=\s*(.+)\s*/, empty: /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i }; var cache = []; var gallery; var current; var content; var content_id = "shadowbox_content"; var dims; var initialized = false; var activated = false; var slide_timer; var slide_start; var slide_delay = 0; var ua = navigator.userAgent.toLowerCase(); var client = { isStrict: document.compatMode == "CSS1Compat", isOpera: ua.indexOf("opera") > -1, isIE: ua.indexOf("msie") > -1, isIE7: ua.indexOf("msie 7") > -1, isSafari: /webkit|khtml/.test(ua), isWindows: ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1, isMac: ua.indexOf("macintosh") != -1 || ua.indexOf("mac os x") != -1, isLinux: ua.indexOf("linux") != -1 }; client.isBorderBox = client.isIE && !client.isStrict; client.isSafari3 = client.isSafari && !!(document.evaluate); client.isGecko = ua.indexOf("gecko") != -1 && !client.isSafari; var ltIE7 = client.isIE && !client.isIE7; var plugins; if (navigator.plugins && navigator.plugins.length) { var detectPlugin = function(plugin_name) { var detected = false; for (var i = 0, len = navigator.plugins.length; i < len; ++i) { if (navigator.plugins[i].name.indexOf(plugin_name) > -1) { detected = true; break } } return detected }; var f4m = detectPlugin("Flip4Mac"); plugins = { fla: detectPlugin("Shockwave Flash"), qt: detectPlugin("QuickTime"), wmp: !f4m && detectPlugin("Windows Media"), f4m: f4m} } else { var detectPlugin = function(plugin_name) { var detected = false; try { var axo = new ActiveXObject(plugin_name); if (axo) { detected = true } } catch (e) { } return detected }; plugins = { fla: detectPlugin("ShockwaveFlash.ShockwaveFlash"), qt: detectPlugin("QuickTime.QuickTime"), wmp: detectPlugin("wmplayer.ocx"), f4m: false} } var apply = function(o, e) { for (var p in e) { o[p] = e[p] } return o }; var isLink = function(el) { return el && typeof el.tagName == "string" && (el.tagName.toUpperCase() == "A" || el.tagName.toUpperCase() == "AREA") }; SL.getViewportHeight = function() { var h = window.innerHeight; var mode = document.compatMode; if ((mode || client.isIE) && !client.isOpera) { h = client.isStrict ? document.documentElement.clientHeight : document.body.clientHeight } return h }; SL.getViewportWidth = function() { var w = window.innerWidth; var mode = document.compatMode; if (mode || client.isIE) { w = client.isStrict ? document.documentElement.clientWidth : document.body.clientWidth } return w }; SL.createHTML = function(obj) { var html = "<" + obj.tag; for (var attr in obj) { if (attr == "tag" || attr == "html" || attr == "children") { continue } if (attr == "cls") { html += ' class="' + obj.cls + '"' } else { html += " " + attr + '="' + obj[attr] + '"' } } if (RE.empty.test(obj.tag)) { html += "/>" } else { html += ">"; var cn = obj.children; if (cn) { for (var i = 0, len = cn.length; i < len; ++i) { html += this.createHTML(cn[i]) } } if (obj.html) { html += obj.html } html += "</" + obj.tag + ">" } return html }; var ease = function(x) { return 1 + Math.pow(x - 1, 3) }; var animate = function(el, p, to, d, cb) { var from = parseFloat(SL.getStyle(el, p)); if (isNaN(from)) { from = 0 } if (from == to) { if (typeof cb == "function") { cb() } return } var delta = to - from; var op = p == "opacity"; var unit = op ? "" : "px"; var fn = function(ease) { SL.setStyle(el, p, from + ease * delta + unit) }; if (!options.animate && !op || op && !options.animateFade) { fn(1); if (typeof cb == "function") { cb() } return } d *= 1000; var begin = new Date().getTime(); var end = begin + d; var timer = setInterval(function() { var time = new Date().getTime(); if (time >= end) { clearInterval(timer); fn(1); if (typeof cb == "function") { cb() } } else { fn(ease((time - begin) / d)) } }, 10) }; var clearOpacity = function(el) { var s = el.style; if (client.isIE) { if (typeof s.filter == "string" && (/alpha/i).test(s.filter)) { s.filter = s.filter.replace(/[\w\.]*alpha\(.*?\);?/i, "") } } else { s.opacity = ""; s["-moz-opacity"] = ""; s["-khtml-opacity"] = "" } }; var getComputedHeight = function(el) { var h = Math.max(el.offsetHeight, el.clientHeight); if (!h) { h = parseInt(SL.getStyle(el, "height"), 10) || 0; if (!client.isBorderBox) { h += parseInt(SL.getStyle(el, "padding-top"), 10) + parseInt(SL.getStyle(el, "padding-bottom"), 10) + parseInt(SL.getStyle(el, "border-top-width"), 10) + parseInt(SL.getStyle(el, "border-bottom-width"), 10) } } return h }; var getPlayer = function(url) { var m = url.match(RE.domain); var d = m && document.domain == m[1]; if (url.indexOf("#") > -1 && d) { return "inline" } var q = url.indexOf("?"); if (q > -1) { url = url.substring(0, q) } if (RE.img.test(url)) { return "img" } if (RE.swf.test(url)) { return plugins.fla ? "swf" : "unsupported-swf" } if (RE.flv.test(url)) { return plugins.fla ? "flv" : "unsupported-flv" } if (RE.qt.test(url)) { return plugins.qt ? "qt" : "unsupported-qt" } if (RE.wmp.test(url)) { if (plugins.wmp) { return "wmp" } if (plugins.f4m) { return "qt" } if (client.isMac) { return plugins.qt ? "unsupported-f4m" : "unsupported-qtf4m" } return "unsupported-wmp" } else { if (RE.qtwmp.test(url)) { if (plugins.qt) { return "qt" } if (plugins.wmp) { return "wmp" } return client.isMac ? "unsupported-qt" : "unsupported-qtwmp" } else { if (!d || RE.iframe.test(url)) { return "iframe" } } } return "unsupported" }; var handleClick = function(ev) { var link; if (isLink(this)) { link = this } else { link = SL.getTarget(ev); while (!isLink(link) && link.parentNode) { link = link.parentNode } } if (link) { SB.open(link); if (gallery.length) { SL.preventDefault(ev) } } }; var toggleNav = function(id, on) { var el = SL.get("shadowbox_nav_" + id); if (el) { el.style.display = on ? "" : "none" } }; var buildBars = function(cb) { var obj = gallery[current]; var title_i = SL.get("shadowbox_title_inner"); title_i.innerHTML = obj.title || ""; var nav = SL.get("shadowbox_nav"); if (nav) { var c, n, pl, pa, p; if (options.displayNav) { c = true; var len = gallery.length; if (len > 1) { if (options.continuous) { n = p = true } else { n = (len - 1) > current; p = current > 0 } } if (options.slideshowDelay > 0 && hasNext()) { pa = slide_timer != "paused"; pl = !pa } } else { c = n = pl = pa = p = false } toggleNav("close", c); toggleNav("next", n); toggleNav("play", pl); toggleNav("pause", pa); toggleNav("previous", p) } var counter = SL.get("shadowbox_counter"); if (counter) { var co = ""; if (options.displayCounter && gallery.length > 1) { if (options.counterType == "skip") { var i = 0, len = gallery.length, end = len; var limit = parseInt(options.counterLimit); if (limit < len) { var h = Math.round(limit / 2); i = current - h; if (i < 0) { i += len } end = current + (limit - h); if (end > len) { end -= len } } while (i != end) { if (i == len) { i = 0 } co += '<a onclick="Shadowbox.change(' + i + ');"'; if (i == current) { co += ' class="shadowbox_counter_current"' } co += ">" + (++i) + "</a>" } } else { co = (current + 1) + " " + SB.LANG.of + " " + len } } counter.innerHTML = co } cb() }; var hideBars = function(anim, cb) { var obj = gallery[current]; var title = SL.get("shadowbox_title"); var info = SL.get("shadowbox_info"); var title_i = SL.get("shadowbox_title_inner"); var info_i = SL.get("shadowbox_info_inner"); var fn = function() { buildBars(cb) }; var title_h = getComputedHeight(title); var info_h = getComputedHeight(info) * -1; if (anim) { animate(title_i, "margin-top", title_h, 0.35); animate(info_i, "margin-top", info_h, 0.35, fn) } else { SL.setStyle(title_i, "margin-top", title_h + "px"); SL.setStyle(info_i, "margin-top", info_h + "px"); fn() } }; var showBars = function(cb) { var title_i = SL.get("shadowbox_title_inner"); var info_i = SL.get("shadowbox_info_inner"); var t = title_i.innerHTML != ""; if (t) { animate(title_i, "margin-top", 0, 0.35) } animate(info_i, "margin-top", 0, 0.35, cb) }; var loadContent = function() { var obj = gallery[current]; if (!obj) { return } var changing = false; if (content) { content.remove(); changing = true } var p = obj.player == "inline" ? "html" : obj.player; if (typeof SB[p] != "function") { SB.raise("Unknown player " + obj.player) } content = new SB[p](content_id, obj); listenKeys(false); toggleLoading(true); hideBars(changing, function() { if (!content) { return } if (!changing) { SL.get("shadowbox").style.display = "" } var fn = function() { resizeContent(function() { if (!content) { return } showBars(function() { if (!content) { return } SL.get("shadowbox_body_inner").innerHTML = SL.createHTML(content.markup(dims)); toggleLoading(false, function() { if (!content) { return } if (typeof content.onLoad == "function") { content.onLoad() } if (options.onFinish && typeof options.onFinish == "function") { options.onFinish(gallery[current]) } if (slide_timer != "paused") { SB.play() } listenKeys(true) }) }) }) }; if (typeof content.ready != "undefined") { var id = setInterval(function() { if (content) { if (content.ready) { clearInterval(id); id = null; fn() } } else { clearInterval(id); id = null } }, 100) } else { fn() } }); if (gallery.length > 1) { var next = gallery[current + 1] || gallery[0]; if (next.player == "img") { var a = new Image(); a.src = next.content } var prev = gallery[current - 1] || gallery[gallery.length - 1]; if (prev.player == "img") { var b = new Image(); b.src = prev.content } } }; var setDimensions = function(height, width, resizable) { resizable = resizable || false; var sb = SL.get("shadowbox_body"); var h = height = parseInt(height); var w = width = parseInt(width); var view_h = SL.getViewportHeight(); var view_w = SL.getViewportWidth(); var border_w = parseInt(SL.getStyle(sb, "border-left-width"), 10) + parseInt(SL.getStyle(sb, "border-right-width"), 10); var extra_w = border_w + 2 * options.viewportPadding; if (w + extra_w >= view_w) { w = view_w - extra_w } var border_h = parseInt(SL.getStyle(sb, "border-top-width"), 10) + parseInt(SL.getStyle(sb, "border-bottom-width"), 10); var bar_h = getComputedHeight(SL.get("shadowbox_title")) + getComputedHeight(SL.get("shadowbox_info")); var extra_h = border_h + 2 * options.viewportPadding + bar_h; if (h + extra_h >= view_h) { h = view_h - extra_h } var drag = false; var resize_h = height; var resize_w = width; var handle = options.handleOversize; if (resizable && (handle == "resize" || handle == "drag")) { var change_h = (height - h) / height; var change_w = (width - w) / width; if (handle == "resize") { if (change_h > change_w) { w = Math.round((width / height) * h) } else { if (change_w > change_h) { h = Math.round((height / width) * w) } } resize_w = w; resize_h = h } else { var link = gallery[current]; if (link) { drag = link.player == "img" && (change_h > 0 || change_w > 0) } } } dims = { height: h + border_h + bar_h, width: w + border_w, inner_h: h, inner_w: w, top: (view_h - (h + extra_h)) / 2 + options.viewportPadding, resize_h: resize_h, resize_w: resize_w, drag: drag} }; var resizeContent = function(cb) { if (!content) { return } setDimensions(content.height, content.width, content.resizable); if (cb) { switch (options.animSequence) { case "hw": adjustHeight(dims.inner_h, dims.top, true, function() { adjustWidth(dims.width, true, cb) }); break; case "wh": adjustWidth(dims.width, true, function() { adjustHeight(dims.inner_h, dims.top, true, cb) }); break; case "sync": default: adjustWidth(dims.width, true); adjustHeight(dims.inner_h, dims.top, true, cb) } } else { adjustWidth(dims.width, false); adjustHeight(dims.inner_h, dims.top, false); var c = SL.get(content_id); if (c) { if (content.resizable && options.handleOversize == "resize") { c.height = dims.resize_h; c.width = dims.resize_w } if (gallery[current].player == "img" && options.handleOversize == "drag") { var top = parseInt(SL.getStyle(c, "top")); if (top + content.height < dims.inner_h) { SL.setStyle(c, "top", dims.inner_h - content.height + "px") } var left = parseInt(SL.getStyle(c, "left")); if (left + content.width < dims.inner_w) { SL.setStyle(c, "left", dims.inner_w - content.width + "px") } } } } }; var adjustHeight = function(height, top, anim, cb) { height = parseInt(height); var sb = SL.get("shadowbox_body"); if (anim) { animate(sb, "height", height, options.resizeDuration) } else { SL.setStyle(sb, "height", height + "px") } var s = SL.get("shadowbox"); if (anim) { animate(s, "top", top, options.resizeDuration, cb) } else { SL.setStyle(s, "top", top + "px"); if (typeof cb == "function") { cb() } } }; var adjustWidth = function(width, anim, cb) { width = parseInt(width); var s = SL.get("shadowbox"); if (anim) { animate(s, "width", width, options.resizeDuration, cb) } else { SL.setStyle(s, "width", width + "px"); if (typeof cb == "function") { cb() } } }; var listenKeys = function(on) { if (!options.enableKeys) { return } SL[(on ? "add" : "remove") + "Event"](document, "keydown", handleKey) }; var handleKey = function(e) { var code = SL.keyCode(e); SL.preventDefault(e); if (code == 81 || code == 88 || code == 27) { SB.close() } else { if (code == 37) { SB.previous() } else { if (code == 39) { SB.next() } else { if (code == 32) { SB[(typeof slide_timer == "number" ? "pause" : "play")]() } } } } }; var toggleLoading = function(on, cb) { var loading = SL.get("shadowbox_loading"); if (on) { loading.style.display = ""; if (typeof cb == "function") { cb() } } else { var p = gallery[current].player; var anim = (p == "img" || p == "html"); var fn = function() { loading.style.display = "none"; clearOpacity(loading); if (typeof cb == "function") { cb() } }; if (anim) { animate(loading, "opacity", 0, options.fadeDuration, fn) } else { fn() } } }; var fixTop = function() { SL.get("shadowbox_container").style.top = document.documentElement.scrollTop + "px" }; var fixHeight = function() { SL.get("shadowbox_overlay").style.height = SL.getViewportHeight() + "px" }; var hasNext = function() { return gallery.length > 1 && (current != gallery.length - 1 || options.continuous) }; var toggleVisible = function(cb) { var els, v = (cb) ? "hidden" : "visible"; var hide = ["select", "object", "embed"]; for (var i = 0; i < hide.length; ++i) { els = document.getElementsByTagName(hide[i]); for (var j = 0, len = els.length; j < len; ++j) { els[j].style.visibility = v } } var so = SL.get("shadowbox_overlay"); var sc = SL.get("shadowbox_container"); var sb = SL.get("shadowbox"); if (cb) { SL.setStyle(so, { backgroundColor: options.overlayColor, opacity: 0 }); if (!options.modal) { SL.addEvent(so, "click", SB.close) } if (ltIE7) { fixTop(); fixHeight(); SL.addEvent(window, "scroll", fixTop) } sb.style.display = "none"; sc.style.visibility = "visible"; animate(so, "opacity", parseFloat(options.overlayOpacity), options.fadeDuration, cb) } else { SL.removeEvent(so, "click", SB.close); if (ltIE7) { SL.removeEvent(window, "scroll", fixTop) } sb.style.display = "none"; animate(so, "opacity", 0, options.fadeDuration, function() { sc.style.visibility = "hidden"; sb.style.display = ""; clearOpacity(so) }) } }; Shadowbox.init = function(opts) { if (initialized) { return } if (typeof SB.LANG == "undefined") { SB.raise("No Shadowbox language loaded"); return } if (typeof SB.SKIN == "undefined") { SB.raise("No Shadowbox skin loaded"); return } apply(options, opts || {}); var markup = SB.SKIN.markup.replace(/\{(\w+)\}/g, function(m, p) { return SB.LANG[p] }); var bd = document.body || document.documentElement; SL.append(bd, markup); if (ltIE7) { SL.setStyle(SL.get("shadowbox_container"), "position", "absolute"); SL.get("shadowbox_body").style.zoom = 1; var png = SB.SKIN.png_fix; if (png && png.constructor == Array) { for (var i = 0; i < png.length; ++i) { var el = SL.get(png[i]); if (el) { var match = SL.getStyle(el, "background-image").match(/url\("(.*\.png)"\)/); if (match) { SL.setStyle(el, { backgroundImage: "none", filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src=" + match[1] + ",sizingMethod=scale);" }) } } } } } for (var e in options.ext) { RE[e] = new RegExp(".(" + options.ext[e].join("|") + ")s*$", "i") } var id; SL.addEvent(window, "resize", function() { if (id) { clearTimeout(id); id = null } id = setTimeout(function() { if (ltIE7) { fixHeight() } resizeContent() }, 50) }); if (!options.skipSetup) { SB.setup() } initialized = true }; Shadowbox.loadSkin = function(skin, dir) { if (!(/\/$/.test(dir))) { dir += "/" } skin = dir + skin + "/"; document.write('<link rel="stylesheet" type="text/css" href="' + skin + 'skin.css">'); document.write('<script type="text/javascript" src="' + skin + 'skin.js"><\/script>') }; Shadowbox.loadLanguage = function(lang, dir) { if (!(/\/$/.test(dir))) { dir += "/" } document.write('<script type="text/javascript" src="' + dir + "shadowbox-" + lang + '.js"><\/script>') }; Shadowbox.loadPlayer = function(players, dir) { if (typeof players == "string") { players = [players] } if (!(/\/$/.test(dir))) { dir += "/" } for (var i = 0, len = players.length; i < len; ++i) { document.write('<script type="text/javascript" src="' + dir + "shadowbox-" + players[i] + '.js"><\/script>') } }; Shadowbox.setup = function(links, opts) { if (!links) { var links = []; var a = document.getElementsByTagName("a"), rel; for (var i = 0, len = a.length; i < len; ++i) { rel = a[i].getAttribute("rel"); if (rel && RE.rel.test(rel)) { links[links.length] = a[i] } } } else { if (!links.length) { links = [links] } } var link; for (var i = 0, len = links.length; i < len; ++i) { link = links[i]; if (typeof link.shadowboxCacheKey == "undefined") { link.shadowboxCacheKey = cache.length; SL.addEvent(link, "click", handleClick) } cache[link.shadowboxCacheKey] = this.buildCacheObj(link, opts) } }; Shadowbox.buildCacheObj = function(link, opts) { var href = link.href; var o = { el: link, title: link.getAttribute("title"), player: getPlayer(href), options: apply({}, opts || {}), content: href }; var opt, l_opts = ["player", "title", "height", "width", "gallery"]; for (var i = 0, len = l_opts.length; i < len; ++i) { opt = l_opts[i]; if (typeof o.options[opt] != "undefined") { o[opt] = o.options[opt]; delete o.options[opt] } } var rel = link.getAttribute("rel"); if (rel) { var match = rel.match(RE.gallery); if (match) { o.gallery = escape(match[2]) } var params = rel.split(";"); for (var i = 0, len = params.length; i < len; ++i) { match = params[i].match(RE.param); if (match) { if (match[1] == "options") { eval("apply(o.options, " + match[2] + ")") } else { o[match[1]] = match[2] } } } } return o }; Shadowbox.applyOptions = function(opts) { if (opts) { default_options = apply({}, options); options = apply(options, opts) } }; Shadowbox.revertOptions = function() { if (default_options) { options = default_options; default_options = null } }; Shadowbox.open = function(obj, opts) { this.revertOptions(); if (isLink(obj)) { if (typeof obj.shadowboxCacheKey == "undefined" || typeof cache[obj.shadowboxCacheKey] == "undefined") { obj = this.buildCacheObj(obj, opts) } else { obj = cache[obj.shadowboxCacheKey] } } if (obj.constructor == Array) { gallery = obj; current = 0 } else { var copy = apply({}, obj); if (!obj.gallery) { gallery = [copy]; current = 0 } else { current = null; gallery = []; var ci; for (var i = 0, len = cache.length; i < len; ++i) { ci = cache[i]; if (ci.gallery) { if (ci.content == obj.content && ci.gallery == obj.gallery && ci.title == obj.title) { current = gallery.length } if (ci.gallery == obj.gallery) { gallery.push(apply({}, ci)) } } } if (current == null) { gallery.unshift(copy); current = 0 } } } obj = gallery[current]; if (obj.options || opts) { this.applyOptions(apply(apply({}, obj.options || {}), opts || {})) } var match, r; for (var i = 0, len = gallery.length; i < len; ++i) { r = false; if (gallery[i].player == "unsupported") { r = true } else { if (match = RE.unsupported.exec(gallery[i].player)) { if (options.handleUnsupported == "link") { gallery[i].player = "html"; var s, a, oe = options.errors; switch (match[1]) { case "qtwmp": s = "either"; a = [oe.qt.url, oe.qt.name, oe.wmp.url, oe.wmp.name]; break; case "qtf4m": s = "shared"; a = [oe.qt.url, oe.qt.name, oe.f4m.url, oe.f4m.name]; break; default: s = "single"; if (match[1] == "swf" || match[1] == "flv") { match[1] = "fla" } a = [oe[match[1]].url, oe[match[1]].name] } var msg = SB.LANG.errors[s].replace(/\{(\d+)\}/g, function(m, i) { return a[i] }); gallery[i].content = '<div class="shadowbox_message">' + msg + "</div>" } else { r = true } } else { if (gallery[i].player == "inline") { var match = RE.inline.exec(gallery[i].content); if (match) { var el; if (el = SL.get(match[1])) { gallery[i].content = el.innerHTML } else { SB.raise("Cannot find element with id " + match[1]) } } else { SB.raise("Cannot find element id for inline content") } } } } if (r) { gallery.splice(i, 1); if (i < current) { --current } else { if (i == current) { current = i > 0 ? current - 1 : i } } --i; len = gallery.length } } if (gallery.length) { if (options.onOpen && typeof options.onOpen == "function") { options.onOpen(obj) } if (!activated) { setDimensions(options.initialHeight, options.initialWidth); adjustHeight(dims.inner_h, dims.top, false); adjustWidth(dims.width, false); toggleVisible(loadContent) } else { loadContent() } activated = true } }; Shadowbox.change = function(num) { if (!gallery) { return } if (!gallery[num]) { if (!options.continuous) { return } else { num = num < 0 ? (gallery.length - 1) : 0 } } if (typeof slide_timer == "number") { clearTimeout(slide_timer); slide_timer = null; slide_delay = slide_start = 0 } current = num; if (options.onChange && typeof options.onChange == "function") { options.onChange(gallery[current]) } loadContent() }; Shadowbox.next = function() { this.change(current + 1) }; Shadowbox.previous = function() { this.change(current - 1) }; Shadowbox.play = function() { if (!hasNext()) { return } if (!slide_delay) { slide_delay = options.slideshowDelay * 1000 } if (slide_delay) { slide_start = new Date().getTime(); slide_timer = setTimeout(function() { slide_delay = slide_start = 0; SB.next() }, slide_delay); toggleNav("play", false); toggleNav("pause", true) } }; Shadowbox.pause = function() { if (typeof slide_timer == "number") { var time = new Date().getTime(); slide_delay = Math.max(0, slide_delay - (time - slide_start)); if (slide_delay) { clearTimeout(slide_timer); slide_timer = "paused" } toggleNav("pause", false); toggleNav("play", true) } }; Shadowbox.close = function() { if (!activated) { return } listenKeys(false); toggleVisible(false); if (content) { content.remove(); content = null } if (typeof slide_timer == "number") { clearTimeout(slide_timer) } slide_timer = null; slide_delay = 0; if (options.onClose && typeof options.onClose == "function") { options.onClose(gallery[current]) } activated = false }; Shadowbox.clearCache = function() { for (var i = 0, len = cache.length; i < len; ++i) { if (cache[i].el) { SL.removeEvent(cache[i].el, "click", handleClick); delete cache[i].el.shadowboxCacheKey } } cache = [] }; Shadowbox.getPlugins = function() { return plugins }; Shadowbox.getOptions = function() { return options }; Shadowbox.getCurrent = function() { return gallery[current] }; Shadowbox.getVersion = function() { return version }; Shadowbox.getClient = function() { return client }; Shadowbox.getContent = function() { return content }; Shadowbox.getDimensions = function() { return dims }; Shadowbox.raise = function(e) { if (typeof options.handleException == "function") { options.handleException(e) } else { throw e } } })();
/*skin.js*/
/**
* @author      Michael J. I. Jackson <mjijackson@gmail.com>
* @copyright   2007-2008 Michael J. I. Jackson
* @license     http://creativecommons.org/licenses/by-nc-sa/3.0/
* @version     SVN: $Id: skin.js 108 2008-07-11 04:19:01Z mjijackson $
*/

if (typeof Shadowbox == 'undefined') { throw 'Unable to load Shadowbox skin, base library not found.'; }
Shadowbox.SKIN = {
    markup: '<div id="shadowbox_container">' +
                    '<div id="shadowbox_overlay"></div>' +
                    '<div id="shadowbox">' +
                        '<div id="shadowbox_title">' +
                            '<div id="shadowbox_title_inner"></div>' +
                        '</div>' +
                        '<div id="shadowbox_body">' +
                            '<div id="shadowbox_body_inner"></div>' +
                            '<div id="shadowbox_loading">' +
                                '<div id="shadowbox_loading_indicator"></div>' +
                                '<span><a onclick="Shadowbox.close();">{cancel}</a></span>' +
                            '</div>' +
                        '</div>' +
                        '<div id="shadowbox_info">' +
                            '<div id="shadowbox_info_inner">' +
                                '<div id="shadowbox_counter"></div>' +
                                '<div id="shadowbox_nav">' +
                                    '<a id="shadowbox_nav_close" title="{close}" onclick="Shadowbox.close()"></a>' +
                                    '<a id="shadowbox_nav_next" title="{next}" onclick="Shadowbox.next()"></a>' +
                                    '<a id="shadowbox_nav_play" title="{play}" onclick="Shadowbox.play()"></a>' +
                                    '<a id="shadowbox_nav_pause" title="{pause}" onclick="Shadowbox.pause()"></a>' +
                                    '<a id="shadowbox_nav_previous" title="{previous}" onclick="Shadowbox.previous()"></a>' +
                                '</div>' +
                                '<div class="shadowbox_clear"></div>' +
                            '</div>' +
                        '</div>' +
                    '</div>' +
                '</div>',

    png_fix: [
        'shadowbox_nav_close',
        'shadowbox_nav_next',
        'shadowbox_nav_play',
        'shadowbox_nav_pause',
        'shadowbox_nav_previous'
    ]

};
if (typeof Shadowbox == 'undefined') { throw 'Unable to load Shadowbox language file, base library not found.'; }
Shadowbox.LANG = {
    code: 'en',
    of: 'of',
    loading: 'loading',
    cancel: 'Cancel',
    next: 'Next',
    previous: 'Previous',
    play: 'Play',
    pause: 'Pause',
    close: 'Close',
    errors: {
        single: 'You must install the <a href="{0}">{1}</a> browser plugin to view this content.',
        shared: 'You must install both the <a href="{0}">{1}</a> and <a href="{2}">{3}</a> browser plugins to view this content.',
        either: 'You must install either the <a href="{0}">{1}</a> or the <a href="{2}">{3}</a> browser plugin to view this content.'
    }
};
(function() {
    // shorthand
    var SB = Shadowbox;
    var SL = SB.lib;
    Shadowbox.html = function(id, obj) {
        this.id = id;
        this.obj = obj;
        this.height = this.obj.height ? parseInt(this.obj.height, 10) : 300;
        this.width = this.obj.width ? parseInt(this.obj.width, 10) : 500;
    };
    Shadowbox.html.prototype = {
        markup: function(dims) {
            return {
                tag: 'div',
                id: this.id,
                cls: 'html', // give special class to enable scrolling
                html: this.obj.content
            };
        },
        remove: function() {
            var el = SL.get(this.id);
            if (el) SL.remove(el);
        }
    };
})();
(function() {

    // shorthand
    var SB = Shadowbox;
    var SL = SB.lib;
    var C = SB.getClient();
    Shadowbox.iframe = function(id, obj) {
        this.id = id;
        this.obj = obj;
        this.height = this.obj.height ? parseInt(this.obj.height, 10) : SL.getViewportHeight();
        this.width = this.obj.width ? parseInt(this.obj.width, 10) : SL.getViewportWidth();
    };
    Shadowbox.iframe.prototype = {
        markup: function(dims) {
            var markup = {
                tag: 'iframe',
                id: this.id,
                name: this.id,
                height: '100%',
                width: '100%',
                frameborder: '0',
                marginwidth: '0',
                marginheight: '0',
                scrolling: 'auto'
            };
            if (C.isIE) {
                markup.allowtransparency = 'true';
                if (!C.isIE7) {
                    markup.src = 'javascript:false;document.write("");';
                }
            }
            return markup;
        },
        onLoad: function() {
            var win = (C.isIE) ? SL.get(this.id).contentWindow : window.frames[this.id];
            win.location = this.obj.content; // set the iframe's location
        },
        remove: function() {
            var el = SL.get(this.id);
            if (el) {
                SL.remove(el);
                if (C.isGecko) delete window.frames[this.id]; // needed for Firefox
            }
        }
    };

})();
$(function() { Shadowbox.init({ overlayOpacity: 0.4 }) });
this.tooltip = function() {
    /* CONFIG */
    xOffset = 10;
    yOffset = 20;
    // these 2 variable determine popup's distance from the cursor
    // you might want to adjust to get the right result		
    /* END CONFIG */
    $("a.tooltip").hover(function(e) {
        this.t = this.title;
        this.title = "";
        $("body").append("<p id='tooltip'>" + this.t + "</p>");
        $("#tooltip")
			.css("top", (e.pageY - xOffset) + "px")
			.css("left", (e.pageX + yOffset) + "px")
			.fadeIn("fast");
    },
	function() {
	    this.title = this.t;
	    $("#tooltip").remove();
	});
    $("a.tooltip").mousemove(function(e) {
        $("#tooltip")
			.css("top", (e.pageY - xOffset) + "px")
			.css("left", (e.pageX + yOffset) + "px");
    });
};
$(document).ready(function() { tooltip(); });
/*EOF SHADOWBOX*/



/*WEBTRENDS.JS*/
// WebTrends SmartSource Data Collector Tag
// Version: 8.6.2     
// Tag Builder Version: 3.0
// Created: 5/8/2009 10:53:51 AM

function WebTrends() {
    var that = this;
    // begin: user modifiable
    this.dcsid = "dcscdum3h0wuqpahaghvtymqi_9u2k";
    this.domain = "sdc.aeromexico.com";
    this.timezone = -6;
    this.fpcdom = ".aeromexico.com";
    this.onsitedoms = "";
    this.downloadtypes = "xls,doc,pdf,txt,csv,zip";
    this.navigationtag = "div,table";
    this.trackevents = true;
    this.enabled = true;
    this.i18n = false;
    this.fpc = "WT_FPC";
    this.paidsearchparams = "gclid";
    // end: user modifiable
    this.DCS = {};
    this.WT = {};
    this.DCSext = {};
    this.images = [];
    this.index = 0;
    this.qp = [];
    this.exre = (function() { return (window.RegExp ? new RegExp("dcs(uri)|(ref)|(aut)|(met)|(sta)|(sip)|(pro)|(byt)|(dat)|(p3p)|(cfg)|(redirect)|(cip)", "i") : ""); })();
    this.re = (function() { return (window.RegExp ? (that.i18n ? { "%25": /\%/g} : { "%09": /\t/g, "%20": / /g, "%23": /\#/g, "%26": /\&/g, "%2B": /\+/g, "%3F": /\?/g, "%5C": /\\/g, "%22": /\"/g, "%7F": /\x7F/g, "%A0": /\xA0/g }) : ""); })();
}
WebTrends.prototype.dcsGetId = function() {
    if (this.enabled && (document.cookie.indexOf(this.fpc + "=") == -1) && (document.cookie.indexOf("WTLOPTOUT=") == -1)) {
        document.write("<scr" + "ipt type='text/javascript' src='" + "http" + (window.location.protocol.indexOf('https:') == 0 ? 's' : '') + "://" + this.domain + "/" + this.dcsid + "/wtid.js" + "'><\/scr" + "ipt>");
    }
}
WebTrends.prototype.dcsGetCookie = function(name) {
    var cookies = document.cookie.split("; ");
    var cmatch = [];
    var idx = 0;
    var i = 0;
    var namelen = name.length;
    var clen = cookies.length;
    for (i = 0; i < clen; i++) {
        var c = cookies[i];
        if ((c.substring(0, namelen + 1)) == (name + "=")) {
            cmatch[idx++] = c;
        }
    }
    var cmatchCount = cmatch.length;
    if (cmatchCount > 0) {
        idx = 0;
        if ((cmatchCount > 1) && (name == this.fpc)) {
            var dLatest = new Date(0);
            for (i = 0; i < cmatchCount; i++) {
                var lv = parseInt(this.dcsGetCrumb(cmatch[i], "lv"));
                var dLst = new Date(lv);
                if (dLst > dLatest) {
                    dLatest.setTime(dLst.getTime());
                    idx = i;
                }
            }
        }
        return unescape(cmatch[idx].substring(namelen + 1));
    }
    else {
        return null;
    }
}
WebTrends.prototype.dcsGetCrumb = function(cval, crumb, sep) {
    var aCookie = cval.split(sep || ":");
    for (var i = 0; i < aCookie.length; i++) {
        var aCrumb = aCookie[i].split("=");
        if (crumb == aCrumb[0]) {
            return aCrumb[1];
        }
    }
    return null;
}
WebTrends.prototype.dcsGetIdCrumb = function(cval, crumb) {
    var id = cval.substring(0, cval.indexOf(":lv="));
    var aCrumb = id.split("=");
    for (var i = 0; i < aCrumb.length; i++) {
        if (crumb == aCrumb[0]) {
            return aCrumb[1];
        }
    }
    return null;
}
WebTrends.prototype.dcsIsFpcSet = function(name, id, lv, ss) {
    var c = this.dcsGetCookie(name);
    if (c) {
        return ((id == this.dcsGetIdCrumb(c, "id")) && (lv == this.dcsGetCrumb(c, "lv")) && (ss == this.dcsGetCrumb(c, "ss"))) ? 0 : 3;
    }
    return 2;
}
WebTrends.prototype.dcsFPC = function() {
    if (document.cookie.indexOf("WTLOPTOUT=") != -1) {
        return;
    }
    var WT = this.WT;
    var name = this.fpc;
    var dCur = new Date();
    var adj = (dCur.getTimezoneOffset() * 60000) + (this.timezone * 3600000);
    dCur.setTime(dCur.getTime() + adj);
    var dExp = new Date(dCur.getTime() + 315360000000);
    var dSes = new Date(dCur.getTime());
    WT.co_f = WT.vtid = WT.vtvs = WT.vt_f = WT.vt_f_a = WT.vt_f_s = WT.vt_f_d = WT.vt_f_tlh = WT.vt_f_tlv = "";
    if (document.cookie.indexOf(name + "=") == -1) {
        if ((typeof (gWtId) != "undefined") && (gWtId != "")) {
            WT.co_f = gWtId;
        }
        else if ((typeof (gTempWtId) != "undefined") && (gTempWtId != "")) {
            WT.co_f = gTempWtId;
            WT.vt_f = "1";
        }
        else {
            WT.co_f = "2";
            var curt = dCur.getTime().toString();
            for (var i = 2; i <= (32 - curt.length); i++) {
                WT.co_f += Math.floor(Math.random() * 16.0).toString(16);
            }
            WT.co_f += curt;
            WT.vt_f = "1";
        }
        if (typeof (gWtAccountRollup) == "undefined") {
            WT.vt_f_a = "1";
        }
        WT.vt_f_s = WT.vt_f_d = "1";
        WT.vt_f_tlh = WT.vt_f_tlv = "0";
    }
    else {
        var c = this.dcsGetCookie(name);
        var id = this.dcsGetIdCrumb(c, "id");
        var lv = parseInt(this.dcsGetCrumb(c, "lv"));
        var ss = parseInt(this.dcsGetCrumb(c, "ss"));
        if ((id == null) || (id == "null") || isNaN(lv) || isNaN(ss)) {
            return;
        }
        WT.co_f = id;
        var dLst = new Date(lv);
        WT.vt_f_tlh = Math.floor((dLst.getTime() - adj) / 1000);
        dSes.setTime(ss);
        if ((dCur.getTime() > (dLst.getTime() + 1800000)) || (dCur.getTime() > (dSes.getTime() + 28800000))) {
            WT.vt_f_tlv = Math.floor((dSes.getTime() - adj) / 1000);
            dSes.setTime(dCur.getTime());
            WT.vt_f_s = "1";
        }
        if ((dCur.getDay() != dLst.getDay()) || (dCur.getMonth() != dLst.getMonth()) || (dCur.getYear() != dLst.getYear())) {
            WT.vt_f_d = "1";
        }
    }
    WT.co_f = escape(WT.co_f);
    WT.vtid = (typeof (this.vtid) == "undefined") ? WT.co_f : (this.vtid || "");
    WT.vtvs = (dSes.getTime() - adj).toString();
    var expiry = "; expires=" + dExp.toGMTString();
    var cur = dCur.getTime().toString();
    var ses = dSes.getTime().toString();
    document.cookie = name + "=" + "id=" + WT.co_f + ":lv=" + cur + ":ss=" + ses + expiry + "; path=/" + (((this.fpcdom != "")) ? ("; domain=" + this.fpcdom) : (""));
    var rc = this.dcsIsFpcSet(name, WT.co_f, cur, ses);
    if (rc != 0) {
        WT.co_f = WT.vtvs = WT.vt_f_s = WT.vt_f_d = WT.vt_f_tlh = WT.vt_f_tlv = "";
        if (typeof (this.vtid) == "undefined") {
            WT.vtid = "";
        }
        WT.vt_f = WT.vt_f_a = rc;
    }
}
// Code section for Assign your query parameters to WebTrends query parameters. You will also need to configure the tag to recognize your query parameters.
WebTrends.prototype.dcsQP = function(N) {
    if (typeof (N) == "undefined") {
        return "";
    }
    var qry = location.search.substring(1);
    if (qry != "") {
        var pairs = qry.split("&");
        for (var i = 0; i < pairs.length; i++) {
            var pos = pairs[i].indexOf("=");
            if (pos != -1) {
                if (pairs[i].substring(0, pos) == N) {
                    this.qp[this.qp.length] = (i == 0 ? "" : "&") + pairs[i];
                    return pairs[i].substring(pos + 1);
                }
            }
        }
    }
    return "";
}
WebTrends.prototype.dcsIsOnsite = function(host) {
    if (host.length > 0) {
        host = host.toLowerCase();
        if (host == window.location.hostname.toLowerCase()) {
            return true;
        }
        if (typeof (this.onsitedoms.test) == "function") {
            return this.onsitedoms.test(host);
        }
        else if (this.onsitedoms.length > 0) {
            var doms = this.dcsSplit(this.onsitedoms);
            var len = doms.length;
            for (var i = 0; i < len; i++) {
                if (host == doms[i]) {
                    return true;
                }
            }
        }
    }
    return false;
}
WebTrends.prototype.dcsTypeMatch = function(pth, typelist) {
    var type = pth.toLowerCase().substring(pth.lastIndexOf(".") + 1, pth.length);
    var types = this.dcsSplit(typelist);
    var tlen = types.length;
    for (var i = 0; i < tlen; i++) {
        if (type == types[i]) {
            return true;
        }
    }
    return false;
}
WebTrends.prototype.dcsEvt = function(evt, tag) {
    var e = evt.target || evt.srcElement;
    while (e.tagName && (e.tagName.toLowerCase() != tag.toLowerCase())) {
        e = e.parentElement || e.parentNode;
    }
    return e;
}
WebTrends.prototype.dcsNavigation = function(evt) {
    var id = "";
    var cname = "";
    var elems = this.dcsSplit(this.navigationtag);
    var elen = elems.length;
    var i, e, elem;
    for (i = 0; i < elen; i++) {
        elem = elems[i];
        if (elem.length) {
            e = this.dcsEvt(evt, elem);
            id = (e.getAttribute && e.getAttribute("id")) ? e.getAttribute("id") : "";
            cname = e.className || "";
            if (id.length || cname.length) {
                break;
            }
        }
    }
    return id.length ? id : cname;
}
WebTrends.prototype.dcsBind = function(event, func) {
    if ((typeof (func) == "function") && document.body) {
        if (document.body.addEventListener) {
            document.body.addEventListener(event, func.wtbind(this), true);
        }
        else if (document.body.attachEvent) {
            document.body.attachEvent("on" + event, func.wtbind(this));
        }
    }
}
WebTrends.prototype.dcsET = function() {
    var e = (navigator.appVersion.indexOf("MSIE") != -1) ? "click" : "mousedown";
    this.dcsBind(e, this.dcsDownload);
    this.dcsBind(e, this.dcsJavaScript);
    this.dcsBind(e, this.dcsMailTo);
    this.dcsBind(e, this.dcsFormButton);
    this.dcsBind(e, this.dcsAnchor);
    this.dcsBind("contextmenu", this.dcsRightClick);
    this.dcsBind(e, this.dcsImageMap);
}
WebTrends.prototype.dcsMultiTrack = function() {
    var args = dcsMultiTrack.arguments ? dcsMultiTrack.arguments : arguments;
    if (args.length % 2 == 0) {
        this.dcsSetProps(args);
        var dCurrent = new Date();
        this.DCS.dcsdat = dCurrent.getTime();
        this.dcsFPC();
        this.dcsTag();
    }
}
WebTrends.prototype.dcsCleanUp = function() {
    this.DCS = {};
    this.WT = {};
    this.DCSext = {};
    if (arguments.length % 2 == 0) {
        this.dcsSetProps(arguments);
    }
}
WebTrends.prototype.dcsSetProps = function(args) {
    for (var i = 0; i < args.length; i += 2) {
        if (args[i].indexOf('WT.') == 0) {
            this.WT[args[i].substring(3)] = args[i + 1];
        }
        else if (args[i].indexOf('DCS.') == 0) {
            this.DCS[args[i].substring(4)] = args[i + 1];
        }
        else if (args[i].indexOf('DCSext.') == 0) {
            this.DCSext[args[i].substring(7)] = args[i + 1];
        }
    }
}
WebTrends.prototype.dcsSplit = function(list) {
    var items = list.toLowerCase().split(",");
    var len = items.length;
    for (var i = 0; i < len; i++) {
        items[i] = items[i].replace(/^\s*/, "").replace(/\s*$/, "");
    }
    return items;
}
// Code section for Track clicks to download links.
WebTrends.prototype.dcsDownload = function(evt) {
    evt = evt || (window.event || "");
    if (evt && ((typeof (evt.which) != "number") || (evt.which == 1))) {
        var e = this.dcsEvt(evt, "A");
        if (e.href) {
            var hn = e.hostname ? (e.hostname.split(":")[0]) : "";
            if (this.dcsIsOnsite(hn) && this.dcsTypeMatch(e.pathname, this.downloadtypes)) {
                var qry = e.search ? e.search.substring(e.search.indexOf("?") + 1, e.search.length) : "";
                var pth = e.pathname ? ((e.pathname.indexOf("/") != 0) ? "/" + e.pathname : e.pathname) : "/";
                var ttl = "";
                var text = document.all ? e.innerText : e.text;
                var img = this.dcsEvt(evt, "IMG");
                if (img.alt) {
                    ttl = img.alt;
                }
                else if (text) {
                    ttl = text;
                }
                else if (e.innerHTML) {
                    ttl = e.innerHTML;
                }
                this.dcsMultiTrack("DCS.dcssip", hn, "DCS.dcsuri", pth, "DCS.dcsqry", e.search || "", "WT.ti", "Download:" + ttl, "WT.dl", "20", "WT.nv", this.dcsNavigation(evt));
                this.DCS.dcssip = this.DCS.dcsuri = this.DCS.dcsqry = this.WT.ti = this.WT.dl = this.WT.nv = "";
            }
        }
    }
}
// Code section for Track right clicks to download links.
WebTrends.prototype.dcsRightClick = function(evt) {
    evt = evt || (window.event || "");
    if (evt) {
        var btn = evt.which || evt.button;
        if ((btn != 1) || (navigator.userAgent.indexOf("Safari") != -1)) {
            var e = this.dcsEvt(evt, "A");
            if ((typeof (e.href) != "undefined") && e.href) {
                if ((typeof (e.protocol) != "undefined") && e.protocol && (e.protocol.indexOf("http") != -1)) {
                    if ((typeof (e.pathname) != "undefined") && this.dcsTypeMatch(e.pathname, this.downloadtypes)) {
                        var pth = e.pathname ? ((e.pathname.indexOf("/") != 0) ? "/" + e.pathname : e.pathname) : "/";
                        var hn = e.hostname ? (e.hostname.split(":")[0]) : "";
                        this.dcsMultiTrack("DCS.dcssip", hn, "DCS.dcsuri", pth, "DCS.dcsqry", "", "WT.ti", "RightClick:" + pth, "WT.dl", "25");
                        this.DCS.dcssip = this.DCS.dcsuri = this.WT.ti = this.WT.dl = this.WT.nv = "";
                    }
                }
            }
        }
    }
}
// Code section for Track clicks to MailTo links.
WebTrends.prototype.dcsMailTo = function(evt) {
    evt = evt || (window.event || "");
    if (evt && ((typeof (evt.which) != "number") || (evt.which == 1))) {
        var e = this.dcsEvt(evt, "A");
        if (e.href && e.protocol) {
            var qry = e.search ? e.search.substring(e.search.indexOf("?") + 1, e.search.length) : "";
            if (e.protocol.toLowerCase() == "mailto:") {
                this.dcsMultiTrack("DCS.dcssip", "", "DCS.dcsuri", e.href, "WT.ti", "MailTo:" + e.innerHTML, "WT.dl", "23", "WT.nv", this.dcsNavigation(evt));
                this.DCS.dcssip = this.DCS.dcsuri = this.WT.ti = this.WT.dl = this.WT.nv = "";
            }
        }
    }
}
// Code section for Track clicks to JavaScript links.
WebTrends.prototype.dcsJavaScript = function(evt) {
    evt = evt || (window.event || "");
    if (evt && ((typeof (evt.which) != "number") || (evt.which == 1))) {
        var e = this.dcsEvt(evt, "A");
        if (e.href && e.protocol) {
            var qry = e.search ? e.search.substring(e.search.indexOf("?") + 1, e.search.length) : "";
            if (e.protocol.toLowerCase() == "javascript:") {
                this.dcsMultiTrack("DCS.dcssip", "", "DCS.dcsuri", e.href, "WT.ti", "JavaScript:" + e.innerHTML, "WT.dl", "22", "WT.nv", this.dcsNavigation(evt));
                this.DCS.dcssip = this.DCS.dcsuri = this.WT.ti = this.WT.cl = this.WT.nv = "";
            }
        }
    }
}
// Code section for Track form button clicks.
WebTrends.prototype.dcsFormButton = function(evt) {
    evt = evt || (window.event || "");
    if (evt && ((typeof (evt.which) != "number") || (evt.which == 1))) {
        var tags = ["INPUT", "BUTTON"];
        for (var j = 0; j < tags.length; j++) {
            var e = this.dcsEvt(evt, tags[j]);
            var type = e.type || "";
            if (type && ((type == "submit") || (type == "image") || (type == "button") || (type == "reset")) || ((type == "text") && ((evt.which || evt.keyCode) == 13))) {
                var uri = "";
                var ttl = "";
                var id = 0;
                if (e.form) {
                    // begin: field capture
                    // end: field capture
                    uri = e.form.action || window.location.pathname;
                    ttl = e.form.id || e.form.name || e.form.className || "Unknown";
                    id = (e.form.method && (e.form.method.toLowerCase() == "post")) ? "27" : "26";
                }
                else {
                    uri = window.location.pathname;
                    ttl = e.name || e.id || "Unknown";
                    id = (tags[j].toLowerCase() == "input") ? "28" : "29";
                }
                if (uri && ttl && (evt.keyCode != 9)) {
                    this.dcsMultiTrack("DCS.dcsuri", uri, "WT.ti", "FormButton:" + ttl, "WT.dl", id, "WT.nv", this.dcsNavigation(evt));
                }
                this.DCS.dcsuri = this.WT.ti = this.WT.dl = this.WT.nv = "";
                break;
            }
        }
    }
}
// Code section for Track clicks to links that contain anchors.
WebTrends.prototype.dcsAnchor = function(evt) {
    evt = evt || (window.event || "");
    if (evt && ((typeof (evt.which) != "number") || (evt.which == 1))) {
        var e = this.dcsEvt(evt, "A");
        if (e.href) {
            var hn = e.hostname ? (e.hostname.split(":")[0]) : "";
            if (this.dcsIsOnsite(hn) && e.hash && (e.hash != "") && (e.hash != "#")) {
                var qry = e.search ? e.search.substring(e.search.indexOf("?") + 1, e.search.length) : "";
                var pth = e.pathname ? ((e.pathname.indexOf("/") != 0) ? "/" + e.pathname : e.pathname) : "/";
                this.dcsMultiTrack("DCS.dcssip", hn, "DCS.dcsuri", pth + e.hash, "WT.ti", "Anchor:" + e.hash, "WT.dl", "21", "WT.nv", this.dcsNavigation(evt));
                this.DCS.dcssip = this.DCS.dcsuri = this.WT.ti = this.WT.dl = this.WT.nv = "";
            }
        }
    }
}
// Code section for clicks to image maps.
WebTrends.prototype.dcsImageMap = function(evt) {
    evt = evt || (window.event || "");
    if (evt) {
        var e = this.dcsEvt(evt, "AREA");
        if (e.href) {
            var hn = e.hostname ? (e.hostname.split(":")[0]) : "";
            if ((hn != "") && e.protocol && (e.protocol.indexOf("http") != -1)) {
                var ttl = "";
                var map = this.dcsEvt(evt, "MAP");
                if (map) {
                    if (map.name) {
                        ttl = map.name;
                    }
                    else if (map.id) {
                        ttl = map.id;
                    }
                }
                var pth = e.pathname ? ((e.pathname.indexOf("/") != 0) ? "/" + e.pathname : e.pathname) : "/";
                this.dcsMultiTrack("DCS.dcssip", hn, "DCS.dcsuri", pth, "DCS.dcsqry", e.search || "", "WT.ti", "ImageMap:" + ttl, "WT.dl", "30", "WT.nv", this.dcsNavigation(evt));
                this.DCS.dcssip = this.DCS.dcsuri = this.DCS.dcsqry = this.WT.ti = this.WT.dl = this.WT.nv = "";
            }
        }
    }
}
WebTrends.prototype.dcsAdv = function() {
    if (this.trackevents && (typeof (this.dcsET) == "function")) {
        if (window.addEventListener) {
            window.addEventListener("load", this.dcsET.wtbind(this), false);
        }
        else if (window.attachEvent) {
            window.attachEvent("onload", this.dcsET.wtbind(this));
        }
    }
    this.dcsFPC();
}
WebTrends.prototype.dcsVar = function() {
    var dCurrent = new Date();
    var WT = this.WT;
    var DCS = this.DCS;
    WT.tz = parseInt(dCurrent.getTimezoneOffset() / 60 * -1) || "0";
    WT.bh = dCurrent.getHours() || "0";
    WT.ul = navigator.appName == "Netscape" ? navigator.language : navigator.userLanguage;
    if (typeof (screen) == "object") {
        WT.cd = navigator.appName == "Netscape" ? screen.pixelDepth : screen.colorDepth;
        WT.sr = screen.width + "x" + screen.height;
    }
    if (typeof (navigator.javaEnabled()) == "boolean") {
        WT.jo = navigator.javaEnabled() ? "Yes" : "No";
    }
    if (document.title) {
        if (window.RegExp) {
            var tire = new RegExp("^" + window.location.protocol + "//" + window.location.hostname + "\\s-\\s");
            WT.ti = document.title.replace(tire, "");
        }
        else {
            WT.ti = document.title;
        }
    }
    WT.js = "Yes";
    WT.jv = (function() {
        var agt = navigator.userAgent.toLowerCase();
        var major = parseInt(navigator.appVersion);
        var mac = (agt.indexOf("mac") != -1);
        var ff = (agt.indexOf("firefox") != -1);
        var ff0 = (agt.indexOf("firefox/0.") != -1);
        var ff10 = (agt.indexOf("firefox/1.0") != -1);
        var ff15 = (agt.indexOf("firefox/1.5") != -1);
        var ff20 = (agt.indexOf("firefox/2.0") != -1);
        var ff3up = (ff && !ff0 && !ff10 & !ff15 & !ff20);
        var nn = (!ff && (agt.indexOf("mozilla") != -1) && (agt.indexOf("compatible") == -1));
        var nn4 = (nn && (major == 4));
        var nn6up = (nn && (major >= 5));
        var ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
        var ie4 = (ie && (major == 4) && (agt.indexOf("msie 4") != -1));
        var ie5up = (ie && !ie4);
        var op = (agt.indexOf("opera") != -1);
        var op5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
        var op6 = (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1);
        var op7up = (op && !op5 && !op6);
        var jv = "1.1";
        if (ff3up) {
            jv = "1.8";
        }
        else if (ff20) {
            jv = "1.7";
        }
        else if (ff15) {
            jv = "1.6";
        }
        else if (ff0 || ff10 || nn6up || op7up) {
            jv = "1.5";
        }
        else if ((mac && ie5up) || op6) {
            jv = "1.4";
        }
        else if (ie5up || nn4 || op5) {
            jv = "1.3";
        }
        else if (ie4) {
            jv = "1.2";
        }
        return jv;
    })();
    WT.ct = "unknown";
    if (document.body && document.body.addBehavior) {
        try {
            document.body.addBehavior("#default#clientCaps");
            WT.ct = document.body.connectionType || "unknown";
            document.body.addBehavior("#default#homePage");
            WT.hp = document.body.isHomePage(location.href) ? "1" : "0";
        }
        catch (e) {
        }
    }
    if (document.all) {
        WT.bs = document.body ? document.body.offsetWidth + "x" + document.body.offsetHeight : "unknown";
    }
    else {
        WT.bs = window.innerWidth + "x" + window.innerHeight;
    }
    WT.fv = (function() {
        var i, flash;
        if (window.ActiveXObject) {
            for (i = 10; i > 0; i--) {
                try {
                    flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
                    return i + ".0";
                }
                catch (e) {
                }
            }
        }
        else if (navigator.plugins && navigator.plugins.length) {
            for (i = 0; i < navigator.plugins.length; i++) {
                if (navigator.plugins[i].name.indexOf('Shockwave Flash') != -1) {
                    return navigator.plugins[i].description.split(" ")[2];
                }
            }
        }
        return "Not enabled";
    })();
    WT.slv = (function() {
        var slv = "Not enabled";
        try {
            if (navigator.userAgent.indexOf('MSIE') != -1) {
                var sli = new ActiveXObject('AgControl.AgControl');
                if (sli) {
                    slv = "Unknown";
                }
            }
            else if (navigator.plugins["Silverlight Plug-In"]) {
                slv = "Unknown";
            }
        }
        catch (e) {
        }
        if (slv != "Not enabled") {
            var i, j, v;
            if ((typeof (Silverlight) == "object") && (typeof (Silverlight.isInstalled) == "function")) {
                for (i = 3; i > 0; i--) {
                    for (j = 9; j >= 0; j--) {
                        v = i + "." + j;
                        if (Silverlight.isInstalled(v)) {
                            slv = v;
                            break;
                        }
                    }
                    if (slv == v) {
                        break;
                    }
                }
            }
        }
        return slv;
    })();
    if (this.i18n) {
        if (typeof (document.defaultCharset) == "string") {
            WT.le = document.defaultCharset;
        }
        else if (typeof (document.characterSet) == "string") {
            WT.le = document.characterSet;
        }
        else {
            WT.le = "unknown";
        }
    }
    WT.tv = "8.6.2";
    //	WT.sp="@@SPLITVALUE@@";
    WT.dl = "0";
    WT.ssl = (window.location.protocol.indexOf('https:') == 0) ? "1" : "0";
    DCS.dcsdat = dCurrent.getTime();
    DCS.dcssip = window.location.hostname;
    DCS.dcsuri = window.location.pathname;
    WT.es = DCS.dcssip + DCS.dcsuri;
    if (window.location.search) {
        DCS.dcsqry = window.location.search;
        if (this.qp.length > 0) {
            for (var i = 0; i < this.qp.length; i++) {
                var pos = DCS.dcsqry.indexOf(this.qp[i]);
                if (pos != -1) {
                    var front = DCS.dcsqry.substring(0, pos);
                    var end = DCS.dcsqry.substring(pos + this.qp[i].length, DCS.dcsqry.length);
                    DCS.dcsqry = front + end;
                }
            }
        }
    }
    if (DCS.dcsqry) {
        var dcsqry = DCS.dcsqry.toLowerCase();
        var params = this.paidsearchparams.length ? this.paidsearchparams.toLowerCase().split(",") : [];
        for (var i = 0; i < params.length; i++) {
            if (dcsqry.indexOf(params[i] + "=") != -1) {
                WT.srch = "1";
                break;
            }
        }
    }
    if ((window.document.referrer != "") && (window.document.referrer != "-")) {
        if (!(navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) < 4)) {
            DCS.dcsref = window.document.referrer;
        }
    }
}
WebTrends.prototype.dcsEscape = function(S, REL) {
    if (REL != "") {
        S = S.toString();
        for (var R in REL) {
            if (REL[R] instanceof RegExp) {
                S = S.replace(REL[R], R);
            }
        }
        return S;
    }
    else {
        return escape(S);
    }
}
WebTrends.prototype.dcsA = function(N, V) {
    if (this.i18n && (this.exre != "") && !this.exre.test(N)) {
        if (N == "dcsqry") {
            var newV = "";
            var params = V.substring(1).split("&");
            for (var i = 0; i < params.length; i++) {
                var pair = params[i];
                var pos = pair.indexOf("=");
                if (pos != -1) {
                    var key = pair.substring(0, pos);
                    var val = pair.substring(pos + 1);
                    if (i != 0) {
                        newV += "&";
                    }
                    newV += key + "=" + this.dcsEncode(val);
                }
            }
            V = V.substring(0, 1) + newV;
        }
        else {
            V = this.dcsEncode(V);
        }
    }
    return "&" + N + "=" + this.dcsEscape(V, this.re);
}
WebTrends.prototype.dcsEncode = function(S) {
    return (typeof (encodeURIComponent) == "function") ? encodeURIComponent(S) : escape(S);
}
WebTrends.prototype.dcsCreateImage = function(dcsSrc) {
    if (document.images) {
        this.images[this.index] = new Image();
        this.images[this.index].src = dcsSrc;
        this.index++;
    }
    else {
        document.write('<IMG ALT="" BORDER="0" NAME="DCSIMG" WIDTH="1" HEIGHT="1" SRC="' + dcsSrc + '">');
    }
}
WebTrends.prototype.dcsMeta = function() {
    var elems;
    if (document.all) {
        elems = document.all.tags("meta");
    }
    else if (document.documentElement) {
        elems = document.getElementsByTagName("meta");
    }
    if (typeof (elems) != "undefined") {
        var length = elems.length;
        for (var i = 0; i < length; i++) {
            var name = elems.item(i).name;
            var content = elems.item(i).content;
            var equiv = elems.item(i).httpEquiv;
            if (name.length > 0) {
                if (name.toUpperCase().indexOf("WT.") == 0) {
                    this.WT[name.substring(3)] = content;
                }
                else if (name.toUpperCase().indexOf("DCSEXT.") == 0) {
                    this.DCSext[name.substring(7)] = content;
                }
                else if (name.toUpperCase().indexOf("DCS.") == 0) {
                    this.DCS[name.substring(4)] = content;
                }
            }
        }
    }
}
WebTrends.prototype.dcsTag = function() {
    if (document.cookie.indexOf("WTLOPTOUT=") != -1) {
        return;
    }
    var WT = this.WT;
    var DCS = this.DCS;
    var DCSext = this.DCSext;
    var i18n = this.i18n;
    var P = "http" + (window.location.protocol.indexOf('https:') == 0 ? 's' : '') + "://" + this.domain + (this.dcsid == "" ? '' : '/' + this.dcsid) + "/dcs.gif?";
    if (i18n) {
        WT.dep = "";
    }
    for (var N in DCS) {
        if (DCS[N] && (typeof DCS[N] != "function")) {
            P += this.dcsA(N, DCS[N]);
        }
    }
    var keys = ["co_f", "vtid", "vtvs", "vt_f_tlv"];
    for (var i = 0; i < keys.length; i++) {
        var key = keys[i];
        if (WT[key]) {
            P += this.dcsA("WT." + key, WT[key]);
            delete WT[key];
        }
    }
    for (N in WT) {
        if (WT[N] && (typeof WT[N] != "function")) {
            P += this.dcsA("WT." + N, WT[N]);
        }
    }
    for (N in DCSext) {
        if (DCSext[N] && (typeof DCSext[N] != "function")) {
            if (i18n) {
                WT.dep = (WT.dep.length == 0) ? N : (WT.dep + ";" + N);
            }
            P += this.dcsA(N, DCSext[N]);
        }
    }
    if (i18n && (WT.dep.length > 0)) {
        P += this.dcsA("WT.dep", WT.dep);
    }
    if (P.length > 2048 && navigator.userAgent.indexOf('MSIE') >= 0) {
        P = P.substring(0, 2040) + "&WT.tu=1";
    }
    this.dcsCreateImage(P);
    this.WT.ad = "";
}
WebTrends.prototype.dcsDebug = function() {
    var t = this;
    var i = t.images[0].src;
    var q = i.indexOf("?");
    var r = i.substring(0, q).split("/");
    var m = "<b>Protocol</b><br><code>" + r[0] + "<br></code>";
    m += "<b>Domain</b><br><code>" + r[2] + "<br></code>";
    m += "<b>Path</b><br><code>/" + r[3] + "/" + r[4] + "<br></code>";
    m += "<b>Query Params</b><code>" + i.substring(q + 1).replace(/\&/g, "<br>") + "</code>";
    m += "<br><b>Cookies</b><br><code>" + document.cookie.replace(/\;/g, "<br>") + "</code>";
    if (t.w && !t.w.closed) {
        t.w.close();
    }
    t.w = window.open("", "dcsDebug", "width=500,height=650,scrollbars=yes,resizable=yes");
    t.w.document.write(m);
    t.w.focus();
}
WebTrends.prototype.dcsCollect = function() {
    if (this.enabled) {
        this.dcsVar();
        this.dcsMeta();
        this.dcsAdv();
        this.dcsTag();
    }
}

function dcsMultiTrack() {
    if (typeof (_tag) != "undefined") {
        return (_tag.dcsMultiTrack());
    }
}

function dcsDebug() {
    if (typeof (_tag) != "undefined") {
        return (_tag.dcsDebug());
    }
}

Function.prototype.wtbind = function(obj) {
    var method = this;
    var temp = function() {
        return method.apply(obj, arguments);
    };
    return temp;
}
/*EOF WEBTRENDS.JS*/
