/* swfkrpanomousewheel.js (for swfobject 2.2) krpano 1.0.8.10 */
var swfkrpanomousewheel=function(){if(!swfobject){alert("no swfobject");return null}var b=[],g=navigator.appVersion.toLowerCase().indexOf("mac")!=-1,f=null,i=function(a){var c=0;if(!a)a=window.event;if(a.wheelDelta){c=a.wheelDelta/120;if(window.opera)if(g==false)c=-c}else if(a.detail)c=-a.detail;var d=false,e=null,h=0,l=b.length;for(h=0;h<l;h++){e=swfobject.getObjectById(b[h]);if(g||e.wmodefix)if(f==e.getAttribute("id"))if(typeof e.externalMouseEvent=="function"){e.externalMouseEvent(c);document[e.getAttribute("id")].focus();
d=true;break}if(e.get&&e.get("has_mousewheel_event()")=="true"){d=true;break}}if(f)d=true;if(d){a.stopPropagation&&a.stopPropagation();a.preventDefault&&a.preventDefault();a.cancelBubble=true;a.cancel=true;a.returnValue=false}},j=function(a){f=null;if(f=a&&a.target&&a.target.id?a.target.id:this.id){a=swfobject.getObjectById(f);if(a.wmodefix)if(a.jsmwfix_on!=true)if(a.enable_mousewheel_js_bugfix){a.enable_mousewheel_js_bugfix();a.jsmwfix_on=true}}},m=function(){f=null},n=function(){var a=0,c=b.length;
for(a=0;a<c;a++)if((obj=swfobject.getObjectById(b[a]))&&(g||obj.wmodefix))obj.externalMouseEvent2&&obj.externalMouseEvent2(0,"mouseUp")},o=function(){var a=0,c=b.length;for(a=0;a<c;a++)if(obj=swfobject.getObjectById(b[a])){var d="";d=obj.object?String(obj.object.WMode).toLowerCase():String(obj.innerHTML).toLowerCase();obj.wmodefix=d.indexOf("opaque")>=0||d.indexOf("transparent")>=0;if(window.opera&&g)if(c==1)f=b[0];obj.onclick=j;obj.onmouseover=j;obj.onmouseout=m;if(obj.wmodefix)if(obj.enable_mousewheel_js_bugfix){obj.enable_mousewheel_js_bugfix();
obj.jsmwfix_on=true}}},k=function(){setTimeout(o,1E3)},p=function(){window.addEventListener&&window.addEventListener("DOMMouseScroll",i,false);if(window.opera)window.attachEvent("onmousewheel",i);else{window.onmousewheel=document.onmousewheel=i;if(navigator.appName.indexOf("Microsoft")!=-1||g&&window.chrome)this.document.documentElement.onmousewheel=i}document.onmouseup=n;var a=window.onload;window.onload=typeof window.onload!="function"?k:function(){a();k()}};return{registerObject:function(a){b[b.length]=
a;b.length==1&&p()}}}();