// Copyright (c) 2000-2005 Unidocs. All rights reserved.
function moveRLeft(pageno,nextPos){clearTimeout(ey);nextPos+=movingPixelSize;if(nextPos>=g){var mn=m;if(o==r){hideLayer(LeftTopImgLayer);LeftBottomImg.style.width=g;LeftBottomImg.style.left=leftPageStartPos_x;LeftBottomImgLayer.style.width=g;LeftBottomImgLayer.style.left=leftPageStartPos_x;LeftTopImg.style.left=leftPageStartPos_x;LeftTopImg.style.width=g;LeftTopImgLayer.style.left=leftPageStartPos_x;LeftTopImgLayer.style.width=g;LeftTopImgLayer.style.height=u;o=v;m=z[PAGE_LEFT][r]}else if(o==v){hideLayer(LeftBottomImgLayer);LeftTopImg.style.left=leftPageStartPos_x;LeftTopImg.style.width=g;LeftTopImgLayer.style.left=leftPageStartPos_x;LeftTopImgLayer.style.width=g;LeftBottomImg.style.left=leftPageStartPos_x;LeftBottomImg.style.width=g;LeftBottomImgLayer.style.left=leftPageStartPos_x;LeftBottomImgLayer.style.width=g;LeftBottomImgLayer.style.height=u;o=r;m=z[PAGE_LEFT][v]}if(gu)ab(CenterSeparatorLayer);qm(mn);changeImg(printWhich);}else{if(o==r){LeftBottomImg.style.left=leftPageStartPos_x+g-nextPos;LeftBottomImg.style.width=nextPos;LeftBottomImgLayer.style.left=leftPageStartPos_x+g-nextPos;LeftBottomImgLayer.style.width=nextPos;}else if(o==v){LeftTopImg.style.left=leftPageStartPos_x+g-nextPos;LeftTopImg.style.width=nextPos;LeftTopImgLayer.style.left=leftPageStartPos_x+g-nextPos;LeftTopImgLayer.style.width=nextPos;}setTimeout("moveRLeft("+pageno+","+nextPos+")",ec);}}function moveRRight(pageno,nextPos){nextPos-=movingPixelSize;clearTimeout(ey);if(nextPos<=0){if(o==v){hideLayer(RightBottomImgLayer);ab(LeftTopImgLayer);RightBottomImg.style.left=rightPageStartPos_x;RightBottomImg.style.width=g;RightBottomImgLayer.style.left=rightPageStartPos_x;RightBottomImgLayer.style.width=g;RightBottomImgLayer.style.height=u;LeftBottomImgLayer.style.zIndex=2;LeftTopImgLayer.style.zIndex=5;RightBottomImgLayer.style.zIndex=6;RightTopImgLayer.style.zIndex=8;LeftTopImgLayer.style.left=rightPageStartPos_x-8;LeftTopImgLayer.style.width=1}else if(o==r){hideLayer(RightTopImgLayer);ab(LeftBottomImgLayer);RightTopImg.style.left=rightPageStartPos_x;RightTopImg.style.width=g;RightTopImgLayer.style.left=rightPageStartPos_x;RightTopImgLayer.style.width=g;RightTopImgLayer.style.height=u;LeftTopImgLayer.style.zIndex=2;LeftBottomImgLayer.style.zIndex=5;RightBottomImgLayer.style.zIndex=8;RightTopImgLayer.style.zIndex=6;LeftBottomImgLayer.style.left=rightPageStartPos_x-8;LeftBottomImgLayer.style.width=1}if(z[PAGE_LEFT][o]!=cp-1){if(gu)ab(CenterSeparatorLayer);}moveRLeft(pageno+1,0);}else{if(o==v){RightBottomImg.style.left=leftPageStartPos_x+nextPos;RightBottomImg.style.width=nextPos;RightBottomImgLayer.style.width=nextPos;}else if(o==r){RightTopImg.style.left=leftPageStartPos_x+nextPos;RightTopImg.style.width=nextPos;RightTopImgLayer.style.width=nextPos;}ey=setTimeout("moveRRight("+pageno+","+nextPos+")",ec);}}function moveLRight(pageno,nextPos){clearTimeout(ey);nextPos+=movingPixelSize;if(nextPos>g){var mn=m;if(o==r){hideLayer(RightTopImgLayer);RightBottomImg.style.width=g;RightBottomImg.style.left=rightPageStartPos_x;RightBottomImgLayer.style.width=g;RightBottomImgLayer.style.left=rightPageStartPos_x;RightTopImg.style.left=rightPageStartPos_x;RightTopImg.style.width=g;RightTopImgLayer.style.left=rightPageStartPos_x;RightTopImgLayer.style.width=g;o=v;m=z[PAGE_LEFT][r]}else if(o==v){hideLayer(RightBottomImgLayer);RightTopImg.style.width=g;RightTopImg.style.left=rightPageStartPos_x;RightTopImgLayer.style.width=g;RightTopImgLayer.style.left=rightPageStartPos_x;RightBottomImg.style.left=rightPageStartPos_x;RightBottomImg.style.width=g;RightBottomImgLayer.style.left=rightPageStartPos_x;RightBottomImgLayer.style.width=g;o=r;m=z[PAGE_LEFT][v]}if(gu)ab(CenterSeparatorLayer);qm(mn);changeImg(printWhich);}else{if(o==r){RightBottomImg.style.left=rightPageStartPos_x;RightBottomImg.style.width=nextPos;RightBottomImgLayer.style.left=rightPageStartPos_x;RightBottomImgLayer.style.width=nextPos;}else if(o==v){RightTopImgLayer.style.left=rightPageStartPos_x;RightTopImgLayer.style.width=nextPos;RightTopImg.style.left=rightPageStartPos_x;RightTopImg.style.width=nextPos;}ey=setTimeout("moveLRight("+pageno+","+nextPos+")",ec);}}function qm(pageno){ej=0;dq=false;var fw=af-1;if(pageno<=0)ae(BGLayer_LeftPage);else if(pageno==fw)ae(BGLayer_RightPage);if(m<0){hideLayer(CenterSeparatorLayer);ae(BGLayer_RightPage);hideTag(BGLayer_LeftPage);ky();m=-1}else if(m==fw){hideTag(BGLayer_RightPage);hideLayer(CenterSeparatorLayer);tl();}}function moveLLeft(pageno,nextPos){clearTimeout(ey);nextPos-=movingPixelSize;if(nextPos<=0){if(o==v){hideLayer(LeftBottomImgLayer);ab(RightTopImgLayer);LeftBottomImg.style.left=leftPageStartPos_x;LeftBottomImg.style.width=g;LeftBottomImgLayer.style.left=leftPageStartPos_x;LeftBottomImgLayer.style.width=g;LeftBottomImgLayer.style.height=u;RightBottomImgLayer.style.zIndex=2;RightTopImgLayer.style.zIndex=3;LeftBottomImgLayer.style.zIndex=4;LeftTopImgLayer.style.zIndex=6;RightTopImgLayer.style.left=rightPageStartPos_x;RightTopImgLayer.style.width=1}else if(o==r){hideLayer(LeftTopImgLayer);ab(RightBottomImgLayer);LeftTopImg.style.left=leftPageStartPos_x;LeftTopImg.style.width=g;LeftTopImgLayer.style.left=leftPageStartPos_x;LeftTopImgLayer.style.width=g;LeftTopImgLayer.style.height=u;RightBottomImgLayer.style.zIndex=3;RightTopImgLayer.style.zIndex=2;LeftBottomImgLayer.style.zIndex=6;LeftTopImgLayer.style.zIndex=4;RightBottomImgLayer.style.left=rightPageStartPos_x;RightBottomImgLayer.style.width=1}moveLRight(pageno-1,0);}else{if(o==v){LeftBottomImg.style.left=leftPageStartPos_x+g-nextPos;LeftBottomImg.style.width=nextPos;LeftBottomImgLayer.style.left=leftPageStartPos_x+g-nextPos;LeftBottomImgLayer.style.width=nextPos;}else if(o==r){LeftTopImg.style.left=leftPageStartPos_x+g-nextPos;LeftTopImg.style.width=nextPos;LeftTopImgLayer.style.left=leftPageStartPos_x+g-nextPos;LeftTopImgLayer.style.width=nextPos;}ey=setTimeout("moveLLeft("+pageno+","+nextPos+")",ec);}}function openBookFold(ja,pageno){ja+=50;clearTimeout(openBookFoldTimer);if(ja>rightPageStartPos_x){gq();movePage(PAGE_DIRECTION_RIGHT,pageno);}else{if(o==v)RightBottomImgLayer.style.left=ja;else if(o==r)RightTopImgLayer.style.left=ja;openBookFoldTimer=setTimeout("openBookFold("+ja+","+pageno+")",50);}}function qh(pageno1,pageno2,pageDirection){var leftPageno=af-1;if(pageno1<0||pageno2>leftPageno){if(pageDirection==PAGE_DIRECTION_LEFT){hideTag(BGLayer_LeftPage);hideTag(BGLayer_RightPage);}else hideTag(BGLayer_RightPage);if(pageDirection==PAGE_DIRECTION_RIGHT){if(o==r)hideLayer(RightBottomImgLayer);else hideLayer(RightTopImgLayer);}else{if(o==r)hideLayer(LeftBottomImgLayer);else hideLayer(LeftTopImgLayer);}hideLayer(CenterSeparatorLayer);}else{if(pageDirection==PAGE_DIRECTION_RIGHT){if(o==r){ab(RightBottomImgLayer);}else{if(pageno1==0)hideLayer(BGLayer);ab(RightTopImgLayer);}}else{if(o==r)ab(LeftBottomImgLayer);else ab(LeftTopImgLayer);}if(gu)ab(CenterSeparatorLayer);}if(o==r){LeftBottomImg.style.width=g;LeftBottomImg.style.height=u;RightBottomImg.style.width=g;RightBottomImg.style.height=u}else if(o==v){LeftTopImg.style.width=g;LeftTopImg.style.height=u;RightTopImg.style.width=g;RightTopImg.style.height=u}}