document.addEventListener('touchmove', bindTouch, false); function bindTouch(event) { event.preventDefault(); } var intYzik=0; var intXzik=0; var intYzik1=0; var intXzik1=0; var intY1=0; var intX1=0; if (userAgent.indexOf('android')>1){ smaho=1; } if (userAgent.indexOf('iphone')>1){ smaho=2; } if (userAgent.indexOf('ipad')>1){ smaho=3; } function disp(evt){ var intY=evt.touches[0].pageY; var intX=evt.touches[0].pageX; if(evt.touches.length>1){ var intY1=evt.touches[1].pageY; var intX1=evt.touches[1].pageX; } if(evt.touches.length==1){ scrTop = document.getElementById("outframe").scrollTop; if(intYzik>intY){ if(imgSize*intKakudai*intWidth>scrTop){ if(smaho<3){ document.getElementById("outframe").scrollTop =scrTop+20; }else{ document.getElementById("outframe").scrollTop =scrTop+25; } } }else{ if(smaho<3){ document.getElementById("outframe").scrollTop =scrTop-20; }else{ document.getElementById("outframe").scrollTop =scrTop-25; } } intYzik=intY; } if(evt.touches.length==1){ scrLeft=document.getElementById("outframe").scrollLeft; if(intXzik1){ if(intYziks>intYs){ if(intKakudai>0.5){ intKakudai=intKakudai*0.98; scrTop = document.getElementById("outframe").scrollTop; document.getElementById("outframe").scrollTop=scrTop*0.98; var dcdiv1=document.getElementById('divdc1'); dcdiv1.style.backgroundSize=image_width1*intKakudai*intWidth+'px'; dcdiv1.style.height=image_height1*intKakudai*intWidth+'px'; dcdiv1.style.width=image_width1*intKakudai*intWidth+'px'; imgLoad1=1; if(imgLoad2>0){ var dcdiv2=document.getElementById('divdc2'); dcdiv2.style.backgroundSize=image_width2*intKakudai*intWidth+'px'; dcdiv2.style.height=image_height2*intKakudai*intWidth+'px'; dcdiv2.style.width=image_width2*intKakudai*intWidth+'px'; dcdiv2.style.top = ((image_height1)*intWidth*intKakudai)+(img_page*1)+'px'; imgLoad2=1; img_scroll_In(); scrollBar(); } if(imgLoad3>0){ var dcdiv3=document.getElementById('divdc3'); dcdiv3.style.backgroundSize=image_width3*intKakudai*intWidth+'px'; dcdiv3.style.height=image_height3*intKakudai*intWidth+'px'; dcdiv3.style.width=image_width3*intKakudai*intWidth+'px'; dcdiv3.style.top = ((image_height1+image_height2)*intWidth*intKakudai)+(img_page*2)+'px'; imgLoad3=1; img_scroll_In(); scrollBar(); } if(imgLoad4>0){ var dcdiv4=document.getElementById('divdc4'); dcdiv4.style.backgroundSize=image_width4*intKakudai*intWidth+'px'; dcdiv4.style.height=image_height4*intKakudai*intWidth+'px'; dcdiv4.style.width=image_width4*intKakudai*intWidth+'px'; dcdiv4.style.top = ((image_height1+image_height2+image_height3)*intWidth*intKakudai)+(img_page*3)+'px'; imgLoad4=1; img_scroll_In(); scrollBar(); } if(imgLoad5>0){ var dcdiv5=document.getElementById('divdc5'); dcdiv5.style.backgroundSize=image_width5*intKakudai*intWidth+'px'; dcdiv5.style.height=image_height5*intKakudai*intWidth+'px'; dcdiv5.style.width=image_width5*intKakudai*intWidth+'px'; dcdiv5.style.top = ((image_height1+image_height2+image_height3+image_height4)*intWidth*intKakudai)+(img_page*4)+'px'; imgLoad5=1; img_scroll_In(); scrollBar(); } if(imgLoad6>0){ var dcdiv6=document.getElementById('divdc6'); dcdiv6.style.backgroundSize=image_width6*intKakudai*intWidth+'px'; dcdiv6.style.height=image_height6*intKakudai*intWidth+'px'; dcdiv6.style.width=image_width6*intKakudai*intWidth+'px'; dcdiv6.style.top = ((image_height1+image_height2+image_height3+image_height4+image_height5)*intWidth*intKakudai)+(img_page*5)+'px'; imgLoad6=1; img_scroll_In(); scrollBar(); } if(imgLoad7>0){ var dcdiv7=document.getElementById('divdc7'); dcdiv7.style.backgroundSize=image_width7*intKakudai*intWidth+'px'; dcdiv7.style.height=image_height7*intKakudai*intWidth+'px'; dcdiv7.style.width=image_width7*intKakudai*intWidth+'px'; dcdiv7.style.top = ((image_height1+image_height2+image_height3+image_height4+image_height5+image_height6)*intWidth*intKakudai)+(img_page*6)+'px'; imgLoad7=1; img_scroll_In(); scrollBar(); } } }else{ if(intKakudai<5){ intKakudai=intKakudai*1.006; scrTop = document.getElementById("outframe").scrollTop; document.getElementById("outframe").scrollTop=scrTop*1.006; var dcdiv1=document.getElementById('divdc1'); dcdiv1.style.backgroundSize=image_width1*intKakudai*intWidth+'px'; dcdiv1.style.height=image_height1*intKakudai*intWidth+'px'; dcdiv1.style.width=image_width1*intKakudai*intWidth+'px'; imgLoad1=0; if(imgLoad2>0){ var dcdiv2=document.getElementById('divdc2'); dcdiv2.style.backgroundSize=image_width2*intKakudai*intWidth+'px'; dcdiv2.style.height=image_height2*intKakudai*intWidth+'px'; dcdiv2.style.width=image_width2*intKakudai*intWidth+'px'; dcdiv2.style.top = ((image_height1)*intWidth*intKakudai)+(img_page*1)+'px'; imgLoad2=1; img_scroll_In(); scrollBar(); } if(imgLoad3>0){ var dcdiv3=document.getElementById('divdc3'); dcdiv3.style.backgroundSize=image_width3*intKakudai*intWidth+'px'; dcdiv3.style.height=image_height3*intKakudai*intWidth+'px'; dcdiv3.style.width=image_width3*intKakudai*intWidth+'px'; dcdiv3.style.top = ((image_height1+image_height2)*intWidth*intKakudai)+(img_page*2)+'px'; imgLoad3=1; img_scroll_In(); scrollBar(); } if(imgLoad4>0){ var dcdiv4=document.getElementById('divdc4'); dcdiv4.style.backgroundSize=image_width4*intKakudai*intWidth+'px'; dcdiv4.style.height=image_height4*intKakudai*intWidth+'px'; dcdiv4.style.width=image_width4*intKakudai*intWidth+'px'; dcdiv4.style.top = ((image_height1+image_height2+image_height3)*intWidth*intKakudai)+(img_page*3)+'px'; imgLoad4=1; img_scroll_In(); scrollBar(); } if(imgLoad5>0){ var dcdiv5=document.getElementById('divdc5'); dcdiv5.style.backgroundSize=image_width5*intKakudai*intWidth+'px'; dcdiv5.style.height=image_height5*intKakudai*intWidth+'px'; dcdiv5.style.width=image_width5*intKakudai*intWidth+'px'; dcdiv5.style.top = ((image_height1+image_height2+image_height3+image_height4)*intWidth*intKakudai)+(img_page*4)+'px'; imgLoad5=1; img_scroll_In(); scrollBar(); } if(imgLoad6>0){ var dcdiv6=document.getElementById('divdc6'); dcdiv6.style.backgroundSize=image_width6*intKakudai*intWidth+'px'; dcdiv6.style.height=image_height6*intKakudai*intWidth+'px'; dcdiv6.style.width=image_width6*intKakudai*intWidth+'px'; dcdiv6.style.top = ((image_height1+image_height2+image_height3+image_height4+image_height5)*intWidth*intKakudai)+(img_page*5)+'px'; imgLoad6=1; img_scroll_In(); scrollBar(); } if(imgLoad7>0){ var dcdiv7=document.getElementById('divdc7'); dcdiv7.style.backgroundSize=image_width7*intKakudai*intWidth+'px'; dcdiv7.style.height=image_height7*intKakudai*intWidth+'px'; dcdiv7.style.width=image_width7*intKakudai*intWidth+'px'; dcdiv7.style.top = ((image_height1+image_height2+image_height3+image_height4+image_height5+image_height6)*intWidth*intKakudai)+(img_page*6)+'px'; imgLoad7=1; img_scroll_In(); scrollBar(); } } } if(intXziks>intXs){ if(intKakudai>0.5){ intKakudai=intKakudai*0.98; scrTop = document.getElementById("outframe").scrollTop; document.getElementById("outframe").scrollTop=scrTop*0.98; var dcdiv1=document.getElementById('divdc1'); dcdiv1.style.backgroundSize=image_width1*intKakudai*intWidth+'px'; dcdiv1.style.height=image_height1*intKakudai*intWidth+'px'; dcdiv1.style.width=image_width1*intKakudai*intWidth+'px'; imgLoad1=0; if(imgLoad2>0){ var dcdiv2=document.getElementById('divdc2'); dcdiv2.style.backgroundSize=image_width2*intKakudai*intWidth+'px'; dcdiv2.style.height=image_height2*intKakudai*intWidth+'px'; dcdiv2.style.width=image_width2*intKakudai*intWidth+'px'; dcdiv2.style.top = ((image_height1)*intWidth*intKakudai)+(img_page*1)+'px'; imgLoad2=1; img_scroll_In(); scrollBar(); } if(imgLoad3>0){ var dcdiv3=document.getElementById('divdc3'); dcdiv3.style.backgroundSize=image_width3*intKakudai*intWidth+'px'; dcdiv3.style.height=image_height3*intKakudai*intWidth+'px'; dcdiv3.style.width=image_width3*intKakudai*intWidth+'px'; dcdiv3.style.top = ((image_height1+image_height2)*intWidth*intKakudai)+(img_page*2)+'px'; imgLoad3=1; img_scroll_In(); scrollBar(); } if(imgLoad4>0){ var dcdiv4=document.getElementById('divdc4'); dcdiv4.style.backgroundSize=image_width4*intKakudai*intWidth+'px'; dcdiv4.style.height=image_height4*intKakudai*intWidth+'px'; dcdiv4.style.width=image_width4*intKakudai*intWidth+'px'; dcdiv4.style.top = ((image_height1+image_height2+image_height3)*intWidth*intKakudai)+(img_page*3)+'px'; imgLoad4=1; img_scroll_In(); scrollBar(); } if(imgLoad5>0){ var dcdiv5=document.getElementById('divdc5'); dcdiv5.style.backgroundSize=image_width5*intKakudai*intWidth+'px'; dcdiv5.style.height=image_height5*intKakudai*intWidth+'px'; dcdiv5.style.width=image_width5*intKakudai*intWidth+'px'; dcdiv5.style.top = ((image_height1+image_height2+image_height3+image_height4)*intWidth*intKakudai)+(img_page*4)+'px'; imgLoad5=1; img_scroll_In(); scrollBar(); } if(imgLoad6>0){ var dcdiv6=document.getElementById('divdc6'); dcdiv6.style.backgroundSize=image_width6*intKakudai*intWidth+'px'; dcdiv6.style.height=image_height6*intKakudai*intWidth+'px'; dcdiv6.style.width=image_width6*intKakudai*intWidth+'px'; dcdiv6.style.top = ((image_height1+image_height2+image_height3+image_height4+image_height5)*intWidth*intKakudai)+(img_page*5)+'px'; imgLoad6=1; img_scroll_In(); scrollBar(); } if(imgLoad7>0){ var dcdiv7=document.getElementById('divdc7'); dcdiv7.style.backgroundSize=image_width7*intKakudai*intWidth+'px'; dcdiv7.style.height=image_height7*intKakudai*intWidth+'px'; dcdiv7.style.width=image_width7*intKakudai*intWidth+'px'; dcdiv7.style.top = ((image_height1+image_height2+image_height3+image_height4+image_height5+image_height6)*intWidth*intKakudai)+(img_page*6)+'px'; imgLoad7=1; img_scroll_In(); scrollBar(); } } }else{ if(intKakudai<2){ intKakudai=intKakudai*1.006; scrTop = document.getElementById("outframe").scrollTop; document.getElementById("outframe").scrollTop=scrTop*1.006; var dcdiv1=document.getElementById('divdc1'); dcdiv1.style.backgroundSize=image_width1*intKakudai*intWidth+'px'; dcdiv1.style.height=image_height1*intKakudai*intWidth+'px'; dcdiv1.style.width=image_width1*intKakudai*intWidth+'px'; imgLoad1=0; if(imgLoad2>0){ var dcdiv2=document.getElementById('divdc2'); dcdiv2.style.backgroundSize=image_width2*intKakudai*intWidth+'px'; dcdiv2.style.height=image_height2*intKakudai*intWidth+'px'; dcdiv2.style.width=image_width2*intKakudai*intWidth+'px'; dcdiv2.style.top = ((image_height1)*intWidth*intKakudai)+(img_page*1)+'px'; imgLoad2=1; img_scroll_In(); scrollBar(); } if(imgLoad3>0){ var dcdiv3=document.getElementById('divdc3'); dcdiv3.style.backgroundSize=image_width3*intKakudai*intWidth+'px'; dcdiv3.style.height=image_height3*intKakudai*intWidth+'px'; dcdiv3.style.width=image_width3*intKakudai*intWidth+'px'; dcdiv3.style.top = ((image_height1+image_height2)*intWidth*intKakudai)+(img_page*2)+'px'; imgLoad3=1; img_scroll_In(); scrollBar(); } if(imgLoad4>0){ var dcdiv4=document.getElementById('divdc4'); dcdiv4.style.backgroundSize=image_width4*intKakudai*intWidth+'px'; dcdiv4.style.height=image_height4*intKakudai*intWidth+'px'; dcdiv4.style.width=image_width4*intKakudai*intWidth+'px'; dcdiv4.style.top = ((image_height1+image_height2+image_height3)*intWidth*intKakudai)+(img_page*3)+'px'; imgLoad4=1; img_scroll_In(); scrollBar(); } if(imgLoad5>0){ var dcdiv5=document.getElementById('divdc5'); dcdiv5.style.backgroundSize=image_width5*intKakudai*intWidth+'px'; dcdiv5.style.height=image_height5*intKakudai*intWidth+'px'; dcdiv5.style.width=image_width5*intKakudai*intWidth+'px'; dcdiv5.style.top = ((image_height1+image_height2+image_height3+image_height4)*intWidth*intKakudai)+(img_page*4)+'px'; imgLoad5=1; img_scroll_In(); scrollBar(); } if(imgLoad6>0){ var dcdiv6=document.getElementById('divdc6'); dcdiv6.style.backgroundSize=image_width6*intKakudai*intWidth+'px'; dcdiv6.style.height=image_height6*intKakudai*intWidth+'px'; dcdiv6.style.width=image_width6*intKakudai*intWidth+'px'; dcdiv6.style.top = ((image_height1+image_height2+image_height3+image_height4+image_height5)*intWidth*intKakudai)+(img_page*5)+'px'; imgLoad6=1; img_scroll_In(); scrollBar(); } if(imgLoad7>0){ var dcdiv7=document.getElementById('divdc7'); dcdiv7.style.backgroundSize=image_width7*intKakudai*intWidth+'px'; dcdiv7.style.height=image_height7*intKakudai*intWidth+'px'; dcdiv7.style.width=image_width7*intKakudai*intWidth+'px'; dcdiv7.style.top = ((image_height1+image_height2+image_height3+image_height4+image_height5+image_height6)*intWidth*intKakudai)+(img_page*6)+'px'; imgLoad7=1; img_scroll_In(); scrollBar(); } } } // // } intXzik1=intX1; intYzik1=intY1; intXzik=intX; intYzik=intY; } window.document.addEventListener("touchstart",disp,false); window.document.addEventListener("touchmove",disp,false); window.document.addEventListener("touchend",disp,false); window.addEventListener("touchend",function(evt){ img_scroll_In(); scrollBar(); },false);