/********************************************************
 * prototype_v3.3 : Objektum kiegészítések
 *******************************************************/
// Node
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
Function.prototype.getName = function () {
	if ( typeof Function.prototype.name == 'string' )
		return this.name;
	else {
		var sName, nPos;
		sName= this.toString().split(' ')[1];
		nPos = sName.indexOf( '(' );
		this.name = sName.substr( 0, nPos )
		return this.name;
	}
}

// String
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.toInteger = function( nBase ) {
	// 'a112' return 0; '23a1' return 23; // '1.2a34bc' return 1;
	if ( typeof( nBase ) == 'undefined' )
		nBase = 10;
	var nVal = parseInt( this.toString() , nBase );
	if ( isNaN( nVal ) )
		nVal = 0;
	return nVal;
};
String.prototype.toFloat = function() {
	// '1.2a34bc' return 1234
	return parseFloat( ('0' + this.toString() ).replace(/[^0-9]/g,''), 10)
};
// Kerek egész számokra osztja a kérdéses számot; több részle lehet osztani
// önmagánál, ilyenkor 1-kel, majd 0-kal tölti fel a tömböt, hogy a várt 
// elemszám stimmeljen; 0-t és stringet nem fogad el, nem egész számot csonkít, 
// negatív számnak abszoludt értékét veszi;
// tömböt ad vissza,
Number.prototype.toRoundPortion = function( nPortion ) {
	// adatátvátel vizsgálata
	num = Math.floor( Math.abs( this.valueOf() ) );
	if ( isNaN( parseInt( nPortion ) ) || nPortion == 0 )
		return [];
	nPortion = Math.floor( Math.abs( nPortion ) );
	//if ( nPortion > num )
	//	nPortion = num;
	// darabolás
	nInteger = Math.floor( num / nPortion );
	nRemainder = num % nPortion;
	aPortion = [];
	for ( i = 0; i < nPortion; i++  )
		aPortion[i] = nInteger + ( ( nRemainder-- > 0 ) ? 1 : 0 );
	//alert( num + '/' + nPortion + '=' + num / nPortion + ' >> ' + nInteger + ' :: ' + num % nPortion + '\n' +  aPortion )
	return aPortion;
};
// egy sorozatot ad vissza, töbm formájában;
// fn = f(n-1) + n ^ nExp
Number.prototype.seriesG = function( nExp ) {
	n = this.valueOf();
	array = [ Math.pow( n, nExp ) ];
	n--;
	for ( i = 1; i < this.valueOf(); i++, n-- )
		array.push( array[i-1] + Math.pow( n, nExp ) );
	return array;
}

// Array ie5
if ( !Array.prototype.push || Array( 6, 6, 6, 6 ).push( 4 ) != 5 )
	Array.prototype.push = function ( items ) {
		var x;
		for( x = 0; x < arguments.length; x++ )
			this[this.length] = arguments[x];
		return this.length;
	};

if ( !Array.prototype.pop )
	Array.prototype.pop = function() {
		var old;
		old = this[this.length - 1];
		delete this[this.length - 1];
		this.length--;
		return old;
	};

if ( !Array.prototype.shift )
	Array.prototype.shift = function(){
		var old, x;
		old = this[0];
		for( x = 0; x < this.length - 1; x++ )
			this[x] = this[x + 1];
		delete this[this.length - 1];
		this.length--;
		return old;
	};

if ( !Array.prototype.unshift || Array( 6, 6, 6, 6 ).unshift( 4 ) != 5 )
	Array.prototype.unshift = function ( items ) {
		var x;
		for ( x=this.length - 1; x >= 0; x-- )
			this[x + arguments.length] = this[x];
		for( x = 0; x < arguments.length; x++ )
			this[x] = arguments[x];
		return this.length;
	};

if( !Array.prototype.splice )
	Array.prototype.splice = function ( start, deleteCount, items ){
	    var results = [], x;
	    for( x = 0; x < deleteCount; x++ )
			results[x] = this[x + start];
		for( x = start; x < this.length - deleteCount; x++ )
			this[x] = this[x + deleteCount];
		this.length -= deleteCount;
		if( arguments.length > 2 ){
			for( x = this.length - 1; x >= start; x-- )
				this[x + deleteCount] = this[x];
			for( x=0; x < deleteCount; x++ )
				this[x + start] = arguments[x + 2];
		};
		return results;
	};
	
	

/********************************************************
 * BrowserCheck v4.4
 *******************************************************/
