// Copyright (c) 2000-2005 Unidocs. All rights reserved.
function moveRLeft(pageno,nextPos){clearTimeout(er);nextPos+=movingPixelSize;if(nextPos>=f){var lm=m;if(o==r){hideLayer(LeftTopImgLayer);LeftBottomImg.style.width=f;LeftBottomImg.style.left=leftPageStartPos_x;LeftBottomImgLayer.style.width=f;LeftBottomImgLayer.style.left=leftPageStartPos_x;LeftTopImg.style.left=leftPageStartPos_x;LeftTopImg.style.width=f;LeftTopImgLayer.style.left=leftPageStartPos_x;LeftTopImgLayer.style.width=f;LeftTopImgLayer.style.height=z;o=u;m=v[PAGE_LEFT][r]}else if(o==u){hideLayer(LeftBottomImgLayer);LeftTopImg.style.left=leftPageStartPos_x;LeftTopImg.style.width=f;LeftTopImgLayer.style.left=leftPageStartPos_x;LeftTopImgLayer.style.width=f;LeftBottomImg.style.left=leftPageStartPos_x;LeftBottomImg.style.width=f;LeftBottomImgLayer.style.left=leftPageStartPos_x;LeftBottomImgLayer.style.width=f;LeftBottomImgLayer.style.height=z;o=r;m=v[PAGE_LEFT][u]}if(gd)ac(CenterSeparatorLayer);pb(lm);changeImg(printWhich);}else{if(o==r){LeftBottomImg.style.left=leftPageStartPos_x+f-nextPos;LeftBottomImg.style.width=nextPos;LeftBottomImgLayer.style.left=leftPageStartPos_x+f-nextPos;LeftBottomImgLayer.style.width=nextPos;}else if(o==u){LeftTopImg.style.left=leftPageStartPos_x+f-nextPos;LeftTopImg.style.width=nextPos;LeftTopImgLayer.style.left=leftPageStartPos_x+f-nextPos;LeftTopImgLayer.style.width=nextPos;}setTimeout("moveRLeft("+pageno+","+nextPos+")",dt);}}function moveRRight(pageno,nextPos){nextPos-=movingPixelSize;clearTimeout(er);if(nextPos<=0){if(o==u){hideLayer(RightBottomImgLayer);ac(LeftTopImgLayer);RightBottomImg.style.left=rightPageStartPos_x;RightBottomImg.style.width=f;RightBottomImgLayer.style.left=rightPageStartPos_x;RightBottomImgLayer.style.width=f;RightBottomImgLayer.style.height=z;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);ac(LeftBottomImgLayer);RightTopImg.style.left=rightPageStartPos_x;RightTopImg.style.width=f;RightTopImgLayer.style.left=rightPageStartPos_x;RightTopImgLayer.style.width=f;RightTopImgLayer.style.height=z;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(v[PAGE_LEFT][o]!=db-1){if(gd)ac(CenterSeparatorLayer);}moveRLeft(pageno+1,0);}else{if(o==u){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;}er=setTimeout("moveRRight("+pageno+","+nextPos+")",dt);}}function moveLRight(pageno,nextPos){clearTimeout(er);nextPos+=movingPixelSize;if(nextPos>f){var lm=m;if(o==r){hideLayer(RightTopImgLayer);RightBottomImg.style.width=f;RightBottomImg.style.left=rightPageStartPos_x;RightBottomImgLayer.style.width=f;RightBottomImgLayer.style.left=rightPageStartPos_x;RightTopImg.style.left=rightPageStartPos_x;RightTopImg.style.width=f;RightTopImgLayer.style.left=rightPageStartPos_x;RightTopImgLayer.style.width=f;o=u;m=v[PAGE_LEFT][r]}else if(o==u){hideLayer(RightBottomImgLayer);RightTopImg.style.width=f;RightTopImg.style.left=rightPageStartPos_x;RightTopImgLayer.style.width=f;RightTopImgLayer.style.left=rightPageStartPos_x;RightBottomImg.style.left=rightPageStartPos_x;RightBottomImg.style.width=f;RightBottomImgLayer.style.left=rightPageStartPos_x;RightBottomImgLayer.style.width=f;o=r;m=v[PAGE_LEFT][u]}if(gd)ac(CenterSeparatorLayer);pb(lm);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==u){RightTopImgLayer.style.left=rightPageStartPos_x;RightTopImgLayer.style.width=nextPos;RightTopImg.style.left=rightPageStartPos_x;RightTopImg.style.width=nextPos;}er=setTimeout("moveLRight("+pageno+","+nextPos+")",dt);}}function pb(pageno){ec=0;dl=false;var fi=af-1;if(pageno<=0)ah(BGLayer_LeftPage);else if(pageno==fi)ah(BGLayer_RightPage);if(m<0){hideLayer(CenterSeparatorLayer);ah(BGLayer_RightPage);hideTag(BGLayer_LeftPage);jw();m=-1}else if(m==fi){hideTag(BGLayer_RightPage);hideLayer(CenterSeparatorLayer);ry();}}function moveLLeft(pageno,nextPos){clearTimeout(er);nextPos-=movingPixelSize;if(nextPos<=0){if(o==u){hideLayer(LeftBottomImgLayer);ac(RightTopImgLayer);LeftBottomImg.style.left=leftPageStartPos_x;LeftBottomImg.style.width=f;LeftBottomImgLayer.style.left=leftPageStartPos_x;LeftBottomImgLayer.style.width=f;LeftBottomImgLayer.style.height=z;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);ac(RightBottomImgLayer);LeftTopImg.style.left=leftPageStartPos_x;LeftTopImg.style.width=f;LeftTopImgLayer.style.left=leftPageStartPos_x;LeftTopImgLayer.style.width=f;LeftTopImgLayer.style.height=z;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==u){LeftBottomImg.style.left=leftPageStartPos_x+f-nextPos;LeftBottomImg.style.width=nextPos;LeftBottomImgLayer.style.left=leftPageStartPos_x+f-nextPos;LeftBottomImgLayer.style.width=nextPos;}else if(o==r){LeftTopImg.style.left=leftPageStartPos_x+f-nextPos;LeftTopImg.style.width=nextPos;LeftTopImgLayer.style.left=leftPageStartPos_x+f-nextPos;LeftTopImgLayer.style.width=nextPos;}er=setTimeout("moveLLeft("+pageno+","+nextPos+")",dt);}}function openBookFold(ii,pageno){ii+=50;clearTimeout(openBookFoldTimer);if(ii>rightPageStartPos_x){fz();movePage(PAGE_DIRECTION_RIGHT,pageno);}else{if(o==u)RightBottomImgLayer.style.left=ii;else if(o==r)RightTopImgLayer.style.left=ii;openBookFoldTimer=setTimeout("openBookFold("+ii+","+pageno+")",50);}}function ou(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){ac(RightBottomImgLayer);}else{if(pageno1==0)hideLayer(BGLayer);ac(RightTopImgLayer);}}else{if(o==r)ac(LeftBottomImgLayer);else ac(LeftTopImgLayer);}if(gd)ac(CenterSeparatorLayer);}if(o==r){LeftBottomImg.style.width=f;LeftBottomImg.style.height=z;RightBottomImg.style.width=f;RightBottomImg.style.height=z}else if(o==u){LeftTopImg.style.width=f;LeftTopImg.style.height=z;RightTopImg.style.width=f;RightTopImg.style.height=z}}