Universal Studios Florida - Parque Temático (2022)

';style = String.__parseStyleElement.childNodes[0].style;}Element.CSS_PROPERTIES.each(function(property) {if (style[property]) styleRules.set(property, style[property]);});if (Prototype.Browser.IE && this.include('opacity')) styleRules.set('opacity', this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]);return styleRules;};if (document.defaultView && document.defaultView.getComputedStyle) {Element.getStyles = function(element) {var css = document.defaultView.getComputedStyle($(element), null);return Element.CSS_PROPERTIES.inject({}, function(styles, property) {styles[property] = css[property];return styles;});};} else {Element.getStyles = function(element) {element = $(element);var css = element.currentStyle, styles;styles = Element.CSS_PROPERTIES.inject({}, function(results, property) {results[property] = css[property];return results;});if (!styles.opacity) styles.opacity = element.getOpacity();return styles;};}Effect.Methods = {morph: function(element, style) {element = $(element);new Effect.Morph(element, Object.extend({style: style}, arguments[2] ||{}));return element;},visualEffect: function(element, effect, options) {element = $(element);var s = effect.dasherize().camelize(), klass = s.charAt(0).toUpperCase() + s.substring(1);new Effect[klass](element, options);return element;},highlight: function(element, options) {element = $(element);new Effect.Highlight(element, options);return element;}};$w('fade appear grow shrink fold blindUp blindDown slideUp slideDown ' +'pulsate shake puff squish switchOff dropOut').each(function(effect) {Effect.Methods[effect] = function(element, options) {element = $(element);Effect[effect.charAt(0).toUpperCase() + effect.substring(1)](element, options);return element;};});$w('getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles').each(function(f) {Effect.Methods[f] = Element[f];});Element.addMethods(Effect.Methods);function slideRight(element, options) {options = options || {};var innerElm = element.down("div");var target = innerElm.down("div");var beforeStart = options.beforeStart;var afterFinish = options.afterFinish;options.mode = "relative";options.x = element.getWidth();options.beforeStart = function() {if (beforeStart) {beforeStart();}element.style.overflow = "hidden";innerElm.style.overflow = "hidden";innerElm.style.position = "relative";target.style.left = -options.x + "px";};options.afterFinish = function() {if (afterFinish) {afterFinish();}element.style.overflow = "visible";innerElm.style.overflow = "visible";};options.beforeSetup = function() {element.show();};var move = new Effect.Move(target, options);}Effect.ExpandMap = function(fromElm, morphElm, options) {var oSize;var oPos;var morphElm2;new Effect.Opacity(morphElm, Object.extend(Object.extend({}, options), {duration: 0.5,from: 0,to: 1,beforeSetupInternal: function() {oSize = morphElm.getDimensions();oPos = morphElm.positionedOffset();var size = fromElm.getDimensions();var pos = fromElm.positionedOffset();morphElm.setStyle({width: size.width + "px",height: size.height + "px",left: pos.left + "px",top: pos.top + "px",display: "block",overflow: "hidden"});morphElm2 = morphElm.down("div");morphElm2.setStyle({width: size.width + "px",height: size.height + "px",overflow: "hidden",position: "relative"});},afterFinishInternal : function() {new Effect.Parallel([new Effect.Morph(morphElm, {style : {left : oPos.left + "px",top : oPos.top + "px",width: oSize.width + "px",height: oSize.height + "px"},sync : true}),new Effect.Morph(morphElm2, {style : {width: oSize.width + "px",height: oSize.height + "px"},sync : true})], Object.extend(Object.extend({}, options), {beforeStart: null,beforeSetup: null,duration: 0.5}));},afterFinish: null}));};Effect.FoldMap = function(fromElm, morphElm, options) {var morphStyle;var oPos, oSize;var pos = fromElm.positionedOffset();var size = fromElm.getDimensions();var morphElm2 = morphElm.down("div");;new Effect.Parallel([new Effect.Morph(morphElm, {style : {left : pos.left + "px",top : pos.top + "px",width: size.width + "px",height: size.height + "px"},sync : true}),new Effect.Morph(morphElm2, {style : {width: size.width + "px",height: size.height + "px"},sync : true})], Object.extend(Object.extend({}, options), {duration: 0.5,beforeSetupInternal: function() {oPos = morphElm.positionedOffset();oSize = morphElm.getDimensions();},afterFinishInternal: function() {new Effect.Opacity(morphElm, Object.extend(Object.extend({}, options), {duration: 0.5,from: 1,to: 0,afterFinishInternal: function() {morphElm.setStyle({left: oPos.left + "px",top: oPos.top + "px",width: oSize.width + "px",height: oSize.height + "px",display: "none"});},beforeStart: null,beforeSetup: null}));},afterFinish: null}));};Effect.GrowX = function(element, options) {element = $(element);var oldStyles = {width : element.style.width,height : element.style.height,overflow : element.style.overflow};var dim = element.getDimensions();var offset = element.positionedOffset();options = Object.extend({transition: Effect.Transitions.sinoidal,style: {width: dim.width + "px",height: dim.height + "px"},beforeSetupInternal : function() {element.setStyle({width: "0px",height: "0px",overflow: "hidden",position: "absolute"});},afterFinishInternal : function() {element.setStyle(oldStyles);}}, options);return new Effect.Morph(element, options);};Effect.ShrinkX = function(element, options) {element = $(element);var oldStyles = {width : element.style.width,height : element.style.height,overflow : element.style.overflow};options = Object.extend({transition: Effect.Transitions.sinoidal,style: {width: "0px",height: "0px"},beforeSetupInternal : function() {element.setStyle({overflow: "hidden",position: "absolute"});},afterFinishInternal : function() {element.hide();element.setStyle(oldStyles);}}, options);return new Effect.Morph(element, options);};// script.aculo.us dragdrop.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)// (c) 2005-2008 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz)//// script.aculo.us is freely distributable under the terms of an MIT-style license.// For details, see the script.aculo.us web site: http://script.aculo.us/if(Object.isUndefined(Effect)) throw("dragdrop.js requires including script.aculo.us' effects.js library");var Droppables = { drops: [], remove: function(element) { this.drops = this.drops.reject(function(d) { return d.element==$(element) }); }, add: function(element) { element = $(element); var options = Object.extend({ greedy: true, hoverclass: null, tree: false }, arguments[1] || { }); // cache containers if(options.containment) { options._containers = []; var containment = options.containment; if(Object.isArray(containment)) { containment.each( function(c) { options._containers.push($(c)) }); } else { options._containers.push($(containment)); } } if(options.accept) options.accept = [options.accept].flatten(); Element.makePositioned(element); // fix IE options.element = element; this.drops.push(options); }, findDeepestChild: function(drops) { deepest = drops[0]; for (i = 1; i < drops.length; ++i) if (Element.isParent(drops[i].element, deepest.element)) deepest = drops[i]; return deepest; }, isContained: function(element, drop) { var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); }, isAffected: function(point, element, drop) { return ( (drop.element!=element) && ((!drop._containers) || this.isContained(element, drop)) && ((!drop.accept) || (Element.classNames(element).detect( function(v) { return drop.accept.include(v) } ) )) && Position.within(drop.element, point[0], point[1]) ); }, deactivate: function(drop) { if(drop.hoverclass) Element.removeClassName(drop.element, drop.hoverclass); this.last_active = null; }, activate: function(drop) { if(drop.hoverclass) Element.addClassName(drop.element, drop.hoverclass); this.last_active = drop; }, show: function(point, element) { if(!this.drops.length) return; var drop, affected = []; this.drops.each( function(drop) { if(Droppables.isAffected(point, element, drop)) affected.push(drop); }); if(affected.length>0) drop = Droppables.findDeepestChild(affected); if(this.last_active && this.last_active != drop) this.deactivate(this.last_active); if (drop) { Position.within(drop.element, point[0], point[1]); if(drop.onHover) drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element)); if (drop != this.last_active) Droppables.activate(drop); } }, fire: function(event, element) { if(!this.last_active) return; Position.prepare(); if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active)) if (this.last_active.onDrop) { this.last_active.onDrop(element, this.last_active.element, event); return true; } }, reset: function() { if(this.last_active) this.deactivate(this.last_active); }};var Draggables = { drags: [], observers: [], register: function(draggable) { if(this.drags.length == 0) { this.eventMouseUp = this.endDrag.bindAsEventListener(this); this.eventMouseMove = this.updateDrag.bindAsEventListener(this); this.eventKeypress = this.keyPress.bindAsEventListener(this); Event.observe(document, "mouseup", this.eventMouseUp); Event.observe(document, "mousemove", this.eventMouseMove); Event.observe(document, "keypress", this.eventKeypress); } this.drags.push(draggable); }, unregister: function(draggable) { this.drags = this.drags.reject(function(d) { return d==draggable }); if(this.drags.length == 0) { Event.stopObserving(document, "mouseup", this.eventMouseUp); Event.stopObserving(document, "mousemove", this.eventMouseMove); Event.stopObserving(document, "keypress", this.eventKeypress); } }, activate: function(draggable) { if(draggable.options.delay) { this._timeout = setTimeout(function() { Draggables._timeout = null; window.focus(); Draggables.activeDraggable = draggable; }.bind(this), draggable.options.delay); } else { window.focus(); // allows keypress events if window isn't currently focused, fails for Safari this.activeDraggable = draggable; } }, deactivate: function() { this.activeDraggable = null; }, updateDrag: function(event) { if(!this.activeDraggable) return; var pointer = [Event.pointerX(event), Event.pointerY(event)]; // Mozilla-based browsers fire successive mousemove events with // the same coordinates, prevent needless redrawing (moz bug?) if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return; this._lastPointer = pointer; this.activeDraggable.updateDrag(event, pointer); }, endDrag: function(event) { if(this._timeout) { clearTimeout(this._timeout); this._timeout = null; } if(!this.activeDraggable) return; this._lastPointer = null; this.activeDraggable.endDrag(event); this.activeDraggable = null; }, keyPress: function(event) { if(this.activeDraggable) this.activeDraggable.keyPress(event); }, addObserver: function(observer) { this.observers.push(observer); this._cacheObserverCallbacks(); }, removeObserver: function(element) { // element instead of observer fixes mem leaks this.observers = this.observers.reject( function(o) { return o.element==element }); this._cacheObserverCallbacks(); }, notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag' if(this[eventName+'Count'] > 0) this.observers.each( function(o) { if(o[eventName]) o[eventName](eventName, draggable, event); }); if(draggable.options[eventName]) draggable.options[eventName](draggable, event); }, _cacheObserverCallbacks: function() { ['onStart','onEnd','onDrag'].each( function(eventName) { Draggables[eventName+'Count'] = Draggables.observers.select( function(o) { return o[eventName]; } ).length; }); }};/*--------------------------------------------------------------------------*/var Draggable = Class.create({ initialize: function(element) { var defaults = { handle: false, reverteffect: function(element, top_offset, left_offset) { var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02; new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur, queue: {scope:'_draggable', position:'end'} }); }, endeffect: function(element) { var toOpacity = Object.isNumber(element._opacity) ? element._opacity : 1.0; new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity, queue: {scope:'_draggable', position:'end'}, afterFinish: function(){ Draggable._dragging[element] = false } }); }, zindex: 0, revert: false, quiet: false, scroll: false, scrollSensitivity: 20, scrollSpeed: 15, snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] } delay: 0 }; if(!arguments[1] || Object.isUndefined(arguments[1].endeffect)) Object.extend(defaults, { starteffect: function(element) { element._opacity = Element.getOpacity(element); Draggable._dragging[element] = true; new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7}); } }); var options = Object.extend(defaults, arguments[1] || { }); this.element = $(element); if(options.handle && Object.isString(options.handle)) this.handle = this.element.down('.'+options.handle, 0); if(!this.handle) this.handle = $(options.handle); if(!this.handle) this.handle = this.element; if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) { options.scroll = $(options.scroll); this._isScrollChild = Element.childOf(this.element, options.scroll); } Element.makePositioned(this.element); // fix IE this.options = options; this.dragging = false; this.eventMouseDown = this.initDrag.bindAsEventListener(this); Event.observe(this.handle, "mousedown", this.eventMouseDown); Draggables.register(this); }, destroy: function() { Event.stopObserving(this.handle, "mousedown", this.eventMouseDown); Draggables.unregister(this); }, currentDelta: function() { return([ parseInt(Element.getStyle(this.element,'left') || '0'), parseInt(Element.getStyle(this.element,'top') || '0')]); }, initDrag: function(event) { if(!Object.isUndefined(Draggable._dragging[this.element]) && Draggable._dragging[this.element]) return; if(Event.isLeftClick(event)) { // abort on form elements, fixes a Firefox issue var src = Event.element(event); if((tag_name = src.tagName.toUpperCase()) && ( tag_name=='INPUT' || tag_name=='SELECT' || tag_name=='OPTION' || tag_name=='BUTTON' || tag_name=='TEXTAREA')) return; var pointer = [Event.pointerX(event), Event.pointerY(event)]; var pos = Position.cumulativeOffset(this.element); this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) }); Draggables.activate(this); Event.stop(event); } }, startDrag: function(event) { this.dragging = true; if(!this.delta) this.delta = this.currentDelta(); if(this.options.zindex) { this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0); this.element.style.zIndex = this.options.zindex; } if(this.options.ghosting) { this._clone = this.element.cloneNode(true); this._originallyAbsolute = (this.element.getStyle('position') == 'absolute'); if (!this._originallyAbsolute) Position.absolutize(this.element); this.element.parentNode.insertBefore(this._clone, this.element); } if(this.options.scroll) { if (this.options.scroll == window) { var where = this._getWindowScroll(this.options.scroll); this.originalScrollLeft = where.left; this.originalScrollTop = where.top; } else { this.originalScrollLeft = this.options.scroll.scrollLeft; this.originalScrollTop = this.options.scroll.scrollTop; } } Draggables.notify('onStart', this, event); if(this.options.starteffect) this.options.starteffect(this.element); }, updateDrag: function(event, pointer) { if(!this.dragging) this.startDrag(event); if(!this.options.quiet){ Position.prepare(); Droppables.show(pointer, this.element); } Draggables.notify('onDrag', this, event); this.draw(pointer); if(this.options.change) this.options.change(this); if(this.options.scroll) { this.stopScrolling(); var p; if (this.options.scroll == window) { with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; } } else { p = Position.page(this.options.scroll); p[0] += this.options.scroll.scrollLeft + Position.deltaX; p[1] += this.options.scroll.scrollTop + Position.deltaY; p.push(p[0]+this.options.scroll.offsetWidth); p.push(p[1]+this.options.scroll.offsetHeight); } var speed = [0,0]; if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity); if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity); if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity); if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity); this.startScrolling(speed); } // fix AppleWebKit rendering if(Prototype.Browser.WebKit) window.scrollBy(0,0); Event.stop(event); }, finishDrag: function(event, success) { this.dragging = false; if(this.options.quiet){ Position.prepare(); var pointer = [Event.pointerX(event), Event.pointerY(event)]; Droppables.show(pointer, this.element); } if(this.options.ghosting) { if (!this._originallyAbsolute) Position.relativize(this.element); delete this._originallyAbsolute; Element.remove(this._clone); this._clone = null; } var dropped = false; if(success) { dropped = Droppables.fire(event, this.element); if (!dropped) dropped = false; } if(dropped && this.options.onDropped) this.options.onDropped(this.element); Draggables.notify('onEnd', this, event); var revert = this.options.revert; if(revert && Object.isFunction(revert)) revert = revert(this.element); var d = this.currentDelta(); if(revert && this.options.reverteffect) { if (dropped == 0 || revert != 'failure') this.options.reverteffect(this.element, d[1]-this.delta[1], d[0]-this.delta[0]); } else { this.delta = d; } if(this.options.zindex) this.element.style.zIndex = this.originalZ; if(this.options.endeffect) this.options.endeffect(this.element); Draggables.deactivate(this); Droppables.reset(); }, keyPress: function(event) { if(event.keyCode!=Event.KEY_ESC) return; this.finishDrag(event, false); Event.stop(event); }, endDrag: function(event) { if(!this.dragging) return; this.stopScrolling(); this.finishDrag(event, true); Event.stop(event); }, draw: function(point) { var pos = Position.cumulativeOffset(this.element); if(this.options.ghosting) { var r = Position.realOffset(this.element); pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY; } var d = this.currentDelta(); pos[0] -= d[0]; pos[1] -= d[1]; if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) { pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft; pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop; } var p = [0,1].map(function(i){ return (point[i]-pos[i]-this.offset[i]) }.bind(this)); if(this.options.snap) { if(Object.isFunction(this.options.snap)) { p = this.options.snap(p[0],p[1],this); } else { if(Object.isArray(this.options.snap)) { p = p.map( function(v, i) { return (v/this.options.snap[i]).round()*this.options.snap[i] }.bind(this)); } else { p = p.map( function(v) { return (v/this.options.snap).round()*this.options.snap }.bind(this)); } }} var style = this.element.style; if((!this.options.constraint) || (this.options.constraint=='horizontal')) style.left = p[0] + "px"; if((!this.options.constraint) || (this.options.constraint=='vertical')) style.top = p[1] + "px"; if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering }, stopScrolling: function() { if(this.scrollInterval) { clearInterval(this.scrollInterval); this.scrollInterval = null; Draggables._lastScrollPointer = null; } }, startScrolling: function(speed) { if(!(speed[0] || speed[1])) return; this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed]; this.lastScrolled = new Date(); this.scrollInterval = setInterval(this.scroll.bind(this), 10); }, scroll: function() { var current = new Date(); var delta = current - this.lastScrolled; this.lastScrolled = current; if(this.options.scroll == window) { with (this._getWindowScroll(this.options.scroll)) { if (this.scrollSpeed[0] || this.scrollSpeed[1]) { var d = delta / 1000; this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] ); } } } else { this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000; this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000; } Position.prepare(); Droppables.show(Draggables._lastPointer, this.element); Draggables.notify('onDrag', this); if (this._isScrollChild) { Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer); Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000; Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000; if (Draggables._lastScrollPointer[0] < 0) Draggables._lastScrollPointer[0] = 0; if (Draggables._lastScrollPointer[1] < 0) Draggables._lastScrollPointer[1] = 0; this.draw(Draggables._lastScrollPointer); } if(this.options.change) this.options.change(this); }, _getWindowScroll: function(w) { var T, L, W, H; with (w.document) { if (w.document.documentElement && documentElement.scrollTop) { T = documentElement.scrollTop; L = documentElement.scrollLeft; } else if (w.document.body) { T = body.scrollTop; L = body.scrollLeft; } if (w.innerWidth) { W = w.innerWidth; H = w.innerHeight; } else if (w.document.documentElement && documentElement.clientWidth) { W = documentElement.clientWidth; H = documentElement.clientHeight; } else { W = body.offsetWidth; H = body.offsetHeight; } } return { top: T, left: L, width: W, height: H }; }});Draggable._dragging = { };/*--------------------------------------------------------------------------*/var SortableObserver = Class.create({ initialize: function(element, observer) { this.element = $(element); this.observer = observer; this.lastValue = Sortable.serialize(this.element); }, onStart: function() { this.lastValue = Sortable.serialize(this.element); }, onEnd: function() { Sortable.unmark(); if(this.lastValue != Sortable.serialize(this.element)) this.observer(this.element) }});var Sortable = { SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/, sortables: { }, _findRootElement: function(element) { while (element.tagName.toUpperCase() != "BODY") { if(element.id && Sortable.sortables[element.id]) return element; element = element.parentNode; } }, options: function(element) { element = Sortable._findRootElement($(element)); if(!element) return; return Sortable.sortables[element.id]; }, destroy: function(element){ element = $(element); var s = Sortable.sortables[element.id]; if(s) { Draggables.removeObserver(s.element); s.droppables.each(function(d){ Droppables.remove(d) }); s.draggables.invoke('destroy'); delete Sortable.sortables[s.element.id]; } }, create: function(element) { element = $(element); var options = Object.extend({ element: element, tag: 'li', // assumes li children, override with tag: 'tagname' dropOnEmpty: false, tree: false, treeTag: 'ul', overlap: 'vertical', // one of 'vertical', 'horizontal' constraint: 'vertical', // one of 'vertical', 'horizontal', false containment: element, // also takes array of elements (or id's); or false handle: false, // or a CSS class only: false, delay: 0, hoverclass: null, ghosting: false, quiet: false, scroll: false, scrollSensitivity: 20, scrollSpeed: 15, format: this.SERIALIZE_RULE, // these take arrays of elements or ids and can be // used for better initialization performance elements: false, handles: false, onChange: Prototype.emptyFunction, onUpdate: Prototype.emptyFunction }, arguments[1] || { }); // clear any old sortable with same element this.destroy(element); // build options for the draggables var options_for_draggable = { revert: true, quiet: options.quiet, scroll: options.scroll, scrollSpeed: options.scrollSpeed, scrollSensitivity: options.scrollSensitivity, delay: options.delay, ghosting: options.ghosting, constraint: options.constraint, handle: options.handle }; if(options.starteffect) options_for_draggable.starteffect = options.starteffect; if(options.reverteffect) options_for_draggable.reverteffect = options.reverteffect; else if(options.ghosting) options_for_draggable.reverteffect = function(element) { element.style.top = 0; element.style.left = 0; }; if(options.endeffect) options_for_draggable.endeffect = options.endeffect; if(options.zindex) options_for_draggable.zindex = options.zindex; // build options for the droppables var options_for_droppable = { overlap: options.overlap, containment: options.containment, tree: options.tree, hoverclass: options.hoverclass, onHover: Sortable.onHover }; var options_for_tree = { onHover: Sortable.onEmptyHover, overlap: options.overlap, containment: options.containment, hoverclass: options.hoverclass }; // fix for gecko engine Element.cleanWhitespace(element); options.draggables = []; options.droppables = []; // drop on empty handling if(options.dropOnEmpty || options.tree) { Droppables.add(element, options_for_tree); options.droppables.push(element); } (options.elements || this.findElements(element, options) || []).each( function(e,i) { var handle = options.handles ? $(options.handles[i]) : (options.handle ? $(e).select('.' + options.handle)[0] : e); options.draggables.push( new Draggable(e, Object.extend(options_for_draggable, { handle: handle }))); Droppables.add(e, options_for_droppable); if(options.tree) e.treeNode = element; options.droppables.push(e); }); if(options.tree) { (Sortable.findTreeElements(element, options) || []).each( function(e) { Droppables.add(e, options_for_tree); e.treeNode = element; options.droppables.push(e); }); } // keep reference this.sortables[element.id] = options; // for onupdate Draggables.addObserver(new SortableObserver(element, options.onUpdate)); }, // return all suitable-for-sortable elements in a guaranteed order findElements: function(element, options) { return Element.findChildren( element, options.only, options.tree ? true : false, options.tag); }, findTreeElements: function(element, options) { return Element.findChildren( element, options.only, options.tree ? true : false, options.treeTag); }, onHover: function(element, dropon, overlap) { if(Element.isParent(dropon, element)) return; if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) { return; } else if(overlap>0.5) { Sortable.mark(dropon, 'before'); if(dropon.previousSibling != element) { var oldParentNode = element.parentNode; element.style.visibility = "hidden"; // fix gecko rendering dropon.parentNode.insertBefore(element, dropon); if(dropon.parentNode!=oldParentNode) Sortable.options(oldParentNode).onChange(element); Sortable.options(dropon.parentNode).onChange(element); } } else { Sortable.mark(dropon, 'after'); var nextElement = dropon.nextSibling || null; if(nextElement != element) { var oldParentNode = element.parentNode; element.style.visibility = "hidden"; // fix gecko rendering dropon.parentNode.insertBefore(element, nextElement); if(dropon.parentNode!=oldParentNode) Sortable.options(oldParentNode).onChange(element); Sortable.options(dropon.parentNode).onChange(element); } } }, onEmptyHover: function(element, dropon, overlap) { var oldParentNode = element.parentNode; var droponOptions = Sortable.options(dropon); if(!Element.isParent(dropon, element)) { var index; var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only}); var child = null; if(children) { var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap); for (index = 0; index < children.length; index += 1) { if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) { offset -= Element.offsetSize (children[index], droponOptions.overlap); } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) { child = index + 1 < children.length ? children[index + 1] : null; break; } else { child = children[index]; break; } } } dropon.insertBefore(element, child); Sortable.options(oldParentNode).onChange(element); droponOptions.onChange(element); } }, unmark: function() { if(Sortable._marker) Sortable._marker.hide(); }, mark: function(dropon, position) { // mark on ghosting only var sortable = Sortable.options(dropon.parentNode); if(sortable && !sortable.ghosting) return; if(!Sortable._marker) { Sortable._marker = ($('dropmarker') || Element.extend(document.createElement('DIV'))). hide().addClassName('dropmarker').setStyle({position:'absolute'}); document.getElementsByTagName("body").item(0).appendChild(Sortable._marker); } var offsets = Position.cumulativeOffset(dropon); Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'}); if(position=='after') if(sortable.overlap == 'horizontal') Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'}); else Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'}); Sortable._marker.show(); }, _tree: function(element, options, parent) { var children = Sortable.findElements(element, options) || []; for (var i = 0; i < children.length; ++i) { var match = children[i].id.match(options.format); if (!match) continue; var child = { id: encodeURIComponent(match ? match[1] : null), element: element, parent: parent, children: [], position: parent.children.length, container: $(children[i]).down(options.treeTag) }; /* Get the element containing the children and recurse over it */ if (child.container) this._tree(child.container, options, child); parent.children.push (child); } return parent; }, tree: function(element) { element = $(element); var sortableOptions = this.options(element); var options = Object.extend({ tag: sortableOptions.tag, treeTag: sortableOptions.treeTag, only: sortableOptions.only, name: element.id, format: sortableOptions.format }, arguments[1] || { }); var root = { id: null, parent: null, children: [], container: element, position: 0 }; return Sortable._tree(element, options, root); }, /* Construct a [i] index for a particular node */ _constructIndex: function(node) { var index = ''; do { if (node.id) index = '[' + node.position + ']' + index; } while ((node = node.parent) != null); return index; }, sequence: function(element) { element = $(element); var options = Object.extend(this.options(element), arguments[1] || { }); return $(this.findElements(element, options) || []).map( function(item) { return item.id.match(options.format) ? item.id.match(options.format)[1] : ''; }); }, setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || { }); var nodeMap = { }; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); }, serialize: function(element) { element = $(element); var options = Object.extend(Sortable.options(element), arguments[1] || { }); var name = encodeURIComponent( (arguments[1] && arguments[1].name) ? arguments[1].name : element.id); if (options.tree) { return Sortable.tree(element, arguments[1]).children.map( function (item) { return [name + Sortable._constructIndex(item) + "[id]=" + encodeURIComponent(item.id)].concat(item.children.map(arguments.callee)); }).flatten().join('&'); } else { return Sortable.sequence(element, arguments[1]).map( function(item) { return name + "[]=" + encodeURIComponent(item); }).join('&'); } }};// Returns true if child is contained within elementElement.isParent = function(child, element) { if (!child.parentNode || child == element) return false; if (child.parentNode == element) return true; return Element.isParent(child.parentNode, element);};Element.findChildren = function(element, only, recursive, tagName) { if(!element.hasChildNodes()) return null; tagName = tagName.toUpperCase(); if(only) only = [only].flatten(); var elements = []; $A(element.childNodes).each( function(e) { if(e.tagName && e.tagName.toUpperCase()==tagName && (!only || (Element.classNames(e).detect(function(v) { return only.include(v) })))) elements.push(e); if(recursive) { var grandchildren = Element.findChildren(e, only, recursive, tagName); if(grandchildren) elements.push(grandchildren); } }); return (elements.length>0 ? elements.flatten() : []);};Element.offsetSize = function (element, type) { return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')];};/*** This class is used to create popup windows for various of situations.
* There are three types of popup window:
* @see Popup#Anchor* @param anchor Anchor DOM object by operate which you want to show or hide the popup window. * @param popup Popup window DOM object.* @param options Options to customize this popup instance.* @return void* @author yaoxing zhang* @version 0.6*/var Popup = function(anchor, popup, options) { this.anchor = $(anchor); this.innerPopup = $(popup); this.visibleStack = 0; this.isVisible = false; this.showId = -1; this.hideId = -1; // define a group of default options // specify an offset for popup window; options.offset = Object.extend({ x: 0, y: 0 }, options.offset), // specify anchor informationoptions.anchor = Object.extend({ target: Popup.Anchor.BOTTOM | Popup.Anchor.RIGHT, // anchor point of anchor object popup: Popup.Anchor.TOP | Popup.Anchor.LEFT, // anchor point of popup window object: this.anchor// anchor object}, options.anchor); // other options this.options = Object.extend({ isAlwaysUpdate: false, // always update the position popupContainer: options.anchor.object.getOffsetParent(), // popup window container activeClass: "", // when the popup is shown, apply a css class to the anchor object showDelay: 0.1, // delay by seconds hideDelay: 0.1, // delay by seconds type: Popup.Type.NORMAL, // is it a modal dialog showEvent: "mouseover", // the event by which the popup will be shown hideEvent: "mouseout"// the event by which the popup will be hidden }, options); if (typeof (this.options.showEvent) == "string") { this.options.showEvent = this.options.showEvent.toLowerCase(); } if (typeof (this.options.hideEvent) == "string") { this.options.hideEvent = this.options.hideEvent.toLowerCase(); } this.options.enableStack = this.options.showEvent == "mouseover" && this.options.hideEvent == "mouseout"; //this.options.enableStack = false; this.options.anchor.object = $(this.options.anchor.object); this.options.popupContainer = $(this.options.popupContainer); if (this.options.type == Popup.Type.FOLLOW) { this.options.offset = { x: FOLLOW_OFFSET_X, y: FOLLOW_OFFSET_Y }; this.options.showEvent = "mouseover"; this.options.hideEvent = "mouseout"; this.options.isAlwaysUpdate = true; } this._initPopup(); this._position(); // bind events var showEvent = this.options.showEvent; var hideEvent = this.options.hideEvent; if (showEvent === hideEvent && showEvent !== null) { // for the situation when the showing event and hiding event are the same. (e.g. "click") this.anchor.observe(showEvent, function(e) { if (this.isVisible) { this._delayedHide(e); } else { this._delayedShow(e); } } .bind(this)); } else { if (showEvent !== null) { this.anchor.observe(showEvent, this._delayedShow.bind(this)); } if (hideEvent !== null) { this.anchor.observe(hideEvent, this._delayedHide.bind(this)); } if (this.options.type == Popup.Type.NORMAL) { if (showEvent == "mouseover") { this.popup.observe(showEvent, this._delayedShow.bind(this)); } if (hideEvent == "mouseout") { this.popup.observe(hideEvent, this._delayedHide.bind(this)); } } }};Popup.prototype = { /** * Anchor DOM object by operating which the user can show or hide the popup. * @see Popup#popup * @private */ anchor: null, /** * Popup DOM object. * @see Popup#anchor * @private */ popup: null, /** * Popup element inside * @private */ innerPopup: null, /** * Options that customize the popup behavior. * @private */ options: null, /** * Indicate current status of popup window. * IMPORTANT for type NORMAL popup.
* Normally type NORMAL popup should be shown when the showing event is fired, * and hidden when the hiding event is fired. However, mouseover event is a special one. * Usually user would expect the popup not to be hidden when moving from the anchor object * to the popup. Plus in some situations mouseover event bubbles up from inner elements, * I introduce a stack to solve this problem. This stack will ONLY work when using mouseover * and mouseout together at the same time. When mouseover event is fired, this stack pluses 1; * When mouseout event is fired, this stack minus 1. Finally, if the stack is greater than 0, * the popup would be shown. Otherwise it would be hidden. * @private */ visibleStack: 0, /** * Indicates whether the popup is visible or not * @private */ isVisible: false, /** * Program would start after this flag being set to true. This will avoid some bugs. */ startFlag: false, /** * ID of timeout event for hiding popup. * @private */ hideId: -1, /** * ID of timeout event for showing popup. * @private */ showId: -1, /** * Handle the show delay. * @param e Event object from showing event. * @param options Some options while showing the popup. * @private * @return void */ _delayedShow: function(e, options) { this.startFlag = true; options = this._fillDefault(options); // handle the show delay option this.visibleStack = this.options.enableStack ? this.visibleStack + 1 : 1; if (this.visibleStack > 0) { if (this.hideId != -1) { window.clearTimeout(this.hideId); this.hideId = -1; } if (this.showId == -1) { this.showId = function() { if (!this.isVisible) { this._showLogic(options); } this.showId = -1; } .bind(this).delay(this.options.showDelay); } } if (e) { e.stop(); } }, /** * Handle the hide delay. * @param e Event object from hiding event * @param options Some options while hiding the popup. * @private * @return void */ _delayedHide: function(e, options) { if (!this.startFlag) { return; } options = this._fillDefault(options); // handle the hide delay option this.visibleStack = this.options.enableStack ? this.visibleStack - 1 : 0; if (this.visibleStack <= 0) { if (this.showId != -1) { window.clearTimeout(this.showId); this.showId = -1; } if (this.hideId == -1) { this.hideId = function() { if (this.isVisible) { this._hideLogic(options); } this.hideId = -1; } .bind(this).delay(this.options.hideDelay); } } if (e) { e.stop(); } }, /** * Handle the show logic. * This function will always show the popup once you invoke it. * @param options Some options while showing the popup. * @private * @return void */ _showLogic: function(options) { options = this._fillDefault(options); // change z-index to show the popup in front of all other popups this.popup.setStyle("z-index:" + Popup.zIndex++ + ";"); // update position if necessary if (this.options.isAlwaysUpdate) { this._position(); } var memo = { anchor: this.anchor, popup: this.popup, customEffect: false }; if (!options.ignoreEvents) { var event = this.anchor.fire(Popup.Events.BEFORE_SHOWN, memo); } // set active class this.anchor.addClassName(this.options.activeClass); if (!event || !event.stopped) { this.isVisible = true; if (options.ignoreEvents || !memo.customEffect) { this.popup.show(); } } if (!options.ignoreEvents) { this.anchor.fire(Popup.Events.AFTER_SHOWN, memo); } }, /** * Handle the hide logic. * This function will always hide the popup once you invoke it. * @param options Some options while hiding the popup. * @private * @return void */ _hideLogic: function(options) { options = this._fillDefault(options); var memo = { anchor: this.anchor, popup: this.popup, customEffect: false }; if (!options.ignoreEvents) { var event = this.anchor.fire(Popup.Events.BEFORE_HIDDEN, memo); } // set active class this.anchor.removeClassName(this.options.activeClass); if (!event || !event.stopped) { this.isVisible = false; if (options.ignoreEvents || !memo.customEffect) { this.popup.hide(); } } if (!options.ignoreEvents) { this.anchor.fire(Popup.Events.AFTER_HIDDEN, memo); } }, /** * Show the popup. For invoking outside the class. * @param options Some options while showing the popup. * @return void */ show: function(options) { options = this._fillDefault(options); if (options.immediately) { if (!this.isVisible) { this._showLogic(options); } } else { this._delayedShow(null, options); } }, /** * Hide the popup. For invoking outside the class. * @param options Some options while showing the popup. * @return void */ hide: function(options) { options = this._fillDefault(options); if (options.immediately) { if (this.isVisible) { this._hideLogic(options); } } else { this._delayedHide(null, options); } }, /** * reset the popup. * @return */ reset: function() { this.visibleStack = 0; this.isVisible = false; this.popup.hide(); this.startFlag = false; if (this.hideId != -1) { window.clearTimeout(this.hideId); } if (this.showId != -1) { window.clearTimeout(this.showId); } }, /** * Fill in the user defined options with default options.
* There are totally 3 options:
* immediately: Wait for the show/hide delay or not (default: false).
* ignoreEvents: Ignore events handling or not (default: false).
* keep: True if you want to keep it shown until you invoke hide function(default: false).
* @param options User defined options. * @return {Object} User defined options filled with default options. */ _fillDefault: function(options) { options = Object.extend({ immediately: false, ignoreEvents: false }, options); return options; }, /** * Indicates whether the popup is visible or hidden * @return {Boolean} */ isVisible: function() { return this.isVisible; }, /** * Remove the popup and unload all the resources and events. * @return void */ unload: function() { this.anchor.popup = null; if (this.popup && this.popup.parentNode) { this.popup.remove(); } }, /** * Initialize popup. * @return void */ _initPopup: function() { var container = this.options.popupContainer; var popupWrapper = new Element("div").insert(this.innerPopup.remove().setStyle("position: relative").show()); var popup = new Element("div").insert(popupWrapper).insert(new Element("span").setStyle("clear: both;")); popup.setStyle({ position: "absolute" }); this.popup = popup; this.anchor.popup = this; container.insert(popup.hide()); }, /** * Set the position of the popup * @return void */ _position: function() { var container = this.options.popupContainer; var anchor = this.options.anchor; var anchorObject = this.options.anchor.object; var pos = container == anchorObject.getOffsetParent() ?anchorObject.positionedOffset() : anchorObject.cumulativeOffset(); // try to get the size of popup. move it to document.body in case the // parent node of popup is hidden. this.popup.show(); var size = this.innerPopup.getDimensions(); this.popup.setStyle({ width: size.width + "px", height: size.height + "px" }).hide(); var anchorSize = anchorObject.getDimensions(); if (anchor.popup & Popup.Anchor.BOTTOM) { pos.top -= size.height; } else if (anchor.popup & Popup.Anchor.V_CENTER) { pos.top -= (size.height >> 1); } if (anchor.popup & Popup.Anchor.RIGHT) { pos.left -= size.width; } else if (anchor.popup & Popup.Anchor.H_CENTER) { pos.left -= (size.width >> 1); } if (anchor.target & Popup.Anchor.BOTTOM) { pos.top += anchorSize.height; } else if (anchor.target & Popup.Anchor.V_CENTER) { pos.top += (anchorSize.height >> 1); } if (anchor.target & Popup.Anchor.RIGHT) { pos.left += anchorSize.width; } else if (anchor.target & Popup.Anchor.H_CENTER) { pos.left += (anchorSize.width >> 1); } var offset = this.options.offset; this.popup.setStyle({ top: pos.top + offset.y + "px", left: pos.left + offset.x + "px" }); }};/*** Anchor constants.* TOP : 1,* LEFT : 2,* BOTTOM : 4,* RIGHT : 8,* H_CENTER : 16,* V_CENTER : 32* @memberOf Popup*/Popup.Anchor = { TOP: 1, LEFT: 2, BOTTOM: 4, RIGHT: 8, H_CENTER: 16, V_CENTER: 32};/*** Popup type.* MODAL: Simulate a modal dialog by using which you can prevent any operation* to the elements out side the popup window.
* FOLLOW: A mouse follow popup window.
* NORMAL: Normal popup window which has a fixed position. The position is customizable.
* @memberOf Popup*/Popup.Type = { MODAL: "modal", FOLLOW: "follow", NORMAL: "normal"};/*** Popup events.* BEFORE_SHOWN: Fires before popup is shown.
* AFTER_SHOWN: Fires after popup is shown.
* BEFORE_HIDDEN: Fires before popup is hidden.
* AFTER_HIDDEN: Fires after popup is hidden.
* @memberOf Popup*/Popup.Events = { BEFORE_SHOWN: "popup:showing", AFTER_SHOWN: "popup:shown", BEFORE_HIDDEN: "popup:hiding", AFTER_HIDDEN: "popup:hidden"};Popup.zIndex = 1000;var FOLLOW_OFFSET_X = 15;var FOLLOW_OFFSET_Y = 15;var LOADING_IMG_URL = "/images/loading.gif";var cover = null;var coverContainer = null;var hideContainer = null;var isIE6 = (navigator.userAgent.indexOf("MSIE 6") != -1);//patternsvar emailPattern = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;//var sqlscriptPattern = /(<)|(>)|(SCRIPT)|(<)|(>)|(%3c)|(%3e)|(\bSELECT\b)|(\bUPDATE\b)|(\bINSERT\b)|(\bDELETE\b)|(\bREVOKE\b)|(\bUNION\b)|(\bDROP\b)|(\bDATABASE\b)|(\bEXEC\b)|(&lt;)|(&gt;)|(--)/;var sqlscriptPattern = /(<)|(>)|(SCRIPT)|(<)|(>)|(%3c)|(%3e)|(\bSELECT\b)|(\bUPDATE\b)|(\bINSERT\b)|(\bDELETE\b)|(\bREVOKE\b)|(\bTRUNCATE\b)|(\bDROP\b)|(\bDATABASE\b)|(\bEXEC\b)|(\bCREATE\b)|(\bALTER\b)|(\bCOMMENT\b)|(\bMERGE\b)|(&lt;)|(&gt;)|(--)/;var zipPattern = /(^\d{5}(-\d{4})?$)|(^[ABCEGHJKLMNPRSTVXY]{1}\d{1}[A-Z]{1} *\d{1}[A-Z]{1}\d{1}$)/;var datePattern = /^(?=\d)(?:(?:(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})|(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))|(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2}))($|\ (?=\d)))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$/;function RemoveWhiteSpace(field) { field.value = (field.value).replace(/^\s*|\s*$/g, '');}function ValidateControlsVacationPlanning() { var executeSave = 'Y'; //Divs var dvFirstName = $('ucVacationPlanning_dvFirstNameMessage'); var dvLastNameMessage = $('ucVacationPlanning_dvLastNameMessage'); var dvCountryMessage = $('ucVacationPlanning_dvCountryMessage'); var dvEmailMessage = $('ucVacationPlanning_dvEmailMessage'); var dvZipMessage = $('ucVacationPlanning_dvZipMessage'); var dvBirthdateMessage = $('ucVacationPlanning_dvBirthdateMessage'); var dvEmailConfirmationMessage = $('ucVacationPlanning_dvConfirmEmail'); //Values var firstName = $('ucVacationPlanning_txtFirstName').value.trim(); var lastName = $('ucVacationPlanning_txtLastName').value.trim(); var email = $('ucVacationPlanning_txtEmail').value.trim(); var zipCode = $('ucVacationPlanning_txtZipCode').value.trim(); var emailConfirmation = $('ucVacationPlanning_txtConfirmEmail').value.trim(); var countryControl = $("ucVacationPlanning_ddlCountry"); var country = countryControl.value.trim(); var day = $('ucVacationPlanning_ddlDay').value.trim(); var month = $('ucVacationPlanning_ddlMonth').value.trim(); var year = $('ucVacationPlanning_ddlYear').value.trim(); var date = month + '/' + day + '/' + year; var isZipCodeInvalid = false; //FirstName if (firstName == "") { dvFirstName.style.display = "block"; $('ucVacationPlanning_lblMessageFirstName').innerHTML = $('ucVacationPlanning_hdnRequiredFirstNameMessage').value; executeSave = 'N'; } else if (sqlscriptPattern.test(firstName.toUpperCase())) { dvFirstName.style.display = "block"; $('ucVacationPlanning_lblMessageFirstName').innerHTML = $('ucVacationPlanning_hdnRegexFirstNameMessage').value; executeSave = 'N'; } else { dvFirstName.style.display = "none"; } //LastName if (lastName == "") { dvLastNameMessage.style.display = "block"; $('ucVacationPlanning_lblMessageLastName').innerHTML = $('ucVacationPlanning_hdnRequiredLastNameMessage').value; executeSave = 'N'; } else if (sqlscriptPattern.test(lastName.toUpperCase())) { dvLastNameMessage.style.display = "block"; $('ucVacationPlanning_lblMessageLastName').innerHTML = $('ucVacationPlanning_hdnRegexLastNameMessage').value; executeSave = 'N'; } else { dvLastNameMessage.style.display = "none"; } //Email if (email == "") { dvEmailMessage.style.display = "block"; $('ucVacationPlanning_lblMessageEmail').innerHTML = $('ucVacationPlanning_hdnRequiredEmailMessage').value; executeSave = 'N'; } else if (!emailPattern.test(email)) { $('ucVacationPlanning_lblMessageEmail').innerHTML = $('ucVacationPlanning_hdnRegexEmailMessage').value; dvEmailMessage.style.display = "block"; executeSave = 'N'; } else { dvEmailMessage.style.display = "none"; } //Email Confirmation if (!emailPattern.test(emailConfirmation)) { dvEmailConfirmationMessage.style.display = "block"; $('ucVacationPlanning_lblMessageConfirmEmail').innerHTML = $('ucVacationPlanning_hdnEmailConfirmationMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } if (emailPattern.test(email) && emailPattern.test(emailConfirmation)) { if (email.toUpperCase() != emailConfirmation.toUpperCase()) { dvEmailConfirmationMessage.style.display = "block"; $('ucVacationPlanning_lblMessageConfirmEmail').innerHTML = $('ucVacationPlanning_hdnEmailCompareMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } } //Country if (country == -1) { dvCountryMessage.style.display = "block"; $('ucVacationPlanning_lblMessageCountry').innerHTML = $('ucVacationPlanning_hdnRequiredCountryMessage').value; executeSave = 'N'; } else { dvCountryMessage.style.display = "none"; } //Birthdate if (day == -1 || month == -1 || year == -1) { dvBirthdateMessage.style.display = "block"; $('ucVacationPlanning_lblMessageBirthdate').innerHTML = $('ucVacationPlanning_hdnRequiredBirthdateMessage').value; executeSave = 'N'; } else if (!datePattern.test(date)) { dvBirthdateMessage.style.display = "block"; $('ucVacationPlanning_lblMessageBirthdate').innerHTML = $('ucVacationPlanning_hdnRequiredBirthdateMessage').value; executeSave = 'N'; } else { dvBirthdateMessage.style.display = "none"; } //ZipCode if (zipCode != "" && sqlscriptPattern.test(zipCode.toUpperCase())) { isZipCodeInvalid = true; dvZipMessage.className = "error"; dvZipMessage.style.display = "block"; $('ucVacationPlanning_lblMessageZip').innerHTML = $('ucVacationPlanning_hdnRegexZipCodeMessage').value; executeSave = 'N'; } else { isZipCodeInvalid = false; dvZipMessage.style.display = "none"; } if (!isZipCodeInvalid) { if (country == USValue && zipCode == "") { $('ucVacationPlanning_lblMessageZip').innerHTML = $('ucVacationPlanning_hdnRequiredZipCodeMessage').value; dvZipMessage.className = "error2"; dvZipMessage.style.display = "block"; executeSave = 'N'; } else { dvZipMessage.style.display = "none"; } if (zipCode != "" && country == USValue) { if (!zipPattern.test(zipCode)) { dvZipMessage.className = "error"; $('ucVacationPlanning_lblMessageZip').innerHTML = $('ucVacationPlanning_hdnRegexZipCodeMessage').value; dvZipMessage.style.display = "block"; executeSave = 'N'; } else { dvZipMessage.style.display = "none"; } } } if (executeSave == 'N') { return false; } else { return true; }} function ValidateControlsEmailSignUp() { var executeSave = 'Y'; //Divs var dvFirstName = $('ucemailsignup_dvFirstNameMessage'); var dvLastNameMessage = $('ucemailsignup_dvLastNameMessage'); var dvCountryMessage = $('ucemailsignup_dvCountryMessage'); var dvEmailMessage = $('ucemailsignup_dvEmailMessage'); var dvZipMessage = $('ucemailsignup_dvZipMessage'); var dvBirthdateMessage = $('ucemailsignup_dvBirthdateMessage'); var dvMobileMessage = $('ucemailsignup_dvMobile'); var dvEmailConfirmationMessage = $('ucemailsignup_dvConfirmEmail'); //Values var firstName = $('ucemailsignup_txtFirstName').value.trim(); var lastName = $('ucemailsignup_txtLastName').value.trim(); var email = $('ucemailsignup_txtEmail').value.trim(); var zipCode = $('ucemailsignup_txtZipCode').value.trim(); var emailConfirmation = $('ucemailsignup_txtConfirmEmail').value.trim(); var mobile = $('ucemailsignup_txtMobile').value.trim(); var countryControl = $("ucemailsignup_ddlCountry"); var chkReceiveMessages = $("ucemailsignup_chkReceiveMessages"); var country = countryControl.value.trim(); var day = $('ucemailsignup_ddlDay').value.trim(); var month = $('ucemailsignup_ddlMonth').value.trim(); var year = $('ucemailsignup_ddlYear').value.trim(); var date = month + '/' + day + '/' + year; var isZipCodeInvalid = false; //FirstName if (firstName == "") { dvFirstName.style.display = "block"; $('ucemailsignup_lblMessageFirstName').innerHTML = $('ucemailsignup_hdnRequiredFirstNameMessage').value; executeSave = 'N'; } else if (sqlscriptPattern.test(firstName.toUpperCase())) { dvFirstName.style.display = "block"; $('ucemailsignup_lblMessageFirstName').innerHTML = $('ucemailsignup_hdnRegexFirstNameMessage').value; executeSave = 'N'; } else { dvFirstName.style.display = "none"; } //LastName if (lastName == "") { dvLastNameMessage.style.display = "block"; $('ucemailsignup_lblMessageLastName').innerHTML = $('ucemailsignup_hdnRequiredLastNameMessage').value; executeSave = 'N'; } else if (sqlscriptPattern.test(lastName.toUpperCase())) { dvLastNameMessage.style.display = "block"; $('ucemailsignup_lblMessageLastName').innerHTML = $('ucemailsignup_hdnRegexLastNameMessage').value; executeSave = 'N'; } else { dvLastNameMessage.style.display = "none"; } //Email if (email == "") { dvEmailMessage.style.display = "block"; $('ucemailsignup_lblMessageEmail').innerHTML = $('ucemailsignup_hdnRequiredEmailMessage').value; executeSave = 'N'; } else if (!emailPattern.test(email)) { $('ucemailsignup_lblMessageEmail').innerHTML = $('ucemailsignup_hdnRegexEmailMessage').value; dvEmailMessage.style.display = "block"; executeSave = 'N'; } else { dvEmailMessage.style.display = "none"; } //Email Confirmation if (!emailPattern.test(emailConfirmation)) { dvEmailConfirmationMessage.style.display = "block"; $('ucemailsignup_lblMessageConfirmEmail').innerHTML = $('ucemailsignup_hdnEmailConfirmationMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } if (emailPattern.test(email) && emailPattern.test(emailConfirmation)) { if (email.toUpperCase() != emailConfirmation.toUpperCase()) { dvEmailConfirmationMessage.style.display = "block"; $('ucemailsignup_lblMessageConfirmEmail').innerHTML = $('ucemailsignup_hdnEmailCompareMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } } //Country if (country == -1) { dvCountryMessage.style.display = "block"; $('ucemailsignup_lblMessageCountry').innerHTML = $('ucemailsignup_hdnRequiredCountryMessage').value; executeSave = 'N'; } else { dvCountryMessage.style.display = "none"; } //Birthdate if (day == -1 || month == -1 || year == -1) { dvBirthdateMessage.style.display = "block"; $('ucemailsignup_lblMessageBirthdate').innerHTML = $('ucemailsignup_hdnRequiredBirthdateMessage').value; executeSave = 'N'; } else if (!datePattern.test(date)) { dvBirthdateMessage.style.display = "block"; $('ucemailsignup_lblMessageBirthdate').innerHTML = $('ucemailsignup_hdnRequiredBirthdateMessage').value; executeSave = 'N'; } else { dvBirthdateMessage.style.display = "none"; } //ZipCode if (zipCode != "" && sqlscriptPattern.test(zipCode.toUpperCase())) { isZipCodeInvalid = true; dvZipMessage.className = "error"; dvZipMessage.style.display = "block"; $('ucemailsignup_lblMessageZip').innerHTML = $('ucemailsignup_hdnRegexZipCodeMessage').value; executeSave = 'N'; } else { isZipCodeInvalid = false; dvZipMessage.style.display = "none"; } if (!isZipCodeInvalid) { if (country == USValue && zipCode == "") { $('ucemailsignup_lblMessageZip').innerHTML = $('ucemailsignup_hdnRequiredZipCodeMessage').value; dvZipMessage.className = "error2"; dvZipMessage.style.display = "block"; executeSave = 'N'; } else { dvZipMessage.style.display = "none"; } if (zipCode != "" && country == USValue) { if (!zipPattern.test(zipCode)) { dvZipMessage.className = "error"; $('ucemailsignup_lblMessageZip').innerHTML = $('ucemailsignup_hdnRegexZipCodeMessage').value; dvZipMessage.style.display = "block"; executeSave = 'N'; } else { dvZipMessage.style.display = "none"; } } } if (sqlscriptPattern.test(mobile.toUpperCase()) || (chkReceiveMessages.checked && mobile == "")) { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else { dvMobileMessage.style.display = "none"; } if (executeSave == 'N') { return false; } else { return true; }}function OpenEmailSignUpConfirmation(isUnder18) { switchEmailBox(true, $('ucemailsignup_boxConfirm')); if (isUnder18 == 'True') { $('ucemailsignup_lblTextProfileConfirmUnder18').show(); $('ucemailsignup_lblTextProfileConfirmSuccess').hide(); } else { $('ucemailsignup_lblTextProfileConfirmUnder18').hide(); $('ucemailsignup_lblTextProfileConfirmSuccess').show(); } $('ucemailsignup_btnCloseProfile').focus();}function OpenVacationPlanningConfirmation(isUnder18) { switchEmailBox(true, $('ucVacationPlanning_boxConfirm')); if (isUnder18 == 'True') { $('ucVacationPlanning_lblTextProfileConfirmUnder18').show(); $('ucVacationPlanning_lblTextProfileConfirmSuccess').hide(); } else { $('ucVacationPlanning_lblTextProfileConfirmUnder18').hide(); $('ucVacationPlanning_lblTextProfileConfirmSuccess').show(); } $('ucVacationPlanning_btnCloseProfile').focus();}function CloseEmailSignUpConfirmation() { switchEmailBox(false, $('ucemailsignup_boxConfirm')); if ($('ucemailsignup_lblTextProfileConfirmUnder18').style.display == "none") { window.location = DefaultPage; }}function CloseVacationPlanningConfirmation() { switchEmailBox(false, $('ucVacationPlanning_boxConfirm')); if ($('ucVacationPlanning_lblTextProfileConfirmUnder18').style.display == "none") { window.location = DefaultPage; }}function EmailSignUpConfirmationExecute(e) { if (window.event) // IE { keynum = e.keyCode } else if (e.which) // Netscape/Firefox/Opera { keynum = e.which } if (keynum == 13 || keynum == 27) { CloseEmailSignUpConfirmation(); return false; }}function VacationPlanningConfirmationExecute(e) { if (window.event) // IE { keynum = e.keyCode } else if (e.which) // Netscape/Firefox/Opera { keynum = e.which } if (keynum == 13 || keynum == 27) { CloseVacationPlanningConfirmation(); return false; }}function ValidateControlsHHNDataEntry() { var executeSave = 'Y'; //Divs var dvFirstName = $('ucHHNDataEntry_dvFirstNameMessage'); var dvLastName = $('ucHHNDataEntry_dvLastNameMessage'); var dvCountryMessage = $('ucHHNDataEntry_dvCountryMessage'); var dvEmailMessage = $('ucHHNDataEntry_dvEmailMessage'); var dvEmailConfirmationMessage = $('ucHHNDataEntry_dvEmailConfirmationMessage'); var dvZipMessage = $('ucHHNDataEntry_dvZipMessage'); var dvBirthdateMessage = $('ucHHNDataEntry_dvBirthdateMessage'); var dvMobileMessage = $('ucHHNDataEntry_dvMobileMessage'); //Values var firstName = $('ucHHNDataEntry_txtFirstName').value.trim(); var lastName = $('ucHHNDataEntry_txtLastName').value.trim(); var email = $('ucHHNDataEntry_txtEmail').value.trim(); var emailConfirmation = $('ucHHNDataEntry_txtEmailConfirmation').value.trim(); var zipCode = $('ucHHNDataEntry_txtZipCode').value.trim(); var mobile = $('ucHHNDataEntry_txtMobile').value.trim(); var chkMobileOptin = $('ucHHNDataEntry_chkHHNPromotion_0') var countryControl = $("ucHHNDataEntry_ddlCountry"); var country = countryControl.value.trim(); var day = $('ucHHNDataEntry_ddlDay').value.trim(); var month = $('ucHHNDataEntry_ddlMonth').value.trim(); var year = $('ucHHNDataEntry_ddlYear').value.trim(); var date = month + '/' + day + '/' + year; var isZipCodeInvalid = false; if (firstName == "" || sqlscriptPattern.test(firstName.toUpperCase())) { dvFirstName.style.display = "block"; executeSave = 'N'; } else { dvFirstName.style.display = "none"; } if (lastName == "" || sqlscriptPattern.test(lastName.toUpperCase())) { dvLastName.style.display = "block"; executeSave = 'N'; } else { dvLastName.style.display = "none"; } if (!emailPattern.test(email)) { dvEmailMessage.style.display = "block"; executeSave = 'N'; } else { dvEmailMessage.style.display = "none"; } if (!emailPattern.test(emailConfirmation)) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error2"); dvEmailConfirmationMessage.addClassName("error"); $('ucHHNDataEntry_lblMessageEmailConfirmation').innerHTML = $('ucHHNDataEntry_hdnEmailConfirmationMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } if (emailPattern.test(email) && emailPattern.test(emailConfirmation)) { if (email.toUpperCase() != emailConfirmation.toUpperCase()) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error"); dvEmailConfirmationMessage.addClassName("error2"); $('ucHHNDataEntry_lblMessageEmailConfirmation').innerHTML = $('ucHHNDataEntry_hdnEmailCompareMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } } if (!datePattern.test(date)) { dvBirthdateMessage.style.display = "block"; executeSave = 'N'; } else { dvBirthdateMessage.style.display = "none"; } if (country == -1) { dvCountryMessage.style.display = "block"; executeSave = 'N'; } else { dvCountryMessage.style.display = "none"; } if (zipCode != "" && sqlscriptPattern.test(zipCode.toUpperCase())) { isZipCodeInvalid = true; dvZipMessage.style.display = "block"; executeSave = 'N'; } else { isZipCodeInvalid = false; dvZipMessage.style.display = "none"; } if (!isZipCodeInvalid) { if (country == USValue) { if (zipCode == "" || !zipPattern.test(zipCode)) { dvZipMessage.style.display = "block"; executeSave = 'N'; } else { dvZipMessage.style.display = "none"; } } else { dvZipMessage.style.display = "none"; } } dvMobileMessage.style.display = "none"; if(chkMobileOptin.checked && mobile == "") { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else if(mobile != ""){ if (sqlscriptPattern.test(mobile.toUpperCase())) { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else { dvMobileMessage.style.display = "none"; } } if (executeSave == 'N') { return false; } else { return true; }}function ValidateControlsProject609() { var executeSave = 'Y'; //Divs var dvFirstName = $('Project609_dvFirstNameMessage'); var dvLastName = $('Project609_dvLastNameMessage'); var dvCountryMessage = $('Project609_dvCountryMessage'); var dvEmailMessage = $('Project609_dvEmailMessage'); var dvEmailConfirmationMessage = $('Project609_dvEmailConfirmationMessage'); var dvZipMessage = $('Project609_dvZipMessage'); var dvBirthdateMessage = $('Project609_dvBirthdateMessage'); var dvMobileMessage = $('Project609_dvMobileMessage'); //Values var firstName = $('Project609_txtFirstName').value.trim(); var lastName = $('Project609_txtLastName').value.trim(); var email = $('Project609_txtEmail').value.trim(); var emailConfirmation = $('Project609_txtEmailConfirmation').value.trim(); var zipCode = $('Project609_txtZipCode').value.trim(); var mobile = $('Project609_txtMobile').value.trim(); var chkMobileOptin = $('Project609_chk609Promotion'); var countryControl = $("Project609_ddlCountry"); var country = countryControl.value.trim(); var day = $('Project609_ddlDay').value.trim(); var month = $('Project609_ddlMonth').value.trim(); var year = $('Project609_ddlYear').value.trim(); var date = month + '/' + day + '/' + year; var isZipCodeInvalid = false; if (firstName == "" || sqlscriptPattern.test(firstName.toUpperCase())) { dvFirstName.style.display = "block"; executeSave = 'N'; } else { dvFirstName.style.display = "none"; } if (lastName == "" || sqlscriptPattern.test(lastName.toUpperCase())) { dvLastName.style.display = "block"; executeSave = 'N'; } else { dvLastName.style.display = "none"; } if (!emailPattern.test(email)) { dvEmailMessage.style.display = "block"; executeSave = 'N'; } else { dvEmailMessage.style.display = "none"; } if (!emailPattern.test(emailConfirmation)) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error2"); dvEmailConfirmationMessage.addClassName("error"); $('Project609_lblMessageEmailConfirmation').innerHTML = $('Project609_hdnEmailConfirmationMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } if (emailPattern.test(email) && emailPattern.test(emailConfirmation)) { if (email.toUpperCase() != emailConfirmation.toUpperCase()) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error"); dvEmailConfirmationMessage.addClassName("error2"); $('Project609_lblMessageEmailConfirmation').innerHTML = $('Project609_hdnEmailCompareMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } } if (!datePattern.test(date)) { dvBirthdateMessage.style.display = "block"; executeSave = 'N'; } else { dvBirthdateMessage.style.display = "none"; } if (country == -1) { dvCountryMessage.style.display = "block"; executeSave = 'N'; } else { dvCountryMessage.style.display = "none"; } if (zipCode != "" && sqlscriptPattern.test(zipCode.toUpperCase())) { isZipCodeInvalid = true; dvZipMessage.style.display = "block"; executeSave = 'N'; } else { isZipCodeInvalid = false; dvZipMessage.style.display = "none"; } if (!isZipCodeInvalid) { if (country == USValue) { if (zipCode == "" || !zipPattern.test(zipCode)) { dvZipMessage.style.display = "block"; executeSave = 'N'; } else { dvZipMessage.style.display = "none"; } } else { dvZipMessage.style.display = "none"; } } dvMobileMessage.style.display = "none"; if(chkMobileOptin.checked && mobile == "") { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else if(mobile != ""){ if (sqlscriptPattern.test(mobile.toUpperCase())) { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else { dvMobileMessage.style.display = "none"; } } if (executeSave == 'N') { return false; } else { return true; }}function ValidateControlsMardigrasSignUp() { var executeSave = 'Y'; //Divs var dvFirstName = $('ucMardigras_dvFirstNameMessage'); var dvLastName = $('ucMardigras_dvLastNameMessage'); var dvCountryMessage = $('ucMardigras_dvCountryMessage'); var dvEmailMessage = $('ucMardigras_dvEmailMessage'); var dvEmailConfirmationMessage = $('ucMardigras_dvEmailConfirmationMessage'); var dvZipMessage = $('ucMardigras_dvZipMessage'); var dvBirthdateMessage = $('ucMardigras_dvBirthdateMessage'); var dvMobileMessage = $('ucMardigras_dvMobileMessage'); //Values var firstName = $('ucMardigras_txtFirstName').value.trim(); var lastName = $('ucMardigras_txtLastName').value.trim(); var email = $('ucMardigras_txtEmail').value.trim(); var emailConfirmation = $('ucMardigras_txtEmailConfirmation').value.trim(); var zipCode = $('ucMardigras_txtZipCode').value.trim(); var mobile = $('ucMardigras_txtMobile').value.trim(); var chkMobileOptin = $('ucMardigras_chkMobileOptin') var countryControl = $("ucMardigras_ddlCountry"); var country = countryControl.value.trim(); var day = $('ucMardigras_ddlDay').value.trim(); var month = $('ucMardigras_ddlMonth').value.trim(); var year = $('ucMardigras_ddlYear').value.trim(); var date = month + '/' + day + '/' + year; var isZipCodeInvalid = false; if (firstName == "" || sqlscriptPattern.test(firstName.toUpperCase())) { dvFirstName.style.display = "block"; executeSave = 'N'; } else { dvFirstName.style.display = "none"; } if (lastName == "" || sqlscriptPattern.test(lastName.toUpperCase())) { dvLastName.style.display = "block"; executeSave = 'N'; } else { dvLastName.style.display = "none"; } if (!emailPattern.test(email)) { dvEmailMessage.style.display = "block"; executeSave = 'N'; } else { dvEmailMessage.style.display = "none"; } if (!emailPattern.test(emailConfirmation)) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error2"); dvEmailConfirmationMessage.addClassName("error"); $('ucMardigras_lblMessageEmailConfirmation').innerHTML = $('ucMardigras_hdnEmailConfirmationMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } if (emailPattern.test(email) && emailPattern.test(emailConfirmation)) { if (email.toUpperCase() != emailConfirmation.toUpperCase()) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error"); dvEmailConfirmationMessage.addClassName("error2"); $('ucMardigras_lblMessageEmailConfirmation').innerHTML = $('ucMardigras_hdnEmailCompareMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } } if (!datePattern.test(date)) { dvBirthdateMessage.style.display = "block"; executeSave = 'N'; } else { dvBirthdateMessage.style.display = "none"; } if (country == -1) { dvCountryMessage.style.display = "block"; executeSave = 'N'; } else { dvCountryMessage.style.display = "none"; } if (zipCode != "" && sqlscriptPattern.test(zipCode.toUpperCase())) { isZipCodeInvalid = true; dvZipMessage.style.display = "block"; executeSave = 'N'; } else { isZipCodeInvalid = false; dvZipMessage.style.display = "none"; } if (!isZipCodeInvalid) { if (country == USValue) { if (zipCode == "" || !zipPattern.test(zipCode)) { dvZipMessage.style.display = "block"; executeSave = 'N'; } else { dvZipMessage.style.display = "none"; } } else { dvZipMessage.style.display = "none"; } } dvMobileMessage.style.display = "none"; if(chkMobileOptin.checked && mobile == "") { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else if(mobile != ""){ if (sqlscriptPattern.test(mobile.toUpperCase())) { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else { dvMobileMessage.style.display = "none"; } } if (executeSave == 'N') { return false; } else { return true; }}function OpenPopupDivProfile(DivId) { switchEmailBox(true, $(DivId)); return false;}function ValidateControlsResortsSignUp() { var executeSave = 'Y'; //Divs var dvFirstName = $('ucResortsSignUp_dvFirstNameMessage'); var dvLastName = $('ucResortsSignUp_dvLastNameMessage'); var dvCountryMessage = $('ucResortsSignUp_dvCountryMessage'); var dvEmailMessage = $('ucResortsSignUp_dvEmailMessage'); var dvEmailConfirmationMessage = $('ucResortsSignUp_dvEmailConfirmationMessage'); var dvZipMessage = $('ucResortsSignUp_dvZipMessage'); var dvBirthdateMessage = $('ucResortsSignUp_dvBirthdateMessage'); var dvMobileMessage = $('ucResortsSignUp_dvMobileMessage'); //Values var firstName = $('ucResortsSignUp_txtFirstName').value.trim(); var lastName = $('ucResortsSignUp_txtLastName').value.trim(); var email = $('ucResortsSignUp_txtEmail').value.trim(); var emailConfirmation = $('ucResortsSignUp_txtEmailConfirmation').value.trim(); var zipCode = $('ucResortsSignUp_txtZipCode').value.trim(); var mobile = $('ucResortsSignUp_txtMobile').value.trim(); var chkMobileOptin = $('ucResortsSignUp_chkMobileOptin') var countryControl = $("ucResortsSignUp_ddlCountry"); var country = countryControl.value.trim(); var day = $('ucResortsSignUp_ddlDay').value.trim(); var month = $('ucResortsSignUp_ddlMonth').value.trim(); var year = $('ucResortsSignUp_ddlYear').value.trim(); var date = month + '/' + day + '/' + year; var isZipCodeInvalid = false; if (firstName == "" || sqlscriptPattern.test(firstName.toUpperCase())) { dvFirstName.style.display = "block"; executeSave = 'N'; } else { dvFirstName.style.display = "none"; } if (lastName == "" || sqlscriptPattern.test(lastName.toUpperCase())) { dvLastName.style.display = "block"; executeSave = 'N'; } else { dvLastName.style.display = "none"; } if (!emailPattern.test(email)) { dvEmailMessage.style.display = "block"; executeSave = 'N'; } else { dvEmailMessage.style.display = "none"; } if (!emailPattern.test(emailConfirmation)) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error2"); dvEmailConfirmationMessage.addClassName("error"); $('ucResortsSignUp_lblMessageEmailConfirmation').innerHTML = $('ucResortsSignUp_hdnEmailConfirmationMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } if (emailPattern.test(email) && emailPattern.test(emailConfirmation)) { if (email.toUpperCase() != emailConfirmation.toUpperCase()) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error"); dvEmailConfirmationMessage.addClassName("error2"); $('ucResortsSignUp_lblMessageEmailConfirmation').innerHTML = $('ucResortsSignUp_hdnEmailCompareMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } } if (!datePattern.test(date)) { dvBirthdateMessage.style.display = "block"; executeSave = 'N'; } else { dvBirthdateMessage.style.display = "none"; } if (country == -1) { dvCountryMessage.style.display = "block"; executeSave = 'N'; } else { dvCountryMessage.style.display = "none"; } if (zipCode != "" && sqlscriptPattern.test(zipCode.toUpperCase())) { isZipCodeInvalid = true; dvZipMessage.style.display = "block"; executeSave = 'N'; } else { isZipCodeInvalid = false; dvZipMessage.style.display = "none"; } if (!isZipCodeInvalid) { if (country == USValue) { if (zipCode == "" || !zipPattern.test(zipCode)) { dvZipMessage.style.display = "block"; executeSave = 'N'; } else { dvZipMessage.style.display = "none"; } } else { dvZipMessage.style.display = "none"; } } dvMobileMessage.style.display = "none"; if (chkMobileOptin.checked && mobile == "") { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else if (mobile != "") { if (sqlscriptPattern.test(mobile.toUpperCase())) { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else { dvMobileMessage.style.display = "none"; } } if (executeSave == 'N') { return false; } else { return true; }}function OpenPopupDivProfile(DivId) { switchEmailBox(true, $(DivId)); return false;}function changeInputType( oldElm, // a reference to the input element iType, // value of the type property: 'text' or 'password' iValue, // the default value, set to 'password' in the demo blankValue, // true if the value should be empty, false otherwise noFocus) { // set to true if the element should not be given focus if (!oldElm || !oldElm.parentNode || (iType.length < 4) || !document.getElementById || !document.createElement) return; var isMSIE = /*@cc_on!@*/false; if (!isMSIE) { var newElm = document.createElement('input'); newElm.type = iType; } else { var newElm = document.createElement('span'); newElm.innerHTML = ''; newElm = newElm.firstChild; } var props = ['name', 'id', 'className', 'size', 'tabIndex', 'accessKey']; for (var i = 0, l = props.length; i < l; i++) { if (oldElm[props[i]]) newElm[props[i]] = oldElm[props[i]]; } newElm.onfocus = function() { return function() { if (this.hasFocus) return; var newElm = changeInputType(this, 'password', iValue, (this.value.toLowerCase() == iValue.toLowerCase()) ? true : false); if (newElm) newElm.hasFocus = true; } } (); newElm.onblur = function() { return function() { if (this.hasFocus) if (this.value == '' || (this.value.toLowerCase() == iValue.toLowerCase())) { changeInputType(this, 'text', iValue, false, true); $('topMenu_txtEmail').focus(); $('topMenu_chkKeepLogIn').focus(); } } } (); // hasFocus is to prevent a loop where onfocus is triggered over and over again newElm.hasFocus = false; // some browsers need the value set before the element is added to the page // while others need it set after if (!blankValue) newElm.value = iValue; oldElm.parentNode.replaceChild(newElm, oldElm); if (!isMSIE && !blankValue) newElm.value = iValue; if (!noFocus || typeof (noFocus) == 'undefined') { window.tempElm = newElm; setTimeout("tempElm.hasFocus=true;tempElm.focus();", 1); } return newElm;}Event.observe(window, "load", function() { loadUserInformation(); uncheckSubscriptions();});function loadUserInformation() { changeInputType($('topMenu_txtPassword'), 'text', 'Password', false, true); if (window.location.href.toLowerCase().indexOf("expandpanel=y") > 0 || window.location.href.toLowerCase().indexOf("expandpanelticket=y") > 0) { openPassport(); } if (window.location.href.toLowerCase().indexOf("expandpanelticket=y") > 0) { showMenuPanelContent('', '/shoppingcart/passportparktickets.aspx'); switchEmailBox(true, $('content_right_usercontrol_dvSaveCartControl')); } if (window.location.href.toLowerCase().indexOf("showsavemapmessage=y") > 0) { switchEmailBox(true, $('dvSaveMapMessage')); }}// don't know what is thisfunction SetStyle(id) { $(id).addClassName("focused");}function CancelStyle(id) { $(id).removeClassName("focused");}var loginShow = false;function showLogin() { window.location = LoginPage;}function ShowLoginTop() { Effect.BlindDown($('dvLoginPopup'), { duration: 1, queue: { scope: "login", position: "end", limit: 1 } }); loginShow = true;}function CloseLoginTop() { Effect.BlindUp($('dvLoginPopup'),{ duration: 1, queue: { scope: "login", position: "end", limit: 1 }}); loginShow = false;}function LogIn() { var email = $('topMenu_txtEmail').value; var password = $('topMenu_txtPassword').value.trim(); var chkKeepLogIn = $('topMenu_chkKeepLogIn').checked; if (email == "" || email == "Email" || !ValidateEmailMap(email) || email == "(please enter a valid email address)") { $('topMenu_txtEmail').value = '(please enter a valid email address)'; return false; } PageMethods.ApplyLogIn(email, password, chkKeepLogIn, onLogInComplete, onLogInUnComplete);}function LogOut() { PageMethods.ApplyLogOut(function() { // success window.location = DefaultPage; }, function() { // failed window.location = ErrorPage; });}function ImNotUser(Type) { PageMethods.ApplyImNotUser(function() { // success if (Type == "CP") { window.location = CustomerProfilePage; } else { window.location = LoginPage; } }, function() { // failed window.location = ErrorPage; });}function onLogInUnComplete() { window.location = ErrorPage;}function onLogInComplete(result) { if (result == "ER" || result == "BU") { window.location = LoginPage; } else if (result) { $('topMenu_txtEmail').value = ""; $('topMenu_txtPassword').value = ""; $('topMenu_chkKeepLogIn').checked = false; if (result == "CU") { window.location = UrlManageAccount; } else if (result == "CH") { window.location = ChangePasswordPage; } else { loadUserInformation(); window.location = DefaultPage; } }}function ValidateEmailMap(email) { var emailPattern = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; if (!emailPattern.test(email)) { return false; } else { return true; }}function ValidateSQLMap(value) {// var sqlscriptPattern = /(<)|(>)|(SCRIPT)|(<)|(>)|(%3c)|(%3e)|(SELECT)|(UPDATE)|(INSERT)|(DELETE)|(REVOKE)|(UNION)|(DROP)|(DATABASE)|(EXEC)|(&lt;)|(&gt;)|(--)/; var sqlscriptPattern = /(<)|(>)|(SCRIPT)|(<)|(>)|(%3c)|(%3e)|(SELECT)|(UPDATE)|(INSERT)|(DELETE)|(REVOKE)|(TRUNCATE)|(DROP)|(DATABASE)|(EXEC)|(CREATE)|(ALTER)|(COMMENT)|(MERGE)|(&lt;)|(&gt;)|(--)/; if (sqlscriptPattern.test(value.toUpperCase())) { return true; } else { return false; }}function ismaxlength(obj) { var mlength = obj.getAttribute ? parseInt(obj.getAttribute("maxlength")) : "" if (obj.getAttribute && obj.value.length > mlength) obj.value = obj.value.substring(0, mlength)}function DisabledControl(control, value) { control.disabled = value;}function getContent(_url) { var _objhtml; var _objrequest = new Ajax.Request(_url, { method: 'get', onSuccess: function(resp) { _objhtml = resp.responseText; }, onFailure: function(resp) { }, parameters: "" }); return _objhtml;}function switchCover(isOn) { if (isOn) { if (!coverContainer) { var forms = document.getElementsByTagName("form"); var form = forms[0]; for (var i = 0, len = forms.length; i < len; i++) { if (forms[i].id != "" && forms[i].id.indexOf("rsh") == -1) { form = forms[i]; break; } } coverContainer = new Element("div"); coverContainer.addClassName("cover_container"); form.appendChild(coverContainer); hideContainer = new Element("div"); hideContainer.hide(); form.appendChild(hideContainer); } if (!cover) { // build a cover to prevent operations before the map is ready to run. cover = new Element("div"); if (window.location.href.toLowerCase().indexOf("merchandise") > 0) { cover.addClassName("blackCover"); } else { cover.addClassName("cover"); } coverContainer.insert(cover); } } var html = document.documentElement; coverContainer.setStyle({ display: isOn ? "block" : "none", width: (isIE6 ? html.scrollWidth : html.clientWidth) + "px", height: (isIE6 ? html.scrollHeight : html.clientHeight) + "px", position: isIE6 ? "absolute" : "fixed" }); cover.setStyle({ width: (isIE6 ? html.scrollWidth : html.clientWidth) + "px", height: (isIE6 ? html.scrollHeight : html.clientHeight) + "px", opacity: 0.5 });}var loading = null;function switchLoading(isOn) { switchCover(isOn); if (isOn) { if (!loading) { // keep the loading image in the center of the map container // even if the size of the container is changed loading = new Element("img"); loading.src = "/images/loading.gif"; loading.addClassName("loading_icon"); var iconSize = loading.getDimensions(); loading.style.marginTop = (document.documentElement.clientHeight -iconSize.height) / 2 + "px"; loading.style.marginLeft = (document.documentElement.clientWidth -iconSize.width) / 2 + "px"; } coverContainer.insert(loading); } else { loading.remove(); }}var email = null;var tabbableTags = new Array("A", "BUTTON", "TEXTAREA", "INPUT", "SELECT");function disableTabIndexes() { for (var j = 0; j < tabbableTags.length; j++) { var tagElements = document.getElementsByTagName(tabbableTags[j]); for (var k = 0; k < tagElements.length; k++) { tagElements[k].tabIndex = -1; if (tagElements[k].type == 'radio') { tagElements[k].disabled = true; } } }}function restoreTabIndexes() { for (var j = 0; j < tabbableTags.length; j++) { var tagElements = document.getElementsByTagName(tabbableTags[j]); for (var k = 0; k < tagElements.length; k++) { tagElements[k].tabIndex = 0; tagElements[k].tabEnabled = true; if (tagElements[k].type == 'radio') { tagElements[k].disabled = false; } } }}function restoreTabIndexesCurrentPopup(div) { var elements = div.getElementsByTagName("*"); var maxElements = elements.length; var index = 1; for (var contElements = 0; contElements < maxElements; ++contElements) { var element = elements[contElements]; if (element.tagName == 'A' || element.tagName == 'IMG') { element.tabIndex = index; element.tabEnabled = true; index++; } else { switch (element.type) { case 'text': case 'password': case 'textarea': case 'select-one': case 'select-multiple': case 'checkbox': case 'button': case 'submit': element.tabIndex = index; element.tabEnabled = true; index++; break; case 'radio': element.tabIndex = index; element.tabEnabled = true; element.disabled = false; index++; break; } } }}function switchEmailBox(isOn, control) {checkboxlistBecomeOptionboxlist(); control = $(control);var popupParams = control.down('input[id=popupParams]');if (popupParams != undefined){var params = popupParams.value.split('|');var options = {option: params[0],xPos : params[1],yPos : params[2]}if (isOn) {switchCover(isOn);control.remove();coverContainer.insert(control);var html = document.documentElement;if (options.option == 'center'){control.setStyle({top: (html.clientHeight - control.getHeight()) / 2+ (isIE6 ? html.scrollTop : 0) + "px",left: (html.clientWidth - control.getWidth()) / 2+ (isIE6 ? html.scrollLeft : 0) + "px",display: "block",position: isIE6 ? "absolute" : "fixed","z-index": 20001});} else {control.setStyle({top: options.yPos + "px",left: options.xPos + "px",display: "block",position: isIE6 ? "absolute" : "fixed","z-index": 20001});}disableTabIndexes();restoreTabIndexesCurrentPopup(control);}else {if (hideContainer != null) {control.remove();hideContainer.insert(control);switchCover(isOn);restoreTabIndexes();}else {PromoXYClick();}}}else{if (isOn) {switchCover(isOn);control.remove();coverContainer.insert(control);var html = document.documentElement;control.setStyle({top: (html.clientHeight - control.getHeight()) / 2+ (isIE6 ? html.scrollTop : 0) + "px",left: (html.clientWidth - control.getWidth()) / 2+ (isIE6 ? html.scrollLeft : 0) + "px",display: "block",position: isIE6 ? "absolute" : "fixed","z-index": 20001});disableTabIndexes();restoreTabIndexesCurrentPopup(control);}else {if (hideContainer != null) {control.remove();hideContainer.insert(control);switchCover(isOn);restoreTabIndexes();}else {PromoXYClick();}}}}function switchEmailBoxPatch(isOn, control) { control = $(control); var container = control.up("div"); if (isOn) { switchCover(isOn); container.remove(); coverContainer.insert(container); var html = document.documentElement; control.setStyle({ top: (html.clientHeight - control.getHeight()) / 2+ (isIE6 ? html.scrollTop : 0) + "px", left: (html.clientWidth - control.getWidth()) / 2+ (isIE6 ? html.scrollLeft : 0) + "px", display: "block", position: "absolute", "z-index": 20001 }); control.show(); disableTabIndexes(); restoreTabIndexesCurrentPopup(control); } else { control.hide(); container.remove(); hideContainer.insert(container); switchCover(isOn); restoreTabIndexes(); }}function switchDialog(isOn, control) { switchEmailBox(isOn, concat);}function UnSelectAll(value) { var forms = document.getElementsByTagName("form"); var form = forms[0]; for (var i = 0, len = forms.length; i < len; i++) { if (forms[i].id.indexOf("rsh") == -1) { form = forms[i]; break; } } for (i = 0; i < form.elements.length; i++) { var elm = form.elements[i] if (elm.type == 'checkbox' && elm.id.indexOf('UCUnsubscribe1') == 0) { elm.disabled = value; } }}function OpenUnsubscribeConfirmation() { switchEmailBox(true, $('unsubscribe_boxConfirm')); $('UCUnsubscribe1_btnCloseUnsubscribe').focus();}function CloseUnsubscribeConfirmation() { switchEmailBox(false, $('unsubscribe_boxConfirm')); window.location = DefaultPage;}function UnsubscribeConfirmationExecute(e) { if (window.event) // IE { keynum = e.keyCode } else if (e.which) // Netscape/Firefox/Opera { keynum = e.which } if (keynum == 13 || keynum == 27) { CloseUnsubscribeConfirmation(); return false; }}function BoxExecute(e, Option) { if (window.event) // IE { keynum = e.keyCode } else if (e.which) // Netscape/Firefox/Opera { keynum = e.which } if (keynum == 27) { if (Option == "EmailSubscription") { CloseEmailSubscription('DivEmailSubscription'); } else if (Option == "EmailSubscriptionName") { ClosePopup('DivEmailSubscriptionName'); } return false; }}function EnabledZipCode(CountryId,ZipCodeId) { var countryValue = $(CountryId).value; var zipCode = $(ZipCodeId); if (countryValue == USValue) { zipCode.disabled = false; } else { zipCode.disabled = true; zipCode.value = ''; }}function ExecuteRTUSubmit() { var executeSave = 'Y'; var dvFirstName = $('dvFirstNameMessage'); var dvLastNameMessage = $('dvLastNameMessage'); var dvCountryMessage = $('dvCountryMessage'); var dvEmailMessage = $('dvEmailMessage'); var dvZipMessage = $('dvZipMessage'); var dvBirthdateMessage = $('dvBirthdateMessage'); var dvEmailConfirmationMessage = $('dvConfirmEmail'); var firstName = $('txtFirstName').value.trim(); var lastName = $('txtLastName').value.trim(); var email = $('txtEmail').value.trim(); var emailConfirmation = $('txtConfirmEmail').value.trim(); var zipCode = $('txtZipCode').value.trim(); var country = $('ddlCountry').value; var month = $('ddlMonth').value; var day = $('ddlDay').value; var year = $('ddlYear').value; var date = month + '/' + day + '/' + year; var isZipCodeInvalid = false; var youthOrPastor; if ($('rblYes').checked) { youthOrPastor = true; } else { youthOrPastor = false; } var rblQuestions = ''; var forms = document.getElementsByTagName("form"); var form = forms[0]; for (var i = 0, len = forms.length; i < len; i++) { if (forms[i].id.indexOf("rsh") == -1) { form = forms[i]; break; } } for (i = 0; i < form.elements.length; i++) { var elm = form.elements[i] if (elm.type == 'checkbox' && elm.id.indexOf('rblQuestions') == 0) { rblQuestions += elm.value + "," + elm.checked + "|"; } } if (firstName == "" || sqlscriptPattern.test(firstName.toUpperCase())) { dvFirstName.style.display = "block"; executeSave = 'N'; } else { dvFirstName.style.display = "none"; } if (lastName == "" || sqlscriptPattern.test(lastName.toUpperCase())) { dvLastNameMessage.style.display = "block"; executeSave = 'N'; } else { dvLastNameMessage.style.display = "none"; } if (!emailPattern.test(email)) { dvEmailMessage.style.display = "block"; executeSave = 'N'; } else { dvEmailMessage.style.display = "none"; } //Email Confirmation if (!emailPattern.test(emailConfirmation)) { dvEmailConfirmationMessage.removeClassName("error2"); dvEmailConfirmationMessage.addClassName("error"); dvEmailConfirmationMessage.style.display = "block"; $('ucRTU_lblMessageConfirmEmail').innerHTML = "Email Confirmation invalid"; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } if (emailPattern.test(email) && emailPattern.test(emailConfirmation)) { if (email.toUpperCase() != emailConfirmation.toUpperCase()) { dvEmailConfirmationMessage.addClassName("error2"); dvEmailConfirmationMessage.removeClassName("error"); dvEmailConfirmationMessage.style.display = "block"; $('ucRTU_lblMessageConfirmEmail').innerHTML = "Confirm Email Doesn't Match First Entry"; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } } if (!datePattern.test(date)) { dvBirthdateMessage.style.display = "block"; executeSave = 'N'; } else { dvBirthdateMessage.style.display = "none"; } if (country == -1) { dvCountryMessage.style.display = "block"; executeSave = 'N'; } else { dvCountryMessage.style.display = "none"; } if (zipCode != "" && sqlscriptPattern.test(zipCode.toUpperCase())) { isZipCodeInvalid = true; dvZipMessage.style.display = "block"; executeSave = 'N'; } else { isZipCodeInvalid = false; dvZipMessage.style.display = "none"; } if (!isZipCodeInvalid) { if (country == USValue) { if (zipCode == "" || !zipPattern.test(zipCode)) { dvZipMessage.style.display = "block"; executeSave = 'N'; } else { dvZipMessage.style.display = "none"; } } else { dvZipMessage.style.display = "none"; } } if (executeSave == "Y") { PageMethods.SaveRockTheUniverseData(firstName, lastName, email, zipCode, country, month, day, year, youthOrPastor, rblQuestions, function(result) { // success if (result) { var popupId = $('hdDivPopupId').value; switchEmailBox(true, $(popupId)); return false; } else { switchEmailBox(true, $('dvProfileMessage')); return false; } }, function() { // failed window.location = ErrorPage; }); }}function genericpopwin(windowURL, windowWidth, windowHeight, scrollBars, reSizable) { if (scrollBars) { // } else { scrollBars = 'no' } if (reSizable) { // } else { reSizable = 'no' } var windowName = "generic" + Math.round(Math.random(1) * 1000); var windowOptions = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + scrollBars + ",resizable=" + reSizable + ",width=" + windowWidth + ",height=" + windowHeight; var mywin = window.open(windowURL, windowName, windowOptions);}/*castroh 20090311 init*//*Coment the code line by remove the loading gray screen*///switchLoading(true);/*castroh 20090311 end*/Components = { MAP: 0, EXPLORER: 1, TOP_MENU: 2};//TODO: I don't know yetfunction registerComponent(componentId) {}var BunchUpdateManager = Class.create({ queue: null, initialize: function() { this.queue = []; }, add2Queue: function(obj) { this.queue.push(obj); }, removeFromQueue: function(obj) { this.queue = this.queue.reject(function(item, index) { return (item.data.type == obj.type && item.data.id == obj.id); }); }, update: function(params) { this.queue.each(function(item, index) { item.update(params, item.data); }); }});var favManager = new BunchUpdateManager();function commonUpdate(params, data) { if (params.id != data.id) { return; } if (params.status == "operating") { data.add.hide(); data.remove.hide(); data.operating.show(); } else if (params.status == "added") { if (params.success) { data.add.hide(); data.remove.show(); } else { data.add.show(); data.remove.hide(); } data.operating.hide(); } else if (params.status == "removed") { if (params.success) { data.add.show(); data.remove.hide(); } else { data.add.hide(); data.remove.show(); } data.operating.hide(); } else { if (DEBUG && !Prototype.Browser.IE) { console.log("warning: wrong status!"); } }}var isFlashSupported = (function() { if (Prototype.Browser.IE) { try { var flash = new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash"); return true; } catch (e) { return false; } } else { if (navigator.plugins) { for (var i = 0; i < navigator.plugins.length; i++) { if (navigator.plugins[i].name.toLowerCase().indexOf("shockwave flash") >= 0) { return true; } } } } return false;})();function showFlash() { if (!isFlashSupported) { if (DEBUG && !Prototype.Browser.IE) { console.log("flash is not supported in this browser!"); } return; } var flashData = $A(document.getElementsByName("ada_swf")); flashData.each(function(item, index) { try { var data = $H(item.value.replace(/\?/, "|").toQueryParams()); data.each(function(pair, i) { data.set(pair.key, pair.value.replace(/\|/, "?")); }); var flashHTML = ""; item.parentNode.innerHTML = flashHTML; } catch (e) { if (DEBUG && !Prototype.Browser.IE) console.log(e.message); } });}showFlash();//IE 6 patch//IE 6 drop down box will be shown in front of all the popup windows//these functions will check the position of the drop down HTML control,//if it's inside the area of popup, hide it when showing the popup.//function calSize(obj) {//if (!obj.pos) {//obj.pos = obj.cumulativeOffset();//var size = obj.getDimensions();//obj.pos.bottom = obj.pos.top + size.height;//obj.pos.right = obj.pos.left + size.width;//}//}function hideSelect() { if (isIE6) { var selects = $$("select"); selects.invoke("setStyle", "visibility: hidden;"); var iframes = $$("iframe"); iframes.each(function(iframe, index) { // can't use prototype functions here because the iframe might not have prototype library included. var selects = iframe.contentWindow.document.getElementsByTagName("select"); for (var i = 0, len = selects.length; i < len; i++) { selects[i].style.visibility = "hidden"; } }); //for (var i = 0; i < selects.length; i++) { //var select = $(selects[i]); //calSize(select); //calSize(popup); //if ((select.pos.top < popup.pos.bottom && select.pos.top > popup.pos.top && //select.pos.left < popup.pos.right && select.pos.left > popup.pos.left) || ( //select.pos.bottom < popup.pos.bottom && select.pos.bottom > popup.pos.top && //select.pos.right < popup.pos.right && select.pos.right > popup.pos.left)) { //select.hide(); //} //} }}function showSelect() { if (isIE6) { var selects = $$("select"); selects.invoke("setStyle", "visibility: visible;"); var iframes = $$("iframe"); iframes.each(function(iframe, index) { // can't use prototype functions here because the iframe might not have prototype library included. var selects = iframe.contentWindow.document.getElementsByTagName("select"); for (var i = 0, len = selects.length; i < len; i++) { selects[i].style.visibility = "visible"; } }); //for (var i = 0; i < selects.length; i++) { //var select = $(selects[i]); //calSize(select); //calSize(popup); //if ((select.pos.top < popup.pos.bottom && select.pos.top > popup.pos.top && //select.pos.left < popup.pos.right && //select.pos.left > popup.pos.left) || //(select.pos.bottom < popup.pos.bottom && select.pos.bottom > popup.pos.top && //select.pos.right < popup.pos.right && //select.pos.right > popup.pos.left)) { //select.show(); //} //} }}//IE 6 patch endfunction checkboxlistBecomeOptionboxlist(){ if ($('checkPage')) { var sPage=$('checkPage').value; var chr=0; var chrText=''; switch(sPage){ case 'hhnight': chr=14; chrText='ucHHNDataEntry'; if($('ucHHNDataEntry_ddlCountry').selectedIndex ==1){ $('ucHHNDataEntry_txtZipCode').disabled=false; } Event.observe($('ucHHNDataEntry_ddlCountry'), 'change',function (){ if($(this).selectedIndex ==1) { $('ucHHNDataEntry_txtZipCode').disabled=false; } else { $('ucHHNDataEntry_txtZipCode').disabled=true; $('ucHHNDataEntry_txtZipCode').value=''; } }); break; case 'rocktheuniverse': chr=2; chrText='rb'; break; default: return; } var elements = $('Form1').getElementsByTagName('input'); var maxElements = elements.length; var objarray=new Array(); var count=0; for (var contElements = 0; contElements < maxElements; contElements++) { var element = elements[contElements]; if (element.type=='checkbox' && element.id.substr(0,chr)==chrText && element.id != 'ucHHNDataEntry_chkHHNPromotion_0' ) { objarray[count]=element; count++; var id=element.id; Event.observe($(id), 'click',function (){ var i; for(i in objarray){ if(objarray[i].type=='checkbox' && objarray[i].id.substr(0,chr)==chrText && objarray[i].id != 'ucHHNDataEntry_chkHHNPromotion_0'){ if(objarray[i].id!=$(this).id){ objarray[i].checked=false; } } } }); } } } }function ValidateControlsHHNPassholderLogin() { var executeSave = 'Y'; //Divs var dvPassHolderIdMessage = $('ucHHNPassholderLogin_dvPassHolderIdMessage'); var dvResultError = $('ucHHNPassholderLogin_dvResultError'); //Values var PassHolderID = $('ucHHNPassholderLogin_txtPassHolderID').value; dvResultError.style.display = "none"; if (PassHolderID == "" || sqlscriptPattern.test(PassHolderID.toUpperCase())) { dvPassHolderIdMessage.style.display = "block"; executeSave = 'N'; } else { dvPassHolderIdMessage.style.display = "none"; } if (executeSave == 'N') { return false; } else { return true; }}function ValidateControlsRTUSignUp() { var executeSave = 'Y';var parentPrefix ="ucRTUSignUp"; //Divs var dvFirstName = $('ucRTUSignUp_dvFirstNameMessage'); var dvLastName = $('ucRTUSignUp_dvLastNameMessage'); var dvCountryMessage = $('ucRTUSignUp_dvCountryMessage'); var dvEmailMessage = $('ucRTUSignUp_dvEmailMessage'); var dvEmailConfirmationMessage = $('ucRTUSignUp_dvEmailConfirmationMessage'); var dvZipMessage = $('ucRTUSignUp_dvZipMessage'); var dvBirthdateMessage = $('ucRTUSignUp_dvBirthdateMessage'); var dvMobileMessage = $('ucRTUSignUp_dvMobileMessage'); //Values var firstName = $('ucRTUSignUp_txtFirstName').value.trim(); var lastName = $('ucRTUSignUp_txtLastName').value.trim(); var email = $('ucRTUSignUp_txtEmail').value.trim(); var emailConfirmation = $('ucRTUSignUp_txtEmailConfirmation').value.trim(); var zipCode = $('ucRTUSignUp_txtZipCode').value.trim(); var mobile = $('ucRTUSignUp_txtMobile').value.trim(); var chkMobileOptin = $('ucRTUSignUp_chkMobileOptin') var countryControl = $("ucRTUSignUp_ddlCountry"); var country = countryControl.value.trim(); var day = $('ucRTUSignUp_ddlDay').value.trim(); var month = $('ucRTUSignUp_ddlMonth').value.trim(); var year = $('ucRTUSignUp_ddlYear').value.trim(); var date = month + '/' + day + '/' + year; var isZipCodeInvalid = false; if (firstName == "" || sqlscriptPattern.test(firstName.toUpperCase())) { dvFirstName.style.display = "block"; executeSave = 'N'; } else { dvFirstName.style.display = "none"; } if (lastName == "" || sqlscriptPattern.test(lastName.toUpperCase())) { dvLastName.style.display = "block"; executeSave = 'N'; } else { dvLastName.style.display = "none"; } if (!emailPattern.test(email)) { dvEmailMessage.style.display = "block"; executeSave = 'N'; } else { dvEmailMessage.style.display = "none"; } if (!emailPattern.test(emailConfirmation)) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error2"); dvEmailConfirmationMessage.addClassName("error"); $('ucRTUSignUp_lblMessageEmailConfirmation').innerHTML = $('ucRTUSignUp_hdnEmailConfirmationMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } if (emailPattern.test(email) && emailPattern.test(emailConfirmation)) { if (email.toUpperCase() != emailConfirmation.toUpperCase()) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error"); dvEmailConfirmationMessage.addClassName("error2"); $('ucRTUSignUp_lblMessageEmailConfirmation').innerHTML = $('ucRTUSignUp_hdnEmailCompareMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } } if (!datePattern.test(date)) { dvBirthdateMessage.style.display = "block"; executeSave = 'N'; } else { dvBirthdateMessage.style.display = "none"; } if (country == -1) { dvCountryMessage.style.display = "block"; executeSave = 'N'; } else { dvCountryMessage.style.display = "none"; } if (zipCode != "" && sqlscriptPattern.test(zipCode.toUpperCase())) { isZipCodeInvalid = true; dvZipMessage.style.display = "block"; executeSave = 'N'; } else { isZipCodeInvalid = false; dvZipMessage.style.display = "none"; } if (!isZipCodeInvalid) { if (country == USValue) { if (zipCode == "" || !zipPattern.test(zipCode)) { dvZipMessage.style.display = "block"; executeSave = 'N'; } else { dvZipMessage.style.display = "none"; } } else { dvZipMessage.style.display = "none"; } } dvMobileMessage.style.display = "none"; if(chkMobileOptin.checked && mobile == "") { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else if(mobile != ""){ if (sqlscriptPattern.test(mobile.toUpperCase())) { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else { dvMobileMessage.style.display = "none"; } } if (executeSave == 'N') { return false; } else { return true; }}function activateCheckboxOnUserControlSignUp(){ if ($('ucRTUSignUp_UCSignUpType')) {var ucType=$('ucRTUSignUp_UCSignUpType').value;switch (ucType){case 'RTUSignUp':var ucContentName ='RTUSignUp_Content';var ucInternalContentName = 'ucRTUSignUp_chkRTUInformation';if ($('ucRTUSignUp_rblYouthPastorOrLeader_1')) $('ucRTUSignUp_rblYouthPastorOrLeader_1').checked = true;if ($('ucRTUSignUp_chkRTUInformation_0')) $('ucRTUSignUp_chkRTUInformation_0').checked = true;break;}if ($(ucContentName) && $(ucInternalContentName)){var elements = $(ucInternalContentName).select('input[type=checkbox]');elements.each(function(element, index){Event.observe(element, 'click', function(){uncheckCheckBoxes(elements, element);});});}} }function uncheckCheckBoxes(_elements, _element){_elements.each(function(e) {if (e.id != _element.id) {e.checked = false; } });}function uncheckSubscriptions(){var chkEmailSubscriptions = 'ucUCSubscriptions_chkEmailSubscriptions';if ($(chkEmailSubscriptions)){var elements = $(chkEmailSubscriptions).select('input[type=checkbox]');elements.each(function(element, index){ if(index == 0){ Event.observe(element, 'click', function(){ uncheckEmailSubscriptions(elements, element); }); } });}var chkMessageSubscriptions = 'ucUCSubscriptions_chkMessageSubscriptions';if ($(chkMessageSubscriptions)){var elements1 = $(chkMessageSubscriptions).select('input[type=checkbox]');elements1.each(function(element, index){ if(index == 0){ Event.observe(element, 'click', function(){ uncheckMessageSubscriptions(elements1, element); }); } });}}function uncheckEmailSubscriptions(_elements, _element){if(_element.checked == false) _elements[2].checked = false;}function uncheckMessageSubscriptions(_elements, _element){if(_element.checked == false) _elements[1].checked = false;}//Validate data fields for HolidaySignUp UserControlfunction ValidateControlsHolidaySignup() { var executeSave = 'Y'; //Divs var dvFirstName = $('ucHoliday_dvFirstNameMessage'); var dvLastName = $('ucHoliday_dvLastNameMessage'); var dvCountryMessage = $('ucHoliday_dvCountryMessage'); var dvEmailMessage = $('ucHoliday_dvEmailMessage'); var dvEmailConfirmationMessage = $('ucHoliday_dvEmailConfirmationMessage'); var dvZipMessage = $('ucHoliday_dvZipMessage'); var dvBirthdateMessage = $('ucHoliday_dvBirthdateMessage'); var dvMobileMessage = $('ucHoliday_dvMobileMessage'); //Values var firstName = $('ucHoliday_txtFirstName').value.trim(); var lastName = $('ucHoliday_txtLastName').value.trim(); var email = $('ucHoliday_txtEmail').value.trim(); var emailConfirmation = $('ucHoliday_txtEmailConfirmation').value.trim(); var zipCode = $('ucHoliday_txtZipCode').value.trim(); var mobile = $('ucHoliday_txtMobile').value.trim(); var chkMobileOptin = $('ucHoliday_chkMobileOptin') var countryControl = $("ucHoliday_ddlCountry"); var country = countryControl.value.trim(); var day = $('ucHoliday_ddlDay').value.trim(); var month = $('ucHoliday_ddlMonth').value.trim(); var year = $('ucHoliday_ddlYear').value.trim(); var date = month + '/' + day + '/' + year; var isZipCodeInvalid = false; if (firstName == "" || sqlscriptPattern.test(firstName.toUpperCase())) { dvFirstName.style.display = "block"; executeSave = 'N'; } else { dvFirstName.style.display = "none"; } if (lastName == "" || sqlscriptPattern.test(lastName.toUpperCase())) { dvLastName.style.display = "block"; executeSave = 'N'; } else { dvLastName.style.display = "none"; } if (!emailPattern.test(email)) { dvEmailMessage.style.display = "block"; executeSave = 'N'; } else { dvEmailMessage.style.display = "none"; } if (!emailPattern.test(emailConfirmation)) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error2"); dvEmailConfirmationMessage.addClassName("error"); $('ucHoliday_lblMessageEmailConfirmation').innerHTML = $('ucHoliday_hdnEmailConfirmationMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } if (emailPattern.test(email) && emailPattern.test(emailConfirmation)) { if (email.toUpperCase() != emailConfirmation.toUpperCase()) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error"); dvEmailConfirmationMessage.addClassName("error2"); $('ucHoliday_lblMessageEmailConfirmation').innerHTML = $('ucHoliday_hdnEmailCompareMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } } if (!datePattern.test(date)) { dvBirthdateMessage.style.display = "block"; executeSave = 'N'; } else { dvBirthdateMessage.style.display = "none"; } if (country == -1) { dvCountryMessage.style.display = "block"; executeSave = 'N'; } else { dvCountryMessage.style.display = "none"; } if (zipCode != "" && sqlscriptPattern.test(zipCode.toUpperCase())) { isZipCodeInvalid = true; dvZipMessage.style.display = "block"; executeSave = 'N'; } else { isZipCodeInvalid = false; dvZipMessage.style.display = "none"; } if (!isZipCodeInvalid) { if (country == USValue) { if (zipCode == "" || !zipPattern.test(zipCode)) { dvZipMessage.style.display = "block"; executeSave = 'N'; } else { dvZipMessage.style.display = "none"; } } else { dvZipMessage.style.display = "none"; } } dvMobileMessage.style.display = "none"; if (chkMobileOptin.checked && mobile == "") { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else if (mobile != "") { if (sqlscriptPattern.test(mobile.toUpperCase())) { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else { dvMobileMessage.style.display = "none"; } } if (executeSave == 'N') { return false; } else { return true; }}// End of Validate Controls for Holiday Signup//Validate data fields for SummerConcertSignUp UserControlfunction ValidateControlsSummerConcertSignUp() { var executeSave = 'Y'; //Divs var dvFirstName = $('ucSummerConcert_dvFirstNameMessage'); var dvLastName = $('ucSummerConcert_dvLastNameMessage'); var dvCountryMessage = $('ucSummerConcert_dvCountryMessage'); var dvEmailMessage = $('ucSummerConcert_dvEmailMessage'); var dvEmailConfirmationMessage = $('ucSummerConcert_dvEmailConfirmationMessage'); var dvZipMessage = $('ucSummerConcert_dvZipMessage'); var dvBirthdateMessage = $('ucSummerConcert_dvBirthdateMessage'); var dvMobileMessage = $('ucSummerConcert_dvMobileMessage'); //Values var firstName = $('ucSummerConcert_txtFirstName').value.trim(); var lastName = $('ucSummerConcert_txtLastName').value.trim(); var email = $('ucSummerConcert_txtEmail').value.trim(); var emailConfirmation = $('ucSummerConcert_txtEmailConfirmation').value.trim(); var zipCode = $('ucSummerConcert_txtZipCode').value.trim(); var mobile = $('ucSummerConcert_txtMobile').value.trim(); var chkMobileOptin = $('ucSummerConcert_chkMobileOptin') var countryControl = $("ucSummerConcert_ddlCountry"); var country = countryControl.value.trim(); var day = $('ucSummerConcert_ddlDay').value.trim(); var month = $('ucSummerConcert_ddlMonth').value.trim(); var year = $('ucSummerConcert_ddlYear').value.trim(); var date = month + '/' + day + '/' + year; var isZipCodeInvalid = false; if (firstName == "" || sqlscriptPattern.test(firstName.toUpperCase())) { dvFirstName.style.display = "block"; executeSave = 'N'; } else { dvFirstName.style.display = "none"; } if (lastName == "" || sqlscriptPattern.test(lastName.toUpperCase())) { dvLastName.style.display = "block"; executeSave = 'N'; } else { dvLastName.style.display = "none"; } if (!emailPattern.test(email)) { dvEmailMessage.style.display = "block"; executeSave = 'N'; } else { dvEmailMessage.style.display = "none"; } if (!emailPattern.test(emailConfirmation)) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error2"); dvEmailConfirmationMessage.addClassName("error"); $('ucSummerConcert_lblMessageEmailConfirmation').innerHTML = $('ucSummerConcert_hdnEmailConfirmationMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } if (emailPattern.test(email) && emailPattern.test(emailConfirmation)) { if (email.toUpperCase() != emailConfirmation.toUpperCase()) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error"); dvEmailConfirmationMessage.addClassName("error2"); $('ucSummerConcert_lblMessageEmailConfirmation').innerHTML = $('ucSummerConcert_hdnEmailCompareMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } } if (!datePattern.test(date)) { dvBirthdateMessage.style.display = "block"; executeSave = 'N'; } else { dvBirthdateMessage.style.display = "none"; } if (country == -1) { dvCountryMessage.style.display = "block"; executeSave = 'N'; } else { dvCountryMessage.style.display = "none"; } if (zipCode != "" && sqlscriptPattern.test(zipCode.toUpperCase())) { isZipCodeInvalid = true; dvZipMessage.style.display = "block"; executeSave = 'N'; } else { isZipCodeInvalid = false; dvZipMessage.style.display = "none"; } if (!isZipCodeInvalid) { if (country == USValue) { if (zipCode == "" || !zipPattern.test(zipCode)) { dvZipMessage.style.display = "block"; executeSave = 'N'; } else { dvZipMessage.style.display = "none"; } } else { dvZipMessage.style.display = "none"; } } dvMobileMessage.style.display = "none"; if (chkMobileOptin.checked && mobile == "") { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else if (mobile != "") { if (sqlscriptPattern.test(mobile.toUpperCase())) { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else { dvMobileMessage.style.display = "none"; } } if (executeSave == 'N') { return false; } else { return true; }}//Validate data fields for WWoHP UserControlfunction ValidateControlsWWoHPSignup() { var executeSave = 'Y'; //Divs var dvFirstName = $('ucWWoHP_dvFirstNameMessage'); var dvLastName = $('ucWWoHP_dvLastNameMessage'); var dvCountryMessage = $('ucWWoHP_dvCountryMessage'); var dvEmailMessage = $('ucWWoHP_dvEmailMessage'); var dvEmailConfirmationMessage = $('ucWWoHP_dvEmailConfirmationMessage'); var dvZipMessage = $('ucWWoHP_dvZipMessage'); var dvBirthdateMessage = $('ucWWoHP_dvBirthdateMessage'); var dvMobileMessage = $('ucWWoHP_dvMobileMessage'); //Values var firstName = $('ucWWoHP_txtFirstName').value.trim(); var lastName = $('ucWWoHP_txtLastName').value.trim(); var email = $('ucWWoHP_txtEmail').value.trim(); var emailConfirmation = $('ucWWoHP_txtEmailConfirmation').value.trim(); var zipCode = $('ucWWoHP_txtZipCode').value.trim(); var mobile = $('ucWWoHP_txtMobile').value.trim(); var chkMobileOptin = $('ucWWoHP_chkMobileOptin') var countryControl = $("ucWWoHP_ddlCountry"); var country = countryControl.value.trim(); var day = $('ucWWoHP_ddlDay').value.trim(); var month = $('ucWWoHP_ddlMonth').value.trim(); var year = $('ucWWoHP_ddlYear').value.trim(); var date = month + '/' + day + '/' + year; var isZipCodeInvalid = false; if (firstName == "" || sqlscriptPattern.test(firstName.toUpperCase())) { dvFirstName.style.display = "block"; executeSave = 'N'; } else { dvFirstName.style.display = "none"; } if (lastName == "" || sqlscriptPattern.test(lastName.toUpperCase())) { dvLastName.style.display = "block"; executeSave = 'N'; } else { dvLastName.style.display = "none"; } if (!emailPattern.test(email)) { dvEmailMessage.style.display = "block"; executeSave = 'N'; } else { dvEmailMessage.style.display = "none"; } if (!emailPattern.test(emailConfirmation)) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error2"); dvEmailConfirmationMessage.addClassName("error"); $('ucWWoHP_lblMessageEmailConfirmation').innerHTML = $('ucWWoHP_hdnEmailConfirmationMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } if (emailPattern.test(email) && emailPattern.test(emailConfirmation)) { if (email.toUpperCase() != emailConfirmation.toUpperCase()) { dvEmailConfirmationMessage.style.display = "block"; dvEmailConfirmationMessage.removeClassName("error"); dvEmailConfirmationMessage.addClassName("error2"); $('ucWWoHP_lblMessageEmailConfirmation').innerHTML = $('ucWWoHP_hdnEmailCompareMessage').value; executeSave = 'N'; } else { dvEmailConfirmationMessage.style.display = "none"; } } if (!datePattern.test(date)) { dvBirthdateMessage.style.display = "block"; executeSave = 'N'; } else { dvBirthdateMessage.style.display = "none"; } if (country == -1) { dvCountryMessage.style.display = "block"; executeSave = 'N'; } else { dvCountryMessage.style.display = "none"; } if (zipCode != "" && sqlscriptPattern.test(zipCode.toUpperCase())) { isZipCodeInvalid = true; dvZipMessage.style.display = "block"; executeSave = 'N'; } else { isZipCodeInvalid = false; dvZipMessage.style.display = "none"; } if (!isZipCodeInvalid) { if (country == USValue) { if (zipCode == "" || !zipPattern.test(zipCode)) { dvZipMessage.style.display = "block"; executeSave = 'N'; } else { dvZipMessage.style.display = "none"; } } else { dvZipMessage.style.display = "none"; } } dvMobileMessage.style.display = "none"; if (chkMobileOptin.checked && mobile == "") { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else if (mobile != "") { if (sqlscriptPattern.test(mobile.toUpperCase())) { dvMobileMessage.style.display = "block"; executeSave = 'N'; } else { dvMobileMessage.style.display = "none"; } } if (executeSave == 'N') { return false; } else { return true; }}// End of Validate Controls for Holiday Signupvar _userid = "";//global variable for billboard's photo gallery castroh 20090522var boolGalleryContainer;//var sqlscriptPattern = /(<)|(>)|(SCRIPT)|(<)|(>)|(%3c)|(%3e)|(\bSELECT\b)|(\bUPDATE\b)|(\bINSERT\b)|(\bDELETE\b)|(\bREVOKE\b)|(\bUNION\b)|(\bDROP\b)|(\bDATABASE\b)|(\bEXEC\b)|(&lt;)|(&gt;)|(--)/;//popup functionalityfunction goToLink(_opt, _url) { var opt = _opt; var url = _url; if (url.length > 0) { if (opt == 1) { window.open(url, ''); } else { window.location = url; } }}function WatermarkBlurOnBase(divName, mail) { var objDiv = document.getElementById(divName); var elements = objDiv.getElementsByTagName("*"); var email = ''; for (var a = 0; a < elements.length; a++) { var element = elements[a]; if ((element.id.length > 0) && (element.id == 'Email')) { email = element.value; if (mail == '') { if (document.getElementById('HiddenEmail')) { var emailVal = document.getElementById('HiddenEmail').value; if (email != emailVal) { //element.value = emailVal; if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email))) { if (document.getElementById('idEmailValue')) { document.getElementById('idEmailValue').value = email; element.value = email; } } else { if (document.getElementById('idEmailValue')) { document.getElementById('idEmailValue').value = emailVal; element.value = emailVal; } } } } } else { element.value = mail; } break; } }}function WatermarkFocusOnBase(divName, mail) { var objDiv = document.getElementById(divName); var elements = objDiv.getElementsByTagName("*"); var email = ''; for (var a = 0; a < elements.length; a++) { var element = elements[a]; if ((element.id.length > 0) && (element.id == 'Email')) { email = element.value; if (mail == '') { if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email))) { element.value = ''; } } else { element.value = mail; } break; } }}function FocusSendEmailOnBase(divName, mail) { var objDiv = document.getElementById(divName); var elements = objDiv.getElementsByTagName("*"); var email = ''; for (var a = 0; a < elements.length; a++) { var element = elements[a]; if ((element.id.length > 0) && (element.id == 'Email')) { var emailVal = ""; if (document.getElementById('idEmailValue')) { emailVal = document.getElementById('idEmailValue').value; } else { if (document.getElementById('HiddenEmail')) { emailVal = document.getElementById('HiddenEmail').value; } } element.value = emailVal; break; } }}function BlurSendEmailOnBase(_divName) { var objDiv = document.getElementById(_divName); var elements = objDiv.getElementsByTagName("*"); var email = ''; for (var a = 0; a < elements.length; a++) { var element = elements[a]; if ((element.id.length > 0) && (element.id == 'Email')) { if (document.getElementById('HiddenEmail')) { element.value = document.getElementById('HiddenEmail').value; if (document.getElementById('idEmailValue')) { document.getElementById('idEmailValue').value = document.getElementById('HiddenEmail').value; } } break; } }}function centerPopup() { if (coverContainer != null) { var control = coverContainer.down('div'); var html = document.documentElement; var divs = control.nextSiblings(); if (divs.length > 0) { var popup; if (divs[0].id == 'UpdatePanelEmailSubscription') { var emailSubscriptionPopup = divs[0].down("div[id=DivEmailSubscription]"); var emailSubscriptionNamePopup = divs[0].down("div[id=DivEmailSubscriptionName]"); if (emailSubscriptionPopup != null && emailSubscriptionPopup.visible()) { popup = emailSubscriptionPopup; } else if (emailSubscriptionNamePopup != null && emailSubscriptionNamePopup.visible()) { popup = emailSubscriptionNamePopup; } } else { popup = divs[0]; } if (popup != null) { if (popup.visible()) { popup.setStyle({ top: (html.clientHeight - popup.getHeight()) / 2 + (isIE6 ? html.scrollTop : 0) + "px", left: (html.clientWidth - popup.getWidth()) / 2 + +(isIE6 ? html.scrollLeft : 0) + "px", display: "block", position: isIE6 ? "absolute" : "fixed", "z-index": 20001 } ); } var html = document.documentElement; coverContainer.setStyle({ width: (isIE6 ? html.scrollWidth : html.clientWidth) + "px", height: (isIE6 ? html.scrollHeight : html.clientHeight) + "px", position: isIE6 ? "absolute" : "fixed" }); if (cover != null) { cover.setStyle({ width: (isIE6 ? html.scrollWidth : html.clientWidth) + "px", height: (isIE6 ? html.scrollHeight : html.clientHeight) + "px", opacity: 0.5 }); } } } }}Event.observe(document.onresize ? document : window, 'resize', function() { centerPopup();});/*function omnitureTracking(trackingName,componentName){ var s=s_gi(s_account);s.tl(true,'o',trackingName + ' | ' + componentName);//s.tl(true,'o','Promotions|' + componentName);s.tl(true,'o',trackingName + ' | ' + componentName);}*/function GetDivLocation(divName) { var coor = $(divName).cumulativeOffset(); var x = coor.left; var y = coor.top; return x + ',' + y;}function ShowDiv(divName) { $(divName).show();}function HideDiv(divName) { $(divName).hide();}function ShowPopup(divName) { switchEmailBoxPatch(true, $(divName));}function ClosePopup(divName) { switchEmailBox(false, $(divName));}function ClosePopupEmailSubscription(divName) { switchEmailBoxPatch(false, $(divName));}function HideEmailSubscriptionNameMessageDiv() { $("DivEmailSubscriptionNameMessage").hide();}function validateEmailSubscriptionName(sender, args) { var divEmailSubscriptionNameMessage = $("DivEmailSubscriptionNameMessage"); if (args.Value.trim() == '') { divEmailSubscriptionNameMessage.show(); $("DivEmailMessageInjection").hide(); args.IsValid = false; return; } else { divEmailSubscriptionNameMessage.hide();// var sqlscriptPattern = /(<)|(>)|(SCRIPT)|(<)|(>)|(%3c)|(%3e)|(\bSELECT\b)|(\bUPDATE\b)|(\bINSERT\b)|(\bDELETE\b)|(\bREVOKE\b)|(\bUNION\b)|(\bDROP\b)|(\bDATABASE\b)|(\bEXEC\b)|(&lt;)|(&gt;)|(--)/; var sqlscriptPattern = /(<)|(>)|(SCRIPT)|(<)|(>)|(%3c)|(%3e)|(\bSELECT\b)|(\bUPDATE\b)|(\bINSERT\b)|(\bDELETE\b)|(\bREVOKE\b)|(\bTRUNCATE\b)|(\bDROP\b)|(\bDATABASE\b)|(\bEXEC\b)|(\bCREATE\b)|(\bALTER\b)|(\bCOMMENT\b)|(\bMERGE\b)|(&lt;)|(&gt;)|(--)/; if (sqlscriptPattern.test(args.Value.toUpperCase())) { $("DivEmailMessageInjection").show(); args.IsValid = false; return; } else { $("DivEmailMessageInjection").hide(); args.IsValid = true; } }}function CollapseNewsletterDiv() { var image = document.getElementById('imgShowHideNewsletter'); var imageHide = "/images/but_f.jpg"; $('DivSignUpForNewsletter').hide(); image.src = imageHide;}function ShowHideNewsletter() { var image = document.getElementById('imgShowHideNewsletter'); var imageShow = "/images/but_f_o.jpg"; var imageHide = "/images/but_f.jpg"; var divSignUpForNewsletter = $('DivSignUpForNewsletter'); if (divSignUpForNewsletter.visible()) { divSignUpForNewsletter.hide(); image.src = imageHide; } else { divSignUpForNewsletter.show(); image.src = imageShow; }}function ResetListID() { document.getElementById('UCEmailSubscription_hdListId').value = '';}function CloseEmailSubscription() { document.getElementById('UCEmailSubscription_hdListId').value = ''; ClosePopupEmailSubscription('DivEmailSubscription');}function ValidateSqlScript(text) {// var sqlscriptPattern = /(<)|(>)|(SCRIPT)|(<)|(>)|(%3c)|(%3e)|(\bSELECT\b)|(\bUPDATE\b)|(\bINSERT\b)|(\bDELETE\b)|(\bREVOKE\b)|(\bUNION\b)|(\bDROP\b)|(\bDATABASE\b)|(\bEXEC\b)|(&lt;)|(&gt;)|(--)/; var sqlscriptPattern = /(<)|(>)|(SCRIPT)|(<)|(>)|(%3c)|(%3e)|(\bSELECT\b)|(\bUPDATE\b)|(\bINSERT\b)|(\bDELETE\b)|(\bREVOKE\b)|(\bTRUNCATE\b)|(\bDROP\b)|(\bDATABASE\b)|(\bEXEC\b)|(\bCREATE\b)|(\bALTER\b)|(\bCOMMENT\b)|(\bMERGE\b)|(&lt;)|(&gt;)|(--)/; if (sqlscriptPattern.test(text.toUpperCase())) { alert(document.getElementById('topOption_hdnMessageGeneral').value); return false; } else { return true; }}function ValidateEmail(email) { //TODO:Get from Server Variable var emailPattern = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; if (emailPattern.test(email) == false) { alert($('topOption_lblMessageEmailSent').innerHTML); return false; } else { return true; }}function ClearControls(div) { var elements = div.getElementsByTagName("*"); var maxElements = elements.length; for (var contElements = 0; contElements < maxElements; ++contElements) { var element = elements[contElements]; switch (element.type) { case 'text': element.value = ''; break; case 'select-one': element.selectedIndex = 0; break; case 'select-multiple': for (contOptions = 0; contOptions < element.options.length; contOptions++) { var selectOptions = element.options[contOptions] selectOptions.selected = false; } break; case 'checkbox': element.checked = false; break; case 'radio': element.checked = false; break; } }}function MaximizeWindow() { window.moveTo(0, 0); if (document.all) { top.window.resizeTo(screen.availWidth, screen.availHeight); } else if (document.layers || document.getElementById) { if (top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth) { top.window.outerHeight = screen.availHeight; top.window.outerWidth = screen.availWidth; } }}function GetUrl(objSearch) { var search = document.getElementById(objSearch).value; PageMethods.GetUrl(search, GetUrlSucceeded);}function GetUrlSucceeded(result) { window.location = result;}function SaveCustomerCharacteristicSucceeded(result, divEmail) { var newsLetterID = result[0]; var isValid = result[1]; if (isValid) { div = divEmail[0]; email = divEmail[1]; refreshPage = divEmail[2]; redirectPage = divEmail[3]; button = divEmail[4]; var UserInfoEmail = email; if (newsLetterID != '') { __doPostBack('UpdatePanelEmailSubscription', 'Param|' + newsLetterID); } else { if (redirectPage != '') { window.location.href = redirectPage; } else if (refreshPage) { window.location.reload(); } else { ClosePopup(div); //ClearControls(div); } } } else { alert($('topOption_hdnMessageGeneral').value); } button.disabled = false;}function SaveNewsletter(divName, button) { button.disabled = true; var div = document.getElementById(divName); var elements = div.getElementsByTagName("*"); var maxElements = elements.length; var emailComponentID = ''; var newsLetterID = ''; var email = ''; for (var contElements = 0; contElements < maxElements; ++contElements) { var element = elements[contElements]; if (element.type == 'text') { if (element.id == 'Email') { email = element.value; break; } } } if (ValidateEmail(email) == false) { button.disabled = false; return; } else { var divNameButton = new Array(); divNameButton[0] = divName; divNameButton[1] = button; PageMethods.ValidateUserEmail(email, SaveNewsletterSucceeded, onUnSuccessfull, divNameButton); }}function SaveNewsletterSucceeded(result, divNameButton) { if (result == true) { SaveCustomerCharacteristic(divNameButton[0], divNameButton[1]); } else { divNameButton[1].disabled = false; alert($('topOption_hdnUserEmailExistMessage').value); }}function onUnSuccessfull() { window.location = ErrorPage;}function SaveCustomerCharacteristic(divName, button) { if (!button.disabled) { button.disabled = true; } var element; var customerCharacteristic = new Array(); var cont = 0; var name; var value; var div = document.getElementById(divName); var elements = div.getElementsByTagName("*"); var maxElements = elements.length; var emailComponentID = ''; var newsLetterID = ''; var email = ''; var refreshPage = false; var redirectPage = ''; for (var contElements = 0; contElements < maxElements; ++contElements) { var element = elements[contElements]; if (element.tagName == 'DIV' && element.id == 'RedirectPage') { redirectPage = element.firstChild.getAttribute('href'); } switch (element.type) { case 'text': name = element.id; value = element.value; if (name == 'Email') { email = value; if (ValidateEmail(value) == false) { button.disabled = false; return; } } if (ValidateSqlScript(value) == false) { button.disabled = false; return; } customerCharacteristic[cont] = name + '|' + value; cont++; break; case 'select-one': name = element.id; var dropdownIndex = element.selectedIndex; value = element[dropdownIndex].value; customerCharacteristic[cont] = name + '|' + value; cont++; break; case 'select-multiple': for (contOptions = 0; contOptions < element.options.length; contOptions++) { var selectOptions = element.options[contOptions] name = selectOptions.id; value = selectOptions.selected; customerCharacteristic[cont] = name + '|' + value; cont++; } break; case 'checkbox': name = element.id; value = element.checked customerCharacteristic[cont] = name + '|' + value; cont++; break; case 'radio': if (element.checked) { name = element.name; value = element.value customerCharacteristic[cont] = name + '|' + value; cont++; } break; case 'hidden': name = element.id; value = element.value; if (name.indexOf('NewsLetter') != -1 && value != '') { newsLetterID = name customerCharacteristic[cont] = value + '|' + 'True'; cont++; } else if (name == 'RefreshPage') { refreshPage = true; } break; } } var divEmail = new Array(); divEmail[0] = div; divEmail[1] = email; divEmail[2] = refreshPage; divEmail[3] = redirectPage; divEmail[4] = button; PageMethods.SaveExplicitProfileEmailSubscription(customerCharacteristic, newsLetterID, SaveCustomerCharacteristicSucceeded, onUnSuccessfull, divEmail);}function ShowPromotionPopup(divName) { switchEmailBox(true, $(divName));}function LoadPromotionPopup(divName) { switchEmailBox(true, $(divName));}function CallSearchMaximize() { if (document.getElementById("SearchPage")) { MaximizeWindow(); }}function runPromotion() { var scriptField = $("run_script"); if (scriptField) { try { eval(scriptField.value); } catch (e) { if (DEBUG) { alert("You have an error in your promotion script!"); } } }}runPromotion();CallSearchMaximize();//***********// ie6 hover//***********var hovers = $$('.hover');hovers.each(function(i) { if (!i.hasClassName('active')) { Event.observe(i, 'mouseover', function() { i.setStyle({ background: '#fff' }); }); Event.observe(i, 'mouseout', function() { i.setStyle({ background: '#d7ebff' }); }); }})function Age(){var bday=0;var bmo=0;var byr=0;if (document.forms[0].ucemailsignup_ddlDay){ bday = parseInt(document.forms[0].ucemailsignup_ddlDay.value);}else if (document.forms[0].ucrocktheuniversedata_ddlDay){ bday = parseInt(document.forms[0].ucrocktheuniversedata_ddlDay.value);}if (document.forms[0].ucemailsignup_ddlMonth){ bmo=(parseInt(document.forms[0].ucemailsignup_ddlMonth.value)-1);} else if (document.forms[0].ucrocktheuniversedata_ddlMonth){ bmo=(parseInt(document.forms[0].ucrocktheuniversedata_ddlMonth.value)-1);}if (document.forms[0].ucemailsignup_ddlYear){ byr=parseInt(document.forms[0].ucemailsignup_ddlYear.value);}else if (document.forms[0].ucrocktheuniversedata_ddlYear){ byr=parseInt(document.forms[0].ucrocktheuniversedata_ddlYear.value);}var age;var now = new Date();tday=now.getDate();tmo=(now.getMonth());tyr=(now.getFullYear()); if((tmo > bmo)||(tmo==bmo & tday>=bday)) {age=byr;} else {age=byr+1;}var res = tyr-age; return res;}function Gender() { return document.forms[0].ucemailsignup_ddlGender.value;}/** * This class is used to solve the ADA keyboard issue. * We shall use this class to control top menu and left explorer by keyboard * @param {Object} hookKey A hot key that can active the menu */var ADAKeyControl = function(id, hookKey, isRepeat) {this.id = id;this.items = [];this._hotKeys = this._hotKeys.bind(this);this.currentIndex = -1;this.currentSubIndex = -1;this.hookKey = hookKey;this.isRepeat = isRepeat;document.observe("keydown", this._hotKeys);};ADAKeyControl.prototype = { items: null, prevKey: Event.KEY_LEFT, nextKey: Event.KEY_RIGHT, prevSubKey: Event.KEY_UP, nextSubKey: Event.KEY_DOWN, hookKey: null, currentIndex: null, currentSubIndex: null, id: null, isRepeat: null, isEnding: false, /** * The item object is a hash table that includes: * 1. domObj: dom object * 2. activeClass: active css style class (optional) * @param {Object} item */ addItem: function(item) { this.items.push(item); var index = this.items.length - 1; item.domObj = $(item.domObj); anchor = item.domObj; if (anchor != undefined) { if (anchor.tagName.toLowerCase() != "a") { anchor = item.domObj.down("a"); } anchor.observe("focus", function(e) { if (this.isEnding) { this.currentSubIndex = -1; this.currentIndex = -1; ADAKeyControl.currentID = null; this.isEnding = false; } else { item.domObj.addClassName(item.activeClass); if (ADAKeyControl.currentID == this.id) { return; } ADAKeyControl.currentID = this.id; this.currentIndex = index; this.currentSubIndex = -1; // drop down the menu when focus for the first time. this._hotKeys({ stop: Prototype.emptyFunction, keyCode: this.nextSubKey }); } } .bind(this)); anchor.observe("blur", function(e) { item.domObj.removeClassName(item.activeClass); }); if (item.subItems) { item.subItems.each(function(subItem, index) { Event.observe(subItem.domObj, "focus", function(e) { subItem.domObj.addClassName(subItem.activeClass); item.domObj.addClassName(item.activeClass); }); Event.observe(subItem.domObj, "blur", function(e) { subItem.domObj.removeClassName(subItem.activeClass); item.domObj.removeClassName(item.activeClass); }); }); } } }, setItemKey: function(prevItem, nextItem) { this.prevKey = prevItem; this.nextKey = nextItem; }, setSubItemKey: function(prevSubItem, nextSubItem) { this.prevSubKey = prevSubItem; this.nextSubKey = nextSubItem; }, reset: function() { if (this.currentIndex < 0) { return; } var item = this.items[this.currentIndex]; if (this.currentSubIndex >= 0) { this._blurItem(item.subItems[this.currentSubIndex].domObj); item.domObj.popup.hide({ immediately: true, ignoreEvents: true }); this.currentSubIndex = -1; this._focusItem(item.domObj); } else { this._blurItem(item.domObj); this.currentIndex = -1; ADAKeyControl.currentID = null; } }, /** * stop observing event to release memory */ uninstall: function() { Event.stopObserving(document.body, "keydown", this._hotKey); }, _focusItem: function(item) { if (item.tagName.toLowerCase() == "a") { item.focus(); } else { $(item).down("a").focus(); } }, _blurItem: function(item) { if (item.tagName.toLowerCase() == "a") { item.blur(); } else { var anchors = $(item).select("a"); anchors.each(function(anchor, index) { anchor.blur(); }); } }, _showPopup: function(popup) { switch (this.id) { case "exp": if (isMapExpanded) { return; } case "top": default: popup.show({ immediately: true, ignoreEvents: true }); }; }, _hotKeys: function(e) { if (e.altKey && e.keyCode == this.hookKey) { if (this.items.length > 0) { this._focusItem(this.items[0].domObj); this.currentIndex = 0; this.currentSubIndex = -1; ADAKeyControl.currentID = this.id; } } if (this.currentIndex == -1) { return; } if (ADAKeyControl.currentID != this.id) { this.items.each(function(item, index) { if (item.domObj.popup) { item.domObj.popup.hide({ immediately: true, ignoreEvents: true }); } }); this.currentIndex = -1; return; } var item = this.items[this.currentIndex]; // for the users who want to use tab only. var keyCode = e.keyCode; if (keyCode == Event.KEY_TAB) { if (e.shiftKey) { if (this.currentSubIndex !== 0) { keyCode = this.prevSubKey; } else { keyCode = this.prevKey; } } else { if (this.currentSubIndex != item.subItems.length - 1) { keyCode = this.nextSubKey; } else { keyCode = this.nextKey; } } } var expandLogic = function(keyCode) { switch (keyCode) { case this.prevKey: if (item.domObj.popup) { item.domObj.popup.hide({ immediately: true, ignoreEvents: true }); } do { this.currentSubIndex = -1; this.currentIndex--; if (this.currentIndex < 0 && !this.isRepeat) { this.isEnding = true; this._focusItem(item.domObj); return; } else { this.currentIndex = this.currentIndex >= 0 ? this.currentIndex : (this.items.length - 1); } } while (!this.items[this.currentIndex].domObj.visible()); this._focusItem(this.items[this.currentIndex].domObj); item = this.items[this.currentIndex]; expandLogic(this.prevSubKey); break; case this.nextKey: if (item.domObj.popup) { item.domObj.popup.hide({ immediately: true, ignoreEvents: true }); } do { this.currentSubIndex = -1; this.currentIndex++; if (this.currentIndex >= this.items.length && !this.isRepeat) { this.isEnding = true; this._focusItem(item.domObj); return; } else { this.currentIndex %= this.items.length; } } while (!this.items[this.currentIndex].domObj.visible()); this._focusItem(this.items[this.currentIndex].domObj); item = this.items[this.currentIndex]; expandLogic(this.nextSubKey); break; case this.prevSubKey: if (this.currentSubIndex == -1) { if (item.subItems && item.subItems.length > 0) { this._showPopup(item.domObj.popup); this.currentSubIndex = -2; } else { return; } } else { do { this.currentSubIndex = this.currentSubIndex > 0 ? this.currentSubIndex - 1 : item.subItems.length - 1; } while (!item.subItems[this.currentSubIndex].domObj.visible()); this._focusItem(item.subItems[this.currentSubIndex].domObj); } break; case this.nextSubKey: if (this.currentSubIndex == -1) { if (item.subItems && item.subItems.length > 0) { this._showPopup(item.domObj.popup); this.currentSubIndex = -2; } else { return; } } else { if (this.currentSubIndex == -2) { this.currentSubIndex = -1; } do { this.currentSubIndex++; this.currentSubIndex %= item.subItems.length; } while (!item.subItems[this.currentSubIndex].domObj.visible()); this._focusItem(item.subItems[this.currentSubIndex].domObj); } break; case Event.KEY_ESC: this.reset(); break; default: return; } } .bind(this); expandLogic(keyCode); if (e.keyCode == Event.KEY_TAB) { if (e.stop) { e.stop(); } } }};var topADA = new ADAKeyControl("top", 49);function prepareTopMenu() { if (!$("nav")) { return; } var menuList = $("nav").down("ul"); var items = $A(menuList.childNodes); items.each(function(item, i) { if (item.tagName != "LI" && item.tagName != "li") { return; } var subMenu = $(item).down("div.top_nav"); var anchor = $(item).down("a"); var subItems = []; if (subMenu) { var anchors = subMenu.select("a"); anchors.each(function(item, index) { subItems.push({ domObj: item, activeClass: "active" }); }); var popupObj = new Popup(anchor, subMenu, { activeClass: "active", showDelay: 0.2, hideDelay: 0.2, popupContainer: $(document.body), isAlwaysUpdate: true, offset: { x: 0, y: -1 }, anchor: { target: Popup.Anchor.BOTTOM | Popup.Anchor.LEFT } }); anchor.observe("popup:showing", function(event) { var sender = event.element(); var queue = Effect.Queues.get("top_menu" + i); queue.invoke("render", 1.0); queue.invoke("cancel"); event.memo.popup.setOpacity(1); event.memo.popup.down("div").setStyle("bottom: 0"); Effect.SlideDown(event.memo.popup, { duration: 0.3, beforeStart: function() { }, queue: { position: "end", scope: "top_menu" + i } }); event.memo.customEffect = true; }); anchor.observe("popup:hiding", function(event) { topADA.reset(); var sender = event.element(); Effect.Fade(event.memo.popup, { duration: 0.3, queue: { position: "end", scope: "top_menu" + i } }); event.memo.customEffect = true; }); } // organize sub items topADA.addItem({ domObj: anchor, activeClass: "active", subItems: subItems }); });}prepareTopMenu();var GALLERY_COLUMNS = 3;var THUMB_W = 232;var THUMB_H_H = 127;var THUMB_H_V = 259;var THUMB_GAP = 5;var FULL_W_H = 646;var FULL_H_H = 354;var FULL_W_V = 464;var FULL_H_V = 518;var FULL_VIEW_PADDING = {TOP: 40,RIGHT: 30,BOTTOM: 30,LEFT: 30};var ImageGallery = Class.create({container: null,fullView: null,data: null,table: null,currentIndex: -1,initialize: function(container, data){this.container = $(container);this.data = data;this.fullView = this.container.down(".full_view");this.fullView.hide();this.generate(container);},generate: function(cont){this.table = new Element("table");this.container.insert(this.table);this.table.cellSpacing = 0;this.table.cellPadding = 0;this.table.border = 0;var tbody = new Element("tbody");this.table.insert(tbody);var tr = new Element("tr");tbody.insert(tr);for (var i = 0; i < GALLERY_COLUMNS; i++) {var td = new Element("td");tr.insert(td);td.vAlign = "top";td.style.width = THUMB_W + THUMB_GAP + "px";}// attach close eventthis.fullView.down(".close").onclick = function() {this.hideFullView();return false;}.bind(this);// attach previous eventthis.fullView.down(".prev").onclick = function() {this.prev();return false;}.bind(this);// attach next eventthis.fullView.down(".next").onclick = function() {this.next();return false;}.bind(this);// find out the column which has the shortest height,// and put the next image in that columnvar heights = [];for (i = 0; i < GALLERY_COLUMNS; i++) {heights.push(0);}var minIndex, min;this.data.each(function(item, index) {min = heights[0];minIndex = 0;for (i = 0; i < GALLERY_COLUMNS; i++) {if (heights[i] < min) {min = heights[i];minIndex = i;}}heights[minIndex] += (item.direction.toUpperCase() === "HORIZE") ? 1 : 2;item.position = minIndex;// remove thumbnail from original container.// IE require this operation otherwise there will some error.var thumb = item.thumbnail;thumb.remove();thumb.show();// create an anchor element so that the thumbnail can be focused (ADA requirement).var anchor = new Element("a").writeAttribute("href", "#thumbnail_" + index).insert(thumb);tbody.down("td", minIndex).insert(anchor);// create ghost imageitem.ghost = this._cloneThumb(thumb).setStyle("position: absolute");// attach open full view actionanchor.onclick = function() {if (this.currentIndex === -1) {this.showFullView(index);} else {this.go(index);}return false;}.bind(this);}.bind(this));},showFullView: function(index) {var item = this.data[index];// set sizes and positionsvar thumbInfo = this._getThumbInfo(item);var fullInfo = this._getFullInfo(item);// start effectvar morphEffect = new Effect.Morph(item.ghost, {duration: 0.5,style: {top: fullInfo.top + FULL_VIEW_PADDING.TOP + "px",left: fullInfo.left + FULL_VIEW_PADDING.LEFT + "px",width: fullInfo.width + "px",height: fullInfo.height + "px"},queue: {scope: "gallery",limit: 1},beforeSetup: function() {this.currentIndex = index;this.container.insert(item.ghost);// prepare ghostitem.ghost.setStyle({position: "absolute",top: thumbInfo.top + "px",left: thumbInfo.left + "px",width: thumbInfo.width + "px",height: thumbInfo.height + "px"});// prepare full viewthis.fullView.setStyle({top: fullInfo.top + "px",left: fullInfo.left + "px",width: fullInfo.width + "px",height: fullInfo.height + "px"});var fullImgContainer = this.fullView.down(".full_img");this._insertFullImage(fullImgContainer, item, fullInfo);this._setText(item.caption, item.description);}.bind(this),afterFinish: function() {Effect.Appear(this.fullView, {duration: 0.5,queue: {scope: "gallery"},beforeSetup: function() {this.fullView.show();}.bind(this),afterFinish: function() {item.ghost.remove();}});}.bind(this)});},hideFullView: function() {if (this.currentIndex === -1) {return;}var item = this.data[this.currentIndex];var thumbInfo = this._getThumbInfo(item);var fullInfo = this._getFullInfo(item);Effect.Fade(this.fullView, {duration: 0.5,queue: {scope: "gallery",limit: 1},beforeSetup: function() {this.container.insert(item.ghost);// prepare ghostitem.ghost.setStyle({top: fullInfo.top + FULL_VIEW_PADDING.TOP + "px",left: fullInfo.left + FULL_VIEW_PADDING.LEFT + "px",width: fullInfo.width + "px",height: fullInfo.height + "px"});}.bind(this),afterFinish: function() {var morphEffect = new Effect.Morph(item.ghost, {duration: 0.5,queue: {scope: "gallery",limit: 1},style: {top: thumbInfo.top + "px",left: thumbInfo.left + "px",width: thumbInfo.width + "px",height: thumbInfo.height + "px"},afterFinish: function() {this.currentIndex = -1;item.ghost.remove();}.bind(this)});}.bind(this)});},/** * switch to next image */next: function() {var nextIndex = this.currentIndex + 1;nextIndex %= this.data.length;this.go(nextIndex);},/** * switch to previous image */prev: function() {var prevIndex = this.currentIndex - 1;if (prevIndex < 0) {prevIndex += this.data.length;}this.go(prevIndex);},go: function(nextIndex) {if (this.currentIndex === nextIndex) {return;}var item = this.data[this.currentIndex];var nextItem = this.data[nextIndex];var fullImgContainer = this.fullView.down(".full_img");var titleSection = this.fullView.down(".title_section");var parallel = new Effect.Parallel([Effect.Fade(fullImgContainer, {sync: true}),Effect.Fade(titleSection, {sync: true})], {duration: 0.5,queue: {scope: "gallery",limit: 1},beforeSetup: function() {this.currentIndex = nextIndex;}.bind(this),afterFinish: function() {var fullInfo = this._getFullInfo(nextItem);var morph = new Effect.Morph(this.fullView, {duration: 0.5,style: {top: fullInfo.top + "px",left: fullInfo.left + "px",width: fullInfo.width + "px",height: fullInfo.height + "px" },queue: {scope: "gallery",limit: 1},afterFinish: function() {parallel = new Effect.Parallel([Effect.Appear(fullImgContainer),Effect.Appear(titleSection)], {duration: 0.5,queue: {scope: "gallery",limit: 1},beforeSetup: function() {this._insertFullImage(fullImgContainer, nextItem, fullInfo);this._setText(nextItem.caption, nextItem.description);fullImgContainer.show();}.bind(this)});}.bind(this)});}.bind(this)});},_setText: function(caption, desc) {// set caption and descriptionthis.fullView.down(".title").update(caption);//this.fullView.down(".description").update(desc);},/** * insert the full image into full view, and also handle the loading event. * @param {Object} fullImgContainer container of full image */_insertFullImage: function(fullImgContainer, item, fullInfo) {// insert full imagethis.transaction = new Date().getTime();var transaction = this.transaction;var fullImg = new Element("img").observe("load", function() { if (transaction != this.transaction) {return;}fullImgContainer.update(fullImg);}.bind(this));var tempImg = this._cloneThumb(item.ghost).setStyle({width: fullInfo.width + "px",height: fullInfo.height + "px"});fullImgContainer.update(tempImg);fullImg.writeAttribute("src", item.src).writeAttribute("alt", item.alt).setStyle({width: fullInfo.width + "px",height: fullInfo.height + "px"});},_getThumbInfo: function(item) {var info = Object.extend(item.thumbnail.positionedOffset(), item.thumbnail.getDimensions());return info;},/** * get the infomation about full view, width, height, top and left * @param {Object} item * the item whose full view you want to get */_getFullInfo: function(item) {var thumbInfo = this._getThumbInfo(item);var tableInfo = Object.extend(this.table.getDimensions(), this.table.positionedOffset());var containerInfo = this.table.up(".gallery").getDimensions();var info;if (item.direction.toUpperCase() === "HORIZE") {info = {top: thumbInfo.top,left: tableInfo.left,width: FULL_W_H,height: FULL_H_H};} else {info = {top: thumbInfo.top,left: tableInfo.left,width: FULL_W_V,height: FULL_H_V};switch(item.position) {case 0:break;case 1:info.left += (tableInfo.width - info.width - FULL_VIEW_PADDING.LEFT - FULL_VIEW_PADDING.RIGHT - THUMB_GAP) / 2;break;case 2:info.left += tableInfo.width - info.width - FULL_VIEW_PADDING.LEFT - FULL_VIEW_PADDING.RIGHT - THUMB_GAP;break;}}var fullHeight = FULL_VIEW_PADDING.TOP + FULL_VIEW_PADDING.BOTTOM + info.height;var halfHeight = fullHeight / 2;if (thumbInfo.top - (fullHeight - thumbInfo.height) / 2 > tableInfo.top) {info.top = thumbInfo.top - (fullHeight - thumbInfo.height) / 2;} else {info.top = tableInfo.top;}if (info.top + fullHeight > containerInfo.height) {info.top = tableInfo.top + tableInfo.height - fullHeight;}return info;},_cloneThumb: function(img) {return new Element("img").writeAttribute("src", img.src).writeAttribute("alt", img.alt).writeAttribute("width", img.width).writeAttribute("height", img.height);}});var imageGallery;function loadGalleryData(container){var galleryContainer = $(container);if (!galleryContainer) {return;}var dataContainer = galleryContainer.select(".img_item");var data = [];dataContainer.each(function(item, index){var fields = item.select("input[type=hidden]").pluck("value");data.push({thumbnail: item.down(".thumbnail"),caption: fields[0],description: fields[1],alt: fields[2],src: fields[3],direction: fields[4]});item.remove();});imageGallery = new ImageGallery(galleryContainer, data);}var uninstallGallery = null;var uninstallVideos = null;function showVideo(path, alt, container) {$(container).innerHTML = alt;if (!isFlashSupported) {return;}var finalPath = path;var cad = "";cad += "";$(container).innerHTML = cad;}function stopVideo() {$("ContentMovie").innerHTML = "This text will be replaced by the Flash movie.";}function createFlashObjectForInfoPage(pathObj, widthObj, heightObj, showObj) {var _pathObj = pathObj;var _widthObj = widthObj;var _heightObj = heightObj;var _showObj = showObj;if (!isFlashSupported) {return;}if (_showObj == 'yes') {var cad = "";cad += "";$("DivBannerImage").innerHTML = cad;}}var VideoClips = Class.create({data: null,container: null,itemContainer: null,currentIndex: null,itemWidth: 0,totalWidth: 0,visibleItems: 0,playing: null,initialize: function(container, data, visibleItems, itemWidth) {if (data.length === 0) {return;}this.container = $(container);this.data = data;this.currentIndex = 0;this.visibleItems = visibleItems;this.playing = this.data[0];// initialize the css stylesthis.itemWidth = itemWidth;this.totalWidth = this.itemWidth * this.data.length;this.itemContainer = this.container.down("#SlideItMoo_items");this.itemContainer.setStyle({width: this.totalWidth + "px"});// add previous and next button actionvar prev = this.container.down(".SlideItMoo_back");var next = this.container.down(".SlideItMoo_forward");Event.observe(prev, "click", this.previous.bind(this));Event.observe(next, "click", this.next.bind(this));if (visibleItems < this.data.length) {prev.show();next.show();}},previous: function() {var moveEffect = new Effect.Move(this.itemContainer, {mode: "relative",x: this.itemWidth,y: 0,duration: 0.3,beforeSetup: function() {if (this.currentIndex - 1 < 0) {var lastItem = this.data.pop();this.data.unshift(lastItem);lastItem.remove();this.itemContainer.insert({top: lastItem});this.itemContainer.setStyle({left: -this.itemWidth + "px"});} else {this.currentIndex--;}}.bind(this),queue: {scope: "video clips",position: "end"}});},next: function() {var moveEffect = new Effect.Move(this.itemContainer, {mode: "relative",x: -this.itemWidth,y: 0,duration: 0.3,beforeSetup: function() {if (this.currentIndex + this.visibleItems >= this.data.length) {var firstItem = this.data.shift();this.data.push(firstItem);firstItem.remove();this.itemContainer.insert({bottom: firstItem});this.itemContainer.setStyle({left: (this.visibleItems + 1) * this.itemWidth - this.totalWidth + "px"});} else {this.currentIndex++;}}.bind(this),queue: {scope: "video clips",position: "end"}});},play: function() {if (arguments.length !== 0) {this.playing = this.data[arguments[0]];}this.playing.down("img").onclick();},stop: function() {stopVideo();}});function loadVideoData() {var videoContainer = $("SlideItMoo_outer");if (!videoContainer) {return;}var data = videoContainer.select(".SlideItMoo_element");videoClips = new VideoClips(videoContainer, data, 3, 180);}var QUOTE_PADDING_TOP = 5;var QUOTE_PADDING_LEFT = 5;/** * Quote class. Display different quotes frame by frame.
* Quote is designed to be capable to be paused or resumed although we don't use this feature now. * And also you can manually add a piece of HTML as a quote frame. * These two features are designed but never used, so it might not be working properly. * @param container Container that contains different quote frames. * @return void */var Quote = function Quote(container) {this.container = $(container);this.size = this.container.getDimensions();this.count = this.container.select(".quote_item").length;this.currentIndex = 0;this.lastIndex = this.count - 1;if (this.lastIndex <= 0) {if (this.lastIndex === 0) {this.container.down(".quote_item").show();} else {// If there's no quote, the quote component will still be there.// To make it look better we need to adjust the quote title.this.container.hide();var title = this.container.previous("h2");title.setStyle({padding: "30px 20px",position: "static",width: "auto"});}return;}this._work();};Quote.prototype = {container: null,handler: null,count: null,lastIndex: null,currentIndex: null,size: null,/** * Append one piece of HTML as a quote frame. * @param html HTML code. * @param interval How long will the quote frame last. In milliseconds. * @return void */appendData: function(html, interval) {var div = new Element("div");div.setStyle({top: QUOTE_PADDING_TOP + "px",left: QUOTE_PADDING_LEFT + "px",width: this.size.width - QUOTE_PADDING_LEFT * 2 + "px",height: this.size.height - QUOTE_PADDING_TOP * 2 + "px",opacity: 0});div.addClassName("quote_item");div.update(html);var hidden = new Element("input");hidden.type = "hidden";hidden.value = interval;div.appendChild(hidden);this.container.appendChild(div);this.count++;this.lastIndex = this.count - 1;},/** * Remove one quote frame from stack. * @param index The index of the frame you want to remove. * @return void */removeData: function(index) {this.container.down(".quote_item").remove();this.count--;},/** * Pause the quote. * @return void */pause: function() {window.clearTimeout(this.handler);},/** * Resume paused quote. * @return void */resume: function() {this._work();},/** * Stop the quote and release all resources. * @return void */uninstall: function() {this.pause();if (this.effect) {this.effect.cancel();}},/** * Start the quote animation. * @return void */_work : function() {var currentDiv = this.container.down(".quote_item", this.currentIndex);var lastDiv = this.container.down(".quote_item", this.lastIndex);this.lastIndex = this.currentIndex++;this.currentIndex %= this.count;this.effect = new Effect.Parallel( [ Effect.Fade(lastDiv, {sync : true}), new Effect.Opacity(currentDiv, {from : 0,to : Prototype.Browser.IE ? 0.99 : 1,sync : true}) ], {beforeSetup : function() {currentDiv.show();},afterFinish : function() {this.effect = null;var duration = currentDiv.down("input[type=hidden]").value;this.handler = window.setTimeout(this._work.bind(this),duration == "" ? 3000 : (duration * 1));}.bind(this)});}};var quote;/** * Load the quote data and create the quote object. * @return void */function loadQuote() {var container = $(document.body).down(".quote");if (container) {quote = new Quote(container);}}/** * Uninstall quote. * @return void */function uninstallQuote() {if (quote) {quote.uninstall();}} loadQuote();var PLAYLIST_SOURCE = "/Favorite.ashx?r=";var TOTAL_PLAYLIST_ITEMS = 11;if (DEBUG) { TOTAL_PLAYLIST_ITEMS = 11;}var ITEM_WIDTH = 61;var playlist = null;var Playlist = function() {};Playlist.prototype = { items: null, scrolled: 0, load: function(onSuccess, onFailed) { var init = function() { this.favorite = $("favorite"); if (this.favorite) { this.scrolled = 0; // scroll buttons var container = this.favorite.up(".map_item_list"); var prev = container.down("a.backward"); var next = container.down("a.forward"); Event.observe(prev, "click", this.previous.bind(this)); Event.observe(next, "click", this.next.bind(this)); container = this.favorite.up(".favorite_container"); container.setStyle("width: " + ITEM_WIDTH* TOTAL_PLAYLIST_ITEMS + "px"); this.items.each(function(item, index) { var container = new Element("li"); this.favorite.insert(container); this.renderItem(container, item); } .bind(this)); this._fillEmpty(); } if (onSuccess) { onSuccess(); } } .bind(this); if (this.items) { init(); } else { var request = new Ajax.Request(PLAYLIST_SOURCE + new Date().getTime(), { method: "get", evalJSON: true, onSuccess: function(response) { this.items = response.responseJSON; init(); } .bind(this), onFailure: function(response) { if (onFailure) { onFailure(); } // TODO: error handling if (DEBUG && enableConsole) { console.log("failed to load data, please try again later."); } } }); } }, renderItem: function(container, itemID) { var params = { level: 5, id: itemID, pageUri: pageUri }; var request = new Ajax.Request(getSingleAttSource(params), { method: "get", onSuccess: function(response) { container.update(response.responseText); var popup = container.down("div", 1); var popupObj = new Popup(container.down("img"), popup, { showDelay: 0.1, hideDelay: 0.1, popupContainer: $(document.body), isAlwaysUpdate: true, anchor: { target: Popup.Anchor.H_CENTER | Popup.Anchor.BOTTOM, popup: Popup.Anchor.H_CENTER | Popup.Anchor.TOP }, offset: { x: 4 } }); var flag = true; Event.observe(container, "popup:showing", function(event) { if (isMapExpanded && parkMap.isInMap(itemID)&& parkMap.showPopup(itemID)) { flag = false; } else { Effect.Appear(event.memo.popup, { duration: 0.2, queue: { scope: "playlist" + $("favorite").select("li").indexOf(container), position: "end" } }); var imageContainer = popup.down(".block_one_img"); var image = imageContainer.down("img"); if (image.alt !== "") { var img = new Element("img"); img.onload = function() { imageContainer.update(img); }; img.src = image.alt; image.alt = ""; } } event.memo.customEffect = true; }); Event.observe(container, "popup:hiding", function(event) { if (!flag) { parkMap.hidePopup(itemID); flag = true; } else { Effect.Fade(event.memo.popup, { duration: 0.2, queue: { scope: "playlist" + $("favorite").select("li").indexOf(container), position: "end" } }); } event.memo.customEffect = true; }); var title = popup.down(".block_one_title"); var add = popup.down(".add"); var remove = popup.down(".remove"); var operating = popup.down(".operating"); add.onclick = function() { addRemove(true, itemID, title.innerHTML); return false; }; remove.onclick = function() { addRemove(false, itemID, title.innerHTML); return false; }; // register add/remove event to manager favManager.add2Queue({ update: commonUpdate, data: { type: "playlist", id: itemID, add: add, remove: remove, operating: operating } }); // show/hide add favorite button according to the favorite list if (playlist.isInPlaylist(itemID)) { add.hide(); remove.show(); } else { add.show(); remove.hide(); } if (this.items.length > 0) { if ($('mapControl_hdnIsGuest').value == "Y") { $('mapControl_SaveMapDiv').show(); } else { $('mapControl_SaveMapDiv').hide(); } $('PrintMapDiv').show(); } else { $('mapControl_SaveMapDiv').hide(); $('PrintMapDiv').hide(); } } .bind(this), onFailure: function(response) { // TODO: error handling if (DEBUG && enableConsole) { console.log("failed to load data, please try again later."); } } }); }, addItem: function(itemID) { if (this.items.include(itemID)) { var message = $("topOption_hdnItemExistMessage"); if (message && enableConsole) { console.log(message.value); } return; } else { this.items.push(itemID); } if (this.favorite) { var container; if (this.items.length > TOTAL_PLAYLIST_ITEMS) { container = new Element("li"); this.favorite.insert(container); } else { container = this.favorite.down("li", this.items.length - 1); } container.update('

Universal Studios Florida - Parque Temático (1)

'); this.renderItem(container, itemID); this._fillEmpty(); var ids = $A([itemID]); if (parkMap) { parkMap.reloadFeatures(true, ids); } if (miniMap) { miniMap.reloadFeatures(true, ids); } if (this.items.length > 0) { if ($('mapControl_hdnIsGuest').value == "Y") { $('mapControl_SaveMapDiv').show(); } else { $('mapControl_SaveMapDiv').hide(); } $('PrintMapDiv').show(); } else { $('mapControl_SaveMapDiv').hide(); $('PrintMapDiv').hide(); } // expand the map automatically var expand = $("map").down(".mapfavorites").down("a.expand"); if (expand.style.display != "none") { expand.onclick(); } } }, removeItem: function(itemID) { this.items = this.items.without(itemID); if (this.scrolled + TOTAL_PLAYLIST_ITEMS > this.items.length) { this.scrolled--; if (this.scrolled < 0) { this.scrolled = 0; } } if (this.favorite) { var targetItem = this.favorite.down("input[value=" + itemID + "]"); if (targetItem) { var container = targetItem.up("li"); var img = container.down("img"); if (img && img.popup) { img.popup.unload(); } container.remove(); } this._fillEmpty(); var ids = $A([itemID]); if (parkMap) { parkMap.reloadFeatures(false, ids); } if (miniMap) { miniMap.reloadFeatures(false, ids); } favManager.removeFromQueue({ type: "playlist", id: itemID }); if (this.items.length > 0) { if ($('mapControl_hdnIsGuest').value == "Y") { $('mapControl_SaveMapDiv').show(); } else { $('mapControl_SaveMapDiv').hide(); } $('PrintMapDiv').show(); } else { $('mapControl_SaveMapDiv').hide(); $('PrintMapDiv').hide(); } } }, isInPlaylist: function(id) { return this.items.include(id); }, previous: function() { var container = this.favorite.up(".map_item_list"); var backward = container.down("a.backward"); var forward = container.down("a.forward"); if (this.scrolled <= 0) { return; } else { var move = new Effect.Move(this.favorite, { mode: "relative", duration: 0.3, x: ITEM_WIDTH, queue: { scope: "favorite", position: "end", limit: 1 }, beforeSetup: function() { forward.show(); this.scrolled--; if (this.scrolled <= 0) { backward.hide(); } } .bind(this) }); } }, next: function() { var container = this.favorite.up(".map_item_list"); var backward = container.down("a.backward"); var forward = container.down("a.forward"); if (this.scrolled + TOTAL_PLAYLIST_ITEMS >= this.items.length) { return; } else { var move = new Effect.Move(this.favorite,{ mode: "relative", duration: 0.3, x: -ITEM_WIDTH, queue: { scope: "favorite", position: "end", limit: 1 }, beforeSetup: function() { backward.show(); this.scrolled++; if (this.scrolled + TOTAL_PLAYLIST_ITEMS >= this.items.length) { forward.hide(); } } .bind(this)}); } }, getItems: function() { return this.items.clone(); }, uninstall: function() { if (this.favorite) { var containers = this.favorite.select("li"); var ids = this.favorite.select("input[type=hidden]").pluck("value"); var popups = this.favorite.select("img").pluck("popup").compact(); popups.invoke("unload"); ids.each(function(item, index) { favManager.removeFromQueue({ type: "playlist", id: item }); }); } }, _fillEmpty: function() { var count = this.favorite.select("li").length; for (var i = count; i < TOTAL_PLAYLIST_ITEMS; i++) { this.favorite.insert(new Element("li")); } var container = this.favorite.up(".map_item_list"); var backward = container.down("a.backward"); var forward = container.down("a.forward"); if (this.items.length > TOTAL_PLAYLIST_ITEMS) { backward.show(); forward.show(); } else { backward.hide(); forward.hide(); } if (this.scrolled === 0) { backward.hide(); } else if (this.scrolled + TOTAL_PLAYLIST_ITEMS == this.items.length) { forward.hide(); } // update width this.favorite.setStyle({ width: +ITEM_WIDTH * [this.items.length, TOTAL_PLAYLIST_ITEMS].max()+ "px", left: -this.scrolled * ITEM_WIDTH + "px" }); }};var MAP_SOURCE = "/Map.ashx";var ATT_SOURCE = "/Attractions.ashx";var SINGLE_ATT_SOURCE = "/Feature.ashx";var MAP_FOLDER_BASE = "/images/maps/";var MAP_FOLDER_PREFIX = "level_";var MAP_TILE_PREFIX = "";var GLASS_WALL = "glass_wall.gif";var NAMESPACE = "http://www.universalorlando.com";var POPUP_BASE = "/XML/Features/";var POPUP_XSLT = "popup.xml";var POPUPS_XSLT = "features.xml";var PRELOAD_TILES = 1;var MOVABLE_LEVEL = 2;/*** Get map source. This is a wrap method in case we may use other way to* load the map XML.*/function getMapSource(params) { return MAP_SOURCE + "?" + $H(params).toQueryString() + "&r=" + new Date().getTime();}/*** Get attraction source. This is a wrap method in case we may use other* way to load the attraction XML.*/function getAttractionSource(params) { return ATT_SOURCE + "?" + $H(params).toQueryString() + "&r=" + new Date().getTime();}/*** Get single attraction source. This is a wrap method in case we may use other* way to load the single attraction XML* @param {Object} params*/function getSingleAttSource(params) { return SINGLE_ATT_SOURCE + "?" + $H(params).toQueryString() + "&r=" + new Date().getTime();}/*** Main map class. All operations are programmed here.* @param {Element} container A container to display the map*/var Map = function(containerId, level, topLeft, options) { if (!$(containerId)) { return; } // check options if (options === null) { options = {}; } if (options.dragable == null) { options.dragable = true; } if (options.zoomable == null) { options.zoomable = true; } if (options.showPopup == null) { options.showPopup = true; } if (options.miniMode == null) { options.miniMode = false; } this.options = options; // some initialization work this.resources = new Hash(); this.attractions = new Hash(); this.mapContainer = $(containerId); this.size = this.mapContainer.getDimensions(); this._switchCover(true); this.events = {}; this.mapReady = false; // set some attributes for map container this.mapContainer.addClassName("map_container"); // init tile container this._initTileContainer(); // begin to load map data this.observe(Map.Events.MAP_READY, function() { this.mapReady = true; this.tileContainer.setStyle({ width: this.currentMap.width + "px", height: this.currentMap.height + "px" }); this._calDestPos(this.range); this._clearPins(); this.tileContainer.update(); this.tileContainer.setStyle({ left: -this.range.left + this.offset.x + "px", top: -this.range.top + this.offset.y + "px" }); this._fillTiles(); // load attraction data this._loadAtt(); } .bind(this)); this.observe(Map.Events.RESOURCES_READY, function() { // load map data this._loadMap(); } .bind(this)); this.firstMove = true; this.observe(Map.Events.ATT_READY, function() { this._fillAttractions(); this.markAllItems(); if (this.firstMove) { this.firstMove = false; this.move2Attraction(this._getCurrentItem()); } } .bind(this)); this.observe(Map.Events.REQUESTING, function(e) { } .bind(this)); this.observe(Map.Events.READY, function() { this._switchCover(false); } .bind(this)); this.observe(Map.Events.ERROR, function() { if (DEBUG && enableConsole) { console.log("Failed to connect to server."); } this._switchCover(false); } .bind(this)); this._load(level, topLeft); // init zoom bar this._initZoomBar(); // initialize sliders for favorites and legend this._initSliders();};Map.prototype = { mapContainer: null, tileContainer: null, cover: null, currentMap: null, attractions: null, icons: null, events: null, readyFlag: null, level: null, range: null, size: null, options: null, dragController: null, currentAttraction: null, offset: null, resources: null, mapReady: false, /** * public * Observe the specified event. Use this function to observe all kinds of events. * @param {string} targetEvent It can be following values * initialized: the map is ready to run. Fires when the map finishes initializing a level * requesting: the map is about to request data from server * ready: the map has finished loading data from server. * moving: the user or the system is trying to move the map * moved: the map is moved by the user or the system. * @param {function} handler Event handler. */ observe: function(targetEvent, handler) { if (!this.events[targetEvent]) { this.events[targetEvent] = $A([]); } this.events[targetEvent].push(handler); }, /** * @public * @param level The level you want to load. * @param mapCenter Optional. Map center. If not defined, current center will be used * @return */ load: function(level, mapCenter) { var srcLevel = this.level; var dstLevel = level; this.zoomIn.show(); this.zoomOut.show(); if (dstLevel == 1) { this.zoomOut.hide(); } else if (dstLevel == 5) { this.zoomIn.hide(); } var scales = this.currentMap.scale; // level is based on 1, while scale array is based on 0 var scale = scales[dstLevel - 1] / scales[srcLevel - 1]; var center = mapCenter || { x: (this.range.right + this.range.left) / 2, y: (this.range.top + this.range.bottom) / 2 }; center.x *= scale; center.y *= scale; var topLeft = { left: Math.round(center.x - this.size.width / 2), top: Math.round(center.y - this.size.height / 2) }; this._load(dstLevel, topLeft); }, /** * private * Load map by specified parameters. * @param {int} level Target level * @param {object} range Map range */ _load: function(level, topLeft) { this.level = level; this.range = topLeft; this.range.bottom = topLeft.top + this.size.height; this.range.right = topLeft.left + this.size.width; // load resources this._loadResources(); }, /** * Reload features. This method is optimized. It will check the action you need, * and try not to connect to server for new data. However, sometimes we have no * choice but going back to server for data. * @param {Boolean} isAdd true for add, false for remove * @param {Array} the item IDs that you want to operate. */ reloadFeatures: function(isAdd, ids) { if (!this.mapReady) { return; } if (isAdd) { var remained = ids.reject(function(id) { return this.attractions.get(id) != null; } .bind(this)); if (remained.length !== 0) { this._loadAtt(true); } else { this.markAllItems(); } } else { //var expItems = this._getExplorerItems(); //var favItems = this._getFavoriteItems(); //var allItems = expItems.concat(favItems) //.concat([this._getCurrentItem()]) //.uniq(); //var remained = ids.reject(function(id) { //return allItems.include(id); //}); //this._removeFeatures(remained); //this.markAllItems(); this._loadAtt(true); } }, /** * public * Enable or disable drag & drop. * @param {Object} isEnabled True for enable */ enableDrag: function(isEnabled) { if (isEnabled) { if (!this.dragController) { this.dragController = new Draggable(this.tileContainer, { starteffect: null, endeffect: null, onStart: function(sender, event) { this.startPosition = { x: event.pointerX(), y: event.pointerY() }; this._fire(Map.Events.BEFORE_MOVING, { event: Map.Events.BEFORE_MOVING, e: event }); } .bind(this), onDrag: function(sender, event) { this._fire(Map.Events.MOVING, { event: Map.Events.MOVING, e: event }); } .bind(this), onEnd: function(sender, event) { var movedDistance = { w: event.pointerX() - this.startPosition.x, h: event.pointerY() - this.startPosition.y }; this.range.left -= movedDistance.w; this.range.right -= movedDistance.w; this.range.top -= movedDistance.h; this.range.bottom -= movedDistance.h; this._calDestPos(this.range); this._adjustTilesAtts(); this._fillTiles(); this._loadAtt(); this.startPosition = null; this._fire(Map.Events.MOVED, { event: Map.Events.MOVED, e: event }); } .bind(this) }); } } else { if (this.dragController !== null) { this.dragController.destroy(); this.dragController = null; } } }, /** * public * Move the map center to a certain attraction (feature). * If the attraction is on a edge of the map, it can not be centered. * @param {Object} itemID attraction ID * @param {Object} anchor the element whose popup you want to hide before moving the map. */ move2Attraction: function(itemID, anchor) { var att = this.attractions.get(itemID); if (att == null) { if (DEBUG && enableConsole) { console.log("The feature with ID %s is missing!", itemID); } return; } if (this.level < MOVABLE_LEVEL && !this.options.miniMode) { return; } var range = { left: Math.round(att.icon.position.x - this.size.width / 2), top: Math.round(att.icon.position.y - this.size.height / 2), right: Math.round(att.icon.position.x + this.size.width / 2), bottom: Math.round(att.icon.position.y + this.size.height / 2) }; this._calDestPos(range); var moveEffect = new Effect.Move(this.tileContainer, { mode: "absolute", x: -range.left, y: -range.top, queue: { scope: "map", position: "end" }, beforeStart: function() { // comment this function if you want the movements to be in a queue var queue = Effect.Queues.get('map'); queue.invoke("cancel"); }, beforeSetup: function() { if (anchor && anchor.popup) { anchor.popup.hide({ immediately: true }); } this.isMoving = true; this._fire(Map.Events.BEFORE_MOVING, { event: Map.Events.BEFORE_MOVING }); this._fire(Map.Events.MOVING, { event: Map.Events.MOVING }); } .bind(this), afterFinish: function() { this.isMoving = false; if (this.range.top != range.top ||this.range.left != range.left ||this.range.bottom != range.bottom ||this.range.right != range.right) { this.range = range; this._adjustTilesAtts(); this._fillTiles(); this._loadAtt(); this._fire(Map.Events.MOVED, { event: Map.Events.MOVED }); } //if (anchor && anchor.popup) { //anchor.popup.show({ //immediately: true //}); //} //this.showPopup(itemID); } .bind(this) }); }, /** * public * mark explorer items in the map */ markExplorerItems: function() { var items = this._getExplorerItems(); items.each(function(item, index) { this.setIcon(item, Map.Pins.EXPLORER); } .bind(this)); }, /** * public * mark current selected item in the map */ markCurrentItem: function() { this.setIcon(this._getCurrentItem(), Map.Pins.SELECTED); }, /** * public * mark the favorite item in the map */ markFavoriteItems: function() { var items = this._getFavoriteItems(); items.each(function(item, index) { this.setIcon(item, Map.Pins.FAVORITE); } .bind(this)); }, /** * public * mark all items in map */ markAllItems: function() { this.markExplorerItems(); this.markFavoriteItems(); this.markCurrentItem(); }, setIcon: function(itemID, iconID) { var item = this.attractions.get(itemID); if (item && item.pinIcon) { item.pinIcon.src = this.icons.get(iconID).image; } }, showPopup: function(itemID) { var id = "pin_" + this.level + "_" + itemID.replace(/\:/g, "_").replace(/\-/g, "_"); var pin = this.tileContainer.down("." + id); if (pin && pin.popup && !this.isMoving) { pin.popup.show({ immediately: false }); return true; } else { return false; } }, hidePopup: function(itemID) { var id = "pin_" + this.level + "_" + itemID.replace(/\:/g, "_").replace(/\-/g, "_"); var pin = this.tileContainer.down("." + id); if (pin && pin.popup && !this.isMoving) { pin.popup.hide({ immediately: false }); return true; } else { return false; } }, isInMap: function(itemID) { var id = "pin_" + this.level + "_" + itemID.replace(/\:/g, "_").replace(/\-/g, "_"); var att = this.attractions.get(itemID); return att && this._checkPosition(att.icon.position, this.range); }, isMapMoving: function() { return this.isMoving; }, pushDownZoomBar: function(height) { var moveEffect = new Effect.Move(this.zoomBar, { mode: "relative", x: 0, y: height, duration: 0.5, queue: { scope: "zoom bar", position: "end" } }); }, uninstall: function() { this._clearPins(); }, _getExplorerItems: function() { var result = []; if (expManager.getExplorer) { var exp = expManager.getExplorer(); var items = exp.getItems(Explorer.ITEM_TYPE.ITEM); items.each(function(item, index) { result.push(item.contentID); }); } return result; }, _getCurrentItem: function() { if (expManager.getContent) { return expManager.getContent(); } else { return $("ComponentID").value; } }, _getFavoriteItems: function() { return playlist.getItems(); }, /** * remove all pins */ _clearPins: function() { this._removeFeatures(this.attractions.values().pluck("id")); }, /** * Call this method to remove IDs from both inner collection and page * This function will always remove the IDs given, no matter * it should be in the page or not. * @param {Array} ids */ _removeFeatures: function(ids) { var icons = this.attractions.values().select(function(item) { return ids.include(item.id); }).pluck("pinIcon").compact(); var popup = icons.pluck("popup").compact(); popup.invoke("unload"); icons.invoke("remove"); ids.each(function(id) { this.attractions.unset(id); if (!this.options.miniMode) { favManager.removeFromQueue({ type: "map", id: id }); } } .bind(this)); }, /** * Check whether a point is inside a range * @param {Object} coor coordinates of the point * @param {Object} range range coorindates */ _checkPosition: function(coor, range) { return coor.x < range.right && coor.x > range.left &&coor.y < range.bottom && coor.y > range.top; }, /** * Adjust the range to prevent the map from being moved outside * @param {Object} range destination range */ _calDestPos: function(range) { if (range.left < 0) { range.left = 0; } range.right = range.left + this.size.width; if (range.top < 0) { range.top = 0; } range.bottom = range.top + this.size.height; if (range.right > this.currentMap.width) { range.right = this.currentMap.width; range.left = range.right - this.size.width; } if (range.bottom > this.currentMap.height) { range.bottom = this.currentMap.height; range.top = range.bottom - this.size.height; } // for the situation when the map is smaller than the viewport // for example leve 1 if (this.currentMap.width < this.size.width) { range.left = 0; range.right = this.currentMap.width; } if (this.currentMap.height < this.size.height) { range.top = 0; range.bottom = this.currentMap.height; } }, /** * private * Adjust map tileContainer position. * @param {Object} distance The distance that the user has moved. */ _adjustTilesAtts: function() { // move the tile container back to its original position. this.tileContainer.style.left = -this.range.left + "px"; this.tileContainer.style.top = -this.range.top + "px"; }, /** * private * Fill attraction icons into the map. */ _fillAttractions: function() { var currentItemData = this.attractions.get(this._getCurrentItem()); var atts = this.options.miniMode ? (currentItemData ? [currentItemData] : []) :this.attractions.values(); var currentItem = this._getCurrentItem(); atts.each(function(att, i) { /*if (att.schema == "Venue") { return; }*/ if (att.pinIcon) { return; } var id = "pin_" + this.level + "_" + att.id.replace(/\:/g, "_").replace(/\-/g, "_"); var pin = new Element("img"); pin.alt = "pin"; pin.addClassName("pin"); pin.addClassName(id); pin.src = att.icon.ref.image; if (isIE6) { pin.addClassName("png"); } pin.attId = att.id; pin.setStyle({ top: att.icon.position.y + att.icon.ref.offset.y + "px", left: att.icon.position.x + att.icon.ref.offset.x + "px" }); att.pinIcon = pin; this.tileContainer.insert(pin); // prepare popup windows if (this.options.showPopup) { var popupField = this.popupContainer.down("input[value=" + att.id + "]"); var popup = popupField.up(); var add = popup.down(".add"); var remove = popup.down(".remove"); if (!this.options.miniMode) { // register add/remove favorite event to the manager var operating = popup.down(".operating"); favManager.add2Queue({ update: commonUpdate, data: { type: "map", id: att.id, add: add, remove: remove, operating: operating } }); // add the add/remove favorite event var title = popup.down(".block_one_title"); Event.observe(add, "click", function() { addRemove(true, att.id, title.innerHTML); return false; }); Event.observe(remove, "click", function() { addRemove(false, att.id, title.innerHTML); return false; }); // show/hide add favorite button according to the favorite list if (playlist.isInPlaylist(att.id)) { add.hide(); remove.show(); } else { add.show(); remove.hide(); } } var popupObj = new Popup(pin, popup, { anchor: { popup: Popup.Anchor.BOTTOM | Popup.Anchor.H_CENTER, target: Popup.Anchor.TOP | Popup.Anchor.H_CENTER }, popupContainer: $(document.body), showDelay: 0.2, hideDelay: 0.2, isAlwaysUpdate: true }); Event.observe(pin, "popup:showing", function(event) { var _offScrollTop; var _topResult; Effect.Appear(event.memo.popup, { duration: 0.2, queue: { scope: "map-popup", position: "end" }, beforeStart: function() { var _offsetTop = event.memo.popup.style.top; var _offsetLeft = event.memo.popup.style.left; var lenOffsetTop = event.memo.popup.style.top.length; var lenOffsetLeft = event.memo.popup.style.left.length; _offScrollTop = document.body.scrollTop; if (_offScrollTop == 0) { if (window.pageYOffset) _offScrollTop = window.pageYOffset; else _offScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0; } var newOffsetTop = parseInt(event.memo.popup.style.top.substring(0, lenOffsetTop - 2)); var newOffsetLeft = parseInt(event.memo.popup.style.left.substring(0, lenOffsetLeft - 2)); var _heightPopup = event.memo.popup.style.height; var lenHeightPopup = event.memo.popup.style.height.length; var newHeightPopup = parseInt(event.memo.popup.style.height.substring(0, lenHeightPopup - 2)); var _widthPopup = event.memo.popup.style.width; var lenWidthPopup = event.memo.popup.style.width.length; var newWidthPopup = parseInt(event.memo.popup.style.height.substring(0, lenWidthPopup - 2)); _topResult = newOffsetTop; //if(newOffsetTop < 0) if ((_offScrollTop - newOffsetTop) >= 0) { event.memo.popup.setStyle({ top: newHeightPopup + newOffsetTop + "px" }); var objTopTipHeader = event.memo.popup.select(".toptip_header"); if (objTopTipHeader[0] != undefined) { objTopTipHeader[0].removeClassName("toptip_header"); objTopTipHeader[0].addClassName("map_toptip_footer_up"); } var objTopTipFooter = event.memo.popup.select(".map_toptip_footer"); if (objTopTipFooter[0] != undefined) { objTopTipFooter[0].removeClassName("map_toptip_footer"); objTopTipFooter[0].addClassName("map_toptip_footer_dis"); } } else { var objTopTipHeader = event.memo.popup.select(".map_toptip_footer_up"); if (objTopTipHeader[0] != undefined) { objTopTipHeader[0].removeClassName("map_toptip_footer_up"); objTopTipHeader[0].addClassName("toptip_header"); } var objTopTipFooter = event.memo.popup.select(".map_toptip_footer_dis"); if (objTopTipFooter[0] != undefined) { objTopTipFooter[0].removeClassName("map_toptip_footer_dis"); objTopTipFooter[0].addClassName("map_toptip_footer"); } } }, afterFinish: function() { // shitty solution for shitty IE if (Prototype.Browser.IE) { if (!add.visible()) { add.show(); add.hide(); } else { remove.show(); remove.hide(); } } } }); var imageContainer = popup.down(".block_one_img"); var image = imageContainer.down("img"); if (image.alt !== "") { var img = new Element("img"); img.onload = function() { imageContainer.update(img); }; img.src = image.alt; image.alt = ""; } event.memo.customEffect = true; }); Event.observe(pin, "popup:hiding", function(event) { Effect.Fade(event.memo.popup, { duration: 0.2, queue: { scope: "map-popup", position: "end" } }); event.memo.customEffect = true; }); } } .bind(this)); }, /** * Fill new tiles into the view port. It will check the tile IDs. * Tiles that have already in the container will not be filled again. * @param {Object} range The range that user is reviewing. */ _fillTiles: function() { var tileWidth = this.currentMap.tile.width; var tileHeight = this.currentMap.tile.height; var startIndexX = Math.floor(this.range.left / tileWidth) - PRELOAD_TILES; var startIndexY = Math.floor(this.range.top / tileHeight) - PRELOAD_TILES; startIndexX = startIndexX < 0 ? 0 : startIndexX; startIndexY = startIndexY < 0 ? 0 : startIndexY; var tileStartX = startIndexX * tileWidth; var tileStartY = startIndexY * tileHeight; var tileEndX = this.range.right + PRELOAD_TILES * tileWidth; var tileEndY = this.range.bottom + PRELOAD_TILES * tileHeight; var allTiles = []; for (var tilePosX = tileStartX, indexX = startIndexX;tilePosX < tileEndX && tilePosX < this.currentMap.width;indexX++, tilePosX += tileWidth) { for (var tilePosY = tileStartY, indexY = startIndexY;tilePosY < tileEndY && tilePosY < this.currentMap.height;indexY++, tilePosY += tileHeight) { var id = "t_" + this.currentMap.level + "_" + indexX + "_" + indexY; allTiles.push(id); // check if it's already existing. if (this.tileContainer.down("." + id) ||indexX < 0 || indexY < 0) { continue; } var tile = new Element("img"); tile.addClassName("tile"); tile.addClassName(id); tile.src = MAP_FOLDER_BASE + MAP_FOLDER_PREFIX + this.currentMap.level + "/" +MAP_TILE_PREFIX + this.currentMap.level +"_" + (this.currentMap.width + indexX) +"_" + (this.currentMap.height + indexY) + ".jpg"; tile.setStyle({ top: tilePosY + "px", left: tilePosX + "px" }); this.tileContainer.insert(tile); } } }, _initZoomBar: function() { if (!this.options.zoomable) { return; } this.zoomBar = new Element("div"); this.zoomBar.addClassName("zoom_bar"); this.zoomBar.setStyle({ top: "97px", left: "10px" }); this.mapContainer.insert(this.zoomBar); this.zoomBar.update("

"); this.zoomIn = this.zoomBar.down(".zoom_in").down("a"); this.zoomOut = this.zoomBar.down(".zoom_out").down("a"); if (this.level == 1) { this.zoomOut.hide(); } if (this.level == 5) { this.zoomIn.hide(); } Event.observe(this.zoomIn, "click", function(e) { this.load(this.level + 1); Event.stop(e); } .bind(this)); Event.observe(this.zoomOut, "click", function(e) { this.load(this.level - 1); Event.stop(e); } .bind(this)); }, _initSliders: function() { if (!this.options.miniMode) { var controlContainer = $("map"); var legend = controlContainer.down(".maplegend"); var expand = legend.down("a.expand"); var fold = legend.down("a.fold"); Event.observe(expand, "click", function() { var controlContainer = $("map"); var legend = controlContainer.down(".maplegend"); var expand = legend.down("a.expand"); var fold = legend.down("a.fold"); var panel = legend.down(".legendli"); var morphEffect = new Effect.Morph(panel, { style: "height: 41px", duration: 0.5 }); expand.hide(); fold.show(); }); Event.observe(fold, "click", function() { var controlContainer = $("map"); var legend = controlContainer.down(".maplegend"); var expand = legend.down("a.expand"); var fold = legend.down("a.fold"); var panel = legend.down(".legendli"); morphEffect = new Effect.Morph(panel, { style: "height: 0px", duration: 0.5 }); expand.show(); fold.hide(); }); var favorites = controlContainer.down(".mapfavorites"); expand = favorites.down("a.expand"); fold = favorites.down("a.fold"); expand.onclick = function() { var favorites = controlContainer.down(".mapfavorites"); var expand = favorites.down("a.expand"); var fold = favorites.down("a.fold"); var panel = favorites.down(".map_item_list"); morephEffect = new Effect.Morph(panel, { style: "height: 77px", duration: 0.5 }); this.pushDownZoomBar(77); expand.hide(); fold.show(); } .bind(this); fold.onclick = function() { var favorites = controlContainer.down(".mapfavorites"); var expand = favorites.down("a.expand"); var fold = favorites.down("a.fold"); var panel = favorites.down(".map_item_list"); morphEffect = new Effect.Morph(panel, { style: "height: 0px", duration: 0.5 }); this.pushDownZoomBar(-77); expand.show(); fold.hide(); } .bind(this); // if there's not favorite item, fold favorite list if (!favorites.down("input[type=hidden]")) { fold.onclick(); } } }, _getImageDimension: function(event) { var pos_x, pos_y; pos_x = event.offsetX ? (event.offsetX) : event.pageX - document.getElementById("pointer_div").offsetLeft; pos_y = event.offsetY ? (event.offsetY) : event.pageY - document.getElementById("pointer_div").offsetTop; document.getElementById("cross").style.left = (pos_x - 1); document.getElementById("cross").style.top = (pos_y - 15); }, /** * private * Initialize tile container. */ _initTileContainer: function() { // set attributes for tile container, and add it into map container. this.tileContainer = new Element("div"); this.tileContainer.addClassName("tile_container"); this.tileContainer.observe("dblclick", function(e) { if (!this.options.zoomable || this.options.miniMode) { return; } var containerOffset = this.mapContainer.cumulativeOffset(); var center = { y: this.range.top + e.pointerY() - containerOffset.top, x: this.range.left + e.pointerX() - containerOffset.left }; this.load(this.level + 1, center); } .bind(this)); this.tileContainer.setStyle({ width: this.size.width + "px", height: this.size.height + "px" }); this.enableDrag(this.options.dragable); this.popupContainer = new Element("div"); this.popupContainer.style.display = "none"; this.tileContainer.insert(this.popupContainer); this.mapContainer.insert(this.tileContainer); if (!this.options.miniMode) { if (Prototype.Browser.IE) { this.tileContainer.setStyle({ cursor: "url(/images/openhand.cur), pointer" }); Event.observe(this.tileContainer, "mousedown", function() { this.tileContainer.setStyle({ cursor: "url(/images/closedhand.cur), pointer" }); } .bind(this)); Event.observe(this.tileContainer, "mouseup", function() { this.tileContainer.setStyle({ cursor: "url(/images/openhand.cur), pointer" }); } .bind(this)); Event.observe(this.tileContainer, "mouseout", function() { this.tileContainer.setStyle({ cursor: "url(/images/openhand.cur), pointer" }); } .bind(this)); } else { this.tileContainer.addClassName("hand"); Event.observe(this.tileContainer, "mousedown", function() { this.tileContainer.removeClassName("hand"); this.tileContainer.addClassName("grab_hand"); } .bind(this)); Event.observe(this.tileContainer, "mouseup", function() { this.tileContainer.removeClassName("grab_hand"); this.tileContainer.addClassName("hand"); } .bind(this)); Event.observe(this.tileContainer, "mouseout", function() { this.tileContainer.removeClassName("grab_hand"); this.tileContainer.addClassName("hand"); } .bind(this)); } } }, /** * private * Switch the cover * @param {bool} isOn Whether the cover should be shown or not */ _switchCover: function(isOn) { // keep the loading image in the center of the map container // even if the size of the container is changed if (!this.cover) { // build a cover to prevent operations before the map is ready to run. this.cover = new Element("div"); this.cover.addClassName("cover"); this.cover.setStyle({ width: this.size.width + "px", height: this.size.height + "px", opacity: 0.5 }); this.mapContainer.insert(this.cover); var loading = new Element("img"); loading.alt = "loading..."; loading.addClassName("loading_icon"); loading.src = "/images/loading.gif"; loading.style.marginTop = (this.size.height - 32) / 2 + "px"; loading.style.marginLeft = (this.size.width - 32) / 2 + "px"; this.cover.update(loading); } this.cover.setStyle({ display: isOn ? "block" : "none" }); }, /** * private * Fire an event * @param {string} targetEvent Target event that need to be fired * @param {object} e Event object that contains parameters for the handler. */ _fire: function(targetEvent, e) { var eventQueue = this.events[targetEvent]; if (eventQueue) { eventQueue.each(function(item) { try { item.apply(this, [e]); } catch (exp) { if (DEBUG && enableConsole) { console.log(exp.message); } } }); } }, /** * private * Load map data by AJAX * @param {Integer} level map level */ _loadMap: function() { this.readyFlag |= Map.Flags.MAP; this._fire(Map.Events.REQUESTING, { target: Map.Resources.MAP }); this.mapReady = false; this.mapSync = new Date().getTime(); var mapSync = this.mapSync; var request = new Ajax.Request(MAP_SOURCE, { method: "post", parameters: $H({ level: this.level }).toQueryString(), onSuccess: function(response) { if (this.mapSync != mapSync) { return; } this._analyseMapData(response.responseXML); this.readyFlag &= ~Map.Flags.MAP; this._fire(Map.Events.MAP_READY, { event: Map.Events.MAP_READY, response: response }); if (this.readyFlag == Map.Flags.NONE) { this._fire(Map.Events.READY, {}); } } .bind(this), onFailure: function(response) { this._fire(Map.Events.ERROR, { event: Map.Events.ERROR, errorCode: Map.ErrorCode.NETWORK, response: response }); } .bind(this) }); }, /** * private. * Load necessary resources for a single level. */ _loadResources: function() { this.readyFlag |= Map.Flags.RESOURCES; if (!this.resources.get(Map.Resources.POPUPS)) { this.resources.set(Map.Resources.POPUPS, { id: Map.Resources.POPUPS, url: POPUP_BASE + POPUPS_XSLT }); } var finish = function(response) { var res = this.resources.values(); for (var i = res.length - 1; i >= 0; i--) { if (res[i].response == null) { return; } } this._fire(Map.Events.RESOURCES_READY, { event: Map.Events.RESOURCES_READY, response: response }); this.readyFlag &= ~Map.Flags.RESOURCES; if (this.readyFlag == Map.Flags.NONE) { this._fire(Map.Events.READY, {}); } } .bind(this); var res = this.resources.values(); res.each(function(item, index) { this._fire(Map.Events.REQUESTING, { target: item.id }); if (item.response) { finish(item.response); } else { var request = new Ajax.Request(item.url, { method: "get", onSuccess: function(response) { item.response = response; finish(response); } .bind(this), onFailure: function(response) { this._fire(Map.Events.ERROR, { event: Map.Events.ERROR, errorCode: Map.ErrorCode.NETWORK, response: response }); } .bind(this) }); } } .bind(this)); }, /** * private * Load attractions in the current viewport * @param {Object} level Map level. * @param {Object} range Viewport range */ _loadAtt: function(isClearPins) { this.readyFlag |= Map.Flags.ATTRACTION; this._fire(Map.Events.REQUESTING, { target: Map.Resources.ATTRACTION }); var expItems = this._getExplorerItems(); var favItems = this._getFavoriteItems(); var validator = /^tcm:\d{2,10}\-\d{2,10}$/i; var allItems = expItems.concat(favItems).concat([this._getCurrentItem()]).select(function(item) { var result = validator.test(item); if (DEBUG && !result && enableConsole) { console.log("Invalid parameter rejected: '" + item + "'"); } return result;}).uniq(); range = $H(this.range).merge({ level: this.level, pageUri: pageUri, additional: allItems.join(",") }); this.attSync = new Date().getTime(); var attSync = this.attSync; var request = new Ajax.Request(ATT_SOURCE, { method: "post", parameters: range.toQueryString(), onSuccess: function(response) { if (attSync != this.attSync) { return; } if (isClearPins) { this._clearPins(); } this._anylyseAttractionData(response.responseXML); this.readyFlag &= ~Map.Flags.ATTRACTION; this._fire(Map.Events.ATT_READY, { event: Map.Events.ATT_READY, response: response }); if (this.readyFlag == Map.Flags.NONE) { this._fire(Map.Events.READY, {}); } } .bind(this), onFailure: function(response) { this._fire(Map.Events.ERROR, { event: Map.Events.ERROR, errorCode: Map.ErrorCode.NETWORK, response: response }); } .bind(this) }); }, /** * @private * Analyse map data and get information about maps. */ _analyseMapData: function(mapXml) { var map = {}; map.level = this._select(mapXml, "mp:map/@level")[0].nodeValue; var scale = this._select(mapXml, "mp:map/mp:scale/text()")[0].nodeValue.split(":"); scale.each(function(item, index) { item *= 1; }); map.scale = scale; map.width = this._select(mapXml, "mp:map/mp:width/text()")[0].nodeValue * 1; map.height = this._select(mapXml, "mp:map/mp:height/text()")[0].nodeValue * 1; map.tile = { width: this._select(mapXml, "mp:map/mp:tile/mp:width/text()")[0].nodeValue * 1, height: this._select(mapXml, "mp:map/mp:tile/mp:height/text()")[0].nodeValue * 1 }; this.offset = { x: map.width < this.size.width ? (this.size.width - map.width) / 2 : 0, y: map.height < this.size.height ? (this.size.height - map.height) / 2 : 0 }; this.enableDrag(this.level >= MOVABLE_LEVEL && !this.options.miniMode); this.options.showPopup = !this.options.miniMode; // ..... this.currentMap = map; }, /** * private. * Analyse attraction data and get information about attractions. */ _anylyseAttractionData: function(attXml) { var icons = new Hash(); var iconNodes = $A(this._select(attXml, "fe:feature_set/fe:icons/fe:icon")); iconNodes.each(function(node) { var icon = {}; icon.id = this._select(node, "@id")[0].nodeValue; icon.image = this._select(node, "fe:img/text()")[0].nodeValue; icon.offset = {}; icon.offset.x = this._select(node, "fe:offset/fe:x/text()")[0].nodeValue * 1; icon.offset.y = this._select(node, "fe:offset/fe:y/text()")[0].nodeValue * 1; icons.set(icon.id, icon); } .bind(this)); this.icons = icons; var featureNodes = $A(this._select(attXml, "fe:feature_set/fe:features/fe:feature")); featureNodes.each(function(node) { var id = this._select(node, "@id")[0].nodeValue; var feature = this.attractions.get(id) || {}; feature.id = id; var schema = this._select(node, "fe:schema/text()")[0].nodeValue; feature.schema = schema; feature.icon = {}; feature.icon.ref = icons.get(this._select(node, "fe:icon/@ref")[0].nodeValue); feature.icon.position = {}; feature.icon.position.x = this._select(node, "fe:icon/fe:x/text()")[0].nodeValue * 1; feature.icon.position.y = this._select(node, "fe:icon/fe:y/text()")[0].nodeValue * 1; feature.region = {}; this.attractions.set(feature.id, feature); } .bind(this)); // fill popup html var html = this._format(attXml, this.resources.get(Map.Resources.POPUPS).response.responseXML); this.popupContainer.update(html); }, /** * private * select content from specified XML document * @param {Object} startNode start search from this node * @param {Object} xpath XPath */ _select: function(startNode, xpath) { var result; if (Prototype.Browser.IE) { // IE result = startNode.selectNodes(xpath); } else { // other browsers if (!this.evaluator) { this.evaluator = new XPathEvaluator(); } var xpathResult = this.evaluator.evaluate(xpath, startNode, function(prefix) { return NAMESPACE; }, XPathResult.ANY_TYPE, null); switch (xpathResult.resultType) { case XPathResult.STRING_TYPE: result = xpathResult.stringValue; break; case XPathResult.NUMBER_TYPE: result = xpathResult.numberValue; break; case XPathResult.BOOLEAN_TYPE: result = xpathResult.booleanValue; break; case XPathResult.UNORDERED_NODE_ITERATOR_TYPE: case XPathResult.ORDERED_NODE_ITERATOR_TYPE: result = []; var node; while ((node = xpathResult.iterateNext()) != null) { result.push(node); } break; case XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE: case XPathResult.ORDERED_NODE_SNAPSHOT_TYPE: result = []; for (var i = 0; i < xpathResult.snapshotLength; i++) { result.push(xpathResult.snapshotItem(i)); } break; case XPathResult.ANY_UNORDERED_NODE_TYPE: case XPathResult.FIRST_ORDERED_NODE_TYPE: result = xpathResult.singleNodeValue; break; default: break; } } return result; }, /** * Format XML with XSLT * @param {Object} xml * @param {Object} xsl */ _format: function(xml, xsl) { var html; if (window.XSLTProcessor) { // Firefox var xsltProcessor = new XSLTProcessor(); xsltProcessor.importStylesheet(xsl); var result = xsltProcessor.transformToFragment(xml, xml); var xmls = new XMLSerializer(); html = xmls.serializeToString(result); } else { // IE html = xml.transformNode(xsl); } return html; }};Map.Events = { REQUESTING: "requesting", MAP_READY: "map ready", ATT_READY: "att ready", SINGLE_ATT_READY: "single att ready", RESOURCES_READY: "resources ready", READY: "ready", BEFORE_MOVING: "before moving", MOVING: "moving", MOVED: "moved", ERROR: "error"};Map.Flags = { NONE: 0, MAP: 1, ATTRACTION: 2, SINGLE_ATTRACTION: 4, RESOURCES: 8, ALL: 15};Map.AttractionAction = { POPUP: 1, MOVE_TO: 2};Map.Resources = { MAP: "MAP", ATTRACTION: "ATTRACTION", SINGLE_ATTRACTION: "SINGLE_ATTRACTION", POPUP: "POPUP", PLAYLIST_POPUP: "PLAYLIST_POPUP", POPUPS: "POPUPS"};Map.Pins = { EXPLORER: "explorer", FAVORITE: "favorite", SELECTED: "selected", INFO: "info"};/*** Error code begins from 10001*/Map.ErrorCode = { NETWORK: 10001, // network error PARAMETER: 10002// parameter is incorrect};var uninstallMaps;var Billboard = Class.create({size: null,container: null,data: null,currentIndex: null,nextIndex: null,state: 0,effectQueue: null,pauseTimePos: null,handler: null,initialize: function(container, data) { this.handler = null;this.state = Billboard.State.PLAYING;this.effectQueue = $A([]);this.container = $(container);Event.observe(this.container, "click", function(e) {if (this.state == Billboard.State.PLAYING) {this.pause();} else if (this.state == Billboard.State.PAUSE) {this.resume();}}.bind(this));this.data = data;this.size = this.container.getDimensions();this.currentIndex = 0;this.nextIndex = 1;this.nextIndex %= this.data.length;this._load();},_start: function() {var currentItem = this.data[this.currentIndex];var nextItem = this.data[this.nextIndex];var currentHTMLItem = currentItem.img;var nextHTMLItem = nextItem.img;this.currentIndex = this.nextIndex;this.nextIndex++;this.nextIndex %= this.data.length;var options = {duration: currentItem.display + currentItem.transition + nextItem.transition,mode: "relative",transition: Effect.Transitions.linear,beforeStart: function() {currentHTMLItem.style.zIndex = 1;},afterFinish: function() {this.effectQueue.shift();}.bind(this)};currentHTMLItem.setStyle({opacity: 1,display: "block"});if (currentItem.direction != Billboard.Direction.NONE) {var imgSize = {width: currentItem.img.width,height: currentItem.img.height};if (currentItem.direction & Billboard.Direction.UP) {options.y = this.size.height - imgSize.height;currentHTMLItem.style.top = "0px";}if (currentItem.direction & Billboard.Direction.DOWN) {options.y = imgSize.height - this.size.height;currentHTMLItem.style.top = -options.y + "px";}if (currentItem.direction & Billboard.Direction.LEFT) {options.x = this.size.width - imgSize.width;currentHTMLItem.style.left = "0px";}if (currentItem.direction & Billboard.Direction.RIGHT) {options.x = imgSize.width - this.size.width;currentHTMLItem.style.left = -options.x + "px";}} else {options.x = 0;options.y = 0;}this.effectQueue.push(new Effect.Move(currentHTMLItem, options));this.effectQueue.push(Effect.Fade(currentHTMLItem, {duration: nextItem.transition,delay: currentItem.transition + currentItem.display,beforeUpdate: function() {if (this.handler === null) {currentHTMLItem.style.zIndex = 100;this.handler = window.setTimeout(this._start.bind(this), 0);}}.bind(this),afterFinish: function() {this.effectQueue.shift();this.handler = null;}.bind(this)}));},/** * Private. * Preload all images before showing them to the user. */_load: function() {this._switchCover(true);var finishCount = 0;this.data.each(function(item, index) {var img = new Element("img");Event.observe(img, "load", function() {finishCount++;if (finishCount == this.data.length) {this._switchCover(false);this._start();}}.bind(this));img.src = item.url;img.alt = item.alt;img.addClassName("billboard_item");img.hide();item.img = img;this.container.insert(img);}.bind(this));},/** * Private * Switch on/off the loading message * @param {Object} isOn true for on, false for off */_switchCover: function(isOn) {// keep the loading image in the center of the map container// even if the size of the container is changedif (isOn) {if (!this.cover) {// build a cover to prevent operations before the map is ready to run.this.cover = new Element("div");this.cover.addClassName("cover");this.cover.setStyle({width: this.size.width + "px",height: this.size.height + "px",opacity: 0.5});this.cover.update("Universal Studios Florida - Parque Temático (2)");this.container.insert(this.cover);}var loading = this.cover.down("img");var iconSize = loading.getDimensions();loading.style.marginTop = (this.size.height - iconSize.height) / 2 + "px";loading.style.marginLeft = (this.size.width - iconSize.width) / 2 + "px";}this.cover.setStyle({display: isOn ? "block" : "none"});},/** * Public. * Pause the Billboard acting. Billboard can not be paused any where. * It will be paused after current images finishes moving */pause: function() {if (this.state == Billboard.State.PAUSE) {return;}this.pauseTimePos = new Date().getTime();this.effectQueue.each(function(item, index) {item.cancel();});this.state = Billboard.State.PAUSE;},/** * Public. * Resume billboard */resume: function() {if (this.state == Billboard.State.PLAYING) {return;}var timeDelta = new Date().getTime() - this.pauseTimePos;this.effectQueue.each(function(item, index) {var timeDelta = item.startOn - this.pauseTimePos;item.startOn = timeDelta;item.finishOn = item.totalTime + timeDelta;item.state = "running";Effect.Queues.get(Object.isString(item.options.queue) ? 'global' : item.options.queue.scope).add(item);}.bind(this));this.state = Billboard.State.PLAYING;},/** * Public. * Stop billboard forever */cancel: function() {this.pause();}});Billboard.Direction = {NONE: 0,UP: 1,RIGHT: 2,DOWN: 4,LEFT: 8,UP_LEFT: 9,UP_RIGHT: 3,DOWN_LEFT: 12,DOWN_RIGHT: 6};Billboard.State = {PLAYING: 0,PAUSE: 1};var billboards = [];var bType = 0;function parseBillboardData(billboardContainer) {if (billboardContainer) {var swfContainer = billboardContainer.down(".swf_item");if (swfContainer != null) {// reuse ADA flash function to make it work. don't need to do anything here anymore.} else {var dataContainer = billboardContainer.select(".billboard_item");var data = [];var dataBlock;if (dataContainer.length <= 1) {return;}dataContainer.each(function(item, index) {data.push({item: item,url: item.down("input[name=url]").value,alt: item.down("input[name=alt]").value,transition: item.down("input[name=transition]").value * 1,display: item.down("input[name=display]").value * 1,direction: item.down("input[name=direction]").value * 1});item.remove();});billboards.push(new Billboard(billboardContainer, data));}}}function pauseAllBillboards() {billboards.each(function(billboard, index) {billboard.pause();});return false;}function resumeAllBillboards() {billboards.each(function(billboard, index) {billboard.resume();});return false;}// billboard for features pagesfunction loadBillboardType1() {var banner = $(document.body).down(".banner");if (!banner) {return;}bType = 1;// start billboardvar billboardContainer = banner.down(".billboard");if (billboardContainer) {parseBillboardData(billboardContainer);}// add event for video clipsvar anchorObject = $("Divbanner");var videoLink = banner.down("a.video");var videos = banner.next(".videos");var videoLinkOfVideo, videoLinkOfGallery, galleryLinkOfGallery, galleryLinkOfVideo;if (videos) {loadVideoData();videoLinkOfVideo = videos.down(".video_link");galleryLinkOfVideo = videos.down(".gallery_link");videoLinkOfVideo.onclick = function() {return false;};galleryLinkOfVideo.onclick = function() { videoLink.popup.hide(); photoLink.popup.show();return false;};var popup = new Popup(videoLink, videos, {showEvent: "none",hideEvent: "none",alwaysUpdate: true,anchor: {target: Popup.Anchor.TOP | Popup.Anchor.LEFT,object: anchorObject},queue: {scope: "image_video",limite: 1,position: "end"}});Event.observe(videoLink, "popup:showing", function(event) {videos.style.height = $("main").getHeight() + "px";Effect.Appear(event.memo.popup, {duration: 0.2,beforeStart: function() {videoClips.play();}});event.memo.customEffect = true;});Event.observe(videoLink, "popup:hiding", function(event) {Effect.Fade(event.memo.popup, {duration: 0.2,afterFinish: function() {stopVideo();}});event.memo.customEffect = true;});videoLink.onclick = function() {pauseAllBillboards();videoLink.popup.show();return false;};Event.observe(videos.down(".close"), "click", function(e) {videoLink.popup.hide();resumeAllBillboards();Event.stop(e);});videoLink.up("li").show();uninstallVideos = function() {if (videoLink.popup) {videoLink.popup.unload();}};} else if (videoLink) {videoLink.up("li").hide();}// add event for image galleryvar photoLink = banner.down("a.photo");var gallery = banner.next(".gallery");if (gallery) { //boolGalleryContainer = false;videoLinkOfGallery = gallery.down(".video_link");galleryLinkOfGallery = gallery.down(".gallery_link");videoLinkOfGallery.onclick = function() { photoLink.popup.hide(); videoLink.popup.show();return false; };galleryLinkOfGallery.onclick = function() {return false;};popup = new Popup(photoLink, gallery, {showEvent: "none",hideEvent: "none",alwaysUpdate: true,anchor: {target: Popup.Anchor.TOP | Popup.Anchor.LEFT,object: anchorObject},queue: {scope: "image_video",limite: 1,position: "end"}});loadGalleryData(gallery.down(".photos"));Event.observe(photoLink, "popup:showing", function(event) {var galleryHeight = gallery.getHeight();var anchorHeight = $("main").getHeight();if (anchorHeight > galleryHeight) {gallery.style.height = anchorHeight + "px";}Effect.Appear(event.memo.popup, {duration: 0.2});event.memo.customEffect = true;});Event.observe(photoLink, "popup:hiding", function(event) {Effect.Fade(event.memo.popup, {duration: 0.2,afterFinish: function() {imageGallery.hideFullView();}});event.memo.customEffect = true;});photoLink.onclick = function() {pauseAllBillboards();photoLink.popup.show();return false;};Event.observe(gallery.down(".close"), "click", function(e) {photoLink.popup.hide();resumeAllBillboards();Event.stop(e);});photoLink.up("li").show();uninstallGallery = function() {if (photoLink.popup) {photoLink.popup.unload();}};} else if (photoLink) {photoLink.up("li").hide();}if (!videos && videoLinkOfGallery) {videoLinkOfGallery.hide();}if (!gallery && galleryLinkOfVideo) {galleryLinkOfVideo.hide();}// make a shadow for billboard titlevar titleShadow = banner.down(".title_shadow");var widthBanner = titleShadow.down('input[name=widthBanner]');if (widthBanner != undefined){titleShadow.setStyle({width: widthBanner.value});}else {titleShadow.setStyle({width: "650px"});}if (isIE6) {titleShadow.removeClassName("title_shadow");}// register add/remove map eventvar add = banner.down("a.add");var remove = banner.down("a.remove");var operating = banner.down("a.operating");var featureId = banner.down("input[name=feature_id]").value;var title = banner.down(".title");if (add && remove && operating) {add.onclick = function() {addRemove(true, featureId, document.title);return false;};remove.onclick = function() {addRemove(false, featureId, document.title);return false;};favManager.add2Queue({update: commonUpdate,data: {type: "billboard",id: featureId,add: add,remove: remove,operating: operating}});if (playlist.isInPlaylist(featureId)) {add.hide();remove.show();} else {add.show();remove.hide();} } //begin - active object to expand corner prom if ($('stateCornerProm')) { $('stateCornerProm').value = 'true'; } //end - active object to expand corner prom}// billboard for overview pagesfunction loadBillboardType2() {var billboards = $(document.body).select(".b_dynamic");if (billboards.length == 0) {return;}bType = 2;billboards.each(function(billboard, index) {// adjust widthvar billboardContainer = billboard.down(".body");var head = billboard.down(".header");var parent = $(billboard.parentNode);// as the page is not well orgnized, the 6 px is a work aroundvar totalWidth = parent.getWidth() - 6;var width = totalWidth / billboards.length;billboard.setStyle("width:" + (width - 5) + "px");billboardContainer.setStyle("width:" + (width - 9) + "px");billboard.show();// start billboardparseBillboardData(billboardContainer);});// adjust billboard heightvar headers = billboards.invoke("down", ".header");var max = headers.invoke("getHeight").max() - 24;// 24px is the paddingheaders.invoke("setStyle", "height:" + max + "px");//begin - active object to expand corner promif ($('stateCornerProm')) { $('stateCornerProm').value = 'true';}//end - active object to expand corner prom}// billboard for home pagefunction loadBillboardType4() {var billboard = $(document.body).down(".billboard_f");if (!billboard) {return;}bType = 4;// start billboardparseBillboardData(billboard);//begin - active object to expand corner promif ($('stateCornerProm')) { $('stateCornerProm').value = 'true';}//end - active object to expand corner prom}function loadAllBillboardData() {var loadBillboard = function() {try {loadBillboardType1();loadBillboardType2();loadBillboardType4();} catch (e) {if (DEBUG && !Prototype.Browser.IE) {console.log(e.message);}}};if (isLoaded) {loadBillboard();} else {Event.observe(window, "load", loadBillboard);}}function uninstallAllBillboards() {pauseAllBillboards();if (uninstallGallery) {uninstallGallery();}if (uninstallVideos) {uninstallVideos();}var banner = $(document.body).down(".banner");if (!banner) {return;}var featureId = banner.down("input[name=feature_id]");if (!featureId) {return;}favManager.removeFromQueue({type: "billboard",id: featureId.value});}/* Begin script for Promotion Billboard Corner*/var promoXYshow = false;function PromoXYShow() { var promo = $('idExpandedCornerProm'); var offset = ["0", "100px", "0px", "0", "255px"]; Effect.GrowX(promo, { duration: 1.5, queue: { scope: "promotion", position: "end", limit: 1 }, beforeSetup: function() { var pos = promo.positionedOffset(); var dim = promo.getDimensions(); promo.setStyle({ position: "absolute", display: "block", right: offset[bType], top: "0px" }); //begin 09-15-09 if ($('priceID')) { if (Prototype.Browser.IE) { $('priceID').hide(); } else { Effect.Fade($('priceID')); } } //end 09-15-09 }, afterFinish: function() { pauseAllBillboards(); promoXYshow = true; //begin 09-15-09 if ($('idCloseCorner')) { $("idCloseCorner").select(); $("idCloseCorner").focus(); } //close 09-15-09 } });}function PromoXYHide() { Effect.ShrinkX($('idExpandedCornerProm'), { duration: 1.5, queue: { scope: "promotion", position: "end", limit: 1 }, beforeSetup: function() { resumeAllBillboards(); var opacity = new Effect.Opacity('idExpandedCornerProm', { duration: 1, from: 0.5, to: 1, queue: { scope: "promotion" } }); //begin 09-15-09 if ($('priceID')) { if (Prototype.Browser.IE) { $('priceID').show(); } else { Effect.Appear($('priceID')); } } //end 09-15-09 }, afterFinish: function() { $('idExpandedCornerProm').hide(); promoXYshow = false; //begin 09-15-09 if ($('idShowCorner')) { $("idShowCorner").select(); $("idShowCorner").focus(); } //close 09-15-09 } });}function PromoXYClick() { if (promoXYshow) { PromoXYHide(); } else { if ($('stateCornerProm')) { if ($('stateCornerProm').value == 'true') { PromoXYShow(); } } }}/* End script for Promotion Billboard Corner*//* Begin script for Promotion Billboard Bottom*/var promobottomshow = false;function PromoBottomShow() { var style, expandHeight; // the bType is set in billboard.js, and can be used to indicate which kind of billboard it is. switch (bType) { case 2: // overview page expandHeight = $(document.body).down(".dynamic").getHeight(); break; case 1: // feature page case 4: // home page default: // home page, features page, and default(if a new type comes) expandHeight = $(document.body).down(".billboard").getHeight(); } style = { top: -(expandHeight + 45) + "px", height: (expandHeight + 90) + "px" //modified 23-07-09 }; $("Billboard2").setStyle("height: " + (expandHeight + 45) + "px").show(); pauseAllBillboards(); $('idShowPromotion').hide().setStyle("cursor: pointer"); $('idHidePromotion').show().setStyle("cursor: pointer"); (function() { var morph = new Effect.Morph($('BillBoardParent'), { style: style, queue: { scope: "promotion", position: "end", limit: 1 }, beforeSetup: function() { if ($('float')) { if (Prototype.Browser.IE) { $('float').hide(); } else { Effect.Fade($("float")); } } }, afterFinish: function() { promobottomshow = true; $("idHidePromotion").select(); $("idHidePromotion").focus(); } }); }).defer();}function PromoBottomHide() { //$('imgBottomPromo').src = $('PromoBottonUp').value; //not necesarry to pass up image path to down image path $('idShowPromotion').show(); $('idHidePromotion').hide(); (function() { var morph = new Effect.Morph($('BillBoardParent'), { style: { height: "45px", top: "0px" }, queue: { scope: "promotion", position: "end", limit: 1 }, beforeSetup: function() { if ($('float')) { if (Prototype.Browser.IE) { $('float').show(); } else { Effect.Appear($("float")); } } }, afterFinish: function() { resumeAllBillboards(); promobottomshow = false; $("idShowPromotion").select(); $("idShowPromotion").focus(); $("Billboard2").setStyle("height: 0px").hide(); } }); }).defer();}function PromoBottomClick() { if (promobottomshow) { PromoBottomHide(); } else { PromoBottomShow(); }}/* End script for Promotion Billboard Botton*/function ShowTopPromotion() { if ($("topad") && $("main3")) { var DivTopad = $("topad"); var wthMain = 776; var wthTop = DivTopad.offsetWidth; var temp = (wthMain - wthTop) / 2; $("Btop").setStyle({ top: "0px", left: temp + "px", display: "none", "float": "none" }); var Topad = DivTopad.innerHTML; $("Btop").innerHTML = Topad; $("topad").innerHTML = ""; Effect.BlindDown($('Btop'), { duration: 1, queue: { scope: "promotion", position: "end", limit: 1 }, beforeSetup: function() { var opacity = new Effect.Opacity('Btop', { from: 0, to: 1 }); } }); }}function CloseBillboardTop() { Effect.BlindUp($('Btop'), { duration: 1, queue: { scope: "promotion", position: "end", limit: 1 }, beforeSetup: function() { var opacity = new Effect.Opacity('Btop', { from: 1, to: 0 }); } });}//Function for SignUpEmailfunction SendEmailSignUp(_oc, _od) { var oc = _oc; var od = _od; var p = oc.href; var reg = /([\s\S]*.aspx)*/i;var matches = p.substring(0, 1000).match(reg);if (matches.length >= 1) {p = matches[1];} var e = ""; var a = $(od); var b = a.getElementsByTagName("*"); for (var c = 0; c < b.length; c++) { var d = b[c]; if (d.id.length > 0) { if (d.id == 'Email') { e = d.value; if (e == '' || e == 'Enter email address') { alert("Enter a valid email"); d.select(); d.focus(); if (navigator.appName != 'Netscape') { window.event.returnValue = false; } else { return false; } break; } else { if (p.indexOf('?') != -1) { p += '&email=' + e; } else { p += "?email=" + e; } window.location = p; if (navigator.appName != 'Netscape') { window.event.returnValue = false; } else { return false; } break; } } } }}function FixInfoSize(){if(document.getElementById("DivBanner") && document.getElementById("DivMiddleInfo")){ if (!document.getElementById("DivLeft")){if(!document.getElementById("right")){document.getElementById("DivRight_info").style.width="1001px";document.getElementById("DivMiddleInfo").style.width="1001px";document.getElementById("DivBanner").style.width="1001px";document.getElementById("DivBannerImage").style.width="1001px";}else{document.getElementById("DivRight_info").style.width="1001px";document.getElementById("DivBanner").style.width="1001px";document.getElementById("DivMiddleInfo").style.width="799px";if (document.getElementById("BotCor")){document.getElementById("BotCor").className="templatepage right_bt_bg";}}}else{if(!document.getElementById("right")){document.getElementById("DivRight_info").style.width="750px";document.getElementById("DivMiddleInfo").style.width="750px";document.getElementById("DivBanner").style.width="750px";}else{document.getElementById("BotCor").className="templatepage right_bt_bg";}}}}function ShowInfoSwfObject(){if (document.getElementById("objBanner")){ //hidden appears when there is an swf object for info banner var hiddenParam=""; hiddenParam=document.getElementById("objBanner").value; var params=""; params=hiddenParam.split('#'); var ext=""; var path=""; ext=params[0]; path=params[1]; showSwfObject(ext, path);}}function FixFeature_baseSize(){if (!document.getElementById("DivLeft") && !document.getElementById("DivMiddleInfo")){if (document.getElementById("DivRight")){document.getElementById("DivRight").style.width="1001px";}if (document.getElementById("DivbannerBigimg")){document.getElementById("DivbannerBigimg").style.width="1001px";}if (document.getElementById("Divbanner_mask")){document.getElementById("Divbanner_mask").style.width="1001px";}if(document.getElementById("Divbanner")){document.getElementById("Divbanner").style.width="1001px";}}}function FixSizePages(){ ShowInfoSwfObject(); FixInfoSize(); FixFeature_baseSize();}FixSizePages();var PLAYLIST_ITEM_PREFIX = "playlist_";var emailTemp = "";var UsuarioEmailTemp = "";var executeAction = "";var isParkMapInitialized = false;var initLevel = 4;var parkMap, miniMap;function showMap(level) { var miniMapContainer = $("miniMapContainer"); if (miniMapContainer) { if (isParkMapInitialized) { miniMapContainer.popup.show(); if (level) { parkMap.load(level); } } else { initLevel = level ? level : 5; miniMapContainer.popup.show(); } }}function showCurrent() { var miniMapContainer = $("miniMapContainer"); if (miniMapContainer) { if (isParkMapInitialized) { miniMapContainer.popup.show(); parkMap.firstMove = true; parkMap.load(3); } else { initLevel = 3; miniMapContainer.popup.show(); } }}function initMap() { try { var miniMapContainer = $("miniMapContainer"); var isMiniMapVisible = miniMapContainer && miniMapContainer.up("div").visible(); if (miniMapContainer && isMiniMapVisible) { var hint = miniMapContainer.next(".hint"); var hintPop = new Popup(miniMapContainer, hint, { anchor: { target: Popup.Anchor.H_CENTER | Popup.Anchor.V_CENTER, popup: Popup.Anchor.H_CENTER | Popup.Anchor.BOTTOM }, offset: { x: 4, y: -25 }, showEvent: null, hideEvent: null }); // create a hint var hintParent = hint.parentNode.parentNode; hintParent.onclick = function() { miniMapContainer.popup.show(); }; hintParent.show(); new Effect.Opacity(hintParent, { from: 0, to: 1, duration: 1 }); miniMap = new Map(miniMapContainer, 4, { top: 0, left: 0 }, { dragable: false, zoomable: false, showPopup: false, miniMode: true }); } uninstallMaps = function() { isMapExpanded = false; if (playlist) { playlist.uninstall(); } if (miniMapContainer && miniMapContainer.popup) { miniMapContainer.popup.unload(); } if (parkMap) { parkMap.uninstall(); } if (miniMap) { miniMap.uninstall(); } parkMap = null; miniMap = null; uninstallMaps = null; }; if (miniMapContainer) { var targetObj = $(document.body).down(".centralcontent") || $(document.body); var map = $("map"); var popupObj = new Popup(miniMapContainer, map, { anchor: { target: Popup.Anchor.TOP | Popup.Anchor.LEFT, object: targetObj }, showEvent: "click", hideEvent: null }); isParkMapInitialized = false; miniMapContainer.observe("popup:showing", function(event) { var sender = event.element(); if (sender != miniMapContainer) { return; } var options = { beforeStart: function() { pauseAllBillboards(); }, afterFinish: function() { var mapContainer = $("mapContainer"); if (!isParkMapInitialized && mapContainer) { isParkMapInitialized = true; parkMap = new Map(mapContainer, initLevel, { top: 0, left: 0 }, { dragable: true }); } isMapExpanded = true; }, queue: { scope: "expand_map", position: "end", limit: 1 } }; var wrapper = event.memo.popup; hideSelect.defer(wrapper); if (isMiniMapVisible) { Effect.ExpandMap(miniMapContainer, wrapper, options); } else { options.duration = 0.5; Effect.Appear(wrapper, options); } event.memo.customEffect = true; }); miniMapContainer.observe("popup:hiding", function(event) { isMapExpanded = false; var options = { afterFinish: function() { resumeAllBillboards(); }, queue: { scope: "expand_map", position: "end", limit: 1 } }; var wrapper = event.memo.popup; showSelect.defer(wrapper); if (isMiniMapVisible) { Effect.FoldMap(miniMapContainer, wrapper, options); } else { options.duration = 0.5; Effect.Fade(wrapper, options); } event.memo.customEffect = true; }); // expand the map if necessary if (window.location.href.toLowerCase().indexOf("expandmap=y") > 0) { showMap(2); } // initialize map links var mapLinksLink = $("map_links_link"); var mapLinks = $("map_links"); if (mapLinksLink && mapLinks) { popupObj = new Popup(mapLinksLink, mapLinks, { anchor: { target: Popup.Anchor.TOP | Popup.Anchor.LEFT, object: targetObj }, showEvent: "click", hideEvent: "click" }); Event.observe(mapLinksLink, "popup:showing", function(e) { Effect.SlideDown(e.memo.popup, { duration: 0.5 }); event.memo.customEffect = true; }); Event.observe(mapLinksLink, "popup:hiding", function(e) { Effect.SlideUp(e.memo.popup, { duration: 0.5 }); event.memo.customEffect = true; }); var close = mapLinks.down("a.close"); Event.observe(close, "click", function() { mapLinksLink.popup.hide(); }); } } } catch (e) { if (DEBUG && enableConsole) { console.log(e.message); } }}function OpenPrintMap() { $('hdnValidEmailMessage').value = $("mapControl_lblMessageEmailPrint").innerHTML; $('firstNamePrint').value = UserInfoName; $('emailPrint').value = UserInfoEmail; switchEmailBox(true, $("print_box")); $('firstNamePrint').focus(); return false;}function PrintMap() { var execute = 'Y'; if (ValidateSQLMap($('firstNamePrint').value.trim())) { $('dvMessageNamePrint').show(); execute = 'N'; } else { $('dvMessageNamePrint').hide(); } if (!ValidateEmailMap($('emailPrint').value.trim())) { $("mapControl_lblMessageEmailPrint").innerHTML = $('hdnValidEmailMessage').value; $('dvMessageEmailPrint').show(); execute = 'N'; } else { $('dvMessageEmailPrint').hide(); } if (execute == 'Y') { PageMethods.IsValidSql($('firstNamePrint').value.trim(), onPrintComplete); }}function onPrintComplete(result) { if (result) { $('dvMessageNamePrint').show(); } else { DisabledControl($('mapControl_btnEnterPrintMap'), true); $('dvMessageEmailPrint').hide(); $('dvMessageNamePrint').hide(); executeAction = "PrintMap"; emailTemp = $('emailPrint').value.trim(); PageMethods.PrintMap($('firstNamePrint').value.trim(), $('emailPrint').value.trim(), $('mapControl_optPrint').checked, onComplete, onUnSuccessfull); }}function OpenPrintConfirm() { switchEmailBox(true, $("print_boxConfirm")); var hdnTextContentPrintMapConfirm = $("mapControl_hdnTextContentPrintMapConfirm").value; $('mapControl_lblTextContentPrintMapConfirm').innerHTML = hdnTextContentPrintMapConfirm.replace("[Email]", emailTemp); $('mapControl_btnClosePrintMap').focus();}function ClosePrintMap() { $('firstNamePrint').value = ""; $('emailPrint').value = ""; $('dvMessageEmailPrint').hide(); $('dvMessageNamePrint').hide(); $('mapControl_optPrint').checked = true; $("mapControl_lblMessageEmailPrint").innerHTML = $('hdnValidEmailMessage').value; switchEmailBox(false, $("print_box"));}function OpenSaveMap() { PageMethods.SaveMap(function() { // success window.location = LoginPage; }, function() { // failed window.location = ErrorPage; });}function OpenRestoreMap() { PageMethods.RestoreMap(function() { // success window.location = LoginPage; }, function() { // failed window.location = ErrorPage; });}function OpenSendMyMap() { $('firstNameSend').value = UserInfoName; $('emailSend').value = UserInfoEmail; switchEmailBox(true, $("send_box")); $('firstNameSend').focus(); return false;}function SendMyMap() { var execute = 'Y'; if (ValidateEmailMap($('emailSend').value.trim())) { $('dvMessageEmailSent').hide(); } else { $('dvMessageEmailSent').show(); $('dvMessageNameSent').hide(); $('dvMessageFriendNameSent').hide(); execute = 'N'; } if (ValidateEmailMap($('friendEmailsSend').value.trim())) { $('dvMessageFriendEmailSent').hide(); } else { $('dvMessageFriendEmailSent').show(); $('dvMessageNameSent').hide(); $('dvMessageFriendNameSent').hide(); execute = 'N'; } if (execute == 'N') { return false; } if (ValidateSQLMap($('firstNameSend').value.trim())) { $('dvMessageNameSent').show(); execute = 'N'; } else { $('dvMessageNameSent').hide(); } if (ValidateSQLMap($('friendFirstNameSend').value.trim())) { $('dvMessageFriendNameSent').show(); execute = 'N'; } else { $('dvMessageFriendNameSent').hide(); } if (execute == 'N') { return false; } PageMethods.IsValidSql($('firstNameSend').value.trim(), onSentComplete);}function onSentComplete(result) { if (result) { $('dvMessageNameSent').show(); } else { DisabledControl($('topOption_btnEnterSentToFriend'), true); executeAction = "SendToFriend"; emailTemp = $('friendEmailsSend').value.trim(); var pageUrl = ""; pageUrl = $('topOption_hydUrlPage').value.trim(); if ($('topOption_hdnIsMerchandise').value == "N") { PageMethods.SendMailFriends($('friendFirstNameSend').value.trim(), $('friendEmailsSend').value.trim(), $('firstNameSend').value.trim(), $('emailSend').value.trim(), $('messageSend').value.trim(), $('topOption_optSend').checked, document.title, pageUrl, onComplete, onUnSuccessfull); } else { PageMethods.SendMerchandiseMailFriends($('friendFirstNameSend').value.trim(), $('friendEmailsSend').value.trim(), $('firstNameSend').value.trim(), $('emailSend').value.trim(), $('messageSend').value.trim(), $('topOption_optSend').checked, $('ucProductDetail_hdnProductId').value, $('ucProductDetail_hdnVariantId').value, $('ucProductDetail_hdnIsHarryPotter').value, $('ucProductDetail_hdnCurrentURL').value, onComplete, onUnSuccessfull); } }}function OpenSendToFriendConfirm() { switchEmailBox(true, $("send_boxConfirm")); var hdnTextSentToFriendConfirm = $("topOption_hdnTextSentToFriendConfirm").value; var textConfirm = hdnTextSentToFriendConfirm.replace("[page title]", document.title.replace(/#$/, "")); $('topOption_lblTextSentToFriendConfirm').innerHTML = textConfirm.replace("[Email]", emailTemp); $('topOption_btnCloseSentToFriend').focus();}function CloseSendMap() { $('friendFirstNameSend').value = ""; $('friendEmailsSend').value = ""; $('firstNameSend').value = ""; $('emailSend').value = ""; $('messageSend').value = ""; $('dvMessageEmailSent').hide(); $('dvMessageFriendEmailSent').hide(); $('dvMessageFriendNameSent').hide(); $('dvMessageNameSent').hide(); if (!$('topOption_optSend').disabled) { $('topOption_optSend').checked = false; } switchEmailBox(false, $("send_box"));}function onComplete(result) { if (executeAction == "PrintMap") { DisabledControl($('mapControl_btnEnterPrintMap'), false); if (result) { $('dvMessageEmailPrint').show(); $("mapControl_lblMessageEmailPrint").innerHTML = $('topOption_hdnUserEmailExistMessage').value; } else { UserInfoName = $('firstNamePrint').value.trim(); UserInfoEmail = $('emailPrint').value.trim(); ClosePrintMap(); OpenPrintConfirm(); } } else if (executeAction == "SendToFriend") { DisabledControl($('topOption_btnEnterSentToFriend'), false); if ($('topOption_hdnIsMerchandise').value == "N") { UserInfoName = $('firstNameSend').value.trim(); UserInfoEmail = $('emailSend').value.trim(); } CloseSendMap(); OpenSendToFriendConfirm(); }}function onUnSuccessfull() { window.location = ErrorPage;}function CloseBoxConfirmation(boxConfirm) { switchEmailBox(false, boxConfirm);}function MapBoxExecute(e, MapName) { if (window.event) // IE { keynum = e.keyCode; } else if (e.which) // Netscape/Firefox/Opera { keynum = e.which; } if (keynum == 13) { if (MapName == "SendBox") { SendMyMap(); } else if (MapName == "PrintBox") { PrintMap(); } else if (MapName == "SaveBox") { SaveMap(); } return false; } if (keynum == 27) { if (MapName == "SendBox") { CloseSendMap(); } else if (MapName == "PrintBox") { ClosePrintMap(); } else if (MapName == "SaveBox") { CloseSaveMap(); } return false; }}function MapBoxConfirmationExecute(e, MapName) { if (window.event) // IE { keynum = e.keyCode; } else if (e.which) // Netscape/Firefox/Opera { keynum = e.which; } if (keynum == 13 || keynum == 27) { if (MapName == "SendBox") { CloseBoxConfirmation($('send_boxConfirm')); } else if (MapName == "SaveBox") { CloseBoxConfirmation($('save_boxConfirm')); } else if (MapName == "PrintBox") { CloseBoxConfirmation($('print_boxConfirm')); } return false; }}var isMapExpanded = false;//var EXP_HANDLER = "/Explorer.ashx";//var LOADING_IMG = "

Universal Studios Florida - Parque Temático (3)

";/*** Explorer object represents one slider in the left side.* If user click the links to slide to the next explorer, another explorer will be called.* Explorers will be cached in ExplorerManager, but once it reach the max cache size,* the oldest one will be thrown away.* The explorers that we cache in memory includes:* 1. explorers that can be (but not yet) seen in the next slide.* 2. explorers that has been seen.* @param {Object} id Tcm ID of the explorer*/var Explorer = function(expID) { this.events = []; this.items = []; this.explorerID = expID; this.contentContainer = new Element("div"); this.response = {}; this.statusFlag = {}; this._analyseExplorer($("currentSlider").innerHTML); this.explorerDom = $("currentSlider"); //MIHAI // this.observe(Explorer.EVENT.EXPLORER_LOADED, function(e) { // alert("intercepted explorer_loaded"); // this._analyseExplorer(e.response.responseText); // this.renderExplorer(this.explorerContainer, this.expSuccess, this.expFailure); // } .bind(this)); // this.observe(Explorer.EVENT.CONTENT_LOADED, function(e) { // alert("intercepted CONTENT_LOADED"); // // patch for history loading problem // if (e.contentID != expManager.getContent()) { // return; // } // //MIHAI // if (e.response) { // var html = e.response.responseText; // var tempContainer = new Element("div"); // tempContainer.innerHTML = html; // var content = tempContainer.down("div[id=CentralContent]"); // this.contentContainer.innerHTML = content.innerHTML; // // set page title // var reg = /

([\s\S]*)<\/title>/i; // var matches = html.substring(0, 1000).match(reg); // if (matches != null) { // if (matches.length >= 1) { // var title = matches[1].replace(/[\t\r\n]+/g, ""); // document.title = title; // if (Prototype.Browser.IE) { // dhtmlHistory.titlePatch(); // } // } // } // // eval omniture code. // try { // var omni = tempContainer.down("script[id=omniture_code]"); // var promo = tempContainer.down("script[id=promo_omniture]"); // var script = omni ? omni.innerHTML : ""; // script += promo ? promo.innerHTML : ""; // delete promoOmniture; // if (Prototype.Browser.IE) { // window.execScript(script); // } else if (Prototype.Browser.WebKit) { // window.setTimeout(script, 0); // } else { // window.eval(script); // } // if (promo && typeof (promoOmniture) == "function") { // promoOmniture(); // } // } catch (exc) { // if (DEBUG && enableConsole) { // console.log(exc.message); // } // } // } // this._fire(Explorer.EVENT.CONTENT_RENDERED, { // contentID: e.contentID, // url: e.url // }); // } .bind(this)); //MIHAI // this.observe(Explorer.EVENT.CONTENT_RENDERING, function(e) { // // uninstall billboard and map before loading new content // if (uninstallAllBillboards != null) { // uninstallAllBillboards(); // } // if (uninstallMaps != null) { // uninstallMaps(); // } // if (uninstallQuote != null) { // uninstallQuote(); // } // }); //MIHAI // this.observe(Explorer.EVENT.CONTENT_RENDERED, function(e) { // // promotion initialization methods // try { // playlist.load(); // loadAllBillboardData(); // initMap(); // showFlash(); // loadQuote(); // ShowAllPromotions(false); // FixSizePages(); // } catch (exc) { // if (DEBUG && enableConsole) { // console.log(exc.message); // } // } // }); //MIHAI // this.observe(Explorer.EVENT.ERROR, function(e) { // if (e.requestType == Explorer.REQUEST_TYPE.EXPLORER) { // this.renderExplorer(this.explorerContainer, this.expSuccess, this.expFailure); // } // // TODO: error handling // } .bind(this));};Explorer.prototype = { events: null, explorerID: null, explorerContainer: null, explorerDom: null, contentContainer: null, explorerHtml: null, items: null, statusFlag: null, response: null, expADA: null, //MIHAI // load: function() { // this._request({ // expID: this.explorerID, // requestType: Explorer.REQUEST_TYPE.EXPLORER, // event: Explorer.EVENT.EXPLORER_LOADED // }); // }, getItems: function(itemType) { var items = []; this.items.each(function(item, index) { if ((item.type & itemType) == itemType) { items.push(item); } }); return items; }, getItem: function(itemIndex) { return itemIndex < this.items.length ? this.items[itemIndex] : null; }, getId: function() { return this.explorerID; }, //MIHAI // renderExplorer: function(container, onSuccess, onFailure) { // alert("Render Explorer Called"); // // put the following 3 lines here can be better than put them in the "else" section // this.explorerContainer = container; // this.expSuccess = onSuccess; // this.expFailure = onFailure; // if (this.explorerHtml) { // if (container) { // this.explorerDom = new Element("div").update(this.explorerHtml); // container = $(container); // container.update(LOADING_IMG); // // already get result from server, and is sucessful (otherwise explorerHtml should be null) // this._fire(Explorer.EVENT.EXPLORER_RENDERING, { // expID: this.explorerID // }); // container.update(this.explorerDom); // if (Prototype.Browser.IE) { // container.setStyle("zoom: 1"); // } // this._fire(Explorer.EVENT.EXPLORER_RENDERED, { // expID: this.explorerID // }); // if (onSuccess) { // onSuccess({ // requestType: Explorer.REQUEST_TYPE.EXPLORER, // response: this.response[Explorer.REQUEST_TYPE.EXPLORER], // expID: this.explorerID // }); // } // } // } else if (this.statusFlag[Explorer.REQUEST_TYPE.EXPLORER] === false) { // if (onFailure) { // onFailure({ // requestType: Explorer.REQUEST_TYPE.EXPLORER, // response: this.response[Explorer.REQUEST_TYPE.EXPLORER] // }); // } // } // }, //MIHAI // renderContent: function(container, contentID, url, onSuccess, onFailure) { // alert("renderContent called"); // this._fire(Explorer.EVENT.CONTENT_RENDERING, { // contentID: contentID // }); // container = $(container); // container.update(LOADING_IMG); // this.contentContainer = container; // //MIHAI // // this._request({ // // requestType: Explorer.REQUEST_TYPE.CONTENT, // // event: Explorer.EVENT.CONTENT_LOADED, // // contentID: contentID, // // url: url // // }, onSuccess, onFailure); // }, work: function() { if (this.explorerDom) { container = this.explorerDom; this.expADA = new ADAKeyControl("exp", 50); this.expADA.setItemKey(Event.KEY_UP, Event.KEY_DOWN); this.expADA.setSubItemKey(Event.KEY_LEFT, Event.KEY_RIGHT); // add events for rollover var rollovers = container.select(".exp_item"); var isExpansionShown = false; rollovers.each(function(item, index) { var expItem = this.items[index]; switch (expItem.type) { case Explorer.ITEM_TYPE.ITEM: //param for condition var hidePopup = item.down('div.showOrNot'); var hidePopupValue = 'notShow'; if (hidePopup != undefined) { hidePopupValue = hidePopup.innerHTML; } // add title link var title = item.down(".exp_title"); if (DEBUG && !title && enableConsole) { console.log("Null title."); } title.onclick = function() { return true; }; // add image link var thumbnail = item.down(".exp_thumbnail"); var isListItem = false; if (thumbnail) { thumbnail.onclick = title.onclick; } else { //isListItem = true; } // add rollover event. (mouseover, mouseout) if (hidePopupValue == 'show') { var popup = item.down(".morehidden"); if (popup) { // disable setting height var blockTwo = popup.down(".block_two").hide(); var popupObj = new Popup(item, popup, { activeClass: "lihover", isAlwaysUpdate: true, popupContainer: $(document.body), showDelay: 0.5, hideDelay: 0.5, anchor: { target: Popup.Anchor.RIGHT | Popup.Anchor.TOP } }); // add expand panel event (click) var expandTitle = popup.down(".exp_title"); expandTitle.onclick = title.onclick; // add more info link var moreInfo = popup.down(".exp_moreinfo"); moreInfo.onclick = title.onclick; // expand panel event var expand = popup.down(".exp_expand"); var fold = popup.down(".exp_fold"); // disable expanded rollover expand.hide(); fold.hide(); // register add/remove favorite event var add = popup.down(".add"); var remove = popup.down(".remove"); var operating = popup.down(".operating"); if (add && remove && operating) { if (playlist.isInPlaylist(expItem.contentID)) { add.hide(); remove.show(); } else { add.show(); remove.hide(); } expItem.isMapItem = true; add.onclick = function() { addRemove(true, expItem.contentID, title.innerHTML); return false; }; remove.onclick = function() { addRemove(false, expItem.contentID, title.innerHTML); return false; }; favManager.add2Queue({ update: commonUpdate, data: { type: "explorer", expID: this.getId(), id: expItem.contentID, add: add, remove: remove, operating: operating } }); } else { expItem.isMapItem = false; } // rollover effect (optional) item.observe("popup:showing", function(event) { if (isMapExpanded) { if (parkMap && parkMap.isInMap(expItem.contentID)) { parkMap.showPopup(expItem.contentID); } event.stop(); } else if (!isListItem) { event.memo.popup.down("div").hide(); event.memo.popup.show(); slideRight(event.memo.popup.down("div"), { duration: 0.5, queue: { scope: "explorer" + index, position: "end" }, beforeStart: function() { var queue = Effect.Queues.get("explorer" + index); queue.each(function(effect) { effect.cancel(); }); event.memo.popup.setOpacity(1); }, afterFinish: function() { if (Prototype.Browser.IE && add && remove) { if (!add.visible()) { add.show(); add.hide(); } else { remove.show(); remove.hide(); } } hideSelect(event.memo.popup); } }); var imageContainer = popup.down(".block_one_img"); var image = imageContainer.down("img"); if (image.alt !== "") { var img = new Element("img"); img.onload = function() { imageContainer.update(img); }; img.src = image.alt; image.alt = ""; } event.memo.customEffect = true; } } .bind(this)); item.observe("popup:hiding", function(event) { this.expADA.reset(); if (isMapExpanded) { if (parkMap && parkMap.isInMap(expItem.contentID)) { parkMap.hidePopup(expItem.contentID); } event.stop(); } else if (!isListItem) { Effect.Fade(event.memo.popup, { duration: 0.5, queue: { scope: "explorer" + index, position: "end" }, beforeStart: function() { showSelect(event.memo.popup); } }); event.memo.customEffect = true; } } .bind(this)); // add ADA key control var subItemObjs = popup.select("a"); var subItems = []; subItemObjs.each(function(subItem, index) { subItems.push({ domObj: subItem }); }); this.expADA.addItem({ domObj: item, activeClass: "lihover", subItems: subItems }); } } else { Event.observe(item, 'mouseover', function() { item.setStyle({ background: '#fff' }); }); Event.observe(item, 'mouseout', function() { item.setStyle({ background: 'none' }); }); } break; case Explorer.ITEM_TYPE.EXTERNAL: //param for condition var hidePopup = item.down('div.showOrNot'); var hidePopupValue = 'notShow'; if (hidePopup != undefined) { hidePopupValue = hidePopup.innerHTML; } // add title link var title = item.down(".exp_title"); if (DEBUG && !title && enableConsole) { console.log("Null title."); } // add image link var thumbnail = item.down(".exp_thumbnail"); // add rollover event. (mouseover, mouseout) if (hidePopupValue == 'show') { var popup = item.down(".morehidden"); if (popup) { // disable setting height var blockTwo = popup.down(".block_two").hide(); var popupObj = new Popup(item, popup, { activeClass: "lihover", isAlwaysUpdate: true, popupContainer: $(document.body), showDelay: 0.5, hideDelay: 0.5, anchor: { target: Popup.Anchor.RIGHT | Popup.Anchor.TOP } }); // add expand panel event (click) var expandTitle = popup.down(".exp_title"); // add more info link var moreInfo = popup.down(".exp_moreinfo"); // expand panel event var expand = popup.down(".exp_expand"); var fold = popup.down(".exp_fold"); // disable expanded rollover expand.hide(); fold.hide(); // rollover effect (optional) item.observe("popup:showing", function(event) { event.memo.popup.down("div").hide(); event.memo.popup.show(); slideRight(event.memo.popup.down("div"), { duration: 0.5, queue: { scope: "explorer" + index, position: "end" }, beforeStart: function() { var queue = Effect.Queues.get("explorer" + index); queue.each(function(effect) { effect.cancel(); }); event.memo.popup.setOpacity(1); }, afterFinish: function() { hideSelect(event.memo.popup); } }); var imageContainer = popup.down(".block_one_img"); var image = imageContainer.down("img"); if (image.alt !== "") { var img = new Element("img"); img.onload = function() { imageContainer.update(img); }; img.src = image.alt; image.alt = ""; } event.memo.customEffect = true; /*}*/ } .bind(this)); item.observe("popup:hiding", function(event) { this.expADA.reset(); Effect.Fade(event.memo.popup, { duration: 0.5, queue: { scope: "explorer" + index, position: "end" }, beforeStart: function() { showSelect(event.memo.popup); } }); event.memo.customEffect = true; } .bind(this)); // add ADA key control var subItemObjs = popup.select("a"); var subItems = []; subItemObjs.each(function(subItem, index) { subItems.push({ domObj: subItem }); }); this.expADA.addItem({ domObj: item, activeClass: "lihover", subItems: subItems }); } } else { Event.observe(item, 'mouseover', function() { item.setStyle({ background: '#fff' }); }); Event.observe(item, 'mouseout', function() { item.setStyle({ background: 'none' }); }); } break; case Explorer.ITEM_TYPE.EXPLORER: // add explorer link item.onclick = function() { return true; } .bind(this); this.expADA.addItem({ domObj: item, activeClass: "lihover", subItems: [] }); // no break here case Explorer.ITEM_TYPE.PAGE: Event.observe(item, 'mouseover', function() { item.setStyle({ background: '#fff' }); }); Event.observe(item, 'mouseout', function() { item.setStyle({ background: 'none' }); }); break; } } .bind(this)); } }, uninstall: function() { var rollovers = $("currentSlider").select(".exp_item"); rollovers.each(function(item, index) { if (item.popup) { item.popup.unload(); } }); this.items.each(function(item, index) { if (item.isMapItem) { favManager.removeFromQueue({ type: "explorer", id: item.contentID }); } }); if (this.expADA) { this.expADA.uninstall(); } }, observe: function(targetEvent, handler) { if (!this.events[targetEvent]) { this.events[targetEvent] = []; } this.events[targetEvent].push(handler); }, _analyseExplorer: function(html) { var container = new Element("div").update(html); container.down("input[name=explorer_id]").remove(); var itemInfos = container.select("input[type=hidden]"); itemInfos.each(function(itemInfo, index) { var item = {}; var itemInfoParts = itemInfo.value.split("`|`"); if (itemInfo.name == "feature") { if (itemInfoParts.any(function(item) { return item === ""; })) { if (DEBUG && enableConsole) { console.log("Warning: Empty parameter from WAF\nfrom:explorer\nindex:%s\ndata:%s", index, itemInfoParts.inspect()); } } item = { type: Explorer.ITEM_TYPE.ITEM, url: itemInfoParts[0], contentID: itemInfoParts[1], title: itemInfoParts[2] }; } else if (itemInfo.name == "external") { if (itemInfoParts.any(function(item, index) { return item === "" && index != 1; })) { if (DEBUG && enableConsole) { console.log("Warning: Empty parameter from WAF\nfrom:explorer\nindex:%s\ndata:%s", index, itemInfoParts.inspect()); } } item = { type: Explorer.ITEM_TYPE.EXTERNAL, url: itemInfoParts[0] }; } else if (itemInfo.name == "explorer") { if (itemInfoParts.any(function(item, index) { return item === "" && index != 1; })) { if (DEBUG && enableConsole) { console.log("Warning: Empty parameter from WAF\nfrom:explorer\nindex:%s\ndata:%s", index, itemInfoParts.inspect()); } } item = { type: Explorer.ITEM_TYPE.EXPLORER, expID: itemInfoParts[0], contentID: itemInfoParts[1], url: itemInfoParts[2] }; } else if (itemInfo.name == "page") { item = { type: Explorer.ITEM_TYPE.PAGE, url: itemInfo.value }; } else if (DEBUG && enableConsole) { console.log("unrecognized information: %s", itemInfo.name); } this.items.push(item); if (!DEBUG) { itemInfo.remove(); } } .bind(this)); this.explorerHtml = container.innerHTML; }, _fire: function(targetEvent, e) { e.event = targetEvent; var eventQueue = this.events[targetEvent]; if (eventQueue) { eventQueue.each(function(item) { try { item.apply(this, [e]); } catch (exc) { if (DEBUG && enableConsole) { console.log(exc.message); } } }); } } //MIHAI // _request: function(params, onSuccess, onFailure) { // var request = new Ajax.Request(getExplorerURL(params), { // method: "post", // parameters: $H(params), // onSuccess: function(response) { // this.statusFlag[params.requesting] = true; // var e = { // requestType: params.requestType, // response: response, // expID: params.expID, // contentID: params.contentID, // url: params.url // }; // this._fire(params.event, e); // if (onSuccess) { // onSuccess(e); // } // } .bind(this), // onFailure: function(response) { // if (DEBUG && enableConsole) { // console.log("explorer failed to connect to server."); // } // this.statusFlag[params.requestType] = false; // var e = { // response: response, // requestType: params.requestType // }; // this._fire(Explorer.EVENT.ERROR, e); // if (onFailure) onFailure(e); // } .bind(this) // }); // }};//Explorer.EVENT = {// EXPLORER_LOADED: 0,// CONTENT_LOADED: 1,// EXPLORER_RENDERED: 2,// CONTENT_RENDERED: 3,// EXPLORER_RENDERING: 4,// CONTENT_RENDERING: 5// ERROR: -1//};Explorer.REQUEST_TYPE = { EXPLORER: 0, CONTENT: 1};Explorer.ITEM_TYPE = { ITEM: 1, PAGE: 2, EXPLORER: 4, EXTERNAL: 5};//MIHAI//function getExplorerURL(params) {// if (params.requestType == Explorer.REQUEST_TYPE.EXPLORER) {// return EXP_HANDLER;// } else {// if (DEBUG && (window.location.host.toLowerCase() === "localhost"//|| window.location.host === "127.0.0.1")) {// return "/TestPages/Default.aspx";// } else {// return params.url;// }// }//}var ExpManager = function() { };ExpManager.prototype = { sequence: 0, current: null, currentContent: $("ComponentID") ? $("ComponentID").value : null, currentUrl: new String(window.location.pathname), cached: [], defaultExplorer: $("currentSlider") ? $("currentSlider").down("input[name=explorer_id]").value : null, defaultContent: $("ComponentID") ? $("ComponentID").value : null, defaultPage: new String(window.location.pathname), expLock: false, contentLock: false, expQueue: null, contentQueue: null, // slide: function(expID, direction, historyInfo) { // // avoid sliding too many times in a short time // if (!this.expLock) { // this.expLock = true; // } else { // this.expQueue = function() { // this.slide(expID, direction, historyInfo); // } .bind(this); // return; // } // var current = this.current; // var slideExp = true; // var changeContent = (historyInfo.contentID && historyInfo.contentID != ""); // var explorer; // if (this.current) { // // requesting the same explorer. do not slide // slideExp = expID != this.current.getId(); // if (slideExp) { // // remove all features in current explorer from map. // var ids = current.getItems(Explorer.ITEM_TYPE.ITEM).pluck("contentID"); // if (parkMap) { // parkMap.reloadFeatures(false, ids); // } // if (miniMap) { // miniMap.reloadFeatures(false, ids); // } // this.current.uninstall(); // } // } // if (slideExp) { // explorer = this._getItemById(expID); // this.current = explorer; // } // var sliderContainer = $("sliderContainer"); // var currentSlider = $("currentSlider"); // var leftSlider = $("leftSlider"); // var rightSlider = $("rightSlider"); // var completeState = 0; // // load new features in new explorer. should be invoked after // // new explorer (if any) finish loading // var reloadFeatures = function() { // var ids = this.current.getItems(Explorer.ITEM_TYPE.ITEM).pluck("contentID"); // if (parkMap) { // parkMap.reloadFeatures(true, ids); // } // if (miniMap) { // miniMap.reloadFeatures(true, ids); // } // } .bind(this); // var moveExplorer = Prototype.emptyFunction; // var expFinish = function() { // if (++completeState == 2) { // if (slideExp) { // // explorer begin to function // explorer.work(); // // move content from temp slider to current slider // moveExplorer(); // reloadFeatures(); // } // // render content if the explorer has a landing page // if (changeContent) { // this.renderContent(historyInfo.contentID, { // contentID: historyInfo.contentID, // url: historyInfo.url, // addHistory: false // }); // } // // add AJAX history if required // if (historyInfo.addHistory) { // dhtmlHistory.add(this._getQueryString(), null); // } // // invoke queue function if there's anything in queue // this.expLock = false; // var expQueue = this.expQueue; // this.expQueue = null; // if (expQueue) { // expQueue(); // } // fixContentHeight(); // } // } .bind(this); // if (!slideExp) { // completeState = 1; // expFinish(); // return; // } // switch (direction) { // case expManager.DIRECTION.RIGHT: // moveExplorer = function() { // var expContent = leftSlider.down("div"); // expContent.remove(); // leftSlider.update(LOADING_IMG); // currentSlider.update(expContent); // sliderContainer.setStyle({ // left: -currentSlider.getWidth() + "px" // }); // }; // explorer.renderExplorer(leftSlider, expFinish.bind(this)); // var move = new Effect.Move(sliderContainer, { // duration: 0.5, // y: 0, // x: currentSlider.getWidth(), // beforeStart: pauseAllBillboards, // afterFinish: function() { // resumeAllBillboards(); // expFinish(); // } .bind(this) // }); // break; // case expManager.DIRECTION.LEFT: // moveExplorer = function() { // var expContent = rightSlider.down("div"); // expContent.remove(); // rightSlider.update(LOADING_IMG); // currentSlider.update(expContent); // sliderContainer.setStyle({ // left: -currentSlider.getWidth() + "px" // }); // }; // explorer.renderExplorer(rightSlider, expFinish.bind(this)); // move = new Effect.Move(sliderContainer, { // duration: 0.5, // y: 0, // x: -currentSlider.getWidth(), // beforeStart: pauseAllBillboards, // afterFinish: function() { // resumeAllBillboards(); // expFinish(); // } .bind(this) // }); // break; // case expManager.DIRECTION.NONE: // explorer.renderExplorer(currentSlider, function(e) { // completeState = 1; // expFinish(); // } .bind(this)); // break; // } // }, //MIHAI // renderContent: function(contentID, historyInfo, onSuccess, onFailure) { // this.contentLock = true; // // requesting the same content as current one. do nothing // if (contentID == this.currentContent) { // return; // } // if (contentID == null) { // return; // } // this.currentUrl = historyInfo.url; // this.currentContent = contentID; // var miniMapContainer = $('miniMapContainer'); // if (miniMapContainer != null && isMapExpanded) { // miniMapContainer.popup.hide(); // } // this.current.renderContent($("CentralContent"), contentID, historyInfo.url, function() { // fixContentHeight(); // if (onSuccess) { // onSuccess(); // } // }, onFailure); // if (historyInfo.addHistory) { // dhtmlHistory.add(this._getQueryString(), null); // } // // For Koopa's "Send to Friend" // if ($("topOption_hydUrlPage")) { // $("topOption_hydUrlPage").value = historyInfo.url; // } // }, /** * get current explorer */ getExplorer: function() { return this.current; }, getContent: function() { return this.currentContent; }, init: function() { var firstExpID = $("currentSlider").down("input[name=explorer_id]"); var explorer = new Explorer(firstExpID.value); //MIHAI // var initContainer = new Element("div"); // explorer.renderExplorer(initContainer, function(e) { // $("currentSlider").update(initContainer); // explorer.work(); // initMap(); // loadAllBillboardData(); // }); fixContentHeight(); explorer.work(); initMap(); loadAllBillboardData(); this.current = explorer; }, historyHandler: function(newLocation, historyData) { var params = $H(newLocation.toQueryParams()); var expID = params.get("expID"); expID = expID ? decodeTcm(expID) : this.defaultExplorer; var contentID = params.get("contentID"); contentID = contentID ? decodeTcm(contentID) : this.defaultContent; var page = params.get("page"); page = page ? getUrl(page) : this.defaultPage; var sequence = params.get("seq"); sequence = sequence ? sequence : 0; var direction; if (this.sequence > sequence) { direction = expManager.DIRECTION.RIGHT; } else if (this.sequence < sequence) { direction = expManager.DIRECTION.LEFT; } else { direction = expManager.DIRECTION.NONE; } this.sequence = sequence; this.slide(expID, direction, { addHistory: false, contentID: contentID, url: page }); }, _getQueryString: function() { var params = { page: convertUrl(this.currentUrl), expID: encodeTcm(this.current.getId()), contentID: encodeTcm(this.currentContent), seq: ++this.sequence }; return $H(params).toQueryString(); } //MIHAI // _getItemById: function(id) { // for (var i = this.cached.length - 1; i >= 0; i--) { // var item = this.cached[i]; // if (item.getId() == id) { // return item; // } // } // var explorer = new Explorer(id); // explorer.observe(Explorer.EVENT.EXPLORER_RENDERED, function(e) { // // build pre-load cache // var expItems = explorer.getItems(Explorer.ITEM_TYPE.EXPLORER); // expItems.each(function(expItem, index) { // this._getItemById(expItem.expID); // } .bind(this)); // fixContentHeight(); // } .bind(this)); // //explorer.load(); // this._cache(explorer); // return explorer; // }, // _cache: function(exp) { // this.cached.push(exp); // if (this.cached.length > this.CACHE_SIZE) { // this.cached.shift(); // } // }};var expManager;if ($("currentSlider")) { expManager = new ExpManager();} else { expManager = {};}function fixContentHeight() { // set height of center area var main = $("main"); if (main.down(".right") || main.down(".right_Info")) { if ($("right")) { main.setStyle("background: #D7EBFF url('/Images/right_bg.gif') repeat-y scroll 251px 0;"); } else { main.setStyle("background: #D7EBFF url('/Images/right_bg_w.gif') repeat-y scroll 251px 0;"); } }}// the cache size for explorers.// If an explorer is not in the cache, it will be loaded from serverexpManager.CACHE_SIZE = 30;expManager.DIRECTION = { NONE: 0, LEFT: 1, RIGHT: 2};function convertUrl(url) { return url.substring(1, url.length).dasherize().replace(/\//g, "_").replace(/\.aspx/g, ".html");}function getUrl(url) { return "/" + url.replace(/_/g, "/").replace(/\-/g, "_").replace(/\.html/g, ".aspx");}function encodeTcm(tcm) { return tcm.replace(/tcm\:/g, "");}function decodeTcm(tcm) { return "tcm:" + tcm;}playlist = new Playlist();playlist.load(function() { if ($("currentSlider")) { expManager.init(); dhtmlHistory.addListener(expManager.historyHandler.bind(expManager)); } else { try { loadAllBillboardData(); initMap(); } catch (e) { if (DEBUG && enableConsole) { console.log(e.message); } } }},function() { // Error handling goes here.});// lines from here are for "add to map" button// these functions will call web methods to get information from server,// also show confirm box and so on.var titleVar, componentIDVar, executeConfirm = 'False';function AddMap() { DisabledControl($('topOption_btnAddMap'), true); var chkShowAddMap = $('topOption_chkShowAddMap'); favManager.update({ status: "operating", id: componentIDVar }); PageMethods.AddMethod(componentIDVar, true, chkShowAddMap.checked, function() { // success favManager.update({ success: true, status: "added", id: componentIDVar }); playlist.addItem(componentIDVar); }, function() { // failed favManager.update({ success: false, status: "added", id: componentIDVar }); window.location = ErrorPage; }); var textAddMapConfirm = $("topOption_hdnTextAddMapConfirm").value; $('topOption_lblTextAddMapConfirm').innerHTML = textAddMapConfirm.replace("[AttractionName]", titleVar); if (chkShowAddMap.checked) { ShowPopupMap = "True"; } else { ShowPopupMap = "False"; } $("TitleAdd").style.display = "none"; $("TitleAddConfirmation").style.display = "block"; $("TextAdd").style.display = "none"; $("TextAddConfirmation").style.display = "block"; $("dvShowAddMap").style.display = "none"; $("dvCancelMap").style.display = "none"; $("dvAddMap").style.display = "none"; $("dvCloseMap").style.display = "block"; $("dvShowMapOptionAdd").style.display = "block"; executeConfirm = 'True'; DisabledControl($('topOption_btnAddMap'), false);}function RemoveMap() { DisabledControl($('topOption_btnRemoveMap'), true); var chkShowRemoveMap = $('topOption_chkShowRemoveMap'); favManager.update({ status: "operating", id: componentIDVar }); PageMethods.RemoveMethod(componentIDVar, true, chkShowRemoveMap.checked, function() { // success favManager.update({ success: true, status: "removed", id: componentIDVar }); playlist.removeItem(componentIDVar); }, function() { // failed favManager.update({ success: false, status: "removed", id: componentIDVar }); window.location = ErrorPage; }); if (chkShowRemoveMap.checked) { ShowPopupMap = "True"; } else { ShowPopupMap = "False"; } switchEmailBox(false, $("removeMap_Box")); DisabledControl($('topOption_btnRemoveMap'), false);}function addRemove(isAdd, componentID, title) { componentIDVar = componentID; title = title.replace(//g, ""); // Replace the spaces in the title of Add or Remove map box. titleVar = title; executeConfirm = 'False'; if (ShowPopupMap == "True") { addRemoveTotal(isAdd, componentID); } else { var titleAddMapText = $("topOption_hdnTitleAddMap").value; var titleRemoveMapText = $("topOption_hdnTitleRemoveMap").value; if (!isAdd) { switchEmailBox(true, $("removeMap_Box")); $('topOption_lblTitleRemoveMap').innerHTML = titleRemoveMapText.replace("[AttractionName]", title); $('topOption_btnRemoveMap').focus(); } else { switchEmailBox(true, $("addMap_Box")); $('topOption_lblTitleAddMap').innerHTML = titleAddMapText.replace("[AttractionName]", title); $('topOption_btnAddMap').focus(); } }}function addRemoveTotal(isAdd, componentID) { favManager.update({ status: "operating", id: componentID }); if (!isAdd) { PageMethods.RemoveMethod(componentIDVar, false, true, function() { // success favManager.update({ success: true, status: "removed", id: componentID }); playlist.removeItem(componentIDVar); }, function() { // failed favManager.update({ success: false, status: "removed", id: componentID }); window.location = ErrorPage; }); } else { PageMethods.AddMethod(componentIDVar, false, true, function() { // success favManager.update({ success: true, status: "added", id: componentID }); playlist.addItem(componentIDVar); }, function() { // failed favManager.update({ success: false, status: "added", id: componentID }); window.location = ErrorPage; }); }}// add to map function endfunction ExplorerBoxExecute(e, ExplorerOption) { if (window.event) // IE { keynum = e.keyCode; } else if (e.which) // Netscape/Firefox/Opera { keynum = e.which; } if (keynum == 13) { if (ExplorerOption == "AddExplorer") { if (executeConfirm == 'False') { AddMap(); } else { CloseExplorerConfirmation($('addMap_Box')); } } else if (ExplorerOption == "RemoveExplorer") { if (executeConfirm == 'False') { RemoveMap(); } else { CloseExplorerConfirmation($('removeMap_Box')); } } return false; } if (keynum == 27) { if (ExplorerOption == "AddExplorer") { CloseExplorerConfirmation($('addMap_Box')); } else if (ExplorerOption == "RemoveExplorer") { CloseExplorerConfirmation($('removeMap_Box')); } return false; }}function DisabledControl(control, value) { control.disabled = value;}function CloseExplorerConfirmation(boxConfirm) { $('topOption_chkShowAddMap').checked = false; $('topOption_chkShowRemoveMap').checked = false; $("TitleAdd").style.display = "block"; $("TitleAddConfirmation").style.display = "none"; $("TextAdd").style.display = "block"; $("TextAddConfirmation").style.display = "none"; $("dvShowAddMap").style.display = "block"; $("dvCancelMap").style.display = "block"; $("dvAddMap").style.display = "block"; $("dvCloseMap").style.display = "none"; $("dvShowMapOptionAdd").style.display = "none"; switchEmailBox(false, boxConfirm); return false;}<?xml version="1.0" encoding="utf-16"??><?xml version="1.0" encoding="utf-16"??><span><img alt="Universal Studios Florida - Parque Temático (4)" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" title="Universal Studios Florida - Parque Temático (4)" class="lazyload" referrerpolicy="no-referrer" data-src="https://cdn.statically.io/img/portuguese.universalorlando.com/f=auto//Images/uor_logo_tcm8-22996.png" data-src2="https://portuguese.universalorlando.com/Images/uor_logo_tcm8-22996.png" onerror="if(this.src==this.getAttribute('data-src2')){onImageError(this,true)}else{this.src=this.getAttribute('data-src2')}"></span><div><div><div><p>A nova geração do entretenimento cinematográfico está em cartaz no Universal Studios <a href="https://nicolevaughn.com/goto?target=eyJpdiI6InoxM2dsTDl2bTZwdS9KekZKRjFNZXc9PSIsInZhbHVlIjoiQkRuZllwbzZQOUNYOFZUQkxuUWNUaFNoOEplT1J6RDcySFRjUmxnVWE4bEpMK3VyT05nRk9QUFdwMmllUnZEb0FMQ05NU2Z0Tm85NVdZTWxXOG1BeFE9PSIsIm1hYyI6ImE5NzVlMDM2NjcwMDBhYWM5YzZjNmUxYjQ0NDc5N2ExN2FhMWJjMmZiNmZlYzliMDk0N2QxNjJhOTg2ZWU2ODAiLCJ0YWciOiIifQ%3D%3D" title="Florida" target="_blank" rel="noopener noreferrer nofollow">Florida</a>. Viva um dia incrível e cheio de diversão em um estúdio real de filmes e TV, com passeios, shows e atrações que oferecem uma experiência imersiva como você nunca viu.</p><p><span>Compre já o seu ingresso</span></p></div><div><p><img alt="Universal Studios Florida - Parque Temático (5)" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="lazyload" referrerpolicy="no-referrer" title="Universal Studios Florida - Parque Temático (5)" data-src="https://cdn.statically.io/img/portuguese.universalorlando.com/f=auto//Images/subheader_left_tcm8-23208.gif" data-src2="https://portuguese.universalorlando.com/Images/subheader_left_tcm8-23208.gif" onerror="if(this.src==this.getAttribute('data-src2')){onImageError(this,true)}else{this.src=this.getAttribute('data-src2')}"><img alt="Universal Studios Florida - Parque Temático (6)" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="lazyload" referrerpolicy="no-referrer" title="Universal Studios Florida - Parque Temático (6)" data-src="https://cdn.statically.io/img/portuguese.universalorlando.com/f=auto//Images/subheader_right_tcm8-23210.gif" data-src2="https://portuguese.universalorlando.com/Images/subheader_right_tcm8-23210.gif" onerror="if(this.src==this.getAttribute('data-src2')){onImageError(this,true)}else{this.src=this.getAttribute('data-src2')}"></p><p>The Wizarding World of Harry Potter™ - Diagon Alley™</p><p>Muitas emoções e experiências mágicas esperam por você no The Wizarding World of Harry Potter™ – Diagon Alley™. Prove as delícias do Leaky Cauldron™, faça compras nas lojas mais famosas, incluindo a Weasleys’ Wizard Wheezes, e veja o lado negro da magia em Knockturn Alley.</p><p>Toda magia e aventura te esperam com a do The Wizarding World of Harry Potter™ – Diagon Alley™. Experimente restaurante Leaky Cauldron™, visite as mais famosas lojas incluindo a Weasleys’ Wizard Wheezes, e conheça o lado obscuro da magia em Knockturn Alley.</p><div><p><strong>Harry Potter and the Escape from Gringotts™</strong><br>Dentro de Gringotts™ você cominhará pelo enorme lobby de mármore e verá os duendes de Gringotes trabalhando. Em seguida passe por entradas cavernosas que te levará ao mundo subterrâneo de Gringotts™. Esta atração em 3-D multi-dimensional o coloca bem no meio da ação, onde as mais recentes tecnologias combinadas com efeitos especiais criam uma experiência completamente imersiva e uma aventura inesquecível.</p><p><strong>Hogwarts™ Express*</strong><br>Os hóspedes com ingresso de Park-a-Park podem atravessar a parede de tijolos da Platform 9 3/4™, viajar de trem saindo da estação de Kings Cross, no Universal Studios <a href="https://nicolevaughn.com/goto?target=eyJpdiI6InoxM2dsTDl2bTZwdS9KekZKRjFNZXc9PSIsInZhbHVlIjoiQkRuZllwbzZQOUNYOFZUQkxuUWNUaFNoOEplT1J6RDcySFRjUmxnVWE4bEpMK3VyT05nRk9QUFdwMmllUnZEb0FMQ05NU2Z0Tm85NVdZTWxXOG1BeFE9PSIsIm1hYyI6ImE5NzVlMDM2NjcwMDBhYWM5YzZjNmUxYjQ0NDc5N2ExN2FhMWJjMmZiNmZlYzliMDk0N2QxNjJhOTg2ZWU2ODAiLCJ0YWciOiIifQ%3D%3D" title="Florida" target="_blank" rel="noopener noreferrer nofollow">Florida</a>™, e indo para e da Estação de Hogsmeade™ no Universal’s Islands of Adventure™, vivendo uma experiência diferente em cada trajeto. Haverá duas experiências únicas nos parques temáticos trazendo ainda mais da jornada de Harry Potter à vida.</p><p>A Hogwarts™ Express estará fechada de 9 a 6 de junho de 2022 para manutenção preventiva.</p><p>*Restrições adicionais podem ser aplicadas.</p></div><p><img alt="Universal Studios Florida - Parque Temático (7)" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="lazyload" referrerpolicy="no-referrer" title="Universal Studios Florida - Parque Temático (7)" data-src="https://cdn.statically.io/img/portuguese.universalorlando.com/f=auto//Images/subheader_left_tcm8-23208.gif" data-src2="https://portuguese.universalorlando.com/Images/subheader_left_tcm8-23208.gif" onerror="if(this.src==this.getAttribute('data-src2')){onImageError(this,true)}else{this.src=this.getAttribute('data-src2')}"><img alt="Universal Studios Florida - Parque Temático (8)" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="lazyload" referrerpolicy="no-referrer" title="Universal Studios Florida - Parque Temático (8)" data-src="https://cdn.statically.io/img/portuguese.universalorlando.com/f=auto//Images/subheader_right_tcm8-23210.gif" data-src2="https://portuguese.universalorlando.com/Images/subheader_right_tcm8-23210.gif" onerror="if(this.src==this.getAttribute('data-src2')){onImageError(this,true)}else{this.src=this.getAttribute('data-src2')}"><div class="leading-7 bg-primary-100 rounded-lg px-2 py-3 font-semibold insert" style="color: rgb(37, 99, 235)"><div class="text-lg ml-1 insert" style="margin-top: 0.2rem; margin-bottom: 0.2rem">See Also</div><a class="list-item toc-h2 underline py-1" style="border-bottom: none" href="https://nicolevaughn.com/article/cultura-espanola-caracteristicas-vestimenta-religion-y-mas" target="_blank" rel="noopener">Cultura española: caracteristicas, vestimenta, religion, y más</a><a class="list-item toc-h2 underline py-1" style="border-bottom: none" href="https://nicolevaughn.com/article/gastronomy-in-peru-delicious-fusion-cuisine-pacific-coast-andean-mountains-amazon-rainforest-northern-peru-amazonia-tours-kuelap-gocta-amazon-river-cruises-lodges" target="_blank" rel="noopener">Gastronomy in Peru | Delicious Fusion Cuisine | Pacific Coast, Andean Mountains & Amazon Rainforest — Northern Peru & Amazonia Tours | Kuelap & Gocta | Amazon River Cruises & Lodges</a><a class="list-item toc-h2 underline py-1" style="border-bottom: none" href="https://nicolevaughn.com/article/453-italian-restaurant-name-ideas-to-wake-your-taste-buds-soocial" target="_blank" rel="noopener">453 Italian Restaurant Name Ideas to Wake Your Taste Buds | Soocial</a></div></p><p>Central de Produção</p><p>Atravesse os arcos do Universal Studios® e você se verá no meio de um verdadeiro estúdio cinematográfico e de televisão, onde Hollywood se encontra com <a href="https://nicolevaughn.com/goto?target=eyJpdiI6InhZTUdWTmNNRDBVTXlMeENiUERIMUE9PSIsInZhbHVlIjoiT3kxVWNDaW5YalR4SkF6eUFSK1VmTTl4Y3dCd0NPSFhkSWp1TVd2OXF2OUdkRWVrbWZKWUNRWW1IVWJCb3YzNndEQ2s1WEhtcG5CNDdXN2VGOU9tMHc9PSIsIm1hYyI6Ijk1ZWUwMWRhYTcwN2U5ZDBjYzRhNjYyOThjYzY5N2U1ZTA3OWE5OGI4MWYzMTgwNWFhY2ZlYmIxMWQ5OGJjMDciLCJ0YWciOiIifQ%3D%3D" title="Orlando" target="_blank" rel="noopener noreferrer nofollow">Orlando</a>, e a arte de fazer filmes encontra a emoção de vivenciá-los.</p><div><p><strong>TRANSFORMERS: The Ride–3D</strong><br>A nova atração TRANSFORMERS: The Ride–3D é uma experiência ultra-sensorial que transportará você ao centro de uma guerra intergalática entre Autobots e Decepticons.</p><p><strong><em>Despicable Me</em> Minion Mayhem</strong><br>Junte-se ao Gru, suas filhas e aos travessos Minions nesta divertidíssima atração.</p><p><strong>Hollywood Rip Ride Rockit<sup>®</sup></strong><br>Leve sua música para dar uma volta<sup>®</sup>! Nesta montanha-russa multissensorial VOCÊ escolhe a música que quer escutar durante o percurso, enquanto câmeras registram cada momento da sua experiência.</p><div class="insert"><div class="text-center insert" style="margin: 0"><div class="insert text-white bg-primary-600 py-2 px-4 font-semibold inline-block rounded" style="margin: 0">(Video) Universal Studios Orlando</div></div><div class="insert video-container" style="margin-top: 0.2rem; margin-bottom: 2rem"><iframe class="lazyload mt-2 mx-auto max-w-full" width="560" height="315" data-src="https://www.youtube.com/embed/vCIuNk6wHaI" title="Universal Studios Orlando" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div></div></div><p><img alt="Universal Studios Florida - Parque Temático (9)" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="lazyload" referrerpolicy="no-referrer" title="Universal Studios Florida - Parque Temático (9)" data-src="https://cdn.statically.io/img/portuguese.universalorlando.com/f=auto//Images/subheader_left_tcm8-23208.gif" data-src2="https://portuguese.universalorlando.com/Images/subheader_left_tcm8-23208.gif" onerror="if(this.src==this.getAttribute('data-src2')){onImageError(this,true)}else{this.src=this.getAttribute('data-src2')}"><img alt="Universal Studios Florida - Parque Temático (10)" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="lazyload" referrerpolicy="no-referrer" title="Universal Studios Florida - Parque Temático (10)" data-src="https://cdn.statically.io/img/portuguese.universalorlando.com/f=auto//Images/subheader_right_tcm8-23210.gif" data-src2="https://portuguese.universalorlando.com/Images/subheader_right_tcm8-23210.gif" onerror="if(this.src==this.getAttribute('data-src2')){onImageError(this,true)}else{this.src=this.getAttribute('data-src2')}"></p><p>Nova Iorque</p><p>Os cenários das ruas de Nova Iorque reproduzem o pano de fundo das produções ambientadas na grande cidade, desde um beco da década de 1920 até parques urbanos e modernas residências de Manhattan.</p><div><p><strong>Race Through New York Starring Jimmy Fallon™</strong><br>Curta com o anfitrião do The Tonight Show em uma perseguição pela cidade cheia de diversão. Primeiro, garanta seu lugar na Virtual Line™, cheque sua hora de voltar e ser um convidado do Tonight Show! Vivencie a história e diversão do programa no Studio 6B. Mande um recado de "Obrigado" nas recepções interativas; divirta-se com uma performance hip hop do The Ragtime Gals em uma barbearia e muito mais. Em seguida, junte-se a Jimmy Fallon em uma corrida que te leva por todos os cantos da cidade de Nova York.</p><p><strong>Revenge of the Mummy<sup>®</sup> the Ride</strong><br>Atração temporariamente fechada para manutenção, de 7 de janeiro até meados de 2022.</p><p>Mergulhe em uma escuridão total e enfrente escaravelhos, bolas de fogo e um exército de múmias guerreiras!</p><p><strong>The Blues Brothers<sup>®</sup></strong><br>Uma grande festa na rua Delancey em Nova Iorque com Jake e Elwood, os bad boys do blues.</p></div><p><img alt="Universal Studios Florida - Parque Temático (11)" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="lazyload" referrerpolicy="no-referrer" title="Universal Studios Florida - Parque Temático (11)" data-src="https://cdn.statically.io/img/portuguese.universalorlando.com/f=auto//Images/subheader_left_tcm8-23208.gif" data-src2="https://portuguese.universalorlando.com/Images/subheader_left_tcm8-23208.gif" onerror="if(this.src==this.getAttribute('data-src2')){onImageError(this,true)}else{this.src=this.getAttribute('data-src2')}"><img alt="Universal Studios Florida - Parque Temático (12)" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="lazyload" referrerpolicy="no-referrer" title="Universal Studios Florida - Parque Temático (12)" data-src="https://cdn.statically.io/img/portuguese.universalorlando.com/f=auto//Images/subheader_right_tcm8-23210.gif" data-src2="https://portuguese.universalorlando.com/Images/subheader_right_tcm8-23210.gif" onerror="if(this.src==this.getAttribute('data-src2')){onImageError(this,true)}else{this.src=this.getAttribute('data-src2')}"></p><p>Hollywood<div class="insert"><div class="text-center insert" style="margin: 0"><div class="insert text-white bg-primary-600 py-2 px-4 font-semibold inline-block rounded" style="margin: 0">(Video) Epic Universe, El Nuevo Parque de Universal Studios en Orlando</div></div><div class="insert video-container" style="margin-top: 0.2rem; margin-bottom: 2rem"><iframe class="lazyload mt-2 mx-auto max-w-full" width="560" height="315" data-src="https://www.youtube.com/embed/JRnWq3YhSKw" title="Epic Universe, El Nuevo Parque de Universal Studios en Orlando" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div></div></p><p>O brilho e o glamour da capital mundial do cinema foram recentemente recriados aqui. A magia de Hollywood pode ser reconhecida pelos prédios que são pontos de referência da cidade e calçadas cobertas com as estrelas da fama.</p><div><p><strong>The Bourne Stuntacular</strong><br><strong>A PERSEGUIÇÃO COMEÇOU.</strong><br>The Bourne Stuntacular está em cartaz no Universal Studios <a href="https://nicolevaughn.com/goto?target=eyJpdiI6InoxM2dsTDl2bTZwdS9KekZKRjFNZXc9PSIsInZhbHVlIjoiQkRuZllwbzZQOUNYOFZUQkxuUWNUaFNoOEplT1J6RDcySFRjUmxnVWE4bEpMK3VyT05nRk9QUFdwMmllUnZEb0FMQ05NU2Z0Tm85NVdZTWxXOG1BeFE9PSIsIm1hYyI6ImE5NzVlMDM2NjcwMDBhYWM5YzZjNmUxYjQ0NDc5N2ExN2FhMWJjMmZiNmZlYzliMDk0N2QxNjJhOTg2ZWU2ODAiLCJ0YWciOiIifQ%3D%3D" title="Florida" target="_blank" rel="noopener noreferrer nofollow">Florida</a>. Esse show de acrobacias deixará a plateia maravilhada e se perguntando: "Como eles fizeram isso?" Através de uma inovadora fusão de atuação e cinema, você acompanha nosso herói Jason Bourne através de três continentes enquanto personagens assustadores o perseguem na esperança de levá-lo de volta para dentro da tela. Esqueça tudo o que você aprendeu sobre show de acrobacias. O Universal <a href="https://nicolevaughn.com/goto?target=eyJpdiI6InhZTUdWTmNNRDBVTXlMeENiUERIMUE9PSIsInZhbHVlIjoiT3kxVWNDaW5YalR4SkF6eUFSK1VmTTl4Y3dCd0NPSFhkSWp1TVd2OXF2OUdkRWVrbWZKWUNRWW1IVWJCb3YzNndEQ2s1WEhtcG5CNDdXN2VGOU9tMHc9PSIsIm1hYyI6Ijk1ZWUwMWRhYTcwN2U5ZDBjYzRhNjYyOThjYzY5N2U1ZTA3OWE5OGI4MWYzMTgwNWFhY2ZlYmIxMWQ5OGJjMDciLCJ0YWciOiIifQ%3D%3D" title="Orlando" target="_blank" rel="noopener noreferrer nofollow">Orlando</a> Resort não está apenas expandindo os limites com o The Bourne Stuntacular. Este show está traçando um novo território.</p><p><strong>Universal Horror Make-Up Show</strong><br>Aprenda os truques por trás dos melhores maquiadores de efeitos especiais de Hollywood</p></div><p><img alt="Universal Studios Florida - Parque Temático (13)" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="lazyload" referrerpolicy="no-referrer" title="Universal Studios Florida - Parque Temático (13)" data-src="https://cdn.statically.io/img/portuguese.universalorlando.com/f=auto//Images/subheader_left_tcm8-23208.gif" data-src2="https://portuguese.universalorlando.com/Images/subheader_left_tcm8-23208.gif" onerror="if(this.src==this.getAttribute('data-src2')){onImageError(this,true)}else{this.src=this.getAttribute('data-src2')}"><img alt="Universal Studios Florida - Parque Temático (14)" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="lazyload" referrerpolicy="no-referrer" title="Universal Studios Florida - Parque Temático (14)" data-src="https://cdn.statically.io/img/portuguese.universalorlando.com/f=auto//Images/subheader_right_tcm8-23210.gif" data-src2="https://portuguese.universalorlando.com/Images/subheader_right_tcm8-23210.gif" onerror="if(this.src==this.getAttribute('data-src2')){onImageError(this,true)}else{this.src=this.getAttribute('data-src2')}"></p><p>World Expo</p><p>Remontando o cenário de uma exposição mundial, a World Expo é uma mistura do futuro com o clássico. Aqui você encontrará a feira mundial de 1964 "The Universe and You (O universo e você)" que pode não ser o que parece.<div class="leading-7 bg-primary-100 rounded-lg px-2 py-3 font-semibold insert" style="color: rgb(37, 99, 235)"><div class="text-lg ml-1 insert" style="margin-top: 0.2rem; margin-bottom: 0.2rem">See Also</div><a class="list-item toc-h2 underline py-1" style="border-bottom: none" href="https://nicolevaughn.com/article/vocabulario-de-cocina-las-palabras-que-todo-chef-deberia-conocer-descarga-nuestro-pdf-gratis" target="_blank" rel="noopener">▷ Vocabulario de cocina: Las palabras que todo Chef debería conocer | Descarga nuestro PDF gratis</a><a class="list-item toc-h2 underline py-1" style="border-bottom: none" href="https://nicolevaughn.com/article/anahuac-carrera-en-gastronomia-mextudia-2" target="_blank" rel="noopener">Anáhuac Carrera en Gastronomía | Mextudia</a><a class="list-item toc-h2 underline py-1" style="border-bottom: none" href="https://nicolevaughn.com/article/conoce-cuales-son-las-especialidades-en-la-gastronomia" target="_blank" rel="noopener">🧑‍🍳 Conoce cuáles son las especialidades en la gastronomía</a></div></p><div><p><strong>The Simpsons Ride™</strong><br>Bem-vindo a Krustyland, o parque temático criado pela famoso palhaço Krusty. Alguém sabotará o parque? Você vai descobrir quando se juntar a Homer, Marge, Bart, Lisa e Maggie nesta aventura carnavalesca.</p><p><strong>Kang & Kodos’ Twirl ‘n’ Hurl</strong><br>Os alienígenas Kang e Kodos da popular série Os Simpsons te deixará fora de órbita neste novo brinquedo que fará sua cabeça girar e seu estômago tremer. Fale oi para muitos dos seus personagens favoritos de Springfield enquanto tenta atacá-los com seu laser. É diversão para toda família!</p><p><strong>MEN IN BLACK™ Alien Attack™</strong><br>Atire em alienígenas em uma missão de treinamento parao os agentes dos Homens de Preto, nesta interativa atração.</p></div><p><img alt="Universal Studios Florida - Parque Temático (15)" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="lazyload" referrerpolicy="no-referrer" title="Universal Studios Florida - Parque Temático (15)" data-src="https://cdn.statically.io/img/portuguese.universalorlando.com/f=auto//Images/subheader_left_tcm8-23208.gif" data-src2="https://portuguese.universalorlando.com/Images/subheader_left_tcm8-23208.gif" onerror="if(this.src==this.getAttribute('data-src2')){onImageError(this,true)}else{this.src=this.getAttribute('data-src2')}"><img alt="Universal Studios Florida - Parque Temático (16)" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="lazyload" referrerpolicy="no-referrer" title="Universal Studios Florida - Parque Temático (16)" data-src="https://cdn.statically.io/img/portuguese.universalorlando.com/f=auto//Images/subheader_right_tcm8-23210.gif" data-src2="https://portuguese.universalorlando.com/Images/subheader_right_tcm8-23210.gif" onerror="if(this.src==this.getAttribute('data-src2')){onImageError(this,true)}else{this.src=this.getAttribute('data-src2')}"></p><p>São Francisco<div class="insert"><div class="text-center insert" style="margin: 0"><div class="insert text-white bg-primary-600 py-2 px-4 font-semibold inline-block rounded" style="margin: 0">(Video) ¿Qué hacer en UNIVERSAL STUDIOS ORLANDO? | Guia COMPLETA para PRINCIPIANTES</div></div><div class="insert video-container" style="margin-top: 0.2rem; margin-bottom: 2rem"><iframe class="lazyload mt-2 mx-auto max-w-full" width="560" height="315" data-src="https://www.youtube.com/embed/wu6L80dws40" title="¿Qué hacer en UNIVERSAL STUDIOS ORLANDO? | Guia COMPLETA para PRINCIPIANTES" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div></div></p><p>Aqui você poderá caminhar pelo vilarejo de São Francisco chamado Fisherman's Wharf ou experimentar o peixe do dia no Lombard's Seafood Grille.</p><div><p><strong>Velozes e Furiosos /Fast & Furious – Supercharged™</strong><br>Junte-se à Dom, Letty, Hobbs e a família Fast & Furious (Velozes e Furiosos) em uma aventura repleta de adrenalina na nova atração.</p><p><span>Saiba mais ></span></p></div><p><img alt="Universal Studios Florida - Parque Temático (17)" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="lazyload" referrerpolicy="no-referrer" title="Universal Studios Florida - Parque Temático (17)" data-src="https://cdn.statically.io/img/portuguese.universalorlando.com/f=auto//Images/subheader_left_tcm8-23208.gif" data-src2="https://portuguese.universalorlando.com/Images/subheader_left_tcm8-23208.gif" onerror="if(this.src==this.getAttribute('data-src2')){onImageError(this,true)}else{this.src=this.getAttribute('data-src2')}"><img alt="Universal Studios Florida - Parque Temático (18)" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="lazyload" referrerpolicy="no-referrer" title="Universal Studios Florida - Parque Temático (18)" data-src="https://cdn.statically.io/img/portuguese.universalorlando.com/f=auto//Images/subheader_right_tcm8-23210.gif" data-src2="https://portuguese.universalorlando.com/Images/subheader_right_tcm8-23210.gif" onerror="if(this.src==this.getAttribute('data-src2')){onImageError(this,true)}else{this.src=this.getAttribute('data-src2')}"></p><p>Woody Woodpecker's KidZone<sup>®</sup></p><p>Woody Woodpecker’s Kidzone® é o lar de alguns dos ídolos mais populares do entretenimento infantil, junto com uma variedade de brinquedos, shows e atrações para todas as idades.</p><div><p><strong><a href="https://nicolevaughn.com/goto?target=eyJpdiI6IkRSeVphNFFEa2cxYTFiNENCMlFwV3c9PSIsInZhbHVlIjoiMThacVQzMEIrMVlLWS9XWEgvbWJKb3ZVUnlqRkhhUTJ1MVdYYVNsUFp1NUpxSEpnZkhDc2M5Qkw1Ny9PTW5DT2dRNUE1L1FPbk54OTNKbnhKK1kycVE9PSIsIm1hYyI6IjQ0NjVmODgwM2UzNWIwYWM2OGQwZWQwMzc1MjQ2Y2MyYTU3OTZmNmYwYjY1NWRkYTA4N2M4NWYxYzMxNzRjY2QiLCJ0YWciOiIifQ%3D%3D" title="Animal" target="_blank" rel="noopener noreferrer nofollow">Animal</a> Actors on Location!℠</strong><br>Um show extraordinário com apresentações ao vivo de animais, interação com a plateia e vídeo.</p><p><strong>E.T. Adventure<sup>®</sup></strong><br>Suba em sua bicicleta estelar e ajude o E.T<sup>®</sup> a salvar o planeta.</p><p><strong>Curious George Goes to Town℠</strong><br>Siga os passos deste macaco brincalhão nesta área de brinquedos para crianças.</p><p><strong>Woody Woodpecker's Nuthouse Coaster<sup>®</sup></strong><br>Desfrute de um passeio de montanha-russa repleto de diversão pela fábrica maluca do Pica-Pau.</p><p><strong>Fievel's Playground<sup>®</sup></strong><br>Olhe para o mundo através dos olhos de um ratinho, neste excepcional playground gigante.<div class="insert"><div class="text-center insert" style="margin: 0"><div class="insert text-white bg-primary-600 py-2 px-4 font-semibold inline-block rounded" style="margin: 0">(Video) 1 DÍA en UNIVERSAL STUDIOS FLORIDA en la NUEVA NORMALIDAD 🌎 (Universal Orlando Resort)</div></div><div class="insert video-container" style="margin-top: 0.2rem; margin-bottom: 2rem"><iframe class="lazyload mt-2 mx-auto max-w-full" width="560" height="315" data-src="https://www.youtube.com/embed/NE5a_LyC4os" title="1 DÍA en UNIVERSAL STUDIOS FLORIDA en la NUEVA NORMALIDAD 🌎 (Universal Orlando Resort)" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div></div></p></div><div class="insert"><div class="text-center insert" style="margin: 0"><div class="insert text-white bg-primary-600 py-2 px-4 font-semibold inline-block rounded" style="margin: 0">(Video) IR a UNIVERSAL STUDIOS Orlando 2022 🤑 Cuánto cuesta? Qué hacer en los 2 PARQUES!</div></div><div class="insert video-container" style="margin-top: 0.2rem; margin-bottom: 2rem"><iframe class="lazyload mt-2 mx-auto max-w-full" width="560" height="315" data-src="https://www.youtube.com/embed/KhD9SEZPs08" title="IR a UNIVERSAL STUDIOS Orlando 2022 🤑 Cuánto cuesta? Qué hacer en los 2 PARQUES!" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div></div></div></div></div><div><?xml version="1.0" encoding="utf-16"??><div><h3 id="toc-0">Parques Temáticos</h3><p><span>Universal's Islands of Adventure</span></p></div></div> <span> </span>

FAQs

Universal Studios Florida - Parque Temático? ›

Is the MIB ride still at Universal? ›

At the time of its opening, the ride was the biggest dark ride ever built at a Universal park, spanning 70,000 square feet (6,500 m2) and featuring over 125 animatronic aliens.
...
Men in Black: Alien Attack
Coordinates28°28′51.09″N 81°28′2.64″W
StatusOperating
CostUS$70 million
Opening dateApril 14, 2000
28 more rows

How long is Universal Orlando's cinematic celebration? ›

Universal Orlando's Cinematic Celebration lasts approximately 18 minutes. During that time there are roughly 20 fireworks with the majority coming in the final minute of the performance.

What is the difference between Universal Studios and Islands of Adventure? ›

The easiest way to tell the difference is that Universal Studios is based more on movies and TV shows, whereas Islands of Adventure is where the fantasy and thrill rides are. The most unique park of the three is Volcano Bay, which is a fully themed water park that feels like you've discovered your own paradise island.

What are the 3 parks at Universal Studios Florida? ›

With three amazing theme parks – Universal Studios Florida, Universal's Islands of Adventure, and Universal's Volcano Bay water theme park – spectacular on-site hotels and more, it's days and nights of endless fun for every member of the family.

Is Men in Black ride for kids? ›

Men in Black is a much tamer ride that will appeal to game-loving tweens and teens. The goal is to defeat the aliens (of which there are 120 different species) by means of a laser gun and gaming system, which is in every seat of the ride. It's similar to the Buzz Lightyear ride at Disney.

How long is the Men in Black ride? ›

Is the Hogwarts light show every night? ›

Magical Holidays in Hogsmeade

The holiday-themed nighttime projection show — The Magic of Christmas at Hogwarts Castle — is just around the corner! It runs nightly through the holiday season, with multiple showings per night.

Is Universal Studios free after 6 pm? ›

Free Admission and Parking after 6 p.m.

After 6 p.m., parking is free as well, except during Halloween Horror Nights. And you'll never pay parking fees when you arrive on public transportation or stay at an official Universal Orlando Resort Hotel.

What time is Hogwarts light show? ›

The Nighttime Lights shows typically start around 7:15 pm (8:15 after the Daylight Savings change), though this can be bumped up to as early as 6:45, and they last for approximately five minutes.

Which park is better Universal or Island of Adventure? ›

If you are contemplating Islands of Adventure or Universal Studios for adults, then you would consider Islands of Adventure more. However, if you want fun for the whole family, Universal Studios is perfect for slightly more shows and kid-friendly attractions (especially for those under 5 years-old).

Which Universal park is best for Harry Potter? ›

When it comes to which Harry Potter park is better at Universal, Diagon Alley in Islands of Adventure is the clear winner. They have more shops, more merchandise, and the fun of trading your money for Gringotts bank notes. Plus, the younger kids will love the stuffed animals at the Magical Menagerie!

Can you do Islands of Adventure and Universal in one day? ›

Can Universal Orlando Be Done in One Day? The simple answer is: Yes! it's toadally possible to fit Universal Studios Florida and Universal's Islands of Adventure into one day. What makes park hopping easy at Universal Orlando is the fact that the two parks are right next to each other.

Is Universal cheaper than Disney? ›

Additionally, as a general rule, Universal is less expensive than Disney in practically every area, including theme park meals, tickets, and hotel accommodations. In addition to being less expensive, the hotels at Universal seem to provide more facilities for free than those at Disney World.

What's better Disney or Universal? ›

Universal has one water park, Volcano Bay. Both resorts have a studio-themed park. Otherwise, the themes of each park are quite different. Overall, Walt Disney World is much more expansive with many more attractions, restaurants, and hotels to choose from.

Is Universal Island of Adventure worth it? ›

It might come up a bit short on the consistency of its aesthetics, but Islands of Adventure more than holds its own when it comes to rides. It's currently the better of the two Universal Orlando parks when it comes to attractions, with fun and action for the whole family, and a nice diversity of ride styles to boot.

Can my 5 year old watch Men in Black? ›

With lots of swearing and some moderate violence, we feel 'Men In Black' should be suitable for kids aged eight and over, depending on your attitudes to regular cursing.

How scary is the Men in Black ride? ›

How scary is Men in Black Alien Attack? This shooter-style ride earns itself two out of five astros in terms of fear factor – the ride motion gets a little bit crazy, and the accompanying aliens aren't exactly adorable.

What age rating is MIB? ›

MEN IN BLACK is a sci-fi comedy about a secret organisation that polices alien activity on earth. The film is rated PG and contains mild language, violence and horror.

Does the Simpsons ride have drops? ›

As a motion simulator, The Simpsons Ride at Universal Orlando syncs the action of its eight-passenger vehicles with wild, animated footage. Although scenes include maneuvers such as free-falling from nosebleed heights and mid-air collisions, the vehicles never actually move more than a few inches in any direction.

How many agents are in Men in Black? ›

The founding members were the 7 agents present at the landing, plus an amateur astronomer and a young man who got lost going to see his girlfriend.

What time are fireworks at Harry Potter World? ›

The Hogwarts castle light show times begin at dusk to park close. Typically, nighttime lights shows begin around 7:15 PM, but can also be 8:15 PM. Because of Daylight Savings Time they can start as early as 6:45 PM. This makes the Nighttime lights Hogwarts schedule always changing due to when the sun sets!

What time are fireworks at Universal? ›

Fireworks start approximately 9pm. Festivities are included with the price of General Admission.

Does Universal have 2022 fireworks? ›

Jul 2 | July 4th Weekend Fireworks 2022: Universal Studios Hollywood, Universal City | Studio City, CA Patch.

Can you take food into Universal Studios? ›

Q: Can I bring food and drinks to Universal Studios Hollywood? A: The park allows visitors to carry water bottles (maximum 2 liters), small snacks, and special food items for dietary and medical requirements. Soft-sided insulated bags are also allowed as long as they are no larger than 8.5" wide x 6" high x 6" deep.

Is the Universal City Walk Free? ›

Aside from the parking fees, there is no entrance fee for CityWalk. You can stroll around and check out the shops, dine or find late-night entertainment at no cost. Need tickets to Universal Studios or Island of Adventure click here!

How much does it cost to park at Universal? ›

Universal Studios Parking Price
General ParkingBefore 6pm – $25 After 6pm – $10
Preferred Parking – Reduces your total walking time when visiting either Universal Studios or City Walk.Before 6pm – $35 After 6pm – $20
Front Gate Parking – Closest parking area to Universal Studios entrance.Before 6pm – $50 After 6pm – $30
1 more row
23 Oct 2019

Is there a nighttime show at Universal Studios Hollywood? ›

Universal Studios Hollywood welcomes back Special Effects Show AND Nightime Lights at Hogwarts summer 2022. Universal Studios Hollywood is getting a little more entertaining this summer with the announcement of the return of both Nighttime Lights at Hogwarts Castle and the Special Effects Show.

Does Universal Studios have fireworks at night? ›

The theme park will be decked out in red, white and blue decor, host nightly fireworks displays and live music performances and provide other activities. The fireworks shows will begin at 9 p.m. nightly from two locations inside the park and will be synced to a score of Universal-themed music and patriotic favorites.

What park is Harry Potter world in? ›

Travel between both lands of The Wizarding World of Harry Potter™: Diagon Alley™ in Universal Studios Florida™ and Hogsmeade™ in Universal's Islands of Adventure™. Now accepting Universal Express™ Pass.

How many days do you need at Universal Studios Florida? ›

Three days is ideal, particularly with a park-to-park pass, as it will allow you to fully explore each park and revisit your favorite attractions. A highlights tour of both parks can be done in one long day, but it would be tiring and you would miss many delightful smaller attractions.

Is Harry Potter World at Islands of Adventure? ›

All Aboard The Hogwarts™ Express

Travel between both lands of The Wizarding World of Harry Potter™: Diagon Alley™ in Universal Studios Florida and Hogsmeade™ in Universal's Islands of Adventure.

Which Harry Potter park should I go to first? ›

For the most authentic Harry Potter experience, head to Diagon Alley at Universal Studios first—just like Harry did in the first book. It's a great gateway into the Wizarding World, and you can stock up on all your souvenirs and wizarding supplies at the land's many shops.

How many days do you need for Harry Potter world? ›

And you will need at least two days to see it all. Hogwarts Castle and the surrounding Hogsmeade environs are located inside Universal Studios Florida; Diagon Alley and its shops and rides are located in the Islands of Adventure.

Can you see both Harry Potter parks a day? ›

The only way to see all of the Wizarding World of Harry Potter in one day is to have the park to park pass. If you don't, you're going to miss one of the parks, it's that simple. You will need a park to park ticket to ride the train between Hogsmeade Station and Kings Cross Station.

Can you ride Hogwarts Express with one park ticket? ›

However, if you have one-park-only tickets, you will not be able to ride the Hogwarts Express, and you will want to make sure that you plan your morning and evening in the same park each day; for example, you won't be able to do the morning in Diagon Alley and the evening in Hogsmeade on the same day with a one-park ...

How many rides are at Islands of Adventure? ›

Another common question we receive when talking about the rides at Islands of Adventure is, how many rides are at Universal Islands of Adventure? Very simply, as of 2022 Universal Islands of Adventure has 16 rides for guests to enjoy in the theme park.

Which park is first Universal or Islands of Adventure? ›

There is a notable difference in opening dates of each section of the park though, with Universal Studios first opened in 1990 and Islands of Adventure in 1999.

How much does it cost for a family of 4 to go to Universal Studios? ›

For an average family of four, tickets will cost around $1000, not including tax, for two days and two parks. The good news is that there are deals and promotions to consider. For instance, you can experience five days with two days free.

How much does 2 days at Universal Studios cost? ›

One-day, park-to-park admission is priced $123 for adults or $117 for children, and includes both Universal Studios Florida and the adjacent Universal's Islands of Adventure[2] . A two-day pass to both parks costs about $140 for adults and $130 per child.

Is Universal Studios overpriced? ›

Universal Studios Hollywood was named the most expensive theme park in the world while Disneyland was ranked the most affordable theme park in California in a new international study that looks at the price of fun based on the average cost per amusement ride.

Is Universal as crowded as Disney? ›

Head to Universal to avoid Disney crowds.

Universal has spikes in crowds, too, but a big piece of attendance there is locals. If you head to Universal on a week day, odds are it's going to be much less busy than Disney World.

Is Magic Kingdom bigger than Universal? ›

Universal Orlando Resort consists of 3 parks: Universal Studios, Island of Adventure, and Volcano Bay (a waterpark) and resides on 840 acres. On the other hand, Disney World is almost twice the size of Manhattan, with 25,000 acres! Animal Kingdom is the largest while Magic Kingdom is the smallest in size.

What is the cheapest month to go to Disney? ›

Just like there are more expensive times, there are also times of the year when it is cheaper to go to Disney World. As a rule, January, February, August, and September are the cheapest seasons, as long as you avoid any holidays in those months.

Why does Universal close so early? ›

Universal has chosen to close early during off season; if they didn't they would be out of business because their expenses would exceed their income in off peak months.

What age is best for Universal Studios Orlando? ›

So, what is the best age for Universal Studios? The short answer, is between 5 years old and up. The reason being is there are not as many rides with no height restrictions as you might find at Disney's Magic Kingdom.

Is Hogsmeade better than Diagon Alley? ›

Shops and magical products aside, Diagon Alley is superior to Hogsmeade because of the opportunities to bump into friends outside of Hogwarts! Hogsmeade might be pretty, but it's practically next door to the castle.

What rides are in Islands of Adventure? ›

Universal's Islands of Adventure

Does the Simpsons ride have drops? ›

As a motion simulator, The Simpsons Ride at Universal Orlando syncs the action of its eight-passenger vehicles with wild, animated footage. Although scenes include maneuvers such as free-falling from nosebleed heights and mid-air collisions, the vehicles never actually move more than a few inches in any direction.

Is Minion Mayhem a roller coaster? ›

This attraction debuted in July of 2012 as a 3D motion-simulator ride, but almost exactly seven years later, it was converted to 2D (and motion-sickness sufferers rejoiced!).

Where is Frank on Men in Black ride? ›

Another good one is Frank the Pug — he's hidden to the right of the inside track, next to the Crashed Spaceship, at the Locksmith's counter.

Can you do Islands of Adventure in one day? ›

Yes, it's possible to do Islands of Adventure in one day. You won't be able to see or do absolutely everything that this park has to offer, but you can check out the main rides and attractions. If you have more time, then I recommend spending three full days exploring Islands of Adventure with a park-to-park pass.

Is Universal Island of Adventure worth it? ›

It might come up a bit short on the consistency of its aesthetics, but Islands of Adventure more than holds its own when it comes to rides. It's currently the better of the two Universal Orlando parks when it comes to attractions, with fun and action for the whole family, and a nice diversity of ride styles to boot.

Can you do both Universal parks in one day? ›

The simple answer is: Yes! it's toadally possible to fit Universal Studios Florida and Universal's Islands of Adventure into one day. What makes park hopping easy at Universal Orlando is the fact that the two parks are right next to each other.

Is Simpsons ride for kids? ›

With the height requirement of 40 inches in mind, the Simpsons Ride is everything you'd expect after watching the television show in terms of content and language. With regards to everything else, the ride is mostly child friendly.

How long is Simpsons ride? ›

How many people does The Simpsons Ride seat? ›

Does the minion ride cause motion sickness? ›

Fairly mild motion simulator thrills. If you are prone to motion sickness, you could experience discomfort (although shutting your eyes should prevent queasiness). There are stationary seats available upon request. The ride also features simulated coaster-like action—but in a non-realistic, cartoony way.

What did Minion Mayhem replace? ›

Despicable Me Minion Mayhem
Opening dateJuly 2, 2012
ReplacedThe Funtastic World of Hanna-Barbera Jimmy Neutron's Nicktoon Blast
Universal Studios Hollywood
AreaUpper Lot
52 more rows

What did the minion ride replace? ›

Ride Details

Despicable Me: Minion Mayhem is a 3D simulator ride located in the Production Central area of Universal Studios Florida. It replaced Jimmy Neutron's Nicktoon Blast, and The Funtastic World of Hanna-Barbera.

When did the Men in Black ride open? ›

How do you play the Men in Black ride? ›

Pro Tips for Men In Black: Alien Attack - YouTube

Videos

1. TODO sobre JURASSIC PARK en UNIVERSAL ORLANDO
(Disney Holica)
2. Así es el MEJOR PARQUE de ATRACCIONES EXTREMAS de Universal Orlando: ISLANDS OF ADVENTURE🔥
(Aventuras con Magia)
3. ¡Todo sobre los parques de Universal Orlando! ¡Universal Studios, Islands of Adventure y Volcano!
(Gabriel Lorenzi - Tips de Viaje)
4. Universal Studios, Orlando Florida, parque tematico en navidad
(Los Lopez)
5. [NEW] JURASSIC WORLD The Ride! New INDOMINUS REX! | Universal Studios Hollywood 2021!
(Patrick Dougall)
6. ✅ Las MEJORES ATRACCIONES de UNIVERSAL STUDIOS FLORIDA 🌎
(The Festive Couple)

You might also like

Latest Posts

Article information

Author: Saturnina Altenwerth DVM

Last Updated: 09/01/2022

Views: 5593

Rating: 4.3 / 5 (64 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Saturnina Altenwerth DVM

Birthday: 1992-08-21

Address: Apt. 237 662 Haag Mills, East Verenaport, MO 57071-5493

Phone: +331850833384

Job: District Real-Estate Architect

Hobby: Skateboarding, Taxidermy, Air sports, Painting, Knife making, Letterboxing, Inline skating

Introduction: My name is Saturnina Altenwerth DVM, I am a witty, perfect, combative, beautiful, determined, fancy, determined person who loves writing and wants to share my knowledge and understanding with you.