function pano2vrSkin(player,base) { var me=this; var flag=false; var nodeMarker=new Array(); var activeNodeMarker=new Array(); this.player=player; this.player.skinObj=this; this.divSkin=player.divSkin; var basePath=""; // auto detect base path if (base=='?') { var scripts = document.getElementsByTagName('script'); for(var i=0;i<scripts.length;i++) { var src=scripts[i].src; if (src.indexOf('skin.js')>=0) { var p=src.lastIndexOf('/'); if (p>=0) { basePath=src.substr(0,p+1); } } } } else if (base) { basePath=base; } this.elementMouseDown=new Array(); this.elementMouseOver=new Array(); var cssPrefix=''; var domTransition='transition'; var domTransform='transform'; var prefixes='Webkit,Moz,O,ms,Ms'.split(','); var i; for(i=0;i<prefixes.length;i++) { if (typeof document.body.style[prefixes[i] + 'Transform'] !== 'undefined') { cssPrefix='-' + prefixes[i].toLowerCase() + '-'; domTransition=prefixes[i] + 'Transition'; domTransform=prefixes[i] + 'Transform'; } } this.player.setMargins(0,0,0,0); this.updateSize=function(startElement) { var stack=new Array(); stack.push(startElement); while(stack.length>0) { e=stack.pop(); if (e.ggUpdatePosition) { e.ggUpdatePosition(); } if (e.hasChildNodes()) { for(i=0;i<e.childNodes.length;i++) { stack.push(e.childNodes[i]); } } } } parameterToTransform=function(p) { return 'translate(' + p.rx + 'px,' + p.ry + 'px) rotate(' + p.a + 'deg) scale(' + p.sx + ',' + p.sy + ')'; } this.findElements=function(id,regex) { var r=new Array(); var stack=new Array(); var pat=new RegExp(id,''); stack.push(me.divSkin); while(stack.length>0) { e=stack.pop(); if (regex) { if (pat.test(e.ggId)) r.push(e); } else { if (e.ggId==id) r.push(e); } if (e.hasChildNodes()) { for(i=0;i<e.childNodes.length;i++) { stack.push(e.childNodes[i]); } } } return r; } this.preloadImages=function() { var preLoadImg=new Image(); preLoadImg.src=basePath + 'images/_17__o.png'; preLoadImg.src=basePath + 'images/_17__a.png'; preLoadImg.src=basePath + 'images/_180__o.png'; preLoadImg.src=basePath + 'images/_180__a.png'; preLoadImg.src=basePath + 'images/nozoom__o.png'; preLoadImg.src=basePath + 'images/nozoom__a.png'; preLoadImg.src=basePath + 'images/pausebtn__o.png'; preLoadImg.src=basePath + 'images/pausebtn__a.png'; preLoadImg.src=basePath + 'images/runbtn__o.png'; preLoadImg.src=basePath + 'images/runbtn__a.png'; preLoadImg.src=basePath + 'images/fullscreenbutton__o.png'; preLoadImg.src=basePath + 'images/fullscreenbutton__a.png'; preLoadImg.src=basePath + 'images/zoomout__o.png'; preLoadImg.src=basePath + 'images/zoomout__a.png'; preLoadImg.src=basePath + 'images/zoomin__o.png'; preLoadImg.src=basePath + 'images/zoomin__a.png'; preLoadImg.src=basePath + 'images/logo__o.png'; preLoadImg.src=basePath + 'images/logo__a.png'; } this.addSkin=function() { this.__17=document.createElement('div'); this.__17.ggId='\u041a\u043d\u043e\u043f\u043a\u0430 17'; this.__17.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this.__17.ggVisible=true; this.__17.className='ggskin ggskin_button'; this.__17.ggUpdatePosition=function() { this.style[domTransition]='none'; if (this.parentNode) { h=this.parentNode.offsetHeight; this.style.top=(-50 + h/2) + 'px'; } } hs ='position:absolute;'; hs+='left: 0px;'; hs+='top: -50px;'; hs+='width: 29px;'; hs+='height: 54px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: inherit;'; hs+='cursor: pointer;'; this.__17.setAttribute('style',hs); this.__17__img=document.createElement('img'); this.__17__img.setAttribute('src',basePath + 'images/_17.png'); this.__17__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this.__17__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this.__17__img); this.__17.appendChild(this.__17__img); this.__17.onmouseover=function () { me.__17__img.src=basePath + 'images/_17__o.png'; } this.__17.onmouseout=function () { me.__17__img.src=basePath + 'images/_17.png'; me.elementMouseDown['_17']=false; } this.__17.onmousedown=function () { me.__17__img.src=basePath + 'images/_17__a.png'; me.elementMouseDown['_17']=true; } this.__17.onmouseup=function () { me.__17__img.src=basePath + 'images/_17.png'; me.elementMouseDown['_17']=false; } this.__17.ontouchend=function () { me.elementMouseDown['_17']=false; } this.divSkin.appendChild(this.__17); this.__180=document.createElement('div'); this.__180.ggId='\u041a\u043d\u043e\u043f\u043a\u0430 18'; this.__180.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this.__180.ggVisible=true; this.__180.className='ggskin ggskin_button'; this.__180.ggUpdatePosition=function() { this.style[domTransition]='none'; if (this.parentNode) { w=this.parentNode.offsetWidth; this.style.left=(-30 + w) + 'px'; h=this.parentNode.offsetHeight; this.style.top=(-50 + h/2) + 'px'; } } hs ='position:absolute;'; hs+='left: -30px;'; hs+='top: -50px;'; hs+='width: 29px;'; hs+='height: 54px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: inherit;'; hs+='cursor: pointer;'; this.__180.setAttribute('style',hs); this.__180__img=document.createElement('img'); this.__180__img.setAttribute('src',basePath + 'images/_180.png'); this.__180__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this.__180__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this.__180__img); this.__180.appendChild(this.__180__img); this.__180.onmouseover=function () { me.__180__img.src=basePath + 'images/_180__o.png'; } this.__180.onmouseout=function () { me.__180__img.src=basePath + 'images/_180.png'; me.elementMouseDown['_180']=false; } this.__180.onmousedown=function () { me.__180__img.src=basePath + 'images/_180__a.png'; me.elementMouseDown['_180']=true; } this.__180.onmouseup=function () { me.__180__img.src=basePath + 'images/_180.png'; me.elementMouseDown['_180']=false; } this.__180.ontouchend=function () { me.elementMouseDown['_180']=false; } this.divSkin.appendChild(this.__180); this._start=document.createElement('div'); this._start.ggId='start'; this._start.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._start.ggVisible=true; this._start.className='ggskin ggskin_image'; this._start.ggUpdatePosition=function() { this.style[domTransition]='none'; if (this.parentNode) { w=this.parentNode.offsetWidth; this.style.left=(-216 + w/2) + 'px'; h=this.parentNode.offsetHeight; this.style.top=(-120 + h/2) + 'px'; } } hs ='position:absolute;'; hs+='left: -216px;'; hs+='top: -120px;'; hs+='width: 431px;'; hs+='height: 219px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: inherit;'; this._start.setAttribute('style',hs); this._start__img=document.createElement('img'); this._start__img.setAttribute('src',basePath + 'images/start.png'); this._start__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this._start__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this._start__img); this._start.appendChild(this._start__img); this._start.onclick=function () { me._start.style[domTransition]='none'; me._start.style.visibility='hidden'; me._start.ggVisible=false; } this._loading_rectangle=document.createElement('div'); this._loading_rectangle.ggId='Loading rectangle'; this._loading_rectangle.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:0.4 }; this._loading_rectangle.ggVisible=true; this._loading_rectangle.className='ggskin ggskin_rectangle'; hs ='position:absolute;'; hs+='left: 146px;'; hs+='top: 132px;'; hs+='width: 200px;'; hs+='height: 10px;'; hs+=cssPrefix + 'transform-origin: 0% 50%;'; hs+=cssPrefix + 'transform: ' + parameterToTransform(this._loading_rectangle.ggParameter) + ';'; hs+='visibility: inherit;'; hs+='background: #ffffff;'; hs+='border: 0px solid #000080;'; this._loading_rectangle.setAttribute('style',hs); this._start.appendChild(this._loading_rectangle); this._loading_text=document.createElement('div'); this._loading_text.ggId='Loading text'; this._loading_text.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._loading_text.ggVisible=true; this._loading_text.className='ggskin ggskin_text'; hs ='position:absolute;'; hs+='left: 146px;'; hs+='top: 107px;'; hs+='width: 179px;'; hs+='height: 20px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: inherit;'; hs+='border: 0px solid #000000;'; hs+='color: #ffffff;'; hs+='text-align: left;'; hs+='white-space: nowrap;'; hs+='padding: 0px 1px 0px 1px;'; hs+='overflow: hidden;'; this._loading_text.setAttribute('style',hs); this._loading_text.ggUpdateText=function() { var hs="\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f..."+(me.player.getPercentLoaded()*100.0).toFixed(0)+"%"; if (hs!=this.ggText) { this.ggText=hs; this.innerHTML=hs; } } this._loading_text.ggUpdateText(); this._start.appendChild(this._loading_text); this.divSkin.appendChild(this._start); this._fullscreenzoom=document.createElement('div'); this._fullscreenzoom.ggId='fullscreen-zoom'; this._fullscreenzoom.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._fullscreenzoom.ggVisible=true; this._fullscreenzoom.className='ggskin ggskin_container'; this._fullscreenzoom.ggUpdatePosition=function() { this.style[domTransition]='none'; if (this.parentNode) { w=this.parentNode.offsetWidth; this.style.left=(-214 + w/2) + 'px'; h=this.parentNode.offsetHeight; this.style.top=(-43 + h) + 'px'; } } hs ='position:absolute;'; hs+='left: -214px;'; hs+='top: -43px;'; hs+='width: 324px;'; hs+='height: 44px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: inherit;'; this._fullscreenzoom.setAttribute('style',hs); this._rectangle_22=document.createElement('div'); this._rectangle_22.ggId='Rectangle 22'; this._rectangle_22.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._rectangle_22.ggVisible=true; this._rectangle_22.className='ggskin ggskin_rectangle'; hs ='position:absolute;'; hs+='left: -1736px;'; hs+='top: 0px;'; hs+='width: 3000px;'; hs+='height: 45px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='opacity: 0.3;'; hs+='visibility: inherit;'; hs+='background: #000000;'; hs+='border: 0px solid #000000;'; this._rectangle_22.setAttribute('style',hs); this._fullscreenzoom.appendChild(this._rectangle_22); this._runhint=document.createElement('div'); this._runhint.ggId='run-hint'; this._runhint.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._runhint.ggVisible=false; this._runhint.className='ggskin ggskin_image'; hs ='position:absolute;'; hs+='left: 125px;'; hs+='top: -69px;'; hs+='width: 192px;'; hs+='height: 86px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: hidden;'; this._runhint.setAttribute('style',hs); this._runhint__img=document.createElement('img'); this._runhint__img.setAttribute('src',basePath + 'images/runhint.png'); this._runhint__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this._runhint__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this._runhint__img); this._runhint.appendChild(this._runhint__img); this._fullscreenzoom.appendChild(this._runhint); this._resethint=document.createElement('div'); this._resethint.ggId='reset-hint'; this._resethint.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._resethint.ggVisible=false; this._resethint.className='ggskin ggskin_image'; hs ='position:absolute;'; hs+='left: 82px;'; hs+='top: -69px;'; hs+='width: 151px;'; hs+='height: 86px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: hidden;'; this._resethint.setAttribute('style',hs); this._resethint__img=document.createElement('img'); this._resethint__img.setAttribute('src',basePath + 'images/resethint.png'); this._resethint__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this._resethint__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this._resethint__img); this._resethint.appendChild(this._resethint__img); this._fullscreenzoom.appendChild(this._resethint); this._fullscreenhint=document.createElement('div'); this._fullscreenhint.ggId='fullscreen-hint'; this._fullscreenhint.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._fullscreenhint.ggVisible=false; this._fullscreenhint.className='ggskin ggskin_image'; hs ='position:absolute;'; hs+='left: 115px;'; hs+='top: -70px;'; hs+='width: 224px;'; hs+='height: 87px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: hidden;'; this._fullscreenhint.setAttribute('style',hs); this._fullscreenhint__img=document.createElement('img'); this._fullscreenhint__img.setAttribute('src',basePath + 'images/fullscreenhint.png'); this._fullscreenhint__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this._fullscreenhint__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this._fullscreenhint__img); this._fullscreenhint.appendChild(this._fullscreenhint__img); this._fullscreenzoom.appendChild(this._fullscreenhint); this._zoominhint=document.createElement('div'); this._zoominhint.ggId='zoomin-hint'; this._zoominhint.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._zoominhint.ggVisible=false; this._zoominhint.className='ggskin ggskin_image'; hs ='position:absolute;'; hs+='left: 83px;'; hs+='top: -69px;'; hs+='width: 169px;'; hs+='height: 86px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: hidden;'; this._zoominhint.setAttribute('style',hs); this._zoominhint__img=document.createElement('img'); this._zoominhint__img.setAttribute('src',basePath + 'images/zoominhint.png'); this._zoominhint__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this._zoominhint__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this._zoominhint__img); this._zoominhint.appendChild(this._zoominhint__img); this._fullscreenzoom.appendChild(this._zoominhint); this._zoomouthint=document.createElement('div'); this._zoomouthint.ggId='zoomout-hint'; this._zoomouthint.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._zoomouthint.ggVisible=false; this._zoomouthint.className='ggskin ggskin_image'; hs ='position:absolute;'; hs+='left: 126px;'; hs+='top: -69px;'; hs+='width: 169px;'; hs+='height: 86px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: hidden;'; this._zoomouthint.setAttribute('style',hs); this._zoomouthint__img=document.createElement('img'); this._zoomouthint__img.setAttribute('src',basePath + 'images/zoomouthint.png'); this._zoomouthint__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this._zoomouthint__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this._zoomouthint__img); this._zoomouthint.appendChild(this._zoomouthint__img); this._fullscreenzoom.appendChild(this._zoomouthint); this._nozoom=document.createElement('div'); this._nozoom.ggId='nozoom'; this._nozoom.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._nozoom.ggVisible=true; this._nozoom.className='ggskin ggskin_button'; hs ='position:absolute;'; hs+='left: 97px;'; hs+='top: 0px;'; hs+='width: 42px;'; hs+='height: 42px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: inherit;'; hs+='cursor: pointer;'; this._nozoom.setAttribute('style',hs); this._nozoom__img=document.createElement('img'); this._nozoom__img.setAttribute('src',basePath + 'images/nozoom.png'); this._nozoom__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this._nozoom__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this._nozoom__img); this._nozoom.appendChild(this._nozoom__img); this._nozoom.onclick=function () { me.player.setDefaultView(); } this._nozoom.onmouseover=function () { me._nozoom__img.src=basePath + 'images/nozoom__o.png'; me.elementMouseOver['nozoom']=true; } this._nozoom.onmouseout=function () { me._resethint.style[domTransition]='none'; me._resethint.style.visibility='hidden'; me._resethint.ggVisible=false; me._nozoom__img.src=basePath + 'images/nozoom.png'; me.elementMouseOver['nozoom']=false; } this._nozoom.onmousedown=function () { me._nozoom__img.src=basePath + 'images/nozoom__a.png'; } this._nozoom.onmouseup=function () { me._nozoom__img.src=basePath + 'images/nozoom.png'; } this._nozoom.ontouchend=function () { me.elementMouseOver['nozoom']=false; } this._fullscreenzoom.appendChild(this._nozoom); this._pausebtn=document.createElement('div'); this._pausebtn.ggId='pause-btn'; this._pausebtn.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._pausebtn.ggVisible=false; this._pausebtn.className='ggskin ggskin_button'; hs ='position:absolute;'; hs+='left: 140px;'; hs+='top: 0px;'; hs+='width: 42px;'; hs+='height: 42px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: hidden;'; hs+='cursor: pointer;'; this._pausebtn.setAttribute('style',hs); this._pausebtn__img=document.createElement('img'); this._pausebtn__img.setAttribute('src',basePath + 'images/pausebtn.png'); this._pausebtn__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this._pausebtn__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this._pausebtn__img); this._pausebtn.appendChild(this._pausebtn__img); this._pausebtn.onclick=function () { me.player.stopAutorotate(); me._pausebtn.style[domTransition]='none'; me._pausebtn.style.visibility='hidden'; me._pausebtn.ggVisible=false; me._runbtn.style[domTransition]='none'; me._runbtn.style.visibility='inherit'; me._runbtn.ggVisible=true; } this._pausebtn.onmouseover=function () { me._pausebtn__img.src=basePath + 'images/pausebtn__o.png'; me.elementMouseOver['pausebtn']=true; } this._pausebtn.onmouseout=function () { me._runhint.style[domTransition]='none'; me._runhint.style.visibility='hidden'; me._runhint.ggVisible=false; me._pausebtn__img.src=basePath + 'images/pausebtn.png'; me.elementMouseOver['pausebtn']=false; } this._pausebtn.onmousedown=function () { me._pausebtn__img.src=basePath + 'images/pausebtn__a.png'; } this._pausebtn.onmouseup=function () { me._pausebtn__img.src=basePath + 'images/pausebtn.png'; } this._pausebtn.ontouchend=function () { me.elementMouseOver['pausebtn']=false; } this._fullscreenzoom.appendChild(this._pausebtn); this._runbtn=document.createElement('div'); this._runbtn.ggId='run-btn'; this._runbtn.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._runbtn.ggVisible=true; this._runbtn.className='ggskin ggskin_button'; hs ='position:absolute;'; hs+='left: 140px;'; hs+='top: 0px;'; hs+='width: 42px;'; hs+='height: 42px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: inherit;'; hs+='cursor: pointer;'; this._runbtn.setAttribute('style',hs); this._runbtn__img=document.createElement('img'); this._runbtn__img.setAttribute('src',basePath + 'images/runbtn.png'); this._runbtn__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this._runbtn__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this._runbtn__img); this._runbtn.appendChild(this._runbtn__img); this._runbtn.onclick=function () { me.player.startAutorotate("0.2"); me._runbtn.style[domTransition]='none'; me._runbtn.style.visibility='hidden'; me._runbtn.ggVisible=false; me._pausebtn.style[domTransition]='none'; me._pausebtn.style.visibility='inherit'; me._pausebtn.ggVisible=true; } this._runbtn.onmouseover=function () { me._runbtn__img.src=basePath + 'images/runbtn__o.png'; me.elementMouseOver['runbtn']=true; } this._runbtn.onmouseout=function () { me._runhint.style[domTransition]='none'; me._runhint.style.visibility='hidden'; me._runhint.ggVisible=false; me._runbtn__img.src=basePath + 'images/runbtn.png'; me.elementMouseOver['runbtn']=false; } this._runbtn.onmousedown=function () { me._runbtn__img.src=basePath + 'images/runbtn__a.png'; } this._runbtn.onmouseup=function () { me._runbtn__img.src=basePath + 'images/runbtn.png'; } this._runbtn.ontouchend=function () { me.elementMouseOver['runbtn']=false; } this._fullscreenzoom.appendChild(this._runbtn); this._fullscreenbutton=document.createElement('div'); this._fullscreenbutton.ggId='fullscreen-button'; this._fullscreenbutton.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._fullscreenbutton.ggVisible=true; this._fullscreenbutton.className='ggskin ggskin_button'; hs ='position:absolute;'; hs+='left: 279px;'; hs+='top: 0px;'; hs+='width: 43px;'; hs+='height: 43px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: inherit;'; hs+='cursor: pointer;'; this._fullscreenbutton.setAttribute('style',hs); this._fullscreenbutton__img=document.createElement('img'); this._fullscreenbutton__img.setAttribute('src',basePath + 'images/fullscreenbutton.png'); this._fullscreenbutton__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this._fullscreenbutton__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this._fullscreenbutton__img); this._fullscreenbutton.appendChild(this._fullscreenbutton__img); this._fullscreenbutton.onclick=function () { me.player.toggleFullscreen(); } this._fullscreenbutton.onmouseover=function () { me._fullscreenbutton__img.src=basePath + 'images/fullscreenbutton__o.png'; me.elementMouseOver['fullscreenbutton']=true; } this._fullscreenbutton.onmouseout=function () { me._fullscreenhint.style[domTransition]='none'; me._fullscreenhint.style.visibility='hidden'; me._fullscreenhint.ggVisible=false; me._fullscreenbutton__img.src=basePath + 'images/fullscreenbutton.png'; me.elementMouseOver['fullscreenbutton']=false; } this._fullscreenbutton.onmousedown=function () { me._fullscreenbutton__img.src=basePath + 'images/fullscreenbutton__a.png'; } this._fullscreenbutton.onmouseup=function () { me._fullscreenbutton__img.src=basePath + 'images/fullscreenbutton.png'; } this._fullscreenbutton.ontouchend=function () { me.elementMouseOver['fullscreenbutton']=false; } this._fullscreenzoom.appendChild(this._fullscreenbutton); this._zoomout=document.createElement('div'); this._zoomout.ggId='zoom-out'; this._zoomout.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._zoomout.ggVisible=true; this._zoomout.className='ggskin ggskin_button'; hs ='position:absolute;'; hs+='left: 236px;'; hs+='top: 0px;'; hs+='width: 42px;'; hs+='height: 42px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: inherit;'; hs+='cursor: pointer;'; this._zoomout.setAttribute('style',hs); this._zoomout__img=document.createElement('img'); this._zoomout__img.setAttribute('src',basePath + 'images/zoomout.png'); this._zoomout__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this._zoomout__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this._zoomout__img); this._zoomout.appendChild(this._zoomout__img); this._zoomout.onclick=function () { me.player.changeFovLog(1,true); } this._zoomout.onmouseover=function () { me._zoomout__img.src=basePath + 'images/zoomout__o.png'; me.elementMouseOver['zoomout']=true; } this._zoomout.onmouseout=function () { me._zoomouthint.style[domTransition]='none'; me._zoomouthint.style.visibility='hidden'; me._zoomouthint.ggVisible=false; me._zoomout__img.src=basePath + 'images/zoomout.png'; me.elementMouseOver['zoomout']=false; } this._zoomout.onmousedown=function () { me._zoomout__img.src=basePath + 'images/zoomout__a.png'; } this._zoomout.onmouseup=function () { me._zoomout__img.src=basePath + 'images/zoomout.png'; } this._zoomout.ontouchend=function () { me.elementMouseOver['zoomout']=false; } this._fullscreenzoom.appendChild(this._zoomout); this._zoomin=document.createElement('div'); this._zoomin.ggId='zoom-in'; this._zoomin.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._zoomin.ggVisible=true; this._zoomin.className='ggskin ggskin_button'; hs ='position:absolute;'; hs+='left: 193px;'; hs+='top: 0px;'; hs+='width: 42px;'; hs+='height: 42px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: inherit;'; hs+='cursor: pointer;'; this._zoomin.setAttribute('style',hs); this._zoomin__img=document.createElement('img'); this._zoomin__img.setAttribute('src',basePath + 'images/zoomin.png'); this._zoomin__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this._zoomin__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this._zoomin__img); this._zoomin.appendChild(this._zoomin__img); this._zoomin.onclick=function () { me.player.changeFovLog(-1,true); } this._zoomin.onmouseover=function () { me._zoominhint.style[domTransition]='none'; me._zoominhint.style.visibility='inherit'; me._zoominhint.ggVisible=true; me._zoomin__img.src=basePath + 'images/zoomin__o.png'; } this._zoomin.onmouseout=function () { me._zoominhint.style[domTransition]='none'; me._zoominhint.style.visibility='hidden'; me._zoominhint.ggVisible=false; me._zoomin__img.src=basePath + 'images/zoomin.png'; } this._zoomin.onmousedown=function () { me._zoomin__img.src=basePath + 'images/zoomin__a.png'; } this._zoomin.onmouseup=function () { me._zoomin__img.src=basePath + 'images/zoomin.png'; } this._fullscreenzoom.appendChild(this._zoomin); this.divSkin.appendChild(this._fullscreenzoom); this._logo=document.createElement('div'); this._logo.ggId='logo'; this._logo.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this._logo.ggVisible=true; this._logo.className='ggskin ggskin_button'; this._logo.ggUpdatePosition=function() { this.style[domTransition]='none'; if (this.parentNode) { w=this.parentNode.offsetWidth; this.style.left=(-143 + w) + 'px'; h=this.parentNode.offsetHeight; this.style.top=(-36 + h) + 'px'; } } hs ='position:absolute;'; hs+='left: -143px;'; hs+='top: -36px;'; hs+='width: 133px;'; hs+='height: 30px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: inherit;'; hs+='cursor: pointer;'; this._logo.setAttribute('style',hs); this._logo__img=document.createElement('img'); this._logo__img.setAttribute('src',basePath + 'images/logo.png'); this._logo__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this._logo__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this._logo__img); this._logo.appendChild(this._logo__img); this._logo.onclick=function () { me.player.openUrl("http:\/\/drom.ru","_blank"); } this._logo.onmouseover=function () { me._logo__img.src=basePath + 'images/logo__o.png'; } this._logo.onmouseout=function () { me._logo__img.src=basePath + 'images/logo.png'; } this._logo.onmousedown=function () { me._logo__img.src=basePath + 'images/logo__a.png'; } this._logo.onmouseup=function () { me._logo__img.src=basePath + 'images/logo.png'; } this.divSkin.appendChild(this._logo); me._fullscreenhint.style[domTransition]='none'; me._fullscreenhint.style.visibility='hidden'; me._fullscreenhint.ggVisible=false; this.preloadImages(); this.divSkin.ggUpdateSize=function(w,h) { me.updateSize(me.divSkin); } this.divSkin.ggViewerInit=function() { } this.divSkin.ggLoaded=function() { me._start.style[domTransition]='none'; me._start.style.visibility='hidden'; me._start.ggVisible=false; } this.divSkin.ggReLoaded=function() { me._start.style[domTransition]='none'; me._start.style.visibility='inherit'; me._start.ggVisible=true; } this.divSkin.ggEnterFullscreen=function() { } this.divSkin.ggExitFullscreen=function() { } this.skinTimerEvent(); }; this.hotspotProxyClick=function(id) { } this.hotspotProxyOver=function(id) { } this.hotspotProxyOut=function(id) { } this.changeActiveNode=function(id) { var newMarker=new Array(); var i,j; var tags=me.player.userdata.tags; for (i=0;i<nodeMarker.length;i++) { var match=false; if (nodeMarker[i].ggMarkerNodeId==id) match=true; for(j=0;j<tags.length;j++) { if (nodeMarker[i].ggMarkerNodeId==tags[j]) match=true; } if (match) { newMarker.push(nodeMarker[i]); } } for(i=0;i<activeNodeMarker.length;i++) { if (newMarker.indexOf(activeNodeMarker[i])<0) { if (activeNodeMarker[i].ggMarkerNormal) { activeNodeMarker[i].ggMarkerNormal.style.visibility='inherit'; } if (activeNodeMarker[i].ggMarkerActive) { activeNodeMarker[i].ggMarkerActive.style.visibility='hidden'; } if (activeNodeMarker[i].ggDeactivate) { activeNodeMarker[i].ggDeactivate(); } } } for(i=0;i<newMarker.length;i++) { if (activeNodeMarker.indexOf(newMarker[i])<0) { if (newMarker[i].ggMarkerNormal) { newMarker[i].ggMarkerNormal.style.visibility='hidden'; } if (newMarker[i].ggMarkerActive) { newMarker[i].ggMarkerActive.style.visibility='inherit'; } if (newMarker[i].ggActivate) { newMarker[i].ggActivate(); } } } activeNodeMarker=newMarker; } this.skinTimerEvent=function() { setTimeout(function() { me.skinTimerEvent(); }, 10); if (me.elementMouseDown['_17']) { me.player.changePan(1,true); } if (me.elementMouseDown['_180']) { me.player.changePan(-1,true); } var hs=''; if (me._loading_rectangle.ggParameter) { hs+=parameterToTransform(me._loading_rectangle.ggParameter) + ' '; } hs+='scale(' + (1 * me.player.getPercentLoaded() + 0) + ',1.0) '; me._loading_rectangle.style[domTransform]=hs; this._loading_text.ggUpdateText(); if (me.elementMouseOver['nozoom']) { me._resethint.style[domTransition]='none'; me._resethint.style.visibility='inherit'; me._resethint.ggVisible=true; } if (me.elementMouseOver['pausebtn']) { me._runhint.style[domTransition]='none'; me._runhint.style.visibility='inherit'; me._runhint.ggVisible=true; } if (me.elementMouseOver['runbtn']) { me._runhint.style[domTransition]='none'; me._runhint.style.visibility='inherit'; me._runhint.ggVisible=true; } if (me.elementMouseOver['fullscreenbutton']) { me._fullscreenhint.style[domTransition]='none'; me._fullscreenhint.style.visibility='inherit'; me._fullscreenhint.ggVisible=true; } if (me.elementMouseOver['zoomout']) { me._zoomouthint.style[domTransition]='none'; me._zoomouthint.style.visibility='inherit'; me._zoomouthint.ggVisible=true; } }; function SkinHotspotClass(skinObj,hotspot) { var me=this; var flag=false; this.player=skinObj.player; this.skin=skinObj; this.hotspot=hotspot; this.elementMouseDown=new Array(); this.elementMouseOver=new Array(); this.__div=document.createElement('div'); this.__div.setAttribute('style','position:absolute; left:0px;top:0px;visibility: inherit;'); this.findElements=function(id,regex) { return me.skin.findElements(id,regex); } { this.__div=document.createElement('div'); this.__div.ggId='hotspot'; this.__div.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this.__div.ggVisible=true; this.__div.className='ggskin ggskin_hotspot'; hs ='position:absolute;'; hs+='left: 450px;'; hs+='top: 49px;'; hs+='width: 5px;'; hs+='height: 5px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: inherit;'; this.__div.setAttribute('style',hs); this.__div.onclick=function () { me.skin.hotspotProxyClick(me.hotspot.id); } this.__div.onmouseover=function () { me.player.hotspot=me.hotspot; me.skin.hotspotProxyOver(me.hotspot.id); } this.__div.onmouseout=function () { me.player.hotspot=me.player.emptyHotspot; me.skin.hotspotProxyOut(me.hotspot.id); } this.__18=document.createElement('div'); this.__18.ggId='\u041a\u043d\u043e\u043f\u043a\u0430 18'; this.__18.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; this.__18.ggVisible=true; this.__18.className='ggskin ggskin_button'; hs ='position:absolute;'; hs+='left: -34px;'; hs+='top: -35px;'; hs+='width: 70px;'; hs+='height: 70px;'; hs+=cssPrefix + 'transform-origin: 50% 50%;'; hs+='visibility: inherit;'; hs+='cursor: pointer;'; this.__18.setAttribute('style',hs); this.__18__img=document.createElement('img'); this.__18__img.setAttribute('src',basePath + 'images/_18.png'); this.__18__img.setAttribute('style','position: absolute;top: 0px;left: 0px;-webkit-user-drag:none;'); this.__18__img['ondragstart']=function() { return false; }; me.player.checkLoaded.push(this.__18__img); this.__18.appendChild(this.__18__img); this.__18.onclick=function () { me.player.openUrl(me.hotspot.url,me.hotspot.target); } this.__18.onmouseover=function () { me.__18__img.src=basePath + 'images/_18__o.png'; } this.__18.onmouseout=function () { me.__18__img.src=basePath + 'images/_18.png'; } this.__18.onmousedown=function () { me.__18__img.src=basePath + 'images/_18__a.png'; } this.__18.onmouseup=function () { me.__18__img.src=basePath + 'images/_18.png'; } this.__div.appendChild(this.__18); } }; this.addSkinHotspot=function(hotspot) { return new SkinHotspotClass(me,hotspot); } this.addSkin(); };