/**
 * @package  lib.browserCheck
 * @author   Gyuris Gellért
 * @since    4.44
 */
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;
		this.ie7         = ( document.all && this.ver.indexOf("msie 7" )  > -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();

/**
 * @package  lib.eventBinding
 * @author   Gyuris Gellért
 * @since    3.61
 * @see      browserCheck, prototype A
 */

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);
};
/**
 * eventBinding - egy esemény csatolása. Alapfüggvény. A this kulcsszú emulálása IE-ben megoldott, ennek kikapcsolása: 
 * FORCE_IE_EVENTBINDING = true; A getBindingSelf-el leget az eseménycsatolás hordozóját megkapni.
 * @param node DOMElement     Az elem, amihez csatolunk.
 * @param bFlag Boolean       Csatolunk vagy elveszünk.
 * @param sType String        Az esmeméyn típusa: pl.: 'click', 'mouseover' ('on' nélkül).
 * @param fListener Function  A függvény, melyet csatolunk.
 * @param bCapture Boolean    Használjunk-e elfogást :: false
 * @return Boolean            Sikeres volt-e a csatolás, vagy sem.
 * @since                     3.61
 */
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;
};
/**
 * getBindingSelf - egy esemény csatolása után a csatolást hordozó elem lekérdezése.
 * @param el Object    Meghívás: getBindingSelf(this). A this IE-ben egy objeltum, más böngészőkben, pedig maga a elem.
 * @return DOMElement  A csatolást hordozó elem.
 * @since              1.1
 */
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;
	};
};
/**
 * loadEventBinding -  a betöltési (load) eseménykötés érdekességei miatt van rá szükség:
 * - opera7 : a document bocsátja el az eseményt, nem a window
 * - konqueror és safari: a window engedi el, de a document kapja meg...
 * - ie5Mac: inline funkció nem megy át, csak egy különálló.
 * @param oWin Window         Az ablak, amelynek dokumentuma betöltődésére kötünk eseményt.
 * @param fListener Function  A függvény, melyet csatolunk.
 * @return Boolean            Sikeres volt-e a csatolás, vagy sem.
 * @since                     1.0
 */
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;
};
/**
 * resizeEventBinding -  az ablak átméretezésehez való csatolás
 * - opera7 : a document bocsátja el az eseményt, nem a window
 * @param bFlag Boolean       Csatolunk vagy elveszünk.
 * @param fListener Function  A függvény, melyet csatolunk.
 * @return Boolean            Sikeres volt-e a csatolás, vagy sem.
 * @since                     1.0
 */
function resizeEventBinding( bFlag, fListener ) {
	if ( is.opera7 ) {
		eventBinding( document, bFlag, 'resize', fListener, false );
	}
	else {
		eventBinding( window, bFlag, 'resize', fListener, false );
	};
	return true;
};
/**
 * globalEventBinding - teljes csatolás a beágyazott IFRAME-k eseményeinek átvételére.
 * @param node DOMElement           Az elem, amihez csatolunk.
 * @param bFlag Boolean             Csatolunk vagy elveszünk.
 * @param sType String              Az esmeméyn típusa: pl.: 'click', 'mouseover' ('on' nélkül).
 * @param fListener Function        A függvény, melyet csatolunk.
 * @param bCapture Boolean          Használjunk-e elfogást :: false
 * @param IEcaptureNode DOMElement  Csak IE: az elem, amely ellopja az összes eseményt.
 * @return Boolean                  Sikeres volt-e a csatolás, vagy sem.
 * @since                           1.0
 */
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 );
		};
	};
};
/**
 * eventBindingCompletion - kívülről nem hívható. ie5Mac nem támogatja a többszörösen csatolt eseményeket, ez a 
 * kigészítés végzi el. Konq. és Saf. is hasznája a loadBinding-ben.
 */
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;
				};
			};
		};
	};
};


/**
 * @package  lib.flash
 * @author   Gyuris Gellért
 * @since    3.14
 * @see      browserCheck, eventBinding
 */

/**
 * flash detektálás - telepítettség és szkriptelhetőség
 * A telepített flash bővítményt kérdezi le, a gecko scriptable egy kis időzítés
 * után kérdezjezhető le. Hibaüzenetet adni(=felülbírálni) a flash.getFlashCheck
 * újbóli meghívásával kell: első függ. a verzió a második a scriptable
 * elvárásnak való megfelelés hiányában hajtódik végre.
 *
 * @since  3.11
 */
