﻿/* SimpleModal 1.3.3 - jQuery Plugin
* http://www.ericmmartin.com/projects/simplemodal/
* Copyright (c) 2009 Eric Martin (http://twitter.com/EricMMartin)
* Dual licensed under the MIT and GPL licenses
* Revision: $Id: jquery.simplemodal.js 228 2009-10-30 13:34:27Z emartin24 $ */
; (function($) { var ie6 = $.browser.msie && parseInt($.browser.version) == 6 && typeof window['XMLHttpRequest'] != "object", ieQuirks = null, w = []; $.modal = function(data, options) { return $.modal.impl.init(data, options); }; $.modal.close = function() { $.modal.impl.close(); }; $.fn.modal = function(options) { return $.modal.impl.init(this, options); }; $.modal.defaults = { appendTo: 'body', focus: true, opacity: 50, overlayId: 'simplemodal-overlay', overlayCss: {}, containerId: 'simplemodal-container', containerCss: {}, dataId: 'simplemodal-data', dataCss: {}, minHeight: 200, minWidth: 300, maxHeight: null, maxWidth: null, autoResize: false, autoPosition: true, zIndex: 1000, close: true, closeHTML: '<a class="modalCloseImg" title="Close"></a>', closeClass: 'simplemodal-close', escClose: true, overlayClose: false, position: null, persist: false, onOpen: null, onShow: null, onClose: null }; $.modal.impl = { o: null, d: {}, init: function(data, options) { var s = this; if (s.d.data) { return false; } ieQuirks = $.browser.msie && !$.boxModel; s.o = $.extend({}, $.modal.defaults, options); s.zIndex = s.o.zIndex; s.occb = false; if (typeof data == 'object') { data = data instanceof jQuery ? data : $(data); if (data.parent().parent().size() > 0) { s.d.parentNode = data.parent(); if (!s.o.persist) { s.d.orig = data.clone(true); } } } else if (typeof data == 'string' || typeof data == 'number') { data = $('<div></div>').html(data); } else { alert('SimpleModal Error: Unsupported data type: ' + typeof data); return s; } s.create(data); data = null; s.open(); if ($.isFunction(s.o.onShow)) { s.o.onShow.apply(s, [s.d]); } return s; }, create: function(data) { var s = this; w = s.getDimensions(); if (ie6) { s.d.iframe = $('<iframe src="javascript:false;"></iframe>').css($.extend(s.o.iframeCss, { display: 'none', opacity: 0, position: 'fixed', height: w[0], width: w[1], zIndex: s.o.zIndex, top: 0, left: 0 })).appendTo(s.o.appendTo); } s.d.overlay = $('<div></div>').attr('id', s.o.overlayId).addClass('simplemodal-overlay').css($.extend(s.o.overlayCss, { display: 'none', opacity: s.o.opacity / 100, height: w[0], width: w[1], position: 'fixed', left: 0, top: 0, zIndex: s.o.zIndex + 1 })).appendTo(s.o.appendTo); s.d.container = $('<div></div>').attr('id', s.o.containerId).addClass('simplemodal-container').css($.extend(s.o.containerCss, { display: 'none', position: 'fixed', zIndex: s.o.zIndex + 2 })).append(s.o.close && s.o.closeHTML ? $(s.o.closeHTML).addClass(s.o.closeClass) : '').appendTo(s.o.appendTo); s.d.wrap = $('<div></div>').attr('tabIndex', -1).addClass('simplemodal-wrap').css({ height: '100%', outline: 0, width: '100%' }).appendTo(s.d.container); s.d.data = data.attr('id', data.attr('id') || s.o.dataId).addClass('simplemodal-data').css($.extend(s.o.dataCss, { display: 'none' })).appendTo('body'); data = null; s.setContainerDimensions(); s.d.data.appendTo(s.d.wrap); if (ie6 || ieQuirks) { s.fixIE(); } }, bindEvents: function() { var s = this; $('.' + s.o.closeClass).bind('click.simplemodal', function(e) { e.preventDefault(); s.close(); }); if (s.o.close && s.o.overlayClose) { s.d.overlay.bind('click.simplemodal', function(e) { e.preventDefault(); s.close(); }); } $(document).bind('keydown.simplemodal', function(e) { if (s.o.focus && e.keyCode == 9) { s.watchTab(e); } else if ((s.o.close && s.o.escClose) && e.keyCode == 27) { e.preventDefault(); s.close(); } }); $(window).bind('resize.simplemodal', function() { w = s.getDimensions(); s.setContainerDimensions(true); if (ie6 || ieQuirks) { s.fixIE(); } else { s.d.iframe && s.d.iframe.css({ height: w[0], width: w[1] }); s.d.overlay.css({ height: w[0], width: w[1] }); } }); }, unbindEvents: function() { $('.' + this.o.closeClass).unbind('click.simplemodal'); $(document).unbind('keydown.simplemodal'); $(window).unbind('resize.simplemodal'); this.d.overlay.unbind('click.simplemodal'); }, fixIE: function() { var s = this, p = s.o.position; $.each([s.d.iframe || null, s.d.overlay, s.d.container], function(i, el) { if (el) { var bch = 'document.body.clientHeight', bcw = 'document.body.clientWidth', bsh = 'document.body.scrollHeight', bsl = 'document.body.scrollLeft', bst = 'document.body.scrollTop', bsw = 'document.body.scrollWidth', ch = 'document.documentElement.clientHeight', cw = 'document.documentElement.clientWidth', sl = 'document.documentElement.scrollLeft', st = 'document.documentElement.scrollTop', s = el[0].style; s.position = 'absolute'; if (i < 2) { s.removeExpression('height'); s.removeExpression('width'); s.setExpression('height', '' + bsh + ' > ' + bch + ' ? ' + bsh + ' : ' + bch + ' + "px"'); s.setExpression('width', '' + bsw + ' > ' + bcw + ' ? ' + bsw + ' : ' + bcw + ' + "px"'); } else { var te, le; if (p && p.constructor == Array) { var top = p[0] ? typeof p[0] == 'number' ? p[0].toString() : p[0].replace(/px/, '') : el.css('top').replace(/px/, ''); te = top.indexOf('%') == -1 ? top + ' + (t = ' + st + ' ? ' + st + ' : ' + bst + ') + "px"' : parseInt(top.replace(/%/, '')) + ' * ((' + ch + ' || ' + bch + ') / 100) + (t = ' + st + ' ? ' + st + ' : ' + bst + ') + "px"'; if (p[1]) { var left = typeof p[1] == 'number' ? p[1].toString() : p[1].replace(/px/, ''); le = left.indexOf('%') == -1 ? left + ' + (t = ' + sl + ' ? ' + sl + ' : ' + bsl + ') + "px"' : parseInt(left.replace(/%/, '')) + ' * ((' + cw + ' || ' + bcw + ') / 100) + (t = ' + sl + ' ? ' + sl + ' : ' + bsl + ') + "px"'; } } else { te = '(' + ch + ' || ' + bch + ') / 2 - (this.offsetHeight / 2) + (t = ' + st + ' ? ' + st + ' : ' + bst + ') + "px"'; le = '(' + cw + ' || ' + bcw + ') / 2 - (this.offsetWidth / 2) + (t = ' + sl + ' ? ' + sl + ' : ' + bsl + ') + "px"'; } s.removeExpression('top'); s.removeExpression('left'); s.setExpression('top', te); s.setExpression('left', le); } } }); }, focus: function(pos) { var s = this, p = pos || 'first'; var input = $(':input:enabled:visible:' + p, s.d.wrap); input.length > 0 ? input.focus() : s.d.wrap.focus(); }, getDimensions: function() { var el = $(window); var h = $.browser.opera && $.browser.version > '9.5' && $.fn.jquery <= '1.2.6' ? document.documentElement['clientHeight'] : $.browser.opera && $.browser.version < '9.5' && $.fn.jquery > '1.2.6' ? window.innerHeight : el.height(); return [h, el.width()]; }, getVal: function(v) { return v == 'auto' ? 0 : v.indexOf('%') > 0 ? v : parseInt(v.replace(/px/, '')); }, setContainerDimensions: function(resize) { var s = this; if (!resize || (resize && s.o.autoResize)) { var ch = s.getVal(s.d.container.css('height')), cw = s.getVal(s.d.container.css('width')), dh = s.d.data.outerHeight(true), dw = s.d.data.outerWidth(true); var mh = s.o.maxHeight && s.o.maxHeight < w[0] ? s.o.maxHeight : w[0], mw = s.o.maxWidth && s.o.maxWidth < w[1] ? s.o.maxWidth : w[1]; if (!ch) { if (!dh) { ch = s.o.minHeight; } else { if (dh > mh) { ch = mh; } else if (dh < s.o.minHeight) { ch = s.o.minHeight; } else { ch = dh; } } } else { ch = ch > mh ? mh : ch; } if (!cw) { if (!dw) { cw = s.o.minWidth; } else { if (dw > mw) { cw = mw; } else if (dw < s.o.minWidth) { cw = s.o.minWidth; } else { cw = dw; } } } else { cw = cw > mw ? mw : cw; } s.d.container.css({ height: ch, width: cw }); if (dh > ch || dw > cw) { s.d.wrap.css({ overflow: 'auto' }); } } if (s.o.autoPosition) { s.setPosition(); } }, setPosition: function() { var s = this, top, left, hc = (w[0] / 2) - (s.d.container.outerHeight(true) / 2), vc = (w[1] / 2) - (s.d.container.outerWidth(true) / 2); if (s.o.position && Object.prototype.toString.call(s.o.position) === "[object Array]") { top = s.o.position[0] || hc; left = s.o.position[1] || vc; } else { top = hc; left = vc; } s.d.container.css({ left: left, top: top }); }, watchTab: function(e) { var s = this; if ($(e.target).parents('.simplemodal-container').length > 0) { s.inputs = $(':input:enabled:visible:first, :input:enabled:visible:last', s.d.data[0]); if ((!e.shiftKey && e.target == s.inputs[s.inputs.length - 1]) || (e.shiftKey && e.target == s.inputs[0]) || s.inputs.length == 0) { e.preventDefault(); var pos = e.shiftKey ? 'last' : 'first'; setTimeout(function() { s.focus(pos); }, 10); } } else { e.preventDefault(); setTimeout(function() { s.focus(); }, 10); } }, open: function() { var s = this; s.d.iframe && s.d.iframe.show(); if ($.isFunction(s.o.onOpen)) { s.o.onOpen.apply(s, [s.d]); } else { s.d.overlay.show(); s.d.container.show(); s.d.data.show(); } s.focus(); s.bindEvents(); }, close: function() { var s = this; if (!s.d.data) { return false; } s.unbindEvents(); if ($.isFunction(s.o.onClose) && !s.occb) { s.occb = true; s.o.onClose.apply(s, [s.d]); } else { if (s.d.parentNode) { if (s.o.persist) { s.d.data.hide().appendTo(s.d.parentNode); } else { s.d.data.hide().remove(); s.d.orig.appendTo(s.d.parentNode); } } else { s.d.data.hide().remove(); } s.d.container.hide().remove(); s.d.overlay.hide().remove(); s.d.iframe && s.d.iframe.hide().remove(); s.d = {}; } } }; })(jQuery);