var is = {
	getUserAgents : function() { 
		// segédfunkciók
		this.geckoGetRv = function() {
			var nRv = 0, nStart, nEnd, sRv, aRv, nExp = 1, i, nTemp;
			nStart = this.agent.indexOf( 'rv:' );
			nEnd   = this.agent.indexOf( ')', nStart );
			sRv    = this.agent.substring( nStart + 'rv:'.length , nEnd  );
			aRv    = sRv.split('.');
			for ( i = 0; i < aRv.length; i++ ) {
				nTemp = parseInt( aRv[i] );
				nRv += nTemp / nExp;
				nExp *= 10;
			}
			return nRv;
		}
		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();
		
		// 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észok
		// 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.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.konq31 || this.saf );
		this.bss         = ( this.gecko || this.opera7 || this.konq31 || this.saf )
		this.min         = ( this.bs5 || this.ie5 || this.opera || this.khtml );
		return this;
	}
}
is.getUserAgents();


/********************************************************
 * Flash 3.1
 *******************************************************/

// FlashCheck v3.1
var flash = {
	 getFlashCheck : function ( nVer, fError, fScriptableError ) { // fScriptableError :: gecko nincs szkriptelheto 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.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 fo verziószáma
		if ( ( is.ie && is.win ) && this.flashVer < this.minVerRound )
			fError();
		// a plugin alapú böngészokben a plugin kiadását is ellenorizzü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 scriptelheto 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 idozí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();
	}
}
// Ez nem változtatható! Ha hiba oldalt akarunk adni, akkor külön kell meghívnunk ponton paraméterekkel!
flash.getFlashCheck( 6.49, function() {}, function() {} ); 


// createFlashVBSriptHandler 1.2 - flash fejléc fscommand inicializálása
// IE: a flash-js kapcsolat létrehozása
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énykezelojé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 );
	}
}


// sendToFlash & getFromFlash 1.0
// vissztérési értéket nem kívánó flash föggvények hívása
// a setFlashVariable 1.0 továbbfejlesztésébol
function sendToFlash( sId, sFunctionName, aArguments ) {
	var elFlash;
	// csak geckók: ha még nem végzodött be a FlashCheck lekérdezése
	if ( flash.scriptable == null )
		return setTimeout( function() {
			sendToFlash( sId, sFunctionName, aArguments )
		}, 1   )
	// ha nem scriptelheto 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 ( is.gecko && !elFlash.PercentLoaded ) {
		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;
	}
}
// visszérési értékkel rendelkezo flash függvények hívása
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;
	}
}


// createElementEmbed 1.0 - ie5mac - ben ben muködik
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 'wmode' :
					case 'menu' :
					case 'flashvars' :
						elEmbed.setAttribute( elChild.name.toLowerCase(), elChild.value );
						break;
				}
			}
		}
		elObject.parentNode.replaceChild( elEmbed, elObject );
		elEmbed.id = elEmbed.name;
	}
}


// setFlashObject 0.1 - Object tag kiegészítése IE-re
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';
	}
}


/********************************************************
 * eventBinding v3.2
 *******************************************************/
function eventBinding( node, bFlag, sType, fListener, bCapture ) {
	sType = sType.toLowerCase();
	if ( bFlag ) {
		if ( is.ie && is.win ) 
			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 ) 
			node.detachEvent( 'on' + sType, fListener );
		if ( is.ie5mac )
			eventBindingCompletion( [node], bFlag, sType, fListener, bCapture );
		if ( is.bss ) {
			node.removeEventListener( sType, fListener, bCapture );
			}
	}
}
// ie5Mac nem támogatja a többszörösen csatolt eseményeket!
// Konqueror is hasznája a loadBindingben
function eventBindingCompletion( aNode, bFlag, sType, fListener, bCapture ) {
	function eventObject( sType, fListener) {
		this.type = sType;
		this.listener = fListener;
		return this;
	}
	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.getName() + '()' );
					}
				}
			}
			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] = new eventObject( sType, findFunctionString( fFirst ) ); // typeof: string
			eval( 'aNode['+i+'].on' + sType + ' = ' + 'aNode['+i+'].dispatchEvents' );
			aNode[i].aAttachedEvents[aNode[i].aAttachedEvents.length] = new eventObject( sType, 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;
			}
		}
	}
}
// a betöltési eseménykötés érdekességei miatt van külön
// opera7 : a document bocsátja el az eseményt
// Konqueror és Safari: a window bocsátja el az eseményt, de a document kapja meg...
function loadEventBinding( win, fFunction ) {
	if ( is.ie || is.gecko )
		eventBinding( win, true, 'load', fFunction, false );
	if ( is.opera7 )
		eventBinding( win.document, true, 'load', fFunction, false );
	if ( is.konq || is.saf )
		eventBindingCompletion( [ win, win.document], true, 'load', fFunction, false );
}
// a beágyazott IFRAME-k eseményeinek átvételére
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 )
		var 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 )
		}
	}
}


/********************************************************
 * isSpecified v1.2
 *******************************************************/