var flash = {
	getFlashCheck : function ( nVer, fError, fScriptableError ) { // fScriptableError :: gecko nincs szkriptelhető plugin telepítve
		var sDesc, strCommand;
		this.shockMode = false;  // telepítve van-e
		this.flashVer = 0;       // nagyverzió
		this.rv = 0;             // alverzió
		this.ver = 0;            // együtt
		this.scriptable = false; // van-e js kapcsolat
		this.minVerRound = parseInt( nVer );
		this.elEmbed;            // gecko Scriptable-hez kell
		this.timeout;
		this.bAppend = false;
		this.fScriptableError = ( typeof fScriptableError == 'function' ) ? fScriptableError : false;
		if ( is.ns4 || is.gecko || is.opera || is.ie5mac || is.khtml ) {
			if ( navigator.mimeTypes && 
				 navigator.mimeTypes["application/x-shockwave-flash"] && 
				 navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin && 
				 navigator.plugins && 
				 navigator.plugins["Shockwave Flash"] ) {
				sDesc = navigator.plugins["Shockwave Flash"].description + '';
				this.shockMode = true;
//				this.flashVer = parseInt( sDesc.charAt( sDesc.indexOf(".") -1 ) );
				this.flashVer = parseInt( /\s\d*\.\d*\s/.exec(sDesc).toString().substring( 0, /\s\d*\.\d*\s/.exec(sDesc).toString().indexOf('.') ) );
				this.rv = sDesc.substr( sDesc.lastIndexOf("r") + 1, sDesc.length );
			};
		}
		else if ( is.ie ) { //  && is.win
			strCommand =    'function checkIE( obj ) { ' +
							'	aFlashPlugins = [];' +
							'	for ( i = 2; i < 11; i++ ) {' +
							'		try {' +
							'			aFlashPlugins[i] = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i );' +
							'		}' +
							'		catch ( ex ) {};' +
							'	}' +
							'	for ( i = 0; i < aFlashPlugins.length; i++ ) {' +
							'		if ( typeof aFlashPlugins[i] == "object" ) {' +
							'		obj.shockMode = true;' +
							'		obj.flashVer = i;' +
							'		}' +
							'	}' +
							'}'
			eval( strCommand );
			checkIE( this );
		};
		this.ver = parseFloat( this.flashVer + '.' + this.rv );
		// nincs plugin
		if ( !this.shockMode ) {
			fError();
		};
		// IE és kisebb az activeX fő verziószáma
		if ( ( is.ie && is.win ) && this.flashVer < this.minVerRound ) {
			fError();
		};
		// a plugin alapú böngészőkben a plugin kiadását is ellenőrizzük (rv)
		if ( ( is.ns4 || is.gecko || is.opera || is.ie5mac || is.khtml ) && this.ver < nVer ) {
			fError();
		};
		// scriptable: alapbeállítások szerint ezekben van scriptelhető flash plugin
		// win  : ie5, ie55, ie6;      moz1, ns7 && plugin v6.47;  ! fb, ns4, o6, o7
		// linux: moz1, ns7
		// mac  : ns7 && plugin v6.47;                             ! moz, cm, ie5, saf
		if ( is.ie && !is.mac ) {
			this.scriptable = true;
		};
		if ( is.gecko ) {
			// ha a geckó és scriptable = null, akkor még nem futott le az időzítés
			this.scriptable = null;
			this.elEmbed = document.createElement('embed');
			this.elEmbed.type = 'application/x-shockwave-flash';
			this.elEmbed.width = 0;
			this.elEmbed.height = 0;
			// általában load a gyorsabb!(?)
			loadEventBinding( window, flash.appendGeckoScriptable );
			this.timeout = setInterval( 'flash.appendGeckoScriptable()', 1 );
		};
		// if ( is.gecko && !is.fb && !( is.mac && !is.ns7 ) && !is.linux ) { // régi
		//      if ( this.ver >= 6.49 ) this.scriptable = true;
		// };
	},
	appendGeckoScriptable : function() {
		if ( document.body && !this.bAppend ) {
			// eventBinding this = window!
			clearInterval( flash.timeout );
			document.body.appendChild( flash.elEmbed );
			flash.timeout = setTimeout( 'flash.finalizeGeckoScriptable()', 1 );
			flash.bAppend = true;
		};
	},
	finalizeGeckoScriptable : function() {
		if ( this.elEmbed.parentNode == null ) {
			return;
		}
		this.scriptable = ( typeof this.elEmbed.SetVariable == 'function' ) ? true: false; 
		this.elEmbed.parentNode.removeChild( this.elEmbed );
		if ( this.fScriptableError && !this.scriptable ) {
			this.fScriptableError();
		};
	}
};
flash.getFlashCheck( 6.49, function() {}, function() {} ); // ez itt nem változtatható meg!
/**
 * sendToFlash - visszatérési értéket NEM kívánó flash föggvények hívása. Maga végzi el a letöltődési vizsgálatot.
 * @param sId String            A object id-je.
 * @param sFunctionName String  A meghívandó funkció neve nagy- és kisbetűérkékenyen.
 * @param aArguments Array      A függvénynek átadandó argumentumok, ezek száma minden függvény esetén egyediek.
 * @since  1.01
 */