/* Masked Input plugin for jQuery
Copyright (c) 2007-2009 Josh Bush (digitalbush.com)
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) 
Version: 1.2.2 (03/09/2009 22:39:06) */
(function(a) { var c = (a.browser.msie ? "paste" : "input") + ".mask"; var b = (window.orientation != undefined); a.mask = { definitions: { "9": "[0-9]", a: "[A-Za-z]", "*": "[A-Za-z0-9]"} }; a.fn.extend({ caret: function(e, f) { if (this.length == 0) { return } if (typeof e == "number") { f = (typeof f == "number") ? f : e; return this.each(function() { if (this.setSelectionRange) { this.focus(); this.setSelectionRange(e, f) } else { if (this.createTextRange) { var g = this.createTextRange(); g.collapse(true); g.moveEnd("character", f); g.moveStart("character", e); g.select() } } }) } else { if (this[0].setSelectionRange) { e = this[0].selectionStart; f = this[0].selectionEnd } else { if (document.selection && document.selection.createRange) { var d = document.selection.createRange(); e = 0 - d.duplicate().moveStart("character", -100000); f = e + d.text.length } } return { begin: e, end: f} } }, unmask: function() { return this.trigger("unmask") }, mask: function(j, d) { if (!j && this.length > 0) { var f = a(this[0]); var g = f.data("tests"); return a.map(f.data("buffer"), function(l, m) { return g[m] ? l : null }).join("") } d = a.extend({ placeholder: "_", completed: null }, d); var k = a.mask.definitions; var g = []; var e = j.length; var i = null; var h = j.length; a.each(j.split(""), function(m, l) { if (l == "?") { h--; e = m } else { if (k[l]) { g.push(new RegExp(k[l])); if (i == null) { i = g.length - 1 } } else { g.push(null) } } }); return this.each(function() { var r = a(this); var m = a.map(j.split(""), function(x, y) { if (x != "?") { return k[x] ? d.placeholder : x } }); var n = false; var q = r.val(); r.data("buffer", m).data("tests", g); function v(x) { while (++x <= h && !g[x]) { } return x } function t(x) { while (!g[x] && --x >= 0) { } for (var y = x; y < h; y++) { if (g[y]) { m[y] = d.placeholder; var z = v(y); if (z < h && g[y].test(m[z])) { m[y] = m[z] } else { break } } } s(); r.caret(Math.max(i, x)) } function u(y) { for (var A = y, z = d.placeholder; A < h; A++) { if (g[A]) { var B = v(A); var x = m[A]; m[A] = z; if (B < h && g[B].test(x)) { z = x } else { break } } } } function l(y) { var x = a(this).caret(); var z = y.keyCode; n = (z < 16 || (z > 16 && z < 32) || (z > 32 && z < 41)); if ((x.begin - x.end) != 0 && (!n || z == 8 || z == 46)) { w(x.begin, x.end) } if (z == 8 || z == 46 || (b && z == 127)) { t(x.begin + (z == 46 ? 0 : -1)); return false } else { if (z == 27) { r.val(q); r.caret(0, p()); return false } } } function o(B) { if (n) { n = false; return (B.keyCode == 8) ? false : null } B = B || window.event; var C = B.charCode || B.keyCode || B.which; var z = a(this).caret(); if (B.ctrlKey || B.altKey || B.metaKey) { return true } else { if ((C >= 32 && C <= 125) || C > 186) { var x = v(z.begin - 1); if (x < h) { var A = String.fromCharCode(C); if (g[x].test(A)) { u(x); m[x] = A; s(); var y = v(x); a(this).caret(y); if (d.completed && y == h) { d.completed.call(r) } } } } } return false } function w(x, y) { for (var z = x; z < y && z < h; z++) { if (g[z]) { m[z] = d.placeholder } } } function s() { return r.val(m.join("")).val() } function p(y) { var z = r.val(); var C = -1; for (var B = 0, x = 0; B < h; B++) { if (g[B]) { m[B] = d.placeholder; while (x++ < z.length) { var A = z.charAt(x - 1); if (g[B].test(A)) { m[B] = A; C = B; break } } if (x > z.length) { break } } else { if (m[B] == z[x] && B != e) { x++; C = B } } } if (!y && C + 1 < e) { r.val(""); w(0, h) } else { if (y || C + 1 >= e) { s(); if (!y) { r.val(r.val().substring(0, C + 1)) } } } return (e ? B : i) } if (!r.attr("readonly")) { r.one("unmask", function() { r.unbind(".mask").removeData("buffer").removeData("tests") }).bind("focus.mask", function() { q = r.val(); var x = p(); s(); setTimeout(function() { if (x == j.length) { r.caret(0, x) } else { r.caret(x) } }, 0) }).bind("blur.mask", function() { p(); if (r.val() != q) { r.change() } }).bind("keydown.mask", l).bind("keypress.mask", o).bind(c, function() { setTimeout(function() { r.caret(p(true)) }, 0) }) } p() }) } }) })(jQuery);


