function SWFpanoMouseWheel(swfObject){SWFpanoMouseWheel.isMac=navigator.appVersion.toLowerCase().indexOf("mac")!=-1;SWFpanoMouseWheel.isSafari=navigator.appVersion.toLowerCase().indexOf("safari")!=-1;this.so=swfObject;this.init();}
SWFpanoMouseWheel.prototype={init:function(){if(!SWFpanoMouseWheel.instances){SWFpanoMouseWheel.instances=new Array();if(window.addEventListener){window.addEventListener('DOMMouseScroll',krpmw_we,false);}if(window.opera){window.attachEvent("onmousewheel",krpmw_we);}else{window.onmousewheel=document.onmousewheel=krpmw_we;}if(window.opera||SWFpanoMouseWheel.isMac||SWFpanoMouseWheel.isSafari){var oldonload=window.onload;if(typeof window.onload!="function"){window.onload=krpmw_red;}else{window.onload=function(){oldonload();krpmw_red();}}}}SWFpanoMouseWheel.instances.push(this);},handleMacWheel:function(delta){var obj=document[this.so.getAttribute('id')];if(obj&&obj.externalMouseEvent){obj.externalMouseEvent(delta);}},hasWheelEvent:function(){return document[this.so.getAttribute('id')].get("has_mousewheel_event()")=="true";}};
function krpmw_red(){setTimeout(krpmw_re,1000);}
function krpmw_re(){var i=0;var cnt=SWFpanoMouseWheel.instances.length;for(i=0;i<cnt;i++){var objid=SWFpanoMouseWheel.instances[i].so.getAttribute('id');var obj=document[objid];if(obj){if(SWFpanoMouseWheel.isSafari && !SWFpanoMouseWheel.isMac){if(obj.enable_mousewheel_js_bugfix){obj.enable_mousewheel_js_bugfix();}}else{obj.onmouseover=krpmw_ove;obj.onmouseout=krpmw_oue;}}}}
function krpmw_ove(e){SWFpanoMouseWheel.overobj=e.target.id;if(SWFpanoMouseWheel.isSafari&&SWFpanoMouseWheel.isMac){SWFpanoMouseWheel.spx=window.pageXOffset;SWFpanoMouseWheel.spy=window.pageYOffset;}}
function krpmw_oue(e){SWFpanoMouseWheel.overobj=null;}
function krpmw_we(e){if(!e)e=window.event;var delta=0;if(e.wheelDelta){delta=e.wheelDelta/120.0;if(window.opera){if(SWFpanoMouseWheel.isMac==false){delta=-delta;}}}else if(e.detail){delta=-e.detail;}var stopevent=false;if(delta){var i=0;var cnt=SWFpanoMouseWheel.instances.length;for(i=0;i<cnt;i++){var objid=SWFpanoMouseWheel.instances[i].so.getAttribute('id');var obj=document[objid];if(SWFpanoMouseWheel.isSafari&&!SWFpanoMouseWheel.isMac){SWFpanoMouseWheel.instances[i].handleMacWheel(delta);}else{if(SWFpanoMouseWheel.isMac||SWFpanoMouseWheel.isSafari){if(SWFpanoMouseWheel.overobj==objid){SWFpanoMouseWheel.instances[i].handleMacWheel(delta);document[objid].focus();stopevent=true;break;}}if(SWFpanoMouseWheel.instances[i].hasWheelEvent()){stopevent=true;break;}}}}if(SWFpanoMouseWheel.overobj){stopevent=true;}if(stopevent){if(SWFpanoMouseWheel.isSafari&&SWFpanoMouseWheel.isMac){window.scrollTo(SWFpanoMouseWheel.spx,SWFpanoMouseWheel.spy);}if(e.stopPropagation) e.stopPropagation();if(e.preventDefault) e.preventDefault();e.cancelBubble=true;e.cancel=true;e.returnValue=false;}}