// 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.ie5 || is.ie55 )
		return nodeEl.attributes[sAttribute]
	else if ( is.ie6 )
		return nodeEl.attributes.getNamedItem( sAttribute )
	else if ( is.bss )
		return nodeEl.hasAttribute( sAttribute );
}


/********************************************************
 * createFullOffset v1.3
 *******************************************************/
function createFullOffset( el ) {
	var aFullOffset = [];
	function getFullOffset( el ) {
		var aOffset = [];
		aOffset[0] = el.offsetLeft;
		aOffset[1] = el.offsetTop;
		//alert( el.tagName + ' : ' + el.offsetLeft + ' : ' + el.offsetTop )
		if ( is.ie5 && el.tagName == 'BODY' ) {
			aOffset[0] += getComputedStylePropertyValue( el, 'margin-left', '' ).toInteger();
			aOffset[0] += getComputedStylePropertyValue( el, 'padding-left', '' ).toInteger();
			aOffset[1] += getComputedStylePropertyValue( el, 'margin-top', '' ).toInteger();
			aOffset[1] += getComputedStylePropertyValue( el, 'padding-top', '' ).toInteger();
		}
		if ( el.offsetParent != null ) {
			var aTempOffset = [];
			aTempOffset = getFullOffset( el.offsetParent );
			aOffset[0] += aTempOffset[0];
			aOffset[1] += aTempOffset[1];
		}
		return aOffset;
	}
	aFullOffset = getFullOffset( el )
	el.offsetX = aFullOffset[0]; // opera7 miatt nem setAttribute, mert nem tudja kiolvasni, es hogy number tipusú legyen4
	el.offsetY = aFullOffset[1];
	if ( is.ie5 ) { // ie5Win + ie5Mac hibája
		el.offsetX = el.offsetX - getComputedStylePropertyValue( el, 'padding-left', '' ).toInteger();
		el.offsetY = el.offsetY - getComputedStylePropertyValue( el, 'padding-top',  '' ).toInteger();
	}
}


/********************************************************
 * getComputedStylePropertyValue v1.3
 * valóságos CSS property lekérdezés
 *******************************************************/
// sStyleProperty pl. 'border-left-color'
function getComputedStylePropertyValue( elNode, sStyleProperty, sPseudoProperty ) {
	var aResult, i, sResult;
	if ( is.khtml ) {
		// nem igazi: visszatérési érték null, ha nincs
		return elNode.style.getPropertyValue( sStyleProperty );
	}
	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;
	}
	if ( is.gecko ) {
		return document.defaultView.getComputedStyle( elNode, sPseudoProperty ).getPropertyValue( sStyleProperty );
	}
	if ( is.ie ) {
		aResult = sStyleProperty.split('-')
		for ( i = 1; i < aResult.length; i++ ) 
			aResult[i] = aResult[i].substring( 0, 1 ).toUpperCase() + aResult[i].substring( 1, aResult[i].length );
		sStyleProperty = aResult.join('');
		if ( is.mac ) // a dokumentáció ellenére nincs getAttribute() függvény ie5Mac alatt
			return ( elNode.currentStyle[ sStyleProperty ] ); // display-t nem tudja visszadni!
		return elNode.currentStyle.getAttribute( sStyleProperty );
	}
}


/********************************************************
 * getWindowDimension v1.2
 *******************************************************/
// a scrollbar NÉLKÜLI teljes rendelkezésre álló felület nagysága a cél
function getWindowDimension() {
	var nScrollBarWidth = 15;
	if ( ( is.ie6 && is.compatMode == 'css1compat' ) || ( is.geckoRv >= 1.5 ) ) {
		window.strictInnerWidth = document.documentElement.clientWidth;
		window.strictInnerHeight = document.documentElement.clientHeight;
		window.strictScrollTop = document.documentElement.scrollTop;
	}
	else if ( is.ie ) {
		window.strictInnerWidth = document.body.clientWidth;
		window.strictInnerHeight = document.body.clientHeight;
		window.strictScrollTop = document.body.scrollTop;
	}
	else if ( is.khtml ) {
		window.strictInnerWidth = window.innerWidth;
		window.strictInnerHeight = window.innerHeight;
	}
	else if ( is.bss ) {
		// moz1.4-re tesztelt
		window.strictInnerWidth = ( document.body.scrollWidth >= document.body.clientWidth ) ? document.body.clientWidth : window.innerWidth;
		window.strictInnerHeight = ( document.body.scrollHeight >= document.body.clientHeight ) ? document.body.clientHeight : window.innerHeight;
		window.strictScrollTop = window.scrollY;
	};
	if ( is.opera7 || is.khtml ) {
		window.strictScrollTop = document.documentElement.scrollTop;
	}
}