function sendToFlash( sId, sFunctionName, aArguments ) {
	var elFlash;
	// csak geckók: ha még nem végződött be a FlashCheck lekérdezése
	if ( flash.scriptable == null ) {
		return setTimeout( function() {
			sendToFlash( sId, sFunctionName, aArguments )
		}, 1   );
	};
	// ha nem scriptelhető visszatérünk
	if ( !flash.scriptable ) {
		return false;
	};
	elFlash = ( is.ie ) ? document.all[sId] : document.embeds[sId];
	if ( !elFlash ) {
		return setTimeout( function() {
			sendToFlash( sId, sFunctionName, aArguments )
		}, 1000 );
	};
	if ( typeof elFlash.PercentLoaded == 'undefined' ) {
		return setTimeout( function() {
			sendToFlash( sId, sFunctionName, aArguments )
		}, 200 );
	};
	if ( elFlash.PercentLoaded() != 100 ) {
		return setTimeout( function() {
			sendToFlash( sId, sFunctionName, aArguments )
		}, 200 );
	};
	switch( sFunctionName ) {
		case 'GotoFrame' :
			elFlash.GotoFrame( aArguments[0] ); // GotoFrame( frameNumber ) :: GotoFrame(24);
			break;
		case 'LoadMovie' :
			elFlash.LoadMovie( aArguments[0], aArguments[1] ); // LoadMovie( layerNumber, url ) :: LoadMovie(0, "mymovie.swf");
			break;
		case 'Pan' :
			elFlash.Pan( aArguments[0], aArguments[1], aArguments[2] ); // Pan ( x, y, mode )  :: Pan(50, 50, 1) 
			break;
		case 'Play' :
			elFlash.Play() ; // Play()
			break;
		case 'Rewind' :
			elFlash.Rewind() ; // Rewind()
			break;
		case 'SetVariable' :
			elFlash.SetVariable( aArguments[0], aArguments[1] ); // SetVariable( variableName, value ) :: SetVariable("/Form:UserName", "John Smith");
			break;
		case 'SetZoomRect' :
			elFlash.SetZoomRect( aArguments[0], aArguments[1], aArguments[2], aArguments[3] ); // SetZoomRect ( left, top, right, bottom ) :: SetZoomRect(0, 0, 200, 200);
			break;
		case 'StopPlay' :
			elFlash.StopPlay() ; // StopPlay()
			break;
		case 'Zoom' :
			elFlash.Zoom( aArguments[0] ); // Zoom( percent ) :: Zoom(50)
			break;
		case 'TCallFrame' :
			elFlash.TCallFrame( aArguments[0], aArguments[1] ); // TCallFrame( target, frameNumber ) :: TCallFrame("/", 4);
			break;
		case 'TCallLabel' :
			elFlash.TCallLabel( aArguments[0], aArguments[1] ); // 	TCallLabel( target, label ) :: TCallLabel("/", "HandleScriptNotify");
			break;
		case 'TGotoFrame' :
			elFlash.TGotoFrame( aArguments[0], aArguments[1] ); // TGotoFrame( target, frameNumber ) :: TGotoFrame("/MovieClip", 2);
			break;
		case 'TGotoLabel' :
			elFlash.TGotoLabel( aArguments[0], aArguments[1] ); // TGotoLabel( target, label ) :: TGotoLabel("/MovieClip", "MyLabel");
			break;
		case 'TPlay' :
			elFlash.TPlay( aArguments[0] ); // TPlay( target ) :: TPlay("/MovieClip");
			break;
		case 'TSetProperty' :
			elFlash.TSetProperty( aArguments[0], aArguments[1], aArguments[2] ); // TSetProperty( target, property, value) :: TSetProperty("/MovieClip", nameIndex, "NewName");
			break;
		case 'TStopPlay' :
			elFlash.TStopPlay( aArguments[0] ); // TStopPlay( target )
			break;
	};
};
/**
 * getFromFlash - visszatérési értéket kívánó flash föggvények hívása.
 * @param sId String            A object id-je.
 * @param sFunctionName String  A meghívandó funkció neve nagy- és kisbetűérkékenyen.
 * @param aArguments Array      A függvénynek átadandó argumentumok, ezek száma minden függvény esetén egyediek.
 * @return String               Az egyes függvények más-más visszatérési értéket adnak.
 * @since  1.0
 */