/** SWFAddress 2.4: Deep linking for Flash and Ajax <http://www.asual.com/swfaddress/> * SWFAddress is (c) 2006-2009 Rostislav Hristov and contributors * This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> */
if (typeof asual == "undefined") { var asual = {} } if (typeof asual.util == "undefined") { asual.util = {} } asual.util.Browser = new function() { var b = navigator.userAgent.toLowerCase(), a = /webkit/.test(b), e = /opera/.test(b), c = /msie/.test(b) && !/opera/.test(b), d = /mozilla/.test(b) && !/(compatible|webkit)/.test(b), f = parseFloat(c ? b.substr(b.indexOf("msie") + 4) : (b.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [0, "0"])[1]); this.toString = function() { return "[class Browser]" }; this.getVersion = function() { return f }; this.isMSIE = function() { return c }; this.isSafari = function() { return a }; this.isOpera = function() { return e }; this.isMozilla = function() { return d } }; asual.util.Events = new function() { var c = "DOMContentLoaded", j = "onstop", k = window, h = document, b = [], a = asual.util, e = a.Browser, d = e.isMSIE(), g = e.isSafari(); this.toString = function() { return "[class Events]" }; this.addListener = function(n, l, m) { b.push({ o: n, t: l, l: m }); if (!(l == c && (d || g))) { if (n.addEventListener) { n.addEventListener(l, m, false) } else { if (n.attachEvent) { n.attachEvent("on" + l, m) } } } }; this.removeListener = function(p, m, n) { for (var l = 0, o; o = b[l]; l++) { if (o.o == p && o.t == m && o.l == n) { b.splice(l, 1); break } } if (!(m == c && (d || g))) { if (p.removeEventListener) { p.removeEventListener(m, n, false) } else { if (p.detachEvent) { p.detachEvent("on" + m, n) } } } }; var i = function() { for (var m = 0, l; l = b[m]; m++) { if (l.t != c) { a.Events.removeListener(l.o, l.t, l.l) } } }; var f = function() { if (h.readyState == "interactive") { function l() { h.detachEvent(j, l); i() } h.attachEvent(j, l); k.setTimeout(function() { h.detachEvent(j, l) }, 0) } }; if (d || g) { (function() { try { if ((d && h.body) || !/loaded|complete/.test(h.readyState)) { h.documentElement.doScroll("left") } } catch (m) { return setTimeout(arguments.callee, 0) } for (var l = 0, m; m = b[l]; l++) { if (m.t == c) { m.l.call(null) } } })() } if (d) { k.attachEvent("onbeforeunload", f) } this.addListener(k, "unload", i) }; asual.util.Functions = new function() { this.toString = function() { return "[class Functions]" }; this.bind = function(f, b, e) { for (var c = 2, d, a = []; d = arguments[c]; c++) { a.push(d) } return function() { return f.apply(b, a) } } }; var SWFAddressEvent = function(d) { this.toString = function() { return "[object SWFAddressEvent]" }; this.type = d; this.target = [SWFAddress][0]; this.value = SWFAddress.getValue(); this.path = SWFAddress.getPath(); this.pathNames = SWFAddress.getPathNames(); this.parameters = {}; var c = SWFAddress.getParameterNames(); for (var b = 0, a = c.length; b < a; b++) { this.parameters[c[b]] = SWFAddress.getParameter(c[b]) } this.parameterNames = c }; SWFAddressEvent.INIT = "init"; SWFAddressEvent.CHANGE = "change"; SWFAddressEvent.INTERNAL_CHANGE = "internalChange"; SWFAddressEvent.EXTERNAL_CHANGE = "externalChange"; var SWFAddress = new function() { var _getHash = function() { var index = _l.href.indexOf("#"); return index != -1 ? _ec(_dc(_l.href.substr(index + 1))) : "" }; var _getWindow = function() { try { top.document; return top } catch (e) { return window } }; var _strictCheck = function(value, force) { if (_opts.strict) { value = force ? (value.substr(0, 1) != "/" ? "/" + value : value) : (value == "" ? "/" : value) } return value }; var _ieLocal = function(value, direction) { return (_msie && _l.protocol == "file:") ? (direction ? _value.replace(/\?/, "%3F") : _value.replace(/%253F/, "?")) : value }; var _searchScript = function(el) { if (el.childNodes) { for (var i = 0, l = el.childNodes.length, s; i < l; i++) { if (el.childNodes[i].src) { _url = String(el.childNodes[i].src) } if (s = _searchScript(el.childNodes[i])) { return s } } } }; var _titleCheck = function() { if (_d.title != _title && _d.title.indexOf("#") != -1) { _d.title = _title } }; var _listen = function() { if (!_silent) { var hash = _getHash(); var diff = !(_value == hash); if (_safari && _version < 523) { if (_length != _h.length) { _length = _h.length; if (typeof _stack[_length - 1] != UNDEFINED) { _value = _stack[_length - 1] } _update.call(this, false) } } else { if (_msie && diff) { if (_version < 7) { _l.reload() } else { this.setValue(hash) } } else { if (diff) { _value = hash; _update.call(this, false) } } } if (_msie) { _titleCheck.call(this) } } }; var _bodyClick = function(e) { if (_popup.length > 0) { var popup = window.open(_popup[0], _popup[1], eval(_popup[2])); if (typeof _popup[3] != UNDEFINED) { eval(_popup[3]) } } _popup = [] }; var _swfChange = function() { for (var i = 0, id, obj, value = SWFAddress.getValue(), setter = "setSWFAddressValue"; id = _ids[i]; i++) { obj = document.getElementById(id); if (obj) { if (obj.parentNode && typeof obj.parentNode.so != UNDEFINED) { obj.parentNode.so.call(setter, value) } else { if (!(obj && typeof obj[setter] != UNDEFINED)) { var objects = obj.getElementsByTagName("object"); var embeds = obj.getElementsByTagName("embed"); obj = ((objects[0] && typeof objects[0][setter] != UNDEFINED) ? objects[0] : ((embeds[0] && typeof embeds[0][setter] != UNDEFINED) ? embeds[0] : null)) } if (obj) { obj[setter](value) } } } else { if (obj = document[id]) { if (typeof obj[setter] != UNDEFINED) { obj[setter](value) } } } } }; var _jsDispatch = function(type) { this.dispatchEvent(new SWFAddressEvent(type)); type = type.substr(0, 1).toUpperCase() + type.substr(1); if (typeof this["on" + type] == FUNCTION) { this["on" + type]() } }; var _jsInit = function() { if (_util.Browser.isSafari()) { _d.body.addEventListener("click", _bodyClick) } _jsDispatch.call(this, "init") }; var _jsChange = function() { _swfChange(); _jsDispatch.call(this, "change") }; var _update = function(internal) { _jsChange.call(this); if (internal) { _jsDispatch.call(this, "internalChange") } else { _jsDispatch.call(this, "externalChange") } _st(_functions.bind(_track, this), 10) }; var _track = function() { var value = (_l.pathname + (/\/$/.test(_l.pathname) ? "" : "/") + this.getValue()).replace(/\/\//, "/").replace(/^\/$/, ""); var fn = _t[_opts.tracker]; if (typeof fn == FUNCTION) { fn(value) } else { if (typeof _t.pageTracker != UNDEFINED && typeof _t.pageTracker._trackPageview == FUNCTION) { _t.pageTracker._trackPageview(value) } else { if (typeof _t.urchinTracker == FUNCTION) { _t.urchinTracker(value) } } } }; var _htmlWrite = function() { var doc = _frame.contentWindow.document; doc.open(); doc.write("<html><head><title>" + _d.title + "</title><script>var " + ID + ' = "' + _getHash() + '";<\/script></head></html>'); doc.close() }; var _htmlLoad = function() { var win = _frame.contentWindow; var src = win.location.href; _value = (typeof win[ID] != UNDEFINED ? win[ID] : ""); if (_value != _getHash()) { _update.call(SWFAddress, false); _l.hash = _ieLocal(_value, TRUE) } }; var _load = function() { if (!_loaded) { _loaded = TRUE; if (_msie && _version < 8) { var frameset = _d.getElementsByTagName("frameset")[0]; _frame = _d.createElement((frameset ? "" : "i") + "frame"); if (frameset) { frameset.insertAdjacentElement("beforeEnd", _frame); frameset[frameset.cols ? "cols" : "rows"] += ",0"; _frame.src = "javascript:false"; _frame.noResize = true; _frame.frameBorder = _frame.frameSpacing = 0 } else { _frame.src = "javascript:false"; _frame.style.display = "none"; _d.body.insertAdjacentElement("afterBegin", _frame) } _st(function() { _events.addListener(_frame, "load", _htmlLoad); if (typeof _frame.contentWindow[ID] == UNDEFINED) { _htmlWrite() } }, 50) } else { if (_safari) { if (_version < 418) { _d.body.innerHTML += '<form id="' + ID + '" style="position:absolute;top:-9999px;" method="get"></form>'; _form = _d.getElementById(ID) } if (typeof _l[ID] == UNDEFINED) { _l[ID] = {} } if (typeof _l[ID][_l.pathname] != UNDEFINED) { _stack = _l[ID][_l.pathname].split(",") } } } _st(_functions.bind(function() { _jsInit.call(this); _jsChange.call(this); _track.call(this) }, this), 1); if (_msie && _version >= 8) { _d.body.onhashchange = _functions.bind(_listen, this); _si(_functions.bind(_titleCheck, this), 50) } else { _si(_functions.bind(_listen, this), 50) } } }; var ID = "swfaddress", FUNCTION = "function", UNDEFINED = "undefined", TRUE = true, FALSE = false, _util = asual.util, _browser = _util.Browser, _events = _util.Events, _functions = _util.Functions, _version = _browser.getVersion(), _msie = _browser.isMSIE(), _mozilla = _browser.isMozilla(), _opera = _browser.isOpera(), _safari = _browser.isSafari(), _supported = FALSE, _t = _getWindow(), _d = _t.document, _h = _t.history, _l = _t.location, _si = setInterval, _st = setTimeout, _dc = decodeURI, _ec = encodeURI, _frame, _form, _url, _title = _d.title, _length = _h.length, _silent = FALSE, _loaded = FALSE, _justset = TRUE, _juststart = TRUE, _ref = this, _stack = [], _ids = [], _popup = [], _listeners = {}, _value = _getHash(), _opts = { history: TRUE, strict: TRUE }; if (_msie && _d.documentMode && _d.documentMode != _version) { _version = _d.documentMode != 8 ? 7 : 8 } _supported = (_mozilla && _version >= 1) || (_msie && _version >= 6) || (_opera && _version >= 9.5) || (_safari && _version >= 312); if (_supported) { if (_opera) { history.navigationMode = "compatible" } for (var i = 1; i < _length; i++) { _stack.push("") } _stack.push(_getHash()); if (_msie && _l.hash != _getHash()) { _l.hash = "#" + _ieLocal(_getHash(), TRUE) } _searchScript(document); var _qi = _url ? _url.indexOf("?") : -1; if (_qi != -1) { var param, params = _url.substr(_qi + 1).split("&"); for (var i = 0, p; p = params[i]; i++) { param = p.split("="); if (/^(history|strict)$/.test(param[0])) { _opts[param[0]] = (isNaN(param[1]) ? /^(true|yes)$/i.test(param[1]) : (parseInt(param[1]) != 0)) } if (/^tracker$/.test(param[0])) { _opts[param[0]] = param[1] } } } if (_msie) { _titleCheck.call(this) } if (window == _t) { _events.addListener(document, "DOMContentLoaded", _functions.bind(_load, this)) } _events.addListener(_t, "load", _functions.bind(_load, this)) } else { if ((!_supported && _l.href.indexOf("#") != -1) || (_safari && _version < 418 && _l.href.indexOf("#") != -1 && _l.search != "")) { _d.open(); _d.write('<html><head><meta http-equiv="refresh" content="0;url=' + _l.href.substr(0, _l.href.indexOf("#")) + '" /></head></html>'); _d.close() } else { _track() } } this.toString = function() { return "[class SWFAddress]" }; this.back = function() { _h.back() }; this.forward = function() { _h.forward() }; this.up = function() { var path = this.getPath(); this.setValue(path.substr(0, path.lastIndexOf("/", path.length - 2) + (path.substr(path.length - 1) == "/" ? 1 : 0))) }; this.go = function(delta) { _h.go(delta) }; this.href = function(url, target) { target = typeof target != UNDEFINED ? target : "_self"; if (target == "_self") { self.location.href = url } else { if (target == "_top") { _l.href = url } else { if (target == "_blank") { window.open(url) } else { _t.frames[target].location.href = url } } } }; this.popup = function(url, name, options, handler) { try { var popup = window.open(url, name, eval(options)); if (typeof handler != UNDEFINED) { eval(handler) } } catch (ex) { } _popup = arguments }; this.getIds = function() { return _ids }; this.getId = function(index) { return _ids[0] }; this.setId = function(id) { _ids[0] = id }; this.addId = function(id) { this.removeId(id); _ids.push(id) }; this.removeId = function(id) { for (var i = 0; i < _ids.length; i++) { if (id == _ids[i]) { _ids.splice(i, 1); break } } }; this.addEventListener = function(type, listener) { if (typeof _listeners[type] == UNDEFINED) { _listeners[type] = [] } _listeners[type].push(listener) }; this.removeEventListener = function(type, listener) { if (typeof _listeners[type] != UNDEFINED) { for (var i = 0, l; l = _listeners[type][i]; i++) { if (l == listener) { break } } _listeners[type].splice(i, 1) } }; this.dispatchEvent = function(event) { if (this.hasEventListener(event.type)) { event.target = this; for (var i = 0, l; l = _listeners[event.type][i]; i++) { l(event) } return TRUE } return FALSE }; this.hasEventListener = function(type) { return (typeof _listeners[type] != UNDEFINED && _listeners[type].length > 0) }; this.getBaseURL = function() { var url = _l.href; if (url.indexOf("#") != -1) { url = url.substr(0, url.indexOf("#")) } if (url.substr(url.length - 1) == "/") { url = url.substr(0, url.length - 1) } return url }; this.getStrict = function() { return _opts.strict }; this.setStrict = function(strict) { _opts.strict = strict }; this.getHistory = function() { return _opts.history }; this.setHistory = function(history) { _opts.history = history }; this.getTracker = function() { return _opts.tracker }; this.setTracker = function(tracker) { _opts.tracker = tracker }; this.getTitle = function() { return _d.title }; this.setTitle = function(title) { if (!_supported) { return null } if (typeof title == UNDEFINED) { return } if (title == "null") { title = "" } title = _dc(title); _st(function() { _title = _d.title = title; if (_juststart && _frame && _frame.contentWindow && _frame.contentWindow.document) { _frame.contentWindow.document.title = title; _juststart = FALSE } if (!_justset && _mozilla) { _l.replace(_l.href.indexOf("#") != -1 ? _l.href : _l.href + "#") } _justset = FALSE }, 10) }; this.getStatus = function() { return _t.status }; this.setStatus = function(status) { if (!_supported) { return null } if (typeof status == UNDEFINED) { return } if (status == "null") { status = "" } status = _dc(status); if (!_safari) { status = _strictCheck((status != "null") ? status : "", TRUE); if (status == "/") { status = "" } if (!(/http(s)?:\/\//.test(status))) { var index = _l.href.indexOf("#"); status = (index == -1 ? _l.href : _l.href.substr(0, index)) + "#" + status } _t.status = status } }; this.resetStatus = function() { _t.status = "" }; this.getValue = function() { if (!_supported) { return null } return _dc(_strictCheck(_ieLocal(_value, FALSE), FALSE)) }; this.setValue = function(value) { if (!_supported) { return null } if (typeof value == UNDEFINED) { return } if (value == "null") { value = "" } value = _ec(_dc(_strictCheck(value, TRUE))); if (value == "/") { value = "" } if (_value == value) { return } _justset = TRUE; _value = value; _silent = TRUE; _update.call(SWFAddress, true); _stack[_h.length] = _value; if (_safari) { if (_opts.history) { _l[ID][_l.pathname] = _stack.toString(); _length = _h.length + 1; if (_version < 418) { if (_l.search == "") { _form.action = "#" + _value; _form.submit() } } else { if (_version < 523 || _value == "") { var evt = _d.createEvent("MouseEvents"); evt.initEvent("click", TRUE, TRUE); var anchor = _d.createElement("a"); anchor.href = "#" + _value; anchor.dispatchEvent(evt) } else { _l.hash = "#" + _value } } } else { _l.replace("#" + _value) } } else { if (_value != _getHash()) { if (_opts.history) { _l.hash = "#" + _dc(_ieLocal(_value, TRUE)) } else { _l.replace("#" + _dc(_value)) } } } if ((_msie && _version < 8) && _opts.history) { _st(_htmlWrite, 50) } if (_safari) { _st(function() { _silent = FALSE }, 1) } else { _silent = FALSE } }; this.getPath = function() { var value = this.getValue(); if (value.indexOf("?") != -1) { return value.split("?")[0] } else { if (value.indexOf("#") != -1) { return value.split("#")[0] } else { return value } } }; this.getPathNames = function() { var path = this.getPath(), names = path.split("/"); if (path.substr(0, 1) == "/" || path.length == 0) { names.splice(0, 1) } if (path.substr(path.length - 1, 1) == "/") { names.splice(names.length - 1, 1) } return names }; this.getQueryString = function() { var value = this.getValue(), index = value.indexOf("?"); if (index != -1 && index < value.length) { return value.substr(index + 1) } }; this.getParameter = function(param) { var value = this.getValue(); var index = value.indexOf("?"); if (index != -1) { value = value.substr(index + 1); var p, params = value.split("&"), i = params.length, r = []; while (i--) { p = params[i].split("="); if (p[0] == param) { r.push(p[1]) } } if (r.length != 0) { return r.length != 1 ? r : r[0] } } }; this.getParameterNames = function() { var value = this.getValue(); var index = value.indexOf("?"); var names = []; if (index != -1) { value = value.substr(index + 1); if (value != "" && value.indexOf("=") != -1) { var params = value.split("&"), i = 0; while (i < params.length) { names.push(params[i].split("=")[0]); i++ } } } return names }; this.onInit = null; this.onChange = null; this.onInternalChange = null; this.onExternalChange = null; (function() { var _args; if (typeof FlashObject != UNDEFINED) { SWFObject = FlashObject } if (typeof SWFObject != UNDEFINED && SWFObject.prototype && SWFObject.prototype.write) { var _s1 = SWFObject.prototype.write; SWFObject.prototype.write = function() { _args = arguments; if (this.getAttribute("version").major < 8) { this.addVariable("$swfaddress", SWFAddress.getValue()); ((typeof _args[0] == "string") ? document.getElementById(_args[0]) : _args[0]).so = this } var success; if (success = _s1.apply(this, _args)) { _ref.addId(this.getAttribute("id")) } return success } } if (typeof swfobject != UNDEFINED) { var _s2r = swfobject.registerObject; swfobject.registerObject = function() { _args = arguments; _s2r.apply(this, _args); _ref.addId(_args[0]) }; var _s2c = swfobject.createSWF; swfobject.createSWF = function() { _args = arguments; var swf = _s2c.apply(this, _args); if (swf) { _ref.addId(_args[0].id) } return swf }; var _s2e = swfobject.embedSWF; swfobject.embedSWF = function() { _args = arguments; if (typeof _args[8] == UNDEFINED) { _args[8] = {} } if (typeof _args[8].id == UNDEFINED) { _args[8].id = _args[1] } _s2e.apply(this, _args); _ref.addId(_args[8].id) } } if (typeof UFO != UNDEFINED) { var _u = UFO.create; UFO.create = function() { _args = arguments; _u.apply(this, _args); _ref.addId(_args[0].id) } } if (typeof AC_FL_RunContent != UNDEFINED) { var _a = AC_FL_RunContent; AC_FL_RunContent = function() { _args = arguments; _a.apply(this, _args); for (var i = 0, l = _args.length; i < l; i++) { if (_args[i] == "id") { _ref.addId(_args[i + 1]) } } } } })() };


/*	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 } } } } ();


/*Uploadify v2.1.0
Release Date: August 24, 2009

Copyright (c) 2009 Ronnie Garcia, Travis Nickels

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
if (jQuery) { (function(a) { a.extend(a.fn, { uploadify: function(b) { a(this).each(function() { settings = a.extend({ id: a(this).attr("id"), uploader: "uploadify.swf", script: "uploadify.php", expressInstall: null, folder: "", height: 30, width: 110, cancelImg: "cancel.png", wmode: "opaque", scriptAccess: "sameDomain", fileDataName: "Filedata", method: "POST", queueSizeLimit: 999, simUploadLimit: 1, queueID: false, displayData: "percentage", onInit: function() { }, onSelect: function() { }, onQueueFull: function() { }, onCheck: function() { }, onCancel: function() { }, onError: function() { }, onProgress: function() { }, onComplete: function() { }, onAllComplete: function() { } }, b); var e = location.pathname; e = e.split("/"); e.pop(); e = e.join("/") + "/"; var f = {}; f.uploadifyID = settings.id; f.pagepath = e; if (settings.buttonImg) { f.buttonImg = escape(settings.buttonImg) } if (settings.buttonText) { f.buttonText = escape(settings.buttonText) } if (settings.rollover) { f.rollover = true } f.script = settings.script; f.folder = escape(settings.folder); if (settings.scriptData) { var g = ""; for (var d in settings.scriptData) { g += "&" + d + "=" + settings.scriptData[d] } f.scriptData = escape(g.substr(1)) } f.width = settings.width; f.height = settings.height; f.wmode = settings.wmode; f.method = settings.method; f.queueSizeLimit = settings.queueSizeLimit; f.simUploadLimit = settings.simUploadLimit; if (settings.hideButton) { f.hideButton = true } if (settings.fileDesc) { f.fileDesc = settings.fileDesc } if (settings.fileExt) { f.fileExt = settings.fileExt } if (settings.multi) { f.multi = true } if (settings.auto) { f.auto = true } if (settings.sizeLimit) { f.sizeLimit = settings.sizeLimit } if (settings.checkScript) { f.checkScript = settings.checkScript } if (settings.fileDataName) { f.fileDataName = settings.fileDataName } if (settings.queueID) { f.queueID = settings.queueID } if (settings.onInit() !== false) { a(this).css("display", "none"); a(this).after('<div id="' + a(this).attr("id") + 'Uploader"></div>'); swfobject.embedSWF(settings.uploader, settings.id + "Uploader", settings.width, settings.height, "9.0.24", settings.expressInstall, f, { quality: "high", wmode: settings.wmode, allowScriptAccess: settings.scriptAccess }); if (settings.queueID == false) { a("#" + a(this).attr("id") + "Uploader").after('<div id="' + a(this).attr("id") + 'Queue" class="uploadifyQueue"></div>') } } if (typeof (settings.onOpen) == "function") { a(this).bind("uploadifyOpen", settings.onOpen) } a(this).bind("uploadifySelect", { action: settings.onSelect, queueID: settings.queueID }, function(j, h, i) { if (j.data.action(j, h, i) !== false) { var k = Math.round(i.size / 1024 * 100) * 0.01; var l = "KB"; if (k > 1000) { k = Math.round(k * 0.001 * 100) * 0.01; l = "MB" } var m = k.toString().split("."); if (m.length > 1) { k = m[0] + "." + m[1].substr(0, 2) } else { k = m[0] } if (i.name.length > 20) { fileName = i.name.substr(0, 20) + "..." } else { fileName = i.name } queue = "#" + a(this).attr("id") + "Queue"; if (j.data.queueID) { queue = "#" + j.data.queueID } a(queue).append('<div id="' + a(this).attr("id") + h + '" class="uploadifyQueueItem"><div class="cancel"><a href="javascript:jQuery(\'#' + a(this).attr("id") + "').uploadifyCancel('" + h + '\')"><img src="' + settings.cancelImg + '" border="0" /></a></div><span class="fileName">' + fileName + " (" + k + l + ')</span><span class="percentage"></span><div class="uploadifyProgress"><div id="' + a(this).attr("id") + h + 'ProgressBar" class="uploadifyProgressBar"><!--Progress Bar--></div></div></div>') } }); if (typeof (settings.onSelectOnce) == "function") { a(this).bind("uploadifySelectOnce", settings.onSelectOnce) } a(this).bind("uploadifyQueueFull", { action: settings.onQueueFull }, function(h, i) { if (h.data.action(h, i) !== false) { alert("The queue is full.  The max size is " + i + ".") } }); a(this).bind("uploadifyCheckExist", { action: settings.onCheck }, function(m, l, k, j, o) { var i = new Object(); i = k; i.folder = e + j; if (o) { for (var h in k) { var n = h } } a.post(l, i, function(r) { for (var p in r) { if (m.data.action(m, l, k, j, o) !== false) { var q = confirm("Do you want to replace the file " + r[p] + "?"); if (!q) { document.getElementById(a(m.target).attr("id") + "Uploader").cancelFileUpload(p, true, true) } } } if (o) { document.getElementById(a(m.target).attr("id") + "Uploader").startFileUpload(n, true) } else { document.getElementById(a(m.target).attr("id") + "Uploader").startFileUpload(null, true) } }, "json") }); a(this).bind("uploadifyCancel", { action: settings.onCancel }, function(l, h, k, m, j) { if (l.data.action(l, h, k, m, j) !== false) { var i = (j == true) ? 0 : 250; a("#" + a(this).attr("id") + h).fadeOut(i, function() { a(this).remove() }) } }); if (typeof (settings.onClearQueue) == "function") { a(this).bind("uploadifyClearQueue", settings.onClearQueue) } var c = []; a(this).bind("uploadifyError", { action: settings.onError }, function(l, h, k, j) { if (l.data.action(l, h, k, j) !== false) { var i = new Array(h, k, j); c.push(i); a("#" + a(this).attr("id") + h + " .percentage").text(" - " + j.type + " Error"); a("#" + a(this).attr("id") + h).addClass("uploadifyError") } }); a(this).bind("uploadifyProgress", { action: settings.onProgress, toDisplay: settings.displayData }, function(j, h, i, k) { if (j.data.action(j, h, i, k) !== false) { a("#" + a(this).attr("id") + h + "ProgressBar").css("width", k.percentage + "%"); if (j.data.toDisplay == "percentage") { displayData = " - " + k.percentage + "%" } if (j.data.toDisplay == "speed") { displayData = " - " + k.speed + "KB/s" } if (j.data.toDisplay == null) { displayData = " " } a("#" + a(this).attr("id") + h + " .percentage").text(displayData) } }); a(this).bind("uploadifyComplete", { action: settings.onComplete }, function(k, h, j, i, l) { if (k.data.action(k, h, j, unescape(i), l) !== false) { a("#" + a(this).attr("id") + h + " .percentage").text(" - Completed"); a("#" + a(this).attr("id") + h).fadeOut(250, function() { a(this).remove() }) } }); if (typeof (settings.onAllComplete) == "function") { a(this).bind("uploadifyAllComplete", { action: settings.onAllComplete }, function(h, i) { if (h.data.action(h, i) !== false) { c = [] } }) } }) }, uploadifySettings: function(f, j, c) { var g = false; a(this).each(function() { if (f == "scriptData" && j != null) { if (c) { var i = j } else { var i = a.extend(settings.scriptData, j) } var l = ""; for (var k in i) { l += "&" + k + "=" + escape(i[k]) } j = l.substr(1) } g = document.getElementById(a(this).attr("id") + "Uploader").updateSettings(f, j) }); if (j == null) { if (f == "scriptData") { var b = unescape(g).split("&"); var e = new Object(); for (var d = 0; d < b.length; d++) { var h = b[d].split("="); e[h[0]] = h[1] } g = e } return g } }, uploadifyUpload: function(b) { a(this).each(function() { document.getElementById(a(this).attr("id") + "Uploader").startFileUpload(b, false) }) }, uploadifyCancel: function(b) { a(this).each(function() { document.getElementById(a(this).attr("id") + "Uploader").cancelFileUpload(b, true, false) }) }, uploadifyClearQueue: function() { a(this).each(function() { document.getElementById(a(this).attr("id") + "Uploader").clearFileUploadQueue(false) }) } }) })(jQuery) };


/* JSON */
if (!this.JSON2) { JSON2 = function() { function f(n) { return n < 10 ? '0' + n : n } var escapeable = /["\\\x00-\x1f\x7f-\x9f]/g, gap, indent, meta = { '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"': '\\"', '\\': '\\\\' }, rep; function quote(string) { return escapeable.test(string) ? '"' + string.replace(escapeable, function(a) { var c = meta[a]; if (typeof c === 'string') { return c } c = a.charCodeAt(); return '\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16) }) + '"' : '"' + string + '"' } function str(key, holder) { var i, k, v, length, mind = gap, partial, value = holder[key]; if (value && typeof value === 'object' && typeof value.toJSON === 'function') { value = value.toJSON(key) } if (typeof rep === 'function') { value = rep.call(holder, key, value) } switch (typeof value) { case 'string': return quote(value); case 'number': return isFinite(value) ? String(value) : 'null'; case 'boolean': case 'null': return String(value); case 'object': if (!value) { return 'null' } if (value.toUTCString) { var xx = '"\\/Date(' + value.getTime() + ')\\/"'; return xx } gap += indent; partial = []; if (typeof value.length === 'number' && !(value.propertyIsEnumerable('length'))) { length = value.length; for (i = 0; i < length; i += 1) { partial[i] = str(i, value) || 'null' } v = partial.length === 0 ? '[]' : gap ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : '[' + partial.join(',') + ']'; gap = mind; return v } if (typeof rep === 'object') { length = rep.length; for (i = 0; i < length; i += 1) { k = rep[i]; if (typeof k === 'string') { v = str(k, value, rep); if (v) { partial.push(quote(k) + (gap ? ': ' : ':') + v) } } } } else { for (k in value) { v = str(k, value, rep); if (v) { partial.push(quote(k) + (gap ? ': ' : ':') + v) } } } v = partial.length === 0 ? '{}' : gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : '{' + partial.join(',') + '}'; gap = mind; return v } } return { stringify: function(value, replacer, space) { var i; gap = ''; indent = ''; if (space) { if (typeof space === 'number') { for (i = 0; i < space; i += 1) { indent += ' ' } } else if (typeof space === 'string') { indent = space } } if (!replacer) { rep = function(key, value) { if (!Object.hasOwnProperty.call(this, key)) { return undefined } return value } } else if (typeof replacer === 'function' || (typeof replacer === 'object' && typeof replacer.length === 'number')) { rep = replacer } else { throw new Error('JSON.stringify') } return str('', { '': value }) }, parse: function(text, reviver) { var j; function walk(holder, key) { var k, v, value = holder[key]; if (value && typeof value === 'object') { for (k in value) { if (Object.hasOwnProperty.call(value, k)) { v = walk(value, k); if (v !== undefined) { value[k] = v } else { delete value[k] } } } } return reviver.call(holder, key, value) } if (/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/bfnrtu]/g, '@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { var regEx = /(\"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}.*?\")|(\"\\*\/Date\(.*?\)\\*\/")/g; text = text.replace(regEx, this.regExDate); j = eval('(' + text + ')'); return typeof reviver === 'function' ? walk({ '': j }, '') : j } throw new SyntaxError('JSON.parse') }, regExDate: function(str, p1, p2, offset, s) { str = str.substring(1).replace('"', ''); var date = str; if (/\/Date(.*)\//.test(str)) { str = str.match(/Date\((.*?)\)/)[1]; date = "new Date(" + parseInt(str) + ")" } else { var matches = str.split(/[-,:,T,Z]/); matches[1] = (parseInt(matches[1], 0) - 1).toString(); date = "new Date(Date.UTC(" + matches.join(",") + "))" } return date }, quote: quote} } () }


/* jQuery blockUI plugin
* Version 2.31 (06-JAN-2010)
* @requires jQuery v1.2.3 or later*
* Examples at: http://malsup.com/jquery/block/
* Copyright (c) 2007-2008 M. Alsup
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
* Thanks to Amir-Hossein Sobhi for some excellent contributions! */
; (function($) { if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) { alert('blockUI requires jQuery v1.2.3 or later!  You are using v' + $.fn.jquery); return } $.fn._fadeIn = $.fn.fadeIn; var noOp = function() { }; var mode = document.documentMode || 0; var setExpr = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8); var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent) && !mode; $.blockUI = function(opts) { install(window, opts) }; $.unblockUI = function(opts) { remove(window, opts) }; $.growlUI = function(title, message, timeout, onClose) { var $m = $('<div class="growlUI"></div>'); if (title) $m.append('<h1>' + title + '</h1>'); if (message) $m.append('<h2>' + message + '</h2>'); if (timeout == undefined) timeout = 3000; $.blockUI({ message: $m, fadeIn: 700, fadeOut: 1000, centerY: false, timeout: timeout, showOverlay: false, onUnblock: onClose, css: $.blockUI.defaults.growlCSS }) }; $.fn.block = function(opts) { return this.unblock({ fadeOut: 0 }).each(function() { if ($.css(this, 'position') == 'static') this.style.position = 'relative'; if ($.browser.msie) this.style.zoom = 1; install(this, opts) }) }; $.fn.unblock = function(opts) { return this.each(function() { remove(this, opts) }) }; $.blockUI.version = 2.31; $.blockUI.defaults = { message: '<h1>Please wait...</h1>', title: null, draggable: true, theme: false, css: { padding: 0, margin: 0, width: '30%', top: '40%', left: '35%', textAlign: 'center', color: '#000', border: '3px solid #aaa', backgroundColor: '#fff', cursor: 'wait' }, themedCSS: { width: '30%', top: '40%', left: '35%' }, overlayCSS: { backgroundColor: '#fff', opacity: 0.6, cursor: 'wait' }, growlCSS: { width: '350px', top: '10px', left: '', right: '10px', border: 'none', padding: '5px', opacity: 0.6, cursor: 'default', color: '#fff', backgroundColor: '#fff', '-webkit-border-radius': '10px', '-moz-border-radius': '10px' }, iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank', forceIframe: false, baseZ: 1000, centerX: true, centerY: true, allowBodyStretch: true, bindEvents: true, constrainTabKey: true, fadeIn: 200, fadeOut: 400, timeout: 0, showOverlay: true, focusInput: true, applyPlatformOpacityRules: true, onBlock: null, onUnblock: null, quirksmodeOffsetHack: 4 }; var pageBlock = null; var pageBlockEls = []; function install(el, opts) { var full = (el == window); var msg = opts && opts.message !== undefined ? opts.message : undefined; opts = $.extend({}, $.blockUI.defaults, opts || {}); opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {}); var css = $.extend({}, $.blockUI.defaults.css, opts.css || {}); var themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {}); msg = msg === undefined ? opts.message : msg; if (full && pageBlock) remove(window, { fadeOut: 0 }); if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) { var node = msg.jquery ? msg[0] : msg; var data = {}; $(el).data('blockUI.history', data); data.el = node; data.parent = node.parentNode; data.display = node.style.display; data.position = node.style.position; if (data.parent) data.parent.removeChild(node) } var z = opts.baseZ; var lyr1 = ($.browser.msie || opts.forceIframe) ? $('<iframe class="blockUI" style="z-index:' + (z++) + ';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="' + opts.iframeSrc + '"></iframe>') : $('<div class="blockUI" style="display:none"></div>'); var lyr2 = $('<div class="blockUI blockOverlay" style="z-index:' + (z++) + ';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'); var lyr3; if (opts.theme && full) { var s = '<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:' + z + ';display:none;position:fixed">' + '<div class="ui-widget-header ui-dialog-titlebar blockTitle">' + (opts.title || '&nbsp;') + '</div>' + '<div class="ui-widget-content ui-dialog-content"></div>' + '</div>'; lyr3 = $(s) } else { lyr3 = full ? $('<div class="blockUI blockMsg blockPage" style="z-index:' + z + ';display:none;position:fixed"></div>') : $('<div class="blockUI blockMsg blockElement" style="z-index:' + z + ';display:none;position:absolute"></div>') } if (msg) { if (opts.theme) { lyr3.css(themedCSS); lyr3.addClass('ui-widget-content') } else lyr3.css(css) } if (!opts.applyPlatformOpacityRules || !($.browser.mozilla && /Linux/.test(navigator.platform))) lyr2.css(opts.overlayCSS); lyr2.css('position', full ? 'fixed' : 'absolute'); if ($.browser.msie || opts.forceIframe) lyr1.css('opacity', 0.0); var layers = [lyr1, lyr2, lyr3], $par = full ? $('body') : $(el); $.each(layers, function() { this.appendTo($par) }); if (opts.theme && opts.draggable && $.fn.draggable) { lyr3.draggable({ handle: '.ui-dialog-titlebar', cancel: 'li' }) } var expr = setExpr && (!$.boxModel || $('object,embed', full ? null : el).length > 0); if (ie6 || expr) { if (full && opts.allowBodyStretch && $.boxModel) $('html,body').css('height', '100%'); if ((ie6 || !$.boxModel) && !full) { var t = sz(el, 'borderTopWidth'), l = sz(el, 'borderLeftWidth'); var fixT = t ? '(0 - ' + t + ')' : 0; var fixL = l ? '(0 - ' + l + ')' : 0 } $.each([lyr1, lyr2, lyr3], function(i, o) { var s = o[0].style; s.position = 'absolute'; if (i < 2) { full ? s.setExpression('height', 'Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:' + opts.quirksmodeOffsetHack + ') + "px"') : s.setExpression('height', 'this.parentNode.offsetHeight + "px"'); full ? s.setExpression('width', 'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"') : s.setExpression('width', 'this.parentNode.offsetWidth + "px"'); if (fixL) s.setExpression('left', fixL); if (fixT) s.setExpression('top', fixT) } else if (opts.centerY) { if (full) s.setExpression('top', '(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'); s.marginTop = 0 } else if (!opts.centerY && full) { var top = (opts.css && opts.css.top) ? parseInt(opts.css.top) : 0; var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + ' + top + ') + "px"'; s.setExpression('top', expression) } }) } if (msg) { if (opts.theme) lyr3.find('.ui-widget-content').append(msg); else lyr3.append(msg); if (msg.jquery || msg.nodeType) $(msg).show() } if (($.browser.msie || opts.forceIframe) && opts.showOverlay) lyr1.show(); if (opts.fadeIn) { var cb = opts.onBlock ? opts.onBlock : noOp; var cb1 = (opts.showOverlay && !msg) ? cb : noOp; var cb2 = msg ? cb : noOp; if (opts.showOverlay) lyr2._fadeIn(opts.fadeIn, cb1); if (msg) lyr3._fadeIn(opts.fadeIn, cb2) } else { if (opts.showOverlay) lyr2.show(); if (msg) lyr3.show(); if (opts.onBlock) opts.onBlock() } bind(1, el, opts); if (full) { pageBlock = lyr3[0]; pageBlockEls = $(':input:enabled:visible', pageBlock); if (opts.focusInput) setTimeout(focus, 20) } else center(lyr3[0], opts.centerX, opts.centerY); if (opts.timeout) { var to = setTimeout(function() { full ? $.unblockUI(opts) : $(el).unblock(opts) }, opts.timeout); $(el).data('blockUI.timeout', to) } }; function remove(el, opts) { var full = (el == window); var $el = $(el); var data = $el.data('blockUI.history'); var to = $el.data('blockUI.timeout'); if (to) { clearTimeout(to); $el.removeData('blockUI.timeout') } opts = $.extend({}, $.blockUI.defaults, opts || {}); bind(0, el, opts); var els; if (full) els = $('body').children().filter('.blockUI').add('body > .blockUI'); else els = $('.blockUI', el); if (full) pageBlock = pageBlockEls = null; if (opts.fadeOut) { els.fadeOut(opts.fadeOut); setTimeout(function() { reset(els, data, opts, el) }, opts.fadeOut) } else reset(els, data, opts, el) }; function reset(els, data, opts, el) { els.each(function(i, o) { if (this.parentNode) this.parentNode.removeChild(this) }); if (data && data.el) { data.el.style.display = data.display; data.el.style.position = data.position; if (data.parent) data.parent.appendChild(data.el); $(el).removeData('blockUI.history') } if (typeof opts.onUnblock == 'function') opts.onUnblock(el, opts) }; function bind(b, el, opts) { var full = el == window, $el = $(el); if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked'))) return; if (!full) $el.data('blockUI.isBlocked', b); if (!opts.bindEvents || (b && !opts.showOverlay)) return; var events = 'mousedown mouseup keydown keypress'; b ? $(document).bind(events, opts, handler) : $(document).unbind(events, handler) }; function handler(e) { if (e.keyCode && e.keyCode == 9) { if (pageBlock && e.data.constrainTabKey) { var els = pageBlockEls; var fwd = !e.shiftKey && e.target == els[els.length - 1]; var back = e.shiftKey && e.target == els[0]; if (fwd || back) { setTimeout(function() { focus(back) }, 10); return false } } } if ($(e.target).parents('div.blockMsg').length > 0) return true; return $(e.target).parents().children().filter('div.blockUI').length == 0 }; function focus(back) { if (!pageBlockEls) return; var e = pageBlockEls[back === true ? pageBlockEls.length - 1 : 0]; if (e) e.focus() }; function center(el, x, y) { var p = el.parentNode, s = el.style; var l = ((p.offsetWidth - el.offsetWidth) / 2) - sz(p, 'borderLeftWidth'); var t = ((p.offsetHeight - el.offsetHeight) / 2) - sz(p, 'borderTopWidth'); if (x) s.left = l > 0 ? (l + 'px') : '0'; if (y) s.top = t > 0 ? (t + 'px') : '0' }; function sz(el, p) { return parseInt($.css(el, p)) || 0 } })(jQuery);


/** jCarousel - Riding carousels with jQuery
*   http://sorgalla.com/jcarousel/
*
* Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* Built on top of the jQuery library
*   http://jquery.com
*
* Inspired by the "Carousel Component" by Bill Scott
*   http://billwscott.com/carousel/ */
(function($) { $.fn.jcarousel = function(o) { return this.each(function() { new $jc(this, o) }) }; var defaults = { vertical: false, start: 1, offset: 1, size: null, scroll: 3, visible: null, animation: 'normal', easing: 'swing', auto: 0, wrap: null, initCallback: null, reloadCallback: null, itemLoadCallback: null, itemFirstInCallback: null, itemFirstOutCallback: null, itemLastInCallback: null, itemLastOutCallback: null, itemVisibleInCallback: null, itemVisibleOutCallback: null, buttonNextHTML: '<div></div>', buttonPrevHTML: '<div></div>', buttonNextEvent: 'click', buttonPrevEvent: 'click', buttonNextCallback: null, buttonPrevCallback: null }; $.jcarousel = function(e, o) { this.options = $.extend({}, defaults, o || {}); this.locked = false; this.container = null; this.clip = null; this.list = null; this.buttonNext = null; this.buttonPrev = null; this.wh = !this.options.vertical ? 'width' : 'height'; this.lt = !this.options.vertical ? 'left' : 'top'; var skin = '', split = e.className.split(' '); for (var i = 0; i < split.length; i++) { if (split[i].indexOf('jcarousel-skin') != -1) { $(e).removeClass(split[i]); var skin = split[i]; break } } if (e.nodeName == 'UL' || e.nodeName == 'OL') { this.list = $(e); this.container = this.list.parent(); if (this.container.hasClass('jcarousel-clip')) { if (!this.container.parent().hasClass('jcarousel-container')) this.container = this.container.wrap('<div></div>'); this.container = this.container.parent() } else if (!this.container.hasClass('jcarousel-container')) this.container = this.list.wrap('<div></div>').parent() } else { this.container = $(e); this.list = $(e).find('>ul,>ol,div>ul,div>ol') } if (skin != '' && this.container.parent()[0].className.indexOf('jcarousel-skin') == -1) this.container.wrap('<div class=" ' + skin + '"></div>'); this.clip = this.list.parent(); if (!this.clip.length || !this.clip.hasClass('jcarousel-clip')) this.clip = this.list.wrap('<div></div>').parent(); this.buttonPrev = $('.jcarousel-prev', this.container); if (this.buttonPrev.size() == 0 && this.options.buttonPrevHTML != null) this.buttonPrev = this.clip.before(this.options.buttonPrevHTML).prev(); this.buttonPrev.addClass(this.className('jcarousel-prev')); this.buttonNext = $('.jcarousel-next', this.container); if (this.buttonNext.size() == 0 && this.options.buttonNextHTML != null) this.buttonNext = this.clip.before(this.options.buttonNextHTML).prev(); this.buttonNext.addClass(this.className('jcarousel-next')); this.clip.addClass(this.className('jcarousel-clip')); this.list.addClass(this.className('jcarousel-list')); this.container.addClass(this.className('jcarousel-container')); var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; var li = this.list.children('li'); var self = this; if (li.size() > 0) { var wh = 0, i = this.options.offset; li.each(function() { self.format(this, i++); wh += self.dimension(this, di) }); this.list.css(this.wh, wh + 'px'); if (!o || o.size === undefined) this.options.size = li.size() } this.container.css('display', 'block'); this.buttonNext.css('display', 'block'); this.buttonPrev.css('display', 'block'); this.funcNext = function() { self.next() }; this.funcPrev = function() { self.prev() }; this.funcResize = function() { self.reload() }; if (this.options.initCallback != null) this.options.initCallback(this, 'init'); if ($.browser.safari) { this.setup() } else this.setup() }; var $jc = $.jcarousel; $jc.fn = $jc.prototype = { jcarousel: '0.2.3' }; $jc.fn.extend = $jc.extend = $.extend; $jc.fn.extend({ setup: function() { this.first = null; this.last = null; this.prevFirst = null; this.prevLast = null; this.animating = false; this.timer = null; this.tail = null; this.inTail = false; if (this.locked) return; this.list.css(this.lt, this.pos(this.options.offset) + 'px'); var p = this.pos(this.options.start); this.prevFirst = this.prevLast = null; this.animate(p, false); $(window).unbind('resize', this.funcResize).bind('resize', this.funcResize) }, reset: function() { this.list.empty(); this.list.css(this.lt, '0px'); this.list.css(this.wh, '10px'); if (this.options.initCallback != null) this.options.initCallback(this, 'reset'); this.setup() }, reload: function() { if (this.tail != null && this.inTail) this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + this.tail); this.tail = null; this.inTail = false; if (this.options.reloadCallback != null) this.options.reloadCallback(this); if (this.options.visible != null) { var self = this; var di = Math.ceil(this.clipping() / this.options.visible), wh = 0, lt = 0; $('li', this.list).each(function(i) { wh += self.dimension(this, di); if (i + 1 < self.first) lt = wh }); this.list.css(this.wh, wh + 'px'); this.list.css(this.lt, -lt + 'px') } this.scroll(this.first, false) }, lock: function() { this.locked = true; this.buttons() }, unlock: function() { this.locked = false; this.buttons() }, size: function(s) { if (s != undefined) { this.options.size = s; if (!this.locked) this.buttons() } return this.options.size }, has: function(i, i2) { if (i2 == undefined || !i2) i2 = i; if (this.options.size !== null && i2 > this.options.size) i2 = this.options.size; for (var j = i; j <= i2; j++) { var e = this.get(j); if (!e.length || e.hasClass('jcarousel-item-placeholder')) return false } return true }, get: function(i) { return $('.jcarousel-item-' + i, this.list) }, add: function(i, s) { var e = this.get(i), old = 0, add = 0; if (e.length == 0) { var c, e = this.create(i), j = $jc.intval(i); while (c = this.get(--j)) { if (j <= 0 || c.length) { j <= 0 ? this.list.prepend(e) : c.after(e); break } } } else old = this.dimension(e); e.removeClass(this.className('jcarousel-item-placeholder')); typeof s == 'string' ? e.html(s) : e.empty().append(s); var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; var wh = this.dimension(e, di) - old; if (i > 0 && i < this.first) this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - wh + 'px'); this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) + wh + 'px'); return e }, remove: function(i) { var e = this.get(i); if (!e.length || (i >= this.first && i <= this.last)) return; var d = this.dimension(e); if (i < this.first) this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + d + 'px'); e.remove(); this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) - d + 'px') }, next: function() { this.stopAuto(); if (this.tail != null && !this.inTail) this.scrollTail(false); else this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'last') && this.options.size != null && this.last == this.options.size) ? 1 : this.first + this.options.scroll) }, prev: function() { this.stopAuto(); if (this.tail != null && this.inTail) this.scrollTail(true); else this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'first') && this.options.size != null && this.first == 1) ? this.options.size : this.first - this.options.scroll) }, scrollTail: function(b) { if (this.locked || this.animating || !this.tail) return; var pos = $jc.intval(this.list.css(this.lt)); !b ? pos -= this.tail : pos += this.tail; this.inTail = !b; this.prevFirst = this.first; this.prevLast = this.last; this.animate(pos) }, scroll: function(i, a) { if (this.locked || this.animating) return; this.animate(this.pos(i), a) }, pos: function(i) { if (this.locked || this.animating) return; i = $jc.intval(i); if (this.options.wrap != 'circular') i = i < 1 ? 1 : (this.options.size && i > this.options.size ? this.options.size : i); var back = this.first > i; var pos = $jc.intval(this.list.css(this.lt)); var f = this.options.wrap != 'circular' && this.first <= 1 ? 1 : this.first; var c = back ? this.get(f) : this.get(this.last); var j = back ? f : f - 1; var e = null, l = 0, p = false, d = 0; while (back ? --j >= i : ++j < i) { e = this.get(j); p = !e.length; if (e.length == 0) { e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); c[back ? 'before' : 'after'](e) } c = e; d = this.dimension(e); if (p) l += d; if (this.first != null && (this.options.wrap == 'circular' || (j >= 1 && (this.options.size == null || j <= this.options.size)))) pos = back ? pos + d : pos - d } var clipping = this.clipping(); var cache = []; var visible = 0, j = i, v = 0; var c = this.get(i - 1); while (++visible) { e = this.get(j); p = !e.length; if (e.length == 0) { e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); c.length == 0 ? this.list.prepend(e) : c[back ? 'before' : 'after'](e) } c = e; var d = this.dimension(e); if (d == 0) { alert('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...'); return 0 } if (this.options.wrap != 'circular' && this.options.size !== null && j > this.options.size) cache.push(e); else if (p) l += d; v += d; if (v >= clipping) break; j++ } for (var x = 0; x < cache.length; x++) cache[x].remove(); if (l > 0) { this.list.css(this.wh, this.dimension(this.list) + l + 'px'); if (back) { pos -= l; this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - l + 'px') } } var last = i + visible - 1; if (this.options.wrap != 'circular' && this.options.size && last > this.options.size) last = this.options.size; if (j > last) { visible = 0, j = last, v = 0; while (++visible) { var e = this.get(j--); if (!e.length) break; v += this.dimension(e); if (v >= clipping) break } } var first = last - visible + 1; if (this.options.wrap != 'circular' && first < 1) first = 1; if (this.inTail && back) { pos += this.tail; this.inTail = false } this.tail = null; if (this.options.wrap != 'circular' && last == this.options.size && (last - visible + 1) >= 1) { var m = $jc.margin(this.get(last), !this.options.vertical ? 'marginRight' : 'marginBottom'); if ((v - m) > clipping) this.tail = v - clipping - m } while (i-- > first) pos += this.dimension(this.get(i)); this.prevFirst = this.first; this.prevLast = this.last; this.first = first; this.last = last; return pos }, animate: function(p, a) { if (this.locked || this.animating) return; this.animating = true; var self = this; var scrolled = function() { self.animating = false; if (p == 0) self.list.css(self.lt, 0); if (self.options.wrap == 'both' || self.options.wrap == 'last' || self.options.size == null || self.last < self.options.size) self.startAuto(); self.buttons(); self.notify('onAfterAnimation') }; this.notify('onBeforeAnimation'); if (!this.options.animation || a == false) { this.list.css(this.lt, p + 'px'); scrolled() } else { var o = !this.options.vertical ? { 'left': p} : { 'top': p }; this.list.animate(o, this.options.animation, this.options.easing, scrolled) } }, startAuto: function(s) { if (s != undefined) this.options.auto = s; if (this.options.auto == 0) return this.stopAuto(); if (this.timer != null) return; var self = this; this.timer = setTimeout(function() { self.next() }, this.options.auto * 1000) }, stopAuto: function() { if (this.timer == null) return; clearTimeout(this.timer); this.timer = null }, buttons: function(n, p) { if (n == undefined || n == null) { var n = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'first') || this.options.size == null || this.last < this.options.size); if (!this.locked && (!this.options.wrap || this.options.wrap == 'first') && this.options.size != null && this.last >= this.options.size) n = this.tail != null && !this.inTail } if (p == undefined || p == null) { var p = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'last') || this.first > 1); if (!this.locked && (!this.options.wrap || this.options.wrap == 'last') && this.options.size != null && this.first == 1) p = this.tail != null && this.inTail } var self = this; this.buttonNext[n ? 'bind' : 'unbind'](this.options.buttonNextEvent, this.funcNext)[n ? 'removeClass' : 'addClass'](this.className('jcarousel-next-disabled')).attr('disabled', n ? false : true); this.buttonPrev[p ? 'bind' : 'unbind'](this.options.buttonPrevEvent, this.funcPrev)[p ? 'removeClass' : 'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled', p ? false : true); if (this.buttonNext.length > 0 && (this.buttonNext[0].jcarouselstate == undefined || this.buttonNext[0].jcarouselstate != n) && this.options.buttonNextCallback != null) { this.buttonNext.each(function() { self.options.buttonNextCallback(self, this, n) }); this.buttonNext[0].jcarouselstate = n } if (this.buttonPrev.length > 0 && (this.buttonPrev[0].jcarouselstate == undefined || this.buttonPrev[0].jcarouselstate != p) && this.options.buttonPrevCallback != null) { this.buttonPrev.each(function() { self.options.buttonPrevCallback(self, this, p) }); this.buttonPrev[0].jcarouselstate = p } }, notify: function(evt) { var state = this.prevFirst == null ? 'init' : (this.prevFirst < this.first ? 'next' : 'prev'); this.callback('itemLoadCallback', evt, state); if (this.prevFirst !== this.first) { this.callback('itemFirstInCallback', evt, state, this.first); this.callback('itemFirstOutCallback', evt, state, this.prevFirst) } if (this.prevLast !== this.last) { this.callback('itemLastInCallback', evt, state, this.last); this.callback('itemLastOutCallback', evt, state, this.prevLast) } this.callback('itemVisibleInCallback', evt, state, this.first, this.last, this.prevFirst, this.prevLast); this.callback('itemVisibleOutCallback', evt, state, this.prevFirst, this.prevLast, this.first, this.last) }, callback: function(cb, evt, state, i1, i2, i3, i4) { if (this.options[cb] == undefined || (typeof this.options[cb] != 'object' && evt != 'onAfterAnimation')) return; var callback = typeof this.options[cb] == 'object' ? this.options[cb][evt] : this.options[cb]; if (!$.isFunction(callback)) return; var self = this; if (i1 === undefined) callback(self, state, evt); else if (i2 === undefined) this.get(i1).each(function() { callback(self, this, i1, state, evt) }); else { for (var i = i1; i <= i2; i++) if (i !== null && !(i >= i3 && i <= i4)) this.get(i).each(function() { callback(self, this, i, state, evt) }) } }, create: function(i) { return this.format('<li></li>', i) }, format: function(e, i) { var $e = $(e).addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-' + i)); $e.attr('jcarouselindex', i); return $e }, className: function(c) { return c + ' ' + c + (!this.options.vertical ? '-horizontal' : '-vertical') }, dimension: function(e, d) { var el = e.jquery != undefined ? e[0] : e; var old = !this.options.vertical ? el.offsetWidth + $jc.margin(el, 'marginLeft') + $jc.margin(el, 'marginRight') : el.offsetHeight + $jc.margin(el, 'marginTop') + $jc.margin(el, 'marginBottom'); if (d == undefined || old == d) return old; var w = !this.options.vertical ? d - $jc.margin(el, 'marginLeft') - $jc.margin(el, 'marginRight') : d - $jc.margin(el, 'marginTop') - $jc.margin(el, 'marginBottom'); $(el).css(this.wh, w + 'px'); return this.dimension(el) }, clipping: function() { return !this.options.vertical ? this.clip[0].offsetWidth - $jc.intval(this.clip.css('borderLeftWidth')) - $jc.intval(this.clip.css('borderRightWidth')) : this.clip[0].offsetHeight - $jc.intval(this.clip.css('borderTopWidth')) - $jc.intval(this.clip.css('borderBottomWidth')) }, index: function(i, s) { if (s == undefined) s = this.options.size; return Math.round((((i - 1) / s) - Math.floor((i - 1) / s)) * s) + 1 } }); $jc.extend({ defaults: function(d) { return $.extend(defaults, d || {}) }, margin: function(e, p) { if (!e) return 0; var el = e.jquery != undefined ? e[0] : e; if (p == 'marginRight' && $.browser.safari) { var old = { 'display': 'block', 'float': 'none', 'width': 'auto' }, oWidth, oWidth2; $.swap(el, old, function() { oWidth = el.offsetWidth }); old['marginRight'] = 0; $.swap(el, old, function() { oWidth2 = el.offsetWidth }); return oWidth2 - oWidth } return $jc.intval($.css(el, p)) }, intval: function(v) { v = parseInt(v); return isNaN(v) ? 0 : v } }) })(jQuery);