
/*******************************************************************************
 * flashScroll v1.0
 *******************************************************************************/

var nCurToggle = 0; 
var nCount = 0;
var elFlash = null;

if ( document.captureEvents )
	document.captureEvents( Event.MOUSEMOVE );

function getElFlash() {
	if ( document.all )
		elFlash =  index;
	else if ( document.embeds )
		elFlash =  document.embeds['index'];
	if ( !elFlash )
		setTimeout( 'getElFlash()', 500 );
}
onload = getElFlash;

// vezérlés
document.onmousemove = function( e ) { 
	if ( !elFlash )
		return;
	var nDX = ( document.all ) ? event.clientX : e.pageX + 2;
	var nDY = ( document.all ) ? event.clientY : e.pageY + 2;
	elFlash.SetVariable( '_root.myX', nDX ); 
	elFlash.SetVariable( '_root.myY', nDY ); 
};
document.onmouseout = function(){ 
	nCurToggle = 1 - nCurToggle; 
	nMyToggle = nCurToggle + 1; 
	if ( !elFlash )
		return;
	elFlash.SetVariable( '_root.myToggle', nMyToggle ); 
};
document.onmousewheel = function(){ 
	function getCounting() { 
		if ( event.wheelDelta >= 120 ) 
			nCount += 2; 
		else if ( event.wheelDelta <= -120 ) 
			nCount -= 2; 
		return nCount; 
	};
	if ( !elFlash )
		return;
	elFlash.SetVariable( '_root.myWheel', getCounting() ); 
}; 

