Go to the source code of this file.
Functions | |
if (typeof Zapatec== 'undefined') | |
setInterval ( 'var newScrollY=Zapatec.Utils.getPageScrollY(); '+ 'if(newScrollY!=oldScrollY){ '+ 'Zapatec.ScrollWithWindow.handler(newScrollY); '+ '}', 50) | |
if (!Function.prototype.call) | |
if (!Array.prototype.pop) | |
Variables | |
Zapatec | Utils = {} |
define the Utils namespace | |
Zapatec Utils | getAbsolutePos |
Zapatec Utils | fixBoxPosition |
Zapatec Utils | isRelated |
Zapatec Utils | removeClass |
Zapatec Utils | addClass |
Zapatec Utils | getElement |
Zapatec Utils | getTargetElement |
Zapatec Utils | stopEvent |
Zapatec Utils | addEvent |
Zapatec Utils | removeEvent |
Zapatec Utils | createElement |
Zapatec Utils | writeCookie |
Zapatec Utils | getCookie |
Zapatec Utils | makePref |
Zapatec Utils | loadPref |
Zapatec Utils | mergeObjects |
Zapatec Utils | __wch_id = 0 |
Zapatec Utils | createWCH |
Zapatec Utils | setupWCH_el |
Zapatec Utils | setupWCH |
Zapatec Utils | hideWCH |
Zapatec Utils | getPageScrollY |
Zapatec | ScrollWithWindow = {} |
Zapatec ScrollWithWindow | list = [] |
Zapatec ScrollWithWindow | stickiness = 0.25 |
Zapatec ScrollWithWindow | register |
Zapatec ScrollWithWindow | unregister |
Zapatec ScrollWithWindow | handler |
var | oldScrollY = Zapatec.Utils.getPageScrollY() |
Zapatec Utils | destroy |
Zapatec Utils | newCenteredWindow |
Zapatec Utils | getWindowSize |
Zapatec Utils | selectOption |
Zapatec Utils | getNextSibling |
Zapatec Utils | getFirstChild |
Zapatec Utils | getChildText |
Zapatec Utils | insertAfter |
Zapatec Utils | generateID |
Zapatec Utils | addTooltip |
Zapatec | isLite = true |
Zapatec Utils | checkActivation |
Zapatec | is_ie = ( /msie/i.test(navigator.userAgent) && !Zapatec.is_opera ) |
detect a special case of "web browser" | |
Zapatec | is_ie5 = ( Zapatec.is_ie && /msie 5\.0/i.test(navigator.userAgent) ) |
detect IE5.0/Win | |
Zapatec | is_mac_ie = ( /msie.*mac/i.test(navigator.userAgent) && !Zapatec.is_opera ) |
detect IE for Macintosh | |
Zapatec | is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent) |
detect KHTML-based browsers | |
Zapatec | is_konqueror = /Konqueror/i.test(navigator.userAgent) |
detect Konqueror | |
Zapatec | is_gecko = /Gecko/i.test(navigator.userAgent) |
detect Gecko | |
Zapatec | Log |
Zapatec Utils | Array = {} |
Zapatec.Utils.Array object which contains additional for arrays method. |
|
define the global Zapatec namespace |
|
Simulation of Function call() method that is missing in IE 5.0. Definition at line 901 of file utils.js. References Array. |
|
Simulation of Array pop() method that is missing in IE 5.0. Definition at line 918 of file utils.js. References Array. |
|
define the Utils namespace
|
|
Retrieves the absolute position (relative to <body>) of a given element. If it doesn't work in IE 6, try this: setTimeout(function() {
var objPos = Zapatec.Utils.getAbsolutePos(objElement);
do something with objPos
}, 0);
|
|
Modify the position of a box to fit in browser's view. This function will modify the passed object itself, so it doesn't need to return a value.
|
|
Determines if an event is related to a certain element. This is a poor substitute for some events that are missing from DOM since forever (like onenter, onleave, which MSIE provides). Basically onmouseover and onmouseout are fired even if the mouse was already in the element but moved from text to a blank area, so in order not to close a popup element when onmouseout occurs in this situation, one would need to first check if the event is not related to that popup element:
function handler_onMouseOut(event) { if (!Zapatec.Utils.isRelated(this, event)) { this.style.display = "none"; } }
|
|
Remove a certain [CSS] class from the given element.
|
|
Appends a certain [CSS] class to the given element.
|
|
Retrieves the current target element for some event (useful when bubbling). This function is not actually very useful, but it's legacy from the old calendar code.
|
|
Retrieves the target element for some event (useful when bubbling). This function is not actually very useful, but it's legacy from the old calendar code.
|
|
Stops bubbling and propagation of some event.
|
|
Adds an event handler to a certain element. This function adds a handler using the DOM2 addEventListener (or attachEvent for MSIE). Doing this means that you can add multiple handlers for the same element and same event name, and they will be called in order. WARNING: for really old browsers that don't support attachEvent nor addEventListener, it falls back to the default way: el.onclick = func. This means that you CANNOT add multiple handlers in those browsers, as a new one will override the old one.
|
|
Removes an event handler added with Zapatec.Utils.removeEvent(). The prototype scheme is the same. |
|
Create an element of a certain type using document.createElement(). A function was needed in order to add some common attributes to all created elements, but also in order to be able to use it in XHTML too (Gecko and other W3C-compliant browsers). This function will create an element of the given type and set certain properties to it: unselectable for IE, and the CSS "-moz-user-select" for Gecko, in order to make the element unselectable in these browsers. Optionally, if the second argument is passed, it will appendChild() the newly created element to its parent.
|
|
Sets a cooke given certain specifications. It overrides any existing cookie with the same name.
|
|
Retrieves the value of a cookie.
|
|
Given an object, create a string suitable for saving the object in a cookie. This is similar to serialization. WARNING: it does not support nested objects.
|
|
The reverse of Zapatec.Utils.makePref(), this function unserializes the given string and creates an object from it.
|
|
Merges the values of the source object into the destination object.
|
|
Destroys the given element (remove it from the DOM tree) if it's not null and it's parent is not null.
|
|
Opens a new window at a certain URL and having some properties.
|
|
Finds the size of the current web page. This is the usable size and does not include the browser's menu and buttons.
|
|
Given a reference to a select element, this function will select the option having the given value and optionally will call the default handler for "onchange".
|
|
A more flexible way to get the "nextSibling" of a given element. If the "tag" argument is passed, then this function will return the next sibling that has a certain tag. Otherwise it will simply return el.nextSibling.
|
|
Similar to Zapatec.Utils.getNextSibling(), this function will return the first child of the given element that has a specified tag.
|
|
Function that concatenates and returns all text child nodes of the specified node.
|
|
Similar to the DOM's built in insertBefore. Insert a node after an existing node.
|
|
Generates an unique ID, for a certain code (let's say "class"). If the optional "id" argument is passed, then it just returns the id for that code (no generation). This function is sometimes useful when we need to create elements and be able to access them later by ID.
|
|
Add a tooltip to the specified element. Function that adds a custom tooltip for an element. The "target" is the element to where the tooltip should be added to, and the "tooltip" is a DIV that contains the tooltip text. Optionally, the tooltip DIV can have the "title" attribute set; if so, its value will be displayed highlighted as the title of the tooltip.
|
|
|
|
|
|
detect a special case of "web browser"
|
|
detect IE5.0/Win
|
|
detect IE for Macintosh
|
|
detect KHTML-based browsers
|
|
detect Konqueror
|
|
detect Gecko
|
|
Displays error message. Override this if needed.
|
|
Zapatec.Utils.Array object which contains additional for arrays method.
Definition at line 1027 of file utils.js. Referenced by if(). |