From: =?windows-1251?B?0e718ODt5e3uIFdpbmRvd3MgSW50ZXJuZXQgRXhwbG9yZXIgNw==?= Subject: =?windows-1251?B?xOzo8vDo6SDM4Orx6Ozu4iAtINfl8O3g/yDv5fjq4A==?= Date: Fri, 15 May 2009 11:28:04 +0700 MIME-Version: 1.0 Content-Type: multipart/related; type="text/html"; boundary="----=_NextPart_000_0000_01C9D550.3691BAF0" X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049 This is a multi-part message in MIME format. ------=_NextPart_000_0000_01C9D550.3691BAF0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Location: =?utf-8?B?ZmlsZTovL0Y6XDBcQmxhY2sgUGF3blxjaGVybm92b2o=?= =?utf-8?B?XDQtMDBcNC0wMlzQlNC80LjRgtGA0LjQuSDQnNCw0LrRgdC40LzQvtCyIC0g?= =?utf-8?B?0KfQtdGA0L3QsNGPINC/0LXRiNC60LAuaHRt?= =EF=BB=BF
= TD> | =D0=92=D1=8B =
=D1=87=D0=B8=D1=82=D0=B0=D0=B5=D1=82=D0=B5 =
=D0=B6=D1=83=D1=80=D0=BD=D0=B0=D0=BB dmitry_maximov=
=D0=A1=D0=BE=D0=B7=D0=B4=D0= =B0=D1=82=D1=8C =D0=B0=D0=BA=D0=BA=D0=B0=D1=83=D0=BD=D1=82 =D0=B2=20 =D0=96=D0=96 =D0=9F=D0=BE=D0=B4=D1=80=D0=BE=D0= =B1=D0=BD=D0=BE=D1=81=D1=82=D0=B8=20 |
=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9 = =D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=D0=BE=D0=B2 - = =D0=A7=D0=B5=D1=80=D0=BD=D0=B0=D1=8F = =D0=BF=D0=B5=D1=88=D0=BA=D0=B0 |
About | =D0=A7=D0=B5=D1=80=D0=BD=D0=B0=D1=8F = =D0=BF=D0=B5=D1=88=D0=BA=D0=B0 | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
any Any JavaScript value, including =
undefined .=0A=
* @return boolean true if the value is not =
null and is not undefined .=0A=
*/=0A=
exists =3D function( x ) {=0A=
return (x =3D=3D=3D undefined || x =3D=3D=3D null) ? false : true;=0A=
}=0A=
=0A=
=0A=
finite =3D function( x ) {=0A=
return isFinite( x ) ? x : 0;=0A=
}=0A=
=0A=
=0A=
finiteInt =3D function( x, base ) {=0A=
return finite( parseInt( x, base ) );=0A=
}=0A=
=0A=
=0A=
finiteFloat =3D function( x ) {=0A=
return finite( parseFloat( x ) );=0A=
}=0A=
=0A=
=0A=
max =3D function() {=0A=
var a =3D arguments;=0A=
var n =3D a[ 0 ];=0A=
for( var i =3D 1; i < a.length; i++ )=0A=
if( a[ i ] > n )=0A=
n =3D a[ i ];=0A=
return n;=0A=
}=0A=
=0A=
=0A=
min =3D function() {=0A=
var a =3D arguments;=0A=
var n =3D a[ 0 ];=0A=
for( var i =3D 1; i < a.length; i++ )=0A=
if( a[ i ] < n )=0A=
n =3D a[ i ];=0A=
return n;=0A=
}=0A=
=0A=
=0A=
/* try block */ =0A=
=0A=
Try =3D {=0A=
these: function() {=0A=
for( var i =3D 0; i < arguments.length; i++ ) {=0A=
try {=0A=
return arguments[ i ]();=0A=
} catch( e ) {}=0A=
}=0A=
return undefined;=0A=
}=0A=
}=0A=
=0A=
=0A=
/* unique id generator */=0A=
=0A=
Unique =3D {=0A=
length: 0,=0A=
=0A=
id: function() {=0A=
return ++this.length;=0A=
}=0A=
}=0A=
=0A=
=0A=
/* event methods */=0A=
=0A=
if( !defined( window.Event ) )=0A=
Event =3D {};=0A=
=0A=
=0A=
Event.stop =3D function( event ) {=0A=
event =3D event || this;=0A=
if( event =3D=3D=3D Event )=0A=
event =3D window.event;=0A=
=0A=
// w3c=0A=
if( event.preventDefault )=0A=
event.preventDefault();=0A=
if( event.stopPropagation )=0A=
event.stopPropagation();=0A=
=0A=
// ie=0A=
try {=0A=
event.cancelBubble =3D true;=0A=
event.returnValue =3D false;=0A=
} catch( e ) {}=0A=
=0A=
return false;=0A=
}=0A=
=0A=
=0A=
Event.prep =3D function( event ) {=0A=
event =3D event || window.event;=0A=
if( !defined( event.stop ) )=0A=
event.stop =3D this.stop;=0A=
if( !defined( event.target ) )=0A=
event.target =3D event.srcElement;=0A=
if( !defined( event.relatedTarget ) ) =0A=
event.relatedTarget =3D event.toElement;=0A=
return event;=0A=
}=0A=
=0A=
=0A=
try { Event.prototype.stop =3D Event.stop; }=0A=
catch( e ) {}=0A=
=0A=
=0A=
/* object extensions */=0A=
=0A=
Function.stub =3D function() {};=0A=
=0A=
=0A=
if( !Object.prototype.hasOwnProperty ) {=0A=
Object.prototype.hasOwnProperty =3D function( p ) {=0A=
if( !(p in this) )=0A=
return false;=0A=
try {=0A=
var pr =3D this.constructor.prototype;=0A=
while( pr ) {=0A=
if( pr[ p ] =3D=3D=3D this[ p ] )=0A=
return false;=0A=
if( pr =3D=3D=3D pr.constructor.prototype )=0A=
break;=0A=
pr =3D pr.constructor.prototype;=0A=
}=0A=
} catch( e ) {}=0A=
return true;=0A=
}=0A=
}=0A=
=0A=
=0A=
Object.prototype.extend =3D function() {=0A=
var a =3D arguments;=0A=
for( var i =3D 0; i < a.length; i++ ) {=0A=
var o =3D a[ i ];=0A=
for( var p in o ) {=0A=
try {=0A=
if( !this[ p ] &&=0A=
(!o.hasOwnProperty || o.hasOwnProperty( p )) )=0A=
this[ p ] =3D o[ p ];=0A=
} catch( e ) {}=0A=
}=0A=
}=0A=
return this;=0A=
}=0A=
=0A=
=0A=
Object.prototype.override =3D function() {=0A=
var a =3D arguments;=0A=
for( var i =3D 0; i < a.length; i++ ) {=0A=
var o =3D a[ i ];=0A=
for( var p in o ) {=0A=
try {=0A=
if( !o.hasOwnProperty || o.hasOwnProperty( p ) )=0A=
this[ p ] =3D o[ p ];=0A=
} catch( e ) {}=0A=
}=0A=
}=0A=
return this;=0A=
}=0A=
=0A=
=0A=
Object.prototype.extend( {=0A=
init: Function.stub,=0A=
destroy: Function.stub=0A=
} );=0A=
=0A=
=0A=
=0A=
/* function extensions */=0A=
=0A=
Function.prototype.extend( {=0A=
bind: function( object ) {=0A=
var method =3D this;=0A=
return function() {=0A=
return method.apply( object, arguments );=0A=
};=0A=
},=0A=
=0A=
=0A=
bindEventListener: function( object ) {=0A=
var method =3D this; // Use double closure to work around IE 6 =
memory leak.=0A=
return function( event ) {=0A=
try {=0A=
event =3D Event.prep( event );=0A=
} catch( e ) {}=0A=
return method.call( object, event );=0A=
};=0A=
}=0A=
} );=0A=
=0A=
=0A=
/* class helpers */=0A=
=0A=
indirectObjects =3D [];=0A=
=0A=
=0A=
Class =3D function( superClass ) {=0A=
=0A=
// Set the constructor:=0A=
var constructor =3D function() {=0A=
if( arguments.length )=0A=
this.init.apply( this, arguments );=0A=
}; =0A=
// -- Accomplish static-inheritance:=0A=
constructor.override( Class ); // inherit static methods from Class=0A=
superClass =3D superClass || Object; =0A=
constructor.override( superClass ); // inherit static methods from =
the superClass =0A=
constructor.superClass =3D superClass.prototype;=0A=
=0A=
// Set the constructor's prototype (accomplish object-inheritance):=0A=
constructor.prototype =3D new superClass();=0A=
constructor.prototype.constructor =3D constructor; // rev. 0.7 =0A=
// -- extend prototype with Class instance methods=0A=
constructor.prototype.extend( Class.prototype ); =0A=
// -- override prototype with interface methods=0A=
for( var i =3D 1; i < arguments.length; i++ )=0A=
constructor.prototype.override( arguments[ i ] );=0A=
=0A=
return constructor;=0A=
}=0A=
=0A=
=0A=
Class.extend( {=0A=
initSingleton: function() {=0A=
if( this.singleton )=0A=
return this.singleton;=0A=
this.singleton =3D this.singletonConstructor=0A=
? new this.singletonConstructor()=0A=
: new this();=0A=
this.singleton.init.apply( this.singleton, arguments );=0A=
return this.singleton;=0A=
}=0A=
} );=0A=
=0A=
=0A=
Class.prototype =3D {=0A=
destroy: function() {=0A=
try {=0A=
if( this.indirectIndex )=0A=
indirectObjects[ this.indirectIndex ] =3D undefined;=0A=
delete this.indirectIndex;=0A=
} catch( e ) {}=0A=
=0A=
for( var property in this ) {=0A=
try {=0A=
if( this.hasOwnProperty( property ) )=0A=
delete this[ property ];=0A=
} catch( e ) {}=0A=
}=0A=
},=0A=
=0A=
=0A=
getBoundMethod: function( methodName ) {=0A=
return this[ name ].bind( this );=0A=
},=0A=
=0A=
=0A=
getEventListener: function( methodName ) {=0A=
return this[ methodName ].bindEventListener( this );=0A=
},=0A=
=0A=
=0A=
getIndirectIndex: function() {=0A=
if( !defined( this.indirectIndex ) ) {=0A=
this.indirectIndex =3D indirectObjects.length;=0A=
indirectObjects.push( this );=0A=
}=0A=
return this.indirectIndex;=0A=
},=0A=
=0A=
=0A=
getIndirectMethod: function( methodName ) {=0A=
if( !this.indirectMethods )=0A=
this.indirectMethods =3D {};=0A=
var method =3D this[ methodName ];=0A=
if( typeof method !=3D "function" )=0A=
return undefined;=0A=
var indirectIndex =3D this.getIndirectIndex();=0A=
if( !this.indirectMethods[ methodName ] ) {=0A=
this.indirectMethods[ methodName ] =3D new Function(=0A=
"var o =3D indirectObjects[" + indirectIndex + "];" +=0A=
"return o." + methodName + ".apply( o, arguments );"=0A=
);=0A=
}=0A=
return this.indirectMethods[ methodName ];=0A=
},=0A=
=0A=
=0A=
getIndirectEventListener: function( methodName ) {=0A=
if( !this.indirectEventListeners )=0A=
this.indirectEventListeners =3D {};=0A=
var method =3D this[ methodName ];=0A=
if( typeof method !=3D "function" )=0A=
return undefined;=0A=
var indirectIndex =3D this.getIndirectIndex();=0A=
if( !this.indirectEventListeners[ methodName ] ) {=0A=
this.indirectEventListeners[ methodName ] =3D new Function( =
"event",=0A=
"try { event =3D Event.prep( event ); } catch( e ) {}" +=0A=
"var o =3D indirectObjects[" + indirectIndex + "];" +=0A=
"return o." + methodName + ".call( o, event );"=0A=
);=0A=
}=0A=
return this.indirectEventListeners[ methodName ];=0A=
}=0A=
}=0A=
=0A=
=0A=
/* string extensions */=0A=
=0A=
String.extend( {=0A=
escapeJSChar: function( c ) {=0A=
// try simple escaping=0A=
switch( c ) {=0A=
case "\\": return "\\\\";=0A=
case "\"": return "\\\"";=0A=
case "'": return "\\'";=0A=
case "\b": return "\\b";=0A=
case "\f": return "\\f";=0A=
case "\n": return "\\n";=0A=
case "\r": return "\\r";=0A=
case "\t": return "\\t";=0A=
}=0A=
=0A=
// return raw bytes now ... should be UTF-8=0A=
if( c >=3D " " )=0A=
return c;=0A=
=0A=
// try \uXXXX escaping, but shouldn't make it for case 1, 2=0A=
c =3D c.charCodeAt( 0 ).toString( 16 );=0A=
switch( c.length ) {=0A=
case 1: return "\\u000" + c;=0A=
case 2: return "\\u00" + c;=0A=
case 3: return "\\u0" + c;=0A=
case 4: return "\\u" + c;=0A=
}=0A=
=0A=
// should never make it here=0A=
return "";=0A=
},=0A=
=0A=
=0A=
encodeEntity: function( c ) {=0A=
switch( c ) {=0A=
case "<": return "<";=0A=
case ">": return ">";=0A=
case "&": return "&";=0A=
case '"': return """;=0A=
case "'": return "'";=0A=
}=0A=
return c;=0A=
},=0A=
=0A=
=0A=
decodeEntity: function( c ) {=0A=
switch( c ) {=0A=
case "amp": return "&";=0A=
case "quot": return '"';=0A=
case "gt": return ">";=0A=
case "lt": return "<";=0A=
}=0A=
var m =3D c.match( /^#(\d+)$/ );=0A=
if( m && defined( m[ 1 ] ) )=0A=
return String.fromCharCode( m[ 1 ] );=0A=
m =3D c.match( /^#x([0-9a-f]+)$/i );=0A=
if( m && defined( m[ 1 ] ) )=0A=
return String.fromCharCode( parseInt( hex, m[ 1 ] ) );=0A=
return c;=0A=
}=0A=
} );=0A=
=0A=
=0A=
String.prototype.extend( {=0A=
escapeJS: function() {=0A=
return this.replace( /([^ -!#-\[\]-~])/g, function( m, c ) { =
return String.escapeJSChar( c ); } )=0A=
},=0A=
=0A=
=0A=
escapeJS2: function() {=0A=
return this.replace( /([\u0000-\u0031'"\\])/g, function( m, c ) =
{ return String.escapeJSChar( c ); } )=0A=
},=0A=
=0A=
=0A=
escapeJS3: function() {=0A=
return this.replace( /[\u0000-\u0031'"\\]/g, function( m ) { =
return String.escapeJSChar( m ); } )=0A=
},=0A=
=0A=
=0A=
escapeJS4: function() {=0A=
return this.replace( /./g, function( m ) { return =
String.escapeJSChar( m ); } )=0A=
},=0A=
=0A=
=0A=
encodeHTML: function() {=0A=
return this.replace( /([<>&"])/g, function( m, c ) { return =
String.encodeEntity( c ) } );=0A=
},=0A=
=0A=
=0A=
decodeHTML: function() {=0A=
return this.replace( /&(.*?);/g, function( m, c ) { return =
String.decodeEntity( c ) } );=0A=
},=0A=
=0A=
=0A=
cssToJS: function() {=0A=
return this.replace( /-([a-z])/g, function( m, c ) { return =
c.toUpperCase() } );=0A=
},=0A=
=0A=
=0A=
jsToCSS: function() {=0A=
return this.replace( /([A-Z])/g, function( m, c ) { return "-" + =
c.toLowerCase() } );=0A=
},=0A=
=0A=
=0A=
firstToLowerCase: function() {=0A=
return this.replace( /^(.)/, function( m, c ) { return =
c.toLowerCase() } );=0A=
},=0A=
=0A=
=0A=
rgbToHex: function() {=0A=
var c =3D this.match( /(\d+)\D+(\d+)\D+(\d+)/ );=0A=
if( !c )=0A=
return undefined;=0A=
return "#" +=0A=
finiteInt( c[ 1 ] ).toString( 16 ).pad( 2, "0" ) +=0A=
finiteInt( c[ 2 ] ).toString( 16 ).pad( 2, "0" ) +=0A=
finiteInt( c[ 3 ] ).toString( 16 ).pad( 2, "0" );=0A=
},=0A=
=0A=
=0A=
pad: function( length, padChar ) {=0A=
var padding =3D length - this.length;=0A=
if( padding <=3D 0 )=0A=
return this;=0A=
if( !defined( padChar ) )=0A=
padChar =3D " ";=0A=
var out =3D [];=0A=
for( var i =3D 0; i < padding; i++ )=0A=
out.push( padChar );=0A=
out.push( this );=0A=
return out.join( "" );=0A=
},=0A=
=0A=
=0A=
trim: function() {=0A=
return this.replace( /^\s+|\s+$/g, "" );=0A=
}=0A=
=0A=
} );=0A=
=0A=
=0A=
/* extend array object */=0A=
=0A=
Array.extend( { =0A=
fromPseudo: function ( args ) {=0A=
var out =3D [];=0A=
for ( var i =3D 0; i < args.length; i++ )=0A=
out.push( args[ i ] );=0A=
return out;=0A=
}=0A=
});=0A=
=0A=
=0A=
/* extend array object */=0A=
=0A=
Array.prototype.extend( {=0A=
copy: function() {=0A=
var out =3D [];=0A=
for( var i =3D 0; i < this.length; i++ )=0A=
out[ i ] =3D this[ i ];=0A=
return out;=0A=
},=0A=
=0A=
=0A=
first: function( callback, object ) {=0A=
var length =3D this.length;=0A=
for( var i =3D 0; i < length; i++ ) {=0A=
var result =3D object=0A=
? callback.call( object, this[ i ], i, this )=0A=
: callback( this[ i ], i, this );=0A=
if( result )=0A=
return this[ i ];=0A=
}=0A=
return null;=0A=
},=0A=
=0A=
=0A=
fitIndex: function( fromIndex, defaultIndex ) {=0A=
if( !defined( fromIndex ) || fromIndex =3D=3D null )=0A=
fromIndex =3D defaultIndex;=0A=
else if( fromIndex < 0 ) {=0A=
fromIndex =3D this.length + fromIndex;=0A=
if( fromIndex < 0 )=0A=
fromIndex =3D 0;=0A=
} else if( fromIndex >=3D this.length )=0A=
fromIndex =3D this.length - 1;=0A=
return fromIndex;=0A=
},=0A=
=0A=
=0A=
scramble: function() {=0A=
for( var i =3D 0; i < this.length; i++ ) {=0A=
var j =3D Math.floor( Math.random() * this.length );=0A=
var temp =3D this[ i ];=0A=
this[ i ] =3D this[ j ];=0A=
this[ j ] =3D temp;=0A=
}=0A=
},=0A=
=0A=
=0A=
add: function() {=0A=
var a =3D arguments;=0A=
for( var i =3D 0; i < a.length; i++ ) {=0A=
var index =3D this.indexOf( a[ i ] );=0A=
if( index < 0 ) =0A=
this.push( arguments[ i ] );=0A=
}=0A=
return this.length;=0A=
},=0A=
=0A=
=0A=
remove: function() {=0A=
var a =3D arguments;=0A=
for( var i =3D 0; i < a.length; i++ ) {=0A=
var j =3D this.indexOf( a[ i ] );=0A=
if( j >=3D 0 )=0A=
this.splice( j, 1 );=0A=
}=0A=
return this.length;=0A=
},=0A=
=0A=
=0A=
/* javascript 1.5 array methods */=0A=
/* =
http://developer-test.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:O=
bjects:Array#Methods */=0A=
=0A=
every: function( callback, object ) {=0A=
var length =3D this.length;=0A=
for( var i =3D 0; i < length; i++ ) {=0A=
var result =3D object=0A=
? callback.call( object, this[ i ], i, this )=0A=
: callback( this[ i ], i, this );=0A=
if( !result )=0A=
return false;=0A=
}=0A=
return true;=0A=
},=0A=
=0A=
=0A=
filter: function( callback, object ) {=0A=
var out =3D [];=0A=
var length =3D this.length;=0A=
for( var i =3D 0; i < length; i++ ) {=0A=
var result =3D object=0A=
? callback.call( object, this[ i ], i, this )=0A=
: callback( this[ i ], i, this );=0A=
if( result )=0A=
out.push( this[ i ] );=0A=
}=0A=
return out;=0A=
},=0A=
=0A=
=0A=
forEach: function( callback, object ) {=0A=
var length =3D this.length;=0A=
for( var i =3D 0; i < length; i++ ) {=0A=
object=0A=
? callback.call( object, this[ i ], i, this )=0A=
: callback( this[ i ], i, this );=0A=
}=0A=
},=0A=
=0A=
=0A=
indexOf: function( value, fromIndex ) {=0A=
fromIndex =3D this.fitIndex( fromIndex, 0 );=0A=
for( var i =3D 0; i < this.length; i++ ) {=0A=
if( this[ i ] =3D=3D=3D value )=0A=
return i; =0A=
}=0A=
return -1;=0A=
},=0A=
=0A=
=0A=
lastIndexOf: function( value, fromIndex ) {=0A=
fromIndex =3D this.fitIndex( fromIndex, this.length - 1 );=0A=
for( var i =3D fromIndex; i >=3D 0; i-- ) {=0A=
if( this[ i ] =3D=3D value )=0A=
return i;=0A=
}=0A=
return -1;=0A=
},=0A=
=0A=
=0A=
some: function( callback, object ) {=0A=
var length =3D this.length;=0A=
for( var i =3D 0; i < length; i++ ) {=0A=
var result =3D object=0A=
? callback.call( object, this[ i ], i, this )=0A=
: callback( this[ i ], i, this );=0A=
if( result )=0A=
return true;=0A=
}=0A=
return false;=0A=
},=0A=
=0A=
=0A=
/* javascript 1.2 array methods */=0A=
=0A=
concat: function() {=0A=
var a =3D arguments;=0A=
var out =3D this.copy();=0A=
for( i =3D 0; i < a.length; i++ ) {=0A=
var b =3D a[ i ];=0A=
for( j =3D 0; j < b.length; j++ )=0A=
out.push( b[ j ] );=0A=
}=0A=
return out;=0A=
},=0A=
=0A=
=0A=
push: function() {=0A=
var a =3D arguments;=0A=
for( var i =3D 0; i < a.length; i++ )=0A=
this[ this.length ] =3D a[ i ];=0A=
return this.length; =0A=
},=0A=
=0A=
=0A=
pop: function() {=0A=
if( this.length =3D=3D 0 )=0A=
return undefined;=0A=
var out =3D this[ this.length - 1 ];=0A=
this.length--;=0A=
return out;=0A=
},=0A=
=0A=
=0A=
unshift: function() {=0A=
var a =3D arguments;=0A=
for( var i =3D 0; i < a.length; i++ ) {=0A=
this[ i + a.length ] =3D this[ i ];=0A=
this[ i ] =3D a[ i ];=0A=
}=0A=
return this.length; =0A=
},=0A=
=0A=
=0A=
shift: function() {=0A=
if( this.length =3D=3D 0 )=0A=
return undefined;=0A=
var out =3D this[ 0 ];=0A=
for( var i =3D 1; i < this.length; i++ )=0A=
this[ i - 1 ] =3D this[ i ];=0A=
this.length--;=0A=
return out;=0A=
}=0A=
} );=0A=
=0A=
=0A=
/* date extensions */=0A=
=0A=
Date.extend( {=0A=
/* iso 8601 date format parser=0A=
this was fun to write...=0A=
thanks to: http://www.cl.cam.ac.uk/~mgk25/iso-time.html */=0A=
=0A=
matchISOString: new RegExp(=0A=
"^([0-9]{4})" + =
// year=0A=
"(?:-(?=3D0[1-9]|1[0-2])|$)(..)?" + =
// month=0A=
"(?:-(?=3D0[1-9]|[12][0-9]|3[01])|$)([0-9]{2})?" + =
// day of the month=0A=
"(?:T(?=3D[01][0-9]|2[0-4])|$)T?([0-9]{2})?" + =
// hours=0A=
"(?::(?=3D[0-5][0-9])|\\+|-|Z|$)([0-9]{2})?" + =
// minutes=0A=
=
"(?::(?=3D[0-5][0-9]|60$|60[+|-|Z]|60.0+)|\\+|-|Z|$):?([0-9]{2})?" + // =
seconds=0A=
"(\.[0-9]+)?" + =
// fractional seconds=0A=
"(Z|\\+[01][0-9]|\\+2[0-4]|-[01][0-9]|-2[0-4])?" + =
// timezone hours=0A=
":?([0-5][0-9]|60)?$" =
// timezone minutes=0A=
),=0A=
=0A=
=0A=
fromISOString: function( string ) {=0A=
var t =3D this.matchISOString.exec( string );=0A=
if( !t )=0A=
return undefined;=0A=
=0A=
var year =3D finiteInt( t[ 1 ], 10 );=0A=
var month =3D finiteInt( t[ 2 ], 10 ) - 1;=0A=
var day =3D finiteInt( t[ 3 ], 10 );=0A=
var hours =3D finiteInt( t[ 4 ], 10 );=0A=
var minutes =3D finiteInt( t[ 5 ], 10 );=0A=
var seconds =3D finiteInt( t[ 6 ], 10 );=0A=
var milliseconds =3D finiteInt( Math.round( parseFloat( t[ 7 ] ) =
* 1000 ) );=0A=
var tzHours =3D finiteInt( t[ 8 ], 10 );=0A=
var tzMinutes =3D finiteInt( t[ 9 ], 10 );=0A=
=0A=
var date =3D new this( 0 );=0A=
if( defined( t[ 8 ] ) ) {=0A=
date.setUTCFullYear( year, month, day );=0A=
date.setUTCHours( hours, minutes, seconds, milliseconds );=0A=
var offset =3D (tzHours * 60 + tzMinutes) * 60000;=0A=
if( offset )=0A=
date =3D new this( date - offset );=0A=
} else {=0A=
date.setFullYear( year, month, day );=0A=
date.setHours( hours, minutes, seconds, milliseconds );=0A=
}=0A=
=0A=
return date;=0A=
}=0A=
} );=0A=
=0A=
=0A=
Date.prototype.extend( {=0A=
getISOTimezoneOffset: function() {=0A=
var offset =3D -this.getTimezoneOffset();=0A=
var negative =3D false;=0A=
if( offset < 0 ) {=0A=
negative =3D true;=0A=
offset *=3D -1;=0A=
}=0A=
var offsetHours =3D Math.floor( offset / 60 ).toString().pad( 2, =
"0" );=0A=
var offsetMinutes =3D Math.floor( offset % 60 ).toString().pad( =
2, "0" );=0A=
return (negative ? "-" : "+") + offsetHours + ":" + =
offsetMinutes;=0A=
},=0A=
=0A=
=0A=
toISODateString: function() {=0A=
var year =3D this.getFullYear();=0A=
var month =3D (this.getMonth() + 1).toString().pad( 2, "0" );=0A=
var day =3D this.getDate().toString().pad( 2, "0" );=0A=
return year + "-" + month + "-" + day;=0A=
},=0A=
=0A=
=0A=
toUTCISODateString: function() {=0A=
var year =3D this.getUTCFullYear();=0A=
var month =3D (this.getUTCMonth() + 1).toString().pad( 2, "0" );=0A=
var day =3D this.getUTCDate().toString().pad( 2, "0" );=0A=
return year + "-" + month + "-" + day;=0A=
},=0A=
=0A=
=0A=
toISOTimeString: function() {=0A=
var hours =3D this.getHours().toString().pad( 2, "0" );=0A=
var minutes =3D this.getMinutes().toString().pad( 2, "0" );=0A=
var seconds =3D this.getSeconds().toString().pad( 2, "0" );=0A=
var milliseconds =3D this.getMilliseconds().toString().pad( 3, =
"0" );=0A=
var timezone =3D this.getISOTimezoneOffset();=0A=
return hours + ":" + minutes + ":" + seconds + "." + =
milliseconds + timezone;=0A=
},=0A=
=0A=
=0A=
toUTCISOTimeString: function() {=0A=
var hours =3D this.getUTCHours().toString().pad( 2, "0" );=0A=
var minutes =3D this.getUTCMinutes().toString().pad( 2, "0" );=0A=
var seconds =3D this.getUTCSeconds().toString().pad( 2, "0" );=0A=
var milliseconds =3D this.getUTCMilliseconds().toString().pad( =
3, "0" );=0A=
return hours + ":" + minutes + ":" + seconds + "." + =
milliseconds + "Z";=0A=
},=0A=
=0A=
=0A=
toISOString: function() {=0A=
return this.toISODateString() + "T" + this.toISOTimeString();=0A=
},=0A=
=0A=
=0A=
toUTCISOString: function() {=0A=
return this.toUTCISODateString() + "T" + =
this.toUTCISOTimeString();=0A=
}=0A=
} );=0A=
=0A=
=0A=
/* ajax */=0A=
=0A=
if( !defined( window.XMLHttpRequest ) ) {=0A=
window.XMLHttpRequest =3D function() {=0A=
var types =3D [=0A=
"Microsoft.XMLHTTP",=0A=
"MSXML2.XMLHTTP.5.0",=0A=
"MSXML2.XMLHTTP.4.0",=0A=
"MSXML2.XMLHTTP.3.0",=0A=
"MSXML2.XMLHTTP"=0A=
];=0A=
=0A=
for( var i =3D 0; i < types.length; i++ ) {=0A=
try {=0A=
return new ActiveXObject( types[ i ] );=0A=
} catch( e ) {}=0A=
}=0A=
=0A=
return undefined;=0A=
}=0A=
}=0A=
------=_NextPart_000_0000_01C9D550.3691BAF0
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: =?windows-1251?B?ZmlsZTovLy9GOi8wL0JsYWNrJTIwUGF3bi9jaGVybm92b2ovNC0wMC80?=
=?windows-1251?B?LTAyL8Ts6PLw6OkgzODq8ejs7uIgLSDX5fDt4P8g7+X46uAuZmlsZXMv?=
=?windows-1251?B?ZG9tLmpz?=
/*=0A=
DOM Library - Copyright 2005 Six Apart=0A=
$Id: dom.js 86 2006-12-04 21:35:07Z henrylyne $=0A=
=0A=
Copyright (c) 2005, Six Apart, Ltd.=0A=
All rights reserved.=0A=
=0A=
Redistribution and use in source and binary forms, with or without=0A=
modification, are permitted provided that the following conditions are=0A=
met:=0A=
=0A=
* Redistributions of source code must retain the above copyright=0A=
notice, this list of conditions and the following disclaimer.=0A=
=0A=
* Redistributions in binary form must reproduce the above=0A=
copyright notice, this list of conditions and the following disclaimer=0A=
in the documentation and/or other materials provided with the=0A=
distribution.=0A=
=0A=
* Neither the name of "Six Apart" nor the names of its=0A=
contributors may be used to endorse or promote products derived from=0A=
this software without specific prior written permission.=0A=
=0A=
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS=0A=
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT=0A=
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR=0A=
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT=0A=
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,=0A=
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT=0A=
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,=0A=
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY=0A=
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT=0A=
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE=0A=
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.=0A=
=0A=
*/=0A=
=0A=
=0A=
/* Node class */=0A=
=0A=
if( !defined( window.Node ) )=0A=
Node =3D {};=0A=
=0A=
try {=0A=
Node.extend( {=0A=
ELEMENT_NODE: 1,=0A=
ATTRIBUTE_NODE: 2,=0A=
TEXT_NODE: 3,=0A=
CDATA_SECTION_NODE: 4, =0A=
COMMENT_NODE: 8, =0A=
DOCUMENT_NODE: 9,=0A=
DOCUMENT_FRAGMENT_NODE: 11=0A=
} );=0A=
} catch( e ) {}=0A=
=0A=
=0A=
/* DOM class */=0A=
=0A=
if( !defined( window.DOM ) )=0A=
DOM =3D {};=0A=
=0A=
=0A=
DOM.extend( {=0A=
getElement: function( e ) {=0A=
return (typeof e =3D=3D "string" || typeof e =3D=3D "number") ? =
document.getElementById( e ) : e;=0A=
},=0A=
=0A=
=0A=
addEventListener: function( e, eventName, func, useCapture ) {=0A=
try {=0A=
if( e.addEventListener )=0A=
e.addEventListener( eventName, func, useCapture );=0A=
else if( e.attachEvent )=0A=
e.attachEvent( "on" + eventName, func );=0A=
else=0A=
e[ "on" + eventName ] =3D func;=0A=
} catch( e ) {}=0A=
},=0A=
=0A=
=0A=
removeEventListener: function( e, eventName, func, useCapture ) {=0A=
try {=0A=
if( e.removeEventListener )=0A=
e.removeEventListener( eventName, func, useCapture );=0A=
else if( e.detachEvent )=0A=
e.detachEvent( "on" + eventName, func );=0A=
else=0A=
e[ "on" + eventName ] =3D undefined;=0A=
} catch( e ) {}=0A=
},=0A=
=0A=
=0A=
focus: function( e ) {=0A=
try {=0A=
e =3D DOM.getElement( e );=0A=
e.focus();=0A=
} catch( e ) {}=0A=
},=0A=
=0A=
=0A=
blur: function( e ) {=0A=
try {=0A=
e =3D DOM.getElement( e );=0A=
e.blur();=0A=
} catch( e ) {}=0A=
},=0A=
=0A=
=0A=
/* style */=0A=
=0A=
getComputedStyle: function( e ) {=0A=
if( e.currentStyle )=0A=
return e.currentStyle;=0A=
var style =3D {};=0A=
var owner =3D DOM.getOwnerDocument( e );=0A=
if( owner && owner.defaultView && =
owner.defaultView.getComputedStyle ) { =0A=
try {=0A=
style =3D owner.defaultView.getComputedStyle( e, null );=0A=
} catch( e ) {}=0A=
}=0A=
return style;=0A=
},=0A=
=0A=
=0A=
getStyle: function( e, p ) {=0A=
var s =3D DOM.getComputedStyle( e );=0A=
return s[ p ];=0A=
},=0A=
=0A=
=0A=
// given a window (or defaulting to current window), returns=0A=
// object with .x and .y of client's usable area=0A=
getClientDimensions: function( w ) {=0A=
if( !w )=0A=
w =3D window;=0A=
=0A=
var d =3D {};=0A=
=0A=
// most browsers=0A=
if( w.innerHeight ) {=0A=
d.x =3D w.innerWidth;=0A=
d.y =3D w.innerHeight;=0A=
return d;=0A=
}=0A=
=0A=
// IE6, strict=0A=
var de =3D w.document.documentElement;=0A=
if( de && de.clientHeight ) {=0A=
d.x =3D de.clientWidth;=0A=
d.y =3D de.clientHeight;=0A=
return d;=0A=
}=0A=
=0A=
// IE, misc=0A=
if( document.body ) {=0A=
d.x =3D document.body.clientWidth;=0A=
d.y =3D document.body.clientHeight;=0A=
return d;=0A=
}=0A=
=0A=
return undefined;=0A=
},=0A=
=0A=
=0A=
getDimensions: function( e ) {=0A=
if( !e )=0A=
return undefined;=0A=
=0A=
var style =3D DOM.getComputedStyle( e );=0A=
=0A=
return {=0A=
offsetLeft: e.offsetLeft,=0A=
offsetTop: e.offsetTop,=0A=
offsetWidth: e.offsetWidth,=0A=
offsetHeight: e.offsetHeight,=0A=
clientWidth: e.clientWidth,=0A=
clientHeight: e.clientHeight,=0A=
=0A=
offsetRight: e.offsetLeft + e.offsetWidth,=0A=
offsetBottom: e.offsetTop + e.offsetHeight,=0A=
clientLeft: finiteInt( style.borderLeftWidth ) + finiteInt( =
style.paddingLeft ),=0A=
clientTop: finiteInt( style.borderTopWidth ) + finiteInt( =
style.paddingTop ),=0A=
clientRight: e.clientLeft + e.clientWidth,=0A=
clientBottom: e.clientTop + e.clientHeight=0A=
};=0A=
},=0A=
=0A=
=0A=
getAbsoluteDimensions: function( e ) {=0A=
var d =3D DOM.getDimensions( e );=0A=
if( !d )=0A=
return d;=0A=
d.absoluteLeft =3D d.offsetLeft;=0A=
d.absoluteTop =3D d.offsetTop;=0A=
d.absoluteRight =3D d.offsetRight;=0A=
d.absoluteBottom =3D d.offsetBottom;=0A=
var bork =3D 0;=0A=
while( e ) {=0A=
try { // IE 6 sometimes gives an unwarranted error =
("htmlfile: Unspecified error").=0A=
e =3D e.offsetParent;=0A=
} catch ( err ) {=0A=
log( "In DOM.getAbsoluteDimensions: " + err.message ); =0A=
if ( ++bork > 25 )=0A=
return null;=0A=
}=0A=
if( !e )=0A=
return d;=0A=
d.absoluteLeft +=3D e.offsetLeft;=0A=
d.absoluteTop +=3D e.offsetTop;=0A=
d.absoluteRight +=3D e.offsetLeft;=0A=
d.absoluteBottom +=3D e.offsetTop;=0A=
}=0A=
return d;=0A=
},=0A=
=0A=
=0A=
getIframeAbsoluteDimensions: function( e ) {=0A=
var d =3D DOM.getAbsoluteDimensions( e );=0A=
if( !d )=0A=
return d;=0A=
var iframe =3D DOM.getOwnerIframe( e );=0A=
if( !defined( iframe ) )=0A=
return d;=0A=
=0A=
var d2 =3D DOM.getIframeAbsoluteDimensions( iframe );=0A=
var scroll =3D DOM.getWindowScroll( iframe.contentWindow );=0A=
var left =3D d2.absoluteLeft - scroll.left;=0A=
var top =3D d2.absoluteTop - scroll.top;=0A=
=0A=
d.absoluteLeft +=3D left;=0A=
d.absoluteTop +=3D top;=0A=
d.absoluteRight +=3D left;=0A=
d.absoluteBottom +=3D top;=0A=
=0A=
return d;=0A=
},=0A=
=0A=
=0A=
setLeft: function( e, v ) { e.style.left =3D finiteInt( v ) + "px"; =
},=0A=
setTop: function( e, v ) { e.style.top =3D finiteInt( v ) + "px"; },=0A=
setRight: function( e, v ) { e.style.right =3D finiteInt( v ) + =
"px"; },=0A=
setBottom: function( e, v ) { e.style.bottom =3D finiteInt( v ) + =
"px"; },=0A=
setWidth: function( e, v ) { e.style.width =3D max( 0, finiteInt( v =
) ) + "px"; },=0A=
setHeight: function( e, v ) { e.style.height =3D max( 0, finiteInt( =
v ) ) + "px"; },=0A=
setZIndex: function( e, v ) { e.style.zIndex =3D finiteInt( v ); },=0A=
=0A=
=0A=
getWindowScroll: function( w ) {=0A=
var s =3D {=0A=
left: 0,=0A=
top: 0=0A=
};=0A=
=0A=
var d =3D w.document;=0A=
=0A=
// ie=0A=
var de =3D d.documentElement;=0A=
if( de && defined( de.scrollLeft ) ) {=0A=
s.left =3D de.scrollLeft;=0A=
s.top =3D de.scrollTop;=0A=
}=0A=
=0A=
// safari=0A=
else if( defined( w.scrollX ) ) {=0A=
s.left =3D w.scrollX;=0A=
s.top =3D w.scrollY;=0A=
}=0A=
=0A=
// opera=0A=
else if( d.body && defined( d.body.scrollLeft ) ) {=0A=
s.left =3D d.body.scrollLeft;=0A=
s.top =3D d.body.scrollTop;=0A=
}=0A=
=0A=
return s;=0A=
},=0A=
=0A=
=0A=
getAbsoluteCursorPosition: function( event ) {=0A=
event =3D event || window.event;=0A=
var s =3D DOM.getWindowScroll( window );=0A=
return {=0A=
x: s.left + event.clientX,=0A=
y: s.top + event.clientY=0A=
};=0A=
},=0A=
=0A=
=0A=
invisibleStyle: {=0A=
display: "block",=0A=
position: "absolute",=0A=
left: 0,=0A=
top: 0,=0A=
width: 0,=0A=
height: 0,=0A=
margin: 0,=0A=
border: 0,=0A=
padding: 0,=0A=
fontSize: "0.1px",=0A=
lineHeight: 0,=0A=
opacity: 0,=0A=
MozOpacity: 0,=0A=
filter: "alpha(opacity=3D0)"=0A=
},=0A=
=0A=
=0A=
makeInvisible: function( e ) {=0A=
for( var p in this.invisibleStyle ) {=0A=
if( this.invisibleStyle.hasOwnProperty( p ) )=0A=
e.style[ p ] =3D this.invisibleStyle[ p ];=0A=
}=0A=
},=0A=
=0A=
=0A=
/* text and selection related methods */=0A=
=0A=
mergeTextNodes: function( n ) {=0A=
var c =3D 0;=0A=
while( n ) {=0A=
if( n.nodeType =3D=3D Node.TEXT_NODE && n.nextSibling && =
n.nextSibling.nodeType =3D=3D Node.TEXT_NODE ) {=0A=
n.nodeValue +=3D n.nextSibling.nodeValue;=0A=
n.parentNode.removeChild( n.nextSibling );=0A=
c++;=0A=
} else {=0A=
if( n.firstChild )=0A=
c +=3D DOM.mergeTextNodes( n.firstChild );=0A=
n =3D n.nextSibling;=0A=
}=0A=
}=0A=
return c;=0A=
},=0A=
=0A=
=0A=
selectElement: function( e ) { =0A=
var d =3D e.ownerDocument; =0A=
=0A=
// internet explorer =0A=
if( d.body.createControlRange ) { =0A=
var r =3D d.body.createControlRange(); =0A=
r.addElement( e ); =0A=
r.select(); =0A=
} =0A=
}, =0A=
=0A=
=0A=
/* dom methods */=0A=
=0A=
isImmutable: function( n ) {=0A=
try {=0A=
if( n.getAttribute( "contenteditable" ) =3D=3D "false" )=0A=
return true;=0A=
} catch( e ) {}=0A=
return false;=0A=
},=0A=
=0A=
=0A=
getImmutable: function( n ) {=0A=
var immutable =3D null;=0A=
while( n ) {=0A=
if( DOM.isImmutable( n ) )=0A=
immutable =3D n;=0A=
n =3D n.parentNode;=0A=
}=0A=
return immutable;=0A=
},=0A=
=0A=
=0A=
getOwnerDocument: function( n ) {=0A=
if( !n )=0A=
return document;=0A=
if( n.ownerDocument )=0A=
return n.ownerDocument;=0A=
if( n.getElementById )=0A=
return n;=0A=
return document;=0A=
},=0A=
=0A=
=0A=
getOwnerWindow: function( n ) {=0A=
if( !n )=0A=
return window;=0A=
if( n.parentWindow )=0A=
return n.parentWindow;=0A=
var doc =3D DOM.getOwnerDocument( n );=0A=
if( doc && doc.defaultView )=0A=
return doc.defaultView;=0A=
return window;=0A=
},=0A=
=0A=
=0A=
getOwnerIframe: function( n ) {=0A=
if( !n )=0A=
return undefined;=0A=
var nw =3D DOM.getOwnerWindow( n );=0A=
var nd =3D DOM.getOwnerDocument( n );=0A=
var pw =3D nw.parent || nw.parentWindow;=0A=
if( !pw )=0A=
return undefined;=0A=
var parentDocument =3D pw.document;=0A=
var es =3D parentDocument.getElementsByTagName( "iframe" );=0A=
for( var i =3D 0; i < es.length; i++ ) {=0A=
var e =3D es[ i ];=0A=
try {=0A=
var d =3D e.contentDocument || e.contentWindow.document;=0A=
if( d =3D=3D=3D nd )=0A=
return e;=0A=
}catch(err) {};=0A=
}=0A=
return undefined;=0A=
},=0A=
=0A=
=0A=
filterElementsByClassName: function( es, className ) {=0A=
var filtered =3D [];=0A=
for( var i =3D 0; i < es.length; i++ ) {=0A=
var e =3D es[ i ];=0A=
if( DOM.hasClassName( e, className ) )=0A=
filtered[ filtered.length ] =3D e;=0A=
}=0A=
return filtered;=0A=
},=0A=
=0A=
=0A=
filterElementsByAttribute: function( es, attr ) {=0A=
if( !es )=0A=
return [];=0A=
if( !defined( attr ) || attr =3D=3D null || attr =3D=3D "" )=0A=
return es;=0A=
var filtered =3D [];=0A=
for( var i =3D 0; i < es.length; i++ ) {=0A=
var element =3D es[ i ];=0A=
if( !element )=0A=
continue;=0A=
if( element.getAttribute && ( element.getAttribute( attr ) ) =
)=0A=
filtered[ filtered.length ] =3D element;=0A=
}=0A=
return filtered;=0A=
},=0A=
=0A=
=0A=
filterElementsByTagName: function( es, tagName ) {=0A=
if( tagName =3D=3D "*" )=0A=
return es;=0A=
var filtered =3D [];=0A=
tagName =3D tagName.toLowerCase();=0A=
for( var i =3D 0; i < es.length; i++ ) {=0A=
var e =3D es[ i ];=0A=
if( e.tagName && e.tagName.toLowerCase() =3D=3D tagName )=0A=
filtered[ filtered.length ] =3D e;=0A=
}=0A=
return filtered;=0A=
},=0A=
=0A=
=0A=
getElementsByTagAndAttribute: function( root, tagName, attr ) {=0A=
if( !root )=0A=
root =3D document;=0A=
var es =3D root.getElementsByTagName( tagName );=0A=
return DOM.filterElementsByAttribute( es, attr );=0A=
},=0A=
=0A=
=0A=
getElementsByAttribute: function( root, attr ) {=0A=
return DOM.getElementsByTagAndAttribute( root, "*", attr );=0A=
},=0A=
=0A=
=0A=
getElementsByAttributeAndValue: function( root, attr, value ) {=0A=
var es =3D DOM.getElementsByTagAndAttribute( root, "*", attr );=0A=
var filtered =3D [];=0A=
for ( var i =3D 0; i < es.length; i++ )=0A=
if ( es[ i ].getAttribute( attr ) =3D=3D value )=0A=
filtered.push( es[ i ] );=0A=
return filtered;=0A=
},=0A=
=0A=
=0A=
getElementsByTagAndClassName: function( root, tagName, className ) {=0A=
if( !root )=0A=
root =3D document;=0A=
var elements =3D root.getElementsByTagName( tagName );=0A=
return DOM.filterElementsByClassName( elements, className );=0A=
},=0A=
=0A=
=0A=
getElementsByClassName: function( root, className ) {=0A=
return DOM.getElementsByTagAndClassName( root, "*", className );=0A=
},=0A=
=0A=
=0A=
getAncestors: function( n, includeSelf ) {=0A=
if( !n )=0A=
return [];=0A=
var as =3D includeSelf ? [ n ] : [];=0A=
n =3D n.parentNode;=0A=
while( n ) {=0A=
as.push( n );=0A=
n =3D n.parentNode;=0A=
}=0A=
return as;=0A=
},=0A=
=0A=
=0A=
getAncestorsByTagName: function( n, tagName, includeSelf ) {=0A=
var es =3D DOM.getAncestors( n, includeSelf );=0A=
return DOM.filterElementsByTagName( es, tagName );=0A=
},=0A=
=0A=
=0A=
getFirstAncestorByTagName: function( n, tagName, includeSelf ) {=0A=
return DOM.getAncestorsByTagName( n, tagName, includeSelf )[ 0 ];=0A=
},=0A=
=0A=
=0A=
getAncestorsByClassName: function( n, className, includeSelf ) {=0A=
var es =3D DOM.getAncestors( n, includeSelf );=0A=
return DOM.filterElementsByClassName( es, className );=0A=
},=0A=
=0A=
=0A=
getFirstAncestorByClassName: function( n, className, includeSelf ) {=0A=
return DOM.getAncestorsByClassName( n, className, includeSelf )[ =
0 ];=0A=
},=0A=
=0A=
=0A=
getAncestorsByTagAndClassName: function( n, tagName, className, =
includeSelf ) {=0A=
var es =3D DOM.getAncestorsByTagName( n, tagName, includeSelf );=0A=
return DOM.filterElementsByClassName( es, className );=0A=
},=0A=
=0A=
=0A=
getFirstAncestorByTagAndClassName: function( n, tagName, className, =
includeSelf ) {=0A=
return DOM.getAncestorsByTagAndClassName( n, tagName, className, =
includeSelf )[ 0 ];=0A=
},=0A=
=0A=
=0A=
getPreviousElement: function( n ) {=0A=
n =3D n.previousSibling;=0A=
while( n ) {=0A=
if( n.nodeType =3D=3D Node.ELEMENT_NODE )=0A=
return n;=0A=
n =3D n.previousSibling;=0A=
}=0A=
return null;=0A=
},=0A=
=0A=
=0A=
getNextElement: function( n ) {=0A=
n =3D n.nextSibling;=0A=
while( n ) {=0A=
if( n.nodeType =3D=3D Node.ELEMENT_NODE )=0A=
return n;=0A=
n =3D n.nextSibling;=0A=
}=0A=
return null;=0A=
},=0A=
=0A=
=0A=
isInlineNode: function( n ) {=0A=
// text nodes are inline=0A=
if( n.nodeType =3D=3D Node.TEXT_NODE )=0A=
return n;=0A=
=0A=
// document nodes are non-inline=0A=
if( n.nodeType =3D=3D Node.DOCUMENT_NODE )=0A=
return false;=0A=
=0A=
// all nonelement nodes are inline=0A=
if( n.nodeType !=3D Node.ELEMENT_NODE )=0A=
return n;=0A=
=0A=
// br elements are not inline=0A=
if( n.tagName && n.tagName.toLowerCase() =3D=3D "br" )=0A=
return false;=0A=
=0A=
// examine the style property of the inline n=0A=
var display =3D DOM.getStyle( n, "display" ); =0A=
if( display && display.indexOf( "inline" ) >=3D 0 ) =0A=
return n;=0A=
},=0A=
=0A=
=0A=
isTextNode: function( n ) {=0A=
if( n.nodeType =3D=3D Node.TEXT_NODE )=0A=
return n;=0A=
},=0A=
=0A=
=0A=
isInlineTextNode: function( n ) {=0A=
if( n.nodeType =3D=3D Node.TEXT_NODE )=0A=
return n;=0A=
if( !DOM.isInlineNode( n ) )=0A=
return null;=0A=
},=0A=
=0A=
=0A=
/* this and the following classname functions honor w3c =
case-sensitive classnames */=0A=
=0A=
getClassNames: function( e ) {=0A=
if( !e || !e.className )=0A=
return [];=0A=
return e.className.split( /\s+/g );=0A=
},=0A=
=0A=
=0A=
hasClassName: function( e, className ) {=0A=
if( !e || !e.className )=0A=
return false;=0A=
var cs =3D DOM.getClassNames( e );=0A=
for( var i =3D 0; i < cs.length; i++ ) {=0A=
if( cs[ i ] =3D=3D className )=0A=
return true;=0A=
}=0A=
return false;=0A=
},=0A=
=0A=
=0A=
addClassName: function( e, className ) {=0A=
if( !e || !className )=0A=
return false;=0A=
var cs =3D DOM.getClassNames( e );=0A=
for( var i =3D 0; i < cs.length; i++ ) {=0A=
if( cs[ i ] =3D=3D className )=0A=
return true;=0A=
}=0A=
cs.push( className );=0A=
e.className =3D cs.join( " " );=0A=
return false;=0A=
},=0A=
=0A=
=0A=
removeClassName: function( e, className ) {=0A=
var r =3D false;=0A=
if( !e || !e.className || !className )=0A=
return r;=0A=
var cs =3D (e.className && e.className.length)=0A=
? e.className.split( /\s+/g )=0A=
: [];=0A=
var ncs =3D [];=0A=
for( var i =3D 0; i < cs.length; i++ ) {=0A=
if( cs[ i ] =3D=3D className ) {=0A=
r =3D true;=0A=
continue;=0A=
}=0A=
ncs.push( cs[ i ] );=0A=
}=0A=
if( r )=0A=
e.className =3D ncs.join( " " );=0A=
return r;=0A=
},=0A=
=0A=
=0A=
/* tree manipulation methods */=0A=
=0A=
replaceWithChildNodes: function( n ) {=0A=
var firstChild =3D n.firstChild;=0A=
var parentNode =3D n.parentNode;=0A=
while( n.firstChild )=0A=
parentNode.insertBefore( n.removeChild( n.firstChild ), n );=0A=
parentNode.removeChild( n );=0A=
return firstChild;=0A=
},=0A=
=0A=
=0A=
/* factory methods */=0A=
=0A=
createInvisibleInput: function( d ) {=0A=
if( !d )=0A=
d =3D window.document;=0A=
var e =3D document.createElement( "input" );=0A=
e.setAttribute( "autocomplete", "off" );=0A=
e.autocomplete =3D "off";=0A=
DOM.makeInvisible( e );=0A=
return e;=0A=
},=0A=
=0A=
=0A=
getMouseEventAttribute: function( event, a ) {=0A=
if( !a )=0A=
return;=0A=
var es =3D DOM.getAncestors( event.target, true );=0A=
for( var i =3D 0; i < es.length; i++ ) {=0A=
try {=0A=
var e =3D es[ i ]=0A=
var v =3D e.getAttribute ? e.getAttribute( a ) : null;=0A=
if( v ) {=0A=
event.attributeElement =3D e;=0A=
event.attribute =3D v;=0A=
return v;=0A=
}=0A=
} catch( e ) {}=0A=
}=0A=
},=0A=
=0A=
=0A=
setElementAttribute: function( e, a, v ) {=0A=
/* safari workaround=0A=
* safari's setAttribute assumes you want to use a namespace=0A=
* when you have a colon in your attribute=0A=
*/=0A=
if ( navigator.userAgent.toLowerCase().match(/webkit/) ) {=0A=
var at =3D e.attributes;=0A=
for ( var i =3D 0; i < at.length; i++ )=0A=
if ( at[ i ].name =3D=3D a )=0A=
return at[ i ].nodeValue =3D v;=0A=
} else=0A=
e.setAttribute( a, v );=0A=
},=0A=
=0A=
=0A=
swapAttributes: function( e, tg, at ) {=0A=
var ar =3D e.getAttribute( tg );=0A=
if( !ar )=0A=
return false;=0A=
=0A=
/* clone the node with all children */=0A=
if ( e.tagName.toLowerCase() =3D=3D 'script' ) {=0A=
/* only clone and replace script tags */=0A=
var cl =3D e.cloneNode( true );=0A=
if ( !cl )=0A=
return false;=0A=
=0A=
DOM.setElementAttribute( cl, at, ar );=0A=
cl.removeAttribute( tg );=0A=
=0A=
/* replace new, old */=0A=
return e.parentNode.replaceChild( cl, e );=0A=
} else {=0A=
DOM.setElementAttribute( e, at, ar );=0A=
e.removeAttribute( tg );=0A=
}=0A=
}=0A=
=0A=
=0A=
} );=0A=
=0A=
=0A=
$ =3D DOM.getElement;=0A=
------=_NextPart_000_0000_01C9D550.3691BAF0
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: =?windows-1251?B?ZmlsZTovLy9GOi8wL0JsYWNrJTIwUGF3bi9jaGVybm92b2ovNC0wMC80?=
=?windows-1251?B?LTAyL8Ts6PLw6OkgzODq8ejs7uIgLSDX5fDt4P8g7+X46uAuZmlsZQ==?=
=?windows-1251?B?cy9odHRwcmVxLmpz?=
var HTTPReq =3D new Object;=0A=
=0A=
HTTPReq.create =3D function () {=0A=
var xtr;=0A=
var ex;=0A=
=0A=
if (typeof(XMLHttpRequest) !=3D "undefined") {=0A=
xtr =3D new XMLHttpRequest();=0A=
} else {=0A=
try {=0A=
xtr =3D new ActiveXObject("Msxml2.XMLHTTP.4.0");=0A=
} catch (ex) {=0A=
try {=0A=
xtr =3D new ActiveXObject("Msxml2.XMLHTTP");=0A=
} catch (ex) {=0A=
}=0A=
}=0A=
}=0A=
=0A=
// let me explain this. Opera 8 does XMLHttpRequest, but not =
setRequestHeader.=0A=
// no problem, we thought: we'll test for setRequestHeader and if =
it's not present=0A=
// then fall back to the old behavior (treat it as not working). =
BUT --- IE6 won't=0A=
// let you even test for setRequestHeader without throwing an =
exception (you need=0A=
// to call .open on the .xtr first or something)=0A=
try {=0A=
if (xtr && ! xtr.setRequestHeader)=0A=
xtr =3D null;=0A=
} catch (ex) { }=0A=
=0A=
return xtr;=0A=
};=0A=
=0A=
// opts:=0A=
// url, onError, onData, method (GET or POST), data=0A=
// url: where to get/post to=0A=
// onError: callback on error=0A=
// onData: callback on data received=0A=
// method: HTTP method, GET by default=0A=
// data: what to send to the server (urlencoded)=0A=
HTTPReq.getJSON =3D function (opts) {=0A=
var req =3D HTTPReq.create();=0A=
if (! req) {=0A=
if (opts.onError) opts.onError("noxmlhttprequest");=0A=
return;=0A=
}=0A=
=0A=
var state_callback =3D function () {=0A=
if (req.readyState !=3D 4) return;=0A=
=0A=
if (req.status !=3D 200) {=0A=
if (opts.onError) opts.onError(req.status ? "status: " + =
req.status : "no data");=0A=
return;=0A=
}=0A=
=0A=
var resObj;=0A=
var e;=0A=
try {=0A=
eval("resObj =3D " + req.responseText + ";");=0A=
} catch (e) {=0A=
}=0A=
=0A=
if (e || ! resObj) {=0A=
if (opts.onError)=0A=
opts.onError("Error parsing response: \"" + =
req.responseText + "\"");=0A=
=0A=
return;=0A=
}=0A=
=0A=
if (opts.onData)=0A=
opts.onData(resObj);=0A=
};=0A=
=0A=
req.onreadystatechange =3D state_callback;=0A=
=0A=
var method =3D opts.method || "GET";=0A=
var data =3D opts.data || null;=0A=
=0A=
var url =3D opts.url;=0A=
if (opts.method =3D=3D "GET" && opts.data) {=0A=
url +=3D url.match(/\?/) ? "&" : "?";=0A=
url +=3D opts.data=0A=
}=0A=
=0A=
url +=3D url.match(/\?/) ? "&" : "?";=0A=
url +=3D "_rand=3D" + Math.random();=0A=
=0A=
req.open(method, url, true);=0A=
=0A=
// we should send null unless we're in a POST=0A=
var to_send =3D null;=0A=
=0A=
if (method.toUpperCase() =3D=3D "POST") {=0A=
req.setRequestHeader("Content-Type", =
"application/x-www-form-urlencoded");=0A=
to_send =3D data;=0A=
}=0A=
=0A=
req.send(to_send);=0A=
};=0A=
=0A=
HTTPReq.formEncoded =3D function (vars) {=0A=
var enc =3D [];=0A=
var e;=0A=
for (var key in vars) {=0A=
try {=0A=
if (!vars.hasOwnProperty(key))=0A=
continue;=0A=
enc.push(encodeURIComponent(key) + "=3D" + =
encodeURIComponent(vars[key]));=0A=
} catch( e ) {}=0A=
}=0A=
return enc.join("&");=0A=
=0A=
};=0A=
=0A=
------=_NextPart_000_0000_01C9D550.3691BAF0
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: =?windows-1251?B?ZmlsZTovLy9GOi8wL0JsYWNrJTIwUGF3bi9jaGVybm92b2ovNC0wMC80?=
=?windows-1251?B?LTAyL8Ts6PLw6OkgzODq8ejs7uIgLSDX5fDt4P8g7+X46uAuZmlsZQ==?=
=?windows-1251?B?cy9qcy5qcw==?=
/*=0A=
Core JavaScript Library=0A=
$Id: core.js 232 2007-10-01 20:32:42Z whitaker $=0A=
=0A=
Copyright (c) 2005, Six Apart, Ltd.=0A=
All rights reserved.=0A=
=0A=
Redistribution and use in source and binary forms, with or without=0A=
modification, are permitted provided that the following conditions are=0A=
met:=0A=
=0A=
* Redistributions of source code must retain the above copyright=0A=
notice, this list of conditions and the following disclaimer.=0A=
=0A=
* Redistributions in binary form must reproduce the above=0A=
copyright notice, this list of conditions and the following disclaimer=0A=
in the documentation and/or other materials provided with the=0A=
distribution.=0A=
=0A=
* Neither the name of "Six Apart" nor the names of its=0A=
contributors may be used to endorse or promote products derived from=0A=
this software without specific prior written permission.=0A=
=0A=
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS=0A=
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT=0A=
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR=0A=
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT=0A=
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,=0A=
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT=0A=
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,=0A=
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY=0A=
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT=0A=
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE=0A=
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.=0A=
=0A=
*/=0A=
=0A=
/* stubs */=0A=
=0A=
log =3D function() {};=0A=
log.error =3D log.warn =3D log.debug =3D log;=0A=
=0A=
=0A=
/* utility functions */=0A=
=0A=
defined =3D function( x ) {=0A=
return x =3D=3D=3D undefined ? false : true;=0A=
}=0A=
=0A=
=0A=
/**=0A=
* Utility method.=0A=
* @param x any Any JavaScript value, including =
undefined .=0A=
* @return boolean true if the value is not =
null and is not undefined .=0A=
*/=0A=
exists =3D function( x ) {=0A=
return (x =3D=3D=3D undefined || x =3D=3D=3D null) ? false : true;=0A=
}=0A=
=0A=
=0A=
finite =3D function( x ) {=0A=
return isFinite( x ) ? x : 0;=0A=
}=0A=
=0A=
=0A=
finiteInt =3D function( x, base ) {=0A=
return finite( parseInt( x, base ) );=0A=
}=0A=
=0A=
=0A=
finiteFloat =3D function( x ) {=0A=
return finite( parseFloat( x ) );=0A=
}=0A=
=0A=
=0A=
max =3D function() {=0A=
var a =3D arguments;=0A=
var n =3D a[ 0 ];=0A=
for( var i =3D 1; i < a.length; i++ )=0A=
if( a[ i ] > n )=0A=
n =3D a[ i ];=0A=
return n;=0A=
}=0A=
=0A=
=0A=
min =3D function() {=0A=
var a =3D arguments;=0A=
var n =3D a[ 0 ];=0A=
for( var i =3D 1; i < a.length; i++ )=0A=
if( a[ i ] < n )=0A=
n =3D a[ i ];=0A=
return n;=0A=
}=0A=
=0A=
=0A=
/* try block */ =0A=
=0A=
Try =3D {=0A=
these: function() {=0A=
for( var i =3D 0; i < arguments.length; i++ ) {=0A=
try {=0A=
return arguments[ i ]();=0A=
} catch( e ) {}=0A=
}=0A=
return undefined;=0A=
}=0A=
}=0A=
=0A=
=0A=
/* unique id generator */=0A=
=0A=
Unique =3D {=0A=
length: 0,=0A=
=0A=
id: function() {=0A=
return ++this.length;=0A=
}=0A=
}=0A=
=0A=
=0A=
/* event methods */=0A=
=0A=
if( !defined( window.Event ) )=0A=
Event =3D {};=0A=
=0A=
=0A=
Event.stop =3D function( event ) {=0A=
event =3D event || this;=0A=
if( event =3D=3D=3D Event )=0A=
event =3D window.event;=0A=
=0A=
// w3c=0A=
if( event.preventDefault )=0A=
event.preventDefault();=0A=
if( event.stopPropagation )=0A=
event.stopPropagation();=0A=
=0A=
// ie=0A=
try {=0A=
event.cancelBubble =3D true;=0A=
event.returnValue =3D false;=0A=
} catch( e ) {}=0A=
=0A=
return false;=0A=
}=0A=
=0A=
=0A=
Event.prep =3D function( event ) {=0A=
event =3D event || window.event;=0A=
if( !defined( event.stop ) )=0A=
event.stop =3D this.stop;=0A=
if( !defined( event.target ) )=0A=
event.target =3D event.srcElement;=0A=
if( !defined( event.relatedTarget ) ) =0A=
event.relatedTarget =3D event.toElement;=0A=
return event;=0A=
}=0A=
=0A=
=0A=
try { Event.prototype.stop =3D Event.stop; }=0A=
catch( e ) {}=0A=
=0A=
=0A=
/* object extensions */=0A=
=0A=
Function.stub =3D function() {};=0A=
=0A=
=0A=
if( !Object.prototype.hasOwnProperty ) {=0A=
Object.prototype.hasOwnProperty =3D function( p ) {=0A=
if( !(p in this) )=0A=
return false;=0A=
try {=0A=
var pr =3D this.constructor.prototype;=0A=
while( pr ) {=0A=
if( pr[ p ] =3D=3D=3D this[ p ] )=0A=
return false;=0A=
if( pr =3D=3D=3D pr.constructor.prototype )=0A=
break;=0A=
pr =3D pr.constructor.prototype;=0A=
}=0A=
} catch( e ) {}=0A=
return true;=0A=
}=0A=
}=0A=
=0A=
=0A=
Object.prototype.extend =3D function() {=0A=
var a =3D arguments;=0A=
for( var i =3D 0; i < a.length; i++ ) {=0A=
var o =3D a[ i ];=0A=
for( var p in o ) {=0A=
try {=0A=
if( !this[ p ] &&=0A=
(!o.hasOwnProperty || o.hasOwnProperty( p )) )=0A=
this[ p ] =3D o[ p ];=0A=
} catch( e ) {}=0A=
}=0A=
}=0A=
return this;=0A=
}=0A=
=0A=
=0A=
Object.prototype.override =3D function() {=0A=
var a =3D arguments;=0A=
for( var i =3D 0; i < a.length; i++ ) {=0A=
var o =3D a[ i ];=0A=
for( var p in o ) {=0A=
try {=0A=
if( !o.hasOwnProperty || o.hasOwnProperty( p ) )=0A=
this[ p ] =3D o[ p ];=0A=
} catch( e ) {}=0A=
}=0A=
}=0A=
return this;=0A=
}=0A=
=0A=
=0A=
Object.prototype.extend( {=0A=
init: Function.stub,=0A=
destroy: Function.stub=0A=
} );=0A=
=0A=
=0A=
=0A=
/* function extensions */=0A=
=0A=
Function.prototype.extend( {=0A=
bind: function( object ) {=0A=
var method =3D this;=0A=
return function() {=0A=
return method.apply( object, arguments );=0A=
};=0A=
},=0A=
=0A=
=0A=
bindEventListener: function( object ) {=0A=
var method =3D this; // Use double closure to work around IE 6 =
memory leak.=0A=
return function( event ) {=0A=
try {=0A=
event =3D Event.prep( event );=0A=
} catch( e ) {}=0A=
return method.call( object, event );=0A=
};=0A=
}=0A=
} );=0A=
=0A=
=0A=
/* class helpers */=0A=
=0A=
indirectObjects =3D [];=0A=
=0A=
=0A=
Class =3D function( superClass ) {=0A=
=0A=
// Set the constructor:=0A=
var constructor =3D function() {=0A=
if( arguments.length )=0A=
this.init.apply( this, arguments );=0A=
}; =0A=
// -- Accomplish static-inheritance:=0A=
constructor.override( Class ); // inherit static methods from Class=0A=
superClass =3D superClass || Object; =0A=
constructor.override( superClass ); // inherit static methods from =
the superClass =0A=
constructor.superClass =3D superClass.prototype;=0A=
=0A=
// Set the constructor's prototype (accomplish object-inheritance):=0A=
constructor.prototype =3D new superClass();=0A=
constructor.prototype.constructor =3D constructor; // rev. 0.7 =0A=
// -- extend prototype with Class instance methods=0A=
constructor.prototype.extend( Class.prototype ); =0A=
// -- override prototype with interface methods=0A=
for( var i =3D 1; i < arguments.length; i++ )=0A=
constructor.prototype.override( arguments[ i ] );=0A=
=0A=
return constructor;=0A=
}=0A=
=0A=
=0A=
Class.extend( {=0A=
initSingleton: function() {=0A=
if( this.singleton )=0A=
return this.singleton;=0A=
this.singleton =3D this.singletonConstructor=0A=
? new this.singletonConstructor()=0A=
: new this();=0A=
this.singleton.init.apply( this.singleton, arguments );=0A=
return this.singleton;=0A=
}=0A=
} );=0A=
=0A=
=0A=
Class.prototype =3D {=0A=
destroy: function() {=0A=
try {=0A=
if( this.indirectIndex )=0A=
indirectObjects[ this.indirectIndex ] =3D undefined;=0A=
delete this.indirectIndex;=0A=
} catch( e ) {}=0A=
=0A=
for( var property in this ) {=0A=
try {=0A=
if( this.hasOwnProperty( property ) )=0A=
delete this[ property ];=0A=
} catch( e ) {}=0A=
}=0A=
},=0A=
=0A=
=0A=
getBoundMethod: function( methodName ) {=0A=
return this[ name ].bind( this );=0A=
},=0A=
=0A=
=0A=
getEventListener: function( methodName ) {=0A=
return this[ methodName ].bindEventListener( this );=0A=
},=0A=
=0A=
=0A=
getIndirectIndex: function() {=0A=
if( !defined( this.indirectIndex ) ) {=0A=
this.indirectIndex =3D indirectObjects.length;=0A=
indirectObjects.push( this );=0A=
}=0A=
return this.indirectIndex;=0A=
},=0A=
=0A=
=0A=
getIndirectMethod: function( methodName ) {=0A=
if( !this.indirectMethods )=0A=
this.indirectMethods =3D {};=0A=
var method =3D this[ methodName ];=0A=
if( typeof method !=3D "function" )=0A=
return undefined;=0A=
var indirectIndex =3D this.getIndirectIndex();=0A=
if( !this.indirectMethods[ methodName ] ) {=0A=
this.indirectMethods[ methodName ] =3D new Function(=0A=
"var o =3D indirectObjects[" + indirectIndex + "];" +=0A=
"return o." + methodName + ".apply( o, arguments );"=0A=
);=0A=
}=0A=
return this.indirectMethods[ methodName ];=0A=
},=0A=
=0A=
=0A=
getIndirectEventListener: function( methodName ) {=0A=
if( !this.indirectEventListeners )=0A=
this.indirectEventListeners =3D {};=0A=
var method =3D this[ methodName ];=0A=
if( typeof method !=3D "function" )=0A=
return undefined;=0A=
var indirectIndex =3D this.getIndirectIndex();=0A=
if( !this.indirectEventListeners[ methodName ] ) {=0A=
this.indirectEventListeners[ methodName ] =3D new Function( =
"event",=0A=
"try { event =3D Event.prep( event ); } catch( e ) {}" +=0A=
"var o =3D indirectObjects[" + indirectIndex + "];" +=0A=
"return o." + methodName + ".call( o, event );"=0A=
);=0A=
}=0A=
return this.indirectEventListeners[ methodName ];=0A=
}=0A=
}=0A=
=0A=
=0A=
/* string extensions */=0A=
=0A=
String.extend( {=0A=
escapeJSChar: function( c ) {=0A=
// try simple escaping=0A=
switch( c ) {=0A=
case "\\": return "\\\\";=0A=
case "\"": return "\\\"";=0A=
case "'": return "\\'";=0A=
case "\b": return "\\b";=0A=
case "\f": return "\\f";=0A=
case "\n": return "\\n";=0A=
case "\r": return "\\r";=0A=
case "\t": return "\\t";=0A=
}=0A=
=0A=
// return raw bytes now ... should be UTF-8=0A=
if( c >=3D " " )=0A=
return c;=0A=
=0A=
// try \uXXXX escaping, but shouldn't make it for case 1, 2=0A=
c =3D c.charCodeAt( 0 ).toString( 16 );=0A=
switch( c.length ) {=0A=
case 1: return "\\u000" + c;=0A=
case 2: return "\\u00" + c;=0A=
case 3: return "\\u0" + c;=0A=
case 4: return "\\u" + c;=0A=
}=0A=
=0A=
// should never make it here=0A=
return "";=0A=
},=0A=
=0A=
=0A=
encodeEntity: function( c ) {=0A=
switch( c ) {=0A=
case "<": return "<";=0A=
case ">": return ">";=0A=
case "&": return "&";=0A=
case '"': return """;=0A=
case "'": return "'";=0A=
}=0A=
return c;=0A=
},=0A=
=0A=
=0A=
decodeEntity: function( c ) {=0A=
switch( c ) {=0A=
case "amp": return "&";=0A=
case "quot": return '"';=0A=
case "gt": return ">";=0A=
case "lt": return "<";=0A=
}=0A=
var m =3D c.match( /^#(\d+)$/ );=0A=
if( m && defined( m[ 1 ] ) )=0A=
return String.fromCharCode( m[ 1 ] );=0A=
m =3D c.match( /^#x([0-9a-f]+)$/i );=0A=
if( m && defined( m[ 1 ] ) )=0A=
return String.fromCharCode( parseInt( hex, m[ 1 ] ) );=0A=
return c;=0A=
}=0A=
} );=0A=
=0A=
=0A=
String.prototype.extend( {=0A=
escapeJS: function() {=0A=
return this.replace( /([^ -!#-\[\]-~])/g, function( m, c ) { =
return String.escapeJSChar( c ); } )=0A=
},=0A=
=0A=
=0A=
escapeJS2: function() {=0A=
return this.replace( /([\u0000-\u0031'"\\])/g, function( m, c ) =
{ return String.escapeJSChar( c ); } )=0A=
},=0A=
=0A=
=0A=
escapeJS3: function() {=0A=
return this.replace( /[\u0000-\u0031'"\\]/g, function( m ) { =
return String.escapeJSChar( m ); } )=0A=
},=0A=
=0A=
=0A=
escapeJS4: function() {=0A=
return this.replace( /./g, function( m ) { return =
String.escapeJSChar( m ); } )=0A=
},=0A=
=0A=
=0A=
encodeHTML: function() {=0A=
return this.replace( /([<>&"])/g, function( m, c ) { return =
String.encodeEntity( c ) } );=0A=
},=0A=
=0A=
=0A=
decodeHTML: function() {=0A=
return this.replace( /&(.*?);/g, function( m, c ) { return =
String.decodeEntity( c ) } );=0A=
},=0A=
=0A=
=0A=
cssToJS: function() {=0A=
return this.replace( /-([a-z])/g, function( m, c ) { return =
c.toUpperCase() } );=0A=
},=0A=
=0A=
=0A=
jsToCSS: function() {=0A=
return this.replace( /([A-Z])/g, function( m, c ) { return "-" + =
c.toLowerCase() } );=0A=
},=0A=
=0A=
=0A=
firstToLowerCase: function() {=0A=
return this.replace( /^(.)/, function( m, c ) { return =
c.toLowerCase() } );=0A=
},=0A=
=0A=
=0A=
rgbToHex: function() {=0A=
var c =3D this.match( /(\d+)\D+(\d+)\D+(\d+)/ );=0A=
if( !c )=0A=
return undefined;=0A=
return "#" +=0A=
finiteInt( c[ 1 ] ).toString( 16 ).pad( 2, "0" ) +=0A=
finiteInt( c[ 2 ] ).toString( 16 ).pad( 2, "0" ) +=0A=
finiteInt( c[ 3 ] ).toString( 16 ).pad( 2, "0" );=0A=
},=0A=
=0A=
=0A=
pad: function( length, padChar ) {=0A=
var padding =3D length - this.length;=0A=
if( padding <=3D 0 )=0A=
return this;=0A=
if( !defined( padChar ) )=0A=
padChar =3D " ";=0A=
var out =3D [];=0A=
for( var i =3D 0; i < padding; i++ )=0A=
out.push( padChar );=0A=
out.push( this );=0A=
return out.join( "" );=0A=
},=0A=
=0A=
=0A=
trim: function() {=0A=
return this.replace( /^\s+|\s+$/g, "" );=0A=
}=0A=
=0A=
} );=0A=
=0A=
=0A=
/* extend array object */=0A=
=0A=
Array.extend( { =0A=
fromPseudo: function ( args ) {=0A=
var out =3D [];=0A=
for ( var i =3D 0; i < args.length; i++ )=0A=
out.push( args[ i ] );=0A=
return out;=0A=
}=0A=
});=0A=
=0A=
=0A=
/* extend array object */=0A=
=0A=
Array.prototype.extend( {=0A=
copy: function() {=0A=
var out =3D [];=0A=
for( var i =3D 0; i < this.length; i++ )=0A=
out[ i ] =3D this[ i ];=0A=
return out;=0A=
},=0A=
=0A=
=0A=
first: function( callback, object ) {=0A=
var length =3D this.length;=0A=
for( var i =3D 0; i < length; i++ ) {=0A=
var result =3D object=0A=
? callback.call( object, this[ i ], i, this )=0A=
: callback( this[ i ], i, this );=0A=
if( result )=0A=
return this[ i ];=0A=
}=0A=
return null;=0A=
},=0A=
=0A=
=0A=
fitIndex: function( fromIndex, defaultIndex ) {=0A=
if( !defined( fromIndex ) || fromIndex =3D=3D null )=0A=
fromIndex =3D defaultIndex;=0A=
else if( fromIndex < 0 ) {=0A=
fromIndex =3D this.length + fromIndex;=0A=
if( fromIndex < 0 )=0A=
fromIndex =3D 0;=0A=
} else if( fromIndex >=3D this.length )=0A=
fromIndex =3D this.length - 1;=0A=
return fromIndex;=0A=
},=0A=
=0A=
=0A=
scramble: function() {=0A=
for( var i =3D 0; i < this.length; i++ ) {=0A=
var j =3D Math.floor( Math.random() * this.length );=0A=
var temp =3D this[ i ];=0A=
this[ i ] =3D this[ j ];=0A=
this[ j ] =3D temp;=0A=
}=0A=
},=0A=
=0A=
=0A=
add: function() {=0A=
var a =3D arguments;=0A=
for( var i =3D 0; i < a.length; i++ ) {=0A=
var index =3D this.indexOf( a[ i ] );=0A=
if( index < 0 ) =0A=
this.push( arguments[ i ] );=0A=
}=0A=
return this.length;=0A=
},=0A=
=0A=
=0A=
remove: function() {=0A=
var a =3D arguments;=0A=
for( var i =3D 0; i < a.length; i++ ) {=0A=
var j =3D this.indexOf( a[ i ] );=0A=
if( j >=3D 0 )=0A=
this.splice( j, 1 );=0A=
}=0A=
return this.length;=0A=
},=0A=
=0A=
=0A=
/* javascript 1.5 array methods */=0A=
/* =
http://developer-test.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:O=
bjects:Array#Methods */=0A=
=0A=
every: function( callback, object ) {=0A=
var length =3D this.length;=0A=
for( var i =3D 0; i < length; i++ ) {=0A=
var result =3D object=0A=
? callback.call( object, this[ i ], i, this )=0A=
: callback( this[ i ], i, this );=0A=
if( !result )=0A=
return false;=0A=
}=0A=
return true;=0A=
},=0A=
=0A=
=0A=
filter: function( callback, object ) {=0A=
var out =3D [];=0A=
var length =3D this.length;=0A=
for( var i =3D 0; i < length; i++ ) {=0A=
var result =3D object=0A=
? callback.call( object, this[ i ], i, this )=0A=
: callback( this[ i ], i, this );=0A=
if( result )=0A=
out.push( this[ i ] );=0A=
}=0A=
return out;=0A=
},=0A=
=0A=
=0A=
forEach: function( callback, object ) {=0A=
var length =3D this.length;=0A=
for( var i =3D 0; i < length; i++ ) {=0A=
object=0A=
? callback.call( object, this[ i ], i, this )=0A=
: callback( this[ i ], i, this );=0A=
}=0A=
},=0A=
=0A=
=0A=
indexOf: function( value, fromIndex ) {=0A=
fromIndex =3D this.fitIndex( fromIndex, 0 );=0A=
for( var i =3D 0; i < this.length; i++ ) {=0A=
if( this[ i ] =3D=3D=3D value )=0A=
return i; =0A=
}=0A=
return -1;=0A=
},=0A=
=0A=
=0A=
lastIndexOf: function( value, fromIndex ) {=0A=
fromIndex =3D this.fitIndex( fromIndex, this.length - 1 );=0A=
for( var i =3D fromIndex; i >=3D 0; i-- ) {=0A=
if( this[ i ] =3D=3D value )=0A=
return i;=0A=
}=0A=
return -1;=0A=
},=0A=
=0A=
=0A=
some: function( callback, object ) {=0A=
var length =3D this.length;=0A=
for( var i =3D 0; i < length; i++ ) {=0A=
var result =3D object=0A=
? callback.call( object, this[ i ], i, this )=0A=
: callback( this[ i ], i, this );=0A=
if( result )=0A=
return true;=0A=
}=0A=
return false;=0A=
},=0A=
=0A=
=0A=
/* javascript 1.2 array methods */=0A=
=0A=
concat: function() {=0A=
var a =3D arguments;=0A=
var out =3D this.copy();=0A=
for( i =3D 0; i < a.length; i++ ) {=0A=
var b =3D a[ i ];=0A=
for( j =3D 0; j < b.length; j++ )=0A=
out.push( b[ j ] );=0A=
}=0A=
return out;=0A=
},=0A=
=0A=
=0A=
push: function() {=0A=
var a =3D arguments;=0A=
for( var i =3D 0; i < a.length; i++ )=0A=
this[ this.length ] =3D a[ i ];=0A=
return this.length; =0A=
},=0A=
=0A=
=0A=
pop: function() {=0A=
if( this.length =3D=3D 0 )=0A=
return undefined;=0A=
var out =3D this[ this.length - 1 ];=0A=
this.length--;=0A=
return out;=0A=
},=0A=
=0A=
=0A=
unshift: function() {=0A=
var a =3D arguments;=0A=
for( var i =3D 0; i < a.length; i++ ) {=0A=
this[ i + a.length ] =3D this[ i ];=0A=
this[ i ] =3D a[ i ];=0A=
}=0A=
return this.length; =0A=
},=0A=
=0A=
=0A=
shift: function() {=0A=
if( this.length =3D=3D 0 )=0A=
return undefined;=0A=
var out =3D this[ 0 ];=0A=
for( var i =3D 1; i < this.length; i++ )=0A=
this[ i - 1 ] =3D this[ i ];=0A=
this.length--;=0A=
return out;=0A=
}=0A=
} );=0A=
=0A=
=0A=
/* date extensions */=0A=
=0A=
Date.extend( {=0A=
/* iso 8601 date format parser=0A=
this was fun to write...=0A=
thanks to: http://www.cl.cam.ac.uk/~mgk25/iso-time.html */=0A=
=0A=
matchISOString: new RegExp(=0A=
"^([0-9]{4})" + =
// year=0A=
"(?:-(?=3D0[1-9]|1[0-2])|$)(..)?" + =
// month=0A=
"(?:-(?=3D0[1-9]|[12][0-9]|3[01])|$)([0-9]{2})?" + =
// day of the month=0A=
"(?:T(?=3D[01][0-9]|2[0-4])|$)T?([0-9]{2})?" + =
// hours=0A=
"(?::(?=3D[0-5][0-9])|\\+|-|Z|$)([0-9]{2})?" + =
// minutes=0A=
=
"(?::(?=3D[0-5][0-9]|60$|60[+|-|Z]|60.0+)|\\+|-|Z|$):?([0-9]{2})?" + // =
seconds=0A=
"(\.[0-9]+)?" + =
// fractional seconds=0A=
"(Z|\\+[01][0-9]|\\+2[0-4]|-[01][0-9]|-2[0-4])?" + =
// timezone hours=0A=
":?([0-5][0-9]|60)?$" =
// timezone minutes=0A=
),=0A=
=0A=
=0A=
fromISOString: function( string ) {=0A=
var t =3D this.matchISOString.exec( string );=0A=
if( !t )=0A=
return undefined;=0A=
=0A=
var year =3D finiteInt( t[ 1 ], 10 );=0A=
var month =3D finiteInt( t[ 2 ], 10 ) - 1;=0A=
var day =3D finiteInt( t[ 3 ], 10 );=0A=
var hours =3D finiteInt( t[ 4 ], 10 );=0A=
var minutes =3D finiteInt( t[ 5 ], 10 );=0A=
var seconds =3D finiteInt( t[ 6 ], 10 );=0A=
var milliseconds =3D finiteInt( Math.round( parseFloat( t[ 7 ] ) =
* 1000 ) );=0A=
var tzHours =3D finiteInt( t[ 8 ], 10 );=0A=
var tzMinutes =3D finiteInt( t[ 9 ], 10 );=0A=
=0A=
var date =3D new this( 0 );=0A=
if( defined( t[ 8 ] ) ) {=0A=
date.setUTCFullYear( year, month, day );=0A=
date.setUTCHours( hours, minutes, seconds, milliseconds );=0A=
var offset =3D (tzHours * 60 + tzMinutes) * 60000;=0A=
if( offset )=0A=
date =3D new this( date - offset );=0A=
} else {=0A=
date.setFullYear( year, month, day );=0A=
date.setHours( hours, minutes, seconds, milliseconds );=0A=
}=0A=
=0A=
return date;=0A=
}=0A=
} );=0A=
=0A=
=0A=
Date.prototype.extend( {=0A=
getISOTimezoneOffset: function() {=0A=
var offset =3D -this.getTimezoneOffset();=0A=
var negative =3D false;=0A=
if( offset < 0 ) {=0A=
negative =3D true;=0A=
offset *=3D -1;=0A=
}=0A=
var offsetHours =3D Math.floor( offset / 60 ).toString().pad( 2, =
"0" );=0A=
var offsetMinutes =3D Math.floor( offset % 60 ).toString().pad( =
2, "0" );=0A=
return (negative ? "-" : "+") + offsetHours + ":" + =
offsetMinutes;=0A=
},=0A=
=0A=
=0A=
toISODateString: function() {=0A=
var year =3D this.getFullYear();=0A=
var month =3D (this.getMonth() + 1).toString().pad( 2, "0" );=0A=
var day =3D this.getDate().toString().pad( 2, "0" );=0A=
return year + "-" + month + "-" + day;=0A=
},=0A=
=0A=
=0A=
toUTCISODateString: function() {=0A=
var year =3D this.getUTCFullYear();=0A=
var month =3D (this.getUTCMonth() + 1).toString().pad( 2, "0" );=0A=
var day =3D this.getUTCDate().toString().pad( 2, "0" );=0A=
return year + "-" + month + "-" + day;=0A=
},=0A=
=0A=
=0A=
toISOTimeString: function() {=0A=
var hours =3D this.getHours().toString().pad( 2, "0" );=0A=
var minutes =3D this.getMinutes().toString().pad( 2, "0" );=0A=
var seconds =3D this.getSeconds().toString().pad( 2, "0" );=0A=
var milliseconds =3D this.getMilliseconds().toString().pad( 3, =
"0" );=0A=
var timezone =3D this.getISOTimezoneOffset();=0A=
return hours + ":" + minutes + ":" + seconds + "." + =
milliseconds + timezone;=0A=
},=0A=
=0A=
=0A=
toUTCISOTimeString: function() {=0A=
var hours =3D this.getUTCHours().toString().pad( 2, "0" );=0A=
var minutes =3D this.getUTCMinutes().toString().pad( 2, "0" );=0A=
var seconds =3D this.getUTCSeconds().toString().pad( 2, "0" );=0A=
var milliseconds =3D this.getUTCMilliseconds().toString().pad( =
3, "0" );=0A=
return hours + ":" + minutes + ":" + seconds + "." + =
milliseconds + "Z";=0A=
},=0A=
=0A=
=0A=
toISOString: function() {=0A=
return this.toISODateString() + "T" + this.toISOTimeString();=0A=
},=0A=
=0A=
=0A=
toUTCISOString: function() {=0A=
return this.toUTCISODateString() + "T" + =
this.toUTCISOTimeString();=0A=
}=0A=
} );=0A=
=0A=
=0A=
/* ajax */=0A=
=0A=
if( !defined( window.XMLHttpRequest ) ) {=0A=
window.XMLHttpRequest =3D function() {=0A=
var types =3D [=0A=
"Microsoft.XMLHTTP",=0A=
"MSXML2.XMLHTTP.5.0",=0A=
"MSXML2.XMLHTTP.4.0",=0A=
"MSXML2.XMLHTTP.3.0",=0A=
"MSXML2.XMLHTTP"=0A=
];=0A=
=0A=
for( var i =3D 0; i < types.length; i++ ) {=0A=
try {=0A=
return new ActiveXObject( types[ i ] );=0A=
} catch( e ) {}=0A=
}=0A=
=0A=
return undefined;=0A=
}=0A=
}=0A=
/*=0A=
DOM Library - Copyright 2005 Six Apart=0A=
$Id: dom.js 86 2006-12-04 21:35:07Z henrylyne $=0A=
=0A=
Copyright (c) 2005, Six Apart, Ltd.=0A=
All rights reserved.=0A=
=0A=
Redistribution and use in source and binary forms, with or without=0A=
modification, are permitted provided that the following conditions are=0A=
met:=0A=
=0A=
* Redistributions of source code must retain the above copyright=0A=
notice, this list of conditions and the following disclaimer.=0A=
=0A=
* Redistributions in binary form must reproduce the above=0A=
copyright notice, this list of conditions and the following disclaimer=0A=
in the documentation and/or other materials provided with the=0A=
distribution.=0A=
=0A=
* Neither the name of "Six Apart" nor the names of its=0A=
contributors may be used to endorse or promote products derived from=0A=
this software without specific prior written permission.=0A=
=0A=
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS=0A=
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT=0A=
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR=0A=
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT=0A=
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,=0A=
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT=0A=
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,=0A=
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY=0A=
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT=0A=
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE=0A=
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.=0A=
=0A=
*/=0A=
=0A=
=0A=
/* Node class */=0A=
=0A=
if( !defined( window.Node ) )=0A=
Node =3D {};=0A=
=0A=
try {=0A=
Node.extend( {=0A=
ELEMENT_NODE: 1,=0A=
ATTRIBUTE_NODE: 2,=0A=
TEXT_NODE: 3,=0A=
CDATA_SECTION_NODE: 4, =0A=
COMMENT_NODE: 8, =0A=
DOCUMENT_NODE: 9,=0A=
DOCUMENT_FRAGMENT_NODE: 11=0A=
} );=0A=
} catch( e ) {}=0A=
=0A=
=0A=
/* DOM class */=0A=
=0A=
if( !defined( window.DOM ) )=0A=
DOM =3D {};=0A=
=0A=
=0A=
DOM.extend( {=0A=
getElement: function( e ) {=0A=
return (typeof e =3D=3D "string" || typeof e =3D=3D "number") ? =
document.getElementById( e ) : e;=0A=
},=0A=
=0A=
=0A=
addEventListener: function( e, eventName, func, useCapture ) {=0A=
try {=0A=
if( e.addEventListener )=0A=
e.addEventListener( eventName, func, useCapture );=0A=
else if( e.attachEvent )=0A=
e.attachEvent( "on" + eventName, func );=0A=
else=0A=
e[ "on" + eventName ] =3D func;=0A=
} catch( e ) {}=0A=
},=0A=
=0A=
=0A=
removeEventListener: function( e, eventName, func, useCapture ) {=0A=
try {=0A=
if( e.removeEventListener )=0A=
e.removeEventListener( eventName, func, useCapture );=0A=
else if( e.detachEvent )=0A=
e.detachEvent( "on" + eventName, func );=0A=
else=0A=
e[ "on" + eventName ] =3D undefined;=0A=
} catch( e ) {}=0A=
},=0A=
=0A=
=0A=
focus: function( e ) {=0A=
try {=0A=
e =3D DOM.getElement( e );=0A=
e.focus();=0A=
} catch( e ) {}=0A=
},=0A=
=0A=
=0A=
blur: function( e ) {=0A=
try {=0A=
e =3D DOM.getElement( e );=0A=
e.blur();=0A=
} catch( e ) {}=0A=
},=0A=
=0A=
=0A=
/* style */=0A=
=0A=
getComputedStyle: function( e ) {=0A=
if( e.currentStyle )=0A=
return e.currentStyle;=0A=
var style =3D {};=0A=
var owner =3D DOM.getOwnerDocument( e );=0A=
if( owner && owner.defaultView && =
owner.defaultView.getComputedStyle ) { =0A=
try {=0A=
style =3D owner.defaultView.getComputedStyle( e, null );=0A=
} catch( e ) {}=0A=
}=0A=
return style;=0A=
},=0A=
=0A=
=0A=
getStyle: function( e, p ) {=0A=
var s =3D DOM.getComputedStyle( e );=0A=
return s[ p ];=0A=
},=0A=
=0A=
=0A=
// given a window (or defaulting to current window), returns=0A=
// object with .x and .y of client's usable area=0A=
getClientDimensions: function( w ) {=0A=
if( !w )=0A=
w =3D window;=0A=
=0A=
var d =3D {};=0A=
=0A=
// most browsers=0A=
if( w.innerHeight ) {=0A=
d.x =3D w.innerWidth;=0A=
d.y =3D w.innerHeight;=0A=
return d;=0A=
}=0A=
=0A=
// IE6, strict=0A=
var de =3D w.document.documentElement;=0A=
if( de && de.clientHeight ) {=0A=
d.x =3D de.clientWidth;=0A=
d.y =3D de.clientHeight;=0A=
return d;=0A=
}=0A=
=0A=
// IE, misc=0A=
if( document.body ) {=0A=
d.x =3D document.body.clientWidth;=0A=
d.y =3D document.body.clientHeight;=0A=
return d;=0A=
}=0A=
=0A=
return undefined;=0A=
},=0A=
=0A=
=0A=
getDimensions: function( e ) {=0A=
if( !e )=0A=
return undefined;=0A=
=0A=
var style =3D DOM.getComputedStyle( e );=0A=
=0A=
return {=0A=
offsetLeft: e.offsetLeft,=0A=
offsetTop: e.offsetTop,=0A=
offsetWidth: e.offsetWidth,=0A=
offsetHeight: e.offsetHeight,=0A=
clientWidth: e.clientWidth,=0A=
clientHeight: e.clientHeight,=0A=
=0A=
offsetRight: e.offsetLeft + e.offsetWidth,=0A=
offsetBottom: e.offsetTop + e.offsetHeight,=0A=
clientLeft: finiteInt( style.borderLeftWidth ) + finiteInt( =
style.paddingLeft ),=0A=
clientTop: finiteInt( style.borderTopWidth ) + finiteInt( =
style.paddingTop ),=0A=
clientRight: e.clientLeft + e.clientWidth,=0A=
clientBottom: e.clientTop + e.clientHeight=0A=
};=0A=
},=0A=
=0A=
=0A=
getAbsoluteDimensions: function( e ) {=0A=
var d =3D DOM.getDimensions( e );=0A=
if( !d )=0A=
return d;=0A=
d.absoluteLeft =3D d.offsetLeft;=0A=
d.absoluteTop =3D d.offsetTop;=0A=
d.absoluteRight =3D d.offsetRight;=0A=
d.absoluteBottom =3D d.offsetBottom;=0A=
var bork =3D 0;=0A=
while( e ) {=0A=
try { // IE 6 sometimes gives an unwarranted error =
("htmlfile: Unspecified error").=0A=
e =3D e.offsetParent;=0A=
} catch ( err ) {=0A=
log( "In DOM.getAbsoluteDimensions: " + err.message ); =0A=
if ( ++bork > 25 )=0A=
return null;=0A=
}=0A=
if( !e )=0A=
return d;=0A=
d.absoluteLeft +=3D e.offsetLeft;=0A=
d.absoluteTop +=3D e.offsetTop;=0A=
d.absoluteRight +=3D e.offsetLeft;=0A=
d.absoluteBottom +=3D e.offsetTop;=0A=
}=0A=
return d;=0A=
},=0A=
=0A=
=0A=
getIframeAbsoluteDimensions: function( e ) {=0A=
var d =3D DOM.getAbsoluteDimensions( e );=0A=
if( !d )=0A=
return d;=0A=
var iframe =3D DOM.getOwnerIframe( e );=0A=
if( !defined( iframe ) )=0A=
return d;=0A=
=0A=
var d2 =3D DOM.getIframeAbsoluteDimensions( iframe );=0A=
var scroll =3D DOM.getWindowScroll( iframe.contentWindow );=0A=
var left =3D d2.absoluteLeft - scroll.left;=0A=
var top =3D d2.absoluteTop - scroll.top;=0A=
=0A=
d.absoluteLeft +=3D left;=0A=
d.absoluteTop +=3D top;=0A=
d.absoluteRight +=3D left;=0A=
d.absoluteBottom +=3D top;=0A=
=0A=
return d;=0A=
},=0A=
=0A=
=0A=
setLeft: function( e, v ) { e.style.left =3D finiteInt( v ) + "px"; =
},=0A=
setTop: function( e, v ) { e.style.top =3D finiteInt( v ) + "px"; },=0A=
setRight: function( e, v ) { e.style.right =3D finiteInt( v ) + =
"px"; },=0A=
setBottom: function( e, v ) { e.style.bottom =3D finiteInt( v ) + =
"px"; },=0A=
setWidth: function( e, v ) { e.style.width =3D max( 0, finiteInt( v =
) ) + "px"; },=0A=
setHeight: function( e, v ) { e.style.height =3D max( 0, finiteInt( =
v ) ) + "px"; },=0A=
setZIndex: function( e, v ) { e.style.zIndex =3D finiteInt( v ); },=0A=
=0A=
=0A=
getWindowScroll: function( w ) {=0A=
var s =3D {=0A=
left: 0,=0A=
top: 0=0A=
};=0A=
=0A=
var d =3D w.document;=0A=
=0A=
// ie=0A=
var de =3D d.documentElement;=0A=
if( de && defined( de.scrollLeft ) ) {=0A=
s.left =3D de.scrollLeft;=0A=
s.top =3D de.scrollTop;=0A=
}=0A=
=0A=
// safari=0A=
else if( defined( w.scrollX ) ) {=0A=
s.left =3D w.scrollX;=0A=
s.top =3D w.scrollY;=0A=
}=0A=
=0A=
// opera=0A=
else if( d.body && defined( d.body.scrollLeft ) ) {=0A=
s.left =3D d.body.scrollLeft;=0A=
s.top =3D d.body.scrollTop;=0A=
}=0A=
=0A=
return s;=0A=
},=0A=
=0A=
=0A=
getAbsoluteCursorPosition: function( event ) {=0A=
event =3D event || window.event;=0A=
var s =3D DOM.getWindowScroll( window );=0A=
return {=0A=
x: s.left + event.clientX,=0A=
y: s.top + event.clientY=0A=
};=0A=
},=0A=
=0A=
=0A=
invisibleStyle: {=0A=
display: "block",=0A=
position: "absolute",=0A=
left: 0,=0A=
top: 0,=0A=
width: 0,=0A=
height: 0,=0A=
margin: 0,=0A=
border: 0,=0A=
padding: 0,=0A=
fontSize: "0.1px",=0A=
lineHeight: 0,=0A=
opacity: 0,=0A=
MozOpacity: 0,=0A=
filter: "alpha(opacity=3D0)"=0A=
},=0A=
=0A=
=0A=
makeInvisible: function( e ) {=0A=
for( var p in this.invisibleStyle ) {=0A=
if( this.invisibleStyle.hasOwnProperty( p ) )=0A=
e.style[ p ] =3D this.invisibleStyle[ p ];=0A=
}=0A=
},=0A=
=0A=
=0A=
/* text and selection related methods */=0A=
=0A=
mergeTextNodes: function( n ) {=0A=
var c =3D 0;=0A=
while( n ) {=0A=
if( n.nodeType =3D=3D Node.TEXT_NODE && n.nextSibling && =
n.nextSibling.nodeType =3D=3D Node.TEXT_NODE ) {=0A=
n.nodeValue +=3D n.nextSibling.nodeValue;=0A=
n.parentNode.removeChild( n.nextSibling );=0A=
c++;=0A=
} else {=0A=
if( n.firstChild )=0A=
c +=3D DOM.mergeTextNodes( n.firstChild );=0A=
n =3D n.nextSibling;=0A=
}=0A=
}=0A=
return c;=0A=
},=0A=
=0A=
=0A=
selectElement: function( e ) { =0A=
var d =3D e.ownerDocument; =0A=
=0A=
// internet explorer =0A=
if( d.body.createControlRange ) { =0A=
var r =3D d.body.createControlRange(); =0A=
r.addElement( e ); =0A=
r.select(); =0A=
} =0A=
}, =0A=
=0A=
=0A=
/* dom methods */=0A=
=0A=
isImmutable: function( n ) {=0A=
try {=0A=
if( n.getAttribute( "contenteditable" ) =3D=3D "false" )=0A=
return true;=0A=
} catch( e ) {}=0A=
return false;=0A=
},=0A=
=0A=
=0A=
getImmutable: function( n ) {=0A=
var immutable =3D null;=0A=
while( n ) {=0A=
if( DOM.isImmutable( n ) )=0A=
immutable =3D n;=0A=
n =3D n.parentNode;=0A=
}=0A=
return immutable;=0A=
},=0A=
=0A=
=0A=
getOwnerDocument: function( n ) {=0A=
if( !n )=0A=
return document;=0A=
if( n.ownerDocument )=0A=
return n.ownerDocument;=0A=
if( n.getElementById )=0A=
return n;=0A=
return document;=0A=
},=0A=
=0A=
=0A=
getOwnerWindow: function( n ) {=0A=
if( !n )=0A=
return window;=0A=
if( n.parentWindow )=0A=
return n.parentWindow;=0A=
var doc =3D DOM.getOwnerDocument( n );=0A=
if( doc && doc.defaultView )=0A=
return doc.defaultView;=0A=
return window;=0A=
},=0A=
=0A=
=0A=
getOwnerIframe: function( n ) {=0A=
if( !n )=0A=
return undefined;=0A=
var nw =3D DOM.getOwnerWindow( n );=0A=
var nd =3D DOM.getOwnerDocument( n );=0A=
var pw =3D nw.parent || nw.parentWindow;=0A=
if( !pw )=0A=
return undefined;=0A=
var parentDocument =3D pw.document;=0A=
var es =3D parentDocument.getElementsByTagName( "iframe" );=0A=
for( var i =3D 0; i < es.length; i++ ) {=0A=
var e =3D es[ i ];=0A=
try {=0A=
var d =3D e.contentDocument || e.contentWindow.document;=0A=
if( d =3D=3D=3D nd )=0A=
return e;=0A=
}catch(err) {};=0A=
}=0A=
return undefined;=0A=
},=0A=
=0A=
=0A=
filterElementsByClassName: function( es, className ) {=0A=
var filtered =3D [];=0A=
for( var i =3D 0; i < es.length; i++ ) {=0A=
var e =3D es[ i ];=0A=
if( DOM.hasClassName( e, className ) )=0A=
filtered[ filtered.length ] =3D e;=0A=
}=0A=
return filtered;=0A=
},=0A=
=0A=
=0A=
filterElementsByAttribute: function( es, attr ) {=0A=
if( !es )=0A=
return [];=0A=
if( !defined( attr ) || attr =3D=3D null || attr =3D=3D "" )=0A=
return es;=0A=
var filtered =3D [];=0A=
for( var i =3D 0; i < es.length; i++ ) {=0A=
var element =3D es[ i ];=0A=
if( !element )=0A=
continue;=0A=
if( element.getAttribute && ( element.getAttribute( attr ) ) =
)=0A=
filtered[ filtered.length ] =3D element;=0A=
}=0A=
return filtered;=0A=
},=0A=
=0A=
=0A=
filterElementsByTagName: function( es, tagName ) {=0A=
if( tagName =3D=3D "*" )=0A=
return es;=0A=
var filtered =3D [];=0A=
tagName =3D tagName.toLowerCase();=0A=
for( var i =3D 0; i < es.length; i++ ) {=0A=
var e =3D es[ i ];=0A=
if( e.tagName && e.tagName.toLowerCase() =3D=3D tagName )=0A=
filtered[ filtered.length ] =3D e;=0A=
}=0A=
return filtered;=0A=
},=0A=
=0A=
=0A=
getElementsByTagAndAttribute: function( root, tagName, attr ) {=0A=
if( !root )=0A=
root =3D document;=0A=
var es =3D root.getElementsByTagName( tagName );=0A=
return DOM.filterElementsByAttribute( es, attr );=0A=
},=0A=
=0A=
=0A=
getElementsByAttribute: function( root, attr ) {=0A=
return DOM.getElementsByTagAndAttribute( root, "*", attr );=0A=
},=0A=
=0A=
=0A=
getElementsByAttributeAndValue: function( root, attr, value ) {=0A=
var es =3D DOM.getElementsByTagAndAttribute( root, "*", attr );=0A=
var filtered =3D [];=0A=
for ( var i =3D 0; i < es.length; i++ )=0A=
if ( es[ i ].getAttribute( attr ) =3D=3D value )=0A=
filtered.push( es[ i ] );=0A=
return filtered;=0A=
},=0A=
=0A=
=0A=
getElementsByTagAndClassName: function( root, tagName, className ) {=0A=
if( !root )=0A=
root =3D document;=0A=
var elements =3D root.getElementsByTagName( tagName );=0A=
return DOM.filterElementsByClassName( elements, className );=0A=
},=0A=
=0A=
=0A=
getElementsByClassName: function( root, className ) {=0A=
return DOM.getElementsByTagAndClassName( root, "*", className );=0A=
},=0A=
=0A=
=0A=
getAncestors: function( n, includeSelf ) {=0A=
if( !n )=0A=
return [];=0A=
var as =3D includeSelf ? [ n ] : [];=0A=
n =3D n.parentNode;=0A=
while( n ) {=0A=
as.push( n );=0A=
n =3D n.parentNode;=0A=
}=0A=
return as;=0A=
},=0A=
=0A=
=0A=
getAncestorsByTagName: function( n, tagName, includeSelf ) {=0A=
var es =3D DOM.getAncestors( n, includeSelf );=0A=
return DOM.filterElementsByTagName( es, tagName );=0A=
},=0A=
=0A=
=0A=
getFirstAncestorByTagName: function( n, tagName, includeSelf ) {=0A=
return DOM.getAncestorsByTagName( n, tagName, includeSelf )[ 0 ];=0A=
},=0A=
=0A=
=0A=
getAncestorsByClassName: function( n, className, includeSelf ) {=0A=
var es =3D DOM.getAncestors( n, includeSelf );=0A=
return DOM.filterElementsByClassName( es, className );=0A=
},=0A=
=0A=
=0A=
getFirstAncestorByClassName: function( n, className, includeSelf ) {=0A=
return DOM.getAncestorsByClassName( n, className, includeSelf )[ =
0 ];=0A=
},=0A=
=0A=
=0A=
getAncestorsByTagAndClassName: function( n, tagName, className, =
includeSelf ) {=0A=
var es =3D DOM.getAncestorsByTagName( n, tagName, includeSelf );=0A=
return DOM.filterElementsByClassName( es, className );=0A=
},=0A=
=0A=
=0A=
getFirstAncestorByTagAndClassName: function( n, tagName, className, =
includeSelf ) {=0A=
return DOM.getAncestorsByTagAndClassName( n, tagName, className, =
includeSelf )[ 0 ];=0A=
},=0A=
=0A=
=0A=
getPreviousElement: function( n ) {=0A=
n =3D n.previousSibling;=0A=
while( n ) {=0A=
if( n.nodeType =3D=3D Node.ELEMENT_NODE )=0A=
return n;=0A=
n =3D n.previousSibling;=0A=
}=0A=
return null;=0A=
},=0A=
=0A=
=0A=
getNextElement: function( n ) {=0A=
n =3D n.nextSibling;=0A=
while( n ) {=0A=
if( n.nodeType =3D=3D Node.ELEMENT_NODE )=0A=
return n;=0A=
n =3D n.nextSibling;=0A=
}=0A=
return null;=0A=
},=0A=
=0A=
=0A=
isInlineNode: function( n ) {=0A=
// text nodes are inline=0A=
if( n.nodeType =3D=3D Node.TEXT_NODE )=0A=
return n;=0A=
=0A=
// document nodes are non-inline=0A=
if( n.nodeType =3D=3D Node.DOCUMENT_NODE )=0A=
return false;=0A=
=0A=
// all nonelement nodes are inline=0A=
if( n.nodeType !=3D Node.ELEMENT_NODE )=0A=
return n;=0A=
=0A=
// br elements are not inline=0A=
if( n.tagName && n.tagName.toLowerCase() =3D=3D "br" )=0A=
return false;=0A=
=0A=
// examine the style property of the inline n=0A=
var display =3D DOM.getStyle( n, "display" ); =0A=
if( display && display.indexOf( "inline" ) >=3D 0 ) =0A=
return n;=0A=
},=0A=
=0A=
=0A=
isTextNode: function( n ) {=0A=
if( n.nodeType =3D=3D Node.TEXT_NODE )=0A=
return n;=0A=
},=0A=
=0A=
=0A=
isInlineTextNode: function( n ) {=0A=
if( n.nodeType =3D=3D Node.TEXT_NODE )=0A=
return n;=0A=
if( !DOM.isInlineNode( n ) )=0A=
return null;=0A=
},=0A=
=0A=
=0A=
/* this and the following classname functions honor w3c =
case-sensitive classnames */=0A=
=0A=
getClassNames: function( e ) {=0A=
if( !e || !e.className )=0A=
return [];=0A=
return e.className.split( /\s+/g );=0A=
},=0A=
=0A=
=0A=
hasClassName: function( e, className ) {=0A=
if( !e || !e.className )=0A=
return false;=0A=
var cs =3D DOM.getClassNames( e );=0A=
for( var i =3D 0; i < cs.length; i++ ) {=0A=
if( cs[ i ] =3D=3D className )=0A=
return true;=0A=
}=0A=
return false;=0A=
},=0A=
=0A=
=0A=
addClassName: function( e, className ) {=0A=
if( !e || !className )=0A=
return false;=0A=
var cs =3D DOM.getClassNames( e );=0A=
for( var i =3D 0; i < cs.length; i++ ) {=0A=
if( cs[ i ] =3D=3D className )=0A=
return true;=0A=
}=0A=
cs.push( className );=0A=
e.className =3D cs.join( " " );=0A=
return false;=0A=
},=0A=
=0A=
=0A=
removeClassName: function( e, className ) {=0A=
var r =3D false;=0A=
if( !e || !e.className || !className )=0A=
return r;=0A=
var cs =3D (e.className && e.className.length)=0A=
? e.className.split( /\s+/g )=0A=
: [];=0A=
var ncs =3D [];=0A=
for( var i =3D 0; i < cs.length; i++ ) {=0A=
if( cs[ i ] =3D=3D className ) {=0A=
r =3D true;=0A=
continue;=0A=
}=0A=
ncs.push( cs[ i ] );=0A=
}=0A=
if( r )=0A=
e.className =3D ncs.join( " " );=0A=
return r;=0A=
},=0A=
=0A=
=0A=
/* tree manipulation methods */=0A=
=0A=
replaceWithChildNodes: function( n ) {=0A=
var firstChild =3D n.firstChild;=0A=
var parentNode =3D n.parentNode;=0A=
while( n.firstChild )=0A=
parentNode.insertBefore( n.removeChild( n.firstChild ), n );=0A=
parentNode.removeChild( n );=0A=
return firstChild;=0A=
},=0A=
=0A=
=0A=
/* factory methods */=0A=
=0A=
createInvisibleInput: function( d ) {=0A=
if( !d )=0A=
d =3D window.document;=0A=
var e =3D document.createElement( "input" );=0A=
e.setAttribute( "autocomplete", "off" );=0A=
e.autocomplete =3D "off";=0A=
DOM.makeInvisible( e );=0A=
return e;=0A=
},=0A=
=0A=
=0A=
getMouseEventAttribute: function( event, a ) {=0A=
if( !a )=0A=
return;=0A=
var es =3D DOM.getAncestors( event.target, true );=0A=
for( var i =3D 0; i < es.length; i++ ) {=0A=
try {=0A=
var e =3D es[ i ]=0A=
var v =3D e.getAttribute ? e.getAttribute( a ) : null;=0A=
if( v ) {=0A=
event.attributeElement =3D e;=0A=
event.attribute =3D v;=0A=
return v;=0A=
}=0A=
} catch( e ) {}=0A=
}=0A=
},=0A=
=0A=
=0A=
setElementAttribute: function( e, a, v ) {=0A=
/* safari workaround=0A=
* safari's setAttribute assumes you want to use a namespace=0A=
* when you have a colon in your attribute=0A=
*/=0A=
if ( navigator.userAgent.toLowerCase().match(/webkit/) ) {=0A=
var at =3D e.attributes;=0A=
for ( var i =3D 0; i < at.length; i++ )=0A=
if ( at[ i ].name =3D=3D a )=0A=
return at[ i ].nodeValue =3D v;=0A=
} else=0A=
e.setAttribute( a, v );=0A=
},=0A=
=0A=
=0A=
swapAttributes: function( e, tg, at ) {=0A=
var ar =3D e.getAttribute( tg );=0A=
if( !ar )=0A=
return false;=0A=
=0A=
/* clone the node with all children */=0A=
if ( e.tagName.toLowerCase() =3D=3D 'script' ) {=0A=
/* only clone and replace script tags */=0A=
var cl =3D e.cloneNode( true );=0A=
if ( !cl )=0A=
return false;=0A=
=0A=
DOM.setElementAttribute( cl, at, ar );=0A=
cl.removeAttribute( tg );=0A=
=0A=
/* replace new, old */=0A=
return e.parentNode.replaceChild( cl, e );=0A=
} else {=0A=
DOM.setElementAttribute( e, at, ar );=0A=
e.removeAttribute( tg );=0A=
}=0A=
}=0A=
=0A=
=0A=
} );=0A=
=0A=
=0A=
$ =3D DOM.getElement;=0A=
var HTTPReq =3D new Object;=0A=
=0A=
HTTPReq.create =3D function () {=0A=
var xtr;=0A=
var ex;=0A=
=0A=
if (typeof(XMLHttpRequest) !=3D "undefined") {=0A=
xtr =3D new XMLHttpRequest();=0A=
} else {=0A=
try {=0A=
xtr =3D new ActiveXObject("Msxml2.XMLHTTP.4.0");=0A=
} catch (ex) {=0A=
try {=0A=
xtr =3D new ActiveXObject("Msxml2.XMLHTTP");=0A=
} catch (ex) {=0A=
}=0A=
}=0A=
}=0A=
=0A=
// let me explain this. Opera 8 does XMLHttpRequest, but not =
setRequestHeader.=0A=
// no problem, we thought: we'll test for setRequestHeader and if =
it's not present=0A=
// then fall back to the old behavior (treat it as not working). =
BUT --- IE6 won't=0A=
// let you even test for setRequestHeader without throwing an =
exception (you need=0A=
// to call .open on the .xtr first or something)=0A=
try {=0A=
if (xtr && ! xtr.setRequestHeader)=0A=
xtr =3D null;=0A=
} catch (ex) { }=0A=
=0A=
return xtr;=0A=
};=0A=
=0A=
// opts:=0A=
// url, onError, onData, method (GET or POST), data=0A=
// url: where to get/post to=0A=
// onError: callback on error=0A=
// onData: callback on data received=0A=
// method: HTTP method, GET by default=0A=
// data: what to send to the server (urlencoded)=0A=
HTTPReq.getJSON =3D function (opts) {=0A=
var req =3D HTTPReq.create();=0A=
if (! req) {=0A=
if (opts.onError) opts.onError("noxmlhttprequest");=0A=
return;=0A=
}=0A=
=0A=
var state_callback =3D function () {=0A=
if (req.readyState !=3D 4) return;=0A=
=0A=
if (req.status !=3D 200) {=0A=
if (opts.onError) opts.onError(req.status ? "status: " + =
req.status : "no data");=0A=
return;=0A=
}=0A=
=0A=
var resObj;=0A=
var e;=0A=
try {=0A=
eval("resObj =3D " + req.responseText + ";");=0A=
} catch (e) {=0A=
}=0A=
=0A=
if (e || ! resObj) {=0A=
if (opts.onError)=0A=
opts.onError("Error parsing response: \"" + =
req.responseText + "\"");=0A=
=0A=
return;=0A=
}=0A=
=0A=
if (opts.onData)=0A=
opts.onData(resObj);=0A=
};=0A=
=0A=
req.onreadystatechange =3D state_callback;=0A=
=0A=
var method =3D opts.method || "GET";=0A=
var data =3D opts.data || null;=0A=
=0A=
var url =3D opts.url;=0A=
if (opts.method =3D=3D "GET" && opts.data) {=0A=
url +=3D url.match(/\?/) ? "&" : "?";=0A=
url +=3D opts.data=0A=
}=0A=
=0A=
url +=3D url.match(/\?/) ? "&" : "?";=0A=
url +=3D "_rand=3D" + Math.random();=0A=
=0A=
req.open(method, url, true);=0A=
=0A=
// we should send null unless we're in a POST=0A=
var to_send =3D null;=0A=
=0A=
if (method.toUpperCase() =3D=3D "POST") {=0A=
req.setRequestHeader("Content-Type", =
"application/x-www-form-urlencoded");=0A=
to_send =3D data;=0A=
}=0A=
=0A=
req.send(to_send);=0A=
};=0A=
=0A=
HTTPReq.formEncoded =3D function (vars) {=0A=
var enc =3D [];=0A=
var e;=0A=
for (var key in vars) {=0A=
try {=0A=
if (!vars.hasOwnProperty(key))=0A=
continue;=0A=
enc.push(encodeURIComponent(key) + "=3D" + =
encodeURIComponent(vars[key]));=0A=
} catch( e ) {}=0A=
}=0A=
return enc.join("&");=0A=
=0A=
};=0A=
=0A=
// This file contains general-purpose LJ code=0A=
=0A=
var LiveJournal =3D new Object;=0A=
=0A=
// The hook mappings=0A=
LiveJournal.hooks =3D {};=0A=
=0A=
LiveJournal.register_hook =3D function (hook, func) {=0A=
if (! LiveJournal.hooks[hook])=0A=
LiveJournal.hooks[hook] =3D [];=0A=
=0A=
LiveJournal.hooks[hook].push(func);=0A=
};=0A=
=0A=
// args: hook, params to pass to hook=0A=
LiveJournal.run_hook =3D function () {=0A=
var a =3D arguments;=0A=
=0A=
var hookfuncs =3D LiveJournal.hooks[a[0]];=0A=
if (!hookfuncs || !hookfuncs.length) return;=0A=
=0A=
var hookargs =3D [];=0A=
=0A=
for (var i =3D 1; i < a.length; i++) {=0A=
hookargs.push(a[i]);=0A=
}=0A=
=0A=
var rv =3D null;=0A=
=0A=
hookfuncs.forEach(function (hookfunc) {=0A=
rv =3D hookfunc.apply(null, hookargs);=0A=
});=0A=
=0A=
return rv;=0A=
};=0A=
=0A=
LiveJournal.pageLoaded =3D false;=0A=
=0A=
LiveJournal.initPage =3D function () {=0A=
// only run once=0A=
if (LiveJournal.pageLoaded)=0A=
return;=0A=
LiveJournal.pageLoaded =3D 1;=0A=
=0A=
// set up various handlers for every page=0A=
LiveJournal.initPlaceholders();=0A=
LiveJournal.initLabels();=0A=
LiveJournal.initInboxUpdate();=0A=
LiveJournal.initAds();=0A=
LiveJournal.initPolls();=0A=
=0A=
// run other hooks=0A=
LiveJournal.run_hook("page_load");=0A=
};=0A=
=0A=
// Set up two different ways to test if the page is loaded yet.=0A=
// The proper way is using DOMContentLoaded, but only Mozilla supports =
it.=0A=
{=0A=
// Others=0A=
DOM.addEventListener(window, "load", LiveJournal.initPage);=0A=
=0A=
// Mozilla=0A=
DOM.addEventListener(window, "DOMContentLoaded", =
LiveJournal.initPage);=0A=
}=0A=
=0A=
// Set up a timer to keep the inbox count updated=0A=
LiveJournal.initInboxUpdate =3D function () {=0A=
// Don't run if not logged in or this is disabled=0A=
if (! Site || ! Site.has_remote || ! Site.inbox_update_poll) return;=0A=
=0A=
// Don't run if no inbox count=0A=
var unread =3D $("LJ_Inbox_Unread_Count");=0A=
if (! unread) return;=0A=
=0A=
// Update every five minutes=0A=
window.setInterval(LiveJournal.updateInbox, 1000 * 60 * 5);=0A=
};=0A=
=0A=
// Do AJAX request to find the number of unread items in the inbox=0A=
LiveJournal.updateInbox =3D function () {=0A=
var postData =3D {=0A=
"action": "get_unread_items"=0A=
};=0A=
=0A=
var opts =3D {=0A=
"data": HTTPReq.formEncoded(postData),=0A=
"method": "POST",=0A=
"onData": LiveJournal.gotInboxUpdate=0A=
};=0A=
=0A=
opts.url =3D Site.currentJournal ? "/" + Site.currentJournal + =
"/__rpc_esn_inbox" : "/__rpc_esn_inbox";=0A=
=0A=
HTTPReq.getJSON(opts);=0A=
};=0A=
=0A=
// We received the number of unread inbox items from the server=0A=
LiveJournal.gotInboxUpdate =3D function (resp) {=0A=
if (! resp || resp.error) return;=0A=
=0A=
var unread =3D $("LJ_Inbox_Unread_Count");=0A=
if (! unread) return;=0A=
=0A=
unread.innerHTML =3D resp.unread_count ? " (" + resp.unread_count + =
")" : "";=0A=
};=0A=
=0A=
// Search for placeholders and initialize them=0A=
LiveJournal.initPlaceholders =3D function () {=0A=
var placeholders =3D DOM.getElementsByTagAndClassName(document, =
"img", "LJ_Placeholder") || [];=0A=
=0A=
Array.prototype.forEach.call(placeholders, function (placeholder) {=0A=
var parent =3D DOM.getFirstAncestorByClassName(placeholder, =
"LJ_Placeholder_Container", false);=0A=
if (!parent) return;=0A=
=0A=
var container =3D =
DOM.filterElementsByClassName(parent.getElementsByTagName("div"), =
"LJ_Container")[0];=0A=
if (!container) return;=0A=
=0A=
var html =3D =
DOM.filterElementsByClassName(parent.getElementsByTagName("div"), =
"LJ_Placeholder_HTML")[0];=0A=
if (!html) return;=0A=
=0A=
var placeholder_html =3D unescape(html.innerHTML);=0A=
=0A=
var placeholderClickHandler =3D function (e) {=0A=
Event.stop(e);=0A=
// have to wrap placeholder_html in another block, IE is =
weird=0A=
container.innerHTML =3D "" + placeholder_html + =
"";=0A=
DOM.makeInvisible(placeholder);=0A=
};=0A=
=0A=
DOM.addEventListener(placeholder, "click", =
placeholderClickHandler);=0A=
=0A=
return false;=0A=
});=0A=
};=0A=
=0A=
// set up labels for Safari=0A=
LiveJournal.initLabels =3D function () {=0A=
// disabled because new webkit has labels that work=0A=
return;=0A=
=0A=
// safari doesn't know what |