From: Subject: =?iso-2022-jp?B?aVRhZyAtIENvbXBhdGliaWxpdHk=?= Date: Sat, Jul 09 2011 23:59:55 GMT+0200 MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_NextPart_000_0000_4A1CA263.E04924BE"; type="text/html" ------=_NextPart_000_0000_4A1CA263.E04924BE Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Location: http://www.itagsoftware.com/compatibility.php =EF=BB=BF iTag - Compatibility =09 =09 =09 =09 =09 =09

iTag
Photo Tagging Software

=09
Gadgets powered by Google

Where is my data stored?

All information entered using iTag is written to the IPTC and XMP= headers of each file.
=09 Below is an indication of where iTag stores the captions for each fil= e type and what applications can also see this information:

File Type IPTC XMP
JPEG
RAW, TIFF, PNG  
AVI, MP4  
MP3, WAV  
=09

Metadata Engine

All files supported by iTag are read and written using the Adobe XMP= Toolkit since build 374.=20 Older versions of iTag used Microsoft's Windows Imagi= ng Component however it proved to have many problems and Microsoft have= been slow to release fixes. Another major advantage of the Adobe XMP Toolkit is that it does not= offset the EXIF Makernotes as WIC does.

AVI Compatibility

I don't know of any other application currently capable of perfor= ming AVI tagging but if you want to verify the XMP is in the file, open up= a (small!) avi in your favorite text editor and search for "xmp"= .

=09

RAW Compatibility

Depending on the particular format, some Microsoft products such as Pr= o Photo Tools and Windows Live Photo Gallery may be able to read the data= too but their RAW support is lagging somewhat. Adobe Photoshop should have no issues finding the metadata.

=09

JPEG Compatibility

Below is a table that lists the known applications that all work with= JPEG IPTC and XMP headers

