From: "Saved by Windows Internet Explorer 10" Subject: ThePaddler.co.uk - News. Kokatat announces sponsorship of Great African Expedition. The online directory for canoeing and kayaking Date: Sat, 16 Feb 2013 18:05:56 +0100 MIME-Version: 1.0 Content-Type: multipart/related; type="text/html"; boundary="----=_NextPart_000_007F_01CE0C70.44AFB780" X-MimeOLE: Produced By Microsoft MimeOLE V6.2.9200.16384 This is a multi-part message in MIME format. ------=_NextPart_000_007F_01CE0C70.44AFB780 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Location: http://www.thepaddler.co.uk/newskokatatafrica.html =EF=BB=BF
=20 =20" + Spry.Utils.encodeEntities(str) + ""); } }; */ Spry.$$.addExtensions =3D function(a) { for (var f in Spry.$$.Results) a[f] =3D Spry.$$.Results[f]; }; Spry.$$.Results =3D {}; Spry.$$.Results.forEach =3D function(func) { var n =3D this.length; for (var i =3D 0; i < n; i++) func(this[i]); return this; }; Spry.$$.Results.setAttribute =3D function(name, value) { return this.forEach(function(n) { Spry.Utils.setAttribute(n, name, = value); }); }; Spry.$$.Results.removeAttribute =3D function(name) { return this.forEach(function(n) { Spry.Utils.removeAttribute(n, name); = }); }; Spry.$$.Results.addClassName =3D function(className) { return this.forEach(function(n) { Spry.Utils.addClassName(n, = className); }); }; Spry.$$.Results.removeClassName =3D function(className) { return this.forEach(function(n) { Spry.Utils.removeClassName(n, = className); }); }; Spry.$$.Results.toggleClassName =3D function(className) { return this.forEach(function(n) { Spry.Utils.toggleClassName(n, = className); }); }; Spry.$$.Results.addEventListener =3D function(eventType, handler, = capture, bindHandler) { return this.forEach(function(n) { Spry.Utils.addEventListener(n, = eventType, handler, capture, bindHandler); }); }; Spry.$$.Results.removeEventListener =3D function(eventType, handler, = capture) { return this.forEach(function(n) { Spry.Utils.removeEventListener(n, = eventType, handler, capture); }); }; Spry.$$.Results.setStyle =3D function(style) { if (style) { style =3D Spry.Utils.styleStringToObject(style); this.forEach(function(n) { for (var p in style) try { n.style[p] =3D style[p]; } catch (e) {} }); } return this; }; Spry.$$.Results.setProperty =3D function(prop, value) { if (prop) { if (typeof prop =3D=3D "string") { var p =3D {}; p[prop] =3D value; prop =3D p; } this.forEach(function(n) { for (var p in prop) try { n[p] =3D prop[p]; } catch (e) {} }); } return this; }; })(); // EndSpryComponent ------=_NextPart_000_007F_01CE0C70.44AFB780 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.thepaddler.co.uk/Spry-UI-1.7/includes/SpryDOMEffects.js // SpryDOMEffects.js - version 0.6 - Spry Pre-Release 1.7 // // Copyright (c) 2007. Adobe Systems Incorporated. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions = are met: // // * Redistributions of source code must retain the above copyright = notice, // this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright = notice, // this list of conditions and the following disclaimer in the = documentation // and/or other materials provided with the distribution. // * Neither the name of Adobe Systems Incorporated nor the names of = its // contributors may be used to endorse or promote products derived = from this // software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS = "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS = BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR = BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER = IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR = OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED = OF THE // POSSIBILITY OF SUCH DAMAGE. (function() { // BeginSpryComponent =09 if (typeof Spry =3D=3D "undefined" || !Spry.Utils || !Spry.$$) { alert("SpryDOMEffects.js requires SpryDOMUtils.js"); return; } if (!Spry.Effect) Spry.Effect =3D {}; Spry.Effect.Animator =3D function(opts) { Spry.Effect.Animator.Notifier.call(this); this.animatorID =3D Spry.Effect.Animator.nextID++; this.dropFrames =3D true; this.fps =3D 60; // frames per-second this.duration =3D 500; // msecs this.timer =3D 0; this.startTime =3D 0; // Used only when dropFrames is true. this.currentFrame =3D 0; this.easeFunc =3D Spry.Effect.Animator.defaultEaseFunc; this.stopped =3D false; Spry.Effect.Animator.copyProps(this, opts); this.interval =3D 1000 / this.fps; this.numFrames =3D (this.duration / 1000) * this.fps; if (this.onComplete) { var self =3D this; this.addObserver({ onAnimationComplete: function(){ self.onComplete(); = } }); } }; Spry.Effect.Animator.nextID =3D 1; Spry.Effect.Animator.copyProps =3D function(dst, src) { if (src) { for (prop in src) dst[prop] =3D src[prop]; } return dst; }; Spry.Effect.Animator.getElement =3D function(element) { if (arguments.length > 1) { for (var i =3D 0, elements =3D [], length =3D arguments.length; i < = length; i++) elements.push(Spry.Effect.Animator.getElement(arguments[i])); return elements; } if (typeof element =3D=3D 'string') element =3D document.getElementById(element); return element; }; Spry.Effect.Animator.defaultEaseFunc =3D function(time, begin, finish, = duration) { time /=3D duration; return begin + ((2 - time) * time * = finish); }; Spry.Effect.Animator.Notifier =3D function() { this.observers =3D []; this.suppressNotifications =3D 0; }; Spry.Effect.Animator.Notifier.prototype.addObserver =3D = function(observer) { if (!observer) return; // Make sure the observer isn't already on the list. var len =3D this.observers.length; for (var i =3D 0; i < len; i++) { if (this.observers[i] =3D=3D observer) return; } this.observers[len] =3D observer; }; Spry.Effect.Animator.Notifier.prototype.removeObserver =3D = function(observer) { if (!observer) return; for (var i =3D 0; i < this.observers.length; i++) { if (this.observers[i] =3D=3D observer) { this.observers.splice(i, 1); break; } } }; Spry.Effect.Animator.Notifier.prototype.notifyObservers =3D = function(methodName, data) { if (!methodName) return; if (!this.suppressNotifications) { var len =3D this.observers.length; for (var i =3D 0; i < len; i++) { var obs =3D this.observers[i]; if (obs) { if (typeof obs =3D=3D "function") obs(methodName, this, data); else if (obs[methodName]) obs[methodName](this, data); } } } }; Spry.Effect.Animator.Notifier.prototype.enableNotifications =3D = function() { if (--this.suppressNotifications < 0) { this.suppressNotifications =3D 0; Spry.Debug.reportError("Unbalanced enableNotifications() call!\n"); } }; Spry.Effect.Animator.Notifier.prototype.disableNotifications =3D = function() { ++this.suppressNotifications; }; Spry.Effect.Animator.prototype =3D new Spry.Effect.Animator.Notifier; Spry.Effect.Animator.prototype.constructor =3D Spry.Effect.Animator; Spry.Effect.Animator.prototype.start =3D function() { this.stopped =3D false; this.currentFrame =3D 0; this.startTime =3D (new Date()).getTime(); this.notifyObservers("onAnimationStart"); var self =3D this; this.timer =3D setTimeout(function(){ self.onStepAnimation(); }, = this.interval); }; Spry.Effect.Animator.prototype.stop =3D function() { if (this.timer) clearTimeout(this.timer); this.timer =3D 0; this.stopped =3D true; this.notifyObservers("onAnimationStopped"); }; Spry.Effect.Animator.prototype.onStepAnimation =3D function() { var obj =3D {}; if (this.dropFrames) { obj.duration =3D this.duration; obj.elapsed =3D ((new Date).getTime()) - this.startTime; if (obj.elapsed > obj.duration) obj.elapsed =3D obj.duration; } else { obj.duration =3D this.numFrames; obj.elapsed =3D ++this.currentFrame; } obj.easingConst =3D this.easeFunc(obj.elapsed, 0, 1, obj.duration) this.notifyObservers("onPreDraw", obj); this.draw(obj.elapsed, obj.duration, obj.easingConst); this.notifyObservers("onPostDraw", obj); if (!this.stopped) { if (obj.elapsed < obj.duration) { var self =3D this; this.timer =3D setTimeout(function(){ self.onStepAnimation(); }, = this.interval); } else { this.stop(); this.notifyObservers("onAnimationComplete"); } } }; Spry.Effect.Animator.prototype.draw =3D function(elapsed, duration, = easingConst) { // The default draw method does nothing. It is assumed that // derived classes will provide their own implementation of this // method. debug.log("elapsed: " + elapsed + " -- duration: " + duration + " -- = easingConst: " + easingConst); }; /////////////////////////////////////////////////////////////////////////= ////// Spry.Effect.CSSAnimator =3D function(elements, styleStr, opts) { this.animationSets =3D []; Spry.Effect.Animator.call(this, opts); this.add(elements, styleStr); }; Spry.Effect.CSSAnimator.prototype =3D new Spry.Effect.Animator(); Spry.Effect.CSSAnimator.prototype.constructor =3D = Spry.Effect.CSSAnimator; Spry.Effect.CSSAnimator.prototype.add =3D function(elements, styleStr) { // The first argument for the CSSAnimator can be // the id of an element, an element node, or an array of // elements and/or ids. elements =3D Spry.$$(elements); if (elements.length < 1) return; var animSet =3D { elements: elements, cssProps: []}; this.animationSets.push(animSet); // Convert the styleStr into an object. var toObj =3D Spry.Utils.styleStringToObject(styleStr); for (var p in toObj) { var obj =3D new Object; var v =3D toObj[p]; obj.value =3D new Number(v.replace(/[^-\d\.]+/g, "")); obj.units =3D v.replace(/[-\d+\.]/g, ""); toObj[p] =3D obj; } for (var i =3D 0; i < elements.length; i++) { var obj =3D animSet.cssProps[i] =3D new Object; for (var p in toObj) { var pFuncs =3D Spry.Effect.CSSAnimator.stylePropFuncs[p]; if (!pFuncs) pFuncs =3D Spry.Effect.CSSAnimator.stylePropFuncs["default"]; obj[p] =3D new Object; obj[p].from =3D new Number(pFuncs.get(elements[i], = p).replace(/[^-\d\.]+/g, "")); obj[p].to =3D toObj[p].value; obj[p].distance =3D obj[p].to - obj[p].from; obj[p].units =3D toObj[p].units; } } }; Spry.Effect.CSSAnimator.prototype.start =3D function() { for (var s =3D 0; s < this.animationSets.length; s++) { var animSet =3D this.animationSets[s]; var elements =3D animSet.elements; var cssProps =3D animSet.cssProps; for (var i =3D 0; i < elements.length; i++) { var ele =3D elements[i]; =09 var eleProps =3D ele.spryCSSAnimatorProps; if (!eleProps) eleProps =3D ele.spryCSSAnimatorProps =3D new Object; =09 var obj =3D cssProps[i]; for (var p in obj) eleProps[p] =3D this.animatorID; } } return Spry.Effect.Animator.prototype.start.call(this); }; Spry.Effect.CSSAnimator.prototype.stop =3D function() { for (var s =3D 0; s < this.animationSets.length; s++) { var animSet =3D this.animationSets[s]; var elements =3D animSet.elements; var cssProps =3D animSet.cssProps; for (var i =3D 0; i < elements.length; i++) { var ele =3D elements[i]; var obj =3D cssProps[i]; =09 var eleProps =3D ele.spryCSSAnimatorProps; for (var p in obj) { if (eleProps[p] =3D=3D this.animatorID) delete eleProps[p]; } } } return Spry.Effect.Animator.prototype.stop.call(this); }; Spry.Effect.CSSAnimator.prototype.draw =3D function(elapsed, duration, = easingConst) { for (var s =3D 0; s < this.animationSets.length; s++) { var animSet =3D this.animationSets[s]; var elements =3D animSet.elements; var cssProps =3D animSet.cssProps; for (var i =3D 0; i < elements.length; i++) { var ele =3D elements[i]; var eleProps =3D ele.spryCSSAnimatorProps; var obj =3D cssProps[i]; for (var p in obj) { if (eleProps[p] =3D=3D this.animatorID) { var pFuncs =3D Spry.Effect.CSSAnimator.stylePropFuncs[p]; if (!pFuncs) pFuncs =3D Spry.Effect.CSSAnimator.stylePropFuncs["default"]; =09 if (elapsed > duration) pFuncs.set(ele, p, obj[p].to + obj[p].units); else pFuncs.set(ele, p, obj[p].from + (obj[p].distance * easingConst) + = obj[p].units); } } } } }; Spry.Effect.CSSAnimator.stylePropFuncs =3D {}; Spry.Effect.CSSAnimator.stylePropFuncs["default"] =3D { get: function(ele, prop) { return ele.style[prop]; }, set: function(ele, prop, val) { ele.style[prop] =3D val; } }; Spry.Effect.CSSAnimator.stylePropFuncs["opacity"] =3D { get: function(ele, prop) { var val =3D 1; =09 if (ele.style.opacity) val =3D ele.style.opacity; else if (ele.style.filter) { var strVal =3D = ele.style.filter.replace(/.*alpha\(opacity=3D(\d+)\).*/, "$1"); if (strVal) val =3D parseInt(strVal) / 100; } return val + ""; }, set: function(ele, prop, val) { ele.style.opacity =3D "" + val; ele.style.filter =3D "alpha(opacity=3D" + (val * 100) + ")"; } }; /////////////////////////////////////////////////////////////////////////= ////// Spry.$$.Results.defaultEaseFunc =3D function(time, begin, finish, = duration) { time /=3D duration; return begin + ((2 - time) * time * = finish); }; Spry.$$.Results.animatePropertyTo =3D function(propName, to, options) { var opts =3D { interval: 10, duration: 1000, onComplete: null, = transition: Spry.$$.Results.defaultEaseFunc }; Spry.Effect.Animator.copyProps(opts, options); var objs =3D []; for (var i =3D 0; i < this.length; i++) { var obj =3D objs[i] =3D new Object; obj.ele =3D this[i]; obj.from =3D obj.ele[propName]; obj.distance =3D to - obj.from; } var startTime =3D (new Date).getTime(); var animateFunc =3D function() { var elapsedTime =3D ((new Date).getTime()) - startTime; if (elapsedTime > opts.duration) { for (var i =3D 0; i < objs.length; i++) objs[i].ele[propName] =3D to; if (opts.onComplete) opts.onComplete(); } else { for (var i =3D 0; i < objs.length; i++) { var obj =3D objs[i]; obj.ele[propName] =3D opts.transition(elapsedTime, obj.from, = obj.distance, opts.duration); } setTimeout(animateFunc, opts.interval); } }; setTimeout(animateFunc, opts.interval); return this; }; Spry.$$.Results.animateStyleTo =3D function(styleStr, options) { var a =3D new Spry.Effect.CSSAnimator(this, styleStr, options); a.start(); return this; }; })(); // EndSpryComponent ------=_NextPart_000_007F_01CE0C70.44AFB780 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.thepaddler.co.uk/Spry-UI-1.7/includes/SpryWidget.js // SpryWidget.js - version 0.16 - Spry Pre-Release 1.7 // // Copyright (c) 2009. Adobe Systems Incorporated. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions = are met: // // * Redistributions of source code must retain the above copyright = notice, // this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright = notice, // this list of conditions and the following disclaimer in the = documentation // and/or other materials provided with the distribution. // * Neither the name of Adobe Systems Incorporated nor the names of = its // contributors may be used to endorse or promote products derived = from this // software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS = "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS = BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR = BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER = IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR = OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED = OF THE // POSSIBILITY OF SUCH DAMAGE. (function() { // BeginSpryComponent =09 if (typeof Spry =3D=3D "undefined" || !Spry.Utils || !Spry.$$) { alert("SpryWidget.js requires SpryDOMUtils.js"); return; } if (!Spry.Widget) Spry.Widget =3D {}; Spry.Widget.setOptions =3D function(obj, optionsObj, = ignoreUndefinedProps) { if (obj && optionsObj) { for (var optionName in optionsObj) { var v =3D optionsObj[optionName]; if (!ignoreUndefinedProps || v !=3D undefined) obj[optionName] =3D v; } } return obj; }; Spry.Widget.onLoadDidFire =3D false; Spry.Widget.onLoadQueue =3D []; Spry.Widget.addCallbackToOnLoadQueue =3D function(callbackFunc, context) { if (callbackFunc) { if (context) { var cf =3D callbackFunc; callbackFunc =3D function() { cf.call(context); }; } Spry.Widget.onLoadQueue.push(callbackFunc); } }; Spry.Widget.triggerCallbackAfterOnLoad =3D function(callbackFunc, = context) { if (Spry.Widget.onLoadDidFire) callbackFunc.call(context); else Spry.Widget.addCallbackToOnLoadQueue(callbackFunc, context); =09 }; Spry.Widget.processOnLoadQueue =3D function() { Spry.Widget.onLoadDidFire =3D true; var q =3D Spry.Widget.onLoadQueue; while (q.length) (q.shift())(); }; Spry.Utils.addLoadListener(Spry.Widget.processOnLoadQueue); Spry.Widget.Base =3D function() { Spry.Widget.Base.Notifier.call(this); }; Spry.Widget.Base.Notifier =3D function() { this.observers =3D []; this.suppressNotifications =3D 0; }; Spry.Widget.Base.Notifier.prototype.addObserver =3D function(observer) { if (!observer) return; // Make sure the observer isn't already on the list. var len =3D this.observers.length; for (var i =3D 0; i < len; i++) { if (this.observers[i] =3D=3D observer) return; } this.observers[len] =3D observer; }; Spry.Widget.Base.Notifier.prototype.removeObserver =3D = function(observer) { if (!observer) return; for (var i =3D 0; i < this.observers.length; i++) { if (this.observers[i] =3D=3D observer) { this.observers.splice(i, 1); break; } } }; Spry.Widget.Base.Notifier.prototype.notifyObservers =3D = function(methodName, data) { if (!methodName) return; if (!this.suppressNotifications) { var len =3D this.observers.length; for (var i =3D 0; i < len; i++) { var obs =3D this.observers[i]; if (obs) { if (typeof obs =3D=3D "function") obs(methodName, this, data); else if (obs[methodName]) obs[methodName](this, data); } } } }; Spry.Widget.Base.Notifier.prototype.enableNotifications =3D function() { if (--this.suppressNotifications < 0) { this.suppressNotifications =3D 0; Spry.Debug.reportError("Unbalanced enableNotifications() call!\n"); } }; Spry.Widget.Base.Notifier.prototype.disableNotifications =3D function() { ++this.suppressNotifications; }; Spry.Widget.Base.prototype =3D new Spry.Widget.Base.Notifier(); Spry.Widget.Base.prototype.constructor =3D Spry.Widget.Base; Spry.Widget.Base.getElement =3D function(ele) { return Spry.$(ele); }; Spry.Widget.Base.getElements =3D function(elements) { var eType =3D typeof elements; if (eType =3D=3D "string") return Spry.$$(elements); else if (eType =3D=3D "object") { if (elements.constructor =3D=3D Array) { var result =3D []; for (var i =3D 0; i < elements.length; i++) result =3D result.concat(Spry.Widget.Base.getElements(elements[i])); return result; } else return [elements]; } return []; }; Spry.Widget.Base.getElementsByClassName =3D function(root, className) { var results =3D []; if (typeof root.getElementsByClassName !=3D "undefined") { // Browser has a native getElementsByClassName(), so use it. var nodeList =3D root.getElementsByClassName(className); for (var i =3D 0; i < nodeList.length; i++) results.push(nodeList.item(i)); } else { // Browser has no native getElementsByClassName() implementation // so do a manual search. var re =3D new RegExp("\\b" + className + "\\b"); var nodeList =3D root.getElementsByTagName("*"); for (var i =3D 0; i < nodeList.length; i++) { var ele =3D nodeList.item(i); if (ele.className.search(re) !=3D -1) results.push(ele); } } return results; }; Spry.Widget.Base.prototype.getElementChildren =3D function(element) { var children =3D []; if (element) { var child =3D element.firstChild; while (child) { if (child.nodeType =3D=3D 1 /* Node.ELEMENT_NODE */) children.push(child); child =3D child.nextSibling; } } return children; }; Spry.Widget.Base.prototype.groupContentByDelimeter =3D = function(delimeterElements) { var results =3D new Array(); var numDelims =3D delimeterElements.length; for (var i =3D 0; i < numDelims; i++) { var delim =3D delimeterElements[i]; var group =3D new Array(); group.push(delim); var nextDelim =3D delimeterElements[i+1]; var sib =3D delim.nextSibling; while (sib && sib !=3D nextDelim) { group.push(sib); sib =3D sib.nextSibling; } =09 results.push(group); } return results; }; Spry.Widget.Base.prototype.createElement =3D function(elementName, = className, parent, child) { var ele =3D document.createElement(elementName); if (className) ele.className =3D className; if (parent) parent.appendChild(ele); if (child) ele.appendChild(child); return ele; }; Spry.Widget.Base.prototype.sliceLeftClassStr =3D "Left"; Spry.Widget.Base.prototype.sliceRightClassStr =3D "Right"; Spry.Widget.Base.prototype.sliceCenterClassStr =3D "Center"; Spry.Widget.Base.prototype.sliceTopClassStr =3D "Top"; Spry.Widget.Base.prototype.sliceBottomClassStr =3D "Bottom"; Spry.Widget.Base.prototype.sliceFuncs =3D {}; Spry.Widget.Base.prototype.sliceFuncs["2slice"] =3D function(root, = eleName, baseClassName) { var a =3D root ? root : document.createElement(eleName); var b =3D document.createElement(eleName); this.appendChildNodes(b, this.extractChildNodes(a)); // Transfer any = children into the new content container. a.appendChild(b); this.addClassName(a, baseClassName + this.sliceLeftClassStr); b.className =3D baseClassName + this.sliceRightClassStr; a.contentContainer =3D b; return a; }; Spry.Widget.Base.prototype.sliceFuncs["3slice"] =3D function(root, = eleName, baseClassName) { var a =3D root ? root : document.createElement(eleName); var b =3D document.createElement(eleName); var c =3D document.createElement(eleName); this.appendChildNodes(c, this.extractChildNodes(a)); // Transfer any = children into the new content container. a.appendChild(b); b.appendChild(c); this.addClassName(a, baseClassName + this.sliceLeftClassStr); b.className =3D baseClassName + this.sliceRightClassStr; c.className =3D baseClassName + this.sliceCenterClassStr; a.contentContainer =3D c; return a; }; Spry.Widget.Base.prototype.sliceFuncs["3sliceStacked"] =3D = function(root, eleName, baseClassName) { root =3D root ? root : document.createElement(eleName); var l =3D document.createElement(eleName); var m =3D document.createElement(eleName); var r =3D document.createElement(eleName); this.appendChildNodes(m, this.extractChildNodes(root)); // Transfer any = children into the new content container. root.appendChild(l); root.appendChild(m); root.appendChild(r); this.addClassName(root, baseClassName); l.className =3D baseClassName + this.sliceLeftClassStr; m.className =3D baseClassName + this.sliceCenterClassStr; r.className =3D baseClassName + this.sliceRightClassStr; root.contentContainer =3D m; return root; }; Spry.Widget.Base.prototype.sliceFuncs["9slice"] =3D function(root, = eleName, baseClassName) { if (!root) root =3D document.createElement(eleName); this.addClassName(root, baseClassName); var t =3D this.create3SliceStructure(null, eleName, baseClassName + = this.sliceTopClassStr); var m =3D this.create3SliceStructure(null, eleName, baseClassName); var b =3D this.create3SliceStructure(null, eleName, baseClassName + = this.sliceBottomClassStr); this.appendChildNodes(m.contentContainer, = this.extractChildNodes(root)); // Transfer any children into the new = content container. root.appendChild(t); root.appendChild(m); root.appendChild(b); var contentContainer =3D m.contentContainer; root.contentContainer =3D contentContainer; contentContainer.rootContainer =3D root; return root; }; // XXX: REMOVE THESE AFTER WIDGETS HAVE BEEN CLEANED UP! Spry.Widget.Base.prototype.create3SliceStructure =3D = Spry.Widget.Base.prototype.sliceFuncs["3slice"]; Spry.Widget.Base.prototype.create9SliceStructure =3D = Spry.Widget.Base.prototype.sliceFuncs["9slice"]; // XXX Spry.Widget.Base.prototype.createOptionalSlicedStructure =3D = function(root, eleName, className, sliceMap, childEleName) { // root - null or the dom element that will serve as the root = of the sliced structure. // If null, this function will create the root container = using the element name specified. // eleName - The tag to use when creating the sliced structure. // className - The class names placed on each element within the = sliced structure will be derived from this name. // If a space delimited list is passed in, all of the names are = assigned to the root element, but children=20 // derive their classnames from just the first class in the list. // sliceMap - null or a dictionary of class name keys whose values = are either "9slice", "3slice", or "none". // If null, the widget's sliceMap property is used. // childEleName - If specified, the eleName arg will only be used for = the first element created within the structure. All // other elements will be created with the specified = childEleName. if (!sliceMap) sliceMap =3D this.sliceMap ? this.sliceMap : {}; if (!childEleName) childEleName =3D eleName; var sliceType =3D sliceMap[className]; sliceType =3D sliceType ? sliceType : "none"; if (!root) root =3D document.createElement(eleName); this.addClassName(root, className); var baseClass =3D (className || "").split(/\s+/)[0]; var sliceFunc =3D this.sliceFuncs[sliceType]; if (sliceFunc) root =3D sliceFunc.call(this, root, childEleName, baseClass); else root.contentContainer =3D root; return root; }; Spry.Widget.Base.prototype.extractChildNodes =3D function(ele) { var children =3D []; while (ele.firstChild) { var c =3D ele.firstChild; children.push(c); ele.removeChild(c); } return children; }; Spry.Widget.Base.prototype.appendChildNodes =3D function(ele, nodes) { for (var i =3D 0; i < nodes.length; i++) ele.appendChild(nodes[i]); }; Spry.Widget.Base.prototype.setOptions =3D Spry.Widget.setOptions; Spry.Widget.Base.prototype.getOnLoadDidFire =3D function() { return = Spry.Widget.onLoadDidFire; }; Spry.Widget.Base.prototype.addCallbackToOnLoadQueue =3D = Spry.Widget.addCallbackToOnLoadQueue; Spry.Widget.Base.prototype.triggerCallbackAfterOnLoad =3D = Spry.Widget.triggerCallbackAfterOnLoad; Spry.Widget.Base.prototype.getElement =3D Spry.Widget.Base.getElement; Spry.Widget.Base.prototype.getElements =3D Spry.Widget.Base.getElements; Spry.Widget.Base.prototype.addClassName =3D Spry.Utils.addClassName; Spry.Widget.Base.prototype.hasClassName =3D Spry.Utils.hasClassName; Spry.Widget.Base.prototype.removeClassName =3D = Spry.Utils.removeClassName; Spry.Widget.Base.prototype.addEventListener =3D = Spry.Utils.addEventListener; Spry.Widget.Base.prototype.removeEventListener =3D = Spry.Utils.removeEventListener; Spry.Widget.Base.prototype.indexOf =3D function(a, v) { // IE6 doesn't support indexOf on Arrays so we need to check // for built-in support first. If not found manually do the // search. if (a) { if (a.indexOf) return a.indexOf(v); for (var i =3D 0; i < a.length; i++) if (a[i] =3D=3D v) return i; } return -1; }; Spry.Widget.Base.prototype.initializePlugIns =3D = function(defaultPlugIns, widgetOpts) { var evt =3D new Spry.Widget.Event(this); this.notifyObservers("onPreInitializePlugIns", evt); if (!evt.performDefaultAction) return; // Both defaultPlugIns and widgetOpts are optional so make sure // we have always have something to work with. var opts =3D widgetOpts ? widgetOpts : {}; var useDefaults =3D (typeof opts.useDefaultPlugIns =3D=3D "undefined") = ? true : opts.useDefaultPlugIns; var dp =3D (useDefaults && defaultPlugIns) ? defaultPlugIns : []; var np =3D opts.plugIns ? opts.plugIns : []; // Build a list of unique plugins from the default and user-specified = sets. var plugIns =3D []; var plist =3D dp.concat(np); for (var i =3D 0; i < plist.length; i++) { var p =3D plist[i]; if (this.indexOf(plugIns, p) < 0) plugIns.push(p); } // Sort the resulting set of plugins based on priority. plugIns =3D plugIns.sort(function(a, b) { var ap =3D (typeof a.priority =3D=3D "undefined") ? 50 : a.priority; var bp =3D (typeof b.priority =3D=3D "undefined") ? 50 : b.priority; return ap - bp; }); // Store the sorted list of plugins on the widget. this.plugIns =3D plugIns; // Instantiate each plugin. for (var i =3D 0; plugIns && i < plugIns.length; i++) { if (plugIns[i].initialize) plugIns[i].initialize(this); } this.notifyObservers("onPostInitializePlugIns", evt); }; Spry.Widget.Base.prototype.getClientPosition =3D function(ele) { var pos =3D new Object; pos.x =3D ele.offsetLeft; pos.y =3D ele.offsetTop; var parent =3D ele.offsetParent; while (parent) { pos.x +=3D parent.offsetLeft; pos.y +=3D parent.offsetTop; parent =3D parent.offsetParent; } return pos; }; Spry.Widget.Base.prototype.getStyleProp =3D function(element, prop) { var value; var camelized =3D Spry.Utils.camelizeString(prop); try { if (element.style) value =3D element.style[camelized]; if (!value) { if (document.defaultView && document.defaultView.getComputedStyle) { var css =3D document.defaultView.getComputedStyle(element, null); value =3D css ? css.getPropertyValue(prop) : null; } else if (element.currentStyle)=20 { value =3D element.currentStyle[camelized]; } } } catch (e) {} return value =3D=3D 'auto' ? null : value; }; Spry.Widget.Base.prototype.makePositioned =3D function(element) { var pos =3D this.getStyleProp(element, 'position'); if (!pos || pos =3D=3D 'static') { element.style.position =3D 'relative'; // Opera returns the offset relative to the positioning context, when = an // element is position relative but top and left have not been defined if (window.opera) { element.style.top =3D 0; element.style.left =3D 0; } } }; Spry.Widget.Base.prototype.clearIEAlphaFilter =3D function(ele) { var filter =3D ele.style.filter; // IE uses an alpha() filter for opacity. The filter style // property can contain multiple commands, so the idea here // is to just strip out the alpha(filter) and append a new // one, leaving any other filters untouched. if (filter) { filter =3D filter.replace(/alpha\([^\)]*\)/, ""); filter =3D filter.replace(/^\s+|\s+$/, ""); ele.style.filter =3D filter; } else filter =3D ""; return filter; }; Spry.Widget.Base.prototype.setOpacity =3D function(ele, opacity) { ele.style.opacity =3D "" + opacity; var filter =3D this.clearIEAlphaFilter(ele); if (filter) filter +=3D " "; ele.style.filter =3D filter + "alpha(opacity=3D" + (opacity*100) + ")"; }; Spry.Widget.Event =3D function(widget, opts) { this.widget =3D widget; Spry.Widget.setOptions(this, opts); this.performDefaultAction =3D true; }; Spry.Widget.Event.prototype.preventDefault =3D function() { = this.performDefaultAction =3D false; }; //////////////////////////////////////////////////////// Spry.Widget.Button =3D function(ele, opts) { Spry.Widget.Base.call(this); this.element =3D Spry.$$(ele)[0]; // Initialize the button object with the global defaults. this.setOptions(this, Spry.Widget.Button.config); =09 // Override the defaults with any options passed into the constructor. this.setOptions(this, opts); var self =3D this; this.addEventListener(this.element, "mousedown", function(e) { return = self.handleMouseDown(e); }, false); this.addEventListener(this.element, "mouseover", function(e) { return = self.handleMouseOver(e); }, false); this.addEventListener(this.element, "mouseout", function(e) { return = self.handleMouseOut(e); }, false); // XXX: IE doesn't allow the setting of tabindex dynamically. This = means we can't // rely on adding the tabindex attribute if it is missing to enable = keyboard navigation // by default. // Find the first element within the tab container that has a tabindex = or the first // anchor tag. this.focusElement =3D this.getFocusElement(this.element); if (this.focusElement) { this.addEventListener(this.focusElement, "focus", function(e) { return = self.handleFocus(e); }, false); this.addEventListener(this.focusElement, "blur", function(e) { return = self.handleBlur(e); }, false); this.addEventListener(this.focusElement, "keydown", function(e) { = return self.handleKeyDown(e); }, false); } // We need to eat the onclick event so that buttons made // from links don't follow the link. =09 this.addEventListener(this.element, "click", function(e) { return = false; }, false); this.mouseUpCallback =3D function(evt) { return = self.handleMouseUp(evt); }; }; Spry.Widget.Button.config =3D { disabled: false, mouseOutCancelsClick: true, onclick: null, downClass: "ButtonDown", hoverClass: "ButtonHover", disabledClass: "ButtonDisabled", focusedClass: "ButtonFocused" }; Spry.Widget.Button.prototype =3D new Spry.Widget.Base(); Spry.Widget.Button.prototype.constructor =3D Spry.Widget.Button; Spry.Widget.Button.prototype.handleMouseDown =3D function(evt) { if (this.disabled) return false; this.addClassName(this.element, this.downClass); this.addEventListener(document, "mouseup", this.mouseUpCallback, true); this.notifyObservers("onButtonDown", { event: evt }); }; Spry.Widget.Button.prototype.handleMouseUp =3D function(evt) { if (this.disabled) return false; this.removeClassName(this.element, this.downClass); this.removeEventListener(document, "mouseup", this.mouseUpCallback, = true); if (this.onclick) this.onclick(evt); this.notifyObservers("onButtonUp"); this.notifyObservers("onButtonClick"); }; Spry.Widget.Button.prototype.handleMouseOver =3D function(evt) { if (this.disabled) return false; this.addClassName(this.element, this.hoverClass); this.notifyObservers("onButtonEnter"); }; Spry.Widget.Button.prototype.handleMouseOut =3D function(evt) { if (this.disabled) return false; var ele =3D this.element; this.removeClassName(ele, this.hoverClass); if (this.mouseOutCancelsClick) { this.removeClassName(ele, this.downClass); this.removeEventListener(document, "mouseup", this.mouseUpCallback, = true); } =09 this.notifyObservers("onButtonExit"); }; Spry.Widget.Button.prototype.handleFocus =3D function(evt) { if (this.disabled) return false; this.addClassName(this.element, this.focusedClass); this.notifyObservers("onButtonFocused"); }; Spry.Widget.Button.prototype.handleBlur =3D function(evt) { if (this.disabled) return false; this.removeClassName(this.element, this.focusedClass); this.notifyObservers("onButtonBlur"); }; Spry.Widget.Button.prototype.handleKeyDown =3D function(evt) { if (this.disabled) return false; this.notifyObservers("onButtonKeyDown", {event: evt, element: = this.element}); }; Spry.Widget.Button.prototype.getFocusElement =3D function(element) { var focusElement =3D null; var indexEle =3D null; var anchorEle =3D null; this.preorderTraversal(element, function(node) { if (node.nodeType =3D=3D 1 /* NODE.ELEMENT_NODE */) { var tabIndexAttr =3D element.attributes.getNamedItem("tabindex"); if (tabIndexAttr) { indexEle =3D node; return true; } if (!anchorEle && node.nodeName.toLowerCase() =3D=3D "a") anchorEle =3D node; } return false; }); if (indexEle) focusElement =3D indexEle; else if (anchorEle) focusElement =3D anchorEle; return focusElement; }; Spry.Widget.Button.prototype.preorderTraversal =3D function(root, func) { var stopTraversal =3D false; if (root) { stopTraversal =3D func(root); if (root.hasChildNodes()) { var child =3D root.firstChild; while (!stopTraversal && child) { stopTraversal =3D this.preorderTraversal(child, func); try { child =3D child.nextSibling; } catch (e) { child =3D null; } } } } return stopTraversal; }; Spry.Widget.Button.prototype.disable =3D function() { this.disabled =3D true; this.removeClassName(this.element, this.downClass); this.removeClassName(this.element, this.hoverClass); this.addClassName(this.element, this.disabledClass); this.removeEventListener(document, "mouseup", this.mouseUpCallback, = true); }; Spry.Widget.Button.prototype.enable =3D function() { this.disabled =3D false; this.removeClassName(this.element, this.disabledClass); }; Spry.Widget.Button.prototype.focus =3D function() { if (this.disabled) return false; if (this.focusElement) this.focusElement.focus(); }; })(); // EndSpryComponent ------=_NextPart_000_007F_01CE0C70.44AFB780 Content-Type: application/octet-stream Content-Transfer-Encoding: quoted-printable Content-Location: http://www.thepaddler.co.uk/Spry-UI-1.7/includes/SpryMenu.js // SpryMenu.js - version 0.19 - Spry Pre-Release 1.7 // // Copyright (c) 2010. Adobe Systems Incorporated. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions = are met: // // * Redistributions of source code must retain the above copyright = notice, // this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright = notice, // this list of conditions and the following disclaimer in the = documentation // and/or other materials provided with the distribution. // * Neither the name of Adobe Systems Incorporated nor the names of = its // contributors may be used to endorse or promote products derived = from this // software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS = "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS = BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR = BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER = IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR = OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED = OF THE // POSSIBILITY OF SUCH DAMAGE. (function() { // BeginSpryComponent if (typeof Spry =3D=3D "undefined" || !Spry.Widget || !Spry.Widget.Base) { alert("SpryMenu.js requires SpryWidget.js!"); return; } var defaultConfig =3D { plugIns: [], mainMenuShowDelay: 200, // msecs mainMenuHideDelay: 0, // msecs subMenuShowDelay: 200, // msecs subMenuHideDelay: 300, // msecs enableHoverNavigation: true, insertMenuBarBreak: false, insertSubMenuBreak: false, widgetID: null, widgetClass: "MenuBar", // Sliceable menuBarViewClass: "MenuBarView", menuBarBreakClass: "MenuBarBreak", subMenuClass: "SubMenu", // Sliceable subMenuViewClass: "SubMenuView", subMenuBreakClass: "SubMenuBreak", subMenuVisibleClass: "SubMenuVisible", menuItemContainerClass: "MenuItemContainer", // Sliceable menuItemContainerHoverClass: "MenuItemContainerHover", menuItemClass: "MenuItem", // Sliceable menuItemHoverClass: "MenuItemHover", menuItemSelectedClass: "MenuItemSelected", menuItemLabelClass: "MenuItemLabel", // Sliceable menuItemWithSubMenuClass: "MenuItemWithSubMenu", menuItemFirstClass: "MenuItemFirst", menuItemLastClass: "MenuItemLast", menuLevelClassPrefix: "MenuLevel", sliceMap: {} }; Spry.Widget.MenuBar2 =3D function(ele, opts) { Spry.Widget.Base.call(this); this.element =3D Spry.$$(ele)[0]; // Initialize the accordion object with the global defaults. this.setOptions(this, Spry.Widget.MenuBar2.config); =09 // Override the defaults with any options passed into the constructor. this.setOptions(this, opts); this.showMenuTimer =3D 0; this.menuToShow =3D null; this.hideMenuTimer =3D 0; this.menuToHide =3D null; this.currentMenuItem =3D null; this.currentSubMenu =3D null; this.initializePlugIns(Spry.Widget.MenuBar2.config.plugIns, opts); var evt =3D new Spry.Widget.Event(this); this.notifyObservers("onPreInitialize", evt); if (!evt.performDefaultAction) return; this.transformMarkup(); this.attachBehaviors(); this.notifyObservers("onPostInitialize", evt); }; Spry.Widget.MenuBar2.prototype =3D new Spry.Widget.Base(); Spry.Widget.MenuBar2.prototype.constructor =3D Spry.Widget.MenuBar2; Spry.Widget.MenuBar2.config =3D defaultConfig; Spry.Widget.MenuBar2.prototype.transformMarkup =3D function() { var evt =3D new Spry.Widget.Event(this); this.notifyObservers("onPreTransformMarkup", evt); if (!evt.performDefaultAction) return; // Find the elements and convert them to MenuItems. =09 var eles =3D Spry.$$("a", this.element); for (var i =3D 0; i < eles.length; i++) { var a =3D eles[i]; var ca =3D this.extractChildNodes(a); this.createOptionalSlicedStructure(a, "span", this.menuItemClass); var label =3D this.createOptionalSlicedStructure(null, "span", = this.menuItemLabelClass); this.appendChildNodes(label.contentContainer, ca); a.contentContainer.appendChild(label); } // Add MenuItemContainer class to all