//! ################################################################ //! Copyright (c) 2004-2007 Amazon.com, Inc., and its Affiliates. //! All rights reserved. //! Not to be reused without permission //! $DateTime: 2007/09/03 08:14:26 $ //! ################################################################ function n2EventsInitLibrary() { // Begin library code wrapper. Goes all the way to the bottom of the file if (window.goN2LibMon) goN2LibMon.beginLoad('events', 'n2CoreLibs'); window.N2Instance = function(oFeature) { this.className = 'N2Instance'; this.version = '1.1.0'; this.oFeature = oFeature; this._timers = new Object(); // HASH of timerids for this object, indexed by timer name. this.nSTATEDORMANT = 0; this.nSTATEPREOPEN = 1; this.nSTATEOPENING = 2; this.nSTATEVISIBLE = 3; this.nSTATECLOSING = 4; this.activeState = this.nSTATEDORMANT; this.instanceName = null; this.oRegFeatureOpened = null; } new N2Instance(); window.N2Instance.prototype.getFeature = function() { return this.oFeature; } window.N2Instance.prototype.getFeatureID = function() { return (this.oRegFeatureOpened ? this.oRegFeatureOpened.getFeatureID() : ""); } window.N2Instance.prototype.setRegFeatureOpened = function(oRegFeatureOpened) { this.oRegFeatureOpened = oRegFeatureOpened; } window.N2Instance.prototype.getRegFeatureOpened = function() { return this.oRegFeatureOpened; } window.N2Instance.prototype.getInstanceName = function() { return this.instanceName; } window.N2Instance.prototype.getInstanceNameFromLinkInfo = function(oLNI) { ; return null; } window.N2Instance.prototype._setInstanceName = function(oLNI) { ; var instanceName = this.getInstanceNameFromLinkInfo(oLNI); if (instanceName != this.instanceName) { this.clearAllTimers(); this.instanceName = instanceName; } } window.N2Instance.prototype.isDormant = function() { return (this.activeState <= this.nSTATEDORMANT); } window.N2Instance.prototype.isPreOpen = function() { return (this.nSTATEDORMANT < this.activeState && this.activeState <= this.nSTATEPREOPEN); } window.N2Instance.prototype.isOpening = function() { return (this.nSTATEPREOPEN < this.activeState && this.activeState <= this.nSTATEOPENING); } window.N2Instance.prototype.isVisible = function() { return (this.nSTATEOPENING < this.activeState && this.activeState <= this.nSTATEVISIBLE); } window.N2Instance.prototype.isClosing = function() { return (this.nSTATEVISIBLE < this.activeState); } window.N2Instance.prototype.isActive = function() { return this.isVisible(); }; window.N2Instance.prototype.setTimer = function(timerName, nMSDelay, eventData) { this.clearTimer(timerName); var timerObject = new Object(); this._timers[timerName] = timerObject; ;//goN2Debug.info("N2Instance setting timer feature " + this.getFeatureID() + ", instance " + this.getInstanceName() + ", timer " + timerName + ", eventData " + eventData); timerObject.eventData = eventData; timerObject.timerid = setTimeout( "N2Instance._timerFired('" + this.getFeatureID() + "', '" + this.getInstanceName() + "', '" + timerName+"')", nMSDelay); } window.N2Instance.prototype.clearTimer = function(timerName) { var timerObject = this._timers[timerName]; if (timerObject) { ; clearTimeout(timerObject.timerid); this._timers[timerName] = 0; } } window.N2Instance.prototype.clearAllTimers = function() { ; for (var timerName in this._timers) { this.clearTimer(timerName); } } window.N2Instance._timerFired = function(featureID, instanceName, timerName) { ; var oFeature = goN2Events.lookupFeature(featureID); ; if (!oFeature) { return; } var oInstance = oFeature.getInstance(featureID, instanceName); ; if (!oInstance) { return; } var timerObject = oInstance._timers[timerName]; oInstance._timers[timerName] = 0; ; oInstance[timerName](timerObject.eventData); } window.N2FInstance = function(oFeature) { N2FInstance.parentClass.call(this, oFeature); this.className = 'N2FInstance'; this.version = '1.1.0'; this.bPreOpenDuringClose = false; this.bMouseIsIn = false; } window.N2FInstance.prototype = new N2Instance(); window.N2FInstance.parentClass = N2Instance; window.N2FInstance.prototype.getRawObject = function() { ; return null; } window.N2FInstance.prototype.getInstanceNameFromLinkInfo = function(oLNI) { var name = N2FInstance.getInstanceNameFromLinkInfo(oLNI); return name; } window.N2FInstance.getInstanceNameFromLinkInfo = function(oLNI) { ; var name = (oLNI.getID() ? N2Feature.prefixFInstanceNames + oLNI.getID() : null); return name; } window.N2FInstance.prototype.isStatic = function() { return false; } window.N2FInstance.prototype.assignInstance = function(oLNI) { if (!this.isDormant()) { ; return false; } this._setInstanceName(oLNI); return true; } window.N2FInstance.prototype.overlayClosed = function() { return; } window.N2FInstance.prototype.notifyFInstanceHasMouse = function(bMouseIsInInstance) { var bMouseWasIn = this.bMouseIsIn; this.bMouseIsIn = bMouseIsInInstance; if (this.oFeature.isDisabled()) { return; } if (this.isStatic()) { return; } if (bMouseWasIn && !bMouseIsInInstance) { ; this._scheduleClose(this.getRegFeatureOpened().getDelayCloseAfter()); } else if (!bMouseWasIn && bMouseIsInInstance) { ; this._cancelClose(); } } window.N2FInstance.prototype.setMouseIn = function(bMouseIsInInstance) { this.bMouseIsIn = bMouseIsInInstance; } window.N2FInstance.prototype.mouseOverHotspotTrack = function(oLNI) { ;//goN2Debug.info("feature instance mouseOverHotspotTrack; feature " + oLNI.getFeature() + ", feature instance '" + this.getInstanceName() + "'"); var oRegFeature = goN2Events.lookupRegFeature(oLNI.getFeature()); ; if (this.oFeature.isDisabled()) { return; } this._cancelClose(); } window.N2FInstance.prototype.mouseOverHotspotOpen = function(oLNI, nFeatureFlags) { ;//goN2Debug.info("feature instance mouseOverHotspotOpen; feature " + oLNI.getFeature() + ", feature instance '" + this.getInstanceName() + "'"); var oRegFeature = goN2Events.lookupRegFeature(oLNI.getFeature()); ; if (this.oFeature.isDisabled()) { return; } if (this.activeState<=this.nSTATEPREOPEN || this.isClosing()) { this._scheduleOpen(oLNI, nFeatureFlags, oRegFeature.getDelayShowAfter()); } else { ; this._cancelClose(); } } window.N2FInstance.prototype.mouseOutHotspotClose = function(oLNI) { ;//goN2Debug.info("feature instance mouseOutHotspotClose; feature " + this.getFeatureID() + ", feature instance '" + this.getInstanceName() + "'"); var oRegFeature = goN2Events.lookupRegFeature(oLNI.getFeature()); ; if (this.activeState <= this.nSTATEDORMANT) { } else if (this.activeState <= this.nSTATEPREOPEN) { this._cancelOpen(); } else if (this.activeState <= this.nSTATEVISIBLE) { this._scheduleClose(oRegFeature.getDelayReachWithin()); } else { } } window.N2FInstance.prototype.clickHotspotOpen = function(oLNI, nFeatureFlags) { ;//goN2Debug.info("feature instance clickHotspotOpen; feature " + this.getFeatureID() + ", feature instance '" + this.getInstanceName() + "'"); var oRegFeature = goN2Events.lookupRegFeature(oLNI.getFeature()); ; this.openNow(oLNI, nFeatureFlags); } window.N2FInstance.prototype.mouseOver = function() { ;//goN2Debug.info("feature instance mouseOver; feature " + this.getFeatureID() + ", feature instance '" + this.getInstanceName() + "'"); this.notifyFInstanceHasMouse(true); } window.N2FInstance.prototype.mouseOut = function() { ;//goN2Debug.info("feature instance mouseOut; feature " + this.getFeatureID() + ", feature instance '" + this.getInstanceName() + "'"); this.notifyFInstanceHasMouse(false); } window.N2FInstance.prototype._scheduleOpen = function(oLNI, nFeatureFlags, nMSDelay) { this.setRegFeatureOpened(goN2Events.lookupRegFeature(oLNI.getFeature())); ; var eventData = new Object(); eventData.oLNI = oLNI; eventData.nFeatureFlags = nFeatureFlags; this.setTimer("_timedOpen", nMSDelay, eventData); if (this.isClosing()) { this.bPreOpenDuringClose = true; } else { this.activeState = this.nSTATEPREOPEN; } } window.N2FInstance.prototype._timedOpen = function(eventData) { if (this.oFeature.isDisabled()) { return; } this.openNow(eventData.oLNI, eventData.nFeatureFlags); } window.N2FInstance.prototype._cancelOpen = function() { ; this.clearTimer("_timedOpen"); } window.N2FInstance.prototype._scheduleClose = function(nMSDelay) { ; if (this.isStatic()) { return; } this.setTimer("_timedClose", nMSDelay, null); } window.N2FInstance.prototype._timedClose = function(eventData) { this.closeNow(); } window.N2FInstance.prototype._cancelClose = function() { ; this.clearTimer("_timedClose"); } window.N2FInstance.prototype.openNow = function(oLNI, nFeatureFlags) { ; } window.N2FInstance.prototype.closeNow = function(bImmediate) { ; } window.N2FInstanceWrapper = function(oWrapperFeature) { N2FInstanceWrapper.parentClass.call(this, oWrapperFeature); // Call the base class constructor function. this.className = 'N2FInstanceWrapper'; this.version = '1.1.0'; this.oWrappedFeature = null; // must be null except when Active. } window.N2FInstanceWrapper.prototype = new N2FInstance(); window.N2FInstanceWrapper.parentClass = N2FInstance; window.N2FInstanceWrapper.prototype.isStatic = function() { return ((this.oWrappedFeature && this.oWrappedFeature.isStatic) ? this.oWrappedFeature.isStatic() : false); } window.N2FInstanceWrapper.prototype.getRawObject = function() { ; return this.oWrappedFeature.getObject(); } window.N2FInstanceWrapper.prototype.openNow = function(oLNI, nFeatureFlags) { ;//goN2Debug.info("feature instance wrapper openNow; feature " + oLNI.getFeature() + ", feature instance '" + this.getInstanceNameFromLinkInfo(oLNI) + "'"); ; if (this.oFeature.isDisabled()) { return; } var oFInstanceActive = this.oFeature.getActiveWrappedFInstance(); if (oFInstanceActive) { oFInstanceActive.closeNow(true); } this.oWrappedFeature = this.oFeature.getWrappedFeatureObj(); this.oFeature.setActiveWrappedFInstance(this); if (!this.oWrappedFeature.isVisible()) { ; this._cancelOpen(); this.setRegFeatureOpened(goN2Events.lookupRegFeature(oLNI.getFeature())); var oHotspot = this._createHotspotObj(oLNI, nFeatureFlags); this.oWrappedFeature.show(oHotspot); if (this.oWrappedFeature.isVisible()) { goN2Events.toggleObjects("hide", this.oFeature.getWrappedFeatureActiveElement().id); this._setStateFromWrappedFeature(this.nSTATEVISIBLE); } else { this.oWrappedFeature = null; this.oFeature.setActiveWrappedFInstance(null); this._setStateFromWrappedFeature(this.nSTATEDORMANT); } } else { ; this._setStateFromWrappedFeature(this.nSTATEVISIBLE); } } window.N2FInstance.prototype.overlayClosed = function() { if (this.oWrappedFeature) { this.oWrappedFeature = null; this.oFeature.setActiveWrappedFInstance(null); } this._setStateFromWrappedFeature(this.nSTATEDORMANT); } window.N2FInstanceWrapper.prototype._setStateFromWrappedFeature = function(activeStateExpected) { if (this.oWrappedFeature && this.oWrappedFeature.isVisible()) { this.activeState = this.nSTATEVISIBLE; } else { this.activeState = this.nSTATEDORMANT; } ; if (this.activeState != activeStateExpected) { ; } } window.N2FInstanceWrapper.prototype.closeNow = function(bImmediate) { ;//goN2Debug.info("feature instance wrapper closeNow; feature " + this.getFeatureID() + ", feature instance '" + this.getInstanceName() + "'"); if (this.isStatic()) { return; } var oWrappedFeature = this.oWrappedFeature; if (oWrappedFeature && oWrappedFeature.isVisible()) { this._cancelClose(); var nAnimateCloseSaved; if (bImmediate) { nAnimateCloseSaved = this._smashNAnimateClose(oWrappedFeature, 0); } try { ; oWrappedFeature.hide(); } catch (e) { if (bImmediate) { this._smashNAnimateClose(oWrappedFeature, nAnimateCloseSaved); } throw(e); } if (bImmediate) { this._smashNAnimateClose(oWrappedFeature, nAnimateCloseSaved); } ; if (this.oWrappedFeature) { this.oWrappedFeature = null; this.oFeature.setActiveWrappedFInstance(null); } goN2Events.toggleObjects("show"); } else { ; } this._setStateFromWrappedFeature(this.nSTATEDORMANT); this.setRegFeatureOpened(null); } window.N2FInstanceWrapper.prototype._smashNAnimateClose = function(oWrappedFeature, newValue) { var oldValue = oWrappedFeature.nAnimateClose; oWrappedFeature.nAnimateClose = newValue; return oldValue; } window.N2FInstanceWrapper.prototype._createHotspotObj = function(oLNI, nFeatureFlags) { if (goN2U.isUndefOrNull(nFeatureFlags)) { nFeatureFlags = 0; } var oHotspot = new Object(); oHotspot.id = ""; oHotspot.objectname = ""; oHotspot.abstop = ""; // abs y within the document oHotspot.absleft = ""; // abs x within the document oHotspot.top = ""; // abs y within the window [relative to the document] oHotspot.left = ""; // abs x within the window [relative to the document] oHotspot.bottom = ""; oHotspot.right = ""; oHotspot.availAbove = 0; oHotspot.availUnder = 0; oHotspot.availLeft = 0; oHotspot.availRight = 0; oHotspot.scrollLeft = 0; oHotspot.scrollTop = 0; oHotspot.clientHeight = 0; oHotspot.clientWidth = 0; oHotspot.staticFlag = 0; var sFeatureID = oLNI.getFeature(); ; var sLinkID = oLNI.getLinkID(); var oLink = goN2U.getRawObject(sLinkID); oHotspot.oLink = oLink; var sName = oLNI.getLinkName(); if (sName != oLink.id) { oHotspot.sNameOverride = sName; } ; oHotspot.featureID = sFeatureID; ; oHotspot.relatedFeatureObj = this.oWrappedFeature; oHotspot.staticFlag = nFeatureFlags; oHotspot.scrollLeft = goN2U.getScrollLeft(); oHotspot.scrollTop = goN2U.getScrollTop(); oHotspot.clientHeight = goN2U.getInsideWindowHeight(); oHotspot.clientWidth = goN2U.getInsideWindowWidth(); ; ; oHotspot.href = oLink.href; var sTmp; var re = /([\r\n])/gi; sTmp = oLink.innerHTML; oHotspot.linkHTML = sTmp.replace(re, " "); sTmp = goN2U.isUndefOrNull(oLink.innerText) ? oLink.innerHTML : oLink.innerText; oHotspot.linkText = sTmp.replace(re, " "); ; ; ; ; oHotspot.absleft = goN2U.getScrolledElementLeft(oLink); oHotspot.abstop = goN2U.getScrolledElementTop(oLink); oHotspot.left = goN2U.getObjectLeft(oLink) - oHotspot.scrollLeft; oHotspot.top = goN2U.getObjectTop(oLink) - oHotspot.scrollTop; oHotspot.width = goN2U.getObjectWidth(oLink); oHotspot.height = goN2U.getObjectHeight(oLink); var elChild = oLink.firstChild; if ( (oHotspot.width == 0) && elChild ){ oHotspot.width = goN2U.getObjectWidth(elChild); oHotspot.height = goN2U.getObjectHeight(elChild); } else if ( goN2U.isMozilla5() ) { var aChildren = oLink.childNodes var nChildren = aChildren.length; for (var i=0;i= N2Events.nMINHOTSPOTNAMECOMPONENTS) { var oLNI = goN2U.getLinkNameInfo(elem.id); if (oLNI) { var sFeatureID = oLNI.getFeature(); oRegFeature = this.lookupRegFeature(sFeatureID); if (oRegFeature) { var oFeature = oRegFeature.getFeature(); bIsInInstance = true; sInstanceName = oFeature.getHotspotInstanceName(oLNI); } } } } this.broadcastMouseOwner(oRegFeature, sInstanceName); } this.addEventHandler = function(eventID, fn) { var r; if (window.addEventListener) { window.addEventListener(eventID, fn, false); r = true; } else if (window.attachEvent) { r = document.attachEvent("on"+eventID, fn); } else { ; r = false; } ; return r; } this.removeEventHandler = function(eventID, fn) { var r; if (window.removeEventListener) { window.removeEventListener(eventID, fn, false); r = true; } else if (window.detachEvent) { r = document.detachEvent("on"+eventID, fn); } else { ; r = false; } ; return r; } this._toggleControlElements = {}; // look up by element id to get 'alwaysHide', etc. this.hideUnderPopovers = function(sId, action) { this._toggleControlElements[sId] = action; } this.toggleObjects = function(etype, element) { var thisLeft; var thisTop; var thisRight; var thisBottom; if (etype != "hide") { ; } else { var oElement = goN2U.getRawObject(element); if (!oElement) { ; return; } ; thisLeft = goN2U.getObjectLeft(oElement); thisTop = goN2U.getObjectTop(oElement); thisRight = thisLeft + goN2U.getObjectWidth(oElement); thisBottom = thisTop + goN2U.getObjectHeight(oElement); } this._toggleAlwaysHideObjects(etype, thisLeft, thisTop, thisRight, thisBottom); if (goN2U.bIsIE) this._checkPopOverObjects("select", etype, thisLeft, thisTop, thisRight, thisBottom); } this._toggleAlwaysHideObjects = function(etype, thisLeft, thisTop, thisRight, thisBottom) { for (var sId in this._toggleControlElements) { if (this._toggleControlElements[sId] != "alwaysHide") continue; var oElem = goN2U.getElement(sId, true); if (!oElem) continue; this._toggleOneElement(etype, oElem, thisLeft, thisTop, thisRight, thisBottom); } } this._checkPopOverObjects = function(tagName, etype, thisLeft, thisTop, thisRight, thisBottom) { var myObjs = document.getElementsByTagName(tagName); var i; for (i=0; i= pL) && (mL <= pR) && (mT >= pT) && (mT <= pB) ) return true; if ( (mL >= pL) && (mL <= pR) && (mB >= pT) && (mB <= pB) ) return true; if ( (mR >= pL) && (mR <= pR) && (mT >= pT) && (mT <= pB) ) return true; if ( (mR >= pL) && (mR <= pR) && (mB >= pT) && (mB <= pB) ) return true; if ( (mL >= pL) && (mL <= pR) && (mT <= pT) && (mB >= pB) ) return true; if ( (pL >= mL) && (pL <= mR) && (pT >= mT) && (pT <= mB) ) return true; if ( (pL >= mL) && (pL <= mR) && (pB >= mT) && (pB <= mB) ) return true; if ( (pR >= mL) && (pR <= mR) && (pT >= mT) && (pT <= mB) ) return true; if ( (pR >= mL) && (pR <= mR) && (pB >= mT) && (pB <= mB) ) return true; ; return false; } this.disableFeature = function(featureID, delay) { var oFeature = this.lookupFeature(featureID); ; if (oFeature) { oFeature.disableFeature(nMSDelay); } } this.featureIsDisabled = function(featureID) { var bDisabled = false; var oFeature = this.lookupFeature(featureID); ; if (oFeature) { bDisabled = oFeature.isDisabled(); } return bDisabled; } this.qaAddIDsToNamedLinks = function() { var mylinks = document.getElementsByTagName("a"); for (var i=0; i=N2Events.nMINHOTSPOTNAMECOMPONENTS && !mylinks[i].id ) { mylinks[i].setAttribute("id","lnx"+this._nextAvailId); ; this._nextAvailId++; } } } } this.invokeFeature = function(linkID, bShow, sNameOverride, nFeatureFlags) { var elem = goN2U.getRawObject(linkID); if (elem == null) { ; return; } nFeatureFlags |= this.fSTATICWITHCLOSE; var oLNI = goN2U.getLinkNameInfo(linkID, sNameOverride); if (!oLNI) { ; return; } var oFeature = this.lookupFeature(oLNI.getFeature()); var oFInstance = oFeature.getFeatureInstance(oLNI); if (!oFInstance && bShow) { oFInstance = oFeature.createFeatureInstance(oLNI); } if (!oFInstance) { ; return; } if (bShow) { ; oFInstance.openNow(oLNI, nFeatureFlags); } else { ; oFInstance.closeNow(); } } this.qaTestFeature = function(sLinkID, bShow, sNameOverride, sFlags){ ; this.invokeFeature(sLinkID, bShow, sNameOverride, sFlags) } this.mouseOverHotspotOpen = function(hotspotElement, nFeatureFlags) { ; var oRegFeature = null; var oFeature = null; var sInstanceName; var oHInstance = null; var oLNI = goN2U.getLinkNameInfo(hotspotElement.id); if (oLNI) { oRegFeature = goN2Events.lookupRegFeature(oLNI.getFeature()); oFeature = oRegFeature.getFeature(); sInstanceName = oFeature.getHotspotInstanceName(oLNI); oHInstance = oFeature.getHotspotInstance(oLNI); } this.broadcastMouseOwner(oRegFeature, sInstanceName); if (oHInstance) { oHInstance.mouseOverOpen(oLNI, nFeatureFlags); } else { ; } } this.mouseOverHotspotTrack = function(hotspotElement) { ; var oRegFeature = null; var oFeature = null; var oHInstance = null; var sInstanceName; var oLNI = goN2U.getLinkNameInfo(hotspotElement.id); if (oLNI) { oRegFeature = goN2Events.lookupRegFeature(oLNI.getFeature()); oFeature = oRegFeature.getFeature(); sInstanceName = oFeature.getHotspotInstanceName(oLNI); oHInstance = oFeature.getHotspotInstance(oLNI); } this.broadcastMouseOwner(oRegFeature, sInstanceName); if (oHInstance) { oHInstance.mouseOverTrack(oLNI); } else { ; } } this.mouseClickHotspotOpen = function(hotspotElement, nFeatureFlags) { ; var oRegFeature = null; var oFeature = null; var oHInstance = null; var oLNI = goN2U.getLinkNameInfo(hotspotElement.id); if (oLNI) { oRegFeature = goN2Events.lookupRegFeature(oLNI.getFeature()); oFeature = oRegFeature.getFeature(); oHInstance = oFeature.getHotspotInstance(oLNI); } this.broadcastMouseOwner(oRegFeature, oFeature.getHotspotInstanceName(oLNI)); if (oHInstance) { oHInstance.mouseClickOpen(oLNI, nFeatureFlags); } else { ;//goN2Debug.warning("N2Events mouseClickHotspotOpen -- unknown hotspot '" + (oFeature ? oFeature.getHotspotInstanceName(oLNI) : "") + "'"); } return false; } this.mouseOutHotspotClose = function(hotspotElement) { ; var oRegFeature = null; var oFeature = null; var oHInstance = null; var oLNI = goN2U.getLinkNameInfo(hotspotElement.id); if (oLNI) { oRegFeature = goN2Events.lookupRegFeature(oLNI.getFeature()); oFeature = oRegFeature.getFeature(); oHInstance = oFeature.getHotspotInstance(oLNI); } if (oHInstance) { oHInstance.mouseOutClose(oLNI); } else { ;//goN2Debug.warning("N2HEvents mouseOutHotspotClose -- unknown hotspot '" + (oFeature ? oFeature.getHotspotInstanceName(oLNI) : "") + "'"); } if (oRegFeature) { this.instanceIsNotMouseOwner(oRegFeature, oFeature.getHotspotInstanceName(oLNI)); } } this.mouseOutHotspotTrack = function(hotspotElement) { ; var oLNI = goN2U.getLinkNameInfo(hotspotElement.id); if (oLNI) { var oRegFeature = goN2Events.lookupRegFeature(oLNI.getFeature()); if (oRegFeature) { this.instanceIsNotMouseOwner(oRegFeature, oRegFeature.getFeature().getHotspotInstanceName(oLNI)); } } } this._getFInstanceFromCallbackArg = function(oFInstanceOrWrappedFeature) { var oFInstance; if (!goN2U.objIsInstanceOf(oFInstanceOrWrappedFeature, N2FInstance)) { var oFeature = this._getFeatureFromWrappedFeature(oFInstanceOrWrappedFeature); ; oFInstance = oFeature.getActiveWrappedFInstance(); } else { oFInstance = oFInstanceOrWrappedFeature; ; } return oFInstance; } this.mouseOverFeature = function(oFInstanceOrWrappedFeature) { ; if (!oFInstanceOrWrappedFeature) { ; return; } var oFInstance = this._getFInstanceFromCallbackArg(oFInstanceOrWrappedFeature); if (oFInstance) { this.broadcastMouseOwner(oFInstance.getRegFeatureOpened(), oFInstance.getInstanceName()); oFInstance.mouseOver(); } } this.mouseOutFeature = function(oFInstanceOrWrappedFeature) { ; if (!oFInstanceOrWrappedFeature) { ; return; } var oFInstance = this._getFInstanceFromCallbackArg(oFInstanceOrWrappedFeature); if (oFInstance) { this.instanceIsNotMouseOwner(oFInstance.getRegFeatureOpened(), oFInstance.getInstanceName()); oFInstance.mouseOut(); } } this.overlayClosed = function(oFInstanceOrWrappedFeature) { ; if (!oFInstanceOrWrappedFeature) { ; return; } var oFInstance = this._getFInstanceFromCallbackArg(oFInstanceOrWrappedFeature); if (oFInstance) oFInstance.overlayClosed(); this.toggleObjects("show"); ; } this.overlayChanged = function(oFInstanceOrWrappedFeature) { ; if (!oFInstanceOrWrappedFeature) { ; return; } if (this._featureChangedTimer) { clearTimeout(this._featureChangedTimer); } var oFInstance = this._getFInstanceFromCallbackArg(oFInstanceOrWrappedFeature); var oElem = oFInstance.getRawObject(); ; if (oElem) { this._featureChangedTimer = setTimeout("goN2Events._overlayChangedTimerAction('"+oElem.id+"')", 200); } } this._overlayChangedTimerAction = function(sElementID) { ; this.toggleObjects("show", sElementID); this.toggleObjects("hide", sElementID); this._featureChangedTimer = null; } } window.N2Events.fNONSTATIC = 0; window.N2Events.fSEMISTATIC = 1; window.N2Events.fSTATICWITHCLOSE = 3; window.N2Events.nMINHOTSPOTNAMECOMPONENTS = 2; // name="feature|type|key..." must have at least feature and type window.goN2Events = new N2Events(); goN2Events.initialize(); window.n2InitEvents = function() { ; } window.qaAddIDsToNamedLinks = function() { goN2Events.qaAddIDsToNamedLinks(); }; window.n2MouseOverFeature = function(oFInstanceOrWrappedFeature) { goN2Events.mouseOverFeature(oFInstanceOrWrappedFeature); } window.n2MouseOutFeature = function(oFInstanceOrWrappedFeature) { goN2Events.mouseOutFeature(oFInstanceOrWrappedFeature); } window.n2OverlayClosed = function(oFInstanceOrWrappedFeature) { goN2Events.overlayClosed(oFInstanceOrWrappedFeature); } window.n2OverlayChanged = function(oFInstanceOrWrappedFeature) { goN2Events.overlayChanged(oFInstanceOrWrappedFeature); } window.n2MouseOverHotspotNop = function() { if (typeof goN2Events == "object") { return goN2Events.mouseOverHotspotTrack(this); } } window.n2MouseOverHotspot = function() { if (typeof goN2Events == "object") { return goN2Events.mouseOverHotspotOpen(this, N2Events.fNONSTATIC); } } window.n2MouseOverHotspotStatic = function() { if (typeof goN2Events == "object") { return goN2Events.mouseOverHotspotOpen(this, N2Events.fSTATICWITHCLOSE); } } window.n2MouseOverHotspotSemiStatic = function() { if (typeof goN2Events == "object") { return goN2Events.mouseOverHotspotOpen(this, N2Events.fSEMISTATIC); } } window.n2HotspotClick = function() { if (typeof goN2Events == "object") { return goN2Events.mouseClickHotspotOpen(this, N2Events.fNONSTATIC); } } window.n2HotspotClickStatic = function() { if (typeof goN2Events == "object") { return goN2Events.mouseClickHotspotOpen(this, N2Events.fSTATICWITHCLOSE); } } window.n2HotspotClickSemiStatic = function() { if (typeof goN2Events == "object") { return goN2Events.mouseClickHotspotOpen(this, N2Events.fSEMISTATIC); } } window.n2MouseOutHotspotNop = function() { if (typeof goN2Events == "object") { goN2Events.mouseOutHotspotTrack(this); } } window.n2MouseOutHotspot = function() { if (typeof goN2Events == "object") { if (window.event && event.toElement) { var grabberId = (goN2U.isDefined(N2SimplePopover) ? N2SimplePopover.sClickGrabberID : goN2U.sAnimationDivID); if (event.toElement.id == goN2U.sAnimationDivID || event.toElement.id == grabberId) { ; return; } } goN2Events.mouseOutHotspotClose(this); } } window.n2HotspotDisableFeature = function(nMs, oFInstanceOrWrappedFeature) { if (typeof goN2Events != "object") { return; } if (!oFInstanceOrWrappedFeature) { ; return; } ; var oFeature; if (_n2ObjectIsFInstance(oFInstanceOrWrappedFeature)) { var oFInstance = oFInstanceOrWrappedFeature; oFeature = oFInstance.getFeature(); } else { oFeature = goN2Events._getFeatureFromWrappedFeature(oFInstanceOrWrappedFeature); ; } oFeature.disableFeature(nMS); return true; } if (window.goN2LibMon) goN2LibMon.endLoad('events'); } // END library code wrapper n2RunIfLoaded("utilities", n2EventsInitLibrary, "events");