=09 =09 =09
Application Comments XMP Storage Location
Title Description Tags
Desktop Applications
iTag 100% compatible with itself! /xmp/dc:title /xmp/exif:UserComment
/xmp/dc:description
/xmp/dc:subject
= Adobe Photoshop CS3 Fully compatible /xmp/dc:title /xmp/dc:description /xmp/dc:subject
A= dobe Lightroom Fully compatible /xmp/dc:title /xmp/dc:description /xmp/dc:subject
GeoSetter Fully compatible /xmp/dc:title /xmp/dc:description /xmp/dc:subject
GraphicConverter (Mac) Fully compatible /xmp/dc:title /xmp/dc:description /xmp/dc:subject
Windows Vista Photo Gallery Fully compatible /xmp/dc:title /xmp/exif:UserComment /xmp/dc:subject
Windows= Live Photo Gallery Fully compatible /xmp/dc:title /xmp/exif:UserComment /xmp/dc:subject
Microsoft Pro Photo Tools
(formerl= y Photo Info)
Fully compatible /xmp/dc:title /xmp/exif:UserComment /xmp/dc:subject
Vista= Flickr Uploader Fully compatible /xmp/dc:title /xmp/exif:UserComment /xmp/dc:subject
=09 =09
Application Comments IPTC Storage Location
Title Description Tags
Desktop Applications
iTag 100% compatible with itself! IPTC.Headline &
IPTC.ObjectName
IPTC.Caption
JPEG.Comment (read only)
IPTC.Keywords  
Adobe Photoshop CS3 Fully compatible      
A= dobe Lightroom Fully compatible      
Br= eezeBrowser Pro 1.7.2 Fully compatible      
Copernic Desktop Search 2 Fully compatible      
= Exifer Fully compatible      
ExifT= ool Fully compatible      
Exiv2 Fully compatible      
GeoSetter Fully compatible      
GraphicConverter (Mac) Fully compatible      
IDimager Fully compatible      
IrfanView Fully compatible      
Mapivi Fully compatible      
Opanda IE= xif Fully compatible
(Editing requires PowerExif which isn'= t free)
     
Photo Mech= anic Fully compatible      
Pixvue [Discontinued] Fully compatible IPTC.ObjectName IPTC.Caption IPTC.Keywords
XnView Fully compatible      
Photo Album Viewer/Generator
Adobe Photoshop Album 3.2 Not compatible.
Metadata appears to be stored in proprietary= database
     
JAlbum Fully compatible when using Chameleon skin      
J.River Media Center<= /a> Title is ignored.
Caption & Tags are automatically read= in.
- IPTC.Caption IPTC.Keywords
Picasa Title is ignored.
Caption & Tags are automatically read= in.
- IPTC.Caption IPTC.Keywords
Cooliris Compatible when gallery is generated by iTag     -
Porta Fully compatible      
Web based Applications
Flickr Fully compatible      
Fotki Fully compatible      
Panoramio Geocode compatible - - -
Picasa Web Albums<= /td> Title is ignored.
Caption & Tags are automatically read= in.
- IPTC.Caption IPTC.Keywords
SmugMug Title is ignored.
Caption & Tags are automatically read= in.
- IPTC.Caption IPTC.Keywords
Zooomr Fully compatible      
Photo Uploaders
Flickr Uploadr Fully compatible      
JUploadr Title is ignored.
Caption & Tags are automatically read= in.
- IPTC.Caption IPTC.Keywords
Vista= Flickr Uploader Fully compatible IPTC.ObjectName IPTC.Caption IPTC.Keywords
=09

Besides Title, Description and Tags - iTag allows the editing of= several other fields. Their respective storage locations are listed below:=

=09
Other iTag fields
Author /xmp/dc:creator
IPTC.Byline
Copyright /xmp/dc:rights
IPTC.Copyright
Rating /xmp/xmp:rating
/xmp/MicrosoftPhoto:Rating
GPS Latitude EXIF.GPSLatitude, EXIF.GPSLatitudeRef
/xmp/exif:GPSLatitude<= /td>
GPS Longitude EXIF.GPSLongitude, EXIF.GPSLongitudeRef
/xmp/exif:GPSLongitu= de

Let me know<= /a> of any errata or if you use a different application that works with IPT= C or XMP.

=09 =09
<= a id=3D"nextLink" href=3D"#">
Saved from http://www.itagsoftware.com/co= mpatibility.php
Sat Jul 09 2011 23:59:54 GMT+0200
Saved by Un= MHT Ver.5.6.9
------=_NextPart_000_0000_4A1CA263.E04924BE Content-Type: text/css Content-Transfer-Encoding: quoted-printable Content-Location: http://www.itagsoftware.com/css/itag.css body=20 { font-family: Arial, sans-serif; font-size: 75%;=09 color: #333;=20 padding: 0;=20 margin: 0;=20 text-align: center; background: #EFF5FB; } a { color: #084B8A;} a:hover { color: #333; } h2, h3{ font-weight: bold; font-family: Arial, sans-serif;} p, div#innercontent ul li{font-size:14px;text-align:left;} div#centerModule { margin: 0 auto; text-align: left; width: 67em;} div#logo h1 { width: 300px;=20 height: 59px; padding: 0;=20 margin: 38px 0 0 15px;=20 float: left; color:#3366CC; font-size:2.1em; line-height:20px; } div#logo h1 span{font-size:0.5em;color:#666;} div#logo { position: relative; } #outerwrapper { background: #8AABD0; padding: 2px;} #innerwrapper { background: #FFF;} div#header { background: #A9D0F5; border-bottom: 1px solid #8AABD0; } div#header ul { padding: 0; margin: 0; float: right; overflow: visible; } div#header ul li { display: inline; } div#header ul li a, div#header ul li span { padding: 0.4em 0.9em 0.6em; text-decoration: none; border: 0; color: #444; font: 1.6em Tahoma, Helvetica, Arial, sans-serif; display: block; float:= left; margin-bottom: -1px; position: relative; } div#header ul li span { background: #E0ECF8; border-style: solid; border-wi= dth: 0 1px; border-color: #8AABD0; } div#header ul li a:hover, div#header ul li a:focus { background: #8AABD0;= color: #111; } div#content { clear: both; background: #FFF; padding: 0 0 0.8em; margin: 0= 1em; } div#bluebox { border-bottom: 3px solid #8AABD0; background: #E0ECF8; paddin= g: 1.3em 1.3em 1.3em; overflow: visible; } div#innercontent div { margin: 0.2em 0 2.5em 30px; color: #333; font-size:= 1.1em; line-height: 1.4em; } div#innercontent {margin: 0 2.3em 2.5em; } div#innercontent p {margin-left:15px;} div#innercontent h3{ background: #E0ECF8; padding: 5px 5px 5px 28px; font-size: 1.3em;} div#footer { border-top: 1px solid #fff; background: white; margin: 0 2.5em= ; } div#get-app {width:268px;margin:0 auto;padding:15px 30px 55px 455px; bac= kground:url(../images3/iTag-Homer.jpg) 25px 15px no-repeat #E0ECF8;text-ali= gn:center;} div#get-app #dl-button {margin:40px 0 0 0;padding:0 0 0 12px;text-align:= left;} div#get-app #dl-button a {display:block;width:240px;height:82px;overflow= :hidden;background:url(../template/images/dl-button.png) 0 -246px no-repeat= transparent;font-size:32px;text-align:center;color:#fff;} div#get-app #dl-button a:hover {background-position:0 -82px;} div#get-app #dl-button a strong {display:block;padding-top:12px;font-wei= ght:normal;} div#get-app #dl-button a span {display:block;padding-top:4px;font-size:1= 2px;color:#eee;} div#features ul {margin:20px 0 20px 30px;padding:0;list-style:none;} div#features ul li {margin:0 0 5px 0;padding:0 0 0 22px;background:url(.= ./template/images/bullet-leaves.gif) 0 2px no-repeat transparent;font-size:= 14px;text-align:left;} div#features p{font-size:14px;text-align:left;} div#get-app h4 {margin-bottom:18px;} div#get-app p.mac {margin:9px 0;} =20 div#buy-app {width:200px;margin:0 auto;padding:0px 0px 0px 190p= x;text-align:center;} div#buy-app #dl-button {margin:20px 0 0 0;padding:0 0 0 12px;text-align:= left;} div#buy-app #dl-button a {display:block;width:240px;height:82px;overflow= :hidden;background:url(../template/images/dl-button.png) 0 -246px no-repeat= transparent;font-size:32px;text-align:center;color:#fff;} div#buy-app #dl-button a:hover {background-position:0 -82px;} div#buy-app #dl-button a strong {display:block;padding-top:12px;font-wei= ght:normal;} div#buy-app #dl-button a span {display:block;padding-top:4px;font-size:1= 2px;color:#eee;} =20 div#buy-app h4 {margin-bottom:5px;} div#buy-app p.mac {margin:9px 0;} =20 div#download-app {width:150px;margin:0 auto;padding:10px 0px 0px 10px;te= xt-align:center;} div#download-app #dl-button {margin:10px 0 0 0;padding:0 0 0 12px;text-a= lign:left;} div#download-app #dl-button a {display:block;width:120px;height:40px;ove= rflow:hidden;background:url(../template/images/dl-button-small.png) 0 -40px= no-repeat transparent;font-size:20px;text-align:center;color:#fff;} div#download-app #dl-button a:hover {background-position:0 -40px;} div#download-app #dl-button a strong {display:block;padding-top:8px;font= -weight:normal;} div#download-app #dl-button a span {display:block;padding-top:4px;font-s= ize:12px;color:#eee;} =20 =20 ------=_NextPart_000_0000_4A1CA263.E04924BE Content-Type: text/css Content-Transfer-Encoding: quoted-printable Content-Location: http://www.itagsoftware.com/css/home.css /* div#announcement li { position: relative; background: #E0ECF8;} div#announcement li span, div#announcement li a { position: absolute; to= p: 0; font-size: 1.1em; line-height: 0.8em; } div#announcement li a { padding: 0.4em 0 0.2em 0; margin-left: 6.3em; bo= rder-bottom: 1px dotted #084B8A; } div#announcement li span { background: #EEE; border-style: outset; borde= r-width: 1px; padding: 0.28em; } div#announcement li#archives { background: none; } div#announcement li#archives a { background: url(../template/images/li_bulletbg2.gif) no-repeat 0 0.5em;= border: 0; right: 0; margin: 1px 0 0; padding-left: 16px; text-decoration: underline; } */ =09 div#innercontent h2 { padding: 1em 0;background: url(../template/images/= home_downarrow.gif) no-repeat 15% 55%; } div#innercontent iframe { width: 728px; height: 90px; margin: 1.2em auto= 0; display: block; clear: both; line-height: 0.01em; } div#innercontent div#rightcontent { float: right; margin: 0 0 1em 2em;= } div#innercontent h2.screenshots { background: none; color: #8AABD0; text= -align: center; } div#innercontent div.screenshots { margin: 0; padding: 0em 0; background= : #E0ECF8; border: 2px solid #8AABD0; } =09 div.screenshots ul { list-style: none; padding: 0; margin: 0; } div.screenshots ul li { display: block; margin: 6px; border: 1px solid= white; text-align: center; } div.screenshots ul li a { display: block; } div.screenshots ul li img { display: block; border: 1px solid #BBB; padd= ing: 3px; background: #FFF; } div.screenshots ul li span { font-weight: bold; display: block; font-siz= e: 0.8em; background: #A9D0F5; padding-bottom: 0.2em; } =09 =09 div#bluebox { padding-top: 0 !important; } =09 div.box { background: #A9D0F5; float: left; } div.box div { padding: 0.6em 1.2em 1.1em; margin: 0.6em; border: 1px sol= id #8AABD0; background: #FFF; border-top-width: 2px; } div.box ul { list-style-type: none; padding: 0; margin: 0; font-size: 0.= 9em; } div.box ul li { line-height: 1em; margin-bottom: 1px; padding: 0.4em 0; } div.box div h2 { margin: 0 0 0.3em; border-bottom: 2px solid #CCC; paddi= ng-bottom: 2px; } =09 =20 ------=_NextPart_000_0000_4A1CA263.E04924BE Content-Type: text/css Content-Transfer-Encoding: quoted-printable Content-Location: http://www.itagsoftware.com/css/table.css #innercontent table { border-collapse: collapse; border: 1px solid #03476F; font: normal 11px verdana, arial, helvetica, sans-serif; background: white; margin: 1em; } =09 #innercontent td, th { border: 1px dotted #03476F; padding: .5em; border-collapse: collapse; } =09 #innercontent th { font-weight:bold; background-color: #A9D0F5; } =09 =09 #innercontent td.special{ background-color: #E0ECF8; font-weight:bold; color:#084B8A; font-family:arial,helvetica,sans-serif; font-size:110%; padding:10px; text-align:left; } ------=_NextPart_000_0000_4A1CA263.E04924BE Content-Type: text/css Content-Transfer-Encoding: quoted-printable Content-Location: http://www.itagsoftware.com/css/lightbox.css #lightbox{ position: absolute; top: 40px; left: 0; width: 100%; z-index: 100; text-align: center; line-height: 0; } #lightbox a img{ border: none; } #outerImageContainer{ position: relative; background-color: #fff; width: 250px; height: 250px; margin: 0 auto; } #imageContainer{ padding: 10px; } #loading{ position: absolute; top: 40%; left: 0%; height: 25%; width: 100%; text-align: center; line-height: 0; } #hoverNav{ position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 10; } #imageContainer>#hoverNav{ left: 0;} #hoverNav a{ outline: none;} #prevLink, #nextLink{ width: 49%; height: 100%; background: transparent url(../images/blank.gif) no-repeat; /* Trick IE in= to showing hover */ display: block; } #prevLink { left: 0; float: left;} #nextLink { right: 0; float: right;} #prevLink:hover, #prevLink:visited:hover { background: url(../images/prevla= bel.gif) left 15% no-repeat; } #nextLink:hover, #nextLink:visited:hover { background: url(../images/nextla= bel.gif) right 15% no-repeat; } #imageDataContainer{ font: 10px Verdana, Helvetica, sans-serif; background-color: #fff; margin: 0 auto; line-height: 1.4em; } #imageData{ padding:0 10px; } #imageData #imageDetails{ width: 70%; float: left; text-align: left; }=09 #imageData #caption{ font-weight: bold; } #imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0= em; } =09 #imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7= em; }=09 =09 #overlay{ position: absolute; top: 0; left: 0; z-index: 90; width: 100%; height: 500px; background-color: #000; filter:alpha(opacity=3D60); -moz-opacity: 0.6; opacity: 0.6; } =09 .clearfix:after { content: ".";=20 display: block;=20 height: 0;=20 clear: both;=20 visibility: hidden; } * html>body .clearfix { display: inline-block;=20 width: 100%; } * html .clearfix { /* Hides from IE-mac \*/ height: 1%; /* End hide from IE-mac */ }=09 =09 ------=_NextPart_000_0000_4A1CA263.E04924BE Content-Type: text/javascript Content-Transfer-Encoding: quoted-printable Content-Location: http://www.itagsoftware.com/script/prototype.js /* Prototype JavaScript framework, version 1.6.0 * (c) 2005-2007 Sam Stephenson * * Prototype is freely distributable under the terms of an MIT-style licen= se. * For details, see the Prototype web site: http://www.prototypejs.org/ * *-------------------------------------------------------------------------= -*/ var Prototype =3D { Version: '1.6.0', Browser: { IE: !!(window.attachEvent && !window.opera), Opera: !!window.opera, WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgen= t.indexOf('KHTML') =3D=3D -1, MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/) }, BrowserFeatures: { XPath: !!document.evaluate, ElementExtensions: !!window.HTMLElement, SpecificElementExtensions: document.createElement('div').__proto__ && document.createElement('div').__proto__ !=3D=3D document.createElement('form').__proto__ }, ScriptFragment: ']*>([\\S\\s]*?)<\/script>', JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/, emptyFunction: function() { }, K: function(x) { return x } }; if (Prototype.Browser.MobileSafari) Prototype.BrowserFeatures.SpecificElementExtensions =3D false; if (Prototype.Browser.WebKit) Prototype.BrowserFeatures.XPath =3D false; /* Based on Alex Arnell's inheritance implementation. */ var Class =3D { create: function() { var parent =3D null, properties =3D $A(arguments); if (Object.isFunction(properties[0])) parent =3D properties.shift(); function klass() { this.initialize.apply(this, arguments); } Object.extend(klass, Class.Methods); klass.superclass =3D parent; klass.subclasses =3D []; if (parent) { var subclass =3D function() { }; subclass.prototype =3D parent.prototype; klass.prototype =3D new subclass; parent.subclasses.push(klass); } for (var i =3D 0; i < properties.length; i++) klass.addMethods(properties[i]); if (!klass.prototype.initialize) klass.prototype.initialize =3D Prototype.emptyFunction; klass.prototype.constructor =3D klass; return klass; } }; Class.Methods =3D { addMethods: function(source) { var ancestor =3D this.superclass && this.superclass.prototype; var properties =3D Object.keys(source); if (!Object.keys({ toString: true }).length) properties.push("toString", "valueOf"); for (var i =3D 0, length =3D properties.length; i < length; i++) { var property =3D properties[i], value =3D source[property]; if (ancestor && Object.isFunction(value) && value.argumentNames().first() =3D=3D "$super") { var method =3D value, value =3D Object.extend((function(m) { return function() { return ancestor[m].apply(this, arguments) }; })(property).wrap(method), { valueOf: function() { return method }, toString: function() { return method.toString() } }); } this.prototype[property] =3D value; } return this; } }; var Abstract =3D { }; Object.extend =3D function(destination, source) { for (var property in source) destination[property] =3D source[property]; return destination; }; Object.extend(Object, { inspect: function(object) { try { if (object =3D=3D=3D undefined) return 'undefined'; if (object =3D=3D=3D null) return 'null'; return object.inspect ? object.inspect() : object.toString(); } catch (e) { if (e instanceof RangeError) return '...'; throw e; } }, toJSON: function(object) { var type =3D typeof object; switch (type) { case 'undefined': case 'function': case 'unknown': return; case 'boolean': return object.toString(); } if (object =3D=3D=3D null) return 'null'; if (object.toJSON) return object.toJSON(); if (Object.isElement(object)) return; var results =3D []; for (var property in object) { var value =3D Object.toJSON(object[property]); if (value !=3D=3D undefined) results.push(property.toJSON() + ': ' + value); } return '{' + results.join(', ') + '}'; }, toQueryString: function(object) { return $H(object).toQueryString(); }, toHTML: function(object) { return object && object.toHTML ? object.toHTML() : String.interpret(obj= ect); }, keys: function(object) { var keys =3D []; for (var property in object) keys.push(property); return keys; }, values: function(object) { var values =3D []; for (var property in object) values.push(object[property]); return values; }, clone: function(object) { return Object.extend({ }, object); }, isElement: function(object) { return object && object.nodeType =3D=3D 1; }, isArray: function(object) { return object && object.constructor =3D=3D=3D Array; }, isHash: function(object) { return object instanceof Hash; }, isFunction: function(object) { return typeof object =3D=3D "function"; }, isString: function(object) { return typeof object =3D=3D "string"; }, isNumber: function(object) { return typeof object =3D=3D "number"; }, isUndefined: function(object) { return typeof object =3D=3D "undefined"; } }); Object.extend(Function.prototype, { argumentNames: function() { var names =3D this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1= ].split(",").invoke("strip"); return names.length =3D=3D 1 && !names[0] ? [] : names; }, bind: function() { if (arguments.length < 2 && arguments[0] =3D=3D=3D undefined) return th= is; var __method =3D this, args =3D $A(arguments), object =3D args.shift(); return function() { return __method.apply(object, args.concat($A(arguments))); } }, bindAsEventListener: function() { var __method =3D this, args =3D $A(arguments), object =3D args.shift(); return function(event) { return __method.apply(object, [event || window.event].concat(args)); } }, curry: function() { if (!arguments.length) return this; var __method =3D this, args =3D $A(arguments); return function() { return __method.apply(this, args.concat($A(arguments))); } }, delay: function() { var __method =3D this, args =3D $A(arguments), timeout =3D args.shift()= * 1000; return window.setTimeout(function() { return __method.apply(__method, args); }, timeout); }, wrap: function(wrapper) { var __method =3D this; return function() { return wrapper.apply(this, [__method.bind(this)].concat($A(arguments)= )); } }, methodize: function() { if (this._methodized) return this._methodized; var __method =3D this; return this._methodized =3D function() { return __method.apply(null, [this].concat($A(arguments))); }; } }); Function.prototype.defer =3D Function.prototype.delay.curry(0.01); Date.prototype.toJSON =3D function() { return '"' + this.getUTCFullYear() + '-' + (this.getUTCMonth() + 1).toPaddedString(2) + '-' + this.getUTCDate().toPaddedString(2) + 'T' + this.getUTCHours().toPaddedString(2) + ':' + this.getUTCMinutes().toPaddedString(2) + ':' + this.getUTCSeconds().toPaddedString(2) + 'Z"'; }; var Try =3D { these: function() { var returnValue; for (var i =3D 0, length =3D arguments.length; i < length; i++) { var lambda =3D arguments[i]; try { returnValue =3D lambda(); break; } catch (e) { } } return returnValue; } }; RegExp.prototype.match =3D RegExp.prototype.test; RegExp.escape =3D function(str) { return String(str).replace(/([.*+?^=3D!:${}()|[\]\/\\])/g, '\\$1'); }; /*-------------------------------------------------------------------------= -*/ var PeriodicalExecuter =3D Class.create({ initialize: function(callback, frequency) { this.callback =3D callback; this.frequency =3D frequency; this.currentlyExecuting =3D false; this.registerCallback(); }, registerCallback: function() { this.timer =3D setInterval(this.onTimerEvent.bind(this), this.frequency= * 1000); }, execute: function() { this.callback(this); }, stop: function() { if (!this.timer) return; clearInterval(this.timer); this.timer =3D null; }, onTimerEvent: function() { if (!this.currentlyExecuting) { try { this.currentlyExecuting =3D true; this.execute(); } finally { this.currentlyExecuting =3D false; } } } }); Object.extend(String, { interpret: function(value) { return value =3D=3D null ? '' : String(value); }, specialChar: { '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '\\': '\\\\' } }); Object.extend(String.prototype, { gsub: function(pattern, replacement) { var result =3D '', source =3D this, match; replacement =3D arguments.callee.prepareReplacement(replacement); while (source.length > 0) { if (match =3D source.match(pattern)) { result +=3D source.slice(0, match.index); result +=3D String.interpret(replacement(match)); source =3D source.slice(match.index + match[0].length); } else { result +=3D source, source =3D ''; } } return result; }, sub: function(pattern, replacement, count) { replacement =3D this.gsub.prepareReplacement(replacement); count =3D count =3D=3D=3D undefined ? 1 : count; return this.gsub(pattern, function(match) { if (--count < 0) return match[0]; return replacement(match); }); }, scan: function(pattern, iterator) { this.gsub(pattern, iterator); return String(this); }, truncate: function(length, truncation) { length =3D length || 30; truncation =3D truncation =3D=3D=3D undefined ? '...' : truncation; return this.length > length ? this.slice(0, length - truncation.length) + truncation : String(this); }, strip: function() { return this.replace(/^\s+/, '').replace(/\s+$/, ''); }, stripTags: function() { return this.replace(/<\/?[^>]+>/gi, ''); }, stripScripts: function() { return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); }, extractScripts: function() { var matchAll =3D new RegExp(Prototype.ScriptFragment, 'img'); var matchOne =3D new RegExp(Prototype.ScriptFragment, 'im'); return (this.match(matchAll) || []).map(function(scriptTag) { return (scriptTag.match(matchOne) || ['', ''])[1]; }); }, evalScripts: function() { return this.extractScripts().map(function(script) { return eval(script)= }); }, escapeHTML: function() { var self =3D arguments.callee; self.text.data =3D this; return self.div.innerHTML; }, unescapeHTML: function() { var div =3D new Element('div'); div.innerHTML =3D this.stripTags(); return div.childNodes[0] ? (div.childNodes.length > 1 ? $A(div.childNodes).inject('', function(memo, node) { return memo+node= .nodeValue }) : div.childNodes[0].nodeValue) : ''; }, toQueryParams: function(separator) { var match =3D this.strip().match(/([^?#]*)(#.*)?$/); if (!match) return { }; return match[1].split(separator || '&').inject({ }, function(hash, pair= ) { if ((pair =3D pair.split('=3D'))[0]) { var key =3D decodeURIComponent(pair.shift()); var value =3D pair.length > 1 ? pair.join('=3D') : pair[0]; if (value !=3D undefined) value =3D decodeURIComponent(value); if (key in hash) { if (!Object.isArray(hash[key])) hash[key] =3D [hash[key]]; hash[key].push(value); } else hash[key] =3D value; } return hash; }); }, toArray: function() { return this.split(''); }, succ: function() { return this.slice(0, this.length - 1) + String.fromCharCode(this.charCodeAt(this.length - 1) + 1); }, times: function(count) { return count < 1 ? '' : new Array(count + 1).join(this); }, camelize: function() { var parts =3D this.split('-'), len =3D parts.length; if (len =3D=3D 1) return parts[0]; var camelized =3D this.charAt(0) =3D=3D '-' ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) : parts[0]; for (var i =3D 1; i < len; i++) camelized +=3D parts[i].charAt(0).toUpperCase() + parts[i].substring(= 1); return camelized; }, capitalize: function() { return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); }, underscore: function() { return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gs= ub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); }, dasherize: function() { return this.gsub(/_/,'-'); }, inspect: function(useDoubleQuotes) { var escapedString =3D this.gsub(/[\x00-\x1f\\]/, function(match) { var character =3D String.specialChar[match[0]]; return character ? character : '\\u00' + match[0].charCodeAt().toPadd= edString(2, 16); }); if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') += '"'; return "'" + escapedString.replace(/'/g, '\\\'') + "'"; }, toJSON: function() { return this.inspect(true); }, unfilterJSON: function(filter) { return this.sub(filter || Prototype.JSONFilter, '#{1}'); }, isJSON: function() { var str =3D this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); }, evalJSON: function(sanitize) { var json =3D this.unfilterJSON(); try { if (!sanitize || json.isJSON()) return eval('(' + json + ')'); } catch (e) { } throw new SyntaxError('Badly formed JSON string: ' + this.inspect()); }, include: function(pattern) { return this.indexOf(pattern) > -1; }, startsWith: function(pattern) { return this.indexOf(pattern) =3D=3D=3D 0; }, endsWith: function(pattern) { var d =3D this.length - pattern.length; return d >=3D 0 && this.lastIndexOf(pattern) =3D=3D=3D d; }, empty: function() { return this =3D=3D ''; }, blank: function() { return /^\s*$/.test(this); }, interpolate: function(object, pattern) { return new Template(this, pattern).evaluate(object); } }); if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.= prototype, { escapeHTML: function() { return this.replace(/&/g,'&').replace(//g,'&g= t;'); }, unescapeHTML: function() { return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,= '>'); } }); String.prototype.gsub.prepareReplacement =3D function(replacement) { if (Object.isFunction(replacement)) return replacement; var template =3D new Template(replacement); return function(match) { return template.evaluate(match) }; }; String.prototype.parseQuery =3D String.prototype.toQueryParams; Object.extend(String.prototype.escapeHTML, { div: document.createElement('div'), text: document.createTextNode('') }); with (String.prototype.escapeHTML) div.appendChild(text); var Template =3D Class.create({ initialize: function(template, pattern) { this.template =3D template.toString(); this.pattern =3D pattern || Template.Pattern; }, evaluate: function(object) { if (Object.isFunction(object.toTemplateReplacements)) object =3D object.toTemplateReplacements(); return this.template.gsub(this.pattern, function(match) { if (object =3D=3D null) return ''; var before =3D match[1] || ''; if (before =3D=3D '\\') return match[2]; var ctx =3D object, expr =3D match[3]; var pattern =3D /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/, match =3D= pattern.exec(expr); if (match =3D=3D null) return before; while (match !=3D null) { var comp =3D match[1].startsWith('[') ? match[2].gsub('\\\\]', ']')= : match[1]; ctx =3D ctx[comp]; if (null =3D=3D ctx || '' =3D=3D match[3]) break; expr =3D expr.substring('[' =3D=3D match[3] ? match[1].length : mat= ch[0].length); match =3D pattern.exec(expr); } return before + String.interpret(ctx); }.bind(this)); } }); Template.Pattern =3D /(^|.|\r|\n)(#\{(.*?)\})/; var $break =3D { }; var Enumerable =3D { each: function(iterator, context) { var index =3D 0; iterator =3D iterator.bind(context); try { this._each(function(value) { iterator(value, index++); }); } catch (e) { if (e !=3D $break) throw e; } return this; }, eachSlice: function(number, iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var index =3D -number, slices =3D [], array =3D this.toArray(); while ((index +=3D number) < array.length) slices.push(array.slice(index, index+number)); return slices.collect(iterator, context); }, all: function(iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var result =3D true; this.each(function(value, index) { result =3D result && !!iterator(value, index); if (!result) throw $break; }); return result; }, any: function(iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var result =3D false; this.each(function(value, index) { if (result =3D !!iterator(value, index)) throw $break; }); return result; }, collect: function(iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var results =3D []; this.each(function(value, index) { results.push(iterator(value, index)); }); return results; }, detect: function(iterator, context) { iterator =3D iterator.bind(context); var result; this.each(function(value, index) { if (iterator(value, index)) { result =3D value; throw $break; } }); return result; }, findAll: function(iterator, context) { iterator =3D iterator.bind(context); var results =3D []; this.each(function(value, index) { if (iterator(value, index)) results.push(value); }); return results; }, grep: function(filter, iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var results =3D []; if (Object.isString(filter)) filter =3D new RegExp(filter); this.each(function(value, index) { if (filter.match(value)) results.push(iterator(value, index)); }); return results; }, include: function(object) { if (Object.isFunction(this.indexOf)) if (this.indexOf(object) !=3D -1) return true; var found =3D false; this.each(function(value) { if (value =3D=3D object) { found =3D true; throw $break; } }); return found; }, inGroupsOf: function(number, fillWith) { fillWith =3D fillWith =3D=3D=3D undefined ? null : fillWith; return this.eachSlice(number, function(slice) { while(slice.length < number) slice.push(fillWith); return slice; }); }, inject: function(memo, iterator, context) { iterator =3D iterator.bind(context); this.each(function(value, index) { memo =3D iterator(memo, value, index); }); return memo; }, invoke: function(method) { var args =3D $A(arguments).slice(1); return this.map(function(value) { return value[method].apply(value, args); }); }, max: function(iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var result; this.each(function(value, index) { value =3D iterator(value, index); if (result =3D=3D undefined || value >=3D result) result =3D value; }); return result; }, min: function(iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var result; this.each(function(value, index) { value =3D iterator(value, index); if (result =3D=3D undefined || value < result) result =3D value; }); return result; }, partition: function(iterator, context) { iterator =3D iterator ? iterator.bind(context) : Prototype.K; var trues =3D [], falses =3D []; this.each(function(value, index) { (iterator(value, index) ? trues : falses).push(value); }); return [trues, falses]; }, pluck: function(property) { var results =3D []; this.each(function(value) { results.push(value[property]); }); return results; }, reject: function(iterator, context) { iterator =3D iterator.bind(context); var results =3D []; this.each(function(value, index) { if (!iterator(value, index)) results.push(value); }); return results; }, sortBy: function(iterator, context) { iterator =3D iterator.bind(context); return this.map(function(value, index) { return {value: value, criteria: iterator(value, index)}; }).sort(function(left, right) { var a =3D left.criteria, b =3D right.criteria; return a < b ? -1 : a > b ? 1 : 0; }).pluck('value'); }, toArray: function() { return this.map(); }, zip: function() { var iterator =3D Prototype.K, args =3D $A(arguments); if (Object.isFunction(args.last())) iterator =3D args.pop(); var collections =3D [this].concat(args).map($A); return this.map(function(value, index) { return iterator(collections.pluck(index)); }); }, size: function() { return this.toArray().length; }, inspect: function() { return '#'; } }; Object.extend(Enumerable, { map: Enumerable.collect, find: Enumerable.detect, select: Enumerable.findAll, filter: Enumerable.findAll, member: Enumerable.include, entries: Enumerable.toArray, every: Enumerable.all, some: Enumerable.any }); function $A(iterable) { if (!iterable) return []; if (iterable.toArray) return iterable.toArray(); var length =3D iterable.length, results =3D new Array(length); while (length--) results[length] =3D iterable[length]; return results; } if (Prototype.Browser.WebKit) { function $A(iterable) { if (!iterable) return []; if (!(Object.isFunction(iterable) && iterable =3D=3D '[object NodeList]= ') && iterable.toArray) return iterable.toArray(); var length =3D iterable.length, results =3D new Array(length); while (length--) results[length] =3D iterable[length]; return results; } } Array.from =3D $A; Object.extend(Array.prototype, Enumerable); if (!Array.prototype._reverse) Array.prototype._reverse =3D Array.prototype= .reverse; Object.extend(Array.prototype, { _each: function(iterator) { for (var i =3D 0, length =3D this.length; i < length; i++) iterator(this[i]); }, clear: function() { this.length =3D 0; return this; }, first: function() { return this[0]; }, last: function() { return this[this.length - 1]; }, compact: function() { return this.select(function(value) { return value !=3D null; }); }, flatten: function() { return this.inject([], function(array, value) { return array.concat(Object.isArray(value) ? value.flatten() : [value]); }); }, without: function() { var values =3D $A(arguments); return this.select(function(value) { return !values.include(value); }); }, reverse: function(inline) { return (inline !=3D=3D false ? this : this.toArray())._reverse(); }, reduce: function() { return this.length > 1 ? this : this[0]; }, uniq: function(sorted) { return this.inject([], function(array, value, index) { if (0 =3D=3D index || (sorted ? array.last() !=3D value : !array.incl= ude(value))) array.push(value); return array; }); }, intersect: function(array) { return this.uniq().findAll(function(item) { return array.detect(function(value) { return item =3D=3D=3D value }); }); }, clone: function() { return [].concat(this); }, size: function() { return this.length; }, inspect: function() { return '[' + this.map(Object.inspect).join(', ') + ']'; }, toJSON: function() { var results =3D []; this.each(function(object) { var value =3D Object.toJSON(object); if (value !=3D=3D undefined) results.push(value); }); return '[' + results.join(', ') + ']'; } }); // use native browser JS 1.6 implementation if available if (Object.isFunction(Array.prototype.forEach)) Array.prototype._each =3D Array.prototype.forEach; if (!Array.prototype.indexOf) Array.prototype.indexOf =3D function(item, i)= { i || (i =3D 0); var length =3D this.length; if (i < 0) i =3D length + i; for (; i < length; i++) if (this[i] =3D=3D=3D item) return i; return -1; }; if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf =3D function(= item, i) { i =3D isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1; var n =3D this.slice(0, i).reverse().indexOf(item); return (n < 0) ? n : i - n - 1; }; Array.prototype.toArray =3D Array.prototype.clone; function $w(string) { if (!Object.isString(string)) return []; string =3D string.strip(); return string ? string.split(/\s+/) : []; } if (Prototype.Browser.Opera){ Array.prototype.concat =3D function() { var array =3D []; for (var i =3D 0, length =3D this.length; i < length; i++) array.push(t= his[i]); for (var i =3D 0, length =3D arguments.length; i < length; i++) { if (Object.isArray(arguments[i])) { for (var j =3D 0, arrayLength =3D arguments[i].length; j < arrayLen= gth; j++) array.push(arguments[i][j]); } else { array.push(arguments[i]); } } return array; }; } Object.extend(Number.prototype, { toColorPart: function() { return this.toPaddedString(2, 16); }, succ: function() { return this + 1; }, times: function(iterator) { $R(0, this, true).each(iterator); return this; }, toPaddedString: function(length, radix) { var string =3D this.toString(radix || 10); return '0'.times(length - string.length) + string; }, toJSON: function() { return isFinite(this) ? this.toString() : 'null'; } }); $w('abs round ceil floor').each(function(method){ Number.prototype[method] =3D Math[method].methodize(); }); function $H(object) { return new Hash(object); }; var Hash =3D Class.create(Enumerable, (function() { if (function() { var i =3D 0, Test =3D function(value) { this.key =3D value }; Test.prototype.key =3D 'foo'; for (var property in new Test('bar')) i++; return i > 1; }()) { function each(iterator) { var cache =3D []; for (var key in this._object) { var value =3D this._object[key]; if (cache.include(key)) continue; cache.push(key); var pair =3D [key, value]; pair.key =3D key; pair.value =3D value; iterator(pair); } } } else { function each(iterator) { for (var key in this._object) { var value =3D this._object[key], pair =3D [key, value]; pair.key =3D key; pair.value =3D value; iterator(pair); } } } function toQueryPair(key, value) { if (Object.isUndefined(value)) return key; return key + '=3D' + encodeURIComponent(String.interpret(value)); } return { initialize: function(object) { this._object =3D Object.isHash(object) ? object.toObject() : Object.c= lone(object); }, _each: each, set: function(key, value) { return this._object[key] =3D value; }, get: function(key) { return this._object[key]; }, unset: function(key) { var value =3D this._object[key]; delete this._object[key]; return value; }, toObject: function() { return Object.clone(this._object); }, keys: function() { return this.pluck('key'); }, values: function() { return this.pluck('value'); }, index: function(value) { var match =3D this.detect(function(pair) { return pair.value =3D=3D=3D value; }); return match && match.key; }, merge: function(object) { return this.clone().update(object); }, update: function(object) { return new Hash(object).inject(this, function(result, pair) { result.set(pair.key, pair.value); return result; }); }, toQueryString: function() { return this.map(function(pair) { var key =3D encodeURIComponent(pair.key), values =3D pair.value; if (values && typeof values =3D=3D 'object') { if (Object.isArray(values)) return values.map(toQueryPair.curry(key)).join('&'); } return toQueryPair(key, values); }).join('&'); }, inspect: function() { return '#'; }, toJSON: function() { return Object.toJSON(this.toObject()); }, clone: function() { return new Hash(this); } } })()); Hash.prototype.toTemplateReplacements =3D Hash.prototype.toObject; Hash.from =3D $H; var ObjectRange =3D Class.create(Enumerable, { initialize: function(start, end, exclusive) { this.start =3D start; this.end =3D end; this.exclusive =3D exclusive; }, _each: function(iterator) { var value =3D this.start; while (this.include(value)) { iterator(value); value =3D value.succ(); } }, include: function(value) { if (value < this.start) return false; if (this.exclusive) return value < this.end; return value <=3D this.end; } }); var $R =3D function(start, end, exclusive) { return new ObjectRange(start, end, exclusive); }; var Ajax =3D { getTransport: function() { return Try.these( function() {return new XMLHttpRequest()}, function() {return new ActiveXObject('Msxml2.XMLHTTP')}, function() {return new ActiveXObject('Microsoft.XMLHTTP')} ) || false; }, activeRequestCount: 0 }; Ajax.Responders =3D { responders: [], _each: function(iterator) { this.responders._each(iterator); }, register: function(responder) { if (!this.include(responder)) this.responders.push(responder); }, unregister: function(responder) { this.responders =3D this.responders.without(responder); }, dispatch: function(callback, request, transport, json) { this.each(function(responder) { if (Object.isFunction(responder[callback])) { try { responder[callback].apply(responder, [request, transport, json]); } catch (e) { } } }); } }; Object.extend(Ajax.Responders, Enumerable); Ajax.Responders.register({ onCreate: function() { Ajax.activeRequestCount++ }, onComplete: function() { Ajax.activeRequestCount-- } }); Ajax.Base =3D Class.create({ initialize: function(options) { this.options =3D { method: 'post', asynchronous: true, contentType: 'application/x-www-form-urlencoded', encoding: 'UTF-8', parameters: '', evalJSON: true, evalJS: true }; Object.extend(this.options, options || { }); this.options.method =3D this.options.method.toLowerCase(); if (Object.isString(this.options.parameters)) this.options.parameters =3D this.options.parameters.toQueryParams(); } }); Ajax.Request =3D Class.create(Ajax.Base, { _complete: false, initialize: function($super, url, options) { $super(options); this.transport =3D Ajax.getTransport(); this.request(url); }, request: function(url) { this.url =3D url; this.method =3D this.options.method; var params =3D Object.clone(this.options.parameters); if (!['get', 'post'].include(this.method)) { // simulate other verbs over post params['_method'] =3D this.method; this.method =3D 'post'; } this.parameters =3D params; if (params =3D Object.toQueryString(params)) { // when GET, append parameters to URL if (this.method =3D=3D 'get') this.url +=3D (this.url.include('?') ? '&' : '?') + params; else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) params +=3D '&_=3D'; } try { var response =3D new Ajax.Response(this); if (this.options.onCreate) this.options.onCreate(response); Ajax.Responders.dispatch('onCreate', this, response); this.transport.open(this.method.toUpperCase(), this.url, this.options.asynchronous); if (this.options.asynchronous) this.respondToReadyState.bind(this).de= fer(1); this.transport.onreadystatechange =3D this.onStateChange.bind(this); this.setRequestHeaders(); this.body =3D this.method =3D=3D 'post' ? (this.options.postBody ||= params) : null; this.transport.send(this.body); /* Force Firefox to handle ready state 4 for synchronous requests */ if (!this.options.asynchronous && this.transport.overrideMimeType) this.onStateChange(); } catch (e) { this.dispatchException(e); } }, onStateChange: function() { var readyState =3D this.transport.readyState; if (readyState > 1 && !((readyState =3D=3D 4) && this._complete)) this.respondToReadyState(this.transport.readyState); }, setRequestHeaders: function() { var headers =3D { 'X-Requested-With': 'XMLHttpRequest', 'X-Prototype-Version': Prototype.Version, 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' }; if (this.method =3D=3D 'post') { headers['Content-type'] =3D this.options.contentType + (this.options.encoding ? '; charset=3D' + this.options.encoding := ''); /* Force "Connection: close" for older Mozilla browsers to work * around a bug where XMLHttpRequest sends an incorrect * Content-length header. See Mozilla Bugzilla #246651. */ if (this.transport.overrideMimeType && (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 20= 05) headers['Connection'] =3D 'close'; } // user-defined headers if (typeof this.options.requestHeaders =3D=3D 'object') { var extras =3D this.options.requestHeaders; if (Object.isFunction(extras.push)) for (var i =3D 0, length =3D extras.length; i < length; i +=3D 2) headers[extras[i]] =3D extras[i+1]; else $H(extras).each(function(pair) { headers[pair.key] =3D pair.value= }); } for (var name in headers) this.transport.setRequestHeader(name, headers[name]); }, success: function() { var status =3D this.getStatus(); return !status || (status >=3D 200 && status < 300); }, getStatus: function() { try { return this.transport.status || 0; } catch (e) { return 0 } }, respondToReadyState: function(readyState) { var state =3D Ajax.Request.Events[readyState], response =3D new Ajax.Re= sponse(this); if (state =3D=3D 'Complete') { try { this._complete =3D true; (this.options['on' + response.status] || this.options['on' + (this.success() ? 'Success' : 'Failure')] || Prototype.emptyFunction)(response, response.headerJSON); } catch (e) { this.dispatchException(e); } var contentType =3D response.getHeader('Content-type'); if (this.options.evalJS =3D=3D 'force' || (this.options.evalJS && contentType && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)scr= ipt(;.*)?\s*$/i))) this.evalResponse(); } try { (this.options['on' + state] || Prototype.emptyFunction)(response, res= ponse.headerJSON); Ajax.Responders.dispatch('on' + state, this, response, response.heade= rJSON); } catch (e) { this.dispatchException(e); } if (state =3D=3D 'Complete') { // avoid memory leak in MSIE: clean up this.transport.onreadystatechange =3D Prototype.emptyFunction; } }, getHeader: function(name) { try { return this.transport.getResponseHeader(name); } catch (e) { return null } }, evalResponse: function() { try { return eval((this.transport.responseText || '').unfilterJSON()); } catch (e) { this.dispatchException(e); } }, dispatchException: function(exception) { (this.options.onException || Prototype.emptyFunction)(this, exception); Ajax.Responders.dispatch('onException', this, exception); } }); Ajax.Request.Events =3D ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; Ajax.Response =3D Class.create({ initialize: function(request){ this.request =3D request; var transport =3D this.transport =3D request.transport, readyState =3D this.readyState =3D transport.readyState; if((readyState > 2 && !Prototype.Browser.IE) || readyState =3D=3D 4) { this.status =3D this.getStatus(); this.statusText =3D this.getStatusText(); this.responseText =3D String.interpret(transport.responseText); this.headerJSON =3D this._getHeaderJSON(); } if(readyState =3D=3D 4) { var xml =3D transport.responseXML; this.responseXML =3D xml =3D=3D=3D undefined ? null : xml; this.responseJSON =3D this._getResponseJSON(); } }, status: 0, statusText: '', getStatus: Ajax.Request.prototype.getStatus, getStatusText: function() { try { return this.transport.statusText || ''; } catch (e) { return '' } }, getHeader: Ajax.Request.prototype.getHeader, getAllHeaders: function() { try { return this.getAllResponseHeaders(); } catch (e) { return null } }, getResponseHeader: function(name) { return this.transport.getResponseHeader(name); }, getAllResponseHeaders: function() { return this.transport.getAllResponseHeaders(); }, _getHeaderJSON: function() { var json =3D this.getHeader('X-JSON'); if (!json) return null; json =3D decodeURIComponent(escape(json)); try { return json.evalJSON(this.request.options.sanitizeJSON); } catch (e) { this.request.dispatchException(e); } }, _getResponseJSON: function() { var options =3D this.request.options; if (!options.evalJSON || (options.evalJSON !=3D 'force' && !(this.getHeader('Content-type') || '').include('application/json'))) return null; try { return this.transport.responseText.evalJSON(options.sanitizeJSON); } catch (e) { this.request.dispatchException(e); } } }); Ajax.Updater =3D Class.create(Ajax.Request, { initialize: function($super, container, url, options) { this.container =3D { success: (container.success || container), failure: (container.failure || (container.success ? null : container)) }; options =3D options || { }; var onComplete =3D options.onComplete; options.onComplete =3D (function(response, param) { this.updateContent(response.responseText); if (Object.isFunction(onComplete)) onComplete(response, param); }).bind(this); $super(url, options); }, updateContent: function(responseText) { var receiver =3D this.container[this.success() ? 'success' : 'failure'], options =3D this.options; if (!options.evalScripts) responseText =3D responseText.stripScripts(); if (receiver =3D $(receiver)) { if (options.insertion) { if (Object.isString(options.insertion)) { var insertion =3D { }; insertion[options.insertion] =3D responseT= ext; receiver.insert(insertion); } else options.insertion(receiver, responseText); } else receiver.update(responseText); } if (this.success()) { if (this.onComplete) this.onComplete.bind(this).defer(); } } }); Ajax.PeriodicalUpdater =3D Class.create(Ajax.Base, { initialize: function($super, container, url, options) { $super(options); this.onComplete =3D this.options.onComplete; this.frequency =3D (this.options.frequency || 2); this.decay =3D (this.options.decay || 1); this.updater =3D { }; this.container =3D container; this.url =3D url; this.start(); }, start: function() { this.options.onComplete =3D this.updateComplete.bind(this); this.onTimerEvent(); }, stop: function() { this.updater.options.onComplete =3D undefined; clearTimeout(this.timer); (this.onComplete || Prototype.emptyFunction).apply(this, arguments); }, updateComplete: function(response) { if (this.options.decay) { this.decay =3D (response.responseText =3D=3D this.lastText ? this.decay * this.options.decay : 1); this.lastText =3D response.responseText; } this.timer =3D this.onTimerEvent.bind(this).delay(this.decay * this.fre= quency); }, onTimerEvent: function() { this.updater =3D new Ajax.Updater(this.container, this.url, this.option= s); } }); function $(element) { if (arguments.length > 1) { for (var i =3D 0, elements =3D [], length =3D arguments.length; i < len= gth; i++) elements.push($(arguments[i])); return elements; } if (Object.isString(element)) element =3D document.getElementById(element); return Element.extend(element); } if (Prototype.BrowserFeatures.XPath) { document._getElementsByXPath =3D function(expression, parentElement) { var results =3D []; var query =3D document.evaluate(expression, $(parentElement) || documen= t, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); for (var i =3D 0, length =3D query.snapshotLength; i < length; i++) results.push(Element.extend(query.snapshotItem(i))); return results; }; } /*-------------------------------------------------------------------------= -*/ if (!window.Node) var Node =3D { }; if (!Node.ELEMENT_NODE) { // DOM level 2 ECMAScript Language Binding Object.extend(Node, { ELEMENT_NODE: 1, ATTRIBUTE_NODE: 2, TEXT_NODE: 3, CDATA_SECTION_NODE: 4, ENTITY_REFERENCE_NODE: 5, ENTITY_NODE: 6, PROCESSING_INSTRUCTION_NODE: 7, COMMENT_NODE: 8, DOCUMENT_NODE: 9, DOCUMENT_TYPE_NODE: 10, DOCUMENT_FRAGMENT_NODE: 11, NOTATION_NODE: 12 }); } (function() { var element =3D this.Element; this.Element =3D function(tagName, attributes) { attributes =3D attributes || { }; tagName =3D tagName.toLowerCase(); var cache =3D Element.cache; if (Prototype.Browser.IE && attributes.name) { tagName =3D '<' + tagName + ' name=3D"' + attributes.name + '">'; delete attributes.name; return Element.writeAttribute(document.createElement(tagName), attrib= utes); } if (!cache[tagName]) cache[tagName] =3D Element.extend(document.createE= lement(tagName)); return Element.writeAttribute(cache[tagName].cloneNode(false), attribut= es); }; Object.extend(this.Element, element || { }); }).call(window); Element.cache =3D { }; Element.Methods =3D { visible: function(element) { return $(element).style.display !=3D 'none'; }, toggle: function(element) { element =3D $(element); Element[Element.visible(element) ? 'hide' : 'show'](element); return element; }, hide: function(element) { $(element).style.display =3D 'none'; return element; }, show: function(element) { $(element).style.display =3D ''; return element; }, remove: function(element) { element =3D $(element); element.parentNode.removeChild(element); return element; }, update: function(element, content) { element =3D $(element); if (content && content.toElement) content =3D content.toElement(); if (Object.isElement(content)) return element.update().insert(content); content =3D Object.toHTML(content); element.innerHTML =3D content.stripScripts(); content.evalScripts.bind(content).defer(); return element; }, replace: function(element, content) { element =3D $(element); if (content && content.toElement) content =3D content.toElement(); else if (!Object.isElement(content)) { content =3D Object.toHTML(content); var range =3D element.ownerDocument.createRange(); range.selectNode(element); content.evalScripts.bind(content).defer(); content =3D range.createContextualFragment(content.stripScripts()); } element.parentNode.replaceChild(content, element); return element; }, insert: function(element, insertions) { element =3D $(element); if (Object.isString(insertions) || Object.isNumber(insertions) || Object.isElement(insertions) || (insertions && (insertions.toElemen= t || insertions.toHTML))) insertions =3D {bottom:insertions}; var content, t, range; for (position in insertions) { content =3D insertions[position]; position =3D position.toLowerCase(); t =3D Element._insertionTranslations[position]; if (content && content.toElement) content =3D content.toElement(); if (Object.isElement(content)) { t.insert(element, content); continue; } content =3D Object.toHTML(content); range =3D element.ownerDocument.createRange(); t.initializeRange(element, range); t.insert(element, range.createContextualFragment(content.stripScripts= ())); content.evalScripts.bind(content).defer(); } return element; }, wrap: function(element, wrapper, attributes) { element =3D $(element); if (Object.isElement(wrapper)) $(wrapper).writeAttribute(attributes || { }); else if (Object.isString(wrapper)) wrapper =3D new Element(wrapper, att= ributes); else wrapper =3D new Element('div', wrapper); if (element.parentNode) element.parentNode.replaceChild(wrapper, element); wrapper.appendChild(element); return wrapper; }, inspect: function(element) { element =3D $(element); var result =3D '<' + element.tagName.toLowerCase(); $H({'id': 'id', 'className': 'class'}).each(function(pair) { var property =3D pair.first(), attribute =3D pair.last(); var value =3D (element[property] || '').toString(); if (value) result +=3D ' ' + attribute + '=3D' + value.inspect(true); }); return result + '>'; }, recursivelyCollect: function(element, property) { element =3D $(element); var elements =3D []; while (element =3D element[property]) if (element.nodeType =3D=3D 1) elements.push(Element.extend(element)); return elements; }, ancestors: function(element) { return $(element).recursivelyCollect('parentNode'); }, descendants: function(element) { return $A($(element).getElementsByTagName('*')).each(Element.extend); }, firstDescendant: function(element) { element =3D $(element).firstChild; while (element && element.nodeType !=3D 1) element =3D element.nextSibl= ing; return $(element); }, immediateDescendants: function(element) { if (!(element =3D $(element).firstChild)) return []; while (element && element.nodeType !=3D 1) element =3D element.nextSibl= ing; if (element) return [element].concat($(element).nextSiblings()); return []; }, previousSiblings: function(element) { return $(element).recursivelyCollect('previousSibling'); }, nextSiblings: function(element) { return $(element).recursivelyCollect('nextSibling'); }, siblings: function(element) { element =3D $(element); return element.previousSiblings().reverse().concat(element.nextSiblings= ()); }, match: function(element, selector) { if (Object.isString(selector)) selector =3D new Selector(selector); return selector.match($(element)); }, up: function(element, expression, index) { element =3D $(element); if (arguments.length =3D=3D 1) return $(element.parentNode); var ancestors =3D element.ancestors(); return expression ? Selector.findElement(ancestors, expression, index) : ancestors[index || 0]; }, down: function(element, expression, index) { element =3D $(element); if (arguments.length =3D=3D 1) return element.firstDescendant(); var descendants =3D element.descendants(); return expression ? Selector.findElement(descendants, expression, index= ) : descendants[index || 0]; }, previous: function(element, expression, index) { element =3D $(element); if (arguments.length =3D=3D 1) return $(Selector.handlers.previousEleme= ntSibling(element)); var previousSiblings =3D element.previousSiblings(); return expression ? Selector.findElement(previousSiblings, expression,= index) : previousSiblings[index || 0]; }, next: function(element, expression, index) { element =3D $(element); if (arguments.length =3D=3D 1) return $(Selector.handlers.nextElementSi= bling(element)); var nextSiblings =3D element.nextSiblings(); return expression ? Selector.findElement(nextSiblings, expression, inde= x) : nextSiblings[index || 0]; }, select: function() { var args =3D $A(arguments), element =3D $(args.shift()); return Selector.findChildElements(element, args); }, adjacent: function() { var args =3D $A(arguments), element =3D $(args.shift()); return Selector.findChildElements(element.parentNode, args).without(ele= ment); }, identify: function(element) { element =3D $(element); var id =3D element.readAttribute('id'), self =3D arguments.callee; if (id) return id; do { id =3D 'anonymous_element_' + self.counter++ } while ($(id)); element.writeAttribute('id', id); return id; }, readAttribute: function(element, name) { element =3D $(element); if (Prototype.Browser.IE) { var t =3D Element._attributeTranslations.read; if (t.values[name]) return t.values[name](element, name); if (t.names[name]) name =3D t.names[name]; if (name.include(':')) { return (!element.attributes || !element.attributes[name]) ? null : element.attributes[name].value; } } return element.getAttribute(name); }, writeAttribute: function(element, name, value) { element =3D $(element); var attributes =3D { }, t =3D Element._attributeTranslations.write; if (typeof name =3D=3D 'object') attributes =3D name; else attributes[name] =3D value =3D=3D=3D undefined ? true : value; for (var attr in attributes) { var name =3D t.names[attr] || attr, value =3D attributes[attr]; if (t.values[attr]) name =3D t.values[attr](element, value); if (value =3D=3D=3D false || value =3D=3D=3D null) element.removeAttribute(name); else if (value =3D=3D=3D true) element.setAttribute(name, name); else element.setAttribute(name, value); } return element; }, getHeight: function(element) { return $(element).getDimensions().height; }, getWidth: function(element) { return $(element).getDimensions().width; }, classNames: function(element) { return new Element.ClassNames(element); }, hasClassName: function(element, className) { if (!(element =3D $(element))) return; var elementClassName =3D element.className; return (elementClassName.length > 0 && (elementClassName =3D=3D classNa= me || new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName))= ); }, addClassName: function(element, className) { if (!(element =3D $(element))) return; if (!element.hasClassName(className)) element.className +=3D (element.className ? ' ' : '') + className; return element; }, removeClassName: function(element, className) { if (!(element =3D $(element))) return; element.className =3D element.className.replace( new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip(); return element; }, toggleClassName: function(element, className) { if (!(element =3D $(element))) return; return element[element.hasClassName(className) ? 'removeClassName' : 'addClassName'](className); }, // removes whitespace-only text node children cleanWhitespace: function(element) { element =3D $(element); var node =3D element.firstChild; while (node) { var nextNode =3D node.nextSibling; if (node.nodeType =3D=3D 3 && !/\S/.test(node.nodeValue)) element.removeChild(node); node =3D nextNode; } return element; }, empty: function(element) { return $(element).innerHTML.blank(); }, descendantOf: function(element, ancestor) { element =3D $(element), ancestor =3D $(ancestor); if (element.compareDocumentPosition) return (element.compareDocumentPosition(ancestor) & 8) =3D=3D=3D 8; if (element.sourceIndex && !Prototype.Browser.Opera) { var e =3D element.sourceIndex, a =3D ancestor.sourceIndex, nextAncestor =3D ancestor.nextSibling; if (!nextAncestor) { do { ancestor =3D ancestor.parentNode; } while (!(nextAncestor =3D ancestor.nextSibling) && ancestor.parentN= ode); } if (nextAncestor) return (e > a && e < nextAncestor.sourceIndex); } while (element =3D element.parentNode) if (element =3D=3D ancestor) return true; return false; }, scrollTo: function(element) { element =3D $(element); var pos =3D element.cumulativeOffset(); window.scrollTo(pos[0], pos[1]); return element; }, getStyle: function(element, style) { element =3D $(element); style =3D style =3D=3D 'float' ? 'cssFloat' : style.camelize(); var value =3D element.style[style]; if (!value) { var css =3D document.defaultView.getComputedStyle(element, null); value =3D css ? css[style] : null; } if (style =3D=3D 'opacity') return value ? parseFloat(value) : 1.0; return value =3D=3D 'auto' ? null : value; }, getOpacity: function(element) { return $(element).getStyle('opacity'); }, setStyle: function(element, styles) { element =3D $(element); var elementStyle =3D element.style, match; if (Object.isString(styles)) { element.style.cssText +=3D ';' + styles; return styles.include('opacity') ? element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : ele= ment; } for (var property in styles) if (property =3D=3D 'opacity') element.setOpacity(styles[property]); else elementStyle[(property =3D=3D 'float' || property =3D=3D 'cssFloat'= ) ? (elementStyle.styleFloat =3D=3D=3D undefined ? 'cssFloat' : 'styl= eFloat') : property] =3D styles[property]; return element; }, setOpacity: function(element, value) { element =3D $(element); element.style.opacity =3D (value =3D=3D 1 || value =3D=3D=3D '') ? ''= : (value < 0.00001) ? 0 : value; return element; }, getDimensions: function(element) { element =3D $(element); var display =3D $(element).getStyle('display'); if (display !=3D 'none' && display !=3D null) // Safari bug return {width: element.offsetWidth, height: element.offsetHeight}; // All *Width and *Height properties give 0 on elements with display no= ne, // so enable the element temporarily var els =3D element.style; var originalVisibility =3D els.visibility; var originalPosition =3D els.position; var originalDisplay =3D els.display; els.visibility =3D 'hidden'; els.position =3D 'absolute'; els.display =3D 'block'; var originalWidth =3D element.clientWidth; var originalHeight =3D element.clientHeight; els.display =3D originalDisplay; els.position =3D originalPosition; els.visibility =3D originalVisibility; return {width: originalWidth, height: originalHeight}; }, makePositioned: function(element) { element =3D $(element); var pos =3D Element.getStyle(element, 'position'); if (pos =3D=3D 'static' || !pos) { element._madePositioned =3D true; 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; } } return element; }, undoPositioned: function(element) { element =3D $(element); if (element._madePositioned) { element._madePositioned =3D undefined; element.style.position =3D element.style.top =3D element.style.left =3D element.style.bottom =3D element.style.right =3D ''; } return element; }, makeClipping: function(element) { element =3D $(element); if (element._overflow) return element; element._overflow =3D Element.getStyle(element, 'overflow') || 'auto'; if (element._overflow !=3D=3D 'hidden') element.style.overflow =3D 'hidden'; return element; }, undoClipping: function(element) { element =3D $(element); if (!element._overflow) return element; element.style.overflow =3D element._overflow =3D=3D 'auto' ? '' : eleme= nt._overflow; element._overflow =3D null; return element; }, cumulativeOffset: function(element) { var valueT =3D 0, valueL =3D 0; do { valueT +=3D element.offsetTop || 0; valueL +=3D element.offsetLeft || 0; element =3D element.offsetParent; } while (element); return Element._returnOffset(valueL, valueT); }, positionedOffset: function(element) { var valueT =3D 0, valueL =3D 0; do { valueT +=3D element.offsetTop || 0; valueL +=3D element.offsetLeft || 0; element =3D element.offsetParent; if (element) { if (element.tagName =3D=3D 'BODY') break; var p =3D Element.getStyle(element, 'position'); if (p =3D=3D 'relative' || p =3D=3D 'absolute') break; } } while (element); return Element._returnOffset(valueL, valueT); }, absolutize: function(element) { element =3D $(element); if (element.getStyle('position') =3D=3D 'absolute') return; // Position.prepare(); // To be done manually by Scripty when it needs= it. var offsets =3D element.positionedOffset(); var top =3D offsets[1]; var left =3D offsets[0]; var width =3D element.clientWidth; var height =3D element.clientHeight; element._originalLeft =3D left - parseFloat(element.style.left || 0); element._originalTop =3D top - parseFloat(element.style.top || 0); element._originalWidth =3D element.style.width; element._originalHeight =3D element.style.height; element.style.position =3D 'absolute'; element.style.top =3D top + 'px'; element.style.left =3D left + 'px'; element.style.width =3D width + 'px'; element.style.height =3D height + 'px'; return element; }, relativize: function(element) { element =3D $(element); if (element.getStyle('position') =3D=3D 'relative') return; // Position.prepare(); // To be done manually by Scripty when it needs= it. element.style.position =3D 'relative'; var top =3D parseFloat(element.style.top || 0) - (element._originalTo= p || 0); var left =3D parseFloat(element.style.left || 0) - (element._originalLe= ft || 0); element.style.top =3D top + 'px'; element.style.left =3D left + 'px'; element.style.height =3D element._originalHeight; element.style.width =3D element._originalWidth; return element; }, cumulativeScrollOffset: function(element) { var valueT =3D 0, valueL =3D 0; do { valueT +=3D element.scrollTop || 0; valueL +=3D element.scrollLeft || 0; element =3D element.parentNode; } while (element); return Element._returnOffset(valueL, valueT); }, getOffsetParent: function(element) { if (element.offsetParent) return $(element.offsetParent); if (element =3D=3D document.body) return $(element); while ((element =3D element.parentNode) && element !=3D document.body) if (Element.getStyle(element, 'position') !=3D 'static') return $(element); return $(document.body); }, viewportOffset: function(forElement) { var valueT =3D 0, valueL =3D 0; var element =3D forElement; do { valueT +=3D element.offsetTop || 0; valueL +=3D element.offsetLeft || 0; // Safari fix if (element.offsetParent =3D=3D document.body && Element.getStyle(element, 'position') =3D=3D 'absolute') break; } while (element =3D element.offsetParent); element =3D forElement; do { if (!Prototype.Browser.Opera || element.tagName =3D=3D 'BODY') { valueT -=3D element.scrollTop || 0; valueL -=3D element.scrollLeft || 0; } } while (element =3D element.parentNode); return Element._returnOffset(valueL, valueT); }, clonePosition: function(element, source) { var options =3D Object.extend({ setLeft: true, setTop: true, setWidth: true, setHeight: true, offsetTop: 0, offsetLeft: 0 }, arguments[2] || { }); // find page position of source source =3D $(source); var p =3D source.viewportOffset(); // find coordinate system to use element =3D $(element); var delta =3D [0, 0]; var parent =3D null; // delta [0,0] will do fine with position: fixed elements, // position:absolute needs offsetParent deltas if (Element.getStyle(element, 'position') =3D=3D 'absolute') { parent =3D element.getOffsetParent(); delta =3D parent.viewportOffset(); } // correct by body offsets (fixes Safari) if (parent =3D=3D document.body) { delta[0] -=3D document.body.offsetLeft; delta[1] -=3D document.body.offsetTop; } // set position if (options.setLeft) element.style.left =3D (p[0] - delta[0] + optio= ns.offsetLeft) + 'px'; if (options.setTop) element.style.top =3D (p[1] - delta[1] + optio= ns.offsetTop) + 'px'; if (options.setWidth) element.style.width =3D source.offsetWidth + 'px= '; if (options.setHeight) element.style.height =3D source.offsetHeight += 'px'; return element; } }; Element.Methods.identify.counter =3D 1; Object.extend(Element.Methods, { getElementsBySelector: Element.Methods.select, childElements: Element.Methods.immediateDescendants }); Element._attributeTranslations =3D { write: { names: { className: 'class', htmlFor: 'for' }, values: { } } }; if (!document.createRange || Prototype.Browser.Opera) { Element.Methods.insert =3D function(element, insertions) { element =3D $(element); if (Object.isString(insertions) || Object.isNumber(insertions) || Object.isElement(insertions) || (insertions && (insertions.toElemen= t || insertions.toHTML))) insertions =3D { bottom: insertions }; var t =3D Element._insertionTranslations, content, position, pos, tagNa= me; for (position in insertions) { content =3D insertions[position]; position =3D position.toLowerCase(); pos =3D t[position]; if (content && content.toElement) content =3D content.toElement(); if (Object.isElement(content)) { pos.insert(element, content); continue; } content =3D Object.toHTML(content); tagName =3D ((position =3D=3D 'before' || position =3D=3D 'after') ? element.parentNode : element).tagName.toUpperCase(); if (t.tags[tagName]) { var fragments =3D Element._getContentFromAnonymousElement(tagName,= content.stripScripts()); if (position =3D=3D 'top' || position =3D=3D 'after') fragments.rev= erse(); fragments.each(pos.insert.curry(element)); } else element.insertAdjacentHTML(pos.adjacency, content.stripScripts()= ); content.evalScripts.bind(content).defer(); } return element; }; } if (Prototype.Browser.Opera) { Element.Methods._getStyle =3D Element.Methods.getStyle; Element.Methods.getStyle =3D function(element, style) { switch(style) { case 'left': case 'top': case 'right': case 'bottom': if (Element._getStyle(element, 'position') =3D=3D 'static') return= null; default: return Element._getStyle(element, style); } }; Element.Methods._readAttribute =3D Element.Methods.readAttribute; Element.Methods.readAttribute =3D function(element, attribute) { if (attribute =3D=3D 'title') return element.title; return Element._readAttribute(element, attribute); }; } else if (Prototype.Browser.IE) { $w('positionedOffset getOffsetParent viewportOffset').each(function(metho= d) { Element.Methods[method] =3D Element.Methods[method].wrap( function(proceed, element) { element =3D $(element); var position =3D element.getStyle('position'); if (position !=3D 'static') return proceed(element); element.setStyle({ position: 'relative' }); var value =3D proceed(element); element.setStyle({ position: position }); return value; } ); }); Element.Methods.getStyle =3D function(element, style) { element =3D $(element); style =3D (style =3D=3D 'float' || style =3D=3D 'cssFloat') ? 'styleFlo= at' : style.camelize(); var value =3D element.style[style]; if (!value && element.currentStyle) value =3D element.currentStyle[styl= e]; if (style =3D=3D 'opacity') { if (value =3D (element.getStyle('filter') || '').match(/alpha\(opacit= y=3D(.*)\)/)) if (value[1]) return parseFloat(value[1]) / 100; return 1.0; } if (value =3D=3D 'auto') { if ((style =3D=3D 'width' || style =3D=3D 'height') && (element.getSt= yle('display') !=3D 'none')) return element['offset' + style.capitalize()] + 'px'; return null; } return value; }; Element.Methods.setOpacity =3D function(element, value) { function stripAlpha(filter){ return filter.replace(/alpha\([^\)]*\)/gi,''); } element =3D $(element); var currentStyle =3D element.currentStyle; if ((currentStyle && !currentStyle.hasLayout) || (!currentStyle && element.style.zoom =3D=3D 'normal')) element.style.zoom =3D 1; var filter =3D element.getStyle('filter'), style =3D element.style; if (value =3D=3D 1 || value =3D=3D=3D '') { (filter =3D stripAlpha(filter)) ? style.filter =3D filter : style.removeAttribute('filter'); return element; } else if (value < 0.00001) value =3D 0; style.filter =3D stripAlpha(filter) + 'alpha(opacity=3D' + (value * 100) + ')'; return element; }; Element._attributeTranslations =3D { read: { names: { 'class': 'className', 'for': 'htmlFor' }, values: { _getAttr: function(element, attribute) { return element.getAttribute(attribute, 2); }, _getAttrNode: function(element, attribute) { var node =3D element.getAttributeNode(attribute); return node ? node.value : ""; }, _getEv: function(element, attribute) { var attribute =3D element.getAttribute(attribute); return attribute ? attribute.toString().slice(23, -2) : null; }, _flag: function(element, attribute) { return $(element).hasAttribute(attribute) ? attribute : null; }, style: function(element) { return element.style.cssText.toLowerCase(); }, title: function(element) { return element.title; } } } }; Element._attributeTranslations.write =3D { names: Object.clone(Element._attributeTranslations.read.names), values: { checked: function(element, value) { element.checked =3D !!value; }, style: function(element, value) { element.style.cssText =3D value ? value : ''; } } }; Element._attributeTranslations.has =3D {}; $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' + 'encType maxLength readOnly longDesc').each(function(attr) { Element._attributeTranslations.write.names[attr.toLowerCase()] =3D attr; Element._attributeTranslations.has[attr.toLowerCase()] =3D attr; }); (function(v) { Object.extend(v, { href: v._getAttr, src: v._getAttr, type: v._getAttr, action: v._getAttrNode, disabled: v._flag, checked: v._flag, readonly: v._flag, multiple: v._flag, onload: v._getEv, onunload: v._getEv, onclick: v._getEv, ondblclick: v._getEv, onmousedown: v._getEv, onmouseup: v._getEv, onmouseover: v._getEv, onmousemove: v._getEv, onmouseout: v._getEv, onfocus: v._getEv, onblur: v._getEv, onkeypress: v._getEv, onkeydown: v._getEv, onkeyup: v._getEv, onsubmit: v._getEv, onreset: v._getEv, onselect: v._getEv, onchange: v._getEv }); })(Element._attributeTranslations.read.values); } else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent))= { Element.Methods.setOpacity =3D function(element, value) { element =3D $(element); element.style.opacity =3D (value =3D=3D 1) ? 0.999999 : (value =3D=3D=3D '') ? '' : (value < 0.00001) ? 0 : value; return element; }; } else if (Prototype.Browser.WebKit) { Element.Methods.setOpacity =3D function(element, value) { element =3D $(element); element.style.opacity =3D (value =3D=3D 1 || value =3D=3D=3D '') ? ''= : (value < 0.00001) ? 0 : value; if (value =3D=3D 1) if(element.tagName =3D=3D 'IMG' && element.width) { element.width++; element.width--; } else try { var n =3D document.createTextNode(' '); element.appendChild(n); element.removeChild(n); } catch (e) { } return element; }; // Safari returns margins on body which is incorrect if the child is abso= lutely // positioned. For performance reasons, redefine Position.cumulativeOffs= et for // KHTML/WebKit only. Element.Methods.cumulativeOffset =3D function(element) { var valueT =3D 0, valueL =3D 0; do { valueT +=3D element.offsetTop || 0; valueL +=3D element.offsetLeft || 0; if (element.offsetParent =3D=3D document.body) if (Element.getStyle(element, 'position') =3D=3D 'absolute') break; element =3D element.offsetParent; } while (element); return Element._returnOffset(valueL, valueT); }; } if (Prototype.Browser.IE || Prototype.Browser.Opera) { // IE and Opera are missing .innerHTML support for TABLE-related and SELE= CT elements Element.Methods.update =3D function(element, content) { element =3D $(element); if (content && content.toElement) content =3D content.toElement(); if (Object.isElement(content)) return element.update().insert(content); content =3D Object.toHTML(content); var tagName =3D element.tagName.toUpperCase(); if (tagName in Element._insertionTranslations.tags) { $A(element.childNodes).each(function(node) { element.removeChild(node= ) }); Element._getContentFromAnonymousElement(tagName, content.stripScripts= ()) .each(function(node) { element.appendChild(node) }); } else element.innerHTML =3D content.stripScripts(); content.evalScripts.bind(content).defer(); return element; }; } if (document.createElement('div').outerHTML) { Element.Methods.replace =3D function(element, content) { element =3D $(element); if (content && content.toElement) content =3D content.toElement(); if (Object.isElement(content)) { element.parentNode.replaceChild(content, element); return element; } content =3D Object.toHTML(content); var parent =3D element.parentNode, tagName =3D parent.tagName.toUpperCa= se(); if (Element._insertionTranslations.tags[tagName]) { var nextSibling =3D element.next(); var fragments =3D Element._getContentFromAnonymousElement(tagName, co= ntent.stripScripts()); parent.removeChild(element); if (nextSibling) fragments.each(function(node) { parent.insertBefore(node, nextSibli= ng) }); else fragments.each(function(node) { parent.appendChild(node) }); } else element.outerHTML =3D content.stripScripts(); content.evalScripts.bind(content).defer(); return element; }; } Element._returnOffset =3D function(l, t) { var result =3D [l, t]; result.left =3D l; result.top =3D t; return result; }; Element._getContentFromAnonymousElement =3D function(tagName, html) { var div =3D new Element('div'), t =3D Element._insertionTranslations.tags= [tagName]; div.innerHTML =3D t[0] + html + t[1]; t[2].times(function() { div =3D div.firstChild }); return $A(div.childNodes); }; Element._insertionTranslations =3D { before: { adjacency: 'beforeBegin', insert: function(element, node) { element.parentNode.insertBefore(node, element); }, initializeRange: function(element, range) { range.setStartBefore(element); } }, top: { adjacency: 'afterBegin', insert: function(element, node) { element.insertBefore(node, element.firstChild); }, initializeRange: function(element, range) { range.selectNodeContents(element); range.collapse(true); } }, bottom: { adjacency: 'beforeEnd', insert: function(element, node) { element.appendChild(node); } }, after: { adjacency: 'afterEnd', insert: function(element, node) { element.parentNode.insertBefore(node, element.nextSibling); }, initializeRange: function(element, range) { range.setStartAfter(element); } }, tags: { TABLE: ['', '
', 1], TBODY: ['', '
', 2], TR: ['', '
', 3], TD: ['
', '
', 4], SELECT: ['', 1] } }; (function() { this.bottom.initializeRange =3D this.top.initializeRange; Object.extend(this.tags, { THEAD: this.tags.TBODY, TFOOT: this.tags.TBODY, TH: this.tags.TD }); }).call(Element._insertionTranslations); Element.Methods.Simulated =3D { hasAttribute: function(element, attribute) { attribute =3D Element._attributeTranslations.has[attribute] || attribut= e; var node =3D $(element).getAttributeNode(attribute); return node && node.specified; } }; Element.Methods.ByTag =3D { }; Object.extend(Element, Element.Methods); if (!Prototype.BrowserFeatures.ElementExtensions && document.createElement('div').__proto__) { window.HTMLElement =3D { }; window.HTMLElement.prototype =3D document.createElement('div').__proto__; Prototype.BrowserFeatures.ElementExtensions =3D true; } Element.extend =3D (function() { if (Prototype.BrowserFeatures.SpecificElementExtensions) return Prototype.K; var Methods =3D { }, ByTag =3D Element.Methods.ByTag; var extend =3D Object.extend(function(element) { if (!element || element._extendedByPrototype || element.nodeType !=3D 1 || element =3D=3D window) return element; var methods =3D Object.clone(Methods), tagName =3D element.tagName, property, value; // extend methods for specific tags if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]); for (property in methods) { value =3D methods[property]; if (Object.isFunction(value) && !(property in element)) element[property] =3D value.methodize(); } element._extendedByPrototype =3D Prototype.emptyFunction; return element; }, { refresh: function() { // extend methods for all tags (Safari doesn't need this) if (!Prototype.BrowserFeatures.ElementExtensions) { Object.extend(Methods, Element.Methods); Object.extend(Methods, Element.Methods.Simulated); } } }); extend.refresh(); return extend; })(); Element.hasAttribute =3D function(element, attribute) { if (element.hasAttribute) return element.hasAttribute(attribute); return Element.Methods.Simulated.hasAttribute(element, attribute); }; Element.addMethods =3D function(methods) { var F =3D Prototype.BrowserFeatures, T =3D Element.Methods.ByTag; if (!methods) { Object.extend(Form, Form.Methods); Object.extend(Form.Element, Form.Element.Methods); Object.extend(Element.Methods.ByTag, { "FORM": Object.clone(Form.Methods), "INPUT": Object.clone(Form.Element.Methods), "SELECT": Object.clone(Form.Element.Methods), "TEXTAREA": Object.clone(Form.Element.Methods) }); } if (arguments.length =3D=3D 2) { var tagName =3D methods; methods =3D arguments[1]; } if (!tagName) Object.extend(Element.Methods, methods || { }); else { if (Object.isArray(tagName)) tagName.each(extend); else extend(tagName); } function extend(tagName) { tagName =3D tagName.toUpperCase(); if (!Element.Methods.ByTag[tagName]) Element.Methods.ByTag[tagName] =3D { }; Object.extend(Element.Methods.ByTag[tagName], methods); } function copy(methods, destination, onlyIfAbsent) { onlyIfAbsent =3D onlyIfAbsent || false; for (var property in methods) { var value =3D methods[property]; if (!Object.isFunction(value)) continue; if (!onlyIfAbsent || !(property in destination)) destination[property] =3D value.methodize(); } } function findDOMClass(tagName) { var klass; var trans =3D { "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph", "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList", "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading", "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote", "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION": "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD": "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR= ": "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET": "FrameSet", "IFRAME": "IFrame" }; if (trans[tagName]) klass =3D 'HTML' + trans[tagName] + 'Element'; if (window[klass]) return window[klass]; klass =3D 'HTML' + tagName + 'Element'; if (window[klass]) return window[klass]; klass =3D 'HTML' + tagName.capitalize() + 'Element'; if (window[klass]) return window[klass]; window[klass] =3D { }; window[klass].prototype =3D document.createElement(tagName).__proto__; return window[klass]; } if (F.ElementExtensions) { copy(Element.Methods, HTMLElement.prototype); copy(Element.Methods.Simulated, HTMLElement.prototype, true); } if (F.SpecificElementExtensions) { for (var tag in Element.Methods.ByTag) { var klass =3D findDOMClass(tag); if (Object.isUndefined(klass)) continue; copy(T[tag], klass.prototype); } } Object.extend(Element, Element.Methods); delete Element.ByTag; if (Element.extend.refresh) Element.extend.refresh(); Element.cache =3D { }; }; document.viewport =3D { getDimensions: function() { var dimensions =3D { }; $w('width height').each(function(d) { var D =3D d.capitalize(); dimensions[d] =3D self['inner' + D] || (document.documentElement['client' + D] || document.body['client' += D]); }); return dimensions; }, getWidth: function() { return this.getDimensions().width; }, getHeight: function() { return this.getDimensions().height; }, getScrollOffsets: function() { return Element._returnOffset( window.pageXOffset || document.documentElement.scrollLeft || document= .body.scrollLeft, window.pageYOffset || document.documentElement.scrollTop || document.= body.scrollTop); } }; /* Portions of the Selector class are derived from Jack Slocum=E2=80=99s Do= mQuery, * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style * license. Please see http://www.yui-ext.com/ for more information. */ var Selector =3D Class.create({ initialize: function(expression) { this.expression =3D expression.strip(); this.compileMatcher(); }, compileMatcher: function() { // Selectors with namespaced attributes can't use the XPath version if (Prototype.BrowserFeatures.XPath && !(/(\[[\w-]*?:|:checked)/).test(= this.expression)) return this.compileXPathMatcher(); var e =3D this.expression, ps =3D Selector.patterns, h =3D Selector.han= dlers, c =3D Selector.criteria, le, p, m; if (Selector._cache[e]) { this.matcher =3D Selector._cache[e]; return; } this.matcher =3D ["this.matcher =3D function(root) {", "var r =3D root, h =3D Selector.handlers, c =3D false,= n;"]; while (e && le !=3D e && (/\S/).test(e)) { le =3D e; for (var i in ps) { p =3D ps[i]; if (m =3D e.match(p)) { this.matcher.push(Object.isFunction(c[i]) ? c[i](m) : new Template(c[i]).evaluate(m)); e =3D e.replace(m[0], ''); break; } } } this.matcher.push("return h.unique(n);\n}"); eval(this.matcher.join('\n')); Selector._cache[this.expression] =3D this.matcher; }, compileXPathMatcher: function() { var e =3D this.expression, ps =3D Selector.patterns, x =3D Selector.xpath, le, m; if (Selector._cache[e]) { this.xpath =3D Selector._cache[e]; return; } this.matcher =3D ['.//*']; while (e && le !=3D e && (/\S/).test(e)) { le =3D e; for (var i in ps) { if (m =3D e.match(ps[i])) { this.matcher.push(Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).evaluate(m)); e =3D e.replace(m[0], ''); break; } } } this.xpath =3D this.matcher.join(''); Selector._cache[this.expression] =3D this.xpath; }, findElements: function(root) { root =3D root || document; if (this.xpath) return document._getElementsByXPath(this.xpath, root); return this.matcher(root); }, match: function(element) { this.tokens =3D []; var e =3D this.expression, ps =3D Selector.patterns, as =3D Selector.as= sertions; var le, p, m; while (e && le !=3D=3D e && (/\S/).test(e)) { le =3D e; for (var i in ps) { p =3D ps[i]; if (m =3D e.match(p)) { // use the Selector.assertions methods unless the selector // is too complex. if (as[i]) { this.tokens.push([i, Object.clone(m)]); e =3D e.replace(m[0], ''); } else { // reluctantly do a document-wide search // and look for a match in the array return this.findElements(document).include(element); } } } } var match =3D true, name, matches; for (var i =3D 0, token; token =3D this.tokens[i]; i++) { name =3D token[0], matches =3D token[1]; if (!Selector.assertions[name](element, matches)) { match =3D false; break; } } return match; }, toString: function() { return this.expression; }, inspect: function() { return "#"; } }); Object.extend(Selector, { _cache: { }, xpath: { descendant: "//*", child: "/*", adjacent: "/following-sibling::*[1]", laterSibling: '/following-sibling::*', tagName: function(m) { if (m[1] =3D=3D '*') return ''; return "[local-name()=3D'" + m[1].toLowerCase() + "' or local-name()=3D'" + m[1].toUpperCase() + "']"; }, className: "[contains(concat(' ', @class, ' '), ' #{1} ')]", id: "[@id=3D'#{1}']", attrPresence: "[@#{1}]", attr: function(m) { m[3] =3D m[5] || m[6]; return new Template(Selector.xpath.operators[m[2]]).evaluate(m); }, pseudo: function(m) { var h =3D Selector.xpath.pseudos[m[1]]; if (!h) return ''; if (Object.isFunction(h)) return h(m); return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m); }, operators: { '=3D': "[@#{1}=3D'#{3}']", '!=3D': "[@#{1}!=3D'#{3}']", '^=3D': "[starts-with(@#{1}, '#{3}')]", '$=3D': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3= }') + 1))=3D'#{3}']", '*=3D': "[contains(@#{1}, '#{3}')]", '~=3D': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]", '|=3D': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]" }, pseudos: { 'first-child': '[not(preceding-sibling::*)]', 'last-child': '[not(following-sibling::*)]', 'only-child': '[not(preceding-sibling::* or following-sibling::*)]', 'empty': "[count(*) =3D 0 and (count(text()) =3D 0 or translate= (text(), ' \t\r\n', '') =3D '')]", 'checked': "[@checked]", 'disabled': "[@disabled]", 'enabled': "[not(@disabled)]", 'not': function(m) { var e =3D m[6], p =3D Selector.patterns, x =3D Selector.xpath, le, m, v; var exclusion =3D []; while (e && le !=3D e && (/\S/).test(e)) { le =3D e; for (var i in p) { if (m =3D e.match(p[i])) { v =3D Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).= evaluate(m); exclusion.push("(" + v.substring(1, v.length - 1) + ")"); e =3D e.replace(m[0], ''); break; } } } return "[not(" + exclusion.join(" and ") + ")]"; }, 'nth-child': function(m) { return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*)= + 1) ", m); }, 'nth-last-child': function(m) { return Selector.xpath.pseudos.nth("(count(./following-sibling::*)= + 1) ", m); }, 'nth-of-type': function(m) { return Selector.xpath.pseudos.nth("position() ", m); }, 'nth-last-of-type': function(m) { return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m); }, 'first-of-type': function(m) { m[6] =3D "1"; return Selector.xpath.pseudos['nth-of-type'](m); }, 'last-of-type': function(m) { m[6] =3D "1"; return Selector.xpath.pseudos['nth-last-of-type'](m); }, 'only-of-type': function(m) { var p =3D Selector.xpath.pseudos; return p['first-of-type'](m) + p[= 'last-of-type'](m); }, nth: function(fragment, m) { var mm, formula =3D m[6], predicate; if (formula =3D=3D 'even') formula =3D '2n+0'; if (formula =3D=3D 'odd') formula =3D '2n+1'; if (mm =3D formula.match(/^(\d+)$/)) // digit only return '[' + fragment + "=3D " + mm[1] + ']'; if (mm =3D formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b if (mm[1] =3D=3D "-") mm[1] =3D -1; var a =3D mm[1] ? Number(mm[1]) : 1; var b =3D mm[2] ? Number(mm[2]) : 0; predicate =3D "[((#{fragment} - #{b}) mod #{a} =3D 0) and " + "((#{fragment} - #{b}) div #{a} >=3D 0)]"; return new Template(predicate).evaluate({ fragment: fragment, a: a, b: b }); } } } }, criteria: { tagName: 'n =3D h.tagName(n, r, "#{1}", c); c =3D false;', className: 'n =3D h.className(n, r, "#{1}", c); c =3D false;', id: 'n =3D h.id(n, r, "#{1}", c); c =3D false;', attrPresence: 'n =3D h.attrPresence(n, r, "#{1}"); c =3D false;', attr: function(m) { m[3] =3D (m[5] || m[6]); return new Template('n =3D h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = =3D false;').evaluate(m); }, pseudo: function(m) { if (m[6]) m[6] =3D m[6].replace(/"/g, '\\"'); return new Template('n =3D h.pseudo(n, "#{1}", "#{6}", r, c); c =3D= false;').evaluate(m); }, descendant: 'c =3D "descendant";', child: 'c =3D "child";', adjacent: 'c =3D "adjacent";', laterSibling: 'c =3D "laterSibling";' }, patterns: { // combinators must be listed first // (and descendant needs to be last combinator) laterSibling: /^\s*~\s*/, child: /^\s*>\s*/, adjacent: /^\s*\+\s*/, descendant: /^\s/, // selectors follow tagName: /^\s*(\*|[\w\-]+)(\b|$)?/, id: /^#([\w\-\*]+)(\b|$)/, className: /^\.([\w\-\*]+)(\b|$)/, pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty= |checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=3D\s)|(?=3D:))/, attrPresence: /^\[([\w]+)\]/, attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=3D)\s*((['"])([^\= 4]*?)\4|([^'"][^\]]*?)))?\]/ }, // for Selector.match and Element#match assertions: { tagName: function(element, matches) { return matches[1].toUpperCase() =3D=3D element.tagName.toUpperCase(); }, className: function(element, matches) { return Element.hasClassName(element, matches[1]); }, id: function(element, matches) { return element.id =3D=3D=3D matches[1]; }, attrPresence: function(element, matches) { return Element.hasAttribute(element, matches[1]); }, attr: function(element, matches) { var nodeValue =3D Element.readAttribute(element, matches[1]); return Selector.operators[matches[2]](nodeValue, matches[3]); } }, handlers: { // UTILITY FUNCTIONS // joins two collections concat: function(a, b) { for (var i =3D 0, node; node =3D b[i]; i++) a.push(node); return a; }, // marks an array of nodes for counting mark: function(nodes) { for (var i =3D 0, node; node =3D nodes[i]; i++) node._counted =3D true; return nodes; }, unmark: function(nodes) { for (var i =3D 0, node; node =3D nodes[i]; i++) node._counted =3D undefined; return nodes; }, // mark each child node with its position (for nth calls) // "ofType" flag indicates whether we're indexing for nth-of-type // rather than nth-child index: function(parentNode, reverse, ofType) { parentNode._counted =3D true; if (reverse) { for (var nodes =3D parentNode.childNodes, i =3D nodes.length - 1,= j =3D 1; i >=3D 0; i--) { var node =3D nodes[i]; if (node.nodeType =3D=3D 1 && (!ofType || node._counted)) node.no= deIndex =3D j++; } } else { for (var i =3D 0, j =3D 1, nodes =3D parentNode.childNodes; node = =3D nodes[i]; i++) if (node.nodeType =3D=3D 1 && (!ofType || node._counted)) node.no= deIndex =3D j++; } }, // filters out duplicates and extends all nodes unique: function(nodes) { if (nodes.length =3D=3D 0) return nodes; var results =3D [], n; for (var i =3D 0, l =3D nodes.length; i < l; i++) if (!(n =3D nodes[i])._counted) { n._counted =3D true; results.push(Element.extend(n)); } return Selector.handlers.unmark(results); }, // COMBINATOR FUNCTIONS descendant: function(nodes) { var h =3D Selector.handlers; for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) h.concat(results, node.getElementsByTagName('*')); return results; }, child: function(nodes) { var h =3D Selector.handlers; for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) { for (var j =3D 0, children =3D [], child; child =3D node.childNodes= [j]; j++) if (child.nodeType =3D=3D 1 && child.tagName !=3D '!') results.pu= sh(child); } return results; }, adjacent: function(nodes) { for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) { var next =3D this.nextElementSibling(node); if (next) results.push(next); } return results; }, laterSibling: function(nodes) { var h =3D Selector.handlers; for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) h.concat(results, Element.nextSiblings(node)); return results; }, nextElementSibling: function(node) { while (node =3D node.nextSibling) if (node.nodeType =3D=3D 1) return node; return null; }, previousElementSibling: function(node) { while (node =3D node.previousSibling) if (node.nodeType =3D=3D 1) return node; return null; }, // TOKEN FUNCTIONS tagName: function(nodes, root, tagName, combinator) { tagName =3D tagName.toUpperCase(); var results =3D [], h =3D Selector.handlers; if (nodes) { if (combinator) { // fastlane for ordinary descendant combinators if (combinator =3D=3D "descendant") { for (var i =3D 0, node; node =3D nodes[i]; i++) h.concat(results, node.getElementsByTagName(tagName)); return results; } else nodes =3D this[combinator](nodes); if (tagName =3D=3D "*") return nodes; } for (var i =3D 0, node; node =3D nodes[i]; i++) if (node.tagName.toUpperCase() =3D=3D tagName) results.push(node); return results; } else return root.getElementsByTagName(tagName); }, id: function(nodes, root, id, combinator) { var targetNode =3D $(id), h =3D Selector.handlers; if (!targetNode) return []; if (!nodes && root =3D=3D document) return [targetNode]; if (nodes) { if (combinator) { if (combinator =3D=3D 'child') { for (var i =3D 0, node; node =3D nodes[i]; i++) if (targetNode.parentNode =3D=3D node) return [targetNode]; } else if (combinator =3D=3D 'descendant') { for (var i =3D 0, node; node =3D nodes[i]; i++) if (Element.descendantOf(targetNode, node)) return [targetNod= e]; } else if (combinator =3D=3D 'adjacent') { for (var i =3D 0, node; node =3D nodes[i]; i++) if (Selector.handlers.previousElementSibling(targetNode) =3D= =3D node) return [targetNode]; } else nodes =3D h[combinator](nodes); } for (var i =3D 0, node; node =3D nodes[i]; i++) if (node =3D=3D targetNode) return [targetNode]; return []; } return (targetNode && Element.descendantOf(targetNode, root)) ? [targ= etNode] : []; }, className: function(nodes, root, className, combinator) { if (nodes && combinator) nodes =3D this[combinator](nodes); return Selector.handlers.byClassName(nodes, root, className); }, byClassName: function(nodes, root, className) { if (!nodes) nodes =3D Selector.handlers.descendant([root]); var needle =3D ' ' + className + ' '; for (var i =3D 0, results =3D [], node, nodeClassName; node =3D nodes= [i]; i++) { nodeClassName =3D node.className; if (nodeClassName.length =3D=3D 0) continue; if (nodeClassName =3D=3D className || (' ' + nodeClassName + ' ').i= nclude(needle)) results.push(node); } return results; }, attrPresence: function(nodes, root, attr) { if (!nodes) nodes =3D root.getElementsByTagName("*"); var results =3D []; for (var i =3D 0, node; node =3D nodes[i]; i++) if (Element.hasAttribute(node, attr)) results.push(node); return results; }, attr: function(nodes, root, attr, value, operator) { if (!nodes) nodes =3D root.getElementsByTagName("*"); var handler =3D Selector.operators[operator], results =3D []; for (var i =3D 0, node; node =3D nodes[i]; i++) { var nodeValue =3D Element.readAttribute(node, attr); if (nodeValue =3D=3D=3D null) continue; if (handler(nodeValue, value)) results.push(node); } return results; }, pseudo: function(nodes, name, value, root, combinator) { if (nodes && combinator) nodes =3D this[combinator](nodes); if (!nodes) nodes =3D root.getElementsByTagName("*"); return Selector.pseudos[name](nodes, value, root); } }, pseudos: { 'first-child': function(nodes, value, root) { for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) { if (Selector.handlers.previousElementSibling(node)) continue; results.push(node); } return results; }, 'last-child': function(nodes, value, root) { for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) { if (Selector.handlers.nextElementSibling(node)) continue; results.push(node); } return results; }, 'only-child': function(nodes, value, root) { var h =3D Selector.handlers; for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) if (!h.previousElementSibling(node) && !h.nextElementSibling(node)) results.push(node); return results; }, 'nth-child': function(nodes, formula, root) { return Selector.pseudos.nth(nodes, formula, root); }, 'nth-last-child': function(nodes, formula, root) { return Selector.pseudos.nth(nodes, formula, root, true); }, 'nth-of-type': function(nodes, formula, root) { return Selector.pseudos.nth(nodes, formula, root, false, true); }, 'nth-last-of-type': function(nodes, formula, root) { return Selector.pseudos.nth(nodes, formula, root, true, true); }, 'first-of-type': function(nodes, formula, root) { return Selector.pseudos.nth(nodes, "1", root, false, true); }, 'last-of-type': function(nodes, formula, root) { return Selector.pseudos.nth(nodes, "1", root, true, true); }, 'only-of-type': function(nodes, formula, root) { var p =3D Selector.pseudos; return p['last-of-type'](p['first-of-type'](nodes, formula, root), fo= rmula, root); }, // handles the an+b logic getIndices: function(a, b, total) { if (a =3D=3D 0) return b > 0 ? [b] : []; return $R(1, total).inject([], function(memo, i) { if (0 =3D=3D (i - b) % a && (i - b) / a >=3D 0) memo.push(i); return memo; }); }, // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-ty= pe nth: function(nodes, formula, root, reverse, ofType) { if (nodes.length =3D=3D 0) return []; if (formula =3D=3D 'even') formula =3D '2n+0'; if (formula =3D=3D 'odd') formula =3D '2n+1'; var h =3D Selector.handlers, results =3D [], indexed =3D [], m; h.mark(nodes); for (var i =3D 0, node; node =3D nodes[i]; i++) { if (!node.parentNode._counted) { h.index(node.parentNode, reverse, ofType); indexed.push(node.parentNode); } } if (formula.match(/^\d+$/)) { // just a number formula =3D Number(formula); for (var i =3D 0, node; node =3D nodes[i]; i++) if (node.nodeIndex =3D=3D formula) results.push(node); } else if (m =3D formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b if (m[1] =3D=3D "-") m[1] =3D -1; var a =3D m[1] ? Number(m[1]) : 1; var b =3D m[2] ? Number(m[2]) : 0; var indices =3D Selector.pseudos.getIndices(a, b, nodes.length); for (var i =3D 0, node, l =3D indices.length; node =3D nodes[i]; i+= +) { for (var j =3D 0; j < l; j++) if (node.nodeIndex =3D=3D indices[j]) results.push(node); } } h.unmark(nodes); h.unmark(indexed); return results; }, 'empty': function(nodes, value, root) { for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) { // IE treats comments as element nodes if (node.tagName =3D=3D '!' || (node.firstChild && !node.innerHTML.= match(/^\s*$/))) continue; results.push(node); } return results; }, 'not': function(nodes, selector, root) { var h =3D Selector.handlers, selectorType, m; var exclusions =3D new Selector(selector).findElements(root); h.mark(exclusions); for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) if (!node._counted) results.push(node); h.unmark(exclusions); return results; }, 'enabled': function(nodes, value, root) { for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) if (!node.disabled) results.push(node); return results; }, 'disabled': function(nodes, value, root) { for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) if (node.disabled) results.push(node); return results; }, 'checked': function(nodes, value, root) { for (var i =3D 0, results =3D [], node; node =3D nodes[i]; i++) if (node.checked) results.push(node); return results; } }, operators: { '=3D': function(nv, v) { return nv =3D=3D v; }, '!=3D': function(nv, v) { return nv !=3D v; }, '^=3D': function(nv, v) { return nv.startsWith(v); }, '$=3D': function(nv, v) { return nv.endsWith(v); }, '*=3D': function(nv, v) { return nv.include(v); }, '~=3D': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + '= '); }, '|=3D': function(nv, v) { return ('-' + nv.toUpperCase() + '-').include= ('-' + v.toUpperCase() + '-'); } }, matchElements: function(elements, expression) { var matches =3D new Selector(expression).findElements(), h =3D Selector= .handlers; h.mark(matches); for (var i =3D 0, results =3D [], element; element =3D elements[i]; i++) if (element._counted) results.push(element); h.unmark(matches); return results; }, findElement: function(elements, expression, index) { if (Object.isNumber(expression)) { index =3D expression; expression =3D false; } return Selector.matchElements(elements, expression || '*')[index || 0]; }, findChildElements: function(element, expressions) { var exprs =3D expressions.join(','), expressions =3D []; exprs.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) { expressions.push(m[1].strip()); }); var results =3D [], h =3D Selector.handlers; for (var i =3D 0, l =3D expressions.length, selector; i < l; i++) { selector =3D new Selector(expressions[i].strip()); h.concat(results, selector.findElements(element)); } return (l > 1) ? h.unique(results) : results; } }); function $$() { return Selector.findChildElements(document, $A(arguments)); } var Form =3D { reset: function(form) { $(form).reset(); return form; }, serializeElements: function(elements, options) { if (typeof options !=3D 'object') options =3D { hash: !!options }; else if (options.hash =3D=3D=3D undefined) options.hash =3D true; var key, value, submitted =3D false, submit =3D options.submit; var data =3D elements.inject({ }, function(result, element) { if (!element.disabled && element.name) { key =3D element.name; value =3D $(element).getValue(); if (value !=3D null && (element.type !=3D 'submit' || (!submitted && submit !=3D=3D false && (!submit || key =3D=3D submit) && (subm= itted =3D true)))) { if (key in result) { // a key is already present; construct an array of values if (!Object.isArray(result[key])) result[key] =3D [result[key]]; result[key].push(value); } else result[key] =3D value; } } return result; }); return options.hash ? data : Object.toQueryString(data); } }; Form.Methods =3D { serialize: function(form, options) { return Form.serializeElements(Form.getElements(form), options); }, getElements: function(form) { return $A($(form).getElementsByTagName('*')).inject([], function(elements, child) { if (Form.Element.Serializers[child.tagName.toLowerCase()]) elements.push(Element.extend(child)); return elements; } ); }, getInputs: function(form, typeName, name) { form =3D $(form); var inputs =3D form.getElementsByTagName('input'); if (!typeName && !name) return $A(inputs).map(Element.extend); for (var i =3D 0, matchingInputs =3D [], length =3D inputs.length; i <= length; i++) { var input =3D inputs[i]; if ((typeName && input.type !=3D typeName) || (name && input.name != =3D name)) continue; matchingInputs.push(Element.extend(input)); } return matchingInputs; }, disable: function(form) { form =3D $(form); Form.getElements(form).invoke('disable'); return form; }, enable: function(form) { form =3D $(form); Form.getElements(form).invoke('enable'); return form; }, findFirstElement: function(form) { var elements =3D $(form).getElements().findAll(function(element) { return 'hidden' !=3D element.type && !element.disabled; }); var firstByIndex =3D elements.findAll(function(element) { return element.hasAttribute('tabIndex') && element.tabIndex >=3D 0; }).sortBy(function(element) { return element.tabIndex }).first(); return firstByIndex ? firstByIndex : elements.find(function(element) { return ['input', 'select', 'textarea'].include(element.tagName.toLowe= rCase()); }); }, focusFirstElement: function(form) { form =3D $(form); form.findFirstElement().activate(); return form; }, request: function(form, options) { form =3D $(form), options =3D Object.clone(options || { }); var params =3D options.parameters, action =3D form.readAttribute('actio= n') || ''; if (action.blank()) action =3D window.location.href; options.parameters =3D form.serialize(true); if (params) { if (Object.isString(params)) params =3D params.toQueryParams(); Object.extend(options.parameters, params); } if (form.hasAttribute('method') && !options.method) options.method =3D form.method; return new Ajax.Request(action, options); } }; /*-------------------------------------------------------------------------= -*/ Form.Element =3D { focus: function(element) { $(element).focus(); return element; }, select: function(element) { $(element).select(); return element; } }; Form.Element.Methods =3D { serialize: function(element) { element =3D $(element); if (!element.disabled && element.name) { var value =3D element.getValue(); if (value !=3D undefined) { var pair =3D { }; pair[element.name] =3D value; return Object.toQueryString(pair); } } return ''; }, getValue: function(element) { element =3D $(element); var method =3D element.tagName.toLowerCase(); return Form.Element.Serializers[method](element); }, setValue: function(element, value) { element =3D $(element); var method =3D element.tagName.toLowerCase(); Form.Element.Serializers[method](element, value); return element; }, clear: function(element) { $(element).value =3D ''; return element; }, present: function(element) { return $(element).value !=3D ''; }, activate: function(element) { element =3D $(element); try { element.focus(); if (element.select && (element.tagName.toLowerCase() !=3D 'input' || !['button', 'reset', 'submit'].include(element.type))) element.select(); } catch (e) { } return element; }, disable: function(element) { element =3D $(element); element.blur(); element.disabled =3D true; return element; }, enable: function(element) { element =3D $(element); element.disabled =3D false; return element; } }; /*-------------------------------------------------------------------------= -*/ var Field =3D Form.Element; var $F =3D Form.Element.Methods.getValue; /*-------------------------------------------------------------------------= -*/ Form.Element.Serializers =3D { input: function(element, value) { switch (element.type.toLowerCase()) { case 'checkbox': case 'radio': return Form.Element.Serializers.inputSelector(element, value); default: return Form.Element.Serializers.textarea(element, value); } }, inputSelector: function(element, value) { if (value =3D=3D=3D undefined) return element.checked ? element.value= : null; else element.checked =3D !!value; }, textarea: function(element, value) { if (value =3D=3D=3D undefined) return element.value; else element.value =3D value; }, select: function(element, index) { if (index =3D=3D=3D undefined) return this[element.type =3D=3D 'select-one' ? 'selectOne' : 'selectMany'](element); else { var opt, value, single =3D !Object.isArray(index); for (var i =3D 0, length =3D element.length; i < length; i++) { opt =3D element.options[i]; value =3D this.optionValue(opt); if (single) { if (value =3D=3D index) { opt.selected =3D true; return; } } else opt.selected =3D index.include(value); } } }, selectOne: function(element) { var index =3D element.selectedIndex; return index >=3D 0 ? this.optionValue(element.options[index]) : null; }, selectMany: function(element) { var values, length =3D element.length; if (!length) return null; for (var i =3D 0, values =3D []; i < length; i++) { var opt =3D element.options[i]; if (opt.selected) values.push(this.optionValue(opt)); } return values; }, optionValue: function(opt) { // extend element because hasAttribute may not be native return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; } }; /*-------------------------------------------------------------------------= -*/ Abstract.TimedObserver =3D Class.create(PeriodicalExecuter, { initialize: function($super, element, frequency, callback) { $super(callback, frequency); this.element =3D $(element); this.lastValue =3D this.getValue(); }, execute: function() { var value =3D this.getValue(); if (Object.isString(this.lastValue) && Object.isString(value) ? this.lastValue !=3D value : String(this.lastValue) !=3D String(valu= e)) { this.callback(this.element, value); this.lastValue =3D value; } } }); Form.Element.Observer =3D Class.create(Abstract.TimedObserver, { getValue: function() { return Form.Element.getValue(this.element); } }); Form.Observer =3D Class.create(Abstract.TimedObserver, { getValue: function() { return Form.serialize(this.element); } }); /*-------------------------------------------------------------------------= -*/ Abstract.EventObserver =3D Class.create({ initialize: function(element, callback) { this.element =3D $(element); this.callback =3D callback; this.lastValue =3D this.getValue(); if (this.element.tagName.toLowerCase() =3D=3D 'form') this.registerFormCallbacks(); else this.registerCallback(this.element); }, onElementEvent: function() { var value =3D this.getValue(); if (this.lastValue !=3D value) { this.callback(this.element, value); this.lastValue =3D value; } }, registerFormCallbacks: function() { Form.getElements(this.element).each(this.registerCallback, this); }, registerCallback: function(element) { if (element.type) { switch (element.type.toLowerCase()) { case 'checkbox': case 'radio': Event.observe(element, 'click', this.onElementEvent.bind(this)); break; default: Event.observe(element, 'change', this.onElementEvent.bind(this)); break; } } } }); Form.Element.EventObserver =3D Class.create(Abstract.EventObserver, { getValue: function() { return Form.Element.getValue(this.element); } }); Form.EventObserver =3D Class.create(Abstract.EventObserver, { getValue: function() { return Form.serialize(this.element); } }); if (!window.Event) var Event =3D { }; Object.extend(Event, { KEY_BACKSPACE: 8, KEY_TAB: 9, KEY_RETURN: 13, KEY_ESC: 27, KEY_LEFT: 37, KEY_UP: 38, KEY_RIGHT: 39, KEY_DOWN: 40, KEY_DELETE: 46, KEY_HOME: 36, KEY_END: 35, KEY_PAGEUP: 33, KEY_PAGEDOWN: 34, KEY_INSERT: 45, cache: { }, relatedTarget: function(event) { var element; switch(event.type) { case 'mouseover': element =3D event.fromElement; break; case 'mouseout': element =3D event.toElement; break; default: return null; } return Element.extend(element); } }); Event.Methods =3D (function() { var isButton; if (Prototype.Browser.IE) { var buttonMap =3D { 0: 1, 1: 4, 2: 2 }; isButton =3D function(event, code) { return event.button =3D=3D buttonMap[code]; }; } else if (Prototype.Browser.WebKit) { isButton =3D function(event, code) { switch (code) { case 0: return event.which =3D=3D 1 && !event.metaKey; case 1: return event.which =3D=3D 1 && event.metaKey; default: return false; } }; } else { isButton =3D function(event, code) { return event.which ? (event.which =3D=3D=3D code + 1) : (event.button= =3D=3D=3D code); }; } return { isLeftClick: function(event) { return isButton(event, 0) }, isMiddleClick: function(event) { return isButton(event, 1) }, isRightClick: function(event) { return isButton(event, 2) }, element: function(event) { var node =3D Event.extend(event).target; return Element.extend(node.nodeType =3D=3D Node.TEXT_NODE ? node.pare= ntNode : node); }, findElement: function(event, expression) { var element =3D Event.element(event); return element.match(expression) ? element : element.up(expression); }, pointer: function(event) { return { x: event.pageX || (event.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft)= ), y: event.pageY || (event.clientY + (document.documentElement.scrollTop || document.body.scrollTop)) }; }, pointerX: function(event) { return Event.pointer(event).x }, pointerY: function(event) { return Event.pointer(event).y }, stop: function(event) { Event.extend(event); event.preventDefault(); event.stopPropagation(); event.stopped =3D true; } }; })(); Event.extend =3D (function() { var methods =3D Object.keys(Event.Methods).inject({ }, function(m, name) { m[name] =3D Event.Methods[name].methodize(); return m; }); if (Prototype.Browser.IE) { Object.extend(methods, { stopPropagation: function() { this.cancelBubble =3D true }, preventDefault: function() { this.returnValue =3D false }, inspect: function() { return "[object Event]" } }); return function(event) { if (!event) return false; if (event._extendedByPrototype) return event; event._extendedByPrototype =3D Prototype.emptyFunction; var pointer =3D Event.pointer(event); Object.extend(event, { target: event.srcElement, relatedTarget: Event.relatedTarget(event), pageX: pointer.x, pageY: pointer.y }); return Object.extend(event, methods); }; } else { Event.prototype =3D Event.prototype || document.createEvent("HTMLEvents= ").__proto__; Object.extend(Event.prototype, methods); return Prototype.K; } })(); Object.extend(Event, (function() { var cache =3D Event.cache; function getEventID(element) { if (element._eventID) return element._eventID; arguments.callee.id =3D arguments.callee.id || 1; return element._eventID =3D ++arguments.callee.id; } function getDOMEventName(eventName) { if (eventName && eventName.include(':')) return "dataavailable"; return eventName; } function getCacheForID(id) { return cache[id] =3D cache[id] || { }; } function getWrappersForEventName(id, eventName) { var c =3D getCacheForID(id); return c[eventName] =3D c[eventName] || []; } function createWrapper(element, eventName, handler) { var id =3D getEventID(element); var c =3D getWrappersForEventName(id, eventName); if (c.pluck("handler").include(handler)) return false; var wrapper =3D function(event) { if (!Event || !Event.extend || (event.eventName && event.eventName !=3D eventName)) return false; Event.extend(event); handler.call(element, event) }; wrapper.handler =3D handler; c.push(wrapper); return wrapper; } function findWrapper(id, eventName, handler) { var c =3D getWrappersForEventName(id, eventName); return c.find(function(wrapper) { return wrapper.handler =3D=3D handler= }); } function destroyWrapper(id, eventName, handler) { var c =3D getCacheForID(id); if (!c[eventName]) return false; c[eventName] =3D c[eventName].without(findWrapper(id, eventName, handle= r)); } function destroyCache() { for (var id in cache) for (var eventName in cache[id]) cache[id][eventName] =3D null; } if (window.attachEvent) { window.attachEvent("onunload", destroyCache); } return { observe: function(element, eventName, handler) { element =3D $(element); var name =3D getDOMEventName(eventName); var wrapper =3D createWrapper(element, eventName, handler); if (!wrapper) return element; if (element.addEventListener) { element.addEventListener(name, wrapper, false); } else { element.attachEvent("on" + name, wrapper); } return element; }, stopObserving: function(element, eventName, handler) { element =3D $(element); var id =3D getEventID(element), name =3D getDOMEventName(eventName); if (!handler && eventName) { getWrappersForEventName(id, eventName).each(function(wrapper) { element.stopObserving(eventName, wrapper.handler); }); return element; } else if (!eventName) { Object.keys(getCacheForID(id)).each(function(eventName) { element.stopObserving(eventName); }); return element; } var wrapper =3D findWrapper(id, eventName, handler); if (!wrapper) return element; if (element.removeEventListener) { element.removeEventListener(name, wrapper, false); } else { element.detachEvent("on" + name, wrapper); } destroyWrapper(id, eventName, handler); return element; }, fire: function(element, eventName, memo) { element =3D $(element); if (element =3D=3D document && document.createEvent && !element.dispa= tchEvent) element =3D document.documentElement; if (document.createEvent) { var event =3D document.createEvent("HTMLEvents"); event.initEvent("dataavailable", true, true); } else { var event =3D document.createEventObject(); event.eventType =3D "ondataavailable"; } event.eventName =3D eventName; event.memo =3D memo || { }; if (document.createEvent) { element.dispatchEvent(event); } else { element.fireEvent(event.eventType, event); } return event; } }; })()); Object.extend(Event, Event.Methods); Element.addMethods({ fire: Event.fire, observe: Event.observe, stopObserving: Event.stopObserving }); Object.extend(document, { fire: Element.Methods.fire.methodize(), observe: Element.Methods.observe.methodize(), stopObserving: Element.Methods.stopObserving.methodize() }); (function() { /* Support for the DOMContentLoaded event is based on work by Dan Webb, Matthias Miller, Dean Edwards and John Resig. */ var timer, fired =3D false; function fireContentLoadedEvent() { if (fired) return; if (timer) window.clearInterval(timer); document.fire("dom:loaded"); fired =3D true; } if (document.addEventListener) { if (Prototype.Browser.WebKit) { timer =3D window.setInterval(function() { if (/loaded|complete/.test(document.readyState)) fireContentLoadedEvent(); }, 0); Event.observe(window, "load", fireContentLoadedEvent); } else { document.addEventListener("DOMContentLoaded", fireContentLoadedEvent, false); } } else { document.write("'); }, load: function() { if((typeof Prototype=3D=3D'undefined') || parseFloat(Prototype.Version.split(".")[0] + "." + Prototype.Version.split(".")[1]) < 1.4) throw("script.aculo.us requires the Prototype JavaScript framework >= =3D 1.4.0"); =20 $A(document.getElementsByTagName("script")).findAll( function(s) { return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/)) }).each( function(s) { var path =3D s.src.replace(/scriptaculous\.js(\?.*)?$/,''); var includes =3D s.src.match(/\?.*load=3D([a-z,]*)/); (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider')= .split(',').each( function(include) { Scriptaculous.require(path+include+'.js') }); }); } } Scriptaculous.load(); ------=_NextPart_000_0000_4A1CA263.E04924BE Content-Type: text/javascript Content-Transfer-Encoding: quoted-printable Content-Location: http://www.itagsoftware.com/script/effects.js // Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.acul= o.us) // Contributors: // Justin Palmer (http://encytemedia.com/) // Mark Pilgrim (http://diveintomark.org/) // Martin Bialasinki //=20 // See scriptaculous.js for full license. =20 /* ------------- element ext -------------- */ =20 =20 // converts rgb() and #xxx to #xxxxxx format, =20 // returns self (or first argument) if not convertable =20 String.prototype.parseColor =3D function() { =20 var color =3D '#'; =20 if(this.slice(0,4) =3D=3D 'rgb(') { =20 var cols =3D this.slice(4,this.length-1).split(','); =20 var i=3D0; do { color +=3D parseInt(cols[i]).toColorPart() } while (++i= <3); =20 } else { =20 if(this.slice(0,1) =3D=3D '#') { =20 if(this.length=3D=3D4) for(var i=3D1;i<4;i++) color +=3D (this.charAt= (i) + this.charAt(i)).toLowerCase(); =20 if(this.length=3D=3D7) color =3D this.toLowerCase(); =20 } =20 } =20 return(color.length=3D=3D7 ? color : (arguments[0] || this)); =20 } Element.collectTextNodes =3D function(element) { =20 return $A($(element).childNodes).collect( function(node) { return (node.nodeType=3D=3D3 ? node.nodeValue :=20 (node.hasChildNodes() ? Element.collectTextNodes(node) : '')); }).flatten().join(''); } Element.collectTextNodesIgnoreClass =3D function(element, className) { =20 return $A($(element).childNodes).collect( function(node) { return (node.nodeType=3D=3D3 ? node.nodeValue :=20 ((node.hasChildNodes() && !Element.hasClassName(node,className)) ?=20 Element.collectTextNodes(node) : '')); }).flatten().join(''); } Element.setStyle =3D function(element, style) { element =3D $(element); for(k in style) element.style[k.camelize()] =3D style[k]; } Element.setContentZoom =3D function(element, percent) { =20 Element.setStyle(element, {fontSize: (percent/100) + 'em'}); =20 if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0);= =20 } Element.getOpacity =3D function(element){ =20 var opacity; if (opacity =3D Element.getStyle(element, 'opacity')) =20 return parseFloat(opacity); =20 if (opacity =3D (Element.getStyle(element, 'filter') || '').match(/alpha\= (opacity=3D(.*)\)/)) =20 if(opacity[1]) return parseFloat(opacity[1]) / 100; =20 return 1.0; =20 } Element.setOpacity =3D function(element, value){ =20 element=3D $(element); =20 if (value =3D=3D 1){ Element.setStyle(element, { opacity:=20 (/Gecko/.test(navigator.userAgent) && !/Konqueror|Safari|KHTML/.test(= navigator.userAgent)) ?=20 0.999999 : null }); if(/MSIE/.test(navigator.userAgent)) =20 Element.setStyle(element, {filter: Element.getStyle(element,'filter')= .replace(/alpha\([^\)]*\)/gi,'')}); =20 } else { =20 if(value < 0.00001) value =3D 0; =20 Element.setStyle(element, {opacity: value}); if(/MSIE/.test(navigator.userAgent)) =20 Element.setStyle(element,=20 { filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\= )/gi,'') + 'alpha(opacity=3D'+value*100+')' }); =20 } =20 } =20 =20 Element.getInlineOpacity =3D function(element){ =20 return $(element).style.opacity || ''; } =20 Element.childrenWithClassName =3D function(element, className) { =20 return $A($(element).getElementsByTagName('*')).select( function(c) { return Element.hasClassName(c, className) }); } Array.prototype.call =3D function() { var args =3D arguments; this.each(function(f){ f.apply(this, args) }); } /*-------------------------------------------------------------------------= -*/ var Effect =3D { tagifyText: function(element) { var tagifyStyle =3D 'position:relative'; if(/MSIE/.test(navigator.userAgent)) tagifyStyle +=3D ';zoom:1'; element =3D $(element); $A(element.childNodes).each( function(child) { if(child.nodeType=3D=3D3) { child.nodeValue.toArray().each( function(character) { element.insertBefore( Builder.node('span',{style: tagifyStyle}, character =3D=3D ' ' ? String.fromCharCode(160) : character),= =20 child); }); Element.remove(child); } }); }, multiple: function(element, effect) { var elements; if(((typeof element =3D=3D 'object') ||=20 (typeof element =3D=3D 'function')) &&=20 (element.length)) elements =3D element; else elements =3D $(element).childNodes; =20 var options =3D Object.extend({ speed: 0.1, delay: 0.0 }, arguments[2] || {}); var masterDelay =3D options.delay; $A(elements).each( function(element, index) { new effect(element, Object.extend(options, { delay: index * options.s= peed + masterDelay })); }); }, PAIRS: { 'slide': ['SlideDown','SlideUp'], 'blind': ['BlindDown','BlindUp'], 'appear': ['Appear','Fade'] }, toggle: function(element, effect) { element =3D $(element); effect =3D (effect || 'appear').toLowerCase(); var options =3D Object.extend({ queue: { position:'end', scope:(element.id || 'global') } }, arguments[2] || {}); Effect[Element.visible(element) ?=20 Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options); } }; var Effect2 =3D Effect; // deprecated /* ------------- transitions ------------- */ Effect.Transitions =3D {} Effect.Transitions.linear =3D function(pos) { return pos; } Effect.Transitions.sinoidal =3D function(pos) { return (-Math.cos(pos*Math.PI)/2) + 0.5; } Effect.Transitions.reverse =3D function(pos) { return 1-pos; } Effect.Transitions.flicker =3D function(pos) { return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4; } Effect.Transitions.wobble =3D function(pos) { return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5; } Effect.Transitions.pulse =3D function(pos) { return (Math.floor(pos*10) % 2 =3D=3D 0 ?=20 (pos*10-Math.floor(pos*10)) : 1-(pos*10-Math.floor(pos*10))); } Effect.Transitions.none =3D function(pos) { return 0; } Effect.Transitions.full =3D function(pos) { return 1; } /* ------------- core effects ------------- */ Effect.ScopedQueue =3D Class.create(); Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), { initialize: function() { this.effects =3D []; this.interval =3D null; }, _each: function(iterator) { this.effects._each(iterator); }, add: function(effect) { var timestamp =3D new Date().getTime(); =20 var position =3D (typeof effect.options.queue =3D=3D 'string') ?=20 effect.options.queue : effect.options.queue.position; =20 switch(position) { case 'front': // move unstarted effects after this effect =20 this.effects.findAll(function(e){ return e.state=3D=3D'idle' }).eac= h( function(e) { e.startOn +=3D effect.finishOn; e.finishOn +=3D effect.finishOn; }); break; case 'end': // start effect after last queued effect has finished timestamp =3D this.effects.pluck('finishOn').max() || timestamp; break; } =20 effect.startOn +=3D timestamp; effect.finishOn +=3D timestamp; this.effects.push(effect); if(!this.interval)=20 this.interval =3D setInterval(this.loop.bind(this), 40); }, remove: function(effect) { this.effects =3D this.effects.reject(function(e) { return e=3D=3Deffect= }); if(this.effects.length =3D=3D 0) { clearInterval(this.interval); this.interval =3D null; } }, loop: function() { var timePos =3D new Date().getTime(); this.effects.invoke('loop', timePos); } }); Effect.Queues =3D { instances: $H(), get: function(queueName) { if(typeof queueName !=3D 'string') return queueName; =20 if(!this.instances[queueName]) this.instances[queueName] =3D new Effect.ScopedQueue(); =20 return this.instances[queueName]; } } Effect.Queue =3D Effect.Queues.get('global'); Effect.DefaultOptions =3D { transition: Effect.Transitions.sinoidal, duration: 1.0, // seconds fps: 25.0, // max. 25fps due to Effect.Queue implementation sync: false, // true for combining from: 0.0, to: 1.0, delay: 0.0, queue: 'parallel' } Effect.Base =3D function() {}; Effect.Base.prototype =3D { position: null, start: function(options) { this.options =3D Object.extend(Object.extend({},Effect.DefaultOpti= ons), options || {}); this.currentFrame =3D 0; this.state =3D 'idle'; this.startOn =3D this.options.delay*1000; this.finishOn =3D this.startOn + (this.options.duration*1000); this.event('beforeStart'); if(!this.options.sync) Effect.Queues.get(typeof this.options.queue =3D=3D 'string' ?=20 'global' : this.options.queue.scope).add(this); }, loop: function(timePos) { if(timePos >=3D this.startOn) { if(timePos >=3D this.finishOn) { this.render(1.0); this.cancel(); this.event('beforeFinish'); if(this.finish) this.finish();=20 this.event('afterFinish'); return; =20 } var pos =3D (timePos - this.startOn) / (this.finishOn - this.startO= n); var frame =3D Math.round(pos * this.options.fps * this.options.durati= on); if(frame > this.currentFrame) { this.render(pos); this.currentFrame =3D frame; } } }, render: function(pos) { if(this.state =3D=3D 'idle') { this.state =3D 'running'; this.event('beforeSetup'); if(this.setup) this.setup(); this.event('afterSetup'); } if(this.state =3D=3D 'running') { if(this.options.transition) pos =3D this.options.transition(pos); pos *=3D (this.options.to-this.options.from); pos +=3D this.options.from; this.position =3D pos; this.event('beforeUpdate'); if(this.update) this.update(pos); this.event('afterUpdate'); } }, cancel: function() { if(!this.options.sync) Effect.Queues.get(typeof this.options.queue =3D=3D 'string' ?=20 'global' : this.options.queue.scope).remove(this); this.state =3D 'finished'; }, event: function(eventName) { if(this.options[eventName + 'Internal']) this.options[eventName + 'Inte= rnal'](this); if(this.options[eventName]) this.options[eventName](this); }, inspect: function() { return '#'; } } Effect.Parallel =3D Class.create(); Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototyp= e), { initialize: function(effects) { this.effects =3D effects || []; this.start(arguments[1]); }, update: function(position) { this.effects.invoke('render', position); }, finish: function(position) { this.effects.each( function(effect) { effect.render(1.0); effect.cancel(); effect.event('beforeFinish'); if(effect.finish) effect.finish(position); effect.event('afterFinish'); }); } }); Effect.Opacity =3D Class.create(); Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype= ), { initialize: function(element) { this.element =3D $(element); // make this work on IE on elements without 'layout' if(/MSIE/.test(navigator.userAgent) && (!this.element.hasLayout)) Element.setStyle(this.element, {zoom: 1}); var options =3D Object.extend({ from: Element.getOpacity(this.element) || 0.0, to: 1.0 }, arguments[1] || {}); this.start(options); }, update: function(position) { Element.setOpacity(this.element, position); } }); Effect.Move =3D Class.create(); Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), { initialize: function(element) { this.element =3D $(element); var options =3D Object.extend({ x: 0, y: 0, mode: 'relative' }, arguments[1] || {}); this.start(options); }, setup: function() { // Bug in Opera: Opera returns the "real" position of a static element= or // relative element that does not have top/left explicitly set. // =3D=3D> Always set top and left for position relative elements in yo= ur stylesheets=20 // (to 0 if you do not need them)=20 Element.makePositioned(this.element); this.originalLeft =3D parseFloat(Element.getStyle(this.element,'left')= || '0'); this.originalTop =3D parseFloat(Element.getStyle(this.element,'top')= || '0'); if(this.options.mode =3D=3D 'absolute') { // absolute movement, so we need to calc deltaX and deltaY this.options.x =3D this.options.x - this.originalLeft; this.options.y =3D this.options.y - this.originalTop; } }, update: function(position) { Element.setStyle(this.element, { left: this.options.x * position + this.originalLeft + 'px', top: this.options.y * position + this.originalTop + 'px' }); } }); // for backwards compatibility Effect.MoveBy =3D function(element, toTop, toLeft) { return new Effect.Move(element,=20 Object.extend({ x: toLeft, y: toTop }, arguments[3] || {})); }; Effect.Scale =3D Class.create(); Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype),= { initialize: function(element, percent) { this.element =3D $(element) var options =3D Object.extend({ scaleX: true, scaleY: true, scaleContent: true, scaleFromCenter: false, scaleMode: 'box', // 'box' or 'contents' or {} with provided= values scaleFrom: 100.0, scaleTo: percent }, arguments[2] || {}); this.start(options); }, setup: function() { this.restoreAfterFinish =3D this.options.restoreAfterFinish || false; this.elementPositioning =3D Element.getStyle(this.element,'position'); =20 this.originalStyle =3D {}; ['top','left','width','height','fontSize'].each( function(k) { this.originalStyle[k] =3D this.element.style[k]; }.bind(this)); =20 this.originalTop =3D this.element.offsetTop; this.originalLeft =3D this.element.offsetLeft; =20 var fontSize =3D Element.getStyle(this.element,'font-size') || '100%'; ['em','px','%'].each( function(fontSizeType) { if(fontSize.indexOf(fontSizeType)>0) { this.fontSize =3D parseFloat(fontSize); this.fontSizeType =3D fontSizeType; } }.bind(this)); =20 this.factor =3D (this.options.scaleTo - this.options.scaleFrom)/100; =20 this.dims =3D null; if(this.options.scaleMode=3D=3D'box') this.dims =3D [this.element.offsetHeight, this.element.offsetWidth]; if(/^content/.test(this.options.scaleMode)) this.dims =3D [this.element.scrollHeight, this.element.scrollWidth]; if(!this.dims) this.dims =3D [this.options.scaleMode.originalHeight, this.options.scaleMode.originalWidth]; }, update: function(position) { var currentScale =3D (this.options.scaleFrom/100.0) + (this.factor * po= sition); if(this.options.scaleContent && this.fontSize) Element.setStyle(this.element, {fontSize: this.fontSize * currentScal= e + this.fontSizeType }); this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentS= cale); }, finish: function(position) { if (this.restoreAfterFinish) Element.setStyle(this.element, this.origin= alStyle); }, setDimensions: function(height, width) { var d =3D {}; if(this.options.scaleX) d.width =3D width + 'px'; if(this.options.scaleY) d.height =3D height + 'px'; if(this.options.scaleFromCenter) { var topd =3D (height - this.dims[0])/2; var leftd =3D (width - this.dims[1])/2; if(this.elementPositioning =3D=3D 'absolute') { if(this.options.scaleY) d.top =3D this.originalTop-topd + 'px'; if(this.options.scaleX) d.left =3D this.originalLeft-leftd + 'px'; } else { if(this.options.scaleY) d.top =3D -topd + 'px'; if(this.options.scaleX) d.left =3D -leftd + 'px'; } } Element.setStyle(this.element, d); } }); Effect.Highlight =3D Class.create(); Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototy= pe), { initialize: function(element) { this.element =3D $(element); var options =3D Object.extend({ startcolor: '#ffff99' }, arguments[1]= || {}); this.start(options); }, setup: function() { // Prevent executing on elements not in the layout flow if(Element.getStyle(this.element, 'display')=3D=3D'none') { this.cancel= (); return; } // Disable background image during the effect this.oldStyle =3D { backgroundImage: Element.getStyle(this.element, 'background-image') }; Element.setStyle(this.element, {backgroundImage: 'none'}); if(!this.options.endcolor) this.options.endcolor =3D Element.getStyle(this.element, 'background-= color').parseColor('#ffffff'); if(!this.options.restorecolor) this.options.restorecolor =3D Element.getStyle(this.element, 'backgro= und-color'); // init color calculations this._base =3D $R(0,2).map(function(i){ return parseInt(this.options.s= tartcolor.slice(i*2+1,i*2+3),16) }.bind(this)); this._delta =3D $R(0,2).map(function(i){ return parseInt(this.options.e= ndcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this)); }, update: function(position) { Element.setStyle(this.element,{backgroundColor: $R(0,2).inject('#',func= tion(m,v,i){ return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColor= Part()); }.bind(this)) }); }, finish: function() { Element.setStyle(this.element, Object.extend(this.oldStyle, { backgroundColor: this.options.restorecolor })); } }); Effect.ScrollTo =3D Class.create(); Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototyp= e), { initialize: function(element) { this.element =3D $(element); this.start(arguments[1] || {}); }, setup: function() { Position.prepare(); var offsets =3D Position.cumulativeOffset(this.element); if(this.options.offset) offsets[1] +=3D this.options.offset; var max =3D window.innerHeight ?=20 window.height - window.innerHeight : document.body.scrollHeight -=20 (document.documentElement.clientHeight ?=20 document.documentElement.clientHeight : document.body.clientHeigh= t); this.scrollStart =3D Position.deltaY; this.delta =3D (offsets[1] > max ? max : offsets[1]) - this.scrollStart; }, update: function(position) { Position.prepare(); window.scrollTo(Position.deltaX,=20 this.scrollStart + (position*this.delta)); } }); /* ------------- combination effects ------------- */ Effect.Fade =3D function(element) { var oldOpacity =3D Element.getInlineOpacity(element); var options =3D Object.extend({ from: Element.getOpacity(element) || 1.0, to: 0.0, afterFinishInternal: function(effect) { with(Element) {=20 if(effect.options.to!=3D0) return; hide(effect.element); setStyle(effect.element, {opacity: oldOpacity}); }} }, arguments[1] || {}); return new Effect.Opacity(element,options); } Effect.Appear =3D function(element) { var options =3D Object.extend({ from: (Element.getStyle(element, 'display') =3D=3D 'none' ? 0.0 : Element= .getOpacity(element) || 0.0), to: 1.0, beforeSetup: function(effect) { with(Element) { setOpacity(effect.element, effect.options.from); show(effect.element); }} }, arguments[1] || {}); return new Effect.Opacity(element,options); } Effect.Puff =3D function(element) { element =3D $(element); var oldStyle =3D { opacity: Element.getInlineOpacity(element), position:= Element.getStyle(element, 'position') }; return new Effect.Parallel( [ new Effect.Scale(element, 200,=20 { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfter= Finish: true }),=20 new Effect.Opacity(element, { sync: true, to: 0.0 } ) ],=20 Object.extend({ duration: 1.0,=20 beforeSetupInternal: function(effect) { with(Element) { setStyle(effect.effects[0].element, {position: 'absolute'}); }}, afterFinishInternal: function(effect) { with(Element) { hide(effect.effects[0].element); setStyle(effect.effects[0].element, oldStyle); }} }, arguments[1] || {}) ); } Effect.BlindUp =3D function(element) { element =3D $(element); Element.makeClipping(element); return new Effect.Scale(element, 0,=20 Object.extend({ scaleContent: false,=20 scaleX: false,=20 restoreAfterFinish: true, afterFinishInternal: function(effect) { with(Element) { [hide, undoClipping].call(effect.element); }}=20 }, arguments[1] || {}) ); } Effect.BlindDown =3D function(element) { element =3D $(element); var oldHeight =3D Element.getStyle(element, 'height'); var elementDimensions =3D Element.getDimensions(element); return new Effect.Scale(element, 100,=20 Object.extend({ scaleContent: false,=20 scaleX: false, scaleFrom: 0, scaleMode: {originalHeight: elementDimensions.height, originalWidth:= elementDimensions.width}, restoreAfterFinish: true, afterSetup: function(effect) { with(Element) { makeClipping(effect.element); setStyle(effect.element, {height: '0px'}); show(effect.element);=20 }}, =20 afterFinishInternal: function(effect) { with(Element) { undoClipping(effect.element); setStyle(effect.element, {height: oldHeight}); }} }, arguments[1] || {}) ); } Effect.SwitchOff =3D function(element) { element =3D $(element); var oldOpacity =3D Element.getInlineOpacity(element); return new Effect.Appear(element, {=20 duration: 0.4, from: 0, transition: Effect.Transitions.flicker, afterFinishInternal: function(effect) { new Effect.Scale(effect.element, 1, {=20 duration: 0.3, scaleFromCenter: true, scaleX: false, scaleContent: false, restoreAfterFinish: true, beforeSetup: function(effect) { with(Element) { [makePositioned,makeClipping].call(effect.element); }}, afterFinishInternal: function(effect) { with(Element) { [hide,undoClipping,undoPositioned].call(effect.element); setStyle(effect.element, {opacity: oldOpacity}); }} }) } }); } Effect.DropOut =3D function(element) { element =3D $(element); var oldStyle =3D { top: Element.getStyle(element, 'top'), left: Element.getStyle(element, 'left'), opacity: Element.getInlineOpacity(element) }; return new Effect.Parallel( [ new Effect.Move(element, {x: 0, y: 100, sync: true }),=20 new Effect.Opacity(element, { sync: true, to: 0.0 }) ], Object.extend( { duration: 0.5, beforeSetup: function(effect) { with(Element) { makePositioned(effect.effects[0].element); }}, afterFinishInternal: function(effect) { with(Element) { [hide, undoPositioned].call(effect.effects[0].element); setStyle(effect.effects[0].element, oldStyle); }}=20 }, arguments[1] || {})); } Effect.Shake =3D function(element) { element =3D $(element); var oldStyle =3D { top: Element.getStyle(element, 'top'), left: Element.getStyle(element, 'left') }; return new Effect.Move(element,=20 { x: 20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { new Effect.Move(effect.element, { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { new Effect.Move(effect.element, { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { new Effect.Move(effect.element, { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { new Effect.Move(effect.element, { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { new Effect.Move(effect.element, { x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect)= { with(Element) { undoPositioned(effect.element); setStyle(effect.element, oldStyle); }}}) }}) }}) }}) }}) }}); } Effect.SlideDown =3D function(element) { element =3D $(element); Element.cleanWhitespace(element); // SlideDown need to have the content of the element wrapped in a contain= er element with fixed height! var oldInnerBottom =3D Element.getStyle(element.firstChild, 'bottom'); var elementDimensions =3D Element.getDimensions(element); return new Effect.Scale(element, 100, Object.extend({=20 scaleContent: false,=20 scaleX: false,=20 scaleFrom: 0, scaleMode: {originalHeight: elementDimensions.height, originalWidth: el= ementDimensions.width}, restoreAfterFinish: true, afterSetup: function(effect) { with(Element) { makePositioned(effect.element); makePositioned(effect.element.firstChild); if(window.opera) setStyle(effect.element, {top: ''}); makeClipping(effect.element); setStyle(effect.element, {height: '0px'}); show(element); }}, afterUpdateInternal: function(effect) { with(Element) { setStyle(effect.element.firstChild, {bottom: (effect.dims[0] - effect.element.clientHeight) + 'px' }); }}, afterFinishInternal: function(effect) { with(Element) { undoClipping(effect.element);=20 undoPositioned(effect.element.firstChild); undoPositioned(effect.element); setStyle(effect.element.firstChild, {bottom: oldInnerBottom}); }} }, arguments[1] || {}) ); } =20 Effect.SlideUp =3D function(element) { element =3D $(element); Element.cleanWhitespace(element); var oldInnerBottom =3D Element.getStyle(element.firstChild, 'bottom'); return new Effect.Scale(element, 0,=20 Object.extend({ scaleContent: false,=20 scaleX: false,=20 scaleMode: 'box', scaleFrom: 100, restoreAfterFinish: true, beforeStartInternal: function(effect) { with(Element) { makePositioned(effect.element); makePositioned(effect.element.firstChild); if(window.opera) setStyle(effect.element, {top: ''}); makeClipping(effect.element); show(element); }}, =20 afterUpdateInternal: function(effect) { with(Element) { setStyle(effect.element.firstChild, {bottom: (effect.dims[0] - effect.element.clientHeight) + 'px' }); }}, afterFinishInternal: function(effect) { with(Element) { [hide, undoClipping].call(effect.element);=20 undoPositioned(effect.element.firstChild); undoPositioned(effect.element); setStyle(effect.element.firstChild, {bottom: oldInnerBottom}); }} }, arguments[1] || {}) ); } // Bug in opera makes the TD containing this element expand for a instance= after finish=20 Effect.Squish =3D function(element) { return new Effect.Scale(element, window.opera ? 1 : 0,=20 { restoreAfterFinish: true, beforeSetup: function(effect) { with(Element) { makeClipping(effect.element); }}, =20 afterFinishInternal: function(effect) { with(Element) { hide(effect.element);=20 undoClipping(effect.element); }} }); } Effect.Grow =3D function(element) { element =3D $(element); var options =3D Object.extend({ direction: 'center', moveTransistion: Effect.Transitions.sinoidal, scaleTransition: Effect.Transitions.sinoidal, opacityTransition: Effect.Transitions.full }, arguments[1] || {}); var oldStyle =3D { top: element.style.top, left: element.style.left, height: element.style.height, width: element.style.width, opacity: Element.getInlineOpacity(element) }; var dims =3D Element.getDimensions(element); =20 var initialMoveX, initialMoveY; var moveX, moveY; =20 switch (options.direction) { case 'top-left': initialMoveX =3D initialMoveY =3D moveX =3D moveY =3D 0;=20 break; case 'top-right': initialMoveX =3D dims.width; initialMoveY =3D moveY =3D 0; moveX =3D -dims.width; break; case 'bottom-left': initialMoveX =3D moveX =3D 0; initialMoveY =3D dims.height; moveY =3D -dims.height; break; case 'bottom-right': initialMoveX =3D dims.width; initialMoveY =3D dims.height; moveX =3D -dims.width; moveY =3D -dims.height; break; case 'center': initialMoveX =3D dims.width / 2; initialMoveY =3D dims.height / 2; moveX =3D -dims.width / 2; moveY =3D -dims.height / 2; break; } =20 return new Effect.Move(element, { x: initialMoveX, y: initialMoveY, duration: 0.01,=20 beforeSetup: function(effect) { with(Element) { hide(effect.element); makeClipping(effect.element); makePositioned(effect.element); }}, afterFinishInternal: function(effect) { new Effect.Parallel( [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from:= 0.0, transition: options.opacityTransition }), new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true,= transition: options.moveTransition }), new Effect.Scale(effect.element, 100, { scaleMode: { originalHeight: dims.height, originalWidth: dims.w= idth },=20 sync: true, scaleFrom: window.opera ? 1 : 0, transition: option= s.scaleTransition, restoreAfterFinish: true}) ], Object.extend({ beforeSetup: function(effect) { with(Element) { setStyle(effect.effects[0].element, {height: '0px'}); show(effect.effects[0].element); }}, afterFinishInternal: function(effect) { with(Element) { [undoClipping, undoPositioned].call(effect.effects[0].elemen= t);=20 setStyle(effect.effects[0].element, oldStyle); }} }, options) ) } }); } Effect.Shrink =3D function(element) { element =3D $(element); var options =3D Object.extend({ direction: 'center', moveTransistion: Effect.Transitions.sinoidal, scaleTransition: Effect.Transitions.sinoidal, opacityTransition: Effect.Transitions.none }, arguments[1] || {}); var oldStyle =3D { top: element.style.top, left: element.style.left, height: element.style.height, width: element.style.width, opacity: Element.getInlineOpacity(element) }; var dims =3D Element.getDimensions(element); var moveX, moveY; =20 switch (options.direction) { case 'top-left': moveX =3D moveY =3D 0; break; case 'top-right': moveX =3D dims.width; moveY =3D 0; break; case 'bottom-left': moveX =3D 0; moveY =3D dims.height; break; case 'bottom-right': moveX =3D dims.width; moveY =3D dims.height; break; case 'center': =20 moveX =3D dims.width / 2; moveY =3D dims.height / 2; break; } =20 return new Effect.Parallel( [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transit= ion: options.opacityTransition }), new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transit= ion: options.scaleTransition, restoreAfterFinish: true}), new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition= : options.moveTransition }) ], Object.extend({ =20 beforeStartInternal: function(effect) { with(Element) { [makePositioned, makeClipping].call(effect.effects[0].element)= }}, afterFinishInternal: function(effect) { with(Element) { [hide, undoClipping, undoPositioned].call(effect.effects[0].elem= ent); setStyle(effect.effects[0].element, oldStyle); }} }, options) ); } Effect.Pulsate =3D function(element) { element =3D $(element); var options =3D arguments[1] || {}; var oldOpacity =3D Element.getInlineOpacity(element); var transition =3D options.transition || Effect.Transitions.sinoidal; var reverser =3D function(pos){ return transition(1-Effect.Transitions.= pulse(pos)) }; reverser.bind(transition); return new Effect.Opacity(element,=20 Object.extend(Object.extend({ duration: 3.0, from: 0, afterFinishInternal: function(effect) { Element.setStyle(effect.eleme= nt, {opacity: oldOpacity}); } }, options), {transition: reverser})); } Effect.Fold =3D function(element) { element =3D $(element); var oldStyle =3D { top: element.style.top, left: element.style.left, width: element.style.width, height: element.style.height }; Element.makeClipping(element); return new Effect.Scale(element, 5, Object.extend({ =20 scaleContent: false, scaleX: false, afterFinishInternal: function(effect) { new Effect.Scale(element, 1, {=20 scaleContent: false,=20 scaleY: false, afterFinishInternal: function(effect) { with(Element) { [hide, undoClipping].call(effect.element);=20 setStyle(effect.element, oldStyle); }} }); }}, arguments[1] || {})); } ------=_NextPart_000_0000_4A1CA263.E04924BE Content-Type: text/javascript Content-Transfer-Encoding: quoted-printable Content-Location: http://www.itagsoftware.com/script/overlib/overlib.js //\///// //\ overLIB 4.21 - You may not remove or change this notice. //\ Copyright Erik Bosrup 1998-2004. All rights reserved. //\ //\ Contributors are listed on the homepage. //\ This file might be old, always check for the latest version at: //\ http://www.bosrup.com/web/overlib/ //\ //\ Please read the license agreement (available through the link above) //\ before using overLIB. Direct any licensing questions to erik@bosrup.co= m. //\ //\ Do not sell this as your own work or remove this copyright notice.=20 //\ For full details on copying or changing this script please read the //\ license agreement at the link above. Please give credit on sites that //\ use overLIB and submit changes of the script so other people can use //\ them as well. // $Revision: 1.119 $ $Date: 2005/07/02 23:41:44 $ //\///// //\mini //////// // PRE-INIT // Ignore these lines, configuration is below. //////// var olLoaded =3D 0;var pmStart =3D 10000000; var pmUpper =3D 10001000; var= pmCount =3D pmStart+1; var pmt=3D''; var pms =3D new Array(); var olInfo= =3D new Info('4.21', 1); var FREPLACE =3D 0; var FBEFORE =3D 1; var FAFTER =3D 2; var FALTERNATE =3D= 3; var FCHAIN=3D4; var olHideForm=3D0; // parameter for hiding SELECT and ActiveX elements in= IE5.5+=20 var olHautoFlag =3D 0; // flags for over-riding VAUTO and HAUTO if corresp= onding var olVautoFlag =3D 0; // positioning commands are used on the command line var hookPts =3D new Array(), postParse =3D new Array(), cmdLine =3D new Arr= ay(), runTime =3D new Array(); // for plugins registerCommands('donothing,inarray,caparray,sticky,background,noclose,capt= ion,left,right,center,offsetx,offsety,fgcolor,bgcolor,textcolor,capcolor,cl= osecolor,width,border,cellpad,status,autostatus,autostatuscap,height,closet= ext,snapx,snapy,fixx,fixy,relx,rely,fgbackground,bgbackground,padx,pady,ful= lhtml,above,below,capicon,textfont,captionfont,closefont,textsize,captionsi= ze,closesize,timeout,function,delay,hauto,vauto,closeclick,wrap,followmouse= ,mouseoff,closetitle,cssoff,compatmode,cssclass,fgclass,bgclass,textfontcla= ss,captionfontclass,closefontclass'); //////// // DEFAULT CONFIGURATION // Settings you want everywhere are set here. All of this can also be // changed on your html page or through an overLIB call. //////// if (typeof ol_fgcolor=3D=3D'undefined') var ol_fgcolor=3D"#FFFFCC"; if (typeof ol_bgcolor=3D=3D'undefined') var ol_bgcolor=3D"#1E82CA"; if (typeof ol_textcolor=3D=3D'undefined') var ol_textcolor=3D"#000000"; if (typeof ol_capcolor=3D=3D'undefined') var ol_capcolor=3D"#FFFFFF"; if (typeof ol_closecolor=3D=3D'undefined') var ol_closecolor=3D"#9999FF"; if (typeof ol_textfont=3D=3D'undefined') var ol_textfont=3D"Verdana,Arial,H= elvetica"; if (typeof ol_captionfont=3D=3D'undefined') var ol_captionfont=3D"Verdana,A= rial,Helvetica"; if (typeof ol_closefont=3D=3D'undefined') var ol_closefont=3D"Verdana,Arial= ,Helvetica"; if (typeof ol_textsize=3D=3D'undefined') var ol_textsize=3D"1"; if (typeof ol_captionsize=3D=3D'undefined') var ol_captionsize=3D"1"; if (typeof ol_closesize=3D=3D'undefined') var ol_closesize=3D"1"; if (typeof ol_width=3D=3D'undefined') var ol_width=3D"200"; if (typeof ol_border=3D=3D'undefined') var ol_border=3D"1"; if (typeof ol_cellpad=3D=3D'undefined') var ol_cellpad=3D2; if (typeof ol_offsetx=3D=3D'undefined') var ol_offsetx=3D10; if (typeof ol_offsety=3D=3D'undefined') var ol_offsety=3D10; if (typeof ol_text=3D=3D'undefined') var ol_text=3D"Default Text"; if (typeof ol_cap=3D=3D'undefined') var ol_cap=3D""; if (typeof ol_sticky=3D=3D'undefined') var ol_sticky=3D0; if (typeof ol_background=3D=3D'undefined') var ol_background=3D""; if (typeof ol_close=3D=3D'undefined') var ol_close=3D"Close"; if (typeof ol_hpos=3D=3D'undefined') var ol_hpos=3DRIGHT; if (typeof ol_status=3D=3D'undefined') var ol_status=3D""; if (typeof ol_autostatus=3D=3D'undefined') var ol_autostatus=3D0; if (typeof ol_height=3D=3D'undefined') var ol_height=3D-1; if (typeof ol_snapx=3D=3D'undefined') var ol_snapx=3D0; if (typeof ol_snapy=3D=3D'undefined') var ol_snapy=3D0; if (typeof ol_fixx=3D=3D'undefined') var ol_fixx=3D-1; if (typeof ol_fixy=3D=3D'undefined') var ol_fixy=3D-1; if (typeof ol_relx=3D=3D'undefined') var ol_relx=3Dnull; if (typeof ol_rely=3D=3D'undefined') var ol_rely=3Dnull; if (typeof ol_fgbackground=3D=3D'undefined') var ol_fgbackground=3D""; if (typeof ol_bgbackground=3D=3D'undefined') var ol_bgbackground=3D""; if (typeof ol_padxl=3D=3D'undefined') var ol_padxl=3D1; if (typeof ol_padxr=3D=3D'undefined') var ol_padxr=3D1; if (typeof ol_padyt=3D=3D'undefined') var ol_padyt=3D1; if (typeof ol_padyb=3D=3D'undefined') var ol_padyb=3D1; if (typeof ol_fullhtml=3D=3D'undefined') var ol_fullhtml=3D0; if (typeof ol_vpos=3D=3D'undefined') var ol_vpos=3DBELOW; if (typeof ol_aboveheight=3D=3D'undefined') var ol_aboveheight=3D0; if (typeof ol_capicon=3D=3D'undefined') var ol_capicon=3D""; if (typeof ol_frame=3D=3D'undefined') var ol_frame=3Dself; if (typeof ol_timeout=3D=3D'undefined') var ol_timeout=3D0; if (typeof ol_function=3D=3D'undefined') var ol_function=3Dnull; if (typeof ol_delay=3D=3D'undefined') var ol_delay=3D0; if (typeof ol_hauto=3D=3D'undefined') var ol_hauto=3D0; if (typeof ol_vauto=3D=3D'undefined') var ol_vauto=3D0; if (typeof ol_closeclick=3D=3D'undefined') var ol_closeclick=3D0; if (typeof ol_wrap=3D=3D'undefined') var ol_wrap=3D0; if (typeof ol_followmouse=3D=3D'undefined') var ol_followmouse=3D1; if (typeof ol_mouseoff=3D=3D'undefined') var ol_mouseoff=3D0; if (typeof ol_closetitle=3D=3D'undefined') var ol_closetitle=3D'Close'; if (typeof ol_compatmode=3D=3D'undefined') var ol_compatmode=3D0; if (typeof ol_css=3D=3D'undefined') var ol_css=3DCSSOFF; if (typeof ol_fgclass=3D=3D'undefined') var ol_fgclass=3D""; if (typeof ol_bgclass=3D=3D'undefined') var ol_bgclass=3D""; if (typeof ol_textfontclass=3D=3D'undefined') var ol_textfontclass=3D""; if (typeof ol_captionfontclass=3D=3D'undefined') var ol_captionfontclass=3D= ""; if (typeof ol_closefontclass=3D=3D'undefined') var ol_closefontclass=3D""; //////// // ARRAY CONFIGURATION //////// // You can use these arrays to store popup text here instead of in the html. if (typeof ol_texts=3D=3D'undefined') var ol_texts =3D new Array("Text 0",= "Text 1"); if (typeof ol_caps=3D=3D'undefined') var ol_caps =3D new Array("Caption 0",= "Caption 1"); //////// // END OF CONFIGURATION // Don't change anything below this line, all configuration is above. //////// //////// // INIT //////// // Runtime variables init. Don't change for config! var o3_text=3D""; var o3_cap=3D""; var o3_sticky=3D0; var o3_background=3D""; var o3_close=3D"Close"; var o3_hpos=3DRIGHT; var o3_offsetx=3D2; var o3_offsety=3D2; var o3_fgcolor=3D""; var o3_bgcolor=3D""; var o3_textcolor=3D""; var o3_capcolor=3D""; var o3_closecolor=3D""; var o3_width=3D100; var o3_border=3D1; var o3_cellpad=3D2; var o3_status=3D""; var o3_autostatus=3D0; var o3_height=3D-1; var o3_snapx=3D0; var o3_snapy=3D0; var o3_fixx=3D-1; var o3_fixy=3D-1; var o3_relx=3Dnull; var o3_rely=3Dnull; var o3_fgbackground=3D""; var o3_bgbackground=3D""; var o3_padxl=3D0; var o3_padxr=3D0; var o3_padyt=3D0; var o3_padyb=3D0; var o3_fullhtml=3D0; var o3_vpos=3DBELOW; var o3_aboveheight=3D0; var o3_capicon=3D""; var o3_textfont=3D"Verdana,Arial,Helvetica"; var o3_captionfont=3D"Verdana,Arial,Helvetica"; var o3_closefont=3D"Verdana,Arial,Helvetica"; var o3_textsize=3D"1"; var o3_captionsize=3D"1"; var o3_closesize=3D"1"; var o3_frame=3Dself; var o3_timeout=3D0; var o3_timerid=3D0; var o3_allowmove=3D0; var o3_function=3Dnull;=20 var o3_delay=3D0; var o3_delayid=3D0; var o3_hauto=3D0; var o3_vauto=3D0; var o3_closeclick=3D0; var o3_wrap=3D0; var o3_followmouse=3D1; var o3_mouseoff=3D0; var o3_closetitle=3D''; var o3_compatmode=3D0; var o3_css=3DCSSOFF; var o3_fgclass=3D""; var o3_bgclass=3D""; var o3_textfontclass=3D""; var o3_captionfontclass=3D""; var o3_closefontclass=3D""; // Display state variables var o3_x =3D 0; var o3_y =3D 0; var o3_showingsticky =3D 0; var o3_removecounter =3D 0; // Our layer var over =3D null; var fnRef, hoveringSwitch =3D false; var olHideDelay; // Decide browser version var isMac =3D (navigator.userAgent.indexOf("Mac") !=3D -1); var olOp =3D (navigator.userAgent.toLowerCase().indexOf('opera') > -1 && do= cument.createTextNode); // Opera 7 var olNs4 =3D (navigator.appName=3D=3D'Netscape' && parseInt(navigator.appV= ersion) =3D=3D 4); var olNs6 =3D (document.getElementById) ? true : false; var olKq =3D (olNs6 && /konqueror/i.test(navigator.userAgent)); var olIe4 =3D (document.all) ? true : false; var olIe5 =3D false;=20 var olIe55 =3D false; // Added additional variable to identify IE5.5+ var docRoot =3D 'document.body'; // Resize fix for NS4.x to keep track of layer if (olNs4) { var oW =3D window.innerWidth; var oH =3D window.innerHeight; window.onresize =3D function() { if (oW !=3D window.innerWidth || oH !=3D= window.innerHeight) location.reload(); } } // Microsoft Stupidity Check(tm). if (olIe4) { var agent =3D navigator.userAgent; if (/MSIE/.test(agent)) { var versNum =3D parseFloat(agent.match(/MSIE[ ](\d\.\d+)\.*/i)[1]); if (versNum >=3D 5){ olIe5=3Dtrue; olIe55=3D(versNum>=3D5.5&&!olOp) ? true : false; if (olNs6) olNs6=3Dfalse; } } if (olNs6) olIe4 =3D false; } // Check for compatability mode. if (document.compatMode && document.compatMode =3D=3D 'CSS1Compat') { docRoot=3D ((olIe4 && !olOp) ? 'document.documentElement' : docRoot); } // Add window onload handlers to indicate when all modules have been loaded // For Netscape 6+ and Mozilla, uses addEventListener method on the window= object // For IE it uses the attachEvent method of the window object and for Netsc= ape 4.x // it sets the window.onload handler to the OLonload_handler function for= Bubbling if(window.addEventListener) window.addEventListener("load",OLonLoad_handler= ,false); else if (window.attachEvent) window.attachEvent("onload",OLonLoad_handler); var capExtent; //////// // PUBLIC FUNCTIONS //////// // overlib(arg0,...,argN) // Loads parameters into global runtime variables. function overlib() { if (!olLoaded || isExclusive(overlib.arguments)) return true; if (olCheckMouseCapture) olMouseCapture(); if (over) { over =3D (typeof over.id !=3D 'string') ? o3_frame.document.all['overDiv'= ] : over; cClick(); } // Load defaults to runtime. olHideDelay=3D0; o3_text=3Dol_text; o3_cap=3Dol_cap; o3_sticky=3Dol_sticky; o3_background=3Dol_background; o3_close=3Dol_close; o3_hpos=3Dol_hpos; o3_offsetx=3Dol_offsetx; o3_offsety=3Dol_offsety; o3_fgcolor=3Dol_fgcolor; o3_bgcolor=3Dol_bgcolor; o3_textcolor=3Dol_textcolor; o3_capcolor=3Dol_capcolor; o3_closecolor=3Dol_closecolor; o3_width=3Dol_width; o3_border=3Dol_border; o3_cellpad=3Dol_cellpad; o3_status=3Dol_status; o3_autostatus=3Dol_autostatus; o3_height=3Dol_height; o3_snapx=3Dol_snapx; o3_snapy=3Dol_snapy; o3_fixx=3Dol_fixx; o3_fixy=3Dol_fixy; o3_relx=3Dol_relx; o3_rely=3Dol_rely; o3_fgbackground=3Dol_fgbackground; o3_bgbackground=3Dol_bgbackground; o3_padxl=3Dol_padxl; o3_padxr=3Dol_padxr; o3_padyt=3Dol_padyt; o3_padyb=3Dol_padyb; o3_fullhtml=3Dol_fullhtml; o3_vpos=3Dol_vpos; o3_aboveheight=3Dol_aboveheight; o3_capicon=3Dol_capicon; o3_textfont=3Dol_textfont; o3_captionfont=3Dol_captionfont; o3_closefont=3Dol_closefont; o3_textsize=3Dol_textsize; o3_captionsize=3Dol_captionsize; o3_closesize=3Dol_closesize; o3_timeout=3Dol_timeout; o3_function=3Dol_function; o3_delay=3Dol_delay; o3_hauto=3Dol_hauto; o3_vauto=3Dol_vauto; o3_closeclick=3Dol_closeclick; o3_wrap=3Dol_wrap;=09 o3_followmouse=3Dol_followmouse; o3_mouseoff=3Dol_mouseoff; o3_closetitle=3Dol_closetitle; o3_css=3Dol_css; o3_compatmode=3Dol_compatmode; o3_fgclass=3Dol_fgclass; o3_bgclass=3Dol_bgclass; o3_textfontclass=3Dol_textfontclass; o3_captionfontclass=3Dol_captionfontclass; o3_closefontclass=3Dol_closefontclass; =09 setRunTimeVariables(); =09 fnRef =3D ''; =09 // Special for frame support, over must be reset... o3_frame =3D ol_frame; =09 if(!(over=3DcreateDivContainer())) return false; parseTokens('o3_', overlib.arguments); if (!postParseChecks()) return false; if (o3_delay =3D=3D 0) { return runHook("olMain", FREPLACE); } else { o3_delayid =3D setTimeout("runHook('olMain', FREPLACE)", o3_delay); return false; } } // Clears popups if appropriate function nd(time) { if (olLoaded && !isExclusive()) { hideDelay(time); // delay popup close if time specified if (o3_removecounter >=3D 1) { o3_showingsticky =3D 0 }; =09 if (o3_showingsticky =3D=3D 0) { o3_allowmove =3D 0; if (over !=3D null && o3_timerid =3D=3D 0) runHook("hideObject", FREPLAC= E, over); } else { o3_removecounter++; } } =09 return true; } // The Close onMouseOver function for stickies function cClick() { if (olLoaded) { runHook("hideObject", FREPLACE, over); o3_showingsticky =3D 0;=09 }=09 return false; } // Method for setting page specific defaults. function overlib_pagedefaults() { parseTokens('ol_', overlib_pagedefaults.arguments); } //////// // OVERLIB MAIN FUNCTION //////// // This function decides what it is we want to display and how we want it= done. function olMain() { var layerhtml, styleType; runHook("olMain", FBEFORE); =09 if (o3_background!=3D"" || o3_fullhtml) { // Use background instead of box. layerhtml =3D runHook('ol_content_background', FALTERNATE, o3_css, o3_tex= t, o3_background, o3_fullhtml); } else { // They want a popup box. styleType =3D (pms[o3_css-1-pmStart] =3D=3D "cssoff" || pms[o3_css-1-pmSt= art] =3D=3D "cssclass"); // Prepare popup background if (o3_fgbackground !=3D "") o3_fgbackground =3D "background=3D\""+o3_fgb= ackground+"\""; if (o3_bgbackground !=3D "") o3_bgbackground =3D (styleType ? "background= =3D\""+o3_bgbackground+"\"" : o3_bgbackground); // Prepare popup colors if (o3_fgcolor !=3D "") o3_fgcolor =3D (styleType ? "bgcolor=3D\""+o3_fgc= olor+"\"" : o3_fgcolor); if (o3_bgcolor !=3D "") o3_bgcolor =3D (styleType ? "bgcolor=3D\""+o3_bgc= olor+"\"" : o3_bgcolor); // Prepare popup height if (o3_height > 0) o3_height =3D (styleType ? "height=3D\""+o3_height+"\"= " : o3_height); else o3_height =3D ""; // Decide which kinda box. if (o3_cap=3D=3D"") { // Plain layerhtml =3D runHook('ol_content_simple', FALTERNATE, o3_css, o3_text); } else { // With caption if (o3_sticky) { // Show close text layerhtml =3D runHook('ol_content_caption', FALTERNATE, o3_css, o3_text= , o3_cap, o3_close); } else { // No close text layerhtml =3D runHook('ol_content_caption', FALTERNATE, o3_css, o3_text= , o3_cap, ""); } } }=09 // We want it to stick! if (o3_sticky) { if (o3_timerid > 0) { clearTimeout(o3_timerid); o3_timerid =3D 0; } o3_showingsticky =3D 1; o3_removecounter =3D 0; } // Created a separate routine to generate the popup to make it easier // to implement a plugin capability if (!runHook("createPopup", FREPLACE, layerhtml)) return false; // Prepare status bar if (o3_autostatus > 0) { o3_status =3D o3_text; if (o3_autostatus > 1) o3_status =3D o3_cap; } // When placing the layer the first time, even stickies may be moved. o3_allowmove =3D 0; // Initiate a timer for timeout if (o3_timeout > 0) { =20 if (o3_timerid > 0) clearTimeout(o3_timerid); o3_timerid =3D setTimeout("cClick()", o3_timeout); } // Show layer runHook("disp", FREPLACE, o3_status); runHook("olMain", FAFTER); return (olOp && event && event.type =3D=3D 'mouseover' && !o3_status) ? ''= : (o3_status !=3D ''); } //////// // LAYER GENERATION FUNCTIONS //////// // These functions just handle popup content with tags that should adhere= to the W3C standards specification. // Makes simple table without caption function ol_content_simple(text) { var cpIsMultiple =3D /,/.test(o3_cellpad); var txt =3D '
' : ((!olNs4&&cpIsMultiple) ? ' style=3D"= '+setCellPadStr(o3_cellpad)+'">' : '>'))+(o3_textfontclass ? '' : wrapStr(0= ,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize))= +'
'; set_background(""); return txt; } // Makes table with caption and optional close link function ol_content_caption(text,title,close) { var nameId, txt, cpIsMultiple =3D /,/.test(o3_cellpad); var closing, closeevent; closing =3D ""; closeevent =3D "onmouseover"; if (o3_closeclick =3D=3D 1) closeevent =3D (o3_closetitle ? "title=3D'" += o3_closetitle +"'" : "") + " onclick"; if (o3_capicon !=3D "") { nameId =3D ' hspace =3D \"5\"'+' align =3D \"middle\" alt =3D \"\"'; if (typeof o3_dragimg !=3D 'undefined' && o3_dragimg) nameId =3D' hspace= =3D\"5\"'+' name=3D\"'+o3_dragimg+'\" id=3D\"'+o3_dragimg+'\" align=3D\"mid= dle\" alt=3D\"Drag Enabled\" title=3D\"Drag Enabled\"'; o3_capicon =3D ''; } if (close !=3D "") closing =3D ''+(o3_c= losefontclass ? '' : wrapStr(0,o3_closesize,'close'))+close+(o3_closefontcl= ass ? '' : wrapStr(1,o3_closesize,'close'))+''; txt =3D ''; set_background(""); return txt; } // Sets the background picture,padding and lots more. :) function ol_content_background(text,picture,hasfullhtml) { if (hasfullhtml) { txt=3Dtext; } else { txt=3D'
' : '>')+(o3_captionfontclass ?= '' : ''+wrapStr(0,o3_captionsize,'caption'))+o3_capicon+title+(o3_capti= onfontclass ? '' : wrapStr(1,o3_captionsize)+'')+''+closing+'=
= ' :((!olNs4&&cpIsMultiple) ? ' style=3D"'+setCellPadStr(o3_cellpad)+'">' := '>'))+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_tex= tfontclass ? '' : wrapStr(1,o3_textsize)) + '
'+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,= 'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize))+'
'; } set_background(picture); return txt; } // Loads a picture into the div. function set_background(pic) { if (pic =3D=3D "") { if (olNs4) { over.background.src =3D null;=20 } else if (over.style) { over.style.backgroundImage =3D "none"; } } else { if (olNs4) { over.background.src =3D pic; } else if (over.style) { over.style.width=3Do3_width + 'px'; over.style.backgroundImage =3D "url("+pic+")"; } } } //////// // HANDLING FUNCTIONS //////// var olShowId=3D-1; // Displays the popup function disp(statustext) { runHook("disp", FBEFORE); =09 if (o3_allowmove =3D=3D 0) { runHook("placeLayer", FREPLACE); (olNs6&&olShowId<0) ? olShowId=3DsetTimeout("runHook('showObject', FREPLA= CE, over)", 1) : runHook("showObject", FREPLACE, over); o3_allowmove =3D (o3_sticky || o3_followmouse=3D=3D0) ? 0 : 1; } =09 runHook("disp", FAFTER); if (statustext !=3D "") self.status =3D statustext; } // Creates the actual popup structure function createPopup(lyrContent){ runHook("createPopup", FBEFORE); =09 if (o3_wrap) { var wd,ww,theObj =3D (olNs4 ? over : over.style); theObj.top =3D theObj.left =3D ((olIe4&&!olOp) ? 0 : -10000) + (!olNs4 ?= 'px' : 0); layerWrite(lyrContent); wd =3D (olNs4 ? over.clip.width : over.offsetWidth); if (wd > (ww=3DwindowWidth())) { lyrContent=3DlyrContent.replace(/\ /g, ' '); o3_width=3Dww; o3_wrap=3D0; }=20 } layerWrite(lyrContent); =09 // Have to set o3_width for placeLayer() routine if o3_wrap is turned on if (o3_wrap) o3_width=3D(olNs4 ? over.clip.width : over.offsetWidth); =09 runHook("createPopup", FAFTER, lyrContent); return true; } // Decides where we want the popup. function placeLayer() { var placeX, placeY, widthFix =3D 0; =09 // HORIZONTAL PLACEMENT, re-arranged to work in Safari if (o3_frame.innerWidth) widthFix=3D18;=20 iwidth =3D windowWidth(); // Horizontal scroll offset winoffset=3D(olIe4) ? eval('o3_frame.'+docRoot+'.scrollLeft') : o3_frame.p= ageXOffset; placeX =3D runHook('horizontalPlacement',FCHAIN,iwidth,winoffset,widthFix); // VERTICAL PLACEMENT, re-arranged to work in Safari if (o3_frame.innerHeight) { iheight=3Do3_frame.innerHeight; } else if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".cl= ientHeight=3D=3D'number'")&&eval('o3_frame.'+docRoot+'.clientHeight')) {=20 iheight=3Deval('o3_frame.'+docRoot+'.clientHeight'); } =09 // Vertical scroll offset scrolloffset=3D(olIe4) ? eval('o3_frame.'+docRoot+'.scrollTop') : o3_frame= .pageYOffset; placeY =3D runHook('verticalPlacement',FCHAIN,iheight,scrolloffset); // Actually move the object. repositionTo(over, placeX, placeY); } // Moves the layer function olMouseMove(e) { var e =3D (e) ? e : event; if (e.pageX) { o3_x =3D e.pageX; o3_y =3D e.pageY; } else if (e.clientX) { o3_x =3D eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft'); o3_y =3D eval('e.clientY+o3_frame.'+docRoot+'.scrollTop'); } =09 if (o3_allowmove =3D=3D 1) runHook("placeLayer", FREPLACE); // MouseOut handler if (hoveringSwitch && !olNs4 && runHook("cursorOff", FREPLACE)) { (olHideDelay ? hideDelay(olHideDelay) : cClick()); hoveringSwitch =3D !hoveringSwitch; } } // Fake function for 3.0 users. function no_overlib() { return ver3fix; } // Capture the mouse and chain other scripts. function olMouseCapture() { capExtent =3D document; var fN, str =3D '', l, k, f, wMv, sS, mseHandler =3D olMouseMove; var re =3D /function[ ]*(\w*)\(/; =09 wMv =3D (!olIe4 && window.onmousemove); if (document.onmousemove || wMv) { if (wMv) capExtent =3D window; f =3D capExtent.onmousemove.toString(); fN =3D f.match(re); if (fN =3D=3D null) { str =3D f+'(e); '; } else if (fN[1] =3D=3D 'anonymous' || fN[1] =3D=3D 'olMouseMove' || (wMv= && fN[1] =3D=3D 'onmousemove')) { if (!olOp && wMv) { l =3D f.indexOf('{')+1; k =3D f.lastIndexOf('}'); sS =3D f.substring(l,k); if ((l =3D sS.indexOf('(')) !=3D -1) { sS =3D sS.substring(0,l).replace(/^\s+/,'').replace(/\s+$/,''); if (eval("typeof " + sS + " =3D=3D 'undefined'")) window.onmousemove= =3D null; else str =3D sS + '(e);'; } } if (!str) { olCheckMouseCapture =3D false; return; } } else { if (fN[1]) str =3D fN[1]+'(e); '; else { l =3D f.indexOf('{')+1; k =3D f.lastIndexOf('}'); str =3D f.substring(l,k) + '\n'; } } str +=3D 'olMouseMove(e); '; mseHandler =3D new Function('e', str); } capExtent.onmousemove =3D mseHandler; if (olNs4) capExtent.captureEvents(Event.MOUSEMOVE); } //////// // PARSING FUNCTIONS //////// // Does the actual command parsing. function parseTokens(pf, ar) { // What the next argument is expected to be. var v, i, mode=3D-1, par =3D (pf !=3D 'ol_');=09 var fnMark =3D (par && !ar.length ? 1 : 0); for (i =3D 0; i < ar.length; i++) { if (mode < 0) { // Arg is maintext,unless its a number between pmStart and pmUpper // then its a command. if (typeof ar[i] =3D=3D 'number' && ar[i] > pmStart && ar[i] < pmUpper) { fnMark =3D (par ? 1 : 0); i--; // backup one so that the next block can parse it } else { switch(pf) { case 'ol_': ol_text =3D ar[i].toString(); break; default: o3_text=3Dar[i].toString(); =20 } } mode =3D 0; } else { // Note: NS4 doesn't like switch cases with vars. if (ar[i] >=3D pmCount || ar[i]=3D=3DDONOTHING) { continue; } if (ar[i]=3D=3DINARRAY) { fnMark =3D 0; eval(pf+'text=3Dol_texts['+ar[++= i]+'].toString()'); continue; } if (ar[i]=3D=3DCAPARRAY) { eval(pf+'cap=3Dol_caps['+ar[++i]+'].toString(= )'); continue; } if (ar[i]=3D=3DSTICKY) { if (pf!=3D'ol_') eval(pf+'sticky=3D1'); continu= e; } if (ar[i]=3D=3DBACKGROUND) { eval(pf+'background=3D"'+ar[++i]+'"'); cont= inue; } if (ar[i]=3D=3DNOCLOSE) { if (pf!=3D'ol_') opt_NOCLOSE(); continue; } if (ar[i]=3D=3DCAPTION) { eval(pf+"cap=3D'"+escSglQuote(ar[++i])+"'");= continue; } if (ar[i]=3D=3DCENTER || ar[i]=3D=3DLEFT || ar[i]=3D=3DRIGHT) { eval(pf+= 'hpos=3D'+ar[i]); if(pf!=3D'ol_') olHautoFlag=3D1; continue; } if (ar[i]=3D=3DOFFSETX) { eval(pf+'offsetx=3D'+ar[++i]); continue; } if (ar[i]=3D=3DOFFSETY) { eval(pf+'offsety=3D'+ar[++i]); continue; } if (ar[i]=3D=3DFGCOLOR) { eval(pf+'fgcolor=3D"'+ar[++i]+'"'); continue; } if (ar[i]=3D=3DBGCOLOR) { eval(pf+'bgcolor=3D"'+ar[++i]+'"'); continue; } if (ar[i]=3D=3DTEXTCOLOR) { eval(pf+'textcolor=3D"'+ar[++i]+'"'); contin= ue; } if (ar[i]=3D=3DCAPCOLOR) { eval(pf+'capcolor=3D"'+ar[++i]+'"'); continue= ; } if (ar[i]=3D=3DCLOSECOLOR) { eval(pf+'closecolor=3D"'+ar[++i]+'"'); cont= inue; } if (ar[i]=3D=3DWIDTH) { eval(pf+'width=3D'+ar[++i]); continue; } if (ar[i]=3D=3DBORDER) { eval(pf+'border=3D'+ar[++i]); continue; } if (ar[i]=3D=3DCELLPAD) { i=3Dopt_MULTIPLEARGS(++i,ar,(pf+'cellpad'));= continue; } if (ar[i]=3D=3DSTATUS) { eval(pf+"status=3D'"+escSglQuote(ar[++i])+"'");= continue; } if (ar[i]=3D=3DAUTOSTATUS) { eval(pf +'autostatus=3D('+pf+'autostatus = =3D=3D 1) ? 0 : 1'); continue; } if (ar[i]=3D=3DAUTOSTATUSCAP) { eval(pf +'autostatus=3D('+pf+'autostatus= =3D=3D 2) ? 0 : 2'); continue; } if (ar[i]=3D=3DHEIGHT) { eval(pf+'height=3D'+pf+'aboveheight=3D'+ar[++i]= ); continue; } // Same param again. if (ar[i]=3D=3DCLOSETEXT) { eval(pf+"close=3D'"+escSglQuote(ar[++i])+"'"= ); continue; } if (ar[i]=3D=3DSNAPX) { eval(pf+'snapx=3D'+ar[++i]); continue; } if (ar[i]=3D=3DSNAPY) { eval(pf+'snapy=3D'+ar[++i]); continue; } if (ar[i]=3D=3DFIXX) { eval(pf+'fixx=3D'+ar[++i]); continue; } if (ar[i]=3D=3DFIXY) { eval(pf+'fixy=3D'+ar[++i]); continue; } if (ar[i]=3D=3DRELX) { eval(pf+'relx=3D'+ar[++i]); continue; } if (ar[i]=3D=3DRELY) { eval(pf+'rely=3D'+ar[++i]); continue; } if (ar[i]=3D=3DFGBACKGROUND) { eval(pf+'fgbackground=3D"'+ar[++i]+'"');= continue; } if (ar[i]=3D=3DBGBACKGROUND) { eval(pf+'bgbackground=3D"'+ar[++i]+'"');= continue; } if (ar[i]=3D=3DPADX) { eval(pf+'padxl=3D'+ar[++i]); eval(pf+'padxr=3D'+a= r[++i]); continue; } if (ar[i]=3D=3DPADY) { eval(pf+'padyt=3D'+ar[++i]); eval(pf+'padyb=3D'+a= r[++i]); continue; } if (ar[i]=3D=3DFULLHTML) { if (pf!=3D'ol_') eval(pf+'fullhtml=3D1'); con= tinue; } if (ar[i]=3D=3DBELOW || ar[i]=3D=3DABOVE) { eval(pf+'vpos=3D'+ar[i]); if= (pf!=3D'ol_') olVautoFlag=3D1; continue; } if (ar[i]=3D=3DCAPICON) { eval(pf+'capicon=3D"'+ar[++i]+'"'); continue; } if (ar[i]=3D=3DTEXTFONT) { eval(pf+"textfont=3D'"+escSglQuote(ar[++i])+"= '"); continue; } if (ar[i]=3D=3DCAPTIONFONT) { eval(pf+"captionfont=3D'"+escSglQuote(ar[+= +i])+"'"); continue; } if (ar[i]=3D=3DCLOSEFONT) { eval(pf+"closefont=3D'"+escSglQuote(ar[++i])= +"'"); continue; } if (ar[i]=3D=3DTEXTSIZE) { eval(pf+'textsize=3D"'+ar[++i]+'"'); continue= ; } if (ar[i]=3D=3DCAPTIONSIZE) { eval(pf+'captionsize=3D"'+ar[++i]+'"'); co= ntinue; } if (ar[i]=3D=3DCLOSESIZE) { eval(pf+'closesize=3D"'+ar[++i]+'"'); contin= ue; } if (ar[i]=3D=3DTIMEOUT) { eval(pf+'timeout=3D'+ar[++i]); continue; } if (ar[i]=3D=3DFUNCTION) { if (pf=3D=3D'ol_') { if (typeof ar[i+1]!=3D'n= umber') { v=3Dar[++i]; ol_function=3D(typeof v=3D=3D'function' ? v : null);= }} else {fnMark =3D 0; v =3D null; if (typeof ar[i+1]!=3D'number') v =3D= ar[++i]; opt_FUNCTION(v); } continue; } if (ar[i]=3D=3DDELAY) { eval(pf+'delay=3D'+ar[++i]); continue; } if (ar[i]=3D=3DHAUTO) { eval(pf+'hauto=3D('+pf+'hauto =3D=3D 0) ? 1 : 0'= ); continue; } if (ar[i]=3D=3DVAUTO) { eval(pf+'vauto=3D('+pf+'vauto =3D=3D 0) ? 1 : 0'= ); continue; } if (ar[i]=3D=3DCLOSECLICK) { eval(pf +'closeclick=3D('+pf+'closeclick = =3D=3D 0) ? 1 : 0'); continue; } if (ar[i]=3D=3DWRAP) { eval(pf +'wrap=3D('+pf+'wrap =3D=3D 0) ? 1 : 0');= continue; } if (ar[i]=3D=3DFOLLOWMOUSE) { eval(pf +'followmouse=3D('+pf+'followmouse= =3D=3D 1) ? 0 : 1'); continue; } if (ar[i]=3D=3DMOUSEOFF) { eval(pf +'mouseoff=3D('+pf+'mouseoff=3D=3D0)= ? 1 : 0'); v=3Dar[i+1]; if (pf !=3D 'ol_' && eval(pf+'mouseoff') && typeof= v =3D=3D 'number' && (v < pmStart || v > pmUpper)) olHideDelay=3Dar[++i];= continue; } if (ar[i]=3D=3DCLOSETITLE) { eval(pf+"closetitle=3D'"+escSglQuote(ar[++i= ])+"'"); continue; } if (ar[i]=3D=3DCSSOFF||ar[i]=3D=3DCSSCLASS) { eval(pf+'css=3D'+ar[i]);= continue; } if (ar[i]=3D=3DCOMPATMODE) { eval(pf+'compatmode=3D('+pf+'compatmode=3D= =3D0) ? 1 : 0'); continue; } if (ar[i]=3D=3DFGCLASS) { eval(pf+'fgclass=3D"'+ar[++i]+'"'); continue; } if (ar[i]=3D=3DBGCLASS) { eval(pf+'bgclass=3D"'+ar[++i]+'"'); continue; } if (ar[i]=3D=3DTEXTFONTCLASS) { eval(pf+'textfontclass=3D"'+ar[++i]+'"')= ; continue; } if (ar[i]=3D=3DCAPTIONFONTCLASS) { eval(pf+'captionfontclass=3D"'+ar[++i= ]+'"'); continue; } if (ar[i]=3D=3DCLOSEFONTCLASS) { eval(pf+'closefontclass=3D"'+ar[++i]+'"= '); continue; } i =3D parseCmdLine(pf, i, ar); } } if (fnMark && o3_function) o3_text =3D o3_function(); =09 if ((pf =3D=3D 'o3_') && o3_wrap) { o3_width =3D 0; =09 var tReg=3D/<.*\n*>/ig; if (!tReg.test(o3_text)) o3_text =3D o3_text.replace(/[ ]+/g, ' '); if (!tReg.test(o3_cap))o3_cap =3D o3_cap.replace(/[ ]+/g, ' '); } if ((pf =3D=3D 'o3_') && o3_sticky) { if (!o3_close && (o3_frame !=3D ol_frame)) o3_close =3D ol_close; if (o3_mouseoff && (o3_frame =3D=3D ol_frame)) opt_NOCLOSE(' '); } } //////// // LAYER FUNCTIONS //////// // Writes to a layer function layerWrite(txt) { txt +=3D "\n"; if (olNs4) { var lyr =3D o3_frame.document.layers['overDiv'].document lyr.write(txt) lyr.close() } else if (typeof over.innerHTML !=3D 'undefined') { if (olIe5 && isMac) over.innerHTML =3D ''; over.innerHTML =3D txt; } else { range =3D o3_frame.document.createRange(); range.setStartAfter(over); domfrag =3D range.createContextualFragment(txt); =09 while (over.hasChildNodes()) { over.removeChild(over.lastChild); } =09 over.appendChild(domfrag); } } // Make an object visible function showObject(obj) { runHook("showObject", FBEFORE); var theObj=3D(olNs4 ? obj : obj.style); theObj.visibility =3D 'visible'; runHook("showObject", FAFTER); } // Hides an object function hideObject(obj) { runHook("hideObject", FBEFORE); var theObj=3D(olNs4 ? obj : obj.style); if (olNs6 && olShowId>0) { clearTimeout(olShowId); olShowId=3D0; } theObj.visibility =3D 'hidden'; theObj.top =3D theObj.left =3D ((olIe4&&!olOp) ? 0 : -10000) + (!olNs4 ?= 'px' : 0); if (o3_timerid > 0) clearTimeout(o3_timerid); if (o3_delayid > 0) clearTimeout(o3_delayid); o3_timerid =3D 0; o3_delayid =3D 0; self.status =3D ""; if (obj.onmouseout||obj.onmouseover) { if (olNs4) obj.releaseEvents(Event.MOUSEOUT || Event.MOUSEOVER); obj.onmouseout =3D obj.onmouseover =3D null; } runHook("hideObject", FAFTER); } // Move a layer function repositionTo(obj, xL, yL) { var theObj=3D(olNs4 ? obj : obj.style); theObj.left =3D xL + (!olNs4 ? 'px' : 0); theObj.top =3D yL + (!olNs4 ? 'px' : 0); } // Check position of cursor relative to overDiv DIVision; mouseOut function function cursorOff() { var left =3D parseInt(over.style.left); var top =3D parseInt(over.style.top); var right =3D left + (over.offsetWidth >=3D parseInt(o3_width) ? over.offs= etWidth : parseInt(o3_width)); var bottom =3D top + (over.offsetHeight >=3D o3_aboveheight ? over.offsetH= eight : o3_aboveheight); if (o3_x < left || o3_x > right || o3_y < top || o3_y > bottom) return tru= e; return false; } //////// // COMMAND FUNCTIONS //////// // Calls callme or the default function. function opt_FUNCTION(callme) { o3_text =3D (callme ? (typeof callme=3D=3D'string' ? (/.+\(.*\)/.test(call= me) ? eval(callme) : callme) : callme()) : (o3_function ? o3_function() := 'No Function')); return 0; } // Handle hovering function opt_NOCLOSE(unused) { if (!unused) o3_close =3D ""; if (olNs4) { over.captureEvents(Event.MOUSEOUT || Event.MOUSEOVER); over.onmouseover =3D function () { if (o3_timerid > 0) { clearTimeout(o3_= timerid); o3_timerid =3D 0; } } over.onmouseout =3D function (e) { if (olHideDelay) hideDelay(olHideDelay= ); else cClick(e); } } else { over.onmouseover =3D function () {hoveringSwitch =3D true; if (o3_timerid= > 0) { clearTimeout(o3_timerid); o3_timerid =3D0; } } } return 0; } // Function to scan command line arguments for multiples function opt_MULTIPLEARGS(i, args, parameter) { var k=3Di, re, pV, str=3D''; for(k=3Di; kpmStart) break; str +=3D args[k] + ','; } if (str) str =3D str.substring(0,--str.length); k--; // reduce by one so the for loop this is in works correctly pV=3D(olNs4 && /cellpad/i.test(parameter)) ? str.split(',')[0] : str; eval(parameter + '=3D"' + pV + '"'); return k; } // Remove   in texts when done. function nbspCleanup() { if (o3_wrap) { o3_text =3D o3_text.replace(/\ /g, ' '); o3_cap =3D o3_cap.replace(/\ /g, ' '); } } // Escape embedded single quotes in text strings function escSglQuote(str) { return str.toString().replace(/'/g,"\\'"); } // Onload handler for window onload event function OLonLoad_handler(e) { var re =3D /\w+\(.*\)[;\s]+/g, olre =3D /overlib\(|nd\(|cClick\(/, fn, l,= i; if(!olLoaded) olLoaded=3D1; // Remove it for Gecko based browsers if(window.removeEventListener && e.eventPhase =3D=3D 3) window.removeEvent= Listener("load",OLonLoad_handler,false); else if(window.detachEvent) { // and for IE and Opera 4.x but execute call= s to overlib, nd, or cClick() window.detachEvent("onload",OLonLoad_handler); var fN =3D document.body.getAttribute('onload'); if (fN) { fN=3DfN.toString().match(re); if (fN && fN.length) { for (i=3D0; i' : '
')= : ''; else { fontStr=3D'o3_'+whichString+'font'; fontColor=3D'o3_'+((whichString=3D=3D'caption')? 'cap' : whichString)+'co= lor'; return (hasDims&&!olNs4) ? (isClose ? '' : '
') := '7 ? '7' : fontSizeStr)+'">'; } } // Quotes Multi word font names; needed for CSS Standards adherence in font= -family function quoteMultiNameFonts(theFont) { var v, pM=3DtheFont.split(','); for (var i=3D0; i 0) clearTimeout(o3_timerid); o3_timerid=3DsetTimeout("cClick()",(o3_timeout=3Dtime)); } } // Was originally in the placeLayer() routine; separated out for future ease function horizontalPlacement(browserWidth, horizontalScrollAmount, widthFix= ) { var placeX, iwidth=3DbrowserWidth, winoffset=3DhorizontalScrollAmount; var parsedWidth =3D parseInt(o3_width); if (o3_fixx > -1 || o3_relx !=3D null) { // Fixed position placeX=3D(o3_relx !=3D null ? ( o3_relx < 0 ? winoffset +o3_relx+ iwidth= - parsedWidth - widthFix : winoffset+o3_relx) : o3_fixx); } else { =20 // If HAUTO, decide what to use. if (o3_hauto =3D=3D 1) { if ((o3_x - winoffset) > (iwidth / 2)) { o3_hpos =3D LEFT; } else { o3_hpos =3D RIGHT; } } =09 // From mouse if (o3_hpos =3D=3D CENTER) { // Center placeX =3D o3_x+o3_offsetx-(parsedWidth/2); if (placeX < winoffset) placeX =3D winoffset; } if (o3_hpos =3D=3D RIGHT) { // Right placeX =3D o3_x+o3_offsetx; if ((placeX+parsedWidth) > (winoffset+iwidth - widthFix)) { placeX =3D iwidth+winoffset - parsedWidth - widthFix; if (placeX < 0) placeX =3D 0; } } if (o3_hpos =3D=3D LEFT) { // Left placeX =3D o3_x-o3_offsetx-parsedWidth; if (placeX < winoffset) placeX =3D winoffset; } =09 // Snapping! if (o3_snapx > 1) { var snapping =3D placeX % o3_snapx; if (o3_hpos =3D=3D LEFT) { placeX =3D placeX - (o3_snapx+snapping); } else { // CENTER and RIGHT placeX =3D placeX+(o3_snapx - snapping); } if (placeX < winoffset) placeX =3D winoffset; } }=09 return placeX; } // was originally in the placeLayer() routine; separated out for future ease function verticalPlacement(browserHeight,verticalScrollAmount) { var placeY, iheight=3DbrowserHeight, scrolloffset=3DverticalScrollAmount; var parsedHeight=3D(o3_aboveheight ? parseInt(o3_aboveheight) : (olNs4 ?= over.clip.height : over.offsetHeight)); if (o3_fixy > -1 || o3_rely !=3D null) { // Fixed position placeY=3D(o3_rely !=3D null ? (o3_rely < 0 ? scrolloffset+o3_rely+iheight= - parsedHeight : scrolloffset+o3_rely) : o3_fixy); } else { // If VAUTO, decide what to use. if (o3_vauto =3D=3D 1) { if ((o3_y - scrolloffset) > (iheight / 2) && o3_vpos =3D=3D BELOW && (o3= _y + parsedHeight + o3_offsety - (scrolloffset + iheight) > 0)) { o3_vpos =3D ABOVE; } else if (o3_vpos =3D=3D ABOVE && (o3_y - (parsedHeight + o3_offsety)= - scrolloffset < 0)) { o3_vpos =3D BELOW; } } // From mouse if (o3_vpos =3D=3D ABOVE) { if (o3_aboveheight =3D=3D 0) o3_aboveheight =3D parsedHeight;=20 placeY =3D o3_y - (o3_aboveheight+o3_offsety); if (placeY < scrolloffset) placeY =3D scrolloffset; } else { // BELOW placeY =3D o3_y+o3_offsety; }=20 // Snapping! if (o3_snapy > 1) { var snapping =3D placeY % o3_snapy; =09 if (o3_aboveheight > 0 && o3_vpos =3D=3D ABOVE) { placeY =3D placeY - (o3_snapy+snapping); } else { placeY =3D placeY+(o3_snapy - snapping); } =09 if (placeY < scrolloffset) placeY =3D scrolloffset; } } return placeY; } // checks positioning flags function checkPositionFlags() { if (olHautoFlag) olHautoFlag =3D o3_hauto=3D0; if (olVautoFlag) olVautoFlag =3D o3_vauto=3D0; return true; } // get Browser window width function windowWidth() { var w; if (o3_frame.innerWidth) w=3Do3_frame.innerWidth; else if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clie= ntWidth=3D=3D'number'")&&eval('o3_frame.'+docRoot+'.clientWidth'))=20 w=3Deval('o3_frame.'+docRoot+'.clientWidth'); return w; =09 } // create the div container for popup content if it doesn't exist function createDivContainer(id,frm,zValue) { id =3D (id || 'overDiv'), frm =3D (frm || o3_frame), zValue =3D (zValue ||= 1000); var objRef, divContainer =3D layerReference(id); if (divContainer =3D=3D null) { if (olNs4) { divContainer =3D frm.document.layers[id] =3D new Layer(window.innerWidth= , frm); objRef =3D divContainer; } else { var body =3D (olIe4 ? frm.document.all.tags('BODY')[0] : frm.document.ge= tElementsByTagName("BODY")[0]); if (olIe4&&!document.getElementById) { body.insertAdjacentHTML("beforeEnd",'
'); divContainer=3DlayerReference(id); } else { divContainer =3D frm.document.createElement("DIV"); divContainer.id =3D id; body.appendChild(divContainer); } objRef =3D divContainer.style; } objRef.position =3D 'absolute'; objRef.visibility =3D 'hidden'; objRef.zIndex =3D zValue; if (olIe4&&!olOp) objRef.left =3D objRef.top =3D '0px'; else objRef.left =3D objRef.top =3D -10000 + (!olNs4 ? 'px' : 0); } return divContainer; } // get reference to a layer with ID=3Did function layerReference(id) { return (olNs4 ? o3_frame.document.layers[id] : (document.all ? o3_frame.do= cument.all[id] : o3_frame.document.getElementById(id))); } //////// // UTILITY FUNCTIONS //////// // Checks if something is a function. function isFunction(fnRef) { var rtn =3D true; if (typeof fnRef =3D=3D 'object') { for (var i =3D 0; i < fnRef.length; i++) { if (typeof fnRef[i]=3D=3D'function') continue; rtn =3D false; break; } } else if (typeof fnRef !=3D 'function') { rtn =3D false; } =09 return rtn; } // Converts an array into an argument string for use in eval. function argToString(array, strtInd, argName) { var jS =3D strtInd, aS =3D '', ar =3D array; argName=3D(argName ? argName : 'ar'); =09 if (ar.length > jS) { for (var k =3D jS; k < ar.length; k++) aS +=3D argName+'['+k+'], '; aS =3D aS.substring(0, aS.length-2); } =09 return aS; } // Places a hook in the correct position in a hook point. function reOrder(hookPt, fnRef, order) { var newPt =3D new Array(), match, i, j; if (!order || typeof order =3D=3D 'undefined' || typeof order =3D=3D 'numb= er') return hookPt; =09 if (typeof order=3D=3D'function') { if (typeof fnRef=3D=3D'object') { newPt =3D newPt.concat(fnRef); } else { newPt[newPt.length++]=3DfnRef; } =09 for (i =3D 0; i < hookPt.length; i++) { match =3D false; if (typeof fnRef =3D=3D 'function' && hookPt[i] =3D=3D fnRef) { continue; } else { for(j =3D 0; j < fnRef.length; j++) if (hookPt[i] =3D=3D fnRef[j]) { match =3D true; break; } } if (!match) newPt[newPt.length++] =3D hookPt[i]; } newPt[newPt.length++] =3D order; } else if (typeof order =3D=3D 'object') { if (typeof fnRef =3D=3D 'object') { newPt =3D newPt.concat(fnRef); } else { newPt[newPt.length++] =3D fnRef; } =09 for (j =3D 0; j < hookPt.length; j++) { match =3D false; if (typeof fnRef =3D=3D 'function' && hookPt[j] =3D=3D fnRef) { continue; } else { for (i =3D 0; i < fnRef.length; i++) if (hookPt[j] =3D=3D fnRef[i]) { match =3D true; break; } } if (!match) newPt[newPt.length++]=3DhookPt[j]; } for (i =3D 0; i < newPt.length; i++) hookPt[i] =3D newPt[i]; newPt.length =3D 0; =09 for (j =3D 0; j < hookPt.length; j++) { match =3D false; for (i =3D 0; i < order.length; i++) { if (hookPt[j] =3D=3D order[i]) { match =3D true; break; } } if (!match) newPt[newPt.length++] =3D hookPt[j]; } newPt =3D newPt.concat(order); } hookPt =3D newPt; return hookPt; } //////// // PLUGIN ACTIVATION FUNCTIONS //////// // Runs plugin functions to set runtime variables. function setRunTimeVariables(){ if (typeof runTime !=3D 'undefined' && runTime.length) { for (var k =3D 0; k < runTime.length; k++) { runTime[k](); } } } // Runs plugin functions to parse commands. function parseCmdLine(pf, i, args) { if (typeof cmdLine !=3D 'undefined' && cmdLine.length) {=20 for (var k =3D 0; k < cmdLine.length; k++) {=20 var j =3D cmdLine[k](pf, i, args); if (j >- 1) { i =3D j; break; } } } return i; } // Runs plugin functions to do things after parse. function postParseChecks(pf,args){ if (typeof postParse !=3D 'undefined' && postParse.length) { for (var k =3D 0; k < postParse.length; k++) { if (postParse[k](pf,args)) continue; return false; // end now since have an error } } return true; } //////// // PLUGIN REGISTRATION FUNCTIONS //////// // Registers commands and creates constants. function registerCommands(cmdStr) { if (typeof cmdStr!=3D'string') return; var pM =3D cmdStr.split(','); pms =3D pms.concat(pM); for (var i =3D 0; i< pM.length; i++) { eval(pM[i].toUpperCase()+'=3D'+pmCount++); } } // Registers no-parameter commands function registerNoParameterCommands(cmdStr) { if (!cmdStr && typeof cmdStr !=3D 'string') return; pmt=3D(!pmt) ? cmdStr : pmt + ',' + cmdStr; } // Register a function to hook at a certain point. function registerHook(fnHookTo, fnRef, hookType, optPm) { var hookPt, last =3D typeof optPm; =09 if (fnHookTo =3D=3D 'plgIn'||fnHookTo =3D=3D 'postParse') return; if (typeof hookPts[fnHookTo] =3D=3D 'undefined') hookPts[fnHookTo] =3D new= FunctionReference(); hookPt =3D hookPts[fnHookTo]; if (hookType !=3D null) { if (hookType =3D=3D FREPLACE) { hookPt.ovload =3D fnRef; // replace normal overlib routine if (fnHookTo.indexOf('ol_content_') > -1) hookPt.alt[pms[CSSOFF-1-pmStar= t]]=3DfnRef;=20 } else if (hookType =3D=3D FBEFORE || hookType =3D=3D FAFTER) { var hookPt=3D(hookType =3D=3D 1 ? hookPt.before : hookPt.after); if (typeof fnRef =3D=3D 'object') { hookPt =3D hookPt.concat(fnRef); } else { hookPt[hookPt.length++] =3D fnRef; } if (optPm) hookPt =3D reOrder(hookPt, fnRef, optPm); } else if (hookType =3D=3D FALTERNATE) { if (last=3D=3D'number') hookPt.alt[pms[optPm-1-pmStart]] =3D fnRef; } else if (hookType =3D=3D FCHAIN) { hookPt =3D hookPt.chain;=20 if (typeof fnRef=3D=3D'object') hookPt=3DhookPt.concat(fnRef); // add ot= her functions=20 else hookPt[hookPt.length++]=3DfnRef; } return; } } // Register a function that will set runtime variables. function registerRunTimeFunction(fn) { if (isFunction(fn)) { if (typeof fn =3D=3D 'object') { runTime =3D runTime.concat(fn); } else { runTime[runTime.length++] =3D fn; } } } // Register a function that will handle command parsing. function registerCmdLineFunction(fn){ if (isFunction(fn)) { if (typeof fn =3D=3D 'object') { cmdLine =3D cmdLine.concat(fn); } else { cmdLine[cmdLine.length++] =3D fn; } } } // Register a function that does things after command parsing.=20 function registerPostParseFunction(fn){ if (isFunction(fn)) { if (typeof fn =3D=3D 'object') { postParse =3D postParse.concat(fn); } else { postParse[postParse.length++] =3D fn; } } } //////// // PLUGIN REGISTRATION FUNCTIONS //////// // Runs any hooks registered. function runHook(fnHookTo, hookType) { var l =3D hookPts[fnHookTo], k, rtnVal =3D null, optPm, arS, ar =3D runHoo= k.arguments; if (hookType =3D=3D FREPLACE) { arS =3D argToString(ar, 2); if (typeof l =3D=3D 'undefined' || !(l =3D l.ovload)) rtnVal =3D eval(fnH= ookTo+'('+arS+')'); else rtnVal =3D eval('l('+arS+')'); } else if (hookType =3D=3D FBEFORE || hookType =3D=3D FAFTER) { if (typeof l !=3D 'undefined') { l=3D(hookType =3D=3D 1 ? l.before : l.after); =09 if (l.length) { arS =3D argToString(ar, 2); for (var k =3D 0; k < l.length; k++) eval('l[k]('+arS+')'); } } } else if (hookType =3D=3D FALTERNATE) { optPm =3D ar[2]; arS =3D argToString(ar, 3); if (typeof l =3D=3D 'undefined' || (l =3D l.alt[pms[optPm-1-pmStart]]) = =3D=3D 'undefined') { rtnVal =3D eval(fnHookTo+'('+arS+')'); } else { rtnVal =3D eval('l('+arS+')'); } } else if (hookType =3D=3D FCHAIN) { arS=3DargToString(ar,2); l=3Dl.chain; for (k=3Dl.length; k > 0; k--) if((rtnVal=3Deval('l[k-1]('+arS+')'))!=3Dv= oid(0)) break; } return rtnVal; } //////// // OBJECT CONSTRUCTORS //////// // Object for handling hooks. function FunctionReference() { this.ovload =3D null; this.before =3D new Array(); this.after =3D new Array(); this.alt =3D new Array(); this.chain =3D new Array(); } // Object for simple access to the overLIB version used. // Examples: simpleversion:351 major:3 minor:5 revision:1 function Info(version, prerelease) { this.version =3D version; this.prerelease =3D prerelease; this.simpleversion =3D Math.round(this.version*100); this.major =3D parseInt(this.simpleversion / 100); this.minor =3D parseInt(this.simpleversion / 10) - this.major * 10; this.revision =3D parseInt(this.simpleversion) - this.major * 100 - this.m= inor * 10; this.meets =3D meets; } // checks for Core Version required function meets(reqdVersion) { return (!reqdVersion) ? false : this.simpleversion >=3D Math.round(100*par= seFloat(reqdVersion)); } //////// // STANDARD REGISTRATIONS //////// registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSOFF); registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSOFF); registerHook("ol_content_background", ol_content_background, FALTERNATE, CS= SOFF); registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSCLASS); registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSCLASS= ); registerHook("ol_content_background", ol_content_background, FALTERNATE, CS= SCLASS); registerPostParseFunction(checkPositionFlags); registerHook("hideObject", nbspCleanup, FAFTER); registerHook("horizontalPlacement", horizontalPlacement, FCHAIN); registerHook("verticalPlacement", verticalPlacement, FCHAIN); if (olNs4||(olIe5&&isMac)||olKq) olLoaded=3D1; registerNoParameterCommands('sticky,autostatus,autostatuscap,fullhtml,hauto= ,vauto,closeclick,wrap,followmouse,mouseoff,compatmode'); /////// // ESTABLISH MOUSECAPTURING /////// // Capture events, alt. diffuses the overlib function. var olCheckMouseCapture=3Dtrue; if ((olNs4 || olNs6 || olIe4)) { olMouseCapture(); } else { overlib =3D no_overlib; nd =3D no_overlib; ver3fix =3D true; } ------=_NextPart_000_0000_4A1CA263.E04924BE Content-Type: text/javascript Content-Transfer-Encoding: quoted-printable Content-Location: http://www.itagsoftware.com/script/lightbox.js // ------------------------------------------------------------------------= ----------- // // Lightbox v2.02 // by Lokesh Dhakar - http://www.huddletogether.com // 3/31/06 // // For more information on this script, visit: // http://huddletogether.com/projects/lightbox2/ // // Licensed under the Creative Commons Attribution 2.5 License - http://cre= ativecommons.org/licenses/by/2.5/ //=09 // Credit also due to those who have helped, inspired, and made their code= available to the public. // Including: Scott Upton(uptonic.com), Peter-Paul Koch(quirksmode.org), Th= omas Fuchs(mir.aculo.us), and others. // // // ------------------------------------------------------------------------= ----------- /* Table of Contents ----------------- Configuration Global Variables Extending Built-in Objects=09 - Object.extend(Element) - Array.prototype.removeDuplicates() - Array.prototype.empty() Lightbox Class Declaration - initialize() - start() - changeImage() - resizeImageContainer() - showImage() - updateDetails() - updateNav() - enableKeyboardNav() - disableKeyboardNav() - keyboardAction() - preloadNeighborImages() - end() =09 Miscellaneous Functions - getPageScroll() - getPageSize() - getKey() - listenKey() - showSelectBoxes() - hideSelectBoxes() - pause() - initLightbox() =09 Function Calls - addLoadEvent(initLightbox) =09 */ // ------------------------------------------------------------------------= ----------- // // Configuration // var fileLoadingImage =3D "images/loading.gif"; =09 var fileBottomNavCloseImage =3D "images/closelabel.gif"; var resizeSpeed =3D 7; // controls the speed of the image resizing (1=3Dslo= west and 10=3Dfastest) var borderSize =3D 10; //if you adjust the padding in the CSS, you will nee= d to update this variable // ------------------------------------------------------------------------= ----------- // // Global Variables // var imageArray =3D new Array; var activeImage; if(resizeSpeed > 10){ resizeSpeed =3D 10;} if(resizeSpeed < 1){ resizeSpeed =3D 1;} resizeDuration =3D (11 - resizeSpeed) * 0.15; // ------------------------------------------------------------------------= ----------- // // Additional methods for Element added by SU, Couloir // - further additions by Lokesh Dhakar (huddletogether.com) // Object.extend(Element, { getWidth: function(element) { element =3D $(element); return element.offsetWidth;=20 }, setWidth: function(element,w) { element =3D $(element); element.style.width =3D w +"px"; }, setHeight: function(element,h) { element =3D $(element); element.style.height =3D h +"px"; }, setTop: function(element,t) { element =3D $(element); element.style.top =3D t +"px"; }, setSrc: function(element,src) { element =3D $(element); element.src =3D src;=20 }, setHref: function(element,href) { element =3D $(element); element.href =3D href;=20 }, setInnerHTML: function(element,content) { element =3D $(element); element.innerHTML =3D content; } }); // ------------------------------------------------------------------------= ----------- // // Extending built-in Array object // - array.removeDuplicates() // - array.empty() // Array.prototype.removeDuplicates =3D function () { for(i =3D 1; i < this.length; i++){ if(this[i][0] =3D=3D this[i-1][0]){ this.splice(i,1); } } } // ------------------------------------------------------------------------= ----------- Array.prototype.empty =3D function () { for(i =3D 0; i <=3D this.length; i++){ this.shift(); } } // ------------------------------------------------------------------------= ----------- // // Lightbox Class Declaration // - initialize() // - start() // - changeImage() // - resizeImageContainer() // - showImage() // - updateDetails() // - updateNav() // - enableKeyboardNav() // - disableKeyboardNav() // - keyboardNavAction() // - preloadNeighborImages() // - end() // // Structuring of code inspired by Scott Upton (http://www.uptonic.com/) // var Lightbox =3D Class.create(); Lightbox.prototype =3D { =09 // initialize() // Constructor runs on completion of the DOM loading. Loops through anchor= tags looking for=20 // 'lightbox' references and applies onclick events to appropriate links.= The 2nd section of // the function inserts html at the bottom of the page which is used to di= splay the shadow=20 // overlay and the image container. // initialize: function() {=09 if (!document.getElementsByTagName){ return; } var anchors =3D document.getElementsByTagName('a'); // loop through all anchor tags for (var i=3D0; i
//
//
//
// //
// // //
//
// // // //
//
//
//
//
//
// // //
//
// // // //
//
//
//
var objBody =3D document.getElementsByTagName("body").item(0); =09 var objOverlay =3D document.createElement("div"); objOverlay.setAttribute('id','overlay'); objOverlay.style.display =3D 'none'; objOverlay.onclick =3D function() { myLightbox.end(); return false; } objBody.appendChild(objOverlay); =09 var objLightbox =3D document.createElement("div"); objLightbox.setAttribute('id','lightbox'); objLightbox.style.display =3D 'none'; objBody.appendChild(objLightbox); =09 var objOuterImageContainer =3D document.createElement("div"); objOuterImageContainer.setAttribute('id','outerImageContainer'); =09 var objImageContainer =3D document.createElement("div"); objImageContainer.setAttribute('id','imageContainer'); objOuterImageContainer.appendChild(objImageContainer); =09 var objLightboxImage =3D document.createElement("img"); objLightboxImage.setAttribute('id','lightboxImage'); objImageContainer.appendChild(objLightboxImage); =09 var objHoverNav =3D document.createElement("div"); objHoverNav.setAttribute('id','hoverNav'); objImageContainer.appendChild(objHoverNav); =09 var objPrevLink =3D document.createElement("a"); objPrevLink.setAttribute('id','prevLink'); objPrevLink.setAttribute('href','#'); objHoverNav.appendChild(objPrevLink); =09 var objNextLink =3D document.createElement("a"); objNextLink.setAttribute('id','nextLink'); objNextLink.setAttribute('href','#'); objHoverNav.appendChild(objNextLink); =09 var objLoading =3D document.createElement("div"); objLoading.setAttribute('id','loading'); objImageContainer.appendChild(objLoading); =09 var objLoadingLink =3D document.createElement("a"); objLoadingLink.setAttribute('id','loadingLink'); objLoadingLink.setAttribute('href','#'); objLoadingLink.onclick =3D function() { myLightbox.end(); return false;= } objLoading.appendChild(objLoadingLink); =09 var objLoadingImage =3D document.createElement("img"); objLoadingImage.setAttribute('src', fileLoadingImage); objLoadingLink.appendChild(objLoadingImage); var objImageDataContainer =3D document.createElement("div"); objImageDataContainer.setAttribute('id','imageDataContainer'); objImageDataContainer.className =3D 'clearfix'; =09 var objImageData =3D document.createElement("div"); objImageData.setAttribute('id','imageData'); objImageDataContainer.appendChild(objImageData); =09 var objImageDetails =3D document.createElement("div"); objImageDetails.setAttribute('id','imageDetails'); objImageData.appendChild(objImageDetails); =09 var objCaption =3D document.createElement("span"); objCaption.setAttribute('id','caption'); objImageDetails.appendChild(objCaption); =09 var objNumberDisplay =3D document.createElement("span"); objNumberDisplay.setAttribute('id','numberDisplay'); objImageDetails.appendChild(objNumberDisplay); =09 var objBottomNav =3D document.createElement("div"); objBottomNav.setAttribute('id','bottomNav'); objImageData.appendChild(objBottomNav); =09 var objBottomNavCloseLink =3D document.createElement("a"); objBottomNavCloseLink.setAttribute('id','bottomNavClose'); objBottomNavCloseLink.setAttribute('href','#'); objBottomNavCloseLink.onclick =3D function() { myLightbox.end(); return= false; } objBottomNav.appendChild(objBottomNavCloseLink); =09 var objBottomNavCloseImage =3D document.createElement("img"); objBottomNavCloseImage.setAttribute('src', fileBottomNavCloseImage); objBottomNavCloseLink.appendChild(objBottomNavCloseImage); =09 objLightbox.appendChild(objImageDataContainer); objLightbox.appendChild(objOuterImageContainer); =09 }, =09 // // start() // Display overlay and lightbox. If image is part of a set, add siblings= to imageArray. // start: function(imageLink) {=09 hideSelectBoxes(); // stretch overlay to fill page and fade in var arrayPageSize =3D getPageSize(); Element.setHeight('overlay', arrayPageSize[1]); new Effect.Appear('overlay', { duration: 0.2, from: 0.0, to: 0.8 }); imageArray =3D []; imageNum =3D 0; =09 if (!document.getElementsByTagName){ return; } var anchors =3D document.getElementsByTagName('a'); // if image is NOT part of a set.. if((imageLink.getAttribute('rel') =3D=3D 'lightbox')){ // add single image to imageArray imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getA= ttribute('caption'))); =09 } else { // if image is part of a set.. // loop through anchors, find other images in set, and add them to image= Array for (var i=3D0; i 1){ Element.show('numberDisplay'); Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1)= + " of " + imageArray.length); } new Effect.Parallel( [ new Effect.SlideDown( 'imageDataContainer', { sync: true, duration: re= sizeDuration + 0.25, from: 0.0, to: 1.0 }),=20 new Effect.Appear('imageDataContainer', { sync: true, duration: 1.0 })= ],=20 { duration: 0.65, afterFinish: function() { myLightbox.updateNav();} }=20 ); }, // // updateNav() // Display appropriate previous and next hover navigation. // updateNav: function() { Element.show('hoverNav'); =09 // if not first image in set, display prev image button if(activeImage !=3D 0){ Element.show('prevLink'); document.getElementById('prevLink').onclick =3D function() { myLightbox.changeImage(activeImage - 1); return false; } } // if not last image in set, display next image button if(activeImage !=3D (imageArray.length - 1)){ Element.show('nextLink'); document.getElementById('nextLink').onclick =3D function() { myLightbox.changeImage(activeImage + 1); return false; } } =09 this.enableKeyboardNav(); }, // // enableKeyboardNav() // enableKeyboardNav: function() { document.onkeydown =3D this.keyboardAction;=20 }, // // disableKeyboardNav() // disableKeyboardNav: function() { document.onkeydown =3D ''; }, // // keyboardAction() // keyboardAction: function(e) { if (e =3D=3D null) { // ie keycode =3D event.keyCode; } else { // mozilla keycode =3D e.which; } key =3D String.fromCharCode(keycode).toLowerCase(); =09 if((key =3D=3D 'x') || (key =3D=3D 'o') || (key =3D=3D 'c')){ // close li= ghtbox myLightbox.end(); } else if(key =3D=3D 'p'){ // display previous image if(activeImage !=3D 0){ myLightbox.disableKeyboardNav(); myLightbox.changeImage(activeImage - 1); } } else if(key =3D=3D 'n'){ // display next image if(activeImage !=3D (imageArray.length - 1)){ myLightbox.disableKeyboardNav(); myLightbox.changeImage(activeImage + 1); } } }, // // preloadNeighborImages() // Preload previous and next images. // preloadNeighborImages: function(){ if((imageArray.length - 1) > activeImage){ preloadNextImage =3D new Image(); preloadNextImage.src =3D imageArray[activeImage + 1][0]; } if(activeImage > 0){ preloadPrevImage =3D new Image(); preloadPrevImage.src =3D imageArray[activeImage - 1][0]; } =09 }, // // end() // end: function() { this.disableKeyboardNav(); Element.hide('lightbox'); new Effect.Fade('overlay', { duration: 0.2}); showSelectBoxes(); } } // ------------------------------------------------------------------------= ----------- // // getPageScroll() // Returns array with x,y page scroll values. // Core code from - quirksmode.org // function getPageScroll(){ var yScroll; if (self.pageYOffset) { yScroll =3D self.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop)= { // Explorer 6 Strict yScroll =3D document.documentElement.scrollTop; } else if (document.body) {// all other Explorers yScroll =3D document.body.scrollTop; } arrayPageScroll =3D new Array('',yScroll)=20 return arrayPageScroll; } // ------------------------------------------------------------------------= ----------- // // getPageSize() // Returns array with page width, height and window width, height // Core code from - quirksmode.org // Edit for Firefox by pHaez // function getPageSize(){ =09 var xScroll, yScroll; =09 if (window.innerHeight && window.scrollMaxY) {=09 xScroll =3D document.body.scrollWidth; yScroll =3D window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document.body.offsetHeight){ // al= l but Explorer Mac xScroll =3D document.body.scrollWidth; yScroll =3D document.body.scrollHeight; } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla= and Safari xScroll =3D document.body.offsetWidth; yScroll =3D document.body.offsetHeight; } =09 var windowWidth, windowHeight; if (self.innerHeight) { // all except Explorer windowWidth =3D self.innerWidth; windowHeight =3D self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeig= ht) { // Explorer 6 Strict Mode windowWidth =3D document.documentElement.clientWidth; windowHeight =3D document.documentElement.clientHeight; } else if (document.body) { // other Explorers windowWidth =3D document.body.clientWidth; windowHeight =3D document.body.clientHeight; }=09 =09 // for small pages with total height less then height of the viewport if(yScroll < windowHeight){ pageHeight =3D windowHeight; } else {=20 pageHeight =3D yScroll; } // for small pages with total width less then width of the viewport if(xScroll < windowWidth){=09 pageWidth =3D windowWidth; } else { pageWidth =3D xScroll; } arrayPageSize =3D new Array(pageWidth,pageHeight,windowWidth,windowHeight)= =20 return arrayPageSize; } // ------------------------------------------------------------------------= ----------- // // getKey(key) // Gets keycode. If 'x' is pressed then it hides the lightbox. // function getKey(e){ if (e =3D=3D null) { // ie keycode =3D event.keyCode; } else { // mozilla keycode =3D e.which; } key =3D String.fromCharCode(keycode).toLowerCase(); =09 if(key =3D=3D 'x'){ } } // ------------------------------------------------------------------------= ----------- // // listenKey() // function listenKey () { document.onkeypress =3D getKey; } =09 // --------------------------------------------------- function showSelectBoxes(){ selects =3D document.getElementsByTagName("select"); for (i =3D 0; i !=3D selects.length; i++) { selects[i].style.visibility =3D "visible"; } } // --------------------------------------------------- function hideSelectBoxes(){ selects =3D document.getElementsByTagName("select"); for (i =3D 0; i !=3D selects.length; i++) { selects[i].style.visibility =3D "hidden"; } } // --------------------------------------------------- // // pause(numberMillis) // Pauses code execution for specified time. Uses busy code, not good. // Code from http://www.faqts.com/knowledge_base/view.phtml/aid/1602 // function pause(numberMillis) { var now =3D new Date(); var exitTime =3D now.getTime() + numberMillis; while (true) { now =3D new Date(); if (now.getTime() > exitTime) return; } } // --------------------------------------------------- function initLightbox() { myLightbox =3D new Lightbox(); } Event.observe(window, 'load', initLightbox, false); ------=_NextPart_000_0000_4A1CA263.E04924BE Content-Type: text/javascript Content-Transfer-Encoding: quoted-printable Content-Location: http://www.itagsoftware.com/script/common.js function spamFix() { var emailAnchor =3D $('mailto'); =09 if (emailAnchor!=3Dnull) { emailAnchor.href =3D 'mailto:' emailAnchor.href +=3D 'ben'; emailAnchor.href +=3D '@itagsoftware.com'; } } function spamFixGeneric(anchorElement) { anchorElement.href =3D anchorElement.href.replace('[nilspam]',''); } window.onload =3D OnLoad; function OnLoad() { spamFix(); doAnalytics(); } function doAnalytics() { var pageTracker =3D _gat._getTracker("UA-1668786-2"); pageTracker._trackPageview() } ------=_NextPart_000_0000_4A1CA263.E04924BE Content-Type: text/javascript Content-Transfer-Encoding: quoted-printable Content-Location: http://www.google-analytics.com/ga.js (function(){var g=3Dvoid 0,h=3Dnull,aa=3DencodeURIComponent,ba=3DdecodeURIC= omponent,i=3DMath;function ca(a,b){return a.name=3Db}var k=3D"push",da=3D"l= oad",l=3D"charAt",ea=3D"value",m=3D"indexOf",fa=3D"match",ga=3D"name",ha=3D= "host",p=3D"toString",r=3D"length",s=3D"prototype",t=3D"split",u=3D"stopPro= pagation",ia=3D"scope",v=3D"location",w=3D"getString",x=3D"substring",ja=3D= "navigator",y=3D"join",z=3D"toLowerCase",A;function ka(a,b){switch(b){case= 0:return""+a;case 1:return a*1;case 2:return!!a;case 3:return a*1E3}return= a}function B(a){return g=3D=3Da||"-"=3D=3Da||""=3D=3Da}function la(a){if(!= a||""=3D=3Da)return"";for(;a&&" \n\r\t"[m](a[l](0))>-1;)a=3Da[x](1);for(;a&= &" \n\r\t"[m](a[l](a[r]-1))>-1;)a=3Da[x](0,a[r]-1);return a}function ma(a){= var b=3D1,c=3D0,d;if(!B(a)){b=3D0;for(d=3Da[r]-1;d>=3D0;d--)c=3Da.charCodeA= t(d),b=3D(b<<6&268435455)+c+(c<<14),c=3Db&266338304,b=3Dc!=3D0?b^c>>21:b}re= turn b}function na(){return i.round(i.random()*2147483647)} function oa(){}function C(a,b){return aa instanceof Function?b?encodeURI(a)= :aa(a):(D(68),escape(a))}function F(a){a=3Da[t]("+")[y](" ");if(ba instance= of Function)try{return ba(a)}catch(b){D(17)}else D(68);return unescape(a)}v= ar pa=3Dfunction(a,b,c,d){a.addEventListener?a.addEventListener(b,c,!!d):a.= attachEvent&&a.attachEvent("on"+b,c)};function qa(a){return a&&a[r]>0?a[0]:= ""}function ra(a){var b=3Da?a[r]:0;return b>0?a[b-1]:""}var sa=3Dfunction()= {this.prefix=3D"ga.";this.F=3D{}}; sa[s].set=3Dfunction(a,b){this.F[this.prefix+a]=3Db};sa[s].get=3Dfunction(a= ){return this.F[this.prefix+a]};sa[s].contains=3Dfunction(a){return this.ge= t(a)!=3D=3Dg};function ta(a){a[m]("www.")=3D=3D0&&(a=3Da[x](4));return a[z]= ()}function ua(a,b){var c,d=3D{url:a,protocol:"http",host:"",path:"",c:new= sa,anchor:""};if(!a)return d;c=3Da[m]("://");if(c>=3D0)d.protocol=3Da[x](0= ,c),a=3Da[x](c+3);c=3Da.search("/|\\?|#");if(c>=3D0)d.host=3Da[x](0,c)[z]()= ,a=3Da[x](c);else return d.host=3Da[z](),d;c=3Da[m]("#");if(c>=3D0)d.anchor= =3Da[x](c+1),a=3Da[x](0,c);c=3Da[m]("?");c>=3D0&&(va(d.c,a[x](c+1)),a=3Da[x= ](0,c));d.anchor&&b&&va(d.c,d.anchor);a&&a[l](0)=3D=3D"/"&&(a=3Da[x](1));d.= path=3Da;return d} function va(a,b){function c(b,c){a.contains(b)||a.set(b,[]);a.get(b)[k](c)}= for(var d=3Dla(b)[t]("&"),e=3D0;e-1)?!0:!1},bc=3Dfunction(a){var b=3Da.get(J),c=3Da[w](L,"/");ac(b,c)&&= a[u]()};var fc=3Dfunction(){var a=3D{},b=3D{},c=3Dnew cc;this.h=3Dfunction(= a,b){c.add(a,b)};var d=3Dnew cc;this.d=3Dfunction(a,b){d.add(a,b)};var e=3D= !1,f=3D!1,j=3D!0;this.G=3Dfunction(){e=3D!0};this.f=3Dfunction(a){this[da](= );this.set(Lb,a,!0);e=3D!1;d.execute(this);e=3D!0;b=3D{};this.i()};this.loa= d=3Dfunction(){e&&(e=3D!1,this.na(),dc(this),f||(f=3D!0,c.execute(this),ec(= this),dc(this)),e=3D!0)};this.i=3Dfunction(){if(e)if(f)e=3D!1,ec(this),e=3D= !0;else this[da]()};this.get=3Dfunction(c){c&&c[l](0)=3D=3D"_"&&this[da]();= return b[c]!=3D=3Dg?b[c]:a[c]};this.set=3D function(c,d,e){c&&c[l](0)=3D=3D"_"&&this[da]();e?b[c]=3Dd:a[c]=3Dd;c&&c[l]= (0)=3D=3D"_"&&this.i()};this.m=3Dfunction(b){a[b]=3Dthis.b(b,0)+1};this.b= =3Dfunction(a,b){var c=3Dthis.get(a);return c=3D=3Dg||c=3D=3D=3D""?b:c*1};t= his.getString=3Dfunction(a,b){var c=3Dthis.get(a);return c=3D=3Dg?b:c+""};t= his.na=3Dfunction(){if(j){var b=3Dthis[w](J,""),c=3Dthis[w](L,"/");ac(b,c)|= |(a[K]=3Da[Ga]&&b!=3D""?ma(b):1,j=3D!1)}}};fc[s].stopPropagation=3Dfunction= (){throw"aborted";};function T(a,b){for(var b=3Db||[],c=3D0;c=3D0&&e>0&&f>0&&j>0&&d>=3D0))return D(110),!1;a.set(N,c);a.set(rb,e);= a.set(sb,f);a.set(tb,j);a.set(ub,d);return!0},hc=3Dfunction(a){var b=3Da.ge= t(N),c=3Da.get(rb),d=3Da.get(sb),e=3Da.get(tb),f=3Da.b(ub,1);b=3D=3Dg?D(113= ):b=3D=3DNaN&&D(114);b>=3D0&&c>0&&d>0&&e>0&&f>=3D0||D(115);return[a.b(K,1),= b!=3Dg?b:"-",c||"-",d||"-",e||"-",f][y](".")},ic=3Dfunction(a){return[a.b(K= ,1),a.b(xb,0),a.b(O,1),a.b(yb, 0)][y](".")},jc=3Dfunction(a,b){var c=3Db[t]("."),d=3Da.b(K,1);if(c[r]!=3D= =3D4||c[0]!=3Dd)c=3Dh;a.set(xb,c?c[1]*1:0);a.set(O,c?c[2]*1:10);a.set(yb,c?= c[3]*1:a.get(I));return c!=3Dh||b=3D=3Dd},kc=3Dfunction(a,b){var c=3DC(a[w]= (nb,"")),d=3D[],e=3Da.get(M);if(!b&&e){for(var f=3D0;f0&&(c= +=3D"|"+d[y](","))}return c?a.b(K,1)+"."+c:h},lc=3Dfunction(a,b){var c=3Da.= b(K,1),d=3Db[t](".");if(d[r]<2||d[0]!=3Dc)return!1;c=3Dd.slice(1)[y](".")[t= ]("|");c[r]>0&&a.set(nb,F(c[0])); if(c[r]<=3D1)return!0;for(var d=3Dc[1][t](","),e=3D0;e=3D0&&D(125);return!0},nc=3Dfunct= ion(a,b){var c=3Dmc(a,b);return c?[a.b(K,1),a.b(zb,0),a.b(Ab,1),a.b(Bb,1),c= ][y]("."):""},mc=3Dfunction(a){function b(b,e){if(!B(a.get(b))){var f=3Da[w= ](b,""),f=3Df[t](" ")[y]("%20"),f=3Df[t]("+")[y]("%20");c[k](e+"=3D"+f)}}va= r c=3D[];b(Db,"utmcid");b(Hb,"utmcsr");b(Fb,"utmgclid");b(Gb,"utmdclid");b(= Eb,"utmccn");b(Ib, "utmcmd");b(Jb,"utmctr");b(Kb,"utmcct");return c[y]("|")},pc=3Dfunction(a,b= ){var c=3Da.b(K,1),d=3Db[t](".");if(d[r]<5||d[0]!=3Dc)return a.set(zb,g),a.= set(Ab,g),a.set(Bb,g),a.set(Db,g),a.set(Eb,g),a.set(Hb,g),a.set(Ib,g),a.set= (Jb,g),a.set(Kb,g),a.set(Fb,g),a.set(Gb,g),!1;a.set(zb,d[1]*1);a.set(Ab,d[2= ]*1);a.set(Bb,d[3]*1);oc(a,d.slice(4)[y]("."));return!0},oc=3Dfunction(a,b)= {function c(a){return(a=3Db[fa](a+"=3D(.*?)(?:\\|utm|$)"))&&a[r]=3D=3D2?a[1= ]:g}function d(b,c){c&&(c=3De?F(c):c[t]("%20")[y](" "),a.set(b,c))}b[m]("= =3D")=3D=3D -1&&(b=3DF(b));var e=3Dc("utmcvr")=3D=3D"2";d(Db,c("utmcid"));d(Eb,c("utmcc= n"));d(Hb,c("utmcsr"));d(Ib,c("utmcmd"));d(Jb,c("utmctr"));d(Kb,c("utmcct")= );d(Fb,c("utmgclid"));d(Gb,c("utmdclid"))};var cc=3Dfunction(){this.q=3D[]}= ;cc[s].add=3Dfunction(a,b){this.q[k]({name:a,ua:b})};cc[s].execute=3Dfuncti= on(a){try{for(var b=3D0;b=3Da.get(Ta)*100&&a[u]()}func= tion rc(a){sc()&&a[u]()}function tc(a){G[v].protocol=3D=3D"file:"&&a[u]()}f= unction uc(a){a.get(db)||a.set(db,G.title,!0);a.get(cb)||a.set(cb,G[v].path= name+G[v].search,!0)};var vc=3Dnew function(){var a=3D[];this.set=3Dfunctio= n(b){a[b]=3D!0};this.va=3Dfunction(){for(var b=3D[],c=3D0;c=3D0){b=3Db.replace(/\n|\r/g," ");f= =3D0;for(var j=3Db[r];f2E3&&(b=3Db[x](0, 2E3),D(69));a=3Da+"=3D"+b+"; path=3D"+c+"; ";e&&(a+=3D"expires=3D"+(new Dat= e((new Date).getTime()+e)).toGMTString()+"; ");d&&(a+=3D"domain=3D"+d+";");= G.cookie=3Da}};var xc,yc,zc=3Dfunction(){if(!xc){var a=3D{},b=3DU[ja],c=3DU= .screen;a.C=3Dc?c.width+"x"+c.height:"-";a.B=3Dc?c.colorDepth+"-bit":"-";a.= language=3D(b&&(b.language||b.browserLanguage)||"-")[z]();a.javaEnabled=3Db= &&b.javaEnabled()?1:0;a.characterSet=3DG.characterSet||G.charset||"-";xc=3D= a}},Ac=3Dfunction(){zc();for(var a=3Dxc,b=3DU[ja],a=3Db.appName+b.version+a= .language+b.platform+b.userAgent+a.javaEnabled+a.C+a.B+(G.cookie?G.cookie:"= ")+(G.referrer?G.referrer:""),b=3Da[r],c=3DU.history[r];c>0;)a+=3Dc--^b++;r= eturn ma(a)},Bc=3Dfunction(a){zc(); var b=3Dxc;a.set(gb,b.C);a.set(hb,b.B);a.set(kb,b.language);a.set(lb,b.char= acterSet);a.set(ib,b.javaEnabled);if(a.get(Ha)&&a.get(Ia)){if(!(b=3Dyc)){va= r c,d,e;d=3D"ShockwaveFlash";if((b=3D(b=3DU[ja])?b.plugins:g)&&b[r]>0)for(c= =3D0;c-1&&(e=3Dd.descrip= tion[t]("Shockwave Flash ")[1]);else{d=3Dd+"."+d;try{c=3Dnew ActiveXObject(= d+".7"),e=3Dc.GetVariable("$version")}catch(f){}if(!e)try{c=3Dnew ActiveXOb= ject(d+".6"),e=3D"WIN 6,0,21,0",c.AllowScriptAccess=3D"always",e=3Dc.GetVar= iable("$version")}catch(j){}if(!e)try{c=3D new ActiveXObject(d),e=3Dc.GetVariable("$version")}catch(o){}e&&(e=3De[t]("= ")[1][t](","),e=3De[0]+"."+e[1]+" r"+e[2])}b=3De?e:"-"}yc=3Db;a.set(jb,yc)= }else a.set(jb,"-")};var Y=3Dfunction(){P(Y[s],"push",Y[s][k],5);P(Y[s],"_c= reateAsyncTracker",Y[s].wa,33);P(Y[s],"_getAsyncTracker",Y[s].xa,34)};Y[s].= wa=3Dfunction(a,b){return Z.k(a,b||"")};Y[s].xa=3Dfunction(a){return Z.p(a)= };Y[s].push=3Dfunction(a){for(var b=3Darguments,c=3D0,d=3D0;d0&&(e=3Df[x](0,j),f=3Df[x](j+1));var o=3De=3D=3D"_gat"?Z= :e=3D=3D"_gaq"?Cc:Z.p(e);o[f].apply(o,b[d].slice(1))}}catch(n){c++}return= c};var Fc=3Dfunction(){function a(a,b,c,d){g=3D=3Df[a]&&(f[a]=3D{});g=3D= =3Df[a][b]&&(f[a][b]=3D[]);f[a][b][c]=3Dd}function b(a,b,c){if(g!=3Df[a]&&g= !=3Df[a][b])return f[a][b][c]}function c(a,b){if(g!=3Df[a]&&g!=3Df[a][b]){f= [a][b]=3Dg;var c=3D!0,d;for(d=3D0;d0)&&(W("__utmd"= ,"1",a[w](L,"/"),a[w](J,""),1E4),V("__utmd")[r]=3D=3D0&&a[u]())};var Pc=3Df= unction(a){a.get(N)=3D=3Dg?Oc(a):a.get(ob)&&!a.get(Xb)?Oc(a):a.get(wb)&&(a.= set(sb,a.get(tb)),a.set(tb,a.get(I)),a.m(ub),a.set(vb,!0),a.set(xb,0),a.set= (O,10),a.set(yb,a.get(I)),a.set(wb,!1))},Oc=3Dfunction(a){var b=3Da.get(I);= a.set(mb,!0);a.set(N,na()^Ac(a)&2147483647);a.set(nb,"");a.set(rb,b);a.set(= sb,b);a.set(tb,b);a.set(ub,1);a.set(vb,!0);a.set(xb,0);a.set(O,10);a.set(yb= ,b);a.set(M,[]);a.set(ob,!1);a.set(wb,!1)};var Qc=3D"daum:q,eniro:search_wo= rd,naver:query,pchome:q,images.google:q,google:q,yahoo:p,yahoo:q,msn:q,bing= :q,aol:query,aol:encquery,aol:q,lycos:query,ask:q,altavista:q,netscape:quer= y,cnn:query,about:terms,mamma:q,alltheweb:q,voila:rdata,virgilio:qs,live:q,= baidu:wd,alice:qs,yandex:text,najdi:q,mama:query,seznam:q,search:q,wp:szuka= j,onet:qt,szukacz:q,yam:k,kvasir:q,sesam:q,ozu:q,terra:query,mynet:q,ekolay= :q,rambler:query".split(","),Xc=3Dfunction(a){if(a.get(Ja)&&!a.get(Xb)){for= (var b=3DRc(a),c=3D{},d=3D0;d< Sc[r];d++){var e=3DSc[d];c[e]=3Da.get(e)}!Tc(a)&&!Uc(a)&&!b&&a.get(vb)&&a.g= et(vb)&&Vc(a,g,"(direct)",g,g,"(direct)","(none)",g,g);a.set(Cb,Wc(a,c));b= =3Da.get(Hb)=3D=3D"(direct)"&&a.get(Eb)=3D=3D"(direct)"&&a.get(Ib)=3D=3D"(n= one)";if(a.get(Cb)||a.get(vb)&&!b)a.set(zb,a.get(I)),a.set(Ab,a.get(ub)),a.= m(Bb)}},Tc=3Dfunction(a){function b(b,d){var d=3Dd||"-",e=3Dra(c.c.get(a.ge= t(b)));return e&&e!=3D"-"?F(e):d}var c=3Dua(G[v].href,a.get(Fa)),d=3Dra(c.c= .get(a.get(La)))||"-",e=3Dra(c.c.get(a.get(Oa)))||"-",f=3Dra(c.c.get(a.get(= Na)))||"-", j=3Dra(c.c.get("dclid"))||"-",o=3Db(Ma,"(not set)"),n=3Db(Pa,"(not set)"),q= =3Db(Qa),pb=3Db(Ra),E=3Db(Sa);if(B(d)&&B(f)&&B(j)&&B(e))return!1;if(E=3D=3D= "1"&&Rc(a))return!1;B(q)&&(E=3Dwa(a.get(eb),a.get(L)),E=3Dua(E,!0),(E=3DYc(= a,E))&&!B(E[1]&&!E[2])&&(q=3DE[1]));Vc(a,d,e,f,j,o,n,q,pb);return!0},Uc=3Df= unction(a){var b=3Dwa(a.get(eb),a.get(L)),c=3Dua(b,!0);if(!(b!=3Dg&&b!=3Dh&= &b!=3D""&&b!=3D"0"&&b!=3D"-"&&b[m]("://")>=3D0)||c&&c[ha][m]("google")>-1&&= c.c.contains("q")&&c.path=3D=3D"cse")return!1;if((b=3DYc(a,c))&&!b[2])retur= n Vc(a,g,b[0],g,g,"(organic)", "organic",b[1],g),!0;else if(b)return!1;if(a.get(vb))a:{for(var b=3Da.get(Z= a),d=3Dta(c[ha]),e=3D0;e-1){a=3D!1;break a}Vc(a,g,d= ,g,g,"(referral)","referral",g,"/"+c.path);a=3D!0}else a=3D!1;return a},Yc= =3Dfunction(a,b){for(var c=3Da.get(Xa),d=3D0;d-1){var f=3Dqa(b.c.get(e[1]));if(f){a:{for(var c= =3Df,d=3Da.get(Ya),c=3DF(c)[z](),j=3D0;j0&&(c=3Db[x](e= ),b=3Db[x](0,e)),f<0?b+"?"+d+c:b+"&"+d+c)};var bd=3D"|",dd=3Dfunction(a,b,c= ,d,e,f,j,o,n){var q=3Dcd(a,b);q||(q=3D{},a.get($a)[k](q));q.id_=3Db;q.affil= iation_=3Dc;q.total_=3Dd;q.tax_=3De;q.shipping_=3Df;q.city_=3Dj;q.state_=3D= o;q.country_=3Dn;q.items_=3D[];return q},ed=3Dfunction(a,b,c,d,e,f,j){var= a=3Dcd(a,b)||dd(a,b,"",0,0,0,"","",""),o;a:{if(a&&a.items_){o=3Da.items_;f= or(var n=3D0;n=3Da.b(Wb,0))return!1;var c=3Dhd();c=3D=3Dg&&(c=3Did());if(c=3D=3Dg||c= =3D=3DInfinity||isNaN(c))return!1;c>0?b(jd(c)):pa(U,"load",function(){kd(a,= b)},!1);return!0},jd=3Dfunction(a){var b=3Dnew Fc,c=3Di.min(i.floor(a/100),= 5E3);b.e(14,1,c>0?c+"00":"0");b.j(14,1,a);return b},hd=3Dfunction(){var a= =3DU.performance||U.webkitPerformance;return(a=3Da&&a.timing)&&a.loadEventS= tart-a.fetchStart},id=3Dfunction(){if(U.top=3D=3DU){var a=3DU.external,b=3D= a&&a.onloadT;a&&!a.isValidLoadTime&&(b=3Dg);b>2147483648&&(b=3Dg); b>0&&a.setPageReadyTime();return b}};var Q=3Dfunction(a,b,c){function d(a){= return function(b){if((b=3Db.get(Yb)[a])&&b[r])for(var c=3D$b(e,a),d=3D0;d<= b[r];d++)b[d].call(e,c)}}var e=3Dthis;this.a=3Dnew fc;this.get=3Dfunction(a= ){return this.a.get(a)};this.set=3Dfunction(a,b,c){this.a.set(a,b,c)};this.= set(ya,b||"UA-XXXXX-X");this.set(Aa,a||"");this.set(za,c||"");this.set(I,i.= round((new Date).getTime()/1E3));this.set(L,"/");this.set(Ba,63072E6);this.= set(Da,15768E6);this.set(Ca,18E5);this.set(Ea,!1);this.set(Wa,50);this.set(= Fa,!1);this.set(Ga,!0);this.set(Ha, !0);this.set(Ia,!0);this.set(Ja,!0);this.set(Ka,!0);this.set(Ma,"utm_campai= gn");this.set(La,"utm_id");this.set(Na,"gclid");this.set(Oa,"utm_source");t= his.set(Pa,"utm_medium");this.set(Qa,"utm_term");this.set(Ra,"utm_content")= ;this.set(Sa,"utm_nooverride");this.set(Ta,100);this.set(Wb,10);this.set(Ua= ,"/__utm.gif");this.set(Va,1);this.set($a,[]);this.set(M,[]);this.set(Xa,Qc= );this.set(Ya,[]);this.set(Za,[]);this.r("auto");this.set(eb,G.referrer);th= is.set(Yb,{hit:[],load:[]});this.a.h("0",$c);this.a.h("1", Pc);this.a.h("2",Xc);this.a.h("4",d("load"));this.a.h("5",gd);this.a.d("A",= rc);this.a.d("B",tc);this.a.d("C",Pc);this.a.d("D",qc);this.a.d("E",bc);thi= s.a.d("F",md);this.a.d("G",Nc);this.a.d("H",uc);this.a.d("I",Bc);this.a.d("= J",Ic);this.a.d("K",d("hit"));this.a.d("L",nd);this.a.d("M",od);this.get(I)= =3D=3D=3D0&&D(111);this.a.G()};A=3DQ[s];A.g=3Dfunction(){var a=3Dthis.get(a= b);a||(a=3Dnew Fc,this.set(ab,a));return a}; A.oa=3Dfunction(a){for(var b in a){var c=3Da[b];a.hasOwnProperty(b)&&typeof= c!=3D"function"&&this.set(b,c,!0)}};A.ka=3Dfunction(a){a&&a!=3Dg&&(a.const= ructor+"")[m]("String")>-1?(D(13),this.set(cb,a,!0)):typeof a=3D=3D=3D"obje= ct"&&a!=3D=3Dh&&this.oa(a);this.a.f("page")};A.t=3Dfunction(a,b,c,d){if(a= =3D=3D""||!Dc(a)||b=3D=3D""||!Dc(b))return!1;if(c!=3Dg&&!Dc(c))return!1;if(= d!=3Dg&&!Ec(d))return!1;this.set(Nb,a,!0);this.set(Ob,b,!0);this.set(Pb,c,!= 0);this.set(Qb,d,!0);this.a.f("event");return!0}; A.la=3Dfunction(a,b,c,d){if(!a||!b)return!1;this.set(Rb,a[x](0,15),!0);this= .set(Ub,b[x](0,15),!0);this.set(Vb,c||G[v].href,!0);d&&this.set(cb,d,!0);th= is.a.f("social");return!0};A.ja=3Dfunction(){var a=3Dthis;return kd(this.a,= function(b){a.s(b)})};A.ma=3Dfunction(){this.a.f("trans")};A.s=3Dfunction(a= ){this.set(bb,a,!0);this.a.f("event")};A.S=3Dfunction(a){this.l();var b=3Dt= his;return{_trackEvent:function(c,d,e){D(91);b.t(a,c,d,e)}}};A.V=3Dfunction= (a){return this.get(a)}; A.da=3Dfunction(a,b){if(a)if(a!=3Dg&&(a.constructor+"")[m]("String")>-1)thi= s.set(a,b);else if(typeof a=3D=3D"object")for(var c in a)a.hasOwnProperty(c= )&&this.set(c,a[c])};A.addEventListener=3Dfunction(a,b){var c=3Dthis.get(Yb= )[a];c&&c[k](b)};A.removeEventListener=3Dfunction(a,b){for(var c=3Dthis.get= (Yb)[a],d=3D0;c&&de.get(Wa))a=3D!1;else if(!b||!c||C(b)[r]+C(c)[r]>64)a=3D!1;else{d= !=3D1&&d!=3D2&&(d=3D3);var f=3D{};ca(f,b);f.value=3Dc;f.scope=3Dd;e.get(M)[= a]=3Df;a=3D!0}a&&this.a.i();return a};A.U=3Dfunction(a){this.a.get(M)[a]=3D= g;this.a.i()};A.Y=3Dfunction(a){return(a=3Dthis.a.get(M)[a])&&a[ia]=3D=3D1?= a[ea]:g};A.ha=3Dfunction(a,b,c){this.g().e(a,b,c)};A.ia=3Dfunction(a,b,c){t= his.g().j(a,b,c)};A.Z=3Dfunction(a,b){return this.g().w(a,b)}; A.$=3Dfunction(a,b){return this.g().z(a,b)};A.P=3Dfunction(a){this.g().u(a)= };A.Q=3Dfunction(a){this.g().v(a)};A.T=3Dfunction(){return new Fc};A.H=3Dfu= nction(a){a&&this.get(Ya)[k](a[z]())};A.M=3Dfunction(){this.set(Ya,[])};A.I= =3Dfunction(a){a&&this.get(Za)[k](a[z]())};A.N=3Dfunction(){this.set(Za,[])= };A.K=3Dfunction(a,b,c){if(a&&b){var d=3Dthis.get(Xa);d.splice(c?0:d[r],0,a= +":"+b[z]())}};A.O=3Dfunction(){this.set(Xa,[])}; A.R=3Dfunction(a){this.a[da]();var b=3Dthis.get(L),c=3Dqa(V("__utmx"))||"";= this.set(L,a);this.a.i();Mc(this.a,"__utmx",c);this.set(L,b)};A.l=3Dfunctio= n(){this.a[da]()};A.ga=3Dfunction(a){a&&a!=3D""&&(this.set(nb,a),this.a.f("= var"))};var md=3Dfunction(a){a.get(Lb)!=3D=3D"trans"&&a.b(xb,0)>=3D500&&a[u= ]();if(a.get(Lb)=3D=3D=3D"event"){var b=3D(new Date).getTime(),c=3Da.b(yb,0= ),d=3Da.b(tb,0),c=3Di.floor(0.2*((b-(c!=3Dd?c:c*1E3))/1E3));c>0&&(a.set(yb,= b),a.set(O,i.min(10,a.b(O,0)+c)));a.b(O,0)<=3D0&&a[u]()}},od=3Dfunction(a){= a.get(Lb)=3D=3D=3D"event"&&a.set(O,i.max(0,a.b(O,10)-1))};var pd=3Dfunction= (){var a=3D[];this.add=3Dfunction(b,c,d){d&&(c=3DC(""+c));a[k](b+"=3D"+c)};= this.toString=3Dfunction(){return a[y]("&")}},qd=3Dfunction(a,b){(b||a.get(= Va)!=3D2)&&a.m(xb)},rd=3Dfunction(a,b){b.add("utmwv","5.1.0");b.add("utms",= a.get(xb));b.add("utmn",na());var c=3DG[v].hostname;B(c)||b.add("utmhn",c,!= 0);c=3Da.get(Ta);c!=3D100&&b.add("utmsp",c,!0)},td=3Dfunction(a,b){b.add("u= tmac",a.get(ya));sd(a,b);Z.o&&b.add("aip",1);b.add("utmu",vc.va())},sd=3Dfu= nction(a,b){function c(a,b){b&&d[k](a+"=3D"+b+";")}var d=3D[];c("__utma", hc(a));c("__utmz",nc(a,!1));c("__utmv",kc(a,!0));c("__utmx",qa(V("__utmx"))= );b.add("utmcc",d[y]("+"),!0)},ud=3Dfunction(a,b){a.get(Ha)&&(b.add("utmcs"= ,a.get(lb),!0),b.add("utmsr",a.get(gb)),b.add("utmsc",a.get(hb)),b.add("utm= ul",a.get(kb)),b.add("utmje",a.get(ib)),b.add("utmfl",a.get(jb),!0))},vd=3D= function(a,b){a.get(Ka)&&a.get(db)&&b.add("utmdt",a.get(db),!0);b.add("utmh= id",a.get(fb));b.add("utmr",wa(a.get(eb),a.get(L)),!0);b.add("utmp",C(a.get= (cb),!0),!0)},wd=3Dfunction(a,b){for(var c=3Da.get(ab),d=3Da.get(bb), e=3Da.get(M)||[],f=3D0;f=3D0&&![].reduce)= throw new Dd(a[r]);Fd(a,b)||Gd(a,b)}else throw new Cd(a[r]);},Ed=3Dfunction= (a,b,c){var c=3Dc||Bd+"/__utm.gif?",d=3Dnew Image(1,1);d.src=3Dc+a;d.onload= =3Dfunction(){d.onload=3D h;b()}},Fd=3Dfunction(a,b){var c,d=3DBd+"/p/__utm.gif",e=3DU.XDomainRequest= ;if(e)c=3Dnew e,c.open("POST",d);else if(e=3DU.XMLHttpRequest)e=3Dnew e,"wi= thCredentials"in e&&(c=3De,c.open("POST",d,!0),c.setRequestHeader("Content-= Type","text/plain"));if(c)return c.onreadystatechange=3Dfunction(){c.readyS= tate=3D=3D4&&(b(),c=3Dh)},c.send(a),!0},Gd=3Dfunction(a,b){if(G.body){a=3Da= a(a);try{var c=3DG.createElement('')}catch(= d){c=3DG.createElement("iframe"),ca(c,a)}c.height=3D"0";c.width=3D"0";c.sty= le.display=3D"none"; c.style.visibility=3D"hidden";var e=3DG[v],e=3DBd+"/u/post_iframe.html#"+aa= (e.protocol+"//"+e[ha]+"/favicon.ico"),f=3Dfunction(){c.src=3D"";c.parentNo= de&&c.parentNode.removeChild(c)};pa(U,"beforeunload",f);var j=3D!1,o=3D0,n= =3Dfunction(){if(!j){try{if(o>9||c.contentWindow[v][ha]=3D=3DG[v][ha]){j=3D= !0;f();var a=3DU;a.removeEventListener?a.removeEventListener("beforeunload"= ,f,!1):a.detachEvent&&a.detachEvent("onbeforeunload",f);b();return}}catch(d= ){}o++;setTimeout(n,200)}};pa(c,"load",n);G.body.appendChild(c);c.src=3De}e= lse wc(function(){Gd(a, b)},100)};var $=3Dfunction(){this.o=3D!1;this.A=3D{};this.ra=3D0;this._gaso= CPath=3Dthis._gasoDomain=3Dg;P($[s],"_createTracker",$[s].k,55);P($[s],"_ge= tTracker",$[s].ta,0);P($[s],"_getTrackerByName",$[s].p,51);P($[s],"_anonymi= zeIp",$[s].sa,16);Zb()};$[s].ta=3Dfunction(a,b){return this.k(a,g,b)};$[s].= k=3Dfunction(a,b,c){b&&D(23);c&&D(67);b=3D=3Dg&&(b=3D"~"+Z.ra++);return Z.A= [b]=3Dnew Q(b,a,c)};$[s].p=3Dfunction(a){a=3Da||"";return Z.A[a]||Z.k(g,a)}= ;$[s].sa=3Dfunction(){this.o=3D!0};var Z=3Dnew $;var Hd=3DU._gat;Hd&&typeof= Hd._getTracker=3D=3D"function"?Z=3DHd:U._gat=3DZ;var Cc=3Dnew Y;a:{var Id= =3DU._gaq,Jd=3D!1;if(Id&&typeof Id[k]=3D=3D"function"&&(Jd=3DObject[s][p].c= all(Object(Id))=3D=3D"[object Array]",!Jd)){Cc=3DId;break a}U._gaq=3DCc;Jd&= &Cc[k].apply(Cc,Id)};})(); ------=_NextPart_000_0000_4A1CA263.E04924BE Content-Type: text/javascript Content-Transfer-Encoding: quoted-printable Content-Location: http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/translatemypage.xml&up_source_language=en&w=160&h=60&title=&border=&output=js (function(){ var css=3D''; var html=3D'\x3ctable class\x3d\x22gadget\x22 cellspacing\x3d0 cellpadding\= x3d0 width\x3d160\x3e\x3ctr\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d\x222= \x22\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d2\x3e\x3ciframe= src\x3d\x22http://www.gmodules.com/gadgets/ifr?url\x3dhttp%3A%2F%2Fwww.goo= gle.com%2Fig%2Fmodules%2Ftranslatemypage.xml\x26container\x3ddefault\x26vie= w\x3dhome\x26lang\x3dall\x26country\x3dALL\x26debug\x3d0\x26nocache\x3d0\x2= 6sanitize\x3d0\x26v\x3d52a609247fde8e10\x26source\x3d__LOCATION__\x26parent= \x3d__LOCATION__\x26libs\x3dcore%3Acore.io#up_source_language\x3den\x26st\x= 3d%25st%25\x22 width\x3d160 height\x3d60 style\x3d\x22display:block;\x22 fr= ameborder\x3d0 scrolling\x3d\x22no\x22\x3e\x3c/iframe\x3e\x3c/td\x3e\x3c/tr= \x3e\x3ctr\x3e\x3ctd style\x3d\x22text-align:left;vertical-align:middle;hei= ght:28px;\x22\x3e\x3ca href\x3d\x22http://fusion.google.com/ig/add?synd\x3d= open\x26source\x3dggyp\x26moduleurl\x3dhttp://www.google.com/ig/modules/tra= nslatemypage.xml\x22 target\x3d\x22_top\x22\x3e\x3cimg style\x3d\x22border:= 0;\x22 src\x3d\x22http://www.gmodules.com/ig/images/plus_google.gif\x22\x3e= \x3c/a\x3e\x3c/td\x3e\x3ctd style\x3d\x22text-align:right;vertical-align:mi= ddle;height:28px;\x22\x3e\x3cspan class\x3d\x22powered\x22\x3e\x3ca href\x3= d\x22http://www.google.com/webmasters/gadgets.html\x22 target\x3d\x22_top\x= 22\x3eGadgets\x3c/a\x3e powered by Google\x3c/span\x3e\x3c/td\x3e\x3c/tr\x3= e\x3c/table\x3e'; html=3Dhtml.replace(/__LOCATION__/g, encodeURIComponent(location.href)); document.write(css+html); })(); ------=_NextPart_000_0000_4A1CA263.E04924BE Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Location: http://www.gmodules.com/gadgets/ifr?url=http%3A%2F%2Fwww.google.com%2Fig%2Fmodules%2Ftranslatemypage.xml&container=default&view=home&lang=all&country=ALL&debug=0&nocache=0&sanitize=0&v=33f8ad50cd52ca72&source=http%3A%2F%2Fwww.itagsoftware.com%2Fcompatibility.php&parent=http%3A%2F%2Fwww.itagsoftware.com%2Fcompatibility.php&libs=core%3Acore.io#up_source_language=en&st=%25st%25 =EF=BB=BF
Update this gadget. Click here
=20 ------=_NextPart_000_0000_4A1CA263.E04924BE Content-Type: text/javascript Content-Transfer-Encoding: quoted-printable Content-Location: http://www.gmodules.com/gadgets/js/core:core.io.js?container=default&nocache=0&debug=0&c=0&v=5c433bbc618c883006d96faf03d31130&sv=7&jsload=0 window['___jsl'] =3D window['___jsl'] || {};window['___jsl']['u'] =3D 'http= :\/\/www.gmodules.com\/gadgets\/js\/core:core.io.js?container=3Ddefault&noc= ache=3D0&debug=3D0&c=3D0&v=3D5c433bbc618c883006d96faf03d31130&sv=3D7&jsload= =3D0';window['___jsl']['f'] =3D ['core','core.io']; /* [start] feature=3Dgapi-globals */ var gapi=3Dwindow.gapi||{}; ; /* [end] feature=3Dgapi-globals */ /* [start] feature=3Dglobals */ var gadgets=3Dwindow.gadgets||{},shindig=3Dwindow.shindig||{},osapi=3Dwindo= w.osapi||{},google=3Dwindow.google||{}; ; /* [end] feature=3Dglobals */ /* [start] feature=3Dtaming */ var safeJSON=3Dwindow.safeJSON; var tamings___=3Dwindow.tamings___||[]; var bridge___; var caja___=3Dwindow.caja___; var ___=3Dwindow.___;; /* [end] feature=3Dtaming */ /* [start] feature=3Dcore.config.base */ window['___cfg'] =3D window['___cfg'] || window['___gcfg'];; if(!window.gadgets["config"]){gadgets.config=3Dfunction(){var f; var h=3D{}; var b=3D{}; function c(j,l){for(var k in l){if(!l.hasOwnProperty(k)){continue }if(typeof j[k]=3D=3D=3D"object"&&typeof l[k]=3D=3D=3D"object"){c(j[k],l[k]) }else{j[k]=3Dl[k] }}}function i(){var j=3Ddocument.scripts||document.getElementsByTagName("sc= ript"); if(!j||j.length=3D=3D0){return null }var m; if(f.u){for(var k=3D0; !m&&k1){for(var b=3D0,a; (a=3Darguments[b]); ++b){c.push(a) }}else{c=3Dd }return function(f){for(var e=3D0,g; (g=3Dc[e]); ++e){if(f=3D=3D=3Dc[e]){return true }}return false } }; gadgets.config.RegExValidator=3Dfunction(a){return function(b){return a.tes= t(b) } }; gadgets.config.ExistsValidator=3Dfunction(a){return typeof a!=3D=3D"undefin= ed" }; gadgets.config.NonEmptyStringValidator=3Dfunction(a){return typeof a=3D=3D= =3D"string"&&a.length>0 }; gadgets.config.BooleanValidator=3Dfunction(a){return typeof a=3D=3D=3D"bool= ean" }; gadgets.config.LikeValidator=3Dfunction(a){return function(c){for(var d in= a){if(a.hasOwnProperty(d)){var b=3Da[d]; if(!b(c[d])){return false }}}return true } } })();; /* [end] feature=3Dcore.config */ /* [start] feature=3Dcore.util.base */ gadgets.util=3Dgadgets.util||{}; gadgets.util.makeClosure=3Dfunction(d,f,e){var c=3D[]; for(var b=3D2,a=3Darguments.length; b"); return e.join("") }function a(f){var g=3D""; if(f.nodeType=3D=3D3||f.nodeType=3D=3D4){g=3Df.nodeValue }else{if(f.innerText){g=3Df.innerText }else{if(f.innerHTML){g=3Df.innerHTML }else{if(f.firstChild){var e=3D[]; for(var h=3Df.firstChild; h; h=3Dh.nextSibling){e.push(a(h)) }g=3De.join("") }}}}return g }gadgets.util.createElement=3Dfunction(f){var e; if((!document.body)||document.body.namespaceURI){try{e=3Ddocument.createEle= mentNS(c,f) }catch(g){}}return e||document.createElement(f) }; gadgets.util.createIframeElement=3Dfunction(g){var i=3Dgadgets.util.createE= lement("iframe"); try{var e=3Dd("iframe",g); var f=3Dgadgets.util.createElement(e); if(f&&((!i)||((f.tagName=3D=3Di.tagName)&&(f.namespaceURI=3D=3Di.namespaceU= RI)))){i=3Df }}catch(h){}b(i,g); return i }; gadgets.util.getBodyElement=3Dfunction(){if(document.body){return document.= body }try{var f=3Ddocument.getElementsByTagNameNS(c,"body"); if(f&&(f.length=3D=3D1)){return f[0] }}catch(e){}return document.documentElement||document }; gadgets.util.getInnerText=3Dfunction(e){return a(e) } })();; /* [end] feature=3Dcore.util.dom */ /* [start] feature=3Dcore.util.event */ gadgets.util=3Dgadgets.util||{}; gadgets.util.attachBrowserEvent=3Dfunction(c,b,d,a){if(typeof c.addEventLis= tener!=3D"undefined"){c.addEventListener(b,d,a) }else{if(typeof c.attachEvent!=3D"undefined"){c.attachEvent("on"+b,d) }else{gadgets.warn("cannot attachBrowserEvent: "+b) }}}; gadgets.util.removeBrowserEvent=3Dfunction(c,b,d,a){if(c.removeEventListene= r){c.removeEventListener(b,d,a) }else{if(c.detachEvent){c.detachEvent("on"+b,d) }else{gadgets.warn("cannot removeBrowserEvent: "+b) }}};; /* [end] feature=3Dcore.util.event */ /* [start] feature=3Dcore.util.onload */ gadgets.util=3Dgadgets.util||{}; (function(){var a=3D[]; gadgets.util.registerOnLoadHandler=3Dfunction(b){a.push(b) }; gadgets.util.runOnLoadHandlers=3Dfunction(){for(var c=3D0,b=3Da.length; c"; function processResponse(url,callback,params,xobj){if(hadError(xobj,callbac= k)){return }var txt=3Dxobj.responseText; var offset=3Dtxt.indexOf(UNPARSEABLE_CRUFT)+UNPARSEABLE_CRUFT.length; if(offset=3D400){resp.errors=3D[resp.rc+" Error"] }else{if(resp.text){if(resp.rc>=3D300&&resp.rc<400){params.CONTENT_TYPE=3D"= TEXT" }switch(params.CONTENT_TYPE){case"JSON":case"FEED":resp.data=3Dgadgets.json= .parse(resp.text); if(!resp.data){resp.errors.push("500 Failed to parse JSON"); resp.rc=3D500; resp.data=3Dnull }break; case"DOM":var dom; if(typeof ActiveXObject!=3D"undefined"){dom=3Dnew ActiveXObject("Microsoft.= XMLDOM"); dom.async=3Dfalse; dom.validateOnParse=3Dfalse; dom.resolveExternals=3Dfalse; if(!dom.loadXML(resp.text)){resp.errors.push("500 Failed to parse XML"); resp.rc=3D500 }else{resp.data=3Ddom }}else{var parser=3Dnew DOMParser(); dom=3Dparser.parseFromString(resp.text,"text/xml"); if("parsererror"=3D=3D=3Ddom.documentElement.nodeName){resp.errors.push("50= 0 Failed to parse XML"); resp.rc=3D500 }else{resp.data=3Ddom }}break; default:resp.data=3Dresp.text; break }}}return resp }function makeXhrRequest(realUrl,proxyUrl,callback,paramData,method,params,= processResponseFunction,opt_headers){var xhr=3DmakeXhr(); if(proxyUrl.indexOf("//")=3D=3D0){proxyUrl=3Ddocument.location.protocol+pro= xyUrl }xhr.open(method,proxyUrl,true); if(callback){xhr.onreadystatechange=3Dgadgets.util.makeClosure(null,process= ResponseFunction,realUrl,callback,params,xhr) }if(paramData!=3D=3Dnull){var contentTypeHeader=3D"Content-Type"; var contentType=3D"application/x-www-form-urlencoded"; if(typeof opt_headers=3D=3D=3D"string"){contentType=3Dopt_headers; opt_headers=3D{} }var headers=3Dopt_headers||{}; if(!headers[contentTypeHeader]){headers[contentTypeHeader]=3DcontentType }for(var headerName in headers){xhr.setRequestHeader(headerName,headers[hea= derName]) }}xhr.send(paramData) }function respondWithPreload(postData,params,callback){if(gadgets.io.preloa= ded_&&postData.httpMethod=3D=3D=3D"GET"){for(var i=3D0; i0){var extraparams=3D"?refresh=3D"+refreshInterval+"&"= +gadgets.io.encodeValues(paramData); makeXhrRequest(url,proxyUrl+extraparams,callback,null,"GET",params,processR= esponse) }else{makeXhrRequest(url,proxyUrl,callback,gadgets.io.encodeValues(paramDat= a),"POST",params,processResponse) }}},makeNonProxiedRequest:function(relativeUrl,callback,opt_params,opt_head= ers){var params=3Dopt_params||{}; makeXhrRequest(relativeUrl,relativeUrl,callback,params.POST_DATA,params.MET= HOD,params,processNonProxiedResponse,opt_headers) },clearOAuthState:function(){oauthState=3Dundefined },encodeValues:function(fields,opt_noEscaping){var escape=3D!opt_noEscaping; var buf=3D[]; var first=3Dfalse; for(var i in fields){if(fields.hasOwnProperty(i)&&!/___$/.test(i)){if(!firs= t){first=3Dtrue }else{buf.push("&") }buf.push(escape?encodeURIComponent(i):i); buf.push("=3D"); buf.push(escape?encodeURIComponent(fields[i]):fields[i]) }}return buf.join("") },getProxyUrl:function(url,opt_params){var params=3Dopt_params||{}; var refresh=3Dparams.REFRESH_INTERVAL; if(refresh=3D=3D=3Dundefined){refresh=3D"3600" }var urlParams=3Dgadgets.util.getUrlParameters(); var rewriteMimeParam=3Dparams.rewriteMime?"&rewriteMime=3D"+encodeURICompon= ent(params.rewriteMime):""; var ret=3Dconfig.proxyUrl.replace("%url%",encodeURIComponent(url)).replace(= "%host%",document.location.host).replace("%rawurl%",url).replace("%refresh%= ",encodeURIComponent(refresh)).replace("%gadget%",encodeURIComponent(urlPar= ams.url)).replace("%container%",encodeURIComponent(urlParams.container||url= Params.synd||"default")).replace("%rewriteMime%",rewriteMimeParam); if(ret.indexOf("//")=3D=3D0){ret=3Dwindow.location.protocol+ret }return ret }} }(); gadgets.io.RequestParameters=3Dgadgets.util.makeEnum(["METHOD","CONTENT_TYP= E","POST_DATA","HEADERS","AUTHORIZATION","NUM_ENTRIES","GET_SUMMARIES","GET= _FULL_HEADERS","REFRESH_INTERVAL","OAUTH_SERVICE_NAME","OAUTH_USE_TOKEN","O= AUTH_TOKEN_NAME","OAUTH_REQUEST_TOKEN","OAUTH_REQUEST_TOKEN_SECRET","OAUTH_= RECEIVED_CALLBACK"]); gadgets.io.MethodType=3Dgadgets.util.makeEnum(["GET","POST","PUT","DELETE",= "HEAD"]); gadgets.io.ContentType=3Dgadgets.util.makeEnum(["TEXT","DOM","JSON","FEED"]= ); gadgets.io.AuthorizationType=3Dgadgets.util.makeEnum(["NONE","SIGNED","OAUT= H"]);; /* [end] feature=3Dcore.io */ /* [start] feature=3Dcore.prefs */ (function(){var i=3Dnull; var j=3D{}; var f=3Dgadgets.util.escapeString; var d=3D{}; var h=3D{}; var e=3D"en"; var b=3D"US"; var a=3D0; function c(){var l=3Dgadgets.util.getUrlParameters(); for(var k in l){if(l.hasOwnProperty(k)){if(k.indexOf("up_")=3D=3D=3D0&&k.le= ngth>3){j[k.substr(3)]=3DString(l[k]) }else{if(k=3D=3D=3D"country"){b=3Dl[k] }else{if(k=3D=3D=3D"lang"){e=3Dl[k] }else{if(k=3D=3D=3D"mid"){a=3Dl[k] }}}}}}}function g(){for(var k in h){if(typeof j[k]=3D=3D=3D"undefined"){j[k= ]=3Dh[k] }}}gadgets.Prefs=3Dfunction(){if(!i){c(); g(); i=3Dthis }return i }; gadgets.Prefs.setInternal_=3Dfunction(n,p){var o=3Dfalse; if(typeof n=3D=3D=3D"string"){if(!j.hasOwnProperty(n)||j[n]!=3D=3Dp){o=3Dtr= ue }j[n]=3Dp }else{for(var m in n){if(n.hasOwnProperty(m)){var l=3Dn[m]; if(!j.hasOwnProperty(m)||j[m]!=3D=3Dl){o=3Dtrue }j[m]=3Dl }}}return o }; gadgets.Prefs.setMessages_=3Dfunction(k){d=3Dk }; gadgets.Prefs.setDefaultPrefs_=3Dfunction(k){h=3Dk }; gadgets.Prefs.prototype.getString=3Dfunction(k){if(k=3D=3D=3D".lang"){k=3D"= lang" }return j[k]?f(j[k]):"" }; gadgets.Prefs.prototype.setDontEscape_=3Dfunction(){f=3Dfunction(l){return l } }; gadgets.Prefs.prototype.getInt=3Dfunction(k){var l=3DparseInt(j[k],10); return isNaN(l)?0:l }; gadgets.Prefs.prototype.getFloat=3Dfunction(k){var l=3DparseFloat(j[k]); return isNaN(l)?0:l }; gadgets.Prefs.prototype.getBool=3Dfunction(k){var l=3Dj[k]; if(l){return l=3D=3D=3D"true"||l=3D=3D=3Dtrue||!!parseInt(l,10) }return false }; gadgets.Prefs.prototype.set=3Dfunction(k,l){throw new Error("setprefs featu= re required to make this call.") }; gadgets.Prefs.prototype.getArray=3Dfunction(n){var o=3Dj[n]; if(o){var k=3Do.split("|"); for(var m=3D0,l=3Dk.length; m0){j.data.ErrorMsg=3Dj.errors[0] }if(j.data.link){j.data.URL=3Db }if(j.data.title){j.data.Title=3Dj.data.title }if(j.data.description){j.data.Description=3Dj.data.description }if(j.data.link){j.data.Link=3Dj.data.link }if(j.data.items&&j.data.items.length>0){j.data.Entry=3Dj.data.items; for(var h=3D0; h]+>/g,"") }function _trim(a){return a.replace(/^\s+|\s+$/g,"") }function _toggle(a){a=3D(typeof a=3D=3D=3D"string")?_gel(a):a; if(a!=3D=3Dnull){if(a.style.display.length=3D=3D=3D0||a.style.display=3D=3D= =3D"block"){a.style.display=3D"none" }else{if(a.style.display=3D=3D=3D"none"){a.style.display=3D"block" }}}}var _uid=3D(function(){var a=3D0; return function(){return a++ } })(); function _min(d,c){return(dc?d:c) }function _exportSymbols(a,c){var m=3Dwindow; var f=3Da.split("."); for(var h=3D0,g=3Df.length; h','amp':'&','nbs= p':'\xa0','quot':'\"','apos':'\''},decimalEscapeRe=3D/^#(\d+)$/,hexEscapeRe= =3D/^#x([0-9A-Fa-f]+)$/;function lookupEntity(name){var m;return name=3Dlcase(name),ENTITIES.hasOwnProperty(= name)?ENTITIES[name]:(m=3Dname.match(decimalEscapeRe),m?String.fromCharCode= (parseInt(m[1],10)):(m=3Dname.match(hexEscapeRe))?String.fromCharCode(parse= Int(m[1],16)):'')}function decodeOneEntity(_,name){return lookupEntity(name)}nulRe=3D/\0/g;function st= ripNULs(s){return s.replace(nulRe,'')}entityRe=3D/&(#\d+|#x[0-9A-Fa-f]+|\w+= );/g;function unescapeEntities(s){return s.replace(entityRe,decodeOneEntity)}ampRe=3D/&/g= ,looseAmpRe=3D/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,ltRe=3D//g,quotRe=3D/\"/g,eqRe=3D/\=3D/g;function escapeAttrib(s){return s.replace(ampRe,'&').replace(ltRe,'<').replac= e(gtRe,'>').replace(quotRe,'"').replace(eqRe,'=')}function normalizeRCData(rcdata){return rcdata.replace(looseAmpRe,'&$1').replace= (ltRe,'<').replace(gtRe,'>')}INSIDE_TAG_TOKEN=3Dnew RegExp('^\\s*(?:(?:([a-z][a-z-]*)(\\s*=3D\\s*(\"[^\"]*\"|\'[^\']*\'|(?=3D[a= -z][a-z-]*\\s*=3D)|[^>\"\'\\s]*))?)|(/?>)|[\\s\\S][^a-z\\s>]*)','i'),OUTSID= E_TAG_TOKEN=3Dnew RegExp('^(?:&(\\#[0-9]+|\\#[x][0-9a-f]+|\\w+);||]*= >|<\\?[^>*]*>|<(/)?([a-z][a-z0-9]*)|([^<&>]+)|([<&>]))','i');function makeSaxParser(handler){return function parse(htmlText,param){var attribName= ,attribs,dataEnd,decodedValue,eflags,encodedValue,htmlLower,inTag,m,openTag= ,tagName;htmlText=3DString(htmlText),htmlLower=3Dnull,inTag=3Dfalse,attribs= =3D[],tagName=3Dvoid 0,eflags=3Dvoid 0,openTag=3Dvoid 0,handler.startDoc&&handler.startDoc(param= );while(htmlText){m=3DhtmlText.match(inTag?INSIDE_TAG_TOKEN:OUTSIDE_TAG_TOK= EN),htmlText=3DhtmlText.substring(m[0].length);if(inTag){if(m[1]){attribNam= e=3Dlcase(m[1]);if(m[2]){encodedValue=3Dm[3];switch(encodedValue.charCodeAt= (0)){case 34:case 39:encodedValue=3DencodedValue.substring(1,encodedValue.length-1)}d= ecodedValue=3DunescapeEntities(stripNULs(encodedValue))}else decodedValue=3DattribName;attribs.push(attribName,decodedValue)}else if(m[4= ])eflags!=3D=3Dvoid 0&&(openTag?handler.startTag&&handler.startTag(tagName,attribs,param):handl= er.endTag&&handler.endTag(tagName,param)),openTag&&eflags&(html4 .eflags.CDATA|html4 .eflags.RCDATA)&&(htmlLower=3D=3D=3Dnull?(htmlLower=3Dl= case(htmlText)):(htmlLower=3DhtmlLower.substring(htmlLower.length-htmlText.= length)),dataEnd=3DhtmlLower.indexOf('':handler.pcdata('>',param);break;default:handler.pcdata('= &',param)}}}handler.endDoc&&handler.endDoc(param)}}function makeHtmlSanitizer(sanitizeAttributes){var ignoring,stack;return makeSaxPars= er({'startDoc':function(_){stack=3D[],ignoring=3Dfalse},'startTag':function= (tagName,attribs,out){var attribName,eflags,i,n,value;if(ignoring)return;if(!html4 .ELEMENTS.hasOwnPr= operty(tagName))return;eflags=3Dhtml4 .ELEMENTS[tagName];if(eflags&html4 .eflags.FOLDABLE)return;else if(eflags&h= tml4 .eflags.UNSAFE)return ignoring=3D!(eflags&html4 .eflags.EMPTY),void 0;attribs=3DsanitizeAttributes(tagName,attribs);if(attr= ibs){eflags&html4 .eflags.EMPTY||stack.push(tagName),out.push('<',tagName);for(i=3D0,n=3Dattr= ibs.length;i')}= },'endTag':function(tagName,out){var eflags,i,index,stackEl;if(ignoring)return ignoring=3Dfalse,void 0;if(!html4= .ELEMENTS.hasOwnProperty(tagName))return;eflags=3Dhtml4 .ELEMENTS[tagName];if(!(eflags&(html4 .eflags.UNSAFE|html4 .eflags.EMPTY|ht= ml4 .eflags.FOLDABLE))){if(eflags&html4 .eflags.OPTIONAL_ENDTAG)for(index=3Dstack.length;--index>=3D0;){stackEl=3Ds= tack[index];if(stackEl=3D=3D=3DtagName)break;if(!(html4 .ELEMENTS[stackEl]&html4 .eflags.OPTIONAL_ENDTAG))return}else for(index=3Ds= tack.length;--index>=3D0;)if(stack[index]=3D=3D=3DtagName)break;if(index<0)= return;for(i=3Dstack.length;--i>index;)stackEl=3Dstack[i],html4 .ELEMENTS[stackEl]&html4 .eflags.OPTIONAL_ENDTAG||out.push(''= );stack.length=3Dindex,out.push('')}},'pcdata':function(text,= out){ignoring||out.push(text)},'rcdata':function(text,out){ignoring||out.pu= sh(text)},'cdata':function(text,out){ignoring||out.push(text)},'endDoc':fun= ction(out){var i;for(i=3Dstack.length;--i>=3D0;)out.push('');stack.length= =3D0}})}function sanitize(htmlText,opt_uriPolicy,opt_nmTokenPolicy){var out=3D[];return make= HtmlSanitizer(function sanitizeAttribs(tagName,attribs){var attribKey,attribName,atype,i,value;for= (i=3D0;itable.gadget{background-position:0%;background:transparen= t none;border-collapse:collapse;border:0;clear:none;float:none;font-family:= arial,sans-serif;font-style:normal;font-variant:normal;height:auto;letter-s= pacing:normal;line-height:normal;margin:0;padding:0;text-indent:0;text-tran= sform:none;top:auto;vertical-align:middle;white-space:normal;width:auto;wor= d-spacing:normal;}table.gadget span.title a:hover,table.gadget span.title= a:visited,table.gadget span.title a:active,table.gadget span.title{font-si= ze:12px;color:#0000cc}table.gadget span.powered a:hover,table.gadget span.p= owered a:visited,table.gadget span.powered a:active,table.gadget span.power= ed{font-size:10px;color:#0000cc}'; var html=3D'\x3ctable class\x3d\x22gadget\x22 cellspacing\x3d0 cellpadding\= x3d0 width\x3d160\x3e\x3ctr\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d\x222= \x22\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d2\x3e\x3ciframe= src\x3d\x22http://www.gmodules.com/gadgets/ifr?url\x3dhttp%3A%2F%2Fwww.goo= gle.com%2Fig%2Fmodules%2Ftranslatemypage.xml\x26container\x3ddefault\x26vie= w\x3dhome\x26lang\x3dall\x26country\x3dALL\x26debug\x3d0\x26nocache\x3d0\x2= 6sanitize\x3d0\x26v\x3d52a609247fde8e10\x26source\x3d__LOCATION__\x26parent= \x3d__LOCATION__\x26libs\x3dcore%3Acore.io#up_source_language\x3den\x26st\x= 3d%25st%25\x22 width\x3d160 height\x3d60 style\x3d\x22display:block;\x22 fr= ameborder\x3d0 scrolling\x3d\x22no\x22\x3e\x3c/iframe\x3e\x3c/td\x3e\x3c/tr= \x3e\x3ctr\x3e\x3ctd style\x3d\x22text-align:left;vertical-align:middle;hei= ght:28px;\x22\x3e\x3ca href\x3d\x22http://fusion.google.com/ig/add?synd\x3d= open\x26source\x3dggyp\x26moduleurl\x3dhttp://www.google.com/ig/modules/tra= nslatemypage.xml\x22 target\x3d\x22_top\x22\x3e\x3cimg style\x3d\x22border:= 0;\x22 src\x3d\x22http://www.gmodules.com/ig/images/plus_google.gif\x22\x3e= \x3c/a\x3e\x3c/td\x3e\x3ctd style\x3d\x22text-align:right;vertical-align:mi= ddle;height:28px;\x22\x3e\x3cspan class\x3d\x22powered\x22\x3e\x3ca href\x3= d\x22http://www.google.com/webmasters/gadgets.html\x22 target\x3d\x22_top\x= 22\x3eGadgets\x3c/a\x3e powered by Google\x3c/span\x3e\x3c/td\x3e\x3c/tr\x3= e\x3c/table\x3e'; html=3Dhtml.replace(/__LOCATION__/g, encodeURIComponent(location.href)); document.write(css+html); })(); ------=_NextPart_000_0000_4A1CA263.E04924BE--