function getFromFlash( sId, sFunctionName, aArguments ) {
	if ( !flash || flash.scriptable != true ) {
		return null;
	};
	elFlash = ( is.ie ) ? document.all[sId] : document.embeds[sId];
	if ( !elFlash ) {
		return null;
	};
	switch( sFunctionName ) {
		// TCurrentFrame( target ), TCurrentLabel(target), TGetProperty( target, property), TGetPropertyAsNumber (target, property)
		case 'GetVariable' :
			return elFlash.GetVariable( aArguments[0] ); // GetVariable( varName ) :: GetVariable("/Form/RadioButton:Value");
			break;
		case 'IsPlaying' :
			return elFlash.IsPlaying(); // IsPlaying();
			break;
		case 'PercentLoaded' :
			return elFlash.PercentLoaded(); // PercentLoaded();
			break;
		case 'TotalFrames' :
			return elFlash.TotalFrames(); // TotalFrames();
			break;
		case 'TCurrentFrame' :
			return elFlash.TCurrentFrame( aArguments[0] ); // TCurrentFrame( target ) :: TCurrentFrame("/MovieClip");
			break;
		case 'TCurrentLabel' :
			return elFlash.TCurrentLabel( aArguments[0] ); // TCurrentLabel( target ) :: TCurrentLabel("/MovieClip")
			break;
		case 'TGetProperty' :
			return elFlash.TGetProperty( aArguments[0], aArguments[1] ); // TGetProperty( target, property) :: TGetProperty("/", nameIndex);
			break;
		case 'TGetPropertyAsNumber' :
			return elFlash.TGetPropertyAsNumber( aArguments[0], aArguments[1] ); // 	TGetPropertyAsNumber (target, property) :: TGetProperty("/", framesLoadedIndex);
			break;
	};
};
/**
 * createFlashVBSriptHandler - csak IE: flash -> js kapcsolat kiépítése: fsCommand
 * @param aObjectId Array  Azon OBJECT elemek id-i, amelyekkel kapcsolatot akarunk létrehozni.
 * @since  1.2
 */
function createFlashVBSriptHandler( aObjectId ) {
	if ( !is.ie || is.ie5mac ) return false;
	var elVbs, elHead, i;
	elHead = document.getElementsByTagName('HEAD')[0];
	if ( !elHead ) {
		return alert( 'A Flash VBSript eseménykezelőjét nem sikerült létrehozni' );
	};
	for ( i = 0; i < aObjectId.length; i++ ) {
		elVbs = document.createElement('SCRIPT');
		elVbs.language = 'VBScript';
		elVbs.text = '\n'
				 + 'on error resume next \n'
				 + 'Sub ' + aObjectId[i] + '_FSCommand(ByVal command, ByVal args)\n'
				 + '  call ' + aObjectId[i] + '_DoFSCommand(command, args)\n'
				 + 'end sub\n';
		elHead.appendChild( elVbs );
	};
};
/**
 * createFlashEmbed - csak Gecko: egy OBJECT scriptelhető EMBED-ra való cseréje
 * @param aObjectId Array  Azon OBJECT elemek id-i, amelyeket szkriptelhetővé akarjuk tenni.
 * @since  1.01
 */
function createFlashEmbed( aObjectId ) {
	var i, elObject, elEmbed, sSrc, j, elChild;
	if ( !( is.gecko && navigator.mimeTypes && navigator.mimeTypes['application/x-shockwave-flash'] ) ) {
		return false;
	};
	for ( i = 0; i < aObjectId.length; i++ ) {
		elObject = document.getElementById( aObjectId[i] )
		if ( !elObject ) {
			continue;
		};
		elEmbed = document.createElement('embed');
		elEmbed.name = elObject.id;
		elEmbed.className = elObject.className;
		elEmbed.setAttribute( 'pluginspage', 'http://www.macromedia.com/go/getflashplayer' );
		elEmbed.type = 'application/x-shockwave-flash';
		elEmbed.width = elObject.width;
		elEmbed.height = elObject.height;
		elEmbed.swLiveConnect = true;
		for ( j = 0; j < elObject.childNodes.length; j++ ) {
			elChild = elObject.childNodes[j];
			if ( elChild.nodeType != Node.ELEMENT_NODE ) {
				continue;
			};
			if ( elChild.tagName.toLowerCase() == 'param' ) {
				switch ( elChild.name.toLowerCase() ) {
					case 'movie' :
						elEmbed.src = elChild.value;
						break;
					case 'quality' :
					case 'scale' :
					case 'wmode' :
					case 'menu' :
					case 'flashvars' :
						elEmbed.setAttribute( elChild.name.toLowerCase(), elChild.value );
						break;
				};
			};
		};
		elObject.parentNode.replaceChild( elEmbed, elObject );
		elEmbed.id = elEmbed.name;
	};
};
/**
 * setFlashObject - csak IE: egy OBJECT kiegészítése - Nem működik!
 * @since  0.01
 */
function setFlashObject( aObjectId ) {
	var i;
	if ( !is.ie ) {
		return false;
	};
	for ( i = 0; i < aObjectId.length; i++ ) {
		elObject = document.getElementById( aObjectId[i] )
		if ( !elObject ) {
			continue;
		};
		elObject.classid = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';
		elObject.codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0';
	};
};

/**
 * prototype A
 * @package  lib.prototypeA
 * @author   Gyuris Gellért
 * @since    3.62
 */

/**
 * Node - csak IE, a hiányzó objektum pótlása
 * @since                    1.0
 */
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 - visszaadja egy funkció nevét, IE-ben nincs segéd.
 * @return String  A funkció neve.
 * @since          1.01
 */
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 - letörli a string végérõl a fölösleges üres karatereket.
 * @return String  A String új értéke.
 * @since          1.0
 */
String.prototype.trim = function() {
	return this.replace(/(^\s*)|(\s*$)/g, '');
};
/**
 * String.prototype.escapeHTML - egy Stringet bekódol forráskód-megjelenítésre
 * @return String  A String új, forráskód-megjeleníthetõ értéke.
 * @since          1.0
 */
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 - egy Stringet bekódol megjelenítésre
 * @return String  A String új, HTML-ként értzelmezhetõ értéke.
 * @since          1.0
 */
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 - parseInt úgy, hogy mindenképpen számot adjon vissza
 * @return Number  A leparsolt szám. Pl.: 'a112' -> 0, '23a1' -> 23,  '1.2a34bc' -> 1
 * @since          1.1
 */
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 - számok kinyerése egy szringbõl a tizedeshelyek elvetésével.
 * @return Number  A leparsolt szám. Pl.: '1.2a34bc' -> 1234
 * @since          1.1
 */
String.prototype.toFloat = function() {
	return parseFloat( ('0' + this.toString() ).replace(/[^0-9]/g,''), 10)
};
/**
 * String.prototype.endsWith - egy String a megadott sztringre végzõdik-e? (Java)
 * @param sEnd String  A keresett sztring.
 * @return Boolean     true vagy false
 * @since              1.0
 */
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 - egy String a megadott sztringgel kezdõdik-e? (Java)
 * @param sStart String  A keresett sztring.
 * @param nStart Number  Opcionális. Megadható egy kezdõpont, ahonnan a vizsgálat kezdõdik. Elhagyása a 0-t jelenti.
 * @return Boolean       true vagy false
 * @since                1.0
 */
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 - Egy string elsõ betûjét nagybetûssé teszi (Java)
 * @return String  A nagybetûssé tett sztring.
 * @since 1.0
 */
String.prototype.toUpperCaseFirst = function() {
	return this.toString().charAt(0).toUpperCase() + this.toString().substring( 1, this.toString().length );
};
/**
 * String.prototype.toUpperCaseWords - Egy string minden szavának elsõ betûjét nagybetûssé teszi (Java)
 * @return String  A nagybetûssé tett sztring.
 * @since 1.0
 * XXX - más karakterek
 */
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(' ');
};
/**
 * updateArrayPrototype - hozzáadja az Array-hoz Array.prototype.item, Array.prototype.nextItem elemeket, ezen kívül 
 * IE5-ben a hiányzó elemeket is hozzáadja ( Array.prototype.push, Array.prototype.pop, Array.prototype.shift,
 * Array.prototype.unshift, Array.prototype.splice - dokumentációk a hivatalos leírásokban)
 * @since 1.1
 */
function updateArrayPrototype() {
	/**
	 * Array.prototype.item - egy megadott elem
	 */
	Array.prototype.item = function( i ) {
		return this[i];
	};
	/**
	 * Array.prototype.nextItem - visszadja a követketõ elemet, akár szám, akár sztring indexelésû. Az utolsó elem után 
	 * az elsõt adja vissza. Ha a határokon kívüli elemmel hívjuk, meg az elsõt adja vissza. 
	 */
	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();
/**
 * cleanupArrayPrototype: - a for..in Array esetén szükséges kitakarítást végzi el.
 */
function cleanupArrayPrototype() {
	var i;
	for ( i in Array.prototype ) {
		delete Array.prototype[i];
	};
};

/**
 * @package  lib.attribute
 * @author   Gyuris Gellért
 * @since    1.2
 * @see      browserCheck
 */

/**
 * isSpecified - Egy elem attribútuma deklarálva van-e?
 * 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
 *
 * @param nodeEl DOMElement  Az elem DOM objektumként.
 * @param sAttribute String  Az attribútum neve stringként.
 * @return Boolean           Dekralárva van, vagy sem?
 * @since                    1.4
 */
function isSpecified( nodeEl, sAttribute ) {
	if ( is.ie || is.opera7 ) {
		/*getItemIndex( nodeEl, sAttribute ) != null ) { // normál 'core' attribútum
			return nodeEl.attributes[sAttribute].specified
		}*/
		if ( typeof nodeEl.attributes[sAttribute] != 'undefined' ) {
			return nodeEl.attributes[sAttribute].specified;
		};
		if ( is.ie5 || is.ie55 ) {
			return ( nodeEl.getAttribute( sAttribute ) ) ? true : false;
		}
		else if ( is.ie6 || is.opera7 ) {
			return ( nodeEl.attributes.getNamedItem( sAttribute ) ) ? true : false;
		};
	}
	else if ( is.bss ) { // opera7.5
		return nodeEl.hasAttribute( sAttribute );
	};
};
/**
 * getAttributeIndex - IE: visszaadja az attribútum sorszámát az attributes tömben
 * @param nodeEl DOMElement  Az elem DOM objektumként.
 * @param sAttribute String  Az attribútum neve stringként.
 * @return Number            Hanyadik attribútum.
 * @since                    1.0
 */
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;
};
/**
 * createId - vagy visszaadja az elem már meglévõ Id-jét, vagy készít egy véletlen Id-t
 * @param el DOMELement  Az elem, amelynek id-t akarunk készíteni.
 * @return String        A string, mely idnek felel meg. IE esetén a beépített uniqueID használtatik.
 * @since                0.1
 */
function createId( el ) {
	if ( isSpecified( el, 'id' ) ) {
		return el.id;
	};
	if ( is.ie ) {
		return el.uniqueID;
	}
	else {
		function getRandom() {
			var strNum = Math.random().toString().toFloat();
			if ( strNum == 0 || strNum == 1 ) { 
				return getRandom();
			};
			return strNum;
		};
		return 'rID-' + getRandom();
	};
};

/**
 * 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 };
};

/**
 * $Id: getViewport.js,v 1.2 2004/08/19 11:59:21 gyuris Exp $
 * @package  lib.getViewport
 * @author   Gyuris Gellért
 * @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.
 */
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
 */
function getWindowDimension() {
	return getViewport();
};

