/* -------------------------------------------- VIE Portal NG v7.0.Soks-2014.03.29 - ©Copyright 2010-2014 VIEPortal.net All major Javascript libraries for working at client-side ----------------------------------------------*/ var $j = null; try{$j=jQuery.noConflict(); }catch(e){} function _addCss(){var url = arguments[0]||'';if (url=='')return;var css = Element.extend(document.createElement('link'));css.writeAttribute('rel', 'stylesheet');css.writeAttribute('type', 'text/css');css.writeAttribute('href', url);if (arguments.length > 1)css.writeAttribute('id', arguments[1]);$$('head')[0].appendChild(css);}function _addScript(){var url = arguments[0]||'';if (url=='')return;var async = arguments[1]||'';var id = arguments[2]||'';var ver = arguments[3]||'';if (ver!= '') {if (url.indexOf('?')>0) {url += '&v=' + ver;} else {url += '?v=' + ver;}}var script = Element.extend(document.createElement('script'));script.writeAttribute('type', 'text/javascript');if (id != '')script.writeAttribute('id', id);if (async != '')script.writeAttribute('async', async);script.writeAttribute('src', url);$$('script')[0].insert({after:script});} if (!$j) _addScript('http://st.vnsteel.vn/Common/Scripts/Js.axd?files=jQuery,jQuery.UI,Scriptaculous.Builder,Scriptaculous.Effects,Scriptaculous.Effects.BlindRight,Scriptaculous.DragDrop,Scriptaculous.Controls,Scriptaculous.Slider,Scriptaculous.Sound&v=7.0.kentoe.vns'); else if (!___isMobilePlatform) { var jsLibs = ['//cdnjs.cloudflare.com/ajax/libs/scriptaculous/1.9.0/builder.min.js','//cdnjs.cloudflare.com/ajax/libs/scriptaculous/1.9.0/dragdrop.min.js','//cdnjs.cloudflare.com/ajax/libs/scriptaculous/1.9.0/controls.min.js','//cdnjs.cloudflare.com/ajax/libs/scriptaculous/1.9.0/slider.min.js','//cdnjs.cloudflare.com/ajax/libs/scriptaculous/1.9.0/sound.min.js','//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js'];for (var i=0;i
by
', loading: '
loadingLoading or Cancel
', iframe: '{body_replace}', gallery: { top: '

{gallery_title_replace}

" } }, formMethod: "get", hideFlash: !1, hideGalleryTab: !1, showTitleBar: !0, animationHandler: !1, navigationHandler: !1, transitionHandler: !1, finalAnimationHandler: !1, formHandler: !1, galleryAnimationHandler: !1, showGalleryCount: !0 }, n || {}), this.duration = (11 - this.options.resizeSpeed) * .1, this._setupLinks(), this._getScroll(), this._getPageDimensions(), this._browserDimensions(), this._addLightWindowMarkup(!1), this._setupDimensions(), this.buildGalleryList() }, activate: function (n, t) { this._clearWindowContents(!0), this._addLoadingWindowMarkup(), this._setupWindowElements(t), this._getScroll(), this._browserDimensions(), this._setupDimensions(), this._toggleTroubleElements("hidden", !1), this._displayLightWindow("block", "hidden"), this._setStatus(!0), this._monitorKeyboard(!0), this._prepareIE(!0), this._loadWindow() }, deactivate: function () { this.windowActive = !1, this.activeGallery = !1, this.options.hideGalleryTab || this._handleGalleryAnimation(!1), this.animating = !1, this.element = null, this._displayLightWindow("none", "visible"), this._clearWindowContents(!1); var n = Effect.Queues.get("lightwindowAnimation").each(function (n) { n.cancel() }); this._prepareIE(!1), this._setupDimensions(), this._toggleTroubleElements("visible", !1), this._monitorKeyboard(!1) }, createWindow: function (n) { this._processLink($(n)) }, activateWindow: function (n) { this.element = Object.extend({ href: null, title: null, author: null, caption: null, rel: null, top: null, left: null, type: null, showImages: null, height: null, width: null, loadingAnimation: null, iframeEmbed: null, form: null }, n || {}), this.contentToFetch = this.element.href, this.windowType = this.element.type ? this.element.type : this._fileType(this.element.href), this._clearWindowContents(!0), this._addLoadingWindowMarkup(), this._getScroll(), this._browserDimensions(), this._setupDimensions(), this._toggleTroubleElements("hidden", !1), this._displayLightWindow("block", "hidden"), this._setStatus(!0), this._monitorKeyboard(!0), this._prepareIE(!0), this._loadWindow() }, submitForm: function (n) { this.options.formHandler ? this.options.formHandler(n) : this._defaultFormHandler(n) }, openWindow: function (n) { var n = $(n); this.windowActive = !0, this._clearWindowContents(!0), this._addLoadingWindowMarkup(), this._setupWindowElements(n), this._setStatus(!0), this._handleTransition() }, navigateWindow: function (n) { this._handleNavigation(!1), n == "previous" ? this.openWindow(this.navigationObservers.previous) : n == "next" && this.openWindow(this.navigationObservers.next) }, buildGalleryList: function () { var n = "", t; for (i in this.galleries) if (typeof this.galleries[i] == "object") { n += this.options.skin.gallery.top.replace("{gallery_title_replace}", unescape(i)); for (j in this.galleries[i]) typeof this.galleries[i][j] == "object" && (t = '' + unescape(j) + "", n += this.options.skin.gallery.middle.replace("{gallery_link_replace}", t)); n += this.options.skin.gallery.bottom } new Insertion.Top("lightwindow_galleries_list", n); for (i in this.galleries) if (typeof this.galleries[i] == "object") for (j in this.galleries[i]) typeof this.galleries[i][j] == "object" && (Event.observe($("lightwindow_gallery_" + i + "_" + j), "click", this.openWindow.bind(this, this.galleries[i][j][0]), !1), $("lightwindow_gallery_" + i + "_" + j).onclick = function () { return !1 }) }, _setupLinks: function () { var n = $$("." + this.options.classNames.standard); n.each(function (n) { this._processLink(n) }.bind(this)) }, _processLink: function (n) { var t, i; (this._fileType(n.getAttribute("href")) == "image" || this._fileType(n.getAttribute("href")) == "media") && (gallery = this._getGalleryInfo(n.rel)) && (this.galleries[gallery[0]] || (this.galleries[gallery[0]] = []), this.galleries[gallery[0]][gallery[1]] || (this.galleries[gallery[0]][gallery[1]] = []), this.galleries[gallery[0]][gallery[1]].push(n)), t = n.getAttribute("href"), t.indexOf("?") > -1 && (t = t.substring(0, t.indexOf("?"))), i = t.substring(t.indexOf("#") + 1), $(i) && $(i).setStyle({ display: "none" }), Event.observe(n, "click", this.activate.bindAsEventListener(this, n), !1), n.onclick = function () { return !1 } }, _setupActions: function () { var n = $$("#lightwindow_container ." + this.options.classNames.action); n.each(function (n) { Event.observe(n, "click", this[n.getAttribute("rel")].bindAsEventListener(this, n), !1), n.onclick = function () { return !1 } }.bind(this)) }, _addLightWindowMarkup: function () { var t = Element.extend(document.createElement("div")), i, r; t.setAttribute("id", "lightwindow_overlay"), Prototype.Browser.Gecko ? t.setStyle({ backgroundImage: "url(" + this.options.overlay.presetImage + ")", backgroundRepeat: "repeat", height: this.pageDimensions.height + "px" }) : t.setStyle({ opacity: this.options.overlay.opacity, backgroundImage: "url(" + this.options.overlay.image + ")", backgroundRepeat: "repeat", height: this.pageDimensions.height + "px" }), i = Element.extend(document.createElement("div")), i.setAttribute("id", "lightwindow"), i.setStyle({ zIndex: 8888 }), i.update(this.options.skin.main), r = document.getElementsByTagName("body")[0], r.appendChild(t), r.appendChild(i), $("lightwindow_title_bar_close_link") && (Event.observe("lightwindow_title_bar_close_link", "click", this.deactivate.bindAsEventListener(this)), $("lightwindow_title_bar_close_link").onclick = function () { return !1 }), Event.observe($("lightwindow_previous"), "click", this.navigateWindow.bind(this, "previous"), !1), $("lightwindow_previous").onclick = function () { return !1 }, Event.observe($("lightwindow_next"), "click", this.navigateWindow.bind(this, "next"), !1), $("lightwindow_next").onclick = function () { return !1 }, this.options.hideGalleryTab || (Event.observe($("lightwindow_galleries_tab"), "click", this._handleGalleryAnimation.bind(this, !0), !1), $("lightwindow_galleries_tab").onclick = function () { return !1 }), Prototype.Browser.IE ? Event.observe(document, "mousewheel", this._stopScrolling.bindAsEventListener(this), !1) : Event.observe(window, "DOMMouseScroll", this._stopScrolling.bindAsEventListener(this), !1), Event.observe(t, "click", this.deactivate.bindAsEventListener(this), !1), t.onclick = function () { return !1 } }, _addLoadingWindowMarkup: function () { $("lightwindow_contents").innerHTML += this.options.skin.loading }, _setupWindowElements: function (n) { this.element = n, this.element.title = n.getAttribute("title"), this.element.author = n.getAttribute("author"), this.element.caption = n.getAttribute("caption"), this.element.rel = n.getAttribute("rel"), this.element.params = n.getAttribute("params"), this.contentToFetch = this.element.href, this.windowType = this._getParameter("lightwindow_type") ? this._getParameter("lightwindow_type") : this._fileType(this.contentToFetch) }, _clearWindowContents: function (n) { if ($("lightwindow_iframe") && Element.remove($("lightwindow_iframe")), $("lightwindow_media_primary")) { try { $("lightwindow_media_primary").Stop() } catch (t) { } Element.remove($("lightwindow_media_primary")) } if ($("lightwindow_media_secondary")) { try { $("lightwindow_media_secondary").Stop() } catch (t) { } Element.remove($("lightwindow_media_secondary")) } this.activeGallery = !1, this._handleNavigation(this.activeGallery), n && ($("lightwindow_contents").innerHTML = "", $("lightwindow_contents").setStyle({ overflow: "hidden" }), this.windowActive || ($("lightwindow_data_slide_inner").setStyle({ display: "none" }), $("lightwindow_title_bar_title").innerHTML = ""), $("lightwindow_data_slide").setStyle({ height: "auto" })), this.resizeTo.height = null, this.resizeTo.width = null }, _setStatus: function (n) { this.animating = n, n && Element.show("lightwindow_loading"), /MSIE 6./i.test(navigator.userAgent) || this._fixedWindow(n) }, _fixedWindow: function (n) { n ? this.windowActive ? (this._getScroll(), $("lightwindow").setStyle({ position: "absolute", top: parseFloat($("lightwindow").getStyle("top")) + this.pagePosition.y + "px", left: parseFloat($("lightwindow").getStyle("left")) + this.pagePosition.x + "px" })) : $("lightwindow").setStyle({ position: "absolute" }) : this.windowActive ? (this._getScroll(), $("lightwindow").setStyle({ position: "fixed", top: parseFloat($("lightwindow").getStyle("top")) - this.pagePosition.y + "px", left: parseFloat($("lightwindow").getStyle("left")) - this.pagePosition.x + "px" })) : ($("lightwindow_iframe") && this._browserDimensions(), $("lightwindow").setStyle({ position: "fixed", top: parseFloat(this._getParameter("lightwindow_top")) ? parseFloat(this._getParameter("lightwindow_top")) + "px" : this.dimensions.viewport.height / 2 + "px", left: parseFloat(this._getParameter("lightwindow_left")) ? parseFloat(this._getParameter("lightwindow_left")) + "px" : this.dimensions.viewport.width / 2 + "px" })) }, _prepareIE: function (n) { var u, f, t, i, r; Prototype.Browser.IE && (t = n ? "100%" : "auto", i = document.getElementsByTagName("body")[0], r = document.getElementsByTagName("html")[0], r.style.height = i.style.height = t) }, _stopScrolling: function (n) { this.animating && (n.preventDefault && n.preventDefault(), n.returnValue = !1) }, _getScroll: function () { typeof window.pageYOffset == "number" ? (this.pagePosition.x = window.pageXOffset, this.pagePosition.y = window.pageYOffset) : document.body && (document.body.scrollLeft || document.body.scrollTop) ? (this.pagePosition.x = document.body.scrollLeft, this.pagePosition.y = document.body.scrollTop) : document.documentElement && (this.pagePosition.x = document.documentElement.scrollLeft, this.pagePosition.y = document.documentElement.scrollTop) }, _setScroll: function (n, t) { document.documentElement.scrollLeft = n, document.documentElement.scrollTop = t }, _toggleTroubleElements: function (n, t) { for (var e, f, u, r = t ? $("lightwindow_contents").getElementsByTagName("select") : document.getElementsByTagName("select"), i = 0; i < r.length; i++) r[i].style.visibility = n; if (!t) { if (this.options.hideFlash) { for (e = document.getElementsByTagName("object"), i = 0; i != e.length; i++) e[i].style.visibility = n; for (f = document.getElementsByTagName("embed"), i = 0; i != f.length; i++) f[i].style.visibility = n } for (u = document.getElementsByTagName("iframe"), i = 0; i != u.length; i++) u[i].style.visibility = n } }, _getPageDimensions: function () { var i, r, n, t; window.innerHeight && window.scrollMaxY ? (i = document.body.scrollWidth, r = window.innerHeight + window.scrollMaxY) : document.body.scrollHeight > document.body.offsetHeight ? (i = document.body.scrollWidth, r = document.body.scrollHeight) : (i = document.body.offsetWidth, r = document.body.offsetHeight), self.innerHeight ? (n = self.innerWidth, t = self.innerHeight) : document.documentElement && document.documentElement.clientHeight ? (n = document.documentElement.clientWidth, t = document.documentElement.clientHeight) : document.body && (n = document.body.clientWidth, t = document.body.clientHeight), this.pageDimensions.height = r < t ? t : r, this.pageDimensions.width = i < n ? n : i }, _displayLightWindow: function (n, t) { $("lightwindow_overlay").style.display = $("lightwindow").style.display = $("lightwindow_container").style.display = n, $("lightwindow_overlay").style.visibility = $("lightwindow").style.visibility = $("lightwindow_container").style.visibility = t }, _setupDimensions: function () { var t, n, r, i; switch (this.windowType) { case "page": t = this.options.dimensions.page.height, n = this.options.dimensions.page.width; break; case "image": t = this.options.dimensions.image.height, n = this.options.dimensions.image.width; break; case "media": t = this.options.dimensions.media.height, n = this.options.dimensions.media.width; break; case "external": t = this.options.dimensions.external.height, n = this.options.dimensions.external.width; break; case "inline": t = this.options.dimensions.inline.height, n = this.options.dimensions.inline.width; break; default: t = this.options.dimensions.page.height, n = this.options.dimensions.page.width } r = this._getParameter("lightwindow_top") ? parseFloat(this._getParameter("lightwindow_top")) + this.pagePosition.y : this.dimensions.viewport.height / 2 + this.pagePosition.y, i = this._getParameter("lightwindow_left") ? parseFloat(this._getParameter("lightwindow_left")) + this.pagePosition.x : this.dimensions.viewport.width / 2 + this.pagePosition.x, $("lightwindow").setStyle({ top: r + "px", left: i + "px" }), $("lightwindow_container").setStyle({ height: t + "px", width: n + "px", left: -(n / 2) + "px", top: -(t / 2) + "px" }), $("lightwindow_contents").setStyle({ height: t + "px", width: n + "px" }) }, _fileType: function (n) { var u = new RegExp("[^.].(" + this.options.fileTypes.image.join("|") + ")s*$", "i"); if (u.test(n)) return "image"; if (n.indexOf("#") > -1 && document.domain == this._getDomain(n)) return "inline"; n.indexOf("?") > -1 && (n = n.substring(0, n.indexOf("?"))); var t = "unknown", r = new RegExp("[^.].(" + this.options.fileTypes.page.join("|") + ")s*$", "i"), i = new RegExp("[^.].(" + this.options.fileTypes.media.join("|") + ")s*$", "i"); return (document.domain != this._getDomain(n) && (t = "external"), i.test(n) && (t = "media"), t == "external" || t == "media") ? t : ((r.test(n) || n.substr(n.length - 1, n.length) == "/") && (t = "page"), t == "unknown" && (n.indexOf(".ashx") > -1 || n.indexOf(".aspx") > -1) && (t = "external"), t) }, _fileExtension: function (n) { var i, t; for (n.indexOf("?") > -1 && (n = n.substring(0, n.indexOf("?"))), i = "", t = n.length - 1; t > -1; t--) { if (n.charAt(t) == ".") return i; i = n.charAt(t) + i } }, _monitorKeyboard: function (n) { document.onkeydown = n ? this._eventKeypress.bind(this) : "" }, _eventKeypress: function (n) { var t; t = n == null ? event.keyCode : n.which; switch (t) { case 27: this.deactivate(); break; case 13: return } if (this.animating) return !1; switch (String.fromCharCode(t).toLowerCase()) { case "p": this.navigationObservers.previous && this.navigateWindow("previous"); break; case "n": this.navigationObservers.next && this.navigateWindow("next") } }, _getGalleryInfo: function (n) { return n ? n.indexOf("[") > -1 ? [escape(n.substring(0, n.indexOf("["))), escape(n.substring(n.indexOf("[") + 1, n.indexOf("]")))] : !1 : !1 }, _getDomain: function (n) { var u = n.indexOf("//"), f = u + 2, r = n.substring(f, n.length), e = r.indexOf("/"), t = r.substring(0, e), i; return t.indexOf(":") > -1 && (i = t.indexOf(":"), t = t.substring(0, i)), t }, _getParameter: function (n, t) { var i, f; if (!this.element) return !1; if (n == "lightwindow_top" && this.element.top) return unescape(this.element.top); if (n == "lightwindow_left" && this.element.left) return unescape(this.element.left); if (n == "lightwindow_type" && this.element.type) return unescape(this.element.type); if (n == "lightwindow_show_images" && this.element.showImages) return unescape(this.element.showImages); if (n == "lightwindow_height" && this.element.height) return unescape(this.element.height); if (n == "lightwindow_width" && this.element.width) return unescape(this.element.width); if (n == "lightwindow_loading_animation" && this.element.loadingAnimation) return unescape(this.element.loadingAnimation); if (n == "lightwindow_iframe_embed" && this.element.iframeEmbed) return unescape(this.element.iframeEmbed); if (n == "lightwindow_form" && this.element.form) return unescape(this.element.form); if (!t) if (this.element.params) t = this.element.params; else return; var u, r = t.split(","), e = n + "=", o = e.length; for (i = 0; i < r.length; i++) if (r[i].substr(0, o) == e) { f = r[i].split("="), u = f[1]; break } return u ? unescape(u) : !1 }, _browserDimensions: function () { Prototype.Browser.IE ? (this.dimensions.viewport.height = document.documentElement.clientHeight, this.dimensions.viewport.width = document.documentElement.clientWidth) : (this.dimensions.viewport.height = window.innerHeight, this.dimensions.viewport.width = document.width || document.body.offsetWidth) }, _getScrollerWidth: function () { var n = Element.extend(document.createElement("div")), t, u, r, i; n.setAttribute("id", "lightwindow_scroll_div"), n.setStyle({ position: "absolute", top: "-10000px", left: "-10000px", width: "100px", height: "100px", overflow: "hidden" }), t = Element.extend(document.createElement("div")), t.setAttribute("id", "lightwindow_content_scroll_div"), t.setStyle({ width: "100%", height: "200px" }), n.appendChild(t), u = document.getElementsByTagName("body")[0], u.appendChild(n), r = $("lightwindow_content_scroll_div").offsetWidth, n.style.overflow = "auto", i = $("lightwindow_content_scroll_div").offsetWidth, Element.remove($("lightwindow_scroll_div")), this.scrollbarOffset = r - i }, _addParamToObject: function (n, t, i, r) { var u = document.createElement("param"); return u.setAttribute("value", t), u.setAttribute("name", n), r && u.setAttribute("id", r), i.appendChild(u), i }, _outerHTML: function (n) { if (Prototype.Browser.IE) return n.outerHTML; var i = n.cloneNode(!0), t = document.createElement("div"); return t.appendChild(i), t.innerHTML }, _convertToMarkup: function (n, t) { var r = this._outerHTML(n).replace("", ""), i; if (Prototype.Browser.IE) { for (i = 0; i < n.childNodes.length; i++) r += this._outerHTML(n.childNodes[i]); r += "" } return r }, _appendObject: function (n, t, i) { var u, r; if (Prototype.Browser.IE) { if (i.innerHTML += this._convertToMarkup(n, t), this.options.EOLASFix.indexOf(this._fileType(this.element.href)) > -1) for (u = document.getElementsByTagName("object"), r = 0; r < u.length; r++) u[r].getAttribute("data") && u[r].removeAttribute("data"), u[r].outerHTML = u[r].outerHTML, u[r].style.visibility = "visible" } else i.appendChild(n) }, _appendIframe: function (n) { var t = document.createElement("iframe"); t.setAttribute("id", "lightwindow_iframe"), t.setAttribute("name", "lightwindow_iframe"), t.setAttribute("src", "about:blank"), t.setAttribute("height", "100%"), t.setAttribute("width", "100%"), t.setAttribute("frameborder", "0"), t.setAttribute("marginwidth", "0"), t.setAttribute("marginheight", "0"), t.setAttribute("scrolling", n), this._appendObject(t, "iframe", $("lightwindow_contents")) }, _writeToIframe: function (n) { var t = this.options.skin.iframe; t = t.replace("{body_replace}", n), $("lightwindow_iframe").contentWindow ? ($("lightwindow_iframe").contentWindow.document.open(), $("lightwindow_iframe").contentWindow.document.write(t), $("lightwindow_iframe").contentWindow.document.close()) : ($("lightwindow_iframe").contentDocument.open(), $("lightwindow_iframe").contentDocument.write(t), $("lightwindow_iframe").contentDocument.close()) }, _loadWindow: function () { var r, t, n, u, i; switch (this.windowType) { case "image": if (n = 0, r = [], this.checkImage = [], this.resizeTo.height = this.resizeTo.width = 0, this.imageCount = this._getParameter("lightwindow_show_images") ? parseInt(this._getParameter("lightwindow_show_images")) : 1, gallery = this._getGalleryInfo(this.element.rel)) { for (n = 0; n < this.galleries[gallery[0]][gallery[1]].length; n++) if (this.contentToFetch.indexOf(this.galleries[gallery[0]][gallery[1]][n].href) > -1) break; this.navigationObservers.previous = this.galleries[gallery[0]][gallery[1]][n - this.imageCount] ? this.galleries[gallery[0]][gallery[1]][n - this.imageCount] : !1, this.navigationObservers.next = this.galleries[gallery[0]][gallery[1]][n + this.imageCount] ? this.galleries[gallery[0]][gallery[1]][n + this.imageCount] : !1, this.activeGallery = !0 } else this.navigationObservers.previous = !1, this.navigationObservers.next = !1, this.activeGallery = !1; for (t = n; t < n + this.imageCount; t++) gallery && this.galleries[gallery[0]][gallery[1]][t] && (this.contentToFetch = this.galleries[gallery[0]][gallery[1]][t].href, this.galleryLocation = { current: (t + 1) / this.imageCount, total: this.galleries[gallery[0]][gallery[1]].length / this.imageCount }, this.galleries[gallery[0]][gallery[1]][t + this.imageCount] ? ($("lightwindow_next").setStyle({ display: "block" }), $("lightwindow_next_title").innerHTML = this.galleries[gallery[0]][gallery[1]][t + this.imageCount].title) : $("lightwindow_next").setStyle({ display: "none" }), this.galleries[gallery[0]][gallery[1]][t - this.imageCount] ? ($("lightwindow_previous").setStyle({ display: "block" }), $("lightwindow_previous_title").innerHTML = this.galleries[gallery[0]][gallery[1]][t - this.imageCount].title) : $("lightwindow_previous").setStyle({ display: "none" })), r[t] = document.createElement("img"), r[t].setAttribute("id", "lightwindow_image_" + t), r[t].setAttribute("border", "0"), r[t].setAttribute("src", this.contentToFetch), $("lightwindow_contents").appendChild(r[t]), this.checkImage[t] = new PeriodicalExecuter(function (n) { if (!(typeof $("lightwindow_image_" + n).naturalWidth != "undefined" && $("lightwindow_image_" + n).naturalWidth == 0)) { this.checkImage[n].stop(); var t = $("lightwindow_image_" + n).getHeight(); t > this.resizeTo.height && (this.resizeTo.height = t), this.resizeTo.width += $("lightwindow_image_" + n).getWidth(), this.imageCount--, $("lightwindow_image_" + n).setStyle({ height: "100%" }), this.imageCount == 0 && this._processWindow() } }.bind(this, t), 1); break; case "media": if (n = 0, this.resizeTo.height = this.resizeTo.width = 0, gallery = this._getGalleryInfo(this.element.rel)) { for (n = 0; n < this.galleries[gallery[0]][gallery[1]].length; n++) if (this.contentToFetch.indexOf(this.galleries[gallery[0]][gallery[1]][n].href) > -1) break; this.navigationObservers.previous = this.galleries[gallery[0]][gallery[1]][n - 1] ? this.galleries[gallery[0]][gallery[1]][n - 1] : !1, this.navigationObservers.next = this.galleries[gallery[0]][gallery[1]][n + 1] ? this.galleries[gallery[0]][gallery[1]][n + 1] : !1, this.activeGallery = !0 } else this.navigationObservers.previous = !1, this.navigationObservers.next = !1, this.activeGallery = !1; gallery && this.galleries[gallery[0]][gallery[1]][n] && (this.contentToFetch = this.galleries[gallery[0]][gallery[1]][n].href, this.galleryLocation = { current: n + 1, total: this.galleries[gallery[0]][gallery[1]].length }, this.galleries[gallery[0]][gallery[1]][n + 1] ? ($("lightwindow_next").setStyle({ display: "block" }), $("lightwindow_next_title").innerHTML = this.galleries[gallery[0]][gallery[1]][n + 1].title) : $("lightwindow_next").setStyle({ display: "none" }), this.galleries[gallery[0]][gallery[1]][n - 1] ? ($("lightwindow_previous").setStyle({ display: "block" }), $("lightwindow_previous_title").innerHTML = this.galleries[gallery[0]][gallery[1]][n - 1].title) : $("lightwindow_previous").setStyle({ display: "none" })), this._getParameter("lightwindow_iframe_embed") ? (this.resizeTo.height = this.dimensions.viewport.height, this.resizeTo.width = this.dimensions.viewport.width) : (this.resizeTo.height = this._getParameter("lightwindow_height"), this.resizeTo.width = this._getParameter("lightwindow_width")), this._processWindow(); break; case "external": this._appendIframe("auto"), this.resizeTo.height = this.dimensions.viewport.height, this.resizeTo.width = this.dimensions.viewport.width, this._processWindow(); break; case "page": u = new Ajax.Request(this.contentToFetch, { method: "get", parameters: "", onComplete: function (n) { $("lightwindow_contents").innerHTML += n.responseText, this.resizeTo.height = $("lightwindow_contents").scrollHeight + this.options.contentOffset.height, this.resizeTo.width = $("lightwindow_contents").scrollWidth + this.options.contentOffset.width, this._processWindow() }.bind(this) }); break; case "inline": i = this.contentToFetch, i.indexOf("?") > -1 && (i = i.substring(0, i.indexOf("?"))), i = i.substring(i.indexOf("#") + 1), new Insertion.Top($("lightwindow_contents"), $(i).innerHTML), this.resizeTo.height = $("lightwindow_contents").scrollHeight + this.options.contentOffset.height, this.resizeTo.width = $("lightwindow_contents").scrollWidth + this.options.contentOffset.width, this._toggleTroubleElements("hidden", !0), this._processWindow(); break; default: throw "Page Type could not be determined, please amend this lightwindow URL " + this.contentToFetch; } }, _resizeWindowToFit: function () { var t, n; this.resizeTo.height + this.dimensions.cruft.height > this.dimensions.viewport.height && (t = this.resizeTo.height / this.resizeTo.width, this.resizeTo.height = this.dimensions.viewport.height - this.dimensions.cruft.height - 2 * this.options.viewportPadding, this.windowType != "image" && (this.windowType != "media" || this._getParameter("lightwindow_iframe_embed")) || (this.resizeTo.width = this.resizeTo.height / t, $("lightwindow_data_slide_inner").setStyle({ width: this.resizeTo.width + "px" }))), this.resizeTo.width + this.dimensions.cruft.width > this.dimensions.viewport.width && (n = this.resizeTo.width / this.resizeTo.height, this.resizeTo.width = this.dimensions.viewport.width - 2 * this.dimensions.cruft.width - 2 * this.options.viewportPadding, this.windowType != "image" && (this.windowType != "media" || this._getParameter("lightwindow_iframe_embed")) || (this.resizeTo.height = this.resizeTo.width / n, $("lightwindow_data_slide_inner").setStyle({ height: this.resizeTo.height + "px" }))) }, _presetWindowSize: function () { this._getParameter("lightwindow_height") && (this.resizeTo.height = parseFloat(this._getParameter("lightwindow_height"))), this._getParameter("lightwindow_width") && (this.resizeTo.width = parseFloat(this._getParameter("lightwindow_width"))) }, _processWindow: function () { var t, n; this.dimensions.dataEffects = [], this.element.caption || this.element.author || this.activeGallery && this.options.showGalleryCount ? (this.element.caption ? ($("lightwindow_data_caption").innerHTML = this.element.caption, $("lightwindow_data_caption").setStyle({ display: "block" })) : $("lightwindow_data_caption").setStyle({ display: "none" }), this.element.author ? ($("lightwindow_data_author").innerHTML = this.element.author, $("lightwindow_data_author_container").setStyle({ display: "block" })) : $("lightwindow_data_author_container").setStyle({ display: "none" }), this.activeGallery && this.options.showGalleryCount ? ($("lightwindow_data_gallery_current").innerHTML = this.galleryLocation.current, $("lightwindow_data_gallery_total").innerHTML = this.galleryLocation.total, $("lightwindow_data_gallery_container").setStyle({ display: "block" })) : $("lightwindow_data_gallery_container").setStyle({ display: "none" }), $("lightwindow_data_slide_inner").setStyle({ width: this.resizeTo.width + "px", height: "auto", visibility: "visible", display: "block" }), $("lightwindow_data_slide").setStyle({ height: $("lightwindow_data_slide").getHeight() + "px", width: "1px", overflow: "hidden", display: "block" })) : ($("lightwindow_data_slide").setStyle({ display: "none", width: "auto" }), $("lightwindow_data_slide_inner").setStyle({ display: "none", visibility: "hidden", width: this.resizeTo.width + "px", height: "0px" })), $("lightwindow_title_bar_title").innerHTML = this.element.title != "null" ? this.element.title : "", t = { height: $("lightwindow_container").getHeight(), width: $("lightwindow_container").getWidth() }, $("lightwindow_container").setStyle({ height: "auto", width: $("lightwindow_container").getWidth() + this.options.contentOffset.width - (this.windowActive ? this.options.contentOffset.width : 0) + "px" }), n = { height: $("lightwindow_container").getHeight(), width: $("lightwindow_container").getWidth() }, this.containerChange = { height: t.height - n.height, width: t.width - n.width }, this.dimensions.container = { height: $("lightwindow_container").getHeight(), width: $("lightwindow_container").getWidth() }, this.dimensions.cruft = { height: this.dimensions.container.height - $("lightwindow_contents").getHeight() + this.options.contentOffset.height, width: this.dimensions.container.width - $("lightwindow_contents").getWidth() + this.options.contentOffset.width }, this._presetWindowSize(), this._resizeWindowToFit(), this.windowActive || $("lightwindow_container").setStyle({ left: -(this.dimensions.container.width / 2) + "px", top: -(this.dimensions.container.height / 2) + "px" }), $("lightwindow_container").setStyle({ height: this.dimensions.container.height + "px", width: this.dimensions.container.width + "px" }), this._displayLightWindow("block", "visible"), this._animateLightWindow() }, _animateLightWindow: function () { this.options.animationHandler ? this.options.animationHandler().bind(this) : this._defaultAnimationHandler() }, _handleNavigation: function (n) { this.options.navigationHandler ? this.options.navigationHandler().bind(this, n) : this._defaultDisplayNavigation(n) }, _handleTransition: function () { this.options.transitionHandler ? this.options.transitionHandler().bind(this) : this._defaultTransitionHandler() }, _handleFinalWindowAnimation: function (n) { this.options.finalAnimationHandler ? this.options.finalAnimationHandler().bind(this, n) : this._defaultfinalWindowAnimationHandler(n) }, _handleGalleryAnimation: function (n) { this.options.galleryAnimationHandler ? this.options.galleryAnimationHandler().bind(this, n) : this._defaultGalleryAnimationHandler(n) }, _defaultDisplayNavigation: function (n) { n ? $("lightwindow_navigation").setStyle({ display: "block", height: $("lightwindow_contents").getHeight() + "px", width: "100%", marginTop: this.options.dimensions.titleHeight + "px" }) : $("lightwindow_navigation").setStyle({ display: "none", height: "auto", width: "auto" }) }, _defaultAnimationHandler: function () { (this.element.caption || this.element.author || this.activeGallery && this.options.showGalleryCount) && ($("lightwindow_data_slide").setStyle({ display: "none", width: "auto" }), this.dimensions.dataEffects.push(new Effect.SlideDown("lightwindow_data_slide", { sync: !0 }), new Effect.Appear("lightwindow_data_slide", { sync: !0, from: 0, to: 1 }))), $("lightwindow_title_bar_inner").setStyle({ height: "0px", marginTop: this.options.dimensions.titleHeight + "px" }), this.dimensions.dataEffects.push(new Effect.Morph("lightwindow_title_bar_inner", { sync: !0, style: { height: this.options.dimensions.titleHeight + "px", marginTop: "0px" } }), new Effect.Appear("lightwindow_title_bar_inner", { sync: !0, from: 0, to: 1 })), this.options.hideGalleryTab || (this._handleGalleryAnimation(!1), $("lightwindow_galleries_tab_container").getHeight() == 0 && (this.dimensions.dataEffects.push(new Effect.Morph("lightwindow_galleries_tab_container", { sync: !0, style: { height: "20px", marginTop: "0px" } })), $("lightwindow_galleries").setStyle({ width: "0px" }))); var t = !1, n = this.dimensions.container.width - $("lightwindow_contents").getWidth() + this.resizeTo.width + this.options.contentOffset.width; n != $("lightwindow_container").getWidth() && new Effect.Parallel([new Effect.Scale("lightwindow_contents", 100 * (this.resizeTo.width / $("lightwindow_contents").getWidth()), { scaleFrom: 100 * ($("lightwindow_contents").getWidth() / ($("lightwindow_contents").getWidth() + this.options.contentOffset.width)), sync: !0, scaleY: !1, scaleContent: !1 }), new Effect.Scale("lightwindow_container", 100 * (n / this.dimensions.container.width), { sync: !0, scaleY: !1, scaleFromCenter: !0, scaleContent: !1 })], { duration: this.duration, delay: .25, queue: { position: "end", scope: "lightwindowAnimation" } }), n = this.dimensions.container.height - $("lightwindow_contents").getHeight() + this.resizeTo.height + this.options.contentOffset.height, n != $("lightwindow_container").getHeight() && (new Effect.Parallel([new Effect.Scale("lightwindow_contents", 100 * (this.resizeTo.height / $("lightwindow_contents").getHeight()), { scaleFrom: 100 * ($("lightwindow_contents").getHeight() / ($("lightwindow_contents").getHeight() + this.options.contentOffset.height)), sync: !0, scaleX: !1, scaleContent: !1 }), new Effect.Scale("lightwindow_container", 100 * (n / this.dimensions.container.height), { sync: !0, scaleX: !1, scaleFromCenter: !0, scaleContent: !1 })], { duration: this.duration, afterFinish: function () { this.dimensions.dataEffects.length > 0 && (this.options.hideGalleryTab || $("lightwindow_galleries").setStyle({ width: this.resizeTo.width + "px" }), new Effect.Parallel(this.dimensions.dataEffects, { duration: this.duration, afterFinish: function () { this._finishWindow() }.bind(this), queue: { position: "end", scope: "lightwindowAnimation" } })) }.bind(this), queue: { position: "end", scope: "lightwindowAnimation" } }), t = !0), !t && this.dimensions.dataEffects.length > 0 && new Effect.Parallel(this.dimensions.dataEffects, { duration: this.duration, beforeStart: function () { this.options.hideGalleryTab || $("lightwindow_galleries").setStyle({ width: this.resizeTo.width + "px" }), (this.containerChange.height != 0 || this.containerChange.width != 0) && new Effect.MoveBy("lightwindow_container", this.containerChange.height, this.containerChange.width, { transition: Effect.Transitions.sinoidal }) }.bind(this), afterFinish: function () { this._finishWindow() }.bind(this), queue: { position: "end", scope: "lightwindowAnimation" } }) }, _defaultfinalWindowAnimationHandler: function () { this.windowType == "media" || this._getParameter("lightwindow_loading_animation") ? (Element.hide("lightwindow_loading"), this._handleNavigation(this.activeGallery), this._setStatus(!1)) : Effect.Fade("lightwindow_loading", { duration: .75, delay: 1, afterFinish: function () { this.windowType != "image" && this.windowType != "media" && this.windowType != "external" && $("lightwindow_contents").setStyle({ overflow: "auto" }), this._handleNavigation(this.activeGallery), this._defaultGalleryAnimationHandler(), this._setStatus(!1) }.bind(this), queue: { position: "end", scope: "lightwindowAnimation" } }) }, _defaultGalleryAnimationHandler: function (n) { var t; if (this.activeGallery) $("lightwindow_galleries").setStyle({ display: "block", marginBottom: $("lightwindow_data_slide").getHeight() + this.options.contentOffset.height / 2 + "px" }), $("lightwindow_navigation").setStyle({ height: $("lightwindow_contents").getHeight() - 20 + "px" }); else return $("lightwindow_galleries").setStyle({ display: "none" }), $("lightwindow_galleries_tab_container").setStyle({ height: "0px", marginTop: "20px" }), $("lightwindow_galleries_list").setStyle({ height: "0px" }), !1; n && ($("lightwindow_galleries_list").getHeight() == 0 ? (t = $("lightwindow_contents").getHeight() * .8, $("lightwindow_galleries_tab_span").className = "down") : (t = 0, $("lightwindow_galleries_tab_span").className = "up"), new Effect.Morph("lightwindow_galleries_list", { duration: this.duration, transition: Effect.Transitions.sinoidal, style: { height: t + "px" }, beforeStart: function () { $("lightwindow_galleries_list").setStyle({ overflow: "hidden" }) }, afterFinish: function () { $("lightwindow_galleries_list").setStyle({ overflow: "auto" }) }, queue: { position: "end", scope: "lightwindowAnimation" } })) }, _defaultTransitionHandler: function () { this.dimensions.dataEffects = [], $("lightwindow_data_slide").getStyle("display") != "none" && this.dimensions.dataEffects.push(new Effect.SlideUp("lightwindow_data_slide", { sync: !0 }), new Effect.Fade("lightwindow_data_slide", { sync: !0, from: 1, to: 0 })), this.options.hideGalleryTab || ($("lightwindow_galleries").getHeight() == 0 || this.options.hideGalleryTab || this.dimensions.dataEffects.push(new Effect.Morph("lightwindow_galleries_tab_container", { sync: !0, style: { height: "0px", marginTop: "20px" } })), $("lightwindow_galleries_list").getHeight() != 0 && ($("lightwindow_galleries_tab_span").className = "up", this.dimensions.dataEffects.push(new Effect.Morph("lightwindow_galleries_list", { sync: !0, style: { height: "0px" }, transition: Effect.Transitions.sinoidal, beforeStart: function () { $("lightwindow_galleries_list").setStyle({ overflow: "hidden" }) }, afterFinish: function () { $("lightwindow_galleries_list").setStyle({ overflow: "auto" }) } })))), this.dimensions.dataEffects.push(new Effect.Morph("lightwindow_title_bar_inner", { sync: !0, style: { height: "0px", marginTop: this.options.dimensions.titleHeight + "px" } }), new Effect.Fade("lightwindow_title_bar_inner", { sync: !0, from: 1, to: 0 })), new Effect.Parallel(this.dimensions.dataEffects, { duration: this.duration, afterFinish: function () { this._loadWindow() }.bind(this), queue: { position: "end", scope: "lightwindowAnimation" } }) }, _defaultFormHandler: function (n) { var t = Event.element(n).parentNode, r = Form.serialize(this._getParameter("lightwindow_form", t.getAttribute("params"))), i; this.options.formMethod == "post" ? i = new Ajax.Request(t.href, { method: "post", postBody: r, onComplete: this.openWindow.bind(this, t) }) : this.options.formMethod == "get" && (i = new Ajax.Request(t.href, { method: "get", parameters: r, onComplete: this.openWindow.bind(this, t) })) }, _finishWindow: function () { var n, t; this.windowType == "external" ? ($("lightwindow_iframe").setAttribute("src", this.element.href), this._handleFinalWindowAnimation(1)) : this.windowType == "media" ? (n = document.createElement("object"), n.setAttribute("classid", this.options.classids[this._fileExtension(this.contentToFetch)]), n.setAttribute("codebase", this.options.codebases[this._fileExtension(this.contentToFetch)]), n.setAttribute("id", "lightwindow_media_primary"), n.setAttribute("name", "lightwindow_media_primary"), n.setAttribute("width", this.resizeTo.width), n.setAttribute("height", this.resizeTo.height), n = this._addParamToObject("movie", this.contentToFetch, n), n = this._addParamToObject("src", this.contentToFetch, n), n = this._addParamToObject("controller", "true", n), n = this._addParamToObject("wmode", "transparent", n), n = this._addParamToObject("cache", "false", n), n = this._addParamToObject("quality", "high", n), Prototype.Browser.IE || (t = document.createElement("object"), t.setAttribute("type", this.options.mimeTypes[this._fileExtension(this.contentToFetch)]), t.setAttribute("data", this.contentToFetch), t.setAttribute("id", "lightwindow_media_secondary"), t.setAttribute("name", "lightwindow_media_secondary"), t.setAttribute("width", this.resizeTo.width), t.setAttribute("height", this.resizeTo.height), t = this._addParamToObject("controller", "true", t), t = this._addParamToObject("wmode", "transparent", t), t = this._addParamToObject("cache", "false", t), t = this._addParamToObject("quality", "high", t), n.appendChild(t)), this._getParameter("lightwindow_iframe_embed") ? (this._appendIframe("no"), this._writeToIframe(this._convertToMarkup(n, "object"))) : this._appendObject(n, "object", $("lightwindow_contents")), this._handleFinalWindowAnimation(0)) : this._handleFinalWindowAnimation(0), this._setupActions() } }, myLightWindow = null, $j(document).ready(function () { myLightWindow = new lightwindow, $j("#lightwindow_overlay").css({ opacity: myLightWindow.options.overlay.opacity }) }), $j(window).load(function () { __resetLightWindow() }); // ------------------------------------------------------- // Inline Popup Calendar // Refined by Quynh Nguyen - VIEPortal.net // ------------------------------------------------------- function hideElement(n, t) { if (ie) for (i = 0; i < document.all.tags(n).length; i++) if (obj = document.all.tags(n)[i], obj && obj.offsetParent) { for (objLeft = obj.offsetLeft, objTop = obj.offsetTop, objParent = obj.offsetParent; objParent.tagName.toUpperCase() != "BODY"; ) objLeft += objParent.offsetLeft, objTop += objParent.offsetTop, objParent = objParent.offsetParent; objHeight = obj.offsetHeight, objWidth = obj.offsetWidth, t.offsetLeft + t.offsetWidth <= objLeft || t.offsetTop + t.offsetHeight <= objTop || t.offsetTop >= objTop + objHeight + obj.height || t.offsetLeft >= objLeft + objWidth || (obj.style.visibility = "hidden") } } function showElement(n) { if (ie) for (i = 0; i < document.all.tags(n).length; i++) (obj = document.all.tags(n)[i], obj && obj.offsetParent) && (obj.style.visibility = "") } function HolidayRec(n, t, i, r) { this.d = n, this.m = t, this.y = i, this.desc = r } function addHoliday(n, t, i, r) { Holidays[HolidaysCounter++] = new HolidayRec(n, t, i, r) } function swapImage(n, t) { ie && $(n).setAttribute("src", imgDir + t) } function initPopUpCalendar() { try { ns4 || (ie || (yearNow += 1900), crossobj = dom ? $("calendar").style : ie ? document.all.calendar : document.calendar, hideCalendar(), crossMonthObj = dom ? $("selectMonth").style : ie ? document.all.selectMonth : document.selectMonth, crossYearObj = dom ? $("selectYear").style : ie ? document.all.selectYear : document.selectYear, monthConstructed = !1, yearConstructed = !1, showToday == 1 && $("lblToday").update('' + todayString[calLanguage] + " ' + fulldayName[today.getDay() - startAt == -1 ? 6 : today.getDay() - startAt] + ", " + dateNow + " " + monthName[calLanguage][monthNow] + " " + yearNow + ""), sHTML1 = "   ', sHTML1 += "   ', sHTML1 += " ", sHTML1 += " ", $("caption").update(sHTML1), bPageLoaded = !0) } catch (n) { } } function hideCalendar() { crossobj != null && (crossobj.visibility = "hidden"), crossMonthObj != null && (crossMonthObj.visibility = "hidden"), crossYearObj != null && (crossYearObj.visibility = "hidden"), showElement("SELECT"), showElement("APPLET") } function padZero(n) { return n < 10 ? "0" + n : n } function constructDate(n, t, i) { return sTmp = dateFormat, sTmp = sTmp.replace("dd", ""), sTmp = sTmp.replace("d", ""), sTmp = sTmp.replace("", padZero(n)), sTmp = sTmp.replace("", n), sTmp = sTmp.replace("mmmm", "

"), sTmp = sTmp.replace("mmm", ""), sTmp = sTmp.replace("mm", ""), sTmp = sTmp.replace("m", ""), sTmp = sTmp.replace("", t + 1), sTmp = sTmp.replace("", padZero(t + 1)), sTmp = sTmp.replace("", monthName[calLanguage][t]), sTmp = sTmp.replace("

", monthName2[calLanguage][t]), sTmp = sTmp.replace("yyyy", i), sTmp.replace("yy", padZero(i % 100)) } function GetPostVariable(n, t) { var r = location.href, i = r.indexOf("?".concat(n).concat("=")); return i == -1 && (i = r.indexOf("&".concat(n).concat("=")), i == -1) ? t : (r = r.substring(i + n.length + 2), i = r.indexOf("&"), i == -1 && (i = r.length), i > 0 && (r = r.substring(0, i)), r) } function closeCalendar() { if (hideCalendar(), ctlToPlaceValue.value = constructDate(dateSelected, monthSelected, yearSelected), inlineOpenUrl != "") location.href = inlineOpenUrl + ctlToPlaceValue.value; else if (__vie_Calendar_CallbackFunction != "") { var n = window[__vie_Calendar_CallbackFunction]; n && typeof n == "function" && (__vie_Calendar_CallbackFunction_First_Parameter != "" ? n(__vie_Calendar_CallbackFunction_First_Parameter, ctlToPlaceValue.value) : n(ctlToPlaceValue.value)) } else try { ctlToPlaceValue.focus() } catch (t) { } } function StartDecMonth() { intervalID1 = setInterval("decMonth()", 80) } function StartIncMonth() { intervalID1 = setInterval("incMonth()", 80) } function incMonth() { monthSelected++, monthSelected > 11 && (monthSelected = 0, yearSelected++), constructCalendar() } function decMonth() { monthSelected--, monthSelected < 0 && (monthSelected = 11, yearSelected--), constructCalendar() } function constructMonth() { if (popDownYear(), !monthConstructed) { for (sHTML = "", i = 0; i < 12; i++) sName = monthName[calLanguage][i], i == monthSelected && (sName = "" + sName + ""), sHTML += ' ' + sName + " "; $("selectMonth").update('' + sHTML + "
"), monthConstructed = !0 } } function popUpMonth() { visMonth == 1 ? (popDownMonth(), visMonth--) : (constructMonth(), crossMonthObj.visibility = dom || ie ? "visible" : "show", crossMonthObj.left = parseInt(crossobj.left) + 50 + "px", crossMonthObj.top = parseInt(crossobj.top) + 26 + "px", hideElement("SELECT", $("selectMonth")), hideElement("APPLET", $("selectMonth")), visMonth++) } function popDownMonth() { crossMonthObj.visibility = "hidden", visMonth = 0 } function incYear() { for (i = 0; i < 7; i++) newYear = i + nStartingYear + 1, txtYear = newYear == yearSelected ? ' ' + newYear + " " : ' ' + newYear + " ", $("y" + i).update(txtYear); nStartingYear++, bShow = !0 } function decYear() { for (i = 0; i < 7; i++) newYear = i + nStartingYear - 1, txtYear = newYear == yearSelected ? ' ' + newYear + " " : ' ' + newYear + " ", $("y" + i).update(txtYear); nStartingYear--, bShow = !0 } function selectYear(n) { yearSelected = parseInt(n + nStartingYear), yearConstructed = !1, constructCalendar(), popDownYear() } function constructYear() { if (popDownMonth(), sHTML = "", !yearConstructed) { for (sHTML = '-', j = 0, nStartingYear = yearSelected - 3, i = yearSelected - 3; i <= yearSelected + 3; i++) sName = i, i == yearSelected && (sName = "" + sName + ""), sHTML += ' ' + sName + " ", j++; sHTML += '+', $("selectYear").update('' + sHTML + "
"), yearConstructed = !0 } } function popDownYear() { clearInterval(intervalID1), clearTimeout(timeoutID1), clearInterval(intervalID2), clearTimeout(timeoutID2), crossYearObj.visibility = "hidden", visYear = 0 } function popUpYear() { var n; visYear == 1 ? (popDownYear(), visYear--) : (constructYear(), crossYearObj.visibility = dom || ie ? "visible" : "show", n = parseInt(crossobj.left) + $("spanYear").offsetLeft, ie && (n += 6), crossYearObj.left = n + "px", crossYearObj.top = parseInt(crossobj.top) + 26 + "px", visYear++) } function WeekNbr(n) { return year = n.getFullYear(), month = n.getMonth() + 1, day = startAt == 0 ? n.getDate() + 1 : n.getDate(), a = Math.floor((14 - month) / 12), y = year + 4800 - a, m = month + 12 * a - 3, b = Math.floor(y / 4) - Math.floor(y / 100) + Math.floor(y / 400), J = day + Math.floor((153 * m + 2) / 5) + 365 * y + b - 32045, d4 = (J + 31741 - J % 7) % 146097 % 36524 % 1461, L = Math.floor(d4 / 1460), d1 = (d4 - L) % 365 + L, week = Math.floor(d1 / 7) + 1 } function constructCalendar() { var u = Array(31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31), n, r = new Date(yearSelected, monthSelected, 1), i, t; for (monthSelected == 1 ? (i = new Date(yearSelected, monthSelected + 1, 1), i = new Date(i - 864e5), numDaysInMonth = i.getDate()) : numDaysInMonth = u[monthSelected], datePointer = 0, dayPointer = r.getDay() - startAt, dayPointer < 0 && (dayPointer = 6), sHTML = '', showWeekNumber == 1 && (sHTML += ''), t = 0; t < 7; t++) sHTML += '"; for (sHTML += "", showWeekNumber == 1 && (sHTML += '"), t = 1; t <= dayPointer; t++) sHTML += ""; for (datePointer = 1; datePointer <= numDaysInMonth; datePointer++) { for (dayPointer++, sHTML += '", showWeekNumber == 1 && datePointer < numDaysInMonth && (sHTML += '")) } $("content").update(sHTML), $("spanMonth").update(" " + monthName[calLanguage][monthSelected] + ' '), $("spanYear").update(" " + yearSelected + ' ') } function showCalendar(n, t, i, r, u, f, e) { r != null && r != "" && (calLanguage = r), enablePast = u != null ? u : 0, fixedX = f != null ? f : -1, fixedY = e != null ? e : -1, showToday == 1 && $("lblToday").update('' + todayString[calLanguage] + " ' + dayName[calLanguage][today.getDay() - startAt == -1 ? 6 : today.getDay() - startAt] + ", " + dateNow + " " + monthName[calLanguage][monthNow].substring(0, 3) + " " + yearNow + ""), popUpCalendar(n, t, i) } function popUpCalendarWithUrl(n, t, i, r) { inlineOpenUrl = r, popUpCalendar(n, t, i) } function popUpCalendar(n, t, r) { var e = 0, o = 0, u, f; if (bPageLoaded) { if (crossobj.visibility == "hidden") { if (ctlToPlaceValue = t, dateFormat = r, formatChar = " ", aFormat = dateFormat.split(formatChar), aFormat.length < 3 && (formatChar = "/", aFormat = dateFormat.split(formatChar), aFormat.length < 3 && (formatChar = ".", aFormat = dateFormat.split(formatChar), aFormat.length < 3 && (formatChar = "-", aFormat = dateFormat.split(formatChar), aFormat.length < 3 && (formatChar = "")))), tokensChanged = 0, formatChar != "") for (aData = t.value.split(formatChar), i = 0; i < 3; i++) if (aFormat[i] == "d" || aFormat[i] == "dd") dateSelected = parseInt(aData[i], 10), tokensChanged++; else if (aFormat[i] == "m" || aFormat[i] == "mm") monthSelected = parseInt(aData[i], 10) - 1, tokensChanged++; else if (aFormat[i] == "yyyy") yearSelected = parseInt(aData[i], 10), tokensChanged++; else if (aFormat[i] == "mmm") for (j = 0; j < 12; j++) aData[i] == monthName[calLanguage][j] && (monthSelected = j, tokensChanged++); else if (aFormat[i] == "mmmm") for (j = 0; j < 12; j++) aData[i] == monthName2[calLanguage][j] && (monthSelected = j, tokensChanged++); (tokensChanged != 3 || isNaN(dateSelected) || isNaN(monthSelected) || isNaN(yearSelected)) && (dateSelected = dateNow, monthSelected = monthNow, yearSelected = yearNow), odateSelected = dateSelected, omonthSelected = monthSelected, oyearSelected = yearSelected, aTag = n; do aTag = aTag.offsetParent, e += aTag.offsetLeft, o += aTag.offsetTop; while (aTag.tagName != "BODY"); u = fixedX == -1 ? n.offsetLeft + e : fixedX, f = fixedY == -1 ? n.offsetTop + o - 140 : fixedY, crossobj.left = u + "px", crossobj.top = f + "px", constructCalendar(1, monthSelected, yearSelected), crossobj.visibility = dom || ie ? "visible" : "show", hideElement("SELECT", $("calendar")), hideElement("APPLET", $("calendar")), bShow = !0 } else hideCalendar(), ctlNow != n && popUpCalendar(n, t, r); ctlNow = n } } function ___showCalendar(n, t, i) { var r = $(t); (r || (r = document.getElementByName(t)), r) && (arguments.length > 3 && (__vie_Calendar_CallbackFunction = arguments[3]), arguments.length > 4 && (__vie_Calendar_CallbackFunction_First_Parameter = arguments[4]), popUpCalendar(n, r, i.toLowerCase())) } function ___showCalendarWithUrl(n, t, i) { var r = $("___popCalendarOutput"); r || (r = document.getElementByName("___popCalendarOutput")), popUpCalendarWithUrl(n, r, t.toLowerCase(), i) } var calLanguage = calLanguage || "en", enablePast = 1, enableFuture = 1, fixedX = -1, fixedY = -1, startAt = 1, showWeekNumber = 1, showToday = 1, imgDir = imgDir || "/Common/Images/Calendar/", inlineOpenUrl = "", __vie_Calendar_CallbackFunction = "", __vie_Calendar_CallbackFunction_First_Parameter = "", dayName = "", fulldayName = "", gotoString = { en: "Go To Current Month", es: "Ir al Mes Actual", de: "Gehe zu aktuellem Monat", vi: "Chọn tháng này" }, todayString = { en: "Today is", es: "Hoy es", de: "Heute ist", vi: "Hôm nay là" }, weekString = { en: "Wk", es: "Sem", de: "KW", vi: "Tuần" }, scrollLeftMessage = { en: "Click to scroll to previous month. Hold mouse button to scroll automatically.", es: "Presione para pasar al mes anterior. Deje presionado para pasar varios meses.", de: "Klicken um zum vorigen Monat zu gelangen. Gedrückt halten, um automatisch weiter zu scrollen.", vi: "Click để chọn tháng trước. Giữ chuột để trượt tự động." }, scrollRightMessage = { en: "Click to scroll to next month. Hold mouse button to scroll automatically.", es: "Presione para pasar al siguiente mes. Deje presionado para pasar varios meses.", de: "Klicken um zum nächsten Monat zu gelangen. Gedrückt halten, um automatisch weiter zu scrollen.", vi: "Click để chọn tháng sau. Giữ chuột để trượt tự động." }, selectMonthMessage = { en: "Click to select a month.", es: "Presione para seleccionar un mes", de: "Klicken um Monat auszuwählen", vi: "Click để chọn tháng." }, selectYearMessage = { en: "Click to select a year.", es: "Presione para seleccionar un año", de: "Klicken um Jahr auszuwählen", vi: "Click để chọn năm." }, selectDateMessage = { en: "Select [date] as date.", es: "Seleccione [date] como fecha", de: "Wähle [date] als Datum.", vi: "Chọn ngày [date]" }, monthName = { en: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], es: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], de: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], vi: ["Tháng Giêng", "Tháng Hai", "Tháng Ba", "Tháng Tư", "Tháng Năm", "Tháng Sáu", "Tháng Bảy", "Tháng Tám", "Tháng Chín", "Tháng Mười", "Tháng Mười Một", "Tháng Mười Hai"] }, monthName2 = { en: ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"], es: ["ENE", "FEB", "MAR", "ABR", "MAY", "JUN", "JUL", "AGO", "SEP", "OCT", "NOV", "DIC"], de: ["JAN", "FEB", "MRZ", "APR", "MAI", "JUN", "JUL", "AUG", "SEP", "OKT", "NOV", "DEZ"], vi: ["Giêng", "Hai", "Ba", "Tư", "Năm", "Sáu", "Bảy", "Tám", "Chín", "Mười", "Mười Một", "Chạp"] }, HolidaysCounter, Holidays, styleAnchor, styleLightBorder; startAt == 0 ? (dayName = { en: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], es: ["Dom", "Lun", "Mar", "Mie", "Jue", "Vie", "Sab"], de: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], vi: ["CN", "Hai", "Ba", "Tư", "Năm", "Sáu", "Bảy"] }, fulldayName = calLanguage == "vi" ? ["Chủ Nhật", "Thứ Hai", "Thứ Ba", "Thứ Tư", "Thứ Năm", "Thứ Sáu", "Thứ Bảy"] : ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]) : (dayName = { en: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], es: ["Lun", "Mar", "Mie", "Jue", "Vie", "Sab", "Dom"], de: ["Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"], vi: ["Hai", "Ba", "Tư", "Năm", "Sáu", "Bảy", "CN"] }, fulldayName = calLanguage == "vi" ? ["Thứ Hai", "Thứ Ba", "Thứ Tư", "Thứ Năm", "Thứ Sáu", "Thứ Bảy", "Chủ Nhật"] : ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]); var crossobj, crossMonthObj, crossYearObj, monthSelected, yearSelected, dateSelected, omonthSelected, oyearSelected, odateSelected, monthConstructed, yearConstructed, intervalID1, intervalID2, timeoutID1, timeoutID2, ctlToPlaceValue, ctlNow, dateFormat, nStartingYear, selDayAction, isPast, visYear = 0, visMonth = 0, bPageLoaded = !1, ie = document.all, dom = document.getElementById, ns4 = document.layers, today = new Date, dateNow = today.getDate(), monthNow = today.getMonth(), yearNow = today.getYear(); Prototype.Browser.IE && (yearNow = today.getFullYear()); var imgsrc = ["drop1.gif", "drop2.gif", "left1.gif", "left2.gif", "right1.gif", "right2.gif"], img = [], bShow = !1; HolidaysCounter = 0, Holidays = [], $j(document).ready(function () { var t = "", n; if (dom) { for (i = 0; i < imgsrc.length; i++) img[i] = new Image, img[i].src = imgDir + imgsrc[i]; t += '
' + weekString[calLanguage] + '' + dayName[calLanguage][t] + "
' + WeekNbr(r) + "  ', sStyle = styleAnchor, datePointer == odateSelected && monthSelected == omonthSelected && yearSelected == oyearSelected && (sStyle += styleLightBorder), sHint = "", k = 0; k < HolidaysCounter; k++) parseInt(Holidays[k].d) == datePointer && parseInt(Holidays[k].m) == monthSelected + 1 && (parseInt(Holidays[k].y) == 0 || parseInt(Holidays[k].y) == yearSelected && parseInt(Holidays[k].y) != 0) && (sStyle += "background-color:#fdd;", sHint += sHint == "" ? Holidays[k].desc : "\n" + Holidays[k].desc); sHint = sHint.replace('/"/g', """), n = "onmousemove=\"window.status='" + selectDateMessage[calLanguage].replace("[date]", constructDate(datePointer, monthSelected, yearSelected)) + "'\" onmouseout=\"window.status=''\" ", enablePast == 0 && (yearSelected < yearNow || monthSelected < monthNow && yearSelected == yearNow || datePointer < dateNow && monthSelected == monthNow && yearSelected == yearNow) ? (selDayAction = "", isPast = 1) : enableFuture == 0 && (yearSelected > yearNow || monthSelected > monthNow && yearSelected == yearNow || datePointer > dateNow && monthSelected == monthNow && yearSelected == yearNow) ? (selDayAction = "", isFuture = 1) : (selDayAction = 'href="javascript:dateSelected=' + datePointer + ';closeCalendar();"', isPast = 0, isFuture = 0), sHTML += datePointer == dateNow && monthSelected == monthNow && yearSelected == yearNow ? " " + datePointer + " " : dayPointer % 7 == startAt * -1 + 1 ? isPast == 1 ? " " + datePointer + " " : isFuture == 1 ? " " + datePointer + " " : " " + datePointer + " " : dayPointer % 7 == startAt * -1 + 7 && startAt == 1 || dayPointer % 7 == startAt && startAt == 0 ? isPast == 1 ? " " + datePointer + " " : isFuture == 1 ? " " + datePointer + " " : " " + datePointer + " " : isPast == 1 ? " " + datePointer + " " : isFuture == 1 ? " " + datePointer + " " : " " + datePointer + " ", sHTML += "", (dayPointer + startAt) % 7 == startAt && (sHTML += "
' + WeekNbr(new Date(yearSelected, monthSelected, datePointer + 1)) + " 
', showToday == 1 && (t += ''), t += '

', n = Element.extend(document.createElement("div")), n.id = "___popCalendar", $$("body")[0].appendChild(n), n.setStyle({ position: "absolute", left: 0, top: 0 }), n.update(t) } }), styleAnchor = "text-decoration:none;color:black;", styleLightBorder = "border:1px solid #a0a0a0;", $j(document).ready(function () { try { initPopUpCalendar() } catch (t) { } try { var n = Element.extend(document.createElement("INPUT")); n.writeAttribute("type", "hidden"), n.writeAttribute("id", "___popCalendarOutput"), n.writeAttribute("name", "___popCalendarOutput"), $("___popCalendar").appendChild(n) } catch (t) { } }), $j(document).bind("click", function () { try { bShow || hideCalendar(), bShow = !1 } catch (n) { } }); // JSXML XML Tools - v1.2 Jun 18 2001 // Copyright 2000 Peter Tracey - http://www.keyringlabs.com/sponsored/jsxml/ function REXML(n) { return this.XML = n, this.rootElement = null, this.parse = REXML_parse, this.XML && this.XML != "" && this.parse(), this } function REXML_parse() { var h = new RegExp("<([^>/ ]*)([^>]*)>", "g"), a = new RegExp("<([^>/ ]*)([^>]*)>([^<]*)", "g"), u = "", e = "", n = "", c = "", s = "", r = "", l = 0, t = null; if (this.XML.length != 0) { var f = this.XML.match(h), o = this.XML.match(a), i = 0; for (f[0].replace(h, "$1") == "?xml" && i++; i < f.length; i++) { if (e = f[i].replace(h, "$1"), c = f[i].replace(h, "$2"), n = o[i].replace(a, "$3").replace(/[\r\n\t ]+/g, " "), r = "", e.indexOf("![CDATA[") == 0 ? (s = "", u = "cdata") : e.indexOf("!--") == 0 ? (s = "", u = "comment") : e.indexOf("?") == 0 ? (s = "", u = "pi") : u = "element", r != "") { if (n = "", o[i].indexOf(r) > -1) n = o[i]; else { for (; i < f.length && o[i].indexOf(r) == -1; i++) n += o[i]; n += o[i] } n.substring(s.length, n.indexOf(r)) != "" && (t.childElements[t.childElements.length] = new REXML_XMLElement(u, "", "", t, n.substring(s.length, n.indexOf(r))), u == "cdata" && (t.text += n.substring(s.length, n.indexOf(r)))), n.indexOf(r) + r.length < n.length && (t.childElements[t.childElements.length] = new REXML_XMLElement("text", "", "", t, n.substring(n.indexOf(r) + r.length, n.length)), u == "cdata" && (t.text += n.substring(n.indexOf(r) + r.length, n.length))); continue } n.replace(/ */, "") == "" && (n = ""), f[i].substring(1, 2) != "/" ? l == 0 ? (t = this.rootElement = new REXML_XMLElement(u, e, c, null, n), l++, n != "" && (t.childElements[t.childElements.length] = new REXML_XMLElement("text", "", "", t, n))) : f[i].substring(f[i].length - 2, f[i].length - 1) != "/" ? (t = t.childElements[t.childElements.length] = new REXML_XMLElement(u, e, c, t, ""), l++, n != "" && (t.text += n, t.childElements[t.childElements.length] = new REXML_XMLElement("text", "", "", t, n))) : (t.childElements[t.childElements.length] = new REXML_XMLElement(u, e, c, t, n), n != "" && (t.childElements[t.childElements.length] = new REXML_XMLElement("text", "", "", t, n))) : (t = t.parentElement, l--, t && n != "" && (t.text += n, t.childElements[t.childElements.length] = new REXML_XMLElement("text", "", "", t, n))) } } } function REXML_XMLElement(n, t, i, r, u) { return this.type = n, this.name = t, this.attributeString = i, this.attributes = null, this.childElements = [], this.parentElement = r, this.text = u, this.getText = REXML_XMLElement_getText, this.childElement = REXML_XMLElement_childElement, this.attribute = REXML_XMLElement_attribute, this } function REXML_XMLElement_getText() { var t, n; if (this.type == "text" || this.type == "cdata") return this.text; if (this.childElements.length) { for (t = "", n = 0; n < this.childElements.length; n++) t += this.childElements[n].getText(); return t } return "" } function REXML_XMLElement_childElement(n) { for (var t = 0; t < this.childElements.length; t++) if (this.childElements[t].name == n) return this.childElements[t]; return null } function REXML_XMLElement_attribute(n) { var u, t, i, r; if (!this.attributes && (u = new RegExp(" ([^= ]*)=", "g"), this.attributeString.match(u) && this.attributeString.match(u).length)) { if (t = this.attributeString.match(u), t.length) for (i = 0; i < t.length; i++) t[i] = [(t[i] + "").replace(/[= ]/g, ""), ParseAttribute(this.attributeString, (t[i] + "").replace(/[= ]/g, ""))]; else t = null; this.attributes = t } if (this.attributes) for (r = 0; r < this.attributes.length; r++) if (this.attributes[r][0] == n) return this.attributes[r][1]; return "" } function JSXMLBuilder() { return this.XML = "", this.elements = [], Array.prototype.remove = Array_Remove, Array.prototype.add = Array_Add, this.load = JSXMLBuilder_load, this.element = JSXMLBuilder_element, this.addElementAt = JSXMLBuilder_addElementAt, this.insertElementAt = JSXMLBuilder_insertElementAt, this.removeElement = JSXMLBuilder_removeElement, this.generateXML = JSXMLBuilder_generateXML, this.moveElement = JSXMLBuilder_moveElement, this } function JSXMLBuilder_load(n, t) { var i, r; if (this.XML = n, !t) if (n.length) t = new REXML(n).rootElement; else return !1; for (i = new JSXMLIterator(t); ; ) if (i.xmleElem.type == "element" && (i.xmleElem.attributes ? this.addElementAt(i.xmleElem.name, i.xmleElem.attributes, i.xmleElem.text, this.elements.length, i.iElemLevel) : this.addElementAt(i.xmleElem.name, i.xmleElem.attributeString, i.xmleElem.text, this.elements.length, i.iElemLevel)), !i.getNextNode(!1)) break; for (r = 0; r < this.elements.length; r++) this.elements[r].index = r } function JSXMLBuilder_element(n) { return this.elements[n] } function JSXMLBuilder_addElementAt(n, t, i, r, u) { var e, o, f; if (r = parseInt(r), u = parseInt(u), (r < 0 || typeof r != "number" || isNaN(r)) && (r = this.elements.length > 0 ? this.elements.length - 1 : 0), (u < 0 || typeof u != "number" || isNaN(u)) && (u = this.elements[r - 1].level), t || (t = ""), e = [], o = r, r > 0) { for (f = r; f < this.elements.length; f++) if (this.elements[f].level > u) o++; else if (this.elements[f].level <= this.elements[r].level) break; e = new JSXMLBuilder_XMLElement(n, t, i, u + 1, this) } else e = new JSXMLBuilder_XMLElement(n, t, i, 1, this); for (this.elements = this.elements.add(o, e), f = o; f < this.elements.length; f++) this.elements[f].index = f } function JSXMLBuilder_insertElementAt(n, t, i, r, u) { var e, o, f; for (r = parseInt(r), u = parseInt(u), (r < 0 || typeof r != "number" || isNaN(r)) && (r = this.elements.length > 0 ? this.elements.length - 1 : 0), (u < 0 || typeof u != "number" || isNaN(u)) && (u = this.elements[r - 1].level), t || (t = ""), e = null, o = r, e = r > 0 && u > 0 ? new JSXMLBuilder_XMLElement(n, t, i, u + 1, this) : new JSXMLBuilder_XMLElement(n, t, i, 1, this), this.elements = this.elements.add(o, e), f = o; f < this.elements.length; f++) this.elements[f].index = f } function JSXMLBuilder_removeElement(n) { var i, t; for (n = parseInt(n), i = n + 1; i < this.elements.length; i++) if (this.elements[i].level < this.elements[n].level + 1) break; for (this.elements = this.elements.slice(0, n).concat(this.elements.slice(i, this.elements.length)), t = n; t < this.elements.length; t++) this.elements[t].index = t } function JSXMLBuilder_moveElement(n, t) { for (var u = new Array(this.elements[n]), f = new Array(this.elements[t]), r, i = n; i < this.elements.length; i++) if (this.elements[i].level > this.elements[n].level) u[u.length] = this.elements[i]; else if (i > n) break; for (i = t; i < this.elements.length; i++) if (this.elements[i].level > this.elements[t].level) f[f.length] = this.elements[i]; else if (i > t) break; if (r = [], n < t) { for (i = 0; i < n; i++) r[r.length] = this.elements[i]; for (i = n + u.length; i < t + f.length; i++) r[r.length] = this.elements[i]; for (i = 0; i < u.length; i++) r[r.length] = u[i]; for (i = t + f.length; i < this.elements.length; i++) r[r.length] = this.elements[i]; this.elements = r } else { for (i = 0; i < t; i++) r[r.length] = this.elements[i]; for (i = 0; i < u.length; i++) r[r.length] = u[i]; for (i = t; i < n; i++) r[r.length] = this.elements[i]; for (i = n + u.length; i < this.elements.length; i++) r[r.length] = this.elements[i]; this.elements = r } for (i = 0; i < this.elements.length; i++) this.elements[i].index = i } function JSXMLBuilder_generateXML(n) { var r = "", u = [], t, i; for (n && (r += '\n\n'), t = 0; t < this.elements.length; t++) { if (r += RepeatChar("\t", this.elements[t].level - 1), r += "<" + this.element(t).name, this.element(t).attributes) for (i = 0; i < this.element(t).attributes.length; i++) this.element(t).attributes[i] && (r += " " + this.element(t).attributes[i][0] + '="' + this.element(t).attributes[i][1] + '"'); else r += this.element(t).attributeString.replace(/[\/>]$/gi, ""); if ((this.elements[t + 1] && this.elements[t + 1].level <= this.elements[t].level || !this.elements[t + 1] && this.elements[t - 1]) && this.element(t).text == "" && (r += "/"), r += ">", r += this.element(t).text != "" ? this.element(t).text : "\n", (this.elements[t + 1] && this.elements[t + 1].level <= this.elements[t].level || !this.elements[t + 1] && this.elements[t - 1]) && this.element(t).text != "" && (r += "\n"), this.elements[t + 1]) { if (this.elements[t + 1].level < this.elements[t].level) for (lastelem = t, i = t; this.elements[i].level >= this.elements[t + 1].level; i--) this.elements[t] && this.elements[i] && this.elements[i].level < this.elements[t].level && this.elements[i].level < this.elements[lastelem].level && (r += RepeatChar("\t", this.elements[i].level - 1) + "\n", lastelem = i) } else for (lastelem = t, i = t; i > -1; i--) if (this.elements[i].level >= this.elements[t].level) continue; else this.elements[i].level < this.elements[lastelem].level && (r += RepeatChar("\t", this.elements[i].level - 1) + "\n", lastelem = i); r.length > 1e3 && (u[u.length] = r, r = "") } return u[u.length] = r, u.join("") } function JSXMLBuilder_XMLElement(n, t, i, r, u) { return this.type = "element", this.name = n, this.attributes = typeof t != "string" ? t : null, this.attributeString = typeof t == "string" ? t : "", this.text = i, this.level = r, this.index = -1, this.xmlBuilder = u, this.parseAttributes = JSXMLBuilder_XMLElement_parseAttributes, this.attribute = JSXMLBuilder_XMLElement_attribute, this.setAttribute = JSXMLBuilder_XMLElement_setAttribute, this.removeAttribute = JSXMLBuilder_XMLElement_removeAttribute, this.parentElement = JSXMLBuilder_XMLElement_parentElement, this.childElement = JSXMLBuilder_XMLElement_childElement, this } function JSXMLBuilder_XMLElement_parseAttributes() { var i, n, t; if (!this.attributes && (i = new RegExp(" ([^= ]*)=", "g"), this.attributeString.match(i) && this.attributeString.match(i).length)) { if (n = this.attributeString.match(i), n.length) for (t = 0; t < n.length; t++) n[t] = [(n[t] + "").replace(/[= ]/g, ""), ParseAttribute(this.attributeString, (n[t] + "").replace(/[= ]/g, ""))]; else n = null; this.attributes = n } } function JSXMLBuilder_XMLElement_attribute(n) { if (this.attributes || this.parseAttributes(), this.attributes) for (var t = 0; t < this.attributes.length; t++) if (this.attributes[t][0] == n) return this.attributes[t][1]; return "" } function JSXMLBuilder_XMLElement_setAttribute(n, t) { if (this.attributes || this.parseAttributes(), this.attributes) for (var i = 0; i < this.attributes.length; i++) if (this.attributes[i][0] == n) { this.attributes[i][1] = t; return } this.attributes[this.attributes.length] = [n, t] } function JSXMLBuilder_XMLElement_removeAttribute(n) { if (this.attributes || this.parseAttributes(), this.attributes) for (var i = 0; i < this.attributes.length; i++) if (this.attributes[i][0] == n) { this.attributes = this.attributes.remove(i); return } } function JSXMLBuilder_XMLElement_parentElement() { for (var n = this.index; this.xmlBuilder.element(n) && this.xmlBuilder.element(n).level != this.level - 1; n--); return this.xmlBuilder.element(n) } function JSXMLBuilder_XMLElement_childElement(n) { for (var i = -1, t = this.index + 1; t < this.xmlBuilder.elements.length; t++) if (this.xmlBuilder.elements[t].level == this.level + 1) { if (i++, i == n || this.xmlBuilder.elements[t].name == n) return this.xmlBuilder.elements[t] } else if (this.xmlBuilder.elements[t].level <= this.level) break; return null } function JSXMLIterator(n) { return this.xmleElem = n, this.iElemIndex = 0, this.arrElemIndex = new Array(0), this.iElemLevel = 0, this.iElem = 0, this.arrElemIndex[this.iElemLevel] = -1, this.getNextNode = JSXMLIterator_getNextNode, this } function JSXMLIterator_getNextNode() { if (!this.xmleElem || this.iElemLevel < 0) return !1; if (this.xmleElem.childElements.length) this.arrElemIndex[this.iElemLevel]++, this.iElemIndex++, this.iElemLevel++, this.arrElemIndex[this.iElemLevel] = 0, this.xmleElem = this.xmleElem.childElements[0]; else if (this.iElemIndex++, this.arrElemIndex[this.iElemLevel]++, this.xmleElem.parentElement && this.xmleElem.parentElement.childElements.length && this.arrElemIndex[this.iElemLevel] < this.xmleElem.parentElement.childElements.length) this.xmleElem = this.xmleElem.parentElement.childElements[this.arrElemIndex[this.iElemLevel]]; else if (this.iElemLevel > 0) { for (; this.iElemLevel > 0; this.iElemLevel--) if (this.xmleElem.parentElement && this.xmleElem.parentElement.childElements[this.arrElemIndex[this.iElemLevel]]) { this.xmleElem = this.xmleElem.parentElement.childElements[this.arrElemIndex[this.iElemLevel]], this.iElemLevel++, this.arrElemIndex = this.arrElemIndex.slice(0, this.iElemLevel + 1); break } else this.xmleElem = this.xmleElem.parentElement; this.iElemLevel-- } else return !1; return typeof this.xmleElem == "object" && this.iElemLevel > -1 } function ParseAttribute(n, t) { var n = n + ">", i; return n.indexOf(t + "='") > -1 ? i = new RegExp(".*" + t + "='([^']*)'.*>") : n.indexOf(t + '="') > -1 && (i = new RegExp(".*" + t + '="([^"]*)".*>')), n.replace(i, "$1") } function Array_Remove(n) { for (var i = [], t = 0; t < this.length; t++) t != n && (i[i.length] = this[t]); return i } function Array_Add(n, t) { for (var i = [], r = 0; r < this.length; r++) r == n && (i[i.length] = t), i[i.length] = this[r]; return i[n] || (i[n] = t), i } function RepeatChar(n, t) { for (var r = "", i = 0; i < t; i++) r += n; return r }; "undefined"==typeof jwplayer&&(jwplayer=function(e){if(jwplayer.api)return jwplayer.api.selectPlayer(e)},jwplayer.version="6.7.4071",jwplayer.vid=document.createElement("video"),jwplayer.audio=document.createElement("audio"),jwplayer.source=document.createElement("source"),function(e){function a(b){return function(){return c(b)}}function k(b){return function(){b("Error loading file")}}function f(m,a,c,g){return function(){try{var d=m.responseXML;if(d&&d.firstChild)return c(m)}catch(f){}(d=b.parseXML(m.responseText))&& d.firstChild?(m=b.extend({},m,{responseXML:d}),c(m)):g&&g(m.responseText?"Invalid XML":a)}}var j=document,d=window,h=navigator,b=e.utils=function(){};b.exists=function(b){switch(typeof b){case "string":return 0g||g>d)}else d=void 0;if(d)return m;d=a.substring(0,a.indexOf("://")+3);var g=a.substring(d.length,a.indexOf("/",d.length+1)),c;0===m.indexOf("/")?c=m.split("/"):(c=a.split("?")[0],c=c.substring(d.length+g.length+1,c.lastIndexOf("/")),c=c.split("/").concat(m.split("/")));for(var f=[],n=0;nc&&0>d&&(!a||!isNaN(a))?q.CDN:q.RELATIVE}};b.getPluginName=function(b){return b.replace(/^(.*\/)?([^-]*)-?.*\.(swf|js)$/,"$2")};b.getPluginVersion=function(b){return b.replace(/[^-]*-?([^\.]*).*$/,"$1")}; b.isYouTube=function(b){return/^(http|\/\/).*(youtube\.com|youtu\.be)\/.+/.test(b)};b.youTubeID=function(b){try{return/v[=\/]([^?&]*)|youtu\.be\/([^?]*)|^([\w-]*)$/i.exec(b).slice(1).join("").replace("?","")}catch(a){return""}};b.isRtmp=function(b,a){return 0==b.indexOf("rtmp")||"rtmp"==a};b.foreach=function(a,c){var d,g;for(d in a)"function"==b.typeOf(a.hasOwnProperty)?a.hasOwnProperty(d)&&(g=a[d],c(d,g)):(g=a[d],c(d,g))};b.isHTTPS=function(){return 0==d.location.href.indexOf("https")};b.repo=function(){var a= "http://p.jwpcdn.com/"+e.version.split(/\W/).splice(0,2).join("/")+"/";try{b.isHTTPS()&&(a=a.replace("http://","https://ssl."))}catch(c){}return a};b.ajax=function(a,c,h){var g;0=h.length&&(h[1]=0);for(var b=a.strToLongs(f.encode(d).slice(0,16)),c= h.length,e=h[c-1],m=h[0],p,l=Math.floor(6+52/c),g=0;0>>2&3;for(var r=0;r>>5^m<<2)+(m>>>3^e<<4)^(g^m)+(b[r&3^p]^e),e=h[r]+=e}h=a.longsToStr(h);return k.encode(h)};a.decrypt=function(j,d){if(0==j.length)return"";for(var h=a.strToLongs(k.decode(j)),b=a.strToLongs(f.encode(d).slice(0,16)),c=h.length,e=h[c-1],m=h[0],p,l=2654435769*Math.floor(6+52/c);0!=l;){p=l>>>2&3;for(var g=c-1;0<=g;g--)e=h[0>>5^m<<2)+(m>>>3^e<<4)^(l^m)+(b[g&3^p]^e), m=h[g]-=e;l-=2654435769}h=a.longsToStr(h);h=h.replace(/\0+$/,"");return f.decode(h)};a.strToLongs=function(a){for(var d=Array(Math.ceil(a.length/4)),f=0;f>>8&255,a[f]>>>16&255,a[f]>>>24&255);return d.join("")};var k={code:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d", encode:function(a,d){var h,b,c,e,m=[],p="",l,g,r=k.code;g=("undefined"==typeof d?0:d)?f.encode(a):a;l=g.length%3;if(0l++;)p+="\x3d",g+="\x00";for(l=0;l>18&63,b=e>>12&63,c=e>>6&63,e&=63,m[l/3]=r.charAt(h)+r.charAt(b)+r.charAt(c)+r.charAt(e);m=m.join("");return m=m.slice(0,m.length-p.length)+p},decode:function(a,d){d="undefined"==typeof d?!1:d;var h,b,c,e,m,p=[],l,g=k.code;l=d?f.decode(a):a;for(var r= 0;r>>16&255,b=c>>>8&255,c&=255,p[r/4]=String.fromCharCode(h,b,c),64==m&&(p[r/4]=String.fromCharCode(h,b)),64==e&&(p[r/4]=String.fromCharCode(h));e=p.join("");return d?f.decode(e):e}},f={encode:function(a){a=a.replace(/[\u0080-\u07ff]/g,function(a){a=a.charCodeAt(0);return String.fromCharCode(192|a>>6,128|a&63)});return a=a.replace(/[\u0800-\uffff]/g,function(a){a= a.charCodeAt(0);return String.fromCharCode(224|a>>12,128|a>>6&63,128|a&63)})},decode:function(a){a=a.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(a){a=(a.charCodeAt(0)&15)<<12|(a.charCodeAt(1)&63)<<6|a.charCodeAt(2)&63;return String.fromCharCode(a)});return a=a.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(a){a=(a.charCodeAt(0)&31)<<6|a.charCodeAt(1)&63;return String.fromCharCode(a)})}}}(jwplayer.utils),function(e){e.events={COMPLETE:"COMPLETE",ERROR:"ERROR",API_READY:"jwplayerAPIReady", JWPLAYER_READY:"jwplayerReady",JWPLAYER_FULLSCREEN:"jwplayerFullscreen",JWPLAYER_RESIZE:"jwplayerResize",JWPLAYER_ERROR:"jwplayerError",JWPLAYER_SETUP_ERROR:"jwplayerSetupError",JWPLAYER_MEDIA_BEFOREPLAY:"jwplayerMediaBeforePlay",JWPLAYER_MEDIA_BEFORECOMPLETE:"jwplayerMediaBeforeComplete",JWPLAYER_COMPONENT_SHOW:"jwplayerComponentShow",JWPLAYER_COMPONENT_HIDE:"jwplayerComponentHide",JWPLAYER_MEDIA_BUFFER:"jwplayerMediaBuffer",JWPLAYER_MEDIA_BUFFER_FULL:"jwplayerMediaBufferFull",JWPLAYER_MEDIA_ERROR:"jwplayerMediaError", JWPLAYER_MEDIA_LOADED:"jwplayerMediaLoaded",JWPLAYER_MEDIA_COMPLETE:"jwplayerMediaComplete",JWPLAYER_MEDIA_SEEK:"jwplayerMediaSeek",JWPLAYER_MEDIA_TIME:"jwplayerMediaTime",JWPLAYER_MEDIA_VOLUME:"jwplayerMediaVolume",JWPLAYER_MEDIA_META:"jwplayerMediaMeta",JWPLAYER_MEDIA_MUTE:"jwplayerMediaMute",JWPLAYER_MEDIA_LEVELS:"jwplayerMediaLevels",JWPLAYER_MEDIA_LEVEL_CHANGED:"jwplayerMediaLevelChanged",JWPLAYER_CAPTIONS_CHANGED:"jwplayerCaptionsChanged",JWPLAYER_CAPTIONS_LIST:"jwplayerCaptionsList",JWPLAYER_PLAYER_STATE:"jwplayerPlayerState", state:{BUFFERING:"BUFFERING",IDLE:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING"},JWPLAYER_PLAYLIST_LOADED:"jwplayerPlaylistLoaded",JWPLAYER_PLAYLIST_ITEM:"jwplayerPlaylistItem",JWPLAYER_PLAYLIST_COMPLETE:"jwplayerPlaylistComplete",JWPLAYER_DISPLAY_CLICK:"jwplayerViewClick",JWPLAYER_CONTROLS:"jwplayerViewControls",JWPLAYER_USER_ACTION:"jwplayerUserAction",JWPLAYER_INSTREAM_CLICK:"jwplayerInstreamClicked",JWPLAYER_INSTREAM_DESTROYED:"jwplayerInstreamDestroyed",JWPLAYER_AD_TIME:"jwplayerAdTime",JWPLAYER_AD_ERROR:"jwplayerAdError", JWPLAYER_AD_CLICK:"jwplayerAdClicked",JWPLAYER_AD_COMPLETE:"jwplayerAdComplete",JWPLAYER_AD_IMPRESSION:"jwplayerAdImpression",JWPLAYER_AD_COMPANIONS:"jwplayerAdCompanions",JWPLAYER_AD_SKIPPED:"jwplayerAdSkipped"}}(jwplayer),function(e){var a=jwplayer.utils;e.eventdispatcher=function(e,f){var j,d;this.resetEventListeners=function(){j={};d=[]};this.resetEventListeners();this.addEventListener=function(d,b,c){try{a.exists(j[d])||(j[d]=[]),"string"==a.typeOf(b)&&(b=(new Function("return "+b))()),j[d].push({listener:b, count:c})}catch(f){a.log("error",f)}return!1};this.removeEventListener=function(d,b){if(j[d]){try{for(var c=0;cparseFloat(e.version)))m=!0,p="Incompatible player version",h()});0==b&&h()}}var c=a.loaderstatus.NEW,q=!1,m=!1,p,l=d,g=new k.eventdispatcher;a.extend(this,g);this.setupPlugins=function(b,c,d){var g={length:0, plugins:{}},e=0,h={},m=j.getPlugins();f(c.plugins,function(f,j){var k=a.getPluginName(f),l=m[k],q=l.getFlashPath(),r=l.getJS(),p=l.getURL();q&&(g.plugins[q]=a.extend({},j),g.plugins[q].pluginmode=l.getPluginmode(),g.length++);try{if(r&&c.plugins&&c.plugins[p]){var A=document.createElement("div");A.id=b.id+"_"+k;A.style.position="absolute";A.style.top=0;A.style.zIndex=e+10;h[k]=l.getNewInstance(b,a.extend({},c.plugins[p]),A);e++;b.onReady(d(h[k],A,!0));b.onResize(d(h[k],A))}}catch(F){a.log("ERROR: Failed to load "+ k+".")}});b.plugins=h;return g};this.load=function(){if(!(a.exists(d)&&"object"!=a.typeOf(d))){c=a.loaderstatus.LOADING;f(d,function(c){a.exists(c)&&(c=j.addPlugin(c),c.addEventListener(k.COMPLETE,b),c.addEventListener(k.ERROR,r))});var g=j.getPlugins();f(g,function(a,b){b.load()})}b()};var r=this.pluginFailed=function(){m||(m=!0,p="File not found",h())};this.getStatus=function(){return c}}}(jwplayer),function(){jwplayer.parsers={localName:function(e){return e?e.localName?e.localName:e.baseName?e.baseName: "":""},textContent:function(e){return e?e.textContent?jwplayer.utils.trim(e.textContent):e.text?jwplayer.utils.trim(e.text):"":""},getChildNode:function(e,a){return e.childNodes[a]},numChildren:function(e){return e.childNodes?e.childNodes.length:0}}}(jwplayer),function(e){var a=e.parsers;(a.jwparser=function(){}).parseEntry=function(k,f){for(var j=[],d=[],h=e.utils.xmlAttribute,b=0;bn.playlist.length&&(0==n.playlist.length||!n.playlist[0].sources||0==n.playlist[0].sources.length))g();else if(!C)if("string"==k.typeOf(n.playlist)){var a=new e.playlist.loader;a.addEventListener(f.JWPLAYER_PLAYLIST_LOADED,function(a){n.playlist=a.playlist;C=d;m()}); a.addEventListener(f.JWPLAYER_ERROR,function(a){C=d;g(a)});C=j;a.load(n.playlist)}else if(w.getStatus()==k.loaderstatus.COMPLETE){for(a=0;a=h||0>=b?0:100*(b/h)+"%")}-1==d.width.toString().indexOf("%")?delete d.aspectratio:h?d.aspectratio=h:delete d.aspectratio;return d}).addConfig=function(d,e){a(e);return f.extend(d,e)}}(jwplayer),function(e){var a=e.utils,k=document;e.embed.download=function(f,e,d){function h(b,c){for(var d=k.querySelectorAll(b),f=0;fr)return g.sendEvent(k.ERROR,{message:"Flash version must be 10.0 or greater"}),!1;var e,n,j=q.config.listbar,t=a.extend({}, b);if(d.id+"_wrapper"==d.parentNode.id)e=document.getElementById(d.id+"_wrapper");else{e=document.createElement("div");n=document.createElement("div");n.style.display="none";n.id=d.id+"_aspect";e.id=d.id+"_wrapper";e.style.position="relative";e.style.display="block";e.style.width=a.styleDimension(t.width);e.style.height=a.styleDimension(t.height);if(q.config.aspectratio){var x=parseFloat(q.config.aspectratio);n.style.display="block";n.style.marginTop=q.config.aspectratio;e.style.height="auto";e.style.display= "inline-block";j&&("bottom"==j.position?n.style.paddingBottom=j.size+"px":"right"==j.position&&(n.style.marginBottom=-1*j.size*(x/100)+"px"))}d.parentNode.replaceChild(e,d);e.appendChild(d);e.appendChild(n)}e=c.setupPlugins(q,t,p);0=t.height?"transparent":"opaque";n="height width modes events primary base fallback volume".split(" "); for(j=0;j0?t>e&&(n=e):0-e>t&&(n=0-e),n},l=function(t,e){this.removeClass(t.movingClass.up).removeClass(t.movingClass.down).removeClass(t.movingClass.left).removeClass(t.movingClass.right).removeClass(t.deceleratingClass.up).removeClass(t.deceleratingClass.down).removeClass(t.deceleratingClass.left).removeClass(t.deceleratingClass.right),t.velocity>0&&this.addClass(e.right),0>t.velocity&&this.addClass(e.left),t.velocityY>0&&this.addClass(e.down),0>t.velocityY&&this.addClass(e.up)},a=function(t,e){e.velocity=0,e.velocityY=0,e.decelerate=!0,"function"==typeof e.stopped&&e.stopped.call(t,e)},r=function(t,e){var n=t[0];e.x&&n.scrollWidth>0?(n.scrollLeft=e.scrollLeft=n.scrollLeft+e.velocity,Math.abs(e.velocity)>0&&(e.velocity=e.decelerate?c(e.velocity,e.slowdown):e.velocity)):e.velocity=0,e.y&&n.scrollHeight>0?(n.scrollTop=e.scrollTop=n.scrollTop+e.velocityY,Math.abs(e.velocityY)>0&&(e.velocityY=e.decelerate?c(e.velocityY,e.slowdown):e.velocityY)):e.velocityY=0,l.call(t,e,e.deceleratingClass),"function"==typeof e.moved&&e.moved.call(t,e),Math.abs(e.velocity)>0||Math.abs(e.velocityY)>0?window.requestAnimationFrame(function(){r(t,e)}):a(t,e)},u=function(e){var i=t.kinetic.callMethods[e],o=Array.prototype.slice.call(arguments);i&&this.each(function(){var e=o.slice(1),c=t(this).data(n);e.unshift(c),i.apply(this,e)})},v=function(e,n){e[0],t.support.touch?e.bind("touchstart",n.events.touchStart).bind("touchend",n.events.inputEnd).bind("touchmove",n.events.touchMove):e.mousedown(n.events.inputDown).mouseup(n.events.inputEnd).mousemove(n.events.inputMove),e.click(n.events.inputClick).scroll(n.events.scroll).bind("selectstart",o).bind("dragstart",n.events.dragStart)},d=function(e,n){e[0],t.support.touch?e.unbind("touchstart",n.events.touchStart).unbind("touchend",n.events.inputEnd).unbind("touchmove",n.events.touchMove):e.unbind("mousedown",n.events.inputDown).unbind("mouseup",n.events.inputEnd).unbind("mousemove",n.events.inputMove).unbind("scroll",n.events.scroll),e.unbind("click",n.events.inputClick).unbind("selectstart",o),e.unbind("dragstart",n.events.dragStart)},f=function(o){this.addClass(i).each(function(){var i=this,c=t(this);if(!c.data(n)){var a,u,d,f,p=t.extend({},e,o),h=!1,m=!1,g=!1,w=1e3/p.throttleFPS;p.velocity=0,p.velocityY=0;var y=function(){a=!1,u=!1,g=!1};t(document).mouseup(y).click(y);var C=function(){p.velocity=s(h-a,p.maxvelocity),p.velocityY=s(m-u,p.maxvelocity)},b=function(e,n){return t.isFunction(p.filterTarget)?p.filterTarget.call(i,e,n)!==!1:n.which&&n.which>1?!1:!0},k=function(t,e){g=!0,p.velocity=h=0,p.velocityY=m=0,a=t,u=e},Y=function(){a&&h&&p.decelerate===!1&&(p.decelerate=!0,C(),a=h=g=!1,r(c,p))},D=function(e,n){(!d||new Date>new Date(d.getTime()+w))&&(d=new Date,g&&(a||u)&&(f&&(t(f).blur(),f=null,c.focus()),p.decelerate=!1,p.velocity=p.velocityY=0,c[0].scrollLeft=p.scrollLeft=p.x?c[0].scrollLeft-(e-a):c[0].scrollLeft,c[0].scrollTop=p.scrollTop=p.y?c[0].scrollTop-(n-u):c[0].scrollTop,h=a,m=u,a=e,u=n,C(),l.call(c,p,p.movingClass),"function"==typeof p.moved&&p.moved.call(c,p)))};p.events={touchStart:function(t){var e;b(t.target,t)&&(e=t.originalEvent.touches[0],k(e.clientX,e.clientY),t.stopPropagation())},touchMove:function(t){var e;g&&(e=t.originalEvent.touches[0],D(e.clientX,e.clientY),t.preventDefault&&t.preventDefault())},inputDown:function(t){b(t.target,t)&&(k(t.clientX,t.clientY),f=t.target,"IMG"===t.target.nodeName&&t.preventDefault(),t.stopPropagation())},inputEnd:function(t){b(t.target,t)&&(Y(),f=null,t.preventDefault&&t.preventDefault())},inputMove:function(t){g&&(D(t.clientX,t.clientY),t.preventDefault&&t.preventDefault())},scroll:function(t){"function"==typeof p.moved&&p.moved.call(c,p),t.preventDefault&&t.preventDefault()},inputClick:function(t){return Math.abs(p.velocity)>0?(t.preventDefault(),!1):void 0},dragStart:function(){return f?!1:void 0}},v(c,p),c.data(n,p).css("cursor",p.cursor),p.triggerHardware&&c.css({"-webkit-transform":"translate3d(0,0,0)","-webkit-perspective":"1000","-webkit-backface-visibility":"hidden"})}})};t.kinetic={settingsKey:n,callMethods:{start:function(e,n){var i=t(this);e=t.extend(e,n),e&&(e.decelerate=!1,r(i,e))},end:function(e){t(this),e&&(e.decelerate=!0)},stop:function(e){var n=t(this);a(n,e)},detach:function(e){var n=t(this);n.hasClass(i)&&(d(n,e),n.removeClass(i).css("cursor",""))},attach:function(e){var n=t(this);n.hasClass(i)||(v(n,e),n.addClass(i).css("cursor",e.cursor))}}},t.fn.kinetic=function(t){return"string"==typeof t?u.apply(this,arguments):f.call(this,t),this}})(window.jQuery||window.Zepto); (function(a){if(typeof define==="function"&&define.amd&&define.amd.jQuery){define(["jquery"],a)}else{a(jQuery)}}(function(e){var o="left",n="right",d="up",v="down",c="in",w="out",l="none",r="auto",k="swipe",s="pinch",x="tap",i="doubletap",b="longtap",A="horizontal",t="vertical",h="all",q=10,f="start",j="move",g="end",p="cancel",a="ontouchstart" in window,y="TouchSwipe";var m={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"label, button, input, select, textarea, a, .noSwipe"};e.fn.swipe=function(D){var C=e(this),B=C.data(y);if(B&&typeof D==="string"){if(B[D]){return B[D].apply(this,Array.prototype.slice.call(arguments,1))}else{e.error("Method "+D+" does not exist on jQuery.swipe")}}else{if(!B&&(typeof D==="object"||!D)){return u.apply(this,arguments)}}return C};e.fn.swipe.defaults=m;e.fn.swipe.phases={PHASE_START:f,PHASE_MOVE:j,PHASE_END:g,PHASE_CANCEL:p};e.fn.swipe.directions={LEFT:o,RIGHT:n,UP:d,DOWN:v,IN:c,OUT:w};e.fn.swipe.pageScroll={NONE:l,HORIZONTAL:A,VERTICAL:t,AUTO:r};e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:h};function u(B){if(B&&(B.allowPageScroll===undefined&&(B.swipe!==undefined||B.swipeStatus!==undefined))){B.allowPageScroll=l}if(B.click!==undefined&&B.tap===undefined){B.tap=B.click}if(!B){B={}}B=e.extend({},e.fn.swipe.defaults,B);return this.each(function(){var D=e(this);var C=D.data(y);if(!C){C=new z(this,B);D.data(y,C)}})}function z(a0,aq){var av=(a||!aq.fallbackToMouseEvents),G=av?"touchstart":"mousedown",au=av?"touchmove":"mousemove",R=av?"touchend":"mouseup",P=av?null:"mouseleave",az="touchcancel";var ac=0,aL=null,Y=0,aX=0,aV=0,D=1,am=0,aF=0,J=null;var aN=e(a0);var W="start";var T=0;var aM=null;var Q=0,aY=0,a1=0,aa=0,K=0;var aS=null;try{aN.bind(G,aJ);aN.bind(az,a5)}catch(ag){e.error("events not supported "+G+","+az+" on jQuery.swipe")}this.enable=function(){aN.bind(G,aJ);aN.bind(az,a5);return aN};this.disable=function(){aG();return aN};this.destroy=function(){aG();aN.data(y,null);return aN};this.option=function(a8,a7){if(aq[a8]!==undefined){if(a7===undefined){return aq[a8]}else{aq[a8]=a7}}else{e.error("Option "+a8+" does not exist on jQuery.swipe.options")}return null};function aJ(a9){if(ax()){return}if(e(a9.target).closest(aq.excludedElements,aN).length>0){return}var ba=a9.originalEvent?a9.originalEvent:a9;var a8,a7=a?ba.touches[0]:ba;W=f;if(a){T=ba.touches.length}else{a9.preventDefault()}ac=0;aL=null;aF=null;Y=0;aX=0;aV=0;D=1;am=0;aM=af();J=X();O();if(!a||(T===aq.fingers||aq.fingers===h)||aT()){ae(0,a7);Q=ao();if(T==2){ae(1,ba.touches[1]);aX=aV=ap(aM[0].start,aM[1].start)}if(aq.swipeStatus||aq.pinchStatus){a8=L(ba,W)}}else{a8=false}if(a8===false){W=p;L(ba,W);return a8}else{ak(true)}return null}function aZ(ba){var bd=ba.originalEvent?ba.originalEvent:ba;if(W===g||W===p||ai()){return}var a9,a8=a?bd.touches[0]:bd;var bb=aD(a8);aY=ao();if(a){T=bd.touches.length}W=j;if(T==2){if(aX==0){ae(1,bd.touches[1]);aX=aV=ap(aM[0].start,aM[1].start)}else{aD(bd.touches[1]);aV=ap(aM[0].end,aM[1].end);aF=an(aM[0].end,aM[1].end)}D=a3(aX,aV);am=Math.abs(aX-aV)}if((T===aq.fingers||aq.fingers===h)||!a||aT()){aL=aH(bb.start,bb.end);ah(ba,aL);ac=aO(bb.start,bb.end);Y=aI();aE(aL,ac);if(aq.swipeStatus||aq.pinchStatus){a9=L(bd,W)}if(!aq.triggerOnTouchEnd||aq.triggerOnTouchLeave){var a7=true;if(aq.triggerOnTouchLeave){var bc=aU(this);a7=B(bb.end,bc)}if(!aq.triggerOnTouchEnd&&a7){W=ay(j)}else{if(aq.triggerOnTouchLeave&&!a7){W=ay(g)}}if(W==p||W==g){L(bd,W)}}}else{W=p;L(bd,W)}if(a9===false){W=p;L(bd,W)}}function I(a7){var a8=a7.originalEvent;if(a){if(a8.touches.length>0){C();return true}}if(ai()){T=aa}a7.preventDefault();aY=ao();Y=aI();if(a6()){W=p;L(a8,W)}else{if(aq.triggerOnTouchEnd||(aq.triggerOnTouchEnd==false&&W===j)){W=g;L(a8,W)}else{if(!aq.triggerOnTouchEnd&&a2()){W=g;aB(a8,W,x)}else{if(W===j){W=p;L(a8,W)}}}}ak(false);return null}function a5(){T=0;aY=0;Q=0;aX=0;aV=0;D=1;O();ak(false)}function H(a7){var a8=a7.originalEvent;if(aq.triggerOnTouchLeave){W=ay(g);L(a8,W)}}function aG(){aN.unbind(G,aJ);aN.unbind(az,a5);aN.unbind(au,aZ);aN.unbind(R,I);if(P){aN.unbind(P,H)}ak(false)}function ay(bb){var ba=bb;var a9=aw();var a8=aj();var a7=a6();if(!a9||a7){ba=p}else{if(a8&&bb==j&&(!aq.triggerOnTouchEnd||aq.triggerOnTouchLeave)){ba=g}else{if(!a8&&bb==g&&aq.triggerOnTouchLeave){ba=p}}}return ba}function L(a9,a7){var a8=undefined;if(F()||S()){a8=aB(a9,a7,k)}else{if((M()||aT())&&a8!==false){a8=aB(a9,a7,s)}}if(aC()&&a8!==false){a8=aB(a9,a7,i)}else{if(al()&&a8!==false){a8=aB(a9,a7,b)}else{if(ad()&&a8!==false){a8=aB(a9,a7,x)}}}if(a7===p){a5(a9)}if(a7===g){if(a){if(a9.touches.length==0){a5(a9)}}else{a5(a9)}}return a8}function aB(ba,a7,a9){var a8=undefined;if(a9==k){aN.trigger("swipeStatus",[a7,aL||null,ac||0,Y||0,T]);if(aq.swipeStatus){a8=aq.swipeStatus.call(aN,ba,a7,aL||null,ac||0,Y||0,T);if(a8===false){return false}}if(a7==g&&aR()){aN.trigger("swipe",[aL,ac,Y,T]);if(aq.swipe){a8=aq.swipe.call(aN,ba,aL,ac,Y,T);if(a8===false){return false}}switch(aL){case o:aN.trigger("swipeLeft",[aL,ac,Y,T]);if(aq.swipeLeft){a8=aq.swipeLeft.call(aN,ba,aL,ac,Y,T)}break;case n:aN.trigger("swipeRight",[aL,ac,Y,T]);if(aq.swipeRight){a8=aq.swipeRight.call(aN,ba,aL,ac,Y,T)}break;case d:aN.trigger("swipeUp",[aL,ac,Y,T]);if(aq.swipeUp){a8=aq.swipeUp.call(aN,ba,aL,ac,Y,T)}break;case v:aN.trigger("swipeDown",[aL,ac,Y,T]);if(aq.swipeDown){a8=aq.swipeDown.call(aN,ba,aL,ac,Y,T)}break}}}if(a9==s){aN.trigger("pinchStatus",[a7,aF||null,am||0,Y||0,T,D]);if(aq.pinchStatus){a8=aq.pinchStatus.call(aN,ba,a7,aF||null,am||0,Y||0,T,D);if(a8===false){return false}}if(a7==g&&a4()){switch(aF){case c:aN.trigger("pinchIn",[aF||null,am||0,Y||0,T,D]);if(aq.pinchIn){a8=aq.pinchIn.call(aN,ba,aF||null,am||0,Y||0,T,D)}break;case w:aN.trigger("pinchOut",[aF||null,am||0,Y||0,T,D]);if(aq.pinchOut){a8=aq.pinchOut.call(aN,ba,aF||null,am||0,Y||0,T,D)}break}}}if(a9==x){if(a7===p||a7===g){clearTimeout(aS);if(V()&&!E()){K=ao();aS=setTimeout(e.proxy(function(){K=null;aN.trigger("tap",[ba.target]);if(aq.tap){a8=aq.tap.call(aN,ba,ba.target)}},this),aq.doubleTapThreshold)}else{K=null;aN.trigger("tap",[ba.target]);if(aq.tap){a8=aq.tap.call(aN,ba,ba.target)}}}}else{if(a9==i){if(a7===p||a7===g){clearTimeout(aS);K=null;aN.trigger("doubletap",[ba.target]);if(aq.doubleTap){a8=aq.doubleTap.call(aN,ba,ba.target)}}}else{if(a9==b){if(a7===p||a7===g){clearTimeout(aS);K=null;aN.trigger("longtap",[ba.target]);if(aq.longTap){a8=aq.longTap.call(aN,ba,ba.target)}}}}}return a8}function aj(){var a7=true;if(aq.threshold!==null){a7=ac>=aq.threshold}return a7}function a6(){var a7=false;if(aq.cancelThreshold!==null&&aL!==null){a7=(aP(aL)-ac)>=aq.cancelThreshold}return a7}function ab(){if(aq.pinchThreshold!==null){return am>=aq.pinchThreshold}return true}function aw(){var a7;if(aq.maxTimeThreshold){if(Y>=aq.maxTimeThreshold){a7=false}else{a7=true}}else{a7=true}return a7}function ah(a7,a8){if(aq.allowPageScroll===l||aT()){a7.preventDefault()}else{var a9=aq.allowPageScroll===r;switch(a8){case o:if((aq.swipeLeft&&a9)||(!a9&&aq.allowPageScroll!=A)){a7.preventDefault()}break;case n:if((aq.swipeRight&&a9)||(!a9&&aq.allowPageScroll!=A)){a7.preventDefault()}break;case d:if((aq.swipeUp&&a9)||(!a9&&aq.allowPageScroll!=t)){a7.preventDefault()}break;case v:if((aq.swipeDown&&a9)||(!a9&&aq.allowPageScroll!=t)){a7.preventDefault()}break}}}function a4(){var a8=aK();var a7=U();var a9=ab();return a8&&a7&&a9}function aT(){return !!(aq.pinchStatus||aq.pinchIn||aq.pinchOut)}function M(){return !!(a4()&&aT())}function aR(){var ba=aw();var bc=aj();var a9=aK();var a7=U();var a8=a6();var bb=!a8&&a7&&a9&&bc&&ba;return bb}function S(){return !!(aq.swipe||aq.swipeStatus||aq.swipeLeft||aq.swipeRight||aq.swipeUp||aq.swipeDown)}function F(){return !!(aR()&&S())}function aK(){return((T===aq.fingers||aq.fingers===h)||!a)}function U(){return aM[0].end.x!==0}function a2(){return !!(aq.tap)}function V(){return !!(aq.doubleTap)}function aQ(){return !!(aq.longTap)}function N(){if(K==null){return false}var a7=ao();return(V()&&((a7-K)<=aq.doubleTapThreshold))}function E(){return N()}function at(){return((T===1||!a)&&(isNaN(ac)||ac===0))}function aW(){return((Y>aq.longTapThreshold)&&(ac=0)){return o}else{if((a9<=360)&&(a9>=315)){return o}else{if((a9>=135)&&(a9<=225)){return n}else{if((a9>45)&&(a9<135)){return v}else{return d}}}}}function ao(){var a7=new Date();return a7.getTime()}function aU(a7){a7=e(a7);var a9=a7.offset();var a8={left:a9.left,right:a9.left+a7.outerWidth(),top:a9.top,bottom:a9.top+a7.outerHeight()};return a8}function B(a7,a8){return(a7.x>a8.left&&a7.xa8.top&&a7.y 1, attrib = retina ? "data-src-retina" : "data-src", images = this, loaded; this.one("unveil", function () { var source = this.getAttribute(attrib); source = source || this.getAttribute("data-src"); if (source) { this.setAttribute("src", source); if (typeof callback === "function") callback.call(this); } }); function unveil() { var inview = images.filter(function () { var $e = $(this), wt = $w.scrollTop(), wb = wt + $w.height(), et = $e.offset().top, eb = et + $e.height(); return eb >= wt - th && et <= wb + th; }); loaded = inview.trigger("unveil"); images = images.not(loaded); } $w.scroll(unveil); $w.resize(unveil); unveil(); return this; }; })(window.jQuery || window.Zepto); /* ----------------------------------------------------------------------- VIE Portal - Simple AJAX Library Written by Quynh Nguyen - VIEPortal.net ----------------------------------------------------------------------- */ function vieAjax() { var i = "", t, n; if (arguments.length > 0 && (i = arguments[0]), t = !1, arguments.length > 1 && (t = arguments[1]), this.httpRequest = null, window.XMLHttpRequest) this.httpRequest = new XMLHttpRequest; else if (window.ActiveXObject) try { this.httpRequest = new ActiveXObject("Msxml2.XMLHTTP") } catch (r) { try { this.httpRequest = new ActiveXObject("Microsoft.XMLHTTP") } catch (r) { } } if (!this.httpRequest) return alert("Please install and use lastest web browser: Internet Explorer, FireFox, Opera, Chrome, Safari, ..."), null; t && this.httpRequest && this.httpRequest.overrideMimeType && this.httpRequest.overrideMimeType("text/html"), i != "" && (n = window[i], typeof n == "function" && (this.httpRequest.onreadystatechange = n)), this.httpRequest && (this.onReadyStateChange = this.httpRequest.onreadystatechange) } vieAjax.prototype = { overrideMimeType: function (n) { if (this.httpRequest) this.httpRequest.overrideMimeType && n != "" && this.httpRequest.overrideMimeType(n); else return }, assignOnStateChangeFunction: function (n) { if (this.httpRequest) { if (n != "") { var t = window[n]; typeof t == "function" && (this.httpRequest.onreadystatechange = t) } } else return }, makeGETRequest: function (n, t) { this.httpRequest.open("GET", n + t, !0), this.httpRequest.send(null) }, makePOSTRequest: function (n, t) { this.httpRequest.open("POST", n, !0), this.httpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), Prototype.Browser.WebKit || (this.httpRequest.setRequestHeader("Content-length", t.length), this.httpRequest.setRequestHeader("Connection", "close")), this.httpRequest.send(t) }, getReadyState: function () { return this.httpRequest.readyState }, isCompleted: function () { return this.httpRequest.readyState == 4 || this.httpRequest.readyState == "complete" }, getResponseStatus: function () { return this.httpRequest.status }, getResponseText: function () { return this.isCompleted() && this.getResponseStatus() == 200 ? this.httpRequest.responseText : "" } }; /* ---------------------------------------------------------------------- VIE Portal - Layers Library Written by Quynh Nguyen - VIEPortal.net ----------------------------------------------------------------------- */ function ___showAwaitingMessage() { var i = arguments[0] || -1, r = arguments[1] || -1, n = $("vieAwaiting"), t, u; n && (i < 0 && (i = document.body.clientWidth - Element.getWidth(n) - 10), r < 0 && (r = 10), t = "Please wait a moment...", calLanguage && calLanguage == "vi" && (t = "Xin vui lòng đợi một chút..."), u = "   " + t + " ", n.update(u), n.setStyle({ top: r + "px", left: i + "px", visibility: "visible" }), n.show()) } function ___hideAwaitingMessage() { __hideBackground(); var n = $("vieAwaiting"); n && n.hide() } function __showBackground() { __resetLightWindow(); var n = $("vieBackground"); n && n.setStyle({ display: "block", visibility: "visible" }) } function __hideBackground() { var n = $("vieBackground"); n && n.hide() } function ___showNotificationMessage(n) { var r, i, t; n && n != "" && (r = navigator.appName.indexOf("Netscape") != -1, i = 10, document.documentElement && document.documentElement.scrollTop ? i = r ? pageYOffset : document.documentElement.scrollTop : document.body && (i = r ? pageYOffset : document.body.scrollTop), t = $("vieAwaiting"), t.update(n), t.setStyle({ top: i + 20 + "px", left: document.body.clientWidth - Element.getWidth(t) - 50 + "px" }), Effect.Appear(t, { duration: 1 }), Effect.Fade(t, { duration: 7 })) } function ___hideNotificationMessage() { var n = $("vieAwaiting"); n && Effect.Fade(n, { duration: 6 }) } function __showLayer(n, t, i, r, u) { var s = $(t), e, o, f; if (s && n) { e = { left: 0, top: 0 }, o = Element.cumulativeOffset(n), e.left = o[0] + r, e.top = o[1] + u, f = { width: 0, height: 0 }; switch (i) { case "left": f.width = 0 - Element.getWidth(n); break; case "right": f.width = Element.getWidth(n); break; case "top": f.height = 0 - Element.getHeight(n); break; case "under": f.height = Element.getHeight(n) } s.setStyle({ top: e.top + f.height + "px", left: e.left + f.width + "px", visibility: "visible", display: "block" }) } } function __hideLayer(n) { var t = $(n); t && __hideMe(t) } function __show() { var r = arguments[0] || "", n; if (r != "" && (n = $(r), n)) { var i = arguments[1] || -1, t = arguments[2] || -1, f = arguments[3] || 0, u = arguments[4] || 0; n.setStyle({ visibility: "visible" }), i >= 0 && n.setStyle({ left: i + f + "px" }), t >= 0 && n.setStyle({ top: t + u + "px" }) } } function __hide(n) { __hideLayer(n) } function __showMe(n) { n && Element.setStyle(n, { visibility: "visible" }) } function __hideMe(n) { n && Element.setStyle(n, { visibility: "hidden" }) } function __setLayerClass(n, t) { __setCssClass($(n), t) } function __setCssClass(n, t) { n && t && t != "" && (n.className = t) } $j(document).ready(function () { var r = "Please wait a moment...", u, n, t, i; calLanguage && calLanguage == "vi" && (r = "Xin vui lòng đợi một chút..."), u = "   " + r + " ", n = Element.extend(document.createElement("div")), n.setAttribute("id", "vieAwaiting"), n.setAttribute("class", "awaitingDialog"), n.update(u), n.setStyle({ display: "none" }), t = Element.extend(document.createElement("div")), t.setAttribute("id", "vieBackground"), t.setStyle({ backgroundImage: "url(" + ___vieportalStaticUrl + ___vieportalGlobalUrl + "Common/Images/lightwindow/black-70.png)", backgroundRepeat: "repeat", top: "0px", left: "0px", width: "100%", height: "10px", display: "none", visibility: "hidden", position: "absolute" }), i = $$("body")[0], i.appendChild(n), i.appendChild(t) }); /* ---------------------------------------------------------------------- VIE Portal - Media Library Written by Quynh Nguyen - VIEPortal.net ----------------------------------------------------------------------- */ function ___selectColor(n) { var u = ___vieportalSelectorUrl + "dialogs/Html.axd?files=color2", f = 460, r = 120, t, i, o, e; Prototype.Browser.IE ? (t = t = window.showModalDialog(u, "", "dialogHeight:" + r + "px;dialogWidth:" + f + "px;resizable:0;status:0;scroll:0"), t != null && (i = $(n), i && (i.value = t))) : (o = screen.width / 2 - f / 2, e = screen.height / 2 - r / 2, u += "&output=" + n, window.open(u, "", "top=" + e + ",left=" + o + ",height=" + r + ",width=" + f + ",resizable:0,status:0,scroll:0")) } function ___selectImageFile(n, t, i, r) { ___selectFile(n, t, i, "image", r) } function ___selectFile(n, t, i, r, u) { var o = 800, e = 515, s = screen.width / 2 - o / 2, h = screen.height / 2 - e / 2, f = ___vieportalSelectorUrl + "FilePicker.ashx?language=" + ___vieportalUICulture + "&relatedId=" + i + "&moduleId=" + n + "&contentTypeId=" + t + "&mode=select&doctype=" + r + "&output=" + u; Prototype.Browser.IE ? (imageUrl = window.showModalDialog(f, "", "dialogHeight:" + e + "px;dialogWidth:" + o + "px;resizable:1;status:0;scroll:0"), imageUrl != null && imageUrl != "" && ($(u).value = imageUrl)) : (f += "&ns=1", window.open(f, "", "modal=1,left=" + s + ",top=" + h + ",height=" + e + ",width=" + o + ",resizable=0,status=0,scrollbars=0")) } function ___openImage(n) { var r, i, t, u, f; if (n == "") return !1; if (r = arguments[1] || 480, i = arguments[2] || 320, i < screen.height - 100 && r < screen.width - 20) { ___showImage(n, "VIE Portal NG Image"); return } Prototype.Browser.IE || (i += 1, r += 1), i > screen.height - 100 && (r += 18), t = "status=no,resizable=yes,scrollbars=yes,toolbar=no,location=no,fullscreen=no,titlebar=yes,height=".concat(i).concat(",").concat("width=").concat(r).concat(","), t = t.concat("top=").concat((screen.height - i) / 2).concat(","), t = t.concat("left=").concat((screen.width - r) / 2), u = open("", "_blank", t), f = "Close", calLanguage == "vi" && (f = "Đóng lại"), u.document.writeln("VIE Portal NG Image"), u.document.writeln(''), u.document.writeln(''), u.document.writeln("") } function ___showImage(n, t) { n != "" && myLightWindow.activateWindow({ href: n, title: t }) } function ___getWindowsMediaPlayerCode() { var r = arguments[0] || "", f = arguments[1] || 320, u = arguments[2] || 304, n = arguments[3] || "false"; n = n + "", n = n == "true" ? "1" : "0"; var i = arguments[4] || 1, e = arguments[5] || "none", o = arguments[6] || "wmPlayer", t = '' + ___getWindowsMediaPlayerEmbedCode(r, f, u, i, n), t += "" } function ___getWindowsMediaPlayerEmbedCode() { var u = arguments[0] || "", f = arguments[1] || 320, e = arguments[2] || 304, r = arguments[3] || 1, n = arguments[4] || "0", t = arguments[5] || "wmPlayer"; return '' } function ___getFlashCode() { var r = arguments[0] || ""; if (r == "") return ""; var u = arguments[1] || 0, f = arguments[2] || 0, e = arguments[3] || "", t = arguments[4] || "", i = arguments[5] || "", o = arguments[6] || "always", n = " 0 && (n += ' width="' + u + '"'), f > 0 && (n += ' height="' + f + '"'), n += '>', i != "" && (n += ''), n += ___getFlashEmbedCode(r, u, f, e + "_e", t, i, o) + "" } function ___getFlashEmbedCode() { var r = arguments[0] || "", n; if (r == "") return ""; var f = arguments[1] || 0, e = arguments[2] || 0, o = arguments[3] || "", u = arguments[4] || "", i = arguments[5] || "", t = arguments[6] || "always"; return t == "" && (t = "always"), n = ' 0 && (n += ' width="' + f + '"'), e > 0 && (n += ' height="' + e + '"'), i != "" && (n += ' flashvars="' + i + '"'), n += "/>" } function ___getFlashMediaPlayerCode() { var e = arguments[0] || "", t, i, o; if (e == "" || (t = arguments[1] || "", t == "")) return ""; t.indexOf("//") == 0 && (t = "http:" + t); var u = arguments[2] || 0, f = arguments[3] || 0, c = arguments[4] || "false", r = arguments[5] || "", s = arguments[6] || "video", h = arguments[7] || "", n = arguments[8] || ""; return n != "" && (n += "&"), n += "volume=100&autostart=" + c, h != "" && (n += "&image=" + h), n += "&file=" + t, u > 0 && (n += "&width=" + u), f > 0 && (n += "&height=" + f), r != "" && (n += "&id=" + r), i = arguments[9] || "always", i == "" && (i = "always"), o = arguments[10] || !0, o ? ___getFlashEmbedCode(e, u, f, r, s, n, i) : ___getFlashCode(e, u, f, r, s, n, i) } function ___getFlashVideoCode() { var n = arguments[0] || ""; if (n == "") return ""; n.indexOf("//") == 0 && (n = "http:" + n); var u = arguments[1] || "", f = arguments[2] || 0, r = arguments[3] || 0, t = arguments[4] || "false", i = arguments[5] || ""; return ___getFlashMediaPlayerCode(___vieportalStaticUrl + ___vieportalGlobalUrl + "Common/Controls/MediaPlayer.swf", n, f, r, t, i, "", u, "screencolor=0x000000&backcolor=0x000000&frontcolor=0xCCCCCC&lightcolor=0x557722&stretching=uniform") } function ___getHtml5MediaCode() { var n = arguments[0] || "", t; if (n == "") return ""; n.indexOf("//") == 0 && (n = "http:" + n); var u = arguments[1] || "", e = arguments[2] || 0, o = arguments[3] || 0, f = arguments[4] || "", s = arguments[5] || "__vieportal_media", i = "video", r = n.toLowerCase().substring(n.length - 3); return (r == "wma" || r == "asf" || r == "mp3" || r == "wav") && (i = "audio"), t = "<" + i + ' id="' + s + '" controls="controls" preload="none" width="' + e + '" height="' + o + '"', f == "true" && (t += ' autoplay="autoplay"'), u != "" && (t += ' poster="' + u + '"'), t += ' style="color:white;background-color:black;">Your browser does not support HTML5 ' + i + "" } function ___getVideoCode() { var n = arguments[0] || "", f; if (n == "") return ""; n.indexOf("//") == 0 && (n = "http:" + n); var e = arguments[1] || "", u = arguments[2] || 0, r = arguments[3] || 0, t = arguments[4] || "false", i = arguments[5] || ""; return ___isMobileDevice ? ___getHtml5MediaCode(n, e, u, r, 1, t, i) : (f = n.toLowerCase().substring(n.length - 3), f == "wmv" ? (t = t == "true" ? "1" : "0", ___getWindowsMediaPlayerEmbedCode(n, u, r, 1, t, i)) : ___getFlashMediaPlayerCode(___vieportalStaticUrl + ___vieportalGlobalUrl + "Common/Controls/MediaPlayer.swf", n, u, r, t, i, "", e, "screencolor=0x000000&backcolor=0x000000&frontcolor=0xCCCCCC&lightcolor=0x557722&stretching=uniform")) } function ___getAudioCode() { var n = arguments[0] || "", i; if (n == "") return ""; n.indexOf("//") == 0 && (n = "http:" + n); var u = arguments[1] || 0, t = arguments[2] || "false", r = arguments[3] || ""; return ___isMobileDevice ? ___getHtml5MediaCode(n, "", u, height, 1, t, r) : (i = n.toLowerCase().substring(n.length - 3), i == "wma" || i == "asf" ? (t == "true" && (t = "1"), ___getWindowsMediaPlayerEmbedCode(n, u, 45, 1, t, r)) : ___getFlashMediaPlayerCode(___vieportalStaticUrl + ___vieportalGlobalUrl + "Common/Controls/MediaPlayer.swf", n, u, 24, t, r, "", "", "screencolor=0x000000&backcolor=0x000000&frontcolor=0xCCCCCC&lightcolor=0x557722&stretching=uniform")) }; /* ---------------------------------------------------------------------- VIE Portal - Porltlets Library Written by Quynh Nguyen - VIEPortal.net ----------------------------------------------------------------------- */ function _showVIE(n) { var i = arguments[1] || "", t = $(n); t && t.setStyle({ display: i }) } function _hideVIE(n) { var t = $(n); t && t.setStyle({ display: "none" }) } function _hide(n) { _hideVIE(n), _hideVIE(n + "_M"), _showVIE(n + "_R"), ___repositionPortletIcons() } function _show(n) { _hideVIE(n + "_R"), _showVIE(n), _showVIE(n + "_M"), ___repositionPortletIcons() } function _close(n) { _hideVIE(n), ___repositionPortletIcons() } function _repositionPortletMenu(n) { var i = $(n), r = $(n + "_Icon"), t; i && r && (t = Element.cumulativeOffset(i), r.setStyle({ left: t.left + "px", top: t.top + "px", backgroundImage: "none" })) } function _highlightPortletMenu(n) { var t = $(n + "_Icon"); t && t.setStyle({ backgroundColor: "red", backgroundImage: "none" }) } function _openPortletUrl(n) { var t = n; return t.indexOf("ReturnUrl=") < 0 && (t += t.indexOf("?") > 0 ? "&" : "?", t += "ReturnUrl=" + encodeURIComponent(___vieportalDesktopUrl)), window.location.href = t, !1 } function _showPortletMenu(n, t, i) { $(t + "_m") || _buildPortletMenu(t, i), _showActionMenu(n, t + "_m") } function _buildPortletMenu(n, t) { var u = t[1], i, v, l, c, a, h, y; u || (u = ___action_Css), i = t[2], i || (i = ___action_Css_Sub); var e = "", s = "", o = "", f = "", r = "", $(n).update(r + e + s + o + f) } function _showActionMenu(n, t) { __showLayer(n, t, "none", 0, 0); var i = $(t); i && i.setOpacity(.9) } function _showActionSubMenu(n, t) { __showLayer(n, t, "right", -5, -1); var i = $(t); i && i.setOpacity(.9) } function _showPortletButtons(n, t, i) { var e = $(t + "_Buttons"); if (e) { n.onmouseover = null; var u = i[2], f = i[3], r = ""; f[0] == 1 && (r += "'), f[1] == 1 && (r += '', r += ''), f[3] == 1 && (r += ''), f[4] == 1 && (r += "'), e.update(r) } } function ___repositionPortletIcons() { try { if (!___hiddenIcons || ___hiddenIcons == "undefined") return; for (var n = 0; n < ___hiddenIcons.length; n++) _repositionPortletMenu(___hiddenIcons[n]) } catch (t) { } } function ___showHiddenPortletIcons() { try { if (!___hiddenIcons || ___hiddenIcons == "undefined") return; ___repositionPortletIcons(); for (var n = 0; n < ___hiddenIcons.length; n++) _highlightPortletMenu(___hiddenIcons[n]) } catch (t) { } }; /* ---------------------------------------------------------------------- VIE Portal - Short-name Generator Library Written by Quynh Nguyen - VIEPortal.net ----------------------------------------------------------------------- */ function ___generateShortName(n) { return ___generateShortname(n, !0) } function ___generateShortname(n) { if (!n || n.strip() == "") return ""; var i = arguments[1] || !0, t = n.strip(); return t = t.replace(/\u00E1/g, "a"), t = t.replace(/\u00C1/g, "A"), t = t.replace(/\u00E0/g, "a"), t = t.replace(/\u00C0/g, "A"), t = t.replace(/\u1EA3/g, "a"), t = t.replace(/\u1EA2/g, "A"), t = t.replace(/\u00E3/g, "a"), t = t.replace(/\u00C3/g, "A"), t = t.replace(/\u1EA1/g, "a"), t = t.replace(/\u1EA0/g, "A"), t = t.replace(/\u0103/g, "a"), t = t.replace(/\u0102/g, "A"), t = t.replace(/\u1EAF/g, "a"), t = t.replace(/\u1EAE/g, "A"), t = t.replace(/\u1EB1/g, "a"), t = t.replace(/\u1EB0/g, "A"), t = t.replace(/\u1EB3/g, "a"), t = t.replace(/\u1EB2/g, "A"), t = t.replace(/\u1EB5/g, "a"), t = t.replace(/\u1EB4/g, "A"), t = t.replace(/\u1EB7/g, "a"), t = t.replace(/\u1EB6/g, "A"), t = t.replace(/\u00E2/g, "a"), t = t.replace(/\u00C2/g, "A"), t = t.replace(/\u1EA5/g, "a"), t = t.replace(/\u1EA4/g, "A"), t = t.replace(/\u1EA7/g, "a"), t = t.replace(/\u1EA6/g, "A"), t = t.replace(/\u1EA9/g, "a"), t = t.replace(/\u1EA8/g, "A"), t = t.replace(/\u1EAB/g, "a"), t = t.replace(/\u1EAA/g, "A"), t = t.replace(/\u1EAD/g, "a"), t = t.replace(/\u1EAC/g, "A"), t = t.replace(/\u00E9/g, "e"), t = t.replace(/\u00C9/g, "E"), t = t.replace(/\u00E8/g, "e"), t = t.replace(/\u00C8/g, "E"), t = t.replace(/\u1EBB/g, "e"), t = t.replace(/\u1EBA/g, "E"), t = t.replace(/\u1EBD/g, "e"), t = t.replace(/\u1EBC/g, "E"), t = t.replace(/\u1EB9/g, "e"), t = t.replace(/\u1EB8/g, "E"), t = t.replace(/\u00EA/g, "e"), t = t.replace(/\u00CA/g, "E"), t = t.replace(/\u1EBF/g, "e"), t = t.replace(/\u1EBE/g, "E"), t = t.replace(/\u1EC1/g, "e"), t = t.replace(/\u1EC0/g, "E"), t = t.replace(/\u1EC3/g, "e"), t = t.replace(/\u1EC2/g, "E"), t = t.replace(/\u1EC5/g, "e"), t = t.replace(/\u1EC4/g, "E"), t = t.replace(/\u1EC7/g, "e"), t = t.replace(/\u1EC6/g, "E"), t = t.replace(/\u00ED/g, "i"), t = t.replace(/\u00CD/g, "I"), t = t.replace(/\u00EC/g, "i"), t = t.replace(/\u00CC/g, "I"), t = t.replace(/\u1EC9/g, "i"), t = t.replace(/\u1EC8/g, "I"), t = t.replace(/\u0129/g, "i"), t = t.replace(/\u0128/g, "I"), t = t.replace(/\u1ECB/g, "i"), t = t.replace(/\u1ECA/g, "I"), t = t.replace(/\u00F3/g, "o"), t = t.replace(/\u00D3/g, "O"), t = t.replace(/\u00F2/g, "o"), t = t.replace(/\u00D2/g, "O"), t = t.replace(/\u1ECF/g, "o"), t = t.replace(/\u1ECE/g, "O"), t = t.replace(/\u00F5/g, "o"), t = t.replace(/\u00D5/g, "O"), t = t.replace(/\u1ECD/g, "o"), t = t.replace(/\u1ECC/g, "O"), t = t.replace(/\u01A1/g, "o"), t = t.replace(/\u01A0/g, "O"), t = t.replace(/\u1EDB/g, "o"), t = t.replace(/\u1EDA/g, "O"), t = t.replace(/\u1EDD/g, "o"), t = t.replace(/\u1EDC/g, "O"), t = t.replace(/\u1EDF/g, "o"), t = t.replace(/\u1EDE/g, "O"), t = t.replace(/\u1EE1/g, "o"), t = t.replace(/\u1EE0/g, "O"), t = t.replace(/\u1EE3/g, "o"), t = t.replace(/\u1EE2/g, "O"), t = t.replace(/\u00F4/g, "o"), t = t.replace(/\u00D4/g, "O"), t = t.replace(/\u1ED1/g, "o"), t = t.replace(/\u1ED0/g, "O"), t = t.replace(/\u1ED3/g, "o"), t = t.replace(/\u1ED2/g, "O"), t = t.replace(/\u1ED5/g, "o"), t = t.replace(/\u1ED4/g, "O"), t = t.replace(/\u1ED7/g, "o"), t = t.replace(/\u1ED6/g, "O"), t = t.replace(/\u1ED9/g, "o"), t = t.replace(/\u1ED8/g, "O"), t = t.replace(/\u00FA/g, "u"), t = t.replace(/\u00DA/g, "U"), t = t.replace(/\u00F9/g, "u"), t = t.replace(/\u00D9/g, "U"), t = t.replace(/\u1EE7/g, "u"), t = t.replace(/\u1EE6/g, "U"), t = t.replace(/\u0169/g, "u"), t = t.replace(/\u0168/g, "U"), t = t.replace(/\u1EE5/g, "u"), t = t.replace(/\u1EE4/g, "U"), t = t.replace(/\u01B0/g, "u"), t = t.replace(/\u01AF/g, "U"), t = t.replace(/\u1EE9/g, "u"), t = t.replace(/\u1EE8/g, "U"), t = t.replace(/\u1EEB/g, "u"), t = t.replace(/\u1EEA/g, "U"), t = t.replace(/\u1EED/g, "u"), t = t.replace(/\u1EEC/g, "U"), t = t.replace(/\u1EEF/g, "u"), t = t.replace(/\u1EEE/g, "U"), t = t.replace(/\u1EF1/g, "u"), t = t.replace(/\u1EF0/g, "U"), t = t.replace(/\u00FD/g, "y"), t = t.replace(/\u00DD/g, "Y"), t = t.replace(/\u1EF3/g, "y"), t = t.replace(/\u1EF2/g, "Y"), t = t.replace(/\u1EF7/g, "y"), t = t.replace(/\u1EF6/g, "Y"), t = t.replace(/\u1EF9/g, "y"), t = t.replace(/\u1EF8/g, "Y"), t = t.replace(/\u1EF5/g, "y"), t = t.replace(/\u1EF4/g, "Y"), t = t.replace(/\u00D0/g, "D"), t = t.replace(/\u0110/g, "D"), t = t.replace(/\u0111/g, "d"), t = t.replace(/\s\s/g, " "), t = t.replace(/\s:\s/g, "-"), t = t.replace(/\s:/g, "-"), t = t.replace(/\s\!/g, "-"), t = t.replace(/\s\?/g, ""), t = t.replace(/\s\./g, ""), t = t.replace(/\s\,/g, ""), t = i ? t.replace(/\s/g, "-") : t.replace(/\s/g, "_"), t = t.replace(/\+/g, "").replace(/\//g, "-").replace(/\'/g, ""), t = t.replace(/\\/g, "-").replace(/\=/g, "").replace(/\&/g, "").replace(/\?/g, ""), t = t.replace(/\,/g, "").replace(/\./g, "-").replace(/\&/g, "").replace(/\?/g, ""), t = t.replace(/\(/g, "").replace(/\)/g, "").replace(/\#/g, "").replace(/\%/g, ""), t = t.replace(/\`/g, "").replace(/\!/g, "").replace(/\@/g, "").replace(/\$/g, ""), t = t.replace(/\>/g, "").replace(/\ 0 && (t = arguments[0]), n.setAttribute("id", "vieTooltip"), n.setAttribute("class", t), n.setStyle({ left: "-5000px", top: "0px", display: "block", position: "absolute", zIndex: 9999 })), n }, hide: function () { var n = $("vieTooltip"); n && (this.isNS || this.isIE) && (this.isEnabled = !1, this.isLoaded = !1, n && (n.update(""), n.setStyle({ visibility: "hidden", left: "-5000px" }))) }, show: function () { var r = arguments[0] || "", t, n, i; r != "" && (this.isIE && document.readyState != "complete" || (t = "adminHintBox", arguments.length > 1 && arguments[1] && arguments[1] != "" && (t = arguments[1]), n = this.create(t), this.isLoaded || (n.innerHTML == "" && n.update(r), i = 260, arguments.length > 2 && arguments[2] && arguments[2] > 0 && (i = arguments[2]), n.setStyle({ width: i + "px", className: t }), this.isLoaded = !0), this.isEnabled = !0)) }, layer: function (n) { var t = $(n); t && this.show(t.innerHTML, arguments[1], arguments[2]) }, ajax: function (n) { if (n && n != "") { var t = this; new Ajax.Request(n, { method: "get", onSuccess: function (n) { t.show(n.responseText, arguments[1], arguments[2]) } }) } } }; var __tooltip = new vieTooltip; __tooltip.create(); $j(document).on("mousemove", function (n) { var i; if (__tooltip || (__tooltip = new vieTooltip, __tooltip.create()), __tooltip.isEnabled) { i = { x: 0, y: 0 }, i.x = __tooltip.isNS ? n.pageX : event.clientX + __tooltip.ieBody().scrollLeft, i.y = __tooltip.isNS ? n.pageY : event.clientY + __tooltip.ieBody().scrollTop; var r = __tooltip.isIE && !window.opera ? __tooltip.ieBody().clientWidth - event.clientX - __tooltip.offset.x : window.innerWidth - n.clientX - __tooltip.offset.x - 20, f = __tooltip.isIE && !window.opera ? __tooltip.ieBody().clientHeight - event.clientY - __tooltip.offset.y : window.innerHeight - n.clientY - __tooltip.offset.y - 20, u = __tooltip.offset.x < 0 ? __tooltip.offset.x * -1 : -1e3, t = __tooltip.create(); t.style.left = r < t.offsetWidth ? __tooltip.isIE ? __tooltip.ieBody().scrollLeft + event.clientX - t.offsetWidth + "px" : window.pageXOffset + n.clientX - t.offsetWidth + "px" : i.x < u ? "5px" : i.x + __tooltip.offset.x + "px", t.style.top = f < t.offsetHeight ? __tooltip.isIE ? __tooltip.ieBody().scrollTop + event.clientY - t.offsetHeight - __tooltip.offset.y + "px" : window.pageYOffset + n.clientY - t.offsetHeight - __tooltip.offset.y + "px" : i.y + __tooltip.offset.y + "px", t.style.visibility = "visible" } }); $j(document).ready(function () { __bindTooltipsOnMouse() }); /* ---------------------------------------------------------------------- VIE Portal - Utilities Library Written by Quynh Nguyen - VIEPortal.net ----------------------------------------------------------------------- */ function __normalizeNumber(n) { var t, i; if (n && (t = n.value.strip(), t != "")) try { i = t.indexOf("."), i > 0 ? (t.indexOf(".", i + 1) > 0 || t.substring(i, 3) == "000") && (t = t.replace(/\./g, ""), t = t.replace(/\,/g, ".")) : t.indexOf(",") > 0 && (i = t.indexOf(","), (t.indexOf(",", i + 1) > 0 || t.substring(i, 3) == "000") && (t = t.replace(/\,/g, ""))), n.value = t } catch (r) { } } function __normalizeUris(n) { if (!n || n == "") return ""; var t = n.strip(); return t = t.replace(/&/g, "&") } function __leftStr(n, t) { return t <= 0 ? "" : t > String(n).length ? n : String(n).substring(0, t) } function __rightStr(n, t) { if (t <= 0) return ""; if (t > String(n).length) return n; var i = String(n).length; return String(n).substring(i, i - t) } function ___showAjaxWaiting(n) { if (n && n != "undefined") n.update("
"); else return } function ___showAjaxHtml() { var t = "", n, i, r; (arguments.length > 0 && arguments[0] && (t = arguments[0]), n = "", arguments.length > 1 && arguments[1] && (n = arguments[1]), t && t != "" && t != "undefined" && n && n != "" && n != "undefined") && (i = $(t), i) && (r = !0, arguments.length > 2 && (r = arguments[2]), r && ___showAjaxWaiting(i), new Ajax.Request(n, { method: "get", onSuccess: function (n) { i.update(n.responseText), ___repositionPortletIcons(), __resetLightWindow(), __bindTooltipsOnMouse() } })) } function ___focusOnEnter(n, t) { if (n = n ? n : window.event ? event : null, n) { var i = n.charCode ? n.charCode : n.keyCode ? n.keyCode : n.which ? n.which : 0; if (i == 13) try { $(t).focus() } catch (r) { } } } function ___goBack() { window.history.go(-1) } function ___markAllListItemsSelected(n) { var i = $(n), r, t; if (i && (r = i.options, r)) for (t = 0; t < r.length; t++) i.options[t].selected = !0 } function ___switchListItems(n, t) { var o = $(n), i, r, u, e, f; if (o && (i = o.options, i)) { if (r = i.selectedIndex, u = -1, t == "up") { if (r <= 0) return; u = r - 1 } if (t == "down") { if (r >= i.length - 1) return; u = r + 1 } e = i[u].text, f = i[u].value, i[u].text = i[r].text, i[u].value = i[r].value, i[u].selected = !0, i[r].text = e, i[r].value = f, i[r].selected = !1 } }; /* ---------------------------------------------------------------------- VIE Portal - Windows Library Written by Quynh Nguyen - VIEPortal.net ----------------------------------------------------------------------- */ function ___tellFriends(n, t) { if (n && n != "" && t && t != "") { t[0] == "/" && (t = "~" + t); var r = ___vieportalGlobalUrl + "TellFriends.ashx?language=" + ___vieportalUICulture + "&title=" + encodeURIComponent(n) + "&url=" + encodeURIComponent(t), i = "Tell Friends"; ___vieportalUICulture == "vi-VN" && (i = "Gửi bạn bè"), myLightWindow.activateWindow({ href: r, title: i, width: 600, height: 400 }) } } function ___openPopup() { var e = arguments[0] || "/", t = arguments[1] || 500, n, i; t && t != "" || (t = 500), n = arguments[2] || 500, n && n != "" || (n = 500); var s = arguments[3] || "yes", o = arguments[3] || "yes", c = arguments[4] || "no", h = arguments[5] || "no", u = arguments[6] || "no", f = arguments[7] || "no", r = (screen.width - t) / 2; r || (r = 400), i = (screen.height - n) / 2, i || (i = 150), window.open(e, "", "width=" + t + ",height=" + n + ",left=" + r + ",top=" + i + ",resizable=" + s + ",scrollbars=" + o + ",location=" + c + ",status=" + h + ",menubar=" + u + ",toolbar=" + f) } function ___openFixedPopup() { var u = arguments[0] || "/", t = arguments[1] || 500, n, i, r; (t == null || t == "") && (t = 500), n = arguments[2] || 500, (n == null || n == "") && (n = 500), i = (screen.width - t) / 2, i || (i = 400), r = (screen.height - n) / 2, r || (r = 150), window.open(u, "", "width=" + t + ",height=" + n + ",left=" + i + ",top=" + r + ",resizable=no,scrollbars=no", !1) } function ___openWindow() { var f = arguments[0] || "/", i = arguments[1] || 800, n, u, r, t; i && i != "" || (i = 800), n = arguments[2] || 400, n && n != "" || (n = 400), u = (screen.width - i) / 2, u || (u = 400), r = (screen.height - n) / 2, r || (r = 100), t = arguments[3] || "", t && t != "" || (t = "vieportalng"), window.open(f, t, "width=" + i + ",height=" + n + ",left=" + u + ",top=" + r + ",resizable=yes,scrollbars=no,location=yes,status=no,menubar=no,toolbar=no") } function ___openUrl(n) { if (n && n != null && n != "undefined" && n != "") { var t = arguments[1] || "_blank"; t == "_blank" ? window.open(n) : ___redirectUrl(n) } } function ___redirectUrl(n) { if (n && n != null && n != "undefined" && n != "") document.location.href = n; else return } function ___resizeWindow(n, t) { window.resizeTo(n, t); var r = (screen.width - n) / 2, i = (screen.height - t) / 2; window.moveTo(r, i) } function ___maximizeWindow() { window.moveTo(0, 0), window.resizeTo(screen.width, screen.height) } function ___moveToCenter(n) { if (n && n != null && n != "undefined") { var u = arguments[1] || 0, r = arguments[2] || 0, i = navigator.appName.indexOf("Netscape") != -1, t = 0; document.documentElement && document.documentElement.scrollTop ? t = i ? pageYOffset : document.documentElement.scrollTop : document.body && (t = i ? pageYOffset : document.body.scrollTop), n.setStyle({ left: (screen.width - Element.getWidth(n)) / 2 - r + "px", top: (screen.height - Element.getHeight(n)) / 2 + t - u + "px" }) } }; /* ---------------------------------------------------------------------- VIE Portal - Social Shares Written by Quynh Nguyen - VIEPortal.net ----------------------------------------------------------------------- */ var vieSocialShare = Class.create(), _share; vieSocialShare.prototype = { settings: { facebook: "https://www.facebook.com/sharer.php?u=[URL]&t=[TITLE]", twitter: "http://twitter.com/share?text=[TITLE]&url=[URL]", gplus: "https://plus.google.com/share?url=[URL]", pinterest: "http://www.pinterest.com/pin/create/button/?url=[URL]&description=[TITLE]&media=[THUMBNAIL]", stumbleupon: "http://www.stumbleupon.com/submit?url=[URL]&title=[TITLE]", reddit: "http://reddit.com/submit?url=[URL]&title=[TITLE]", digg: "http://digg.com/submit?url=[URL]&title=[TITLE]", tumblr: "http://www.tumblr.com/share/link?url=[URL]&name=[TITLE]", linkedin: "http://www.linkedin.com/shareArticle?mini=true&url=[URL]&title=[TITLE]", delicious: "http://www.delicious.com/save?v=5&noui&jump=close&url=[URL]&title=[TITLE]", linkhay: "http://embed2.linkhay.com/actions/link/post/embed.php?source_url=[URL]", zingme: "http://link.apps.zing.vn/share?u=[URL]&t=[TITLE]" }, title: "", url: "", thumbnail: "", initialize: function () { }, share: function (n) { this.url = arguments[1] || "", this.url == "" && (this.url = location.href), this.title = arguments[2] || "", this.title == "" && (this.title = document.title), this.thumbnail = arguments[3] || ""; var t = n.replace("[URL]", encodeURIComponent(this.url)).replace("[TITLE]", encodeURIComponent(this.title)); return t.indexOf("[THUMBNAIL]") > 0 && (t = t.replace("[THUMBNAIL]", encodeURIComponent(this.thumbnail))), ___openWindow(t, 626, 436, "socialshare"), !1 }, facebook: function () { return this.share(this.settings.facebook, arguments[0], arguments[1]) }, twitter: function () { return this.share(this.settings.twitter, arguments[0], arguments[1]) }, gplus: function () { return this.share(this.settings.gplus, arguments[0], arguments[1]) }, pinterest: function () { return this.share(this.settings.pinterest, arguments[0], arguments[1], arguments[2]) }, stumbleupon: function () { return this.share(this.settings.stumbleupon, arguments[0], arguments[1]) }, reddit: function () { return this.share(this.settings.reddit, arguments[0], arguments[1]) }, digg: function () { return this.share(this.settings.digg, arguments[0], arguments[1]) }, tumblr: function () { return this.share(this.settings.tumblr, arguments[0], arguments[1]) }, linkedin: function () { return this.share(this.settings.linkedin, arguments[0], arguments[1]) }, delicious: function () { return this.share(this.settings.delicious, arguments[0], arguments[1]) }, linkhay: function () { return this.share(this.settings.linkhay, arguments[0]) }, zingme: function () { return this.share(this.settings.zingme, arguments[0], arguments[1]) } }, _share = new vieSocialShare; function __refreshCaptcha(imageControlId, hiddenControlId, useShortCode, useSmallImage, useSalt){var url = '/GlobalRpc.ashx/vi-VN/-/RefreshCaptcha'+ '/' + useShortCode + '/' + useSmallImage + '/' + useSalt + '/' + Math.random();new Ajax.Request(url, {method: 'get',onSuccess: function(transport) {try {var captcha = transport.responseText.evalJSON();$(imageControlId).src = captcha.image;$(hiddenControlId).value = captcha.code;}catch(e){}}});}function __vButtons(images){if (images==null || !images.length || images.length<1)return;var buttons = '';for (var index=0;index';document.write(buttons);}function _kinetic(info) {if (!info || 'undefined' == info) {return;} else if (!info.slider || 'undefined' == info.slider || !info.container || 'undefined' == info.container || !info.items || 'undefined' == info.items) {return;}var setSliderWidth = false;if (info.setSliderWidth != null && 'undefined' != info.setSliderWidth) {setSliderWidth = info.setSliderWidth;} else if (info.setWidth != null && 'undefined' != info.setWidth) {setSliderWidth = info.setWidth;}var sliderWidth = '';if (info.sliderWidth != null && 'undefined' != info.sliderWidth) {sliderWidth = info.sliderWidth;}var moveX = true;if (info.moveX != null && 'undefined' != info.moveX) {moveX = info.moveX;}var moveY = false;if (info.moveY != null && 'undefined' != info.moveY) {moveY = info.moveY;}var sliderCtrl = $(info.slider);var containerCtrl = $(info.container);var itemsCtrl = $(info.items);if (sliderCtrl == null || 'undefined' == sliderCtrl || containerCtrl == null || 'undefined' == containerCtrl || itemsCtrl == null || 'undefined' == itemsCtrl) {return;}var margin = 0;if (info.margin && 'undefined' != info.margin) {margin = info.margin;}var width = 0, height = 0;var items = itemsCtrl.childElements();for (var index=0; index itemHeight) {height = itemHeight;}}sliderCtrl.setStyle({ height: height + 'px' });if (setSliderWidth) {sliderCtrl.setStyle({ width: sliderCtrl.parentNode.getWidth() + 'px' });} else if (sliderWidth != '') {sliderCtrl.setStyle({ width: sliderWidth });}containerCtrl.setStyle({ width: width + 'px' });$j('#' + info.slider).kinetic({ x: moveX, y: moveY });}function _refineImagesAndTables() {var docWidth = document.viewport.getWidth();var bestWidth = docWidth;if (docWidth < 420) {bestWidth = (docWidth * 60) / 100;} else if (docWidth < 560) {bestWidth = (docWidth * 80) / 100;} else {bestWidth = 0;}$j('table.vie-width').each(function (){if ($j(this).attr('vie-width')){try {var width = parseInt($j(this).attr('vie-width'));if (width > 0) {if (bestWidth == 0 || bestWidth > width) {$j(this).css('width', width);} else {$j(this).css('width', '100%');}} else {$j(this).css('width', '100%');}} catch (e) { }}});$j('img.vie-width').each(function (){if ($j(this).attr('vie-width')){try {var width = parseInt($j(this).attr('vie-width'));if (width > 0) {if (bestWidth == 0 || bestWidth > width) {$j(this).css('width', width);} else {$j(this).css('width', '100%');}} else {$j(this).css('width', '100%');}} catch (e) { }}});}$j(document).ready(function (){$j('.vie-click').on('click', function (){if ($j(this).attr('data-href')){var href = $j(this).attr('data-href');if (href.indexOf('javascript:') < 0){window.location.href = href;}}});if (___isMobilePlatform && 'undefined' != ___isMobilePlatform){$j('.vie-click').swipe({swipe: function (event, direction, distance, duration, fingerCount){if (event.type == 'touchend' && direction == null && distance == 0){if ($j(this).attr('data-href')){var href = $j(this).attr('data-href');if (href.indexOf('javascript:') < 0){window.location.href = href;}}}},threshold: 0});}$j('a.vie-tag').each(function (){$j(this).attr('href', ___searchByTags + encodeURIComponent($j(this).text()));$j(this).attr('target', '_blank');$j(this).attr('rel', 'nofollow');});if (___isMobilePlatform && ___isMobileDevice) {_refineImagesAndTables();window.addEventListener('orientationchange', function() {_refineImagesAndTables();}, false);window.addEventListener('resize', function() {_refineImagesAndTables();}, false);}$j('img.vie-lazy').unveil(300);});if (!___isMobilePlatform) _addCss("//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css");