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; } }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(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; } }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; } } // // } 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);