if( !Node ){
	var 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.prototype.getName = function () {
	var aTemp;
	if ( typeof this.name == 'string' ) {
		return this.name;
	}
	else {
		aTemp = /function\s([\w]+)\(/g.exec( this.toString() );
		return this.name = ( aTemp != null && typeof aTemp[1] != 'undefined' ) ? aTemp[1] : '';
	};
};
String.prototype.trim = function() {
	return this.replace(/(^\s*)|(\s*$)/g, '');
};
String.prototype.escapeHTML = function() {
	var s = this.toString();
	s = s.replace(/\&/g, '&amp;');
	s = s.replace(/\</g, '&lt;');
	s = s.replace(/\>/g, '&gt;');
	return s;
};
String.prototype.unescapeHTML = function() {
	var s = this.toString();
	s = s.replace(/\&lt;/g,  '<');
	s = s.replace(/\&gt;/g,  '>');
	s = s.replace(/\&amp;/g, '&');
	return s;
};
String.prototype.toInt = function( nBase ) {
	var nVal;
	if ( typeof( nBase ) == 'undefined' ) {
		nBase = 10;
	};
	nVal = parseInt( this.toString() , nBase );
	if ( isNaN( nVal ) ) {
		nVal = 0;
	};
	return nVal;
};
String.prototype.toFloat = function() {
	return parseFloat( ('0' + this.toString() ).replace(/[^0-9]/g,''), 10)
};
String.prototype.endsWith = function( sEnd ) {
	if ( typeof sEnd != 'string' ) {
		sEnd = sEnd.toString();
	};
	return ( this.toString().substring( this.toString().length - sEnd.length, this.toString().length ) == sEnd ) ? true : false;
};
String.prototype.startsWith = function( sStart, nStart ) {
	if ( typeof sStart != 'string' ) {
		sStart = sStart.toString();
	};
	if ( !nStart ) {
		nStart = 0;
	};
	if ( typeof nStart != 'number' ) {
		nStart = nStart.toString().toInt();
	};
	return ( this.toString().substring( nStart, nStart + sStart.length ) == sStart ) ? true : false;
};
String.prototype.toUpperCaseFirst = function() {
	return this.toString().charAt(0).toUpperCase() + this.toString().substring( 1, this.toString().length );
};
String.prototype.toUpperCaseWords = function() {
	var i, aString = this.toString().split(' ');
	for ( i = 0; i < aString.length; i++ ) {
		aString[i] = aString[i].toUpperCaseFirst();
	};
	return aString.join(' ');
};
function updateArrayPrototype() {
	Array.prototype.item = function( i ) {
		return this[i];
	};
	Array.prototype.nextItem = function( i ) {
		var n, k, j, bNext = false;
		// string indexelésû
		if ( isNaN( parseInt( i ) ) ) {
			for ( n in this ) { // a következõ elem
				if ( bNext ) {
					if ( typeof Array.prototype[n] == 'undefined' ) { // az Array prototípus kiegésztések kizárása
						return this[n];
					};
				};
				if ( i == n ) {
					bNext = true;
				};
			};
			for ( j in this ) { // a legelsõ elemet adjuk vissza
				if ( typeof Array.prototype[j] == 'undefined' ) { // az Array prototípus kiegésztések kizárása
					return this[j];
				};
			};
		};
		// szám indexelésû
		i = parseInt( i );
		if ( i < 0 ) {
			i = -1;
		};
		if ( i >= this.length - 1 ) {
			i = 0;
		}
		else {
			i++;
		};
		return this[i];
	};
	if ( !Array.prototype.push || [1, 1, 1].push( 1 ) != 4 ) {
		Array.prototype.push = function () {
			var i;
			for( i = 0; i < arguments.length; i++ ) {
				this[this.length] = arguments[i];
			};
			return this.length;
		};
	};
	if ( !Array.prototype.pop ) {
		Array.prototype.pop = function() {
			var xOld;
			xOld = this[this.length - 1];
			delete this[this.length - 1];
			this.length--;
			return xOld;
		};
	};
	if ( !Array.prototype.shift ) {
		Array.prototype.shift = function() {
			var xOld, i;
			xOld = this[0];
			for( i = 0; i < this.length - 1; i++ ) {
				this[i] = this[i + 1];
			};
			delete this[this.length - 1];
			this.length--;
			return xOld;
		};
	};
	if ( !Array.prototype.unshift || [1, 1, 1 ].unshift( 1 ) != 4 ) {
		Array.prototype.unshift = function () {
			var i;
			for ( i = this.length - 1; i >= 0; i-- ) {
				this[i + arguments.length] = this[i];
			};
			for ( i = 0; i < arguments.length; i++ ) {
				this[i] = arguments[i];
			};
			return this.length;
		};
	};
	if( !Array.prototype.splice ) {
		Array.prototype.splice = function ( nStart, nDeleteCount ) {
		    var aReturn = [], i;
		    for ( i = 0; i < nDeleteCount; i++ ) {
				aReturn[i] = this[i + nStart];
			};
			for ( i = nStart; i < this.length - nDeleteCount; i++ ) {
				this[i] = this[i + nDeleteCount];
			};
			this.length -= nDeleteCount;
			if ( arguments.length > 2 ) {
				for( i = this.length - 1; i >= nStart; i-- ) {
					this[i + nDeleteCount] = this[i];
				};
				for( i = 0; i < nDeleteCount; i++ ) {
					this[i + nStart] = arguments[i + 2];
				};
			};
			return aReturn;
		};
	};
};
updateArrayPrototype();
function cleanupArrayPrototype() {
	var i;
	for ( i in Array.prototype ) {
		delete Array.prototype[i];
	};
};

var is = {
	getUserAgents : function() { 
		// segédfunkciók
		this.geckoGetRv = function() {
			return /rv:(\d+\.*\d+)/g.exec(this.agent)[1];
		};
		this.getVersion = function() {
			var sId;
			switch ( this.app ) {
				case 'gecko' :
					return this.geckoRv;
					break;
				case 'ie' :
					sId = 'msie ';
					break;
				case 'opera' :
					sId = ( this.agent.indexOf( 'opera/' ) > -1 ) ? 'opera/' : 'opera ';
					 break;
				case 'khtml' :
					sId = ( this.saf ) ? 'applewebkit/' : 'konqueror/';
					break;
				case 'ns4' :
					sId = 'mozilla/';
					break;
			};
			return parseFloat( '0' + this.agent.substr( this.agent.indexOf( sId ) + sId.length ), 10 );
		};
		// adatok átvétele
		this.ver         = navigator.appVersion.toLowerCase();
		this.agent       = navigator.userAgent.toLowerCase();
		this.platform    = navigator.platform.toLowerCase();
		this.product     = new String( navigator.product ).toLowerCase();
		this.productSub  = new String( navigator.productSub ).toLowerCase();
		this.vendor      = new String( navigator.vendor ).toLowerCase();
		this.vendorSub   = new String( navigator.vendorSub ).toLowerCase();
		this.opera       = typeof ( window.opera ) != 'undefined';
		this.dom         = document.getElementById ? true : false;
		this.compatMode  = new String( document.compatMode ).toLowerCase(); // 'css1compat', 'backcompat', 'quirksmode'
		
		// platformok
		this.win         = this.platform.indexOf("win") > -1;
		this.linux       = ( this.platform.indexOf("linux") > -1 || this.platform.indexOf("x11") > -1 );
		this.mac         = this.platform.indexOf("mac") > -1;
	
		// böngészõk
		// khtml
		this.khtml       = ( this.agent.indexOf("khtml") > -1 || this.product.indexOf("khtml") > -1 )
		this.konq        = ( this.agent.indexOf("konqueror") > -1 || this.product.indexOf("konqueror") > -1 );
		this.konq31      = ( this.konq && this.ver.indexOf("konqueror/3.1") > - 1 );
		this.saf         = ( this.agent.indexOf("safari") > -1 || this.ver.indexOf("safari") > -1 );
		// opera
		this.opera       = ( this.opera || this.agent.indexOf("opera") > -1 ); // nem win platformon az opera obj nem jön létre
		this.opera5      = ( this.opera && this.agent.indexOf("opera 5") > -1 );
		this.opera6      = ( this.opera && ( this.agent.indexOf("opera 6") > -1 || this.agent.indexOf("opera/6") > -1 ) );
		this.opera7      = ( this.opera && ( this.agent.indexOf("opera 7") > -1 || this.agent.indexOf("opera/7") > -1 ) );
		// IE
		this.ie          = ( this.ver.indexOf('msie') != -1 && !this.opera ) ? true : false;
		this.ie4         = ( document.all && !this.dom && !this.opera ) ? true : false;
		this.ie5         = ( document.all && this.ver.indexOf("msie 5.0") > -1 && !this.opera ) ? true : false; 
		this.ie5mac      = ( this.ie5 && this.mac ) ? true : false; 
		this.ie55        = ( document.all && this.ver.indexOf("msie 5.5") > -1 && !this.opera ) ? true : false; 
		this.ie6         = ( document.all && this.ver.indexOf("msie 6" )  > -1 && !this.opera ) ? true : false;
		/*@cc_on @*/ /*@if (@_jscript) 
		this.ieJSBuild   = @_jscript_build;
		this.ieJSVersion = @_jscript_version; /*@end @*/
		// mozilla
		this.ns4         = ( document.layers && !this.dom ) ? true : false;
		this.gecko       = ( this.product == "gecko" && !this.khtml ) ? true : false;
		this.geckoRv     = ( this.gecko ) ? this.geckoGetRv() : 0;
		this.gecko1      = ( this.gecko && Number( this.productSub ) > 20020530 ) ? true : false;
		this.moz1        = ( this.gecko && this.vendor == '' && !( this.geckoRv < 1 ) ) ? true : false;
		this.ns6         = ( this.gecko && this.vendor == 'netscape6' && parseFloat( this.vendorSub ) >= 6 && parseFloat( this.vendorSub ) < 7 ) ? true : false;
		this.ns7         = ( this.gecko && this.vendor == 'netscape' && parseFloat( this.vendorSub ) >= 7 ) ? true : false;
		this.fb          = ( this.gecko && ( this.vendor == 'mozilla firebird' || this.vendor == 'phoenix' || this.vendor == 'firefox' ) );
		this.fx          = ( this.vendor == 'firefox' );
		this.cm          = ( this.gecko && ( this.vendor == 'chimera' || this.vendor == 'camino' ) );
		this.beo         = ( this.gecko && this.vendor == 'beonex' );
		this.kmel        = ( this.agent.indexOf('k-meleon') > -1 ) ? true : false ;
		// alkalmazás-verziószám
		this.app         = ( ( this.ie ) ?  'ie' : ( this.gecko ) ? 'gecko' : ( this.opera ) ?  'opera' : ( this.khtml ) ? 'khtml' : ( this.ns4 ) ? 'ns4' : 'undefined' );
		this.appVer      = this.getVersion();
	
		// csoportok
		this.bs4         = ( this.ie || this.ns4 || this.gecko || this.opera || this.khtml );
		this.bs5         = ( ( this.ie && this.appVer >= 5.5 ) || this.gecko || this.opera7 || this.saf );
		this.bss         = ( this.gecko || this.opera7 || this.saf )
		this.min         = ( this.bs5 || this.ie5 || this.opera || this.khtml );
		return this;
	}
};
is.getUserAgents();

/***************************************
 * Class v1.2
 **************************************/
/* removeClass v1, addClass v1, hasClass v1
 *******************************************************************************
 * Többszörös class-oksat kezelnek a függvények. A hasClass true vagy false 
 * értékkel tér vissza.Minden függvény két paramétert vár: el:DOMElement, 
 * className:CSS osztály
 */
function removeClass( el, className ) {
	if ( !( el && el.className ) )
		return;
	var i, aClass, aNewClass = [];
	aClass = el.className.split(' ');
	for ( i = aClass.length; i > 0; ) {
		if ( aClass[--i] != className )
			aNewClass[aNewClass.length] = aClass[i];
	}
	el.className = aNewClass.join(' ');
};
function addClass( el, className ) {
	if ( !el ) // előfordulhat, hogy még nincs osztályba sorolva
		return;
	removeClass( el, className ); // kivesszük az első helyről, ha ott van
	if ( el.className == '' )
		el.className = className;
	else
		el.className += ' ' + className;
};
function hasClass( el, className ) {
	if ( !( el && el.className ) )
		return;
	var i, aClass;
	aClass = el.className.split(' ');
	for ( i = aClass.length; i > 0; ) {
		if ( aClass[--i] == className )
			return true;
	}
	return false;
};


/***************************************
 * displayChanger v1.4 
 *******************************************************************************
 * Megfordítja egy elem display-ét, vagy a megadottra állítja (true/false). IE5Mac
 * el.currentStyle.display nem tudja visszaadni a tényleges display állapotot,
 * így IE5 alatt 'késik' a getComputedStylePropertyValue függvény miatt.
 */
function displayChanger( el, bValue ) {
	var aTags, aStandardDisplays, aMSIEDisplays, aCurrentDisplays, i, bFound = false;
	if ( el.nodeType != Node.ELEMENT_NODE ) return null;
	aTags             = ['iframe', 'body',  'p',     'div',   'span',  'table', 'tbody',           'tfoot',              'thead',              'tr',        'td',         'th',         'ul',    'ol',    'li'        ];
	aStandardDisplays = ['inline', 'block', 'block', 'block', 'inline','table', 'table-row-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-cell', 'table-cell', 'block', 'block', 'list-item' ];
	aMSIEDisplays     = ['inline', 'block', 'block', 'block', 'inline','block', 'block',           'block',              'block',              'block',     'block',      'block',      'block', 'block', 'inline'    ];
	if ( is.bss )     aCurrentDisplays = aStandardDisplays;
	else if ( is.ie ) aCurrentDisplays = aMSIEDisplays;
	else return false;
	for ( i = 0; i < aTags.length; i++ ) { // kikeressük a megfelelő párosításokat
		if ( el.tagName.toLowerCase() == aTags[i] ) {
			bFound = true;
			break;
		}
	}
	if ( !bFound )
		return false;
	if ( typeof( bValue ) != 'undefined' ) { // ha megvan adva, hogy mire kell cserélni
		if ( bValue == false )
			el.style.display = 'none'
		else
			el.style.display = aCurrentDisplays[i];
			
	}
	else { // ha meg kell fordítani
		if ( el.style.display == '' )
			el.style.display = getComputedStylePropertyValue( el, 'display', '' );
		if ( el.style.display == 'none' || el.style.display == '' ) // < opera7.2
			el.style.display = aCurrentDisplays[i]
		else el.style.display = 'none';
	}
}


/**
 * getComputedStylePropertyValue - visszadja az elem tényleges stílusának elemeit. FONTOS! Nem minden böngészõ támogatja.
 * Gond nélkül megy Geckókban és IE-ben. Opera csak a 7.20-tól támogatja, az alatti csak visszadja a normális style 
 * értékeket. Nem megy KHTML (Safari) alatt. 
 *
 * @package                       lib.getComputedStylePropertyValue
 * @author                        Gyuris Gellért
 * @see                           browserCheck
 * @param elNode DOMElement       Az elem, melynek stílus-értékére vagyunk kíváncsiak.
 * @param sStyleProperty String   Az stílus deklaráció neve: pl. 'border-left-color'
 * @param sPseudoProperty String  A pszeudo deklráció neve: pl. 'fist-letter' - Ez csak Geckókban mûködik!, elhagyható
 * @return String                 A deklarácó értéke.
 * @since                         1.31
 */
function getComputedStylePropertyValue( elNode, sStyleProperty, sPseudoProperty ) {
	var aResult, i, sResult;
	if ( is.khtml ) {
		// null document.getOverrideStyle( elNode, sPseudoProperty )
		// nem igazi: visszatérési érték null, ha nincs
		return elNode.style.getPropertyValue( sStyleProperty );
	}
	else if ( is.opera7 ) {
		// opera7.20!
		if ( window.getComputedStyle ) {
			return window.getComputedStyle( elNode, sPseudoProperty ).getPropertyValue( sStyleProperty );
		};
		// nem igazi: visszatérési érték null, ha nincs; azért van kikeresve, hogy létezik-e, mert egyébként egy 
		// 'Warning' hibaüzenetet ad vissza, amit nem lehet lekezelni:
		for ( i = 0; i < elNode.style.length; i++ ) {
			if ( elNode.style.item( i ) == sStyleProperty ) {
				return elNode.style.getPropertyValue( sStyleProperty );
			};
		};
		return null;
	}
	else if ( is.gecko ) {
		return document.defaultView.getComputedStyle( elNode, sPseudoProperty ).getPropertyValue( sStyleProperty );
	}
	else if ( is.ie ) {
		aResult = sStyleProperty.split('-')
		for ( i = 1; i < aResult.length; i++ ) {
			aResult[i] = aResult[i].toUpperCaseFirst();
		};
		sStyleProperty = aResult.join('');
		if ( is.mac ) { // a dokumentáció ellenére nincs getAttribute() függvény ie5Mac alatt
			return elNode.currentStyle[ sStyleProperty ]; // XXX display-t nem tudja visszadni!
		};
		return elNode.currentStyle.getAttribute( sStyleProperty );
	};
}


if ( is.ie ) {
	var IE_EVENTBINDING_MS_ID     = 0;
	var FORCE_IE_EVENTBINDING     = false; // ezt át lehet állítani!
	var IE_EVENTBINDING_ASSISTANT = 'function ieEventBindingAssistant( node ) {'
	                              + '     try { eval( node.uniqueID ); return true	}'
	                              + '     catch( ex ) { return false }'
	                              + '};'
	eval(IE_EVENTBINDING_ASSISTANT);
};
function eventBinding( node, bFlag, sType, fListener, bCapture ) {
	var sBind;
	if ( node == null || typeof node == 'undefined' ) {
		return false;
	};
	if ( is.ie && is.win && typeof node.nodeType != 'undefined' && !FORCE_IE_EVENTBINDING ) {
		if ( !ieEventBindingAssistant( node ) ) {
			if ( node.id == '' && node.name == '' ) {
				IE_EVENTBINDING_MS_ID++;
				node.id = 'IE_EVENTBINDING_MS_ID' + IE_EVENTBINDING_MS_ID + 'hack';
				node.name = node.id;
			};
			eval( node.uniqueID + ' = document.all["' + node.id + '"]' );
		};
		sBind = 'var IEeventBind_' + node.uniqueID + ' = new Object();\n' + ( ( fListener.getName() != '' ) ?
		        'IEeventBind_' + node.uniqueID + '.' + fListener.getName()  +  ' = ' + fListener.getName() + ';\n' :
		        'IEeventBind_' + node.uniqueID + '.noname = ' + fListener.toString() + ';\n' ) +
		        'IEeventBind_' + node.uniqueID + '.self = ' + node.uniqueID + ';\n' +
		        'IEeventBind_' + node.uniqueID + '.getSelf = function() { return this.self };\n' +
		        'IEeventBind_' + node.uniqueID + '.' + ( fListener.getName() || 'noname' ) + '();'
	};
	sType = sType.toLowerCase();
	if ( bFlag ) {
		if ( is.ie && is.win ) {
			if ( !FORCE_IE_EVENTBINDING && typeof node.nodeType != 'undefined' ) { // window
				node.attachEvent( 'on' + sType, new Function( sBind ) );
			}
			else {// minden más node
				node.attachEvent( 'on' + sType, fListener );
			};
		};
		if ( is.ie5mac ) {
			eventBindingCompletion( [node], bFlag, sType, fListener, bCapture );
		};
		if ( is.bss ) {
			node.addEventListener( sType, fListener, bCapture );
		};
	}
	else {
		if ( is.ie && is.win ) {
			if ( !FORCE_IE_EVENTBINDING && typeof node.nodeType != 'undefined' ) { // window
				node.detachEvent( 'on' + sType, new Function( sBind ) );
			}
			else { // minden más node
				node.detachEvent( 'on' + sType, fListener );
			};
		};
		if ( is.ie5mac ) {
			eventBindingCompletion( [node], bFlag, sType, fListener, bCapture );
		};
		if ( is.bss ) {
			node.removeEventListener( sType, fListener, bCapture );
		};
	};
	return true;
};
function getBindingSelf( el ) {
	if ( is.ie5mac ) {
		return window.event.srcElement;
	}
	else if ( is.ie ) {
		if ( FORCE_IE_EVENTBINDING ) {
			return window.event.srcElement;
		};
		return el.getSelf();
	}
	else {
		return el;
	};
};
function loadEventBinding( oWin, fListener ) {
	if ( is.ie || is.gecko ) {
		eventBinding( oWin, true, 'load', fListener, false );
	};
	if ( is.opera7 ) {
		eventBinding( oWin.document, true, 'load', fListener, false );
	};
	if ( is.konq || is.saf ) {
		eventBindingCompletion( [ oWin, oWin.document ], true, 'load', fListener, false );
	};
	return true;
};
function resizeEventBinding( bFlag, fListener ) {
	if ( is.opera7 ) {
		eventBinding( document, bFlag, 'resize', fListener, false );
	}
	else {
		eventBinding( window, bFlag, 'resize', fListener, false );
	};
	return true;
};
function globalEventBinding( node, bFlag, sType, fListener, bCapture, IEcaptureNode ) {
	var windows, i;
	if ( is.ie ) {
		eventBinding( document, bFlag, sType, fListener, bCapture );
		if ( bFlag ) {
			IEcaptureNode.setCapture();
		}
		else {
			IEcaptureNode.releaseCapture();
		};
	};
	if ( is.bss ) {
		eventBinding( document, bFlag, sType, fListener, bCapture );
		windows = node.getElementsByTagName('IFRAME');
		for ( i = 0; i < windows.length; i++ ) {
			eventBinding( windows[i].contentDocument, bFlag, sType, fListener, bCapture );
			globalEventBinding( windows[i].contentDocument , bFlag, sType, fListener, bCapture );
		};
	};
};
function eventBindingCompletion( aNode, bFlag, sType, fListener, bCapture ) {
	function findType( aAttachedEvents, sType) {
		var i;
		for ( i = 0; i < aAttachedEvents.length; i++ ) {
			if ( aAttachedEvents[i] == null ) {
				continue;
			};
			if ( aAttachedEvents[i].type == sType ) {
				return true;
			};
		};
		return false;
	};
	function findFunctionString( firstFunc ) {
		var str, num1, num2;
		num1 = firstFunc.toString().indexOf('{');
		num2 = firstFunc.toString().lastIndexOf(')');
		str = firstFunc.toString().substring( num1 + 1, num2 + 1 )
		return str.trim();
	}
	var i, k, fFirst;
	if ( bFlag ) {
		for ( i = 0 ; i < aNode.length; i++ ) {
			if ( typeof aNode[i].aAttachedEvents == 'undefined' ) {
				aNode[i].aAttachedEvents = [];
			};
			aNode[i].dispatchEvents = function() {
				var j, type = window.event.type;
				for ( j = 0; j < this.aAttachedEvents.length; j++ ) {
					if ( this.aAttachedEvents[j] == null ) {
						continue;
					};
					if ( type == this.aAttachedEvents[j].type ) {
						if ( typeof this.aAttachedEvents[j].listener == 'string' ) {
							eval( this.aAttachedEvents[j].listener );
						}
						else if ( typeof this.aAttachedEvents[j].listener == 'function' ) {
							eval( this.aAttachedEvents[j].listener.toString().substring( this.aAttachedEvents[j].listener.toString().indexOf( '{' ) + 1, this.aAttachedEvents[j].listener.toString().length - 1 ) );
						};
					};
				};
			};
			fFirst = eval( 'aNode['+i+'].on' + sType );
			if ( fFirst != null && !findType( aNode[i].aAttachedEvents, sType ) ) { // ha már inline volt egy függvény hozzárendelve, azt átemeljük
				aNode[i].aAttachedEvents[aNode[i].aAttachedEvents.length] = { type : sType, listener : findFunctionString( fFirst ) }; // typeof: string
			};
			eval( 'aNode['+i+'].on' + sType + ' = ' + 'aNode['+i+'].dispatchEvents' );
			aNode[i].aAttachedEvents[aNode[i].aAttachedEvents.length] = { type : sType, listener : fListener }; // typeof : function
		};
	}
	else { 
		for ( i = 0; i < aNode.length; i++ ) {
			for ( k = 0; k < aNode[i].aAttachedEvents.length; k++ ) { 
				if ( aNode[i].aAttachedEvents[k] == null ) {
					continue;
				};
				if ( aNode[i].aAttachedEvents[k].type == sType && aNode[i].aAttachedEvents[k].listener == fListener ) { // typeof aNode.aAttachedEvents[i].listener = string || function 
					aNode[i].aAttachedEvents[k] = null;
				};
			};
		};
	};
};


/***************************************
 * child v1
 **************************************/
/* getChildIndex v1.1
 *******************************************************************************
 * visszaadja a gyermek sorszámát a szülő objektumban, null-t ha nem gyermek
 */
function getChildIndex( elChild ) {
	var i;
	if ( elChild.parentNode == null )
		return null;
	for ( i = 0; i < elChild.parentNode.childNodes.length; i++ ) {
		if ( elChild.parentNode.childNodes.item(i) == elChild ) {
			return i;
			break;
		}
	}
	return null;
}
/* getContextNodes v1.0
 *******************************************************************************
 * visszaadja a kért csomópont-típusú leszármazottját
 * A getAllChildElement v2.0, getAllChildNode v2.0 ennek két önálló régebbi 
 * speciális megvalósítása, melyet kompatibilitás miatt megőriztem
 */
function getContextNodes( elRoot, aType ) {
	var aNodes = [];
	function searchNodes( el ) {
		var i, j;
		if ( !el.hasChildNodes() ) return;
		for ( i = 0; i < el.childNodes.length; i++ ) {
			for ( j = 0; j < aType.length; j++ ) {
				if ( el.childNodes.item(i).nodeType == aType[j] ) {
					aNodes[aNodes.length] = el.childNodes.item(i);
					break;
				}
			}
			if ( el.childNodes[i].nodeType == Node.ELEMENT_NODE ) {
				searchNodes( el.childNodes.item(i) );
			}
		}
	}
	searchNodes( elRoot );
	return aNodes;
}
function getAllChildElement( elRoot ) {
	elRoot.allEl = getContextNodes( elRoot, [ Node.ELEMENT_NODE ] );
}
function getAllChildNode( elRoot ) {
	elRoot.allNodes = getContextNodes( elRoot, [ Node.ELEMENT_NODE, Node.TEXT_NODE, Node.CDATA_SECTION_NODE, Node.COMMENT_NODE ] );
}
/* getFirstElement v1.1, getLastElement v1.2
 *******************************************************************************
 * getFirstElement: visszaadja egy csomópont első ELEMENT_NODE-ját, vagy null-t 
 * getLastElement: visszadja egy csomópont utolsó ELEMENT_NODE-ját, vagy null-t
 */
function getFirstElement( el ) {
	var i;
	if ( !el.hasChildNodes() ) return null; // ha nem ELEMENT_NODE a szülő
	for ( i = 0 ; i < el.childNodes.length; i++ ) {
		if ( el.childNodes.item(i).nodeType == Node.ELEMENT_NODE ) {
			return el.childNodes.item(i);
			break;
		}
	}
	return null;
}
function getLastElement( el ) {
	var i;
	if ( !el.hasChildNodes() ) return null; // ha nem ELEMENT_NODE a szülő
	for ( i = el.childNodes.length - 1 ; i >= 0; i-- ) {
		if ( el.childNodes.item(i).nodeType == Node.ELEMENT_NODE ) {
			return el.childNodes.item(i);
			break;
		}
	}
	return null;
}
/* getNextElement v1.0, getPreviousElement v1.0
 *******************************************************************************
 * getNextElement: visszadja egy csomópont következő ELEMENT_NODE testvérét, 
 * getPreviousElement: visszadja egy csomópont megelőző ELEMENT_NODE testvérét, 
 * null-t ad vissza ha nincs
 */
function getNextElement( elChild ) {
	function getNext( el ) {
		if ( el.nextSibling == null ) 
			return null
		if ( el.nextSibling.nodeType == Node.ELEMENT_NODE ) 
			return el.nextSibling
		return getNext( el.nextSibling );
	}
	return getNext( elChild )
}
function getPreviousElement( elChild ) {
	function getPrevious( el ) {
		if ( el.previousSibling == null ) 
			return null;
		if ( el.previousSibling.nodeType == Node.ELEMENT_NODE ) 
			return el.previousSibling;
		return getPrevious( el.previousSibling )
	}
	return getPrevious( elChild );
}
/* removeEmptyTextNode v1.2
 ***************************************
 * üres TEXT_NODE-ok eltávolítása
 */
function removeEmptyTextNode( elRoot ) {
	var re, aNodes;
	re = /^[\s\n\t]*$/;
	aNodes = getContextNodes( elRoot, [ Node.TEXT_NODE ] );
	for ( i = 0; i < aNodes.length; i++ ) {
		if ( aNodes[i].nodeType != Node.TEXT_NODE ) continue;
		if ( re.test( aNodes[i].nodeValue ) ) {
			aNodes[i].parentNode.removeChild( aNodes[i] );
		}
	}
}



/***************************************
 * makeUnselectable v1.2
 *******************************************************************************
 * Egy elemetnek tiltja a kijelölését és fókuszba kerülését. Opera7 megoldatlan.
 */
function makeUnselectable( el ) {
	if ( el.nodeType != Node.ELEMENT_NODE ) return false;
	if ( is.ie ) {
		el.setAttribute('unselectable', 'on' );
		el.setAttribute('hidefocus', true );
	}
	else if ( is.gecko ) {
		el.style.MozUserSelect = 'none';
		el.style.MozUserFocus = 'none';
	}
}

/***************************************
 * attribute v.1
 **************************************/
/* isSpecified v1.3
 *******************************************************************************
 * szabványos attr. esetén
 * -> attributes['valami'].specified
 * nem szabvanyos attributum esetén:
 * -> attributes.getNamedItem('valami') visszatérési értéke null // de csak 6-os Explorer
 * hasAttribute minden máshol
 * alkalmazás:
 * if ( !isSpecified ( document.getElementById( 'oList' ), 'myAttribute' ) )
 *      alert('Defniniálva van')
 */
function isSpecified( nodeEl, sAttribute ) {
	if ( is.ie ) {
		//if ( getAttributeIndex( nodeEl, sAttribute ) != null ) { // normál 'core' attribútum
		//	return nodeEl.attributes[sAttribute].specified;
		//}
		//else { // speciális attribútum
			if ( is.ie5 || is.ie55 )
				return ( nodeEl.getAttribute( sAttribute ) ) ? true : false
			else if ( is.ie6 )
				return ( nodeEl.attributes.getNamedItem( sAttribute ) ) ? true : false;
		//}
	}
	else if ( is.bss )
		return nodeEl.hasAttribute( sAttribute );
}
/* getAttributeIndex v1
 *******************************************************************************
 * visszaadja az attribútum sorszámát az ELEMENT_NODE.attributes tömbben
 * csak IE-ben van rá szükség
 */
function getAttributeIndex( nodeEl, sAttribute ) {
	var i;
	sAttribute = sAttribute.toLowerCase();
	for ( i = 0; i < nodeEl.attributes.length; i++ ) {
		if ( nodeEl.attributes.item(i).nodeName.toLowerCase() == sAttribute ) {
			return i;
		}
	}
	return null;
}


/*******************************************************************************
 * getRulePropertyValueBySelectorTextFromStyles v1.1
 *******************************************************************************
 * A documetumhoz csatolt, vagy importált stílusdefiníciós listákban keresi ki 
 * az érvényes selector egy tulajdonságát. Opera7 nem támogatott!
 * Argumentumok:
 * - sSelector formátuma a CSS szintaxis szerint, kis és nagybetű-érzékeny
 * - sProperty formátuma a style obejktumnak megfelelő: pl. paddingLeft
 * Visszatérési érték:
 * - nem definiált tulajdonság : '';
 * - nem definiált selector: 'undefined';
 * IE : StyleSheet.imports[i] [továbbiterálható] 
 * Gecko: StyleSheet.cssRules[i].styleSheet.cssRules[j] [továbbiterálható
 */
function getRulePropertyValueBySelectorTextFromStyles( sSelector, sProperty, bDebug ) {
	if ( !( is.ie || is.gecko || is.khtml ) ) return '';
	var i, j, k, nRule = null, nTempRule = null, sPropertyValue, strDebug = '!' + sSelector + ' : ' + sProperty + '!\n';
	function findRuleSC( nRules, sSelector ) { 	// iterálható
		var i;
		for ( i = 0; i < nRules.length; i++ ) {
			strDebug += nRules[i].selectorText + '\n';
			if ( nRules[i].styleSheet != null ) { // ha van gyereke
				nTempRule = findRuleSC( nRules[i].styleSheet.cssRules, sSelector)
				if ( nTempRule != null ) 
					nRule = nTempRule;
			}
			if ( sSelector == nRules[i].selectorText.toLowerCase() ) { // khtml kiegészítése, mert mindig csupa nagybetű
				return nRules[i];
			}
		}
	}
	function findRuleIE( nStyleSheet, sSelector ) {
		var i, j;
		if ( nStyleSheet.imports.length != 0 ) { // ha van gyereke
			for ( i = 0; i < nStyleSheet.imports.length; i++ ) {
				nTempRule = findRuleIE( nStyleSheet.imports[i], sSelector)
				if ( nTempRule != null ) 
					nRule = nTempRule;
			}
		}
		for ( i = 0; i < nStyleSheet.rules.length; i++ ) {
			strDebug += nStyleSheet.rules[i].selectorText + '\n';
			if ( sSelector == nStyleSheet.rules[i].selectorText ) 
				return nStyleSheet.rules[i];
		}
	}
	// dokumentumba ágyazott stylesheetek végigpásztázása
	for ( i = 0; i < document.styleSheets.length; i++ ) {
		if ( is.gecko || is.khtml )
			nTempRule = findRuleSC( document.styleSheets[i].cssRules, sSelector.toLowerCase() );
		else if ( is.ie )
			nTempRule = findRuleIE( document.styleSheets[i] , sSelector );
		if ( nTempRule != null ) 
			nRule = nTempRule;
	}
	if ( bDebug )
		alert( strDebug )
	// visszatérési értékek rendezése
	if ( nRule != null ) {
		sPropertyValue = nRule.style[sProperty];
		return sPropertyValue;
	}
	return 'undefined';
}

/**
 * @package  lib.getViewport
 * @author   Gyuris Gellért
 * @since    1.6
 * @see      browserCheck
 */

/**
 * getViewport - visszaaja a tartalomban rendelkezésre álló terület a görgetõsávok NÉLKÜL.
 * XXX - át kell alakítani MINDEN böngészõre egyenként és külön a css1compat és az backcompat||quirksmode
 * @return Object  Az adatokat tartalmazó értékek számmal.
 * @since          1.6
 */
function getViewport() {
	var nWidth, nHeight, nScollTop, nScollHeight;
	if ( is.compatMode == 'css1compat' ) {
		if ( is.ie6 || is.geckoRv >= 1.5 || is.opera7 ) {
			nWidth = document.documentElement.clientWidth;
			nHeight = document.documentElement.clientHeight;
			nScollTop = document.documentElement.scrollTop;
			nScollHeight = document.documentElement.scrollHeight;
		};
		if ( is.opera7 ) {
			nHeight = window.innerHeight //document.documentElement.clientHeight;
		};
		if ( is.gecko ) {
			nWidth = ( document.body.scrollWidth >= document.body.clientWidth ) ? document.body.clientWidth : window.innerWidth;
			nHeight = ( document.body.scrollHeight >= document.body.clientHeight ) ? document.body.clientHeight : window.innerHeight;
			nScollTop = window.scrollY;
			nScollHeight = document.documentElement.scrollHeight;
		};
	}
	else {
		if ( is.ie ) {
			nWidth = document.body.clientWidth;
			nHeight = document.body.clientHeight;
			nScollTop = document.body.scrollTop;
			nScollHeight = document.body.scrollHeight;
		}
		else if ( is.khtml ) {
			nWidth = window.innerWidth;
			nHeight = window.innerHeight;
		}
		else if ( is.bss ) {
			nWidth = ( document.body.scrollWidth >= document.body.clientWidth ) ? document.body.clientWidth : window.innerWidth;
			nHeight = ( document.body.scrollHeight >= document.body.clientHeight ) ? document.body.clientHeight : window.innerHeight;
			nScollTop = window.scrollY;
			nScollHeight = document.documentElement.scrollHeight;
		};
		if ( is.opera7 || is.khtml ) {
			nScollTop = document.documentElement.scrollTop;
			nScollHeight = document.documentElement.scrollHeight;
		};
	};
	// kompatibilitás miatt
	window.strictInnerWidth   = nWidth;
	window.strictInnerHeight  = nHeight;
	window.strictScrollTop    = nScollTop;
	window.strictScrollHeight = nScollHeight;
	return { width        : nWidth,
	         height       : nHeight,
	         scrollTop    : nScollTop,
	         scrollHeight : nScollHeight };
};
/**
 * getWindowDimension - kompatibilitás miatt megõrizve: a getViewport másolata
 * @since  1.0
 */
function getWindowDimension() {
	return getViewport();
};

/**
 * createFullOffset - visszadja az elem abszolút elhelyezekedését a body-hoz 
 * viszonyítva: kompatibilitás miatt regisztrálja is a elembe
 *
 * @package              lib.createFullOffset
 * @author               Gyuris Gellért
 * @see                  browserCheck, getComputedStylePropertyValue, prototypeA
 * @param el DOMElement  Az elem, melynek pozícióira kiváncsiak vagyunk.
 * @return Object        offsetX, offsetY: x és y pozíciók számokkal
 * @since                1.42
 */
function createFullOffset( el ) {
	var aFullOffset = [];
	function getFullOffset( el ) {
		var aOffset = [], aTempOffset = [];
		aOffset[0] = el.offsetLeft;
		aOffset[1] = el.offsetTop;
		if ( is.ie5 && el.tagName.toLowerCase() == 'body' ) {
			aOffset[0] += getComputedStylePropertyValue( el, 'margin-left', '' ).toInt();
			aOffset[0] += getComputedStylePropertyValue( el, 'padding-left', '' ).toInt();
			aOffset[1] += getComputedStylePropertyValue( el, 'margin-top', '' ).toInt();
			aOffset[1] += getComputedStylePropertyValue( el, 'padding-top', '' ).toInt();
		};
		if ( el.offsetParent != null ) {
			aTempOffset = getFullOffset( el.offsetParent );
			aOffset[0] += aTempOffset[0];
			aOffset[1] += aTempOffset[1];
		};
		return aOffset;
	};
	if ( el.nodeType != Node.ELEMENT_NODE ) {
		return { offsetX : null, offsetY : null };
	};
	aFullOffset = getFullOffset( el );
	el.offsetX = aFullOffset[0];
	el.offsetY = aFullOffset[1];
	if ( is.ie5 ) { // ie5win + ie5mac
		el.offsetX = el.offsetX - getComputedStylePropertyValue( el, 'padding-left', '' ).toInt();
		el.offsetY = el.offsetY - getComputedStylePropertyValue( el, 'padding-top',  '' ).toInt();
	};
	return { offsetX : el.offsetX, offsetY : el.offsetY };
}

/*
 * Workload v1.0
 ***************************************/
var Workload = {
	timeInit : new Date(),
	timeA : null,
	timeB : null,
	start : function() {
		this.timeA = new Date();	
	},
	end : function() {
		function addItem( strHTML, oStyle, oParent ) {
			var k, elItem;
			elItem = document.createElement('DIV');
			for ( k in oStyle )
				elItem.style[k] = oStyle[k];
			elItem.innerHTML = strHTML;
			if ( oParent )
				oParent.appendChild( elItem )
			else
				return elItem;
		}
		function getPrecisionDate( oDate ) {
			var s = '';
			s += oDate.getUTCHours()   + ':';
   			s += oDate.getUTCMinutes() + ':';
   			s += oDate.getUTCSeconds() + ' ';
   			s += oDate.getUTCMilliseconds();
			return s;
		}
		var timeDifference, elListWindow;
		this.timeB = new Date();
		timeDifference = this.timeB - this.timeA;
		if ( !document.body || !document.body.appendChild )
			return alert( timeDifference );
		elListWindow = addItem( '', style = { 
			position : 'absolute', 
			top : '10px', 
			right : '10px', 
			zIndex : '1001',
			backgroundColor : 'silver',
			fontFamily : 'Verdana, sans-serif',
			fontSize : '11px',
			padding : '5px',
			border : '1px solid black' } );
		addItem( getPrecisionDate( this.timeInit ), style = { color: 'black' }, elListWindow );
		addItem( getPrecisionDate( this.timeA ), style = { color: 'blue' }, elListWindow );
		addItem( getPrecisionDate( this.timeB ), style = { color: 'blue' }, elListWindow );	
		addItem( '&rarr; ' + timeDifference,  style = { color: 'red' }, elListWindow  );
		document.body.appendChild( elListWindow );
	}
};