Вы находитесь на странице: 1из 10

var defaultViewManager="scroll";var adjacentLoadPages=3;var adjacentFontLoadPage s=8;var ie6_pngfix_shim="/images/4gen/trans_1x1.gif";var pagePadding=30;var extr asWidth=315;var fontLoaderStrategy;var FONT_LOADER_EOT=1;var FONT_LOADER_CSS_TTF =2;var FONT_LOADER_MULTI_SVG=3;var FONT_SERV_VERSION=12;if(!window.

console){wind ow.console={log:function(){}}}var DocumentManager=(function(){var r={_keyStr:"AB CDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",decode:function (J){var H="";var Q,O,M;var P,N,L,K;var I=0;J=J.replace(/[^A-Za-z0-9\+\/\=]/g,"") ;while(I<J.length){P=this._keyStr.indexOf(J.charAt(I++));N=this._keyStr.indexOf( J.charAt(I++));L=this._keyStr.indexOf(J.charAt(I++));K=this._keyStr.indexOf(J.ch arAt(I++));Q=(P<<2)|(N>>4);O=((N&15)<<4)|(L>>2);M=((L&3)<<6)|K;H=H+String.fromCh arCode(Q);if(L!=64){H=H+String.fromCharCode(O)}if(K!=64){H=H+String.fromCharCode (M)}}H=r._utf8_decode(H);return H},_utf8_decode:function(H){var I="";var K=0;var M=0;var L=0;var J=0;while(K<H.length){M=H.charCodeAt(K);if(M<128){I+=String.fro mCharCode(M);K++}else{if((M>191)&&(M<224)){J=H.charCodeAt(K+1);I+=String.fromCha rCode(((M&31)<<6)|(J&63));K+=2}else{J=H.charCodeAt(K+1);c3=H.charCodeAt(K+2);I+= String.fromCharCode(((M&15)<<12)|((J&63)<<6)|(c3&63));K+=3}}}return I}};function j(H){}j.prototype.initEventHelper=function(){this.eventListenerEnabled=true;thi s.eventListeners={};for(var H=0;H<this.possibleEvents.length;H++){this.eventList eners[this.possibleEvents[H]]={}}};j.prototype.addEvent=function(H,I){if(!this.e ventListeners[H]){throw H+" is not a valid type of event"}if(!this.eventListener s[H].next_uid){this.eventListeners[H].next_uid=1}if(!I._event_listener_uid){I._e vent_listener_uid=this.eventListeners[H].next_uid;this.eventListeners[H].next_ui d++}this.eventListeners[H][I._event_listener_uid]=I};j.prototype.removeEvent=fun ction(H,I){delete this.eventListeners[H][I._event_listener_uid]};j.prototype.fir eEvent=function(K,L){if(!this.eventListenerEnabled){return}var H=this.eventListe ners[K];var I=[];if(arguments.length>1){I[arguments.length-2]=null;for(var M=1;M <arguments.length;M++){I[M-1]=arguments[M]}}var J=this;function N(P){P.apply(J,I )}for(var O in H){if(O!="next_uid"&&H.hasOwnProperty(O)){N(H[O])}}};function p(I ,H){I.prototype.addEvent=j.prototype.addEvent;I.prototype.removeEvent=j.prototyp e.removeEvent;I.prototype.fireEvent=j.prototype.fireEvent;I.prototype.initEventH elper=j.prototype.initEventHelper;I.prototype.possibleEvents=H}var k="font_prelo ad_bed";var d="\uF8FF";var G=function(){return !document.styleSheets[0].insertRu le};var s=function(H,I){if(G()){var J=H.innerHTML;H.href=I;if(H.innerHTML!=J){H. innerHTML=J}}else{H.href=I}};var i=(function(){var H=navigator.userAgent.toLower Case();return H.search("android 2.2")>-1})();var e=(function(){var H=navigator.u serAgent.toLowerCase();return(H.search("mobile")>-1&&H.search("safari")>-1&&!i)} )();var A=navigator.userAgent.indexOf("AppleWebKit/")>-1;fontLoaderStrategy=(fun ction(){if(G()){return FONT_LOADER_EOT}else{if(e){return FONT_LOADER_CSS_TTF}els e{return FONT_LOADER_CSS_TTF}}})();if(G()){adjacentFontLoadPages=5;adjacentLoadP ages=2}if(i){adjacentFontLoadPages=1;adjacentLoadPages=1}function E(M,K,I,L,J,H) {this.id=M;this.shortstyle=K;this.family=I;this.fallback=L;this.weight=J;this.st yle=H}E.prototype.eotCssRule=function(H){var I="src: url("+H+this.family+".eot); font-family: "+this.family+"; font-weight: "+this.weight+"; font-style: "+this. style;return"@font-face {"+I+"}"};E.prototype.ttfCssRule=function(H){var I="src: url("+H+this.family+".ttf) format('truetype'); font-family: "+this.family+"; fo nt-weight: "+this.weight+"; font-style: "+this.style;return"@font-face {"+I+"}"} ;E.prototype.svgCssRule=function(H){var I="src: url("+H+"#"+this.family+") forma t('svg'); font-family: "+this.family+"; font-weight: "+this.weight+"; font-style : "+this.style;return"@font-face {"+I+"}"};E.prototype.createPreloadElem=functio n(){return"<span style='font-family: "+this.family+"'>scribd.</span> "};function B(H){this.fonts=[];this.docManager=H;this._cssRuleQueue=[];this._fontLoadQueue= []}B.prototype._makeNewStyleBlock=function(){var I=document.createElement("style ");if(!window.createPopup){I.appendChild(document.createTextNode(""))}var H=docu ment.getElementsByTagName("head")[0];H.appendChild(I);return I};B.prototype._ins ertCssRule=function(H){this._cssRuleQueue.push(H)};B.prototype._flushCssRuleQueu e=function(J){if(this._cssRuleQueue.length>0){var I=(J&&document.getElementById( J))||this._makeNewStyleBlock();var H=this._cssRuleQueue.join("\n");if(G()){I.sty leSheet.cssText=H}else{if(!window.createPopup){I.appendChild(document.createText Node(H))}else{I.innerHTML=H}}this._cssRuleQueue=[]}};B.prototype.getFontAggregat orHostForFonts=function(K){var J=[];for(var I=0;I<K.length;I++){J.push(K[I].shor

tstyle+K[I].id)}J.sort();var H=this.docManager.nextFontAggregatorHost()+"/"+this .docManager.assetPrefix+"/"+J.join(",")+"/"+FONT_SERV_VERSION+"/";switch(fontLoa derStrategy){case FONT_LOADER_EOT:break;case FONT_LOADER_CSS_TTF:if(!i){H+="ttfs .css"}break;case FONT_LOADER_MULTI_SVG:H+="fonts.svg";break}return H};B.prototyp e._addTTFRules=function(K,I){for(var J=0;J<K.length;J++){var H=K[J];this._insert CssRule(H.ttfCssRule(I))}};B.prototype._addSVGRules=function(K,I){for(var J=0;J< K.length;J++){var H=K[J];this._insertCssRule(H.svgCssRule(I))}};B.prototype._add EOTRules=function(K,I){for(var J=0;J<K.length;J++){var H=K[J];this._insertCssRul e(H.eotCssRule(I))}};B.prototype._nextPreloadId=function(){if(!this._preloadId){ this._preloadId=0}var H="preload_bed"+this._preloadId;this._preloadId+=1;return H};B.prototype._addCSSWebkit=function(O,I){var R=this;var L=document.createEleme nt("iframe");function S(){var T=document.createElement("div");var U=R._nextPrelo adId();T.innerHTML=P;var V=document.getElementById(k);var W=window.setInterval(f unction(){if(L.contentDocument.styleSheets.length>0){window.clearInterval(W);L.c ontentDocument.body.getBoundingClientRect();V.appendChild(T);window.setTimeout(f unction(){L.contentDocument.body.getBoundingClientRect();R._addCSSLink(I)},500)} },0)}var Q=this._nextPreloadId();L.id=Q;var P="";for(var K=0;K<O.length;K++){var H=O[K];P+=H.createPreloadElem()}var J=this._makeNewStyleBlock();L.addEventListe ner("load",function(){S()},false);L.style.display="none";document.body.appendChi ld(L);L.contentDocument.body.innerHTML=P;var N=L.contentDocument.createElement(" link");N.href=I;N.rel="stylesheet";N.type="text/css";N.media="screen";var M=L.co ntentDocument.getElementsByTagName("head")[0];M.appendChild(N)};B.prototype._add CSSLink=function(H){var J=document.createElement("link");J.href=H;J.rel="stylesh eet";J.type="text/css";var I=document.getElementsByTagName("head")[0];I.appendCh ild(J)};B.prototype.flushFontQueue=function(){if(this._fontLoadQueue.length===0) {return}if(this.docManager.displayType=="rasterize"){return}var H=this._fontLoad Queue;this._fontLoadQueue=[];var I=this.getFontAggregatorHostForFonts(H);switch( fontLoaderStrategy){case FONT_LOADER_EOT:this._addEOTRules(H,I);break;case FONT_ LOADER_CSS_TTF:if(i){this._addTTFRules(H,I)}else{if(A){this._addCSSWebkit(H,I)}e lse{this._addCSSLink(I)}}break;case FONT_LOADER_MULTI_SVG:this._addSVGRules(H,I) ;break}this._flushCssRuleQueue()};B.prototype.addFontToQueue=function(I){var H=t his.fonts[I];if(!H._loadQueued){H._loadQueued=true;this._fontLoadQueue.push(H)}} ;B.prototype.addFont=function(N,L,J,M,K,I){var H=new E(N,L,J,M,K,I);this.fonts[N ]=H};B.prototype.setNumFonts=function(H){for(var I=0;I<H;I++){this.fonts[I]=new E(I,"","ff"+I,"sans-serif","normal","normal")}};B.prototype._initHidersCSS=funct ion(){var H=[];for(var I=0;I<this.fonts.length;I++){H.push("."+this.fonts[I].fam ily)}this._insertCssRule(H.join(", ")+" {display: none;}\n")};B.prototype._initF amilyCSS=function(){for(var I=0;I<this.fonts.length;I++){var K=this.fonts[I].fam ily;var M=this.fonts[I].fallback;var L=this.fonts[I].weight;var J=this.fonts[I]. style;var H="div."+K+" span";if(typeof(scribd)!=="undefined"&&typeof(scribd.embe d_div_id)!=="undefined"){H="#"+scribd.embed_div_id+" "+H}if(G()){this._insertCss Rule(H+" {font-family: "+K+" !important;\n}")}else{this._insertCssRule(H+" {font -family: "+K+", "+M+"; font-weight: "+L+"; font-style: "+J+";\n}")}}};B.prototyp e.initStyles=function(H){if(this.docManager.displayType=="rasterize"){return}thi s._initFamilyCSS();switch(fontLoaderStrategy){case FONT_LOADER_EOT:break;case FO NT_LOADER_CSS_TTF:if(!i){this._initHidersCSS()}break;case FONT_LOADER_MULTI_SVG: break}this._flushCssRuleQueue("preload_styler")};B.prototype.setupTestElements=f unction(){if(fontLoaderStrategy!=FONT_LOADER_CSS_TTF||A||this.docManager.display Type=="rasterize"){return}var K="";for(var J=0;J<this.fonts.length;J++){var H=th is.fonts[J];K+=H.createPreloadElem()}var I=document.getElementById(k);I.innerHTM L=K;document.body.appendChild(I);this._insertCssRule("#"+k+" span {display: bloc k; visibility: hidden}");this._flushCssRuleQueue()};function a(H,I){this.pages=[ ];this.loaded=false;this.fonts={};this.numFonts=0;this.fontLoader=I;this.groupNu m=H||0}a.prototype.addPage=function(J){for(var I=0;I<J.fonts.length;I++){var H=J .fonts[I];if(this.fonts[H]===undefined){this.fonts[H]=true;this.numFonts+=1}}thi s.pages.push(J)};a.prototype.isFull=function(){var J=this.pages.length;var I=thi s.groupNum;var H=this.numFonts;if(fontLoaderStrategy==FONT_LOADER_EOT){return(th is.hasLoaded||H>50||(H>=20&&((I===0&&J>=adjacentFontLoadPages+3)||(J>=15))))}els e{if(fontLoaderStrategy==FONT_LOADER_MULTI_SVG||i){return(this.hasLoaded||(H>=5& &J>=adjacentFontLoadPages))}else{return(this.hasLoaded||H>100||(H>=20&&((I===0&&

J>=adjacentFontLoadPages+3)||(J>=100))))}}};a.prototype.load=function(I){if(this .hasLoaded){return}this.hasLoaded=true;var H=this;function J(){for(var K in H.fo nts){if(H.fonts.hasOwnProperty(K)){H.fontLoader.addFontToQueue(K)}}H.fontLoader. flushFontQueue()}if(I){window.setTimeout(function(){J()},I)}else{J()}};a.prototy pe.newNextGroup=function(){return new a(this.groupNum+1,this.fontLoader)};var t= 1;var D=2;var b=3;var C=4;var v=(function(){if(document.documentElement.style.We bkitTransform!==undefined){return t}else{if(document.documentElement.style.MozTr ansform!==undefined){return D}else{if(document.documentElement.style.OTransform! ==undefined){return C}else{return b}}}})();function o(K){for(var I in this._defa ultParams){if(this._defaultParams.hasOwnProperty(I)){this[I]=K[I]||this._default Params[I]}}for(var H=0;H<this._requiredParams.length;H++){var J=this._requiredPa rams[H];if(!this[J]){throw"Missing required Page param: "+J}}if(!this.contentUrl &&!this.innerPageElem){throw"Must initialize a page with either a contentUrl or innerPageElem element"}if(this.containerElem.boundToPageObj===true){throw"Contai ner Elem is already bound to a page. We shouldn't get here"}this.containerElem. boundToPageObj=true;this._targetWidth=null;this._innerPageVisible=!!this.innerPa geElem;this._imagesTurnedOn=false;this.boundingRect=null;this.isVisible=false;th is.displayDirty=true;this.displayOn=null;this.loadHasStarted=!!this.innerPageEle m}o.prototype._defaultParams={containerElem:null,innerPageElem:null,contentUrl:n ull,origWidth:null,origHeight:null,fonts:null,docManager:null,pageNum:null};o.pr ototype._requiredParams=["origWidth","origHeight","fonts","docManager","containe rElem","pageNum"];o.prototype._updateBoundingRect=function(){var M,L,K,I;if(this .containerElem.getBoundingClientRect){var J=this.containerElem.getBoundingClient Rect();var H=this.docManager.viewportManager.viewRect;L=J.left+H.left;M=J.top+H. top;K=J.right-J.left;I=J.bottom-J.top;this.boundingRect={left:L,top:M,bottom:M+I ,right:L+K,width:K,height:I}}else{M=this.containerElem.offsetTop;L=this.containe rElem.offsetLeft;K=this.containerElem.offsetWidth;I=this.containerElem.offsetHei ght;this.boundingRect={left:L,top:M,bottom:M+I,right:L+K,width:K,height:I}}};o.p rototype._setContainerContents=function(J){var I=/<noscript *><img[^<>]*\/><\/no script *>/g;this.containerElem.innerHTML=J.replace(I,"")+this.containerElem.inne rHTML;var H=this;this.innerPageElem=this.containerElem.children[0];this.turnOnLi nks();this.turnOnImages();this.fixSVGFonts();this.displayDirty=true;if(this.disp layOn){this.display()}else{this.hide()}};o.prototype.fixSVGFonts=function(){if(t his._svgFontsFixed){throw"Already fixed the svg fonts"}if(!this.innerPageElem){r eturn}if(e){var I=function(M){if(M.nodeType==document.TEXT_NODE){var J=M.textCon tent.search(/[ \n][^ \n ]/);if(J>=0){I(M.splitText(J+1))}}else{var L=M.childNod es;for(var K=0;K<L.length;K++){I(L[K])}}};var H=function(L){var K=L.childNodes;f or(var J=0;J<K.length;J++){var N=K[J];if(N.nodeType==document.ELEMENT_NODE){H(N) }else{var M=K[J+1];if(M&&M.nodeName=="#text"){L.insertBefore(document.createElem ent("span"),M)}}}};I(this.innerPageElem);H(this.innerPageElem)}this._svgFontsFix ed=true};o.prototype.imagePageContent=function(H){str="<img src='"+H+"'></img>"; return str};o.prototype.load=function(){this.currentlyLoading=true;this.loadHasS tarted=true;if(this.innerPageElem){throw"We already have loaded this page, but i t looks like you called loadPage again"}this.loadFonts();var K="page"+this.pageN um+"_callback";if(window[K]){try{delete window[K]}catch(J){window[K]=undefined}} if(this.docManager.displayType=="rasterize"){delete this.currentlyLoading;this._ setContainerContents(this.imagePageContent(this.contentUrl));return}var I=docume nt.createElement("script");var H=this;window[K]=function(M){document.body.remove Child(I);var N=M[0];delete H.currentlyLoading;H._setContainerContents(N);H.docMa nager.fireEvent("pageLoaded",H.containerElem);try{delete window[K]}catch(L){wind ow[K]=undefined}};I.src=this.contentUrl;I.type="text/javascript";I.charset="UTF8";document.body.appendChild(I)};o.prototype.remove=function(){if(this.innerPage Elem){var H=this.innerPageElem.parentNode;H.removeChild(this.innerPageElem);dele te this.innerPageElem;delete this.currentLoading;delete this.loadHasStarted;this ._linksTurnedOn=false;this._imagesTurnedOn=false;this._svgFontsFixed=false}};o.p rototype.display=function(I,H){if(this.displayOn&&!this.displayDirty){return}thi s.displayOn=true;if(this.currentlyLoading){return}else{if(!this.innerPageElem){i f(this.loadHasStarted){return}else{if(I){this.load();return}else{return}}}}this. displayDirty=false;if(!H){if(!this._linksTurnedOn){this.turnOnLinks()}if(!this._ imagesTurnedOn){this.turnOnImages()}if(!this._svgFontsFixed){this.fixSVGFonts()}

}this.loadFonts();if(this._innerPageVisible){return}this.containerElem.className =this.containerElem.className.replace(/placeholder|not_visible/g,"");this._inner PageVisible=true;if(!H){this._fitContentsToWidth();this.innerPageElem.style.disp lay="block"}};o.prototype.hide=function(){if(!this.displayOn&&!this.displayDirty ){return}this.displayOn=false;if(!this.innerPageElem){return}this.displayDirty=f alse;this.containerElem.className=this.containerElem.className+" not_visible";th is._innerPageVisible=false;this.innerPageElem.style.display="none"};o.prototype. setLoadFontGroup=function(H){H.addPage(this);this.loadFontGroup=H};o.prototype.l oadFonts=function(){this.loadFontGroup.load()};var q=!!(document.all&&(/msie 6./ i).test(navigator.appVersion)&&window.ActiveXObject);o.prototype._setZoomScale=f unction(J){var I=this.innerPageElem;switch(v){case t:I.style.WebkitTransform="sc ale("+J+")";I.style.WebkitTransformOrigin="top left";break;case D:I.style.MozTra nsform="scale("+J+")";I.style.MozTransformOrigin="top left";break;case C:I.style .OTransform="scale("+J+")";I.style.OTransformOrigin="top left";break;case b:if(! I.originalZoom){I.originalZoom=I.currentStyle.zoom=="normal"?1:parseFloat(I.curr entStyle.zoom)/100;if(q&&!this.docManager._isEmbed){I.originalZoom*=1.35}}I.styl e.zoom=(I.originalZoom*J*100)+"%";if(q){var H=this.innerPageElem;setTimeout(func tion(){H.style.marginLeft=H.style.marginLeft===""?0:""},500)}break;default:throw "Unknown scale method "+v}};o.prototype._fitContentsToWidth=function(){if(this._ targetWidth&&this.innerPageElem&&this._innerPageVisible){var H=this._targetWidth /this.origWidth;this._setZoomScale(H);this._targetWidth=null}};o.prototype.setWi dth=function(I){var H=Math.ceil((I/this.origWidth)*this.origHeight);this.contain erElem.style.width=I+"px";this.containerElem.style.height=H+"px";this._targetWid th=I;this._fitContentsToWidth()};o.prototype.setBounds=function(I,H){if(this.ori gWidth/this.origHeight>I/H){H=Math.ceil((I/this.origWidth)*this.origHeight)}else {I=Math.ceil((H/this.origHeight)*this.origWidth)}this.containerElem.style.width= I+"px";this.containerElem.style.height=H+"px";this._targetWidth=I;this._fitConte ntsToWidth()};o.prototype.turnOnImages=function(){if(!this.innerPageElem){throw" Can't turn on images for a page that's not loaded"}if(this._imagesTurnedOn){thro w"Images have already been turned on for this document"}this._imagesTurnedOn=tru e;var J=this.innerPageElem.getElementsByTagName("img");for(var I=0;I<J.length;I+ +){var H=J[I];if(H.className.toLowerCase().search("absimg")>-1){if(!H.src){var K =this.docManager.subImageSrc(H.getAttribute("orig"));if(this.docManager.enablePN GHack){H.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +K+"', sizingMethod='scale')";H.src=ie6_pngfix_shim}else{H.src=K}H.removeAttribu te("orig");H.style.display="block"}}}};o.prototype.turnOnLinks=function(){if(!th is.innerPageElem){throw"Can't turn on links for a page that's not loaded"}if(thi s._linksTurnedOn){throw"Links have already been turned on for this document"}thi s._linksTurnedOn=true;var K=this.innerPageElem.getElementsByTagName("a");for(var J=0;J<K.length;J++){var H=K[J];if(H.className.toLowerCase().search("ll")>-1){if (!H.href){var L=H.getAttribute("orig");if(L){var I=r.decode(L).replace(/^j[\W]*a [\W]*v[\W]*a[\W]*s[\W]*c[\W]*r[\W]*i[\W]*p[\W]*t[\W]*:|^f[\W]*i[\W]*l[\W]*e[\W]* :/ig,"");if(I.search(/^page/)>-1){H.onclick=(function(M){return(function(){windo w.location.hash="#outer_page_"+M.substring(4)})})(I)}else{if(I.search(/^mailto:/ )>=0){}else{if(I.search(/^(http|ftp)/)<0){I="http://"+I}}H.target="_blank";s(H,I );H.rel="nofollow"}}}}}};function z(){this.initEventHelper();this.viewRect=null; this.enabled=false;var H=this;this._scrollCallback=function(){H._eventHandler("s croll")};this._resizeCallback=function(I){H._eventHandler("resize")}}p(z,["verti cal","horizontal","either","resize"]);z.prototype._makeViewRect=function(){var N =document.documentElement;var M=window.scrollY||window.pageYOffset||N.scrollTop; var L=window.scrollX||window.pageXOffset||N.scrollLeft;var K=window.innerWidth|| N.clientWidth;var H=window.innerHeight||N.clientHeight;var J=L+K;var I=M+H;retur n{top:M,left:L,right:J,bottom:I,width:K,height:H}};z.prototype._updateViewRect=f unction(){var J=this.viewRect;this.viewRect=this._makeViewRect();var I=!J||J.lef t!=this.viewRect.left||J.width!=this.viewRect.width;var H=!J||J.top!=this.viewRe ct.top||J.height!=this.viewRect.height;return{xChanged:I,yChanged:H}};z.prototyp e._eventHandler=function(H){var I=this._updateViewRect();if((H=="resize"||H=="bo th")&&(I.xChanged||I.yChanged)){this.fireEvent("resize",this.viewRect)}if(I.xCha nged||I.yChanged){this.fireEvent("either",this.viewRect)}if(I.xChanged){this.fir eEvent("horizontal",this.viewRect)}if(I.yChanged){this.fireEvent("vertical",this

.viewRect)}};z.prototype.enable=function(){if(this.enabled){throw"ViewportManage r has already been enabled"}this.enabled=true;this.container=window;this._eventH andler("both");if(window.addEventListener){window.addEventListener("resize",this ._resizeCallback,false);window.document.addEventListener("scroll",this._scrollCa llback,false)}else{if(window.attachEvent){window.attachEvent("onresize",this._re sizeCallback);window.attachEvent("onscroll",this._scrollCallback)}}};z.prototype .disable=function(){if(!this.enabled){throw"ViewportManager is already been enab led"}this.enabled=false;if(this.container.removeEventListener){window.removeEven tListener("resize",this._resizeCallback,false);this.container.removeEventListene r("scroll",this._scrollCallback,false)}else{if(window.detatchEvent){window.detat chEvent("onresize",this._resizeCallback);this.container.detatchEvent("onscroll", this._scrollCallback)}}};function u(I,J,K){this.initEventHelper();this.viewManag er=I;this.page=J;this.oldPage=K==J?null:K;this.pretty=false;var H=this;this._ani mateCssForwardCallback=function(){H.oldPage.containerElem.style.display="none";H .oldPage.hide();$(H.oldPage.containerElem).removeClassName("pageflipForward");H. oldPage.containerElem.removeEventListener("webkitAnimationEnd",H._animateCssForw ardCallback);H.fireEvent("afterAnimation","css");H.page._updateBoundingRect();H. oldPage._updateBoundingRect()};this._animateCssBackwardCallback=function(){H.old Page.containerElem.style.display="none";H.oldPage.hide();$(H.page.containerElem) .removeClassName("pageflipBackward");H.page.containerElem.removeEventListener("w ebkitAnimationEnd",H._animateCssBackwardCallback);H.fireEvent("afterAnimation"," css");H.page._updateBoundingRect();H.oldPage._updateBoundingRect()}}p(u,["afterD isplay","beforeAnimation","afterAnimation"]);var f=1;var m=2;var h=3;u.prototype ._detectAnimationType=function(){var H=this.page.containerElem.style;if(H.Webkit AnimationName!==undefined){return f}else{if(H.WebkitTransform!==undefined||H.Moz Transform!==undefined||H.transform!==undefined){return m}else{return h}}};u.prot otype._cssForward=function(){this.oldPage.isVisible=false;this.oldPage.container Elem.addEventListener("webkitAnimationEnd",this._animateCssForwardCallback);this .fireEvent("beforeAnimation","css");$(this.oldPage.containerElem).addClassName(" pageflipForward")};u.prototype._cssBackward=function(){this.page.isVisible=true; this.page.containerElem.addEventListener("webkitAnimationEnd",this._animateCssBa ckwardCallback);this.fireEvent("beforeAnimation","css");$(this.page.containerEle m).addClassName("pageflipBackward")};u.prototype._animateCss=function(){this.pag e.containerElem.style.display="";if(this.oldPage.pageNum<this.page.pageNum){this ._cssForward()}else{this._cssBackward()}};u.prototype._jsForward=function(){var M=null;var L=this.oldPage.containerElem;var J=this;var K;var I;$(L).addClassName ("basicPageflipForward");this.page.containerElem.style.display="";this.fireEvent ("beforeAnimation","js");function H(){var P=new Date().valueOf();var N=(P-K)/(IK);var O="scaleX("+(1-N/2*2)+") skewY("+-Math.sin(((1-N/2)*Math.PI))/5+"rad)";L. style.WebkitTransform=O;L.style.MozTransform=O;if(N>1){window.clearInterval(M);$ (L).removeClassName("basicPageflipForward");L.style.display="none";L.style.Webki tTransform="";L.style.MozTransform="";J.fireEvent("afterAnimation","js");return} }K=new Date().valueOf();I=K+600;M=window.setInterval(H,1)};u.prototype._jsBackwa rd=function(){var N=null;var L=this.page.containerElem;var M=this.oldPage.contai nerElem;var J=this;var K;var I;this.fireEvent("beforeAnimation","js");$(L).addCl assName("basicPageflipBackward");function H(){var Q=new Date().valueOf();var O=( Q-K)/(I-K);var P="scaleX("+(O/2*2)+") skewY("+-Math.sin(((0.5+O/2)*Math.PI))/5+" rad)";L.style.WebkitTransform=P;L.style.MozTransform=P;L.style.display="";if(O>1 ){window.clearInterval(N);$(L).removeClassName("basicPageflipBackward");L.style. WebkitTransform="";L.style.MozTransform="";M.style.display="none";J.fireEvent("a fterAnimation","js");return}}K=new Date().valueOf();I=K+600;N=window.setInterval (H,1)};u.prototype._animateJs=function(){if(this.oldPage.pageNum<this.page.pageN um){this._jsForward()}else{this._jsBackward()}};u.prototype._basic=function(){th is.page.containerElem.style.display="";if(this.oldPage){this.oldPage.isVisible=f alse;this.oldPage.containerElem.style.display="none";this.oldPage.hide()}};u.pro totype.width=function(){return this.viewManager._zoomedPageWidth()};u.prototype. go=function(){if(!(this.pretty&&this.oldPage)){this._basic()}else{switch(this._d etectAnimationType()){case f:this._animateCss();break;case m:this._animateJs();b reak;case h:this._basic()}}this.page.display(true);this.page.isVisible=true;if(t his.oldPage){this.oldPage._updateBoundingRect()}this.page._updateBoundingRect();

this.fireEvent("afterDisplay")};function y(){}y.prototype.name=function(){return this._name};y.prototype.register=function(I,H){if(this.registered){throw"This V iewManager is already registered"}this.registered=true;this.documentManager=I;th is.viewportManager=H;this._currentPageWidth=defaultViewWidth;this._currentZoomMu ltiplier=1;this._updatePageWidths();var J=this.documentManager.firstVisiblePage; this._register(I,H);if(J){this.documentManager.gotoPage(J.pageNum,{pretty:false} )}};y.prototype._zoomedPageWidth=function(){return this._currentPageWidth*this._ currentZoomMultiplier};y.prototype._updatePageWidths=function(){this.documentMan ager.setPageWidths(this._zoomedPageWidth())};y.prototype.isTopPageInView=functio n(){return true};y.prototype._register=function(I,H){};y.prototype.unregister=fu nction(){if(!this.registered){throw"This ViewManager is already unregistered"}if (this.isFullscreen){this.exitFullscreen()}this._checkBodyWidth();this._unregiste r();this.registered=false;delete this.documentManager;delete this.viewportManage r};y.prototype._unregister=function(){};y.prototype.gotoPage=function(I,H){if(!t his.registered){throw"ViewManager must be registerd to call gotoPage"}this._goto Page(I,H)};y.prototype._gotoPage=function(I,H){};y.prototype._fireHideExtras=fun ction(){this.documentManager._fireHideExtras();this._extrasHidden=true};y.protot ype._fireShowExtras=function(){this.documentManager._fireShowExtras();this._extr asHidden=false};y.prototype.enterFullscreen=function(){if(this.isFullscreen){thr ow"Fullscreen is already set"}this._checkBodyWidth();this.viewportManager.addEve nt("resize",this._fullscreenResizedCallback);this._fireHideExtras();this.resetZo om();this._enterFullscreen();this._fullscreenResized(this.viewportManager.viewRe ct);this._currentPageWidth=this.viewportManager.viewRect.width;this.isFullscreen =true;var H=this.documentManager.firstVisiblePage;if(H){this.documentManager.got oPage(H.pageNum,{pretty:false})}this.documentManager._fireEnteredFullscreen()};y .prototype.exitFullscreen=function(){if(!this.isFullscreen){throw"Fullscreen is not set"}this.viewportManager.removeEvent("resize",this._fullscreenResizedCallba ck);this._fireShowExtras();this.resetZoom();this._exitFullscreen();this.isFullsc reen=false;var H=this.documentManager.firstVisiblePage;if(H){this.documentManage r.gotoPage(H.pageNum,{pretty:false})}this.documentManager._fireExitedFullscreen( )};y.prototype._viewBarWidth=function(){if(this._extrasHidden){return 0}else{ret urn this.documentManager.options.extrasWidth}};y.prototype._enterFullscreen=func tion(){};y.prototype._exitFullscreen=function(){};y.prototype._fullscreenResized =function(H){};y.prototype._scrollWithZoom=function(H,I){window.scrollTo(0,H.top *I)};y.prototype.zoom=function(I){var H=this.viewportManager.viewRect;this._curr entZoomMultiplier*=I;this._checkBodyWidth();this._updatePageWidths();this.docume ntManager.setIsScrolling(true);this._scrollWithZoom(H,I);this._zoomed();this.doc umentManager.setIsScrolling(false);this.documentManager._fireZoomed(I)};y.protot ype._zoomed=function(){};y.prototype.resetZoom=function(){this._currentZoomMulti plier=1;this._checkBodyWidth();this._updatePageWidths();this._zoomed()};y.protot ype._checkBodyWidth=function(H){var J=document.documentElement.clientWidth;var I =this._zoomedPageWidth()+this._viewBarWidth();globalHeader=document.getElementBy Id("global_header");if(I>J){document.body.style.width=I+"px";if(globalHeader){gl obalHeader.style.width=J+"px"}}else{document.body.style.width="100%";if(globalHe ader){globalHeader.style.width="100%"}}};function F(J,I,K){if(typeof(scribd)!==" undefined"&&typeof(scribd.jQuery)!=="undefined"){(function(L){L("html, body").an imate({scrollTop:L(J).offset().top},{queue:false,duration:I,easing:"linear",comp lete:K})})(scribd.jQuery)}else{if(window.Effect){var H={duration:I/1000,fps:100, transition:Effect.Transitions.linear,afterFinish:K};return new Effect.ScrollTo(J ,H)}}}function l(){this._name="book";this.currentPageId=null;var H=this;this._fu llscreenResizedCallback=function(I){H._fullscreenResized(I)}}l.prototype=new y() ;l.prototype._register=function(I,H){this._prepareDisplay()};l.prototype._unregi ster=function(){for(var H in this.documentManager.pages){if(this.documentManager .pages.hasOwnProperty(H)){var I=this.documentManager.pages[H];I.containerElem.st yle.display=""}}};l.prototype._prepareDisplay=function(){for(var H in this.docum entManager.pages){if(this.documentManager.pages.hasOwnProperty(H)){var I=this.do cumentManager.pages[H];I.hide();I.containerElem.style.zIndex=this.documentManage r.maximumPageNumber()-I.pageNum;I.containerElem.style.display="none"}}this.docum entManager.setPageMissingModulesVisible(false);this.documentManager.gotoPage(thi s.documentManager.currentPageNum()||1)};l.prototype._zoomed=function(){var H=thi

s.documentManager.pages[this.currentPageId];this.documentManager._firePageFlip(t his._zoomedPageWidth(),H.boundingRect.height)};l.prototype._gotoPage=function(H, I){if(!this.documentManager.pages.hasOwnProperty(H)){return}var L=this.currentPa geId?this.documentManager.pages[this.currentPageId]:null;var K=this.documentMana ger.pages[H];var J=new u(this,K,L);J.pretty=I.pretty;this.documentManager._prepa rePageFlip(J);J.go();this.currentPageId=H;this.documentManager.visiblePagesChang ed()};l.prototype._setWidth=function(H){this._currentPageWidth=H;this.documentMa nager.setPageWidths(H)};l.prototype._fullscreenResized=function(H){this._setWidt h(H.width-pagePadding)};l.prototype._enterFullscreen=function(){this._previousPa geWidth=this._currentPageWidth||defaultViewWidth;F(this.documentManager.pages[th is.currentPageId].containerElem,300)};l.prototype._exitFullscreen=function(){thi s._setWidth(defaultViewWidth);this._checkBodyWidth()};function x(){this._name="s lideshow";this.currentPageId=null;var H=this;this._fullscreenResizedCallback=fun ction(I){H._fullscreenResized(I)}}x.prototype=new y();x.prototype._register=func tion(I,H){this._prepareDisplay();var J=document.getElementById("scroll_preventer ");if(J){J.style.overflow="hidden";J.style.height="100%"}};x.prototype._unregist er=function(){var H=document.getElementById("scroll_preventer");if(H){H.style.ov erflow="visible";H.style.height="auto"}};x.prototype._prepareDisplay=function(){ for(var H in this.documentManager.pages){if(this.documentManager.pages.hasOwnPro perty(H)){var I=this.documentManager.pages[H];I.containerElem.style.display="non e";I.hide()}}this.documentManager.setPageMissingModulesVisible(false);this.docum entManager.gotoPage(this.documentManager.currentPageNum()||1)};x.prototype._setP ageBounds=function(H){var I=this.documentManager.pages[this.currentPageId];if(I) {I.setBounds(H.width,H.height)}};x.prototype._gotoPage=function(H,I){if(!this.do cumentManager.pages.hasOwnProperty(H)){return}var J;if(this.currentPageId){J=thi s.documentManager.pages[this.currentPageId];if(J){J.isVisible=false;J.containerE lem.style.display="none";J.hide()}}this.currentPageId=H;J=this.documentManager.p ages[H];if(this.isFullscreen){this._setPageBounds(this.viewportManager.viewRect) }J.isVisible=true;J.display(true);J.containerElem.style.display="";this.document Manager.visiblePagesChanged()};x.prototype._setWidth=function(H){this._currentPa geWidth=H;this.documentManager.setPageWidths(H)};x.prototype._fullscreenResized= function(H){this._setPageBounds(H)};x.prototype._enterFullscreen=function(){this ._previousPageWidth=this._currentPageWidth||defaultViewWidth;F(this.documentMana ger.pages[this.currentPageId].containerElem,300)};x.prototype._exitFullscreen=fu nction(){this._setWidth(defaultViewWidth);this._checkBodyWidth()};function c(){t his._name="scroll";var H=this;this._verticalPositionChangeCallback=function(){H. _verticalPositionChanged()};this._fullscreenResizedCallback=function(){H._fullsc reenResized()}}c.prototype=new y();c.prototype._updateInViewport=function(J){var H=this.viewportManager.viewRect;var I=J.boundingRect;var K=J.isVisible;if(!H||! I){J.isVisible=false}else{J.isVisible=(I.left<H.right&&I.right>H.left&&I.top<H.b ottom&&I.bottom>H.top)}this.adjacentVisiblePages=2;return K!=J.isVisible};c.prot otype._verticalPositionChanged=function(){var I=false;for(var K in this.pages){i f(this.pages.hasOwnProperty(K)){var J=this.pages[K];var H=this._updateInViewport (J);I=I||H}}if(I){this.documentManager.visiblePagesChanged()}else{this.documentM anager.scheduleLogPageView()}this._updateDisplayOnPages()};c.prototype._updateDi splayOnPages=function(){if(this.documentManager.firstVisiblePage&&this.documentM anager.lastVisiblePage){var K=this.documentManager.firstVisiblePage.pageNum-this .adjacentVisiblePages;var J=this.documentManager.lastVisiblePage.pageNum+this.ad jacentVisiblePages;for(var I in this.pages){if(this.pages.hasOwnProperty(I)){var H=this.pages[I];if(H){if(H.pageNum>=K&&H.pageNum<=J){H.display()}else{H.hide(); this.documentManager.fireEvent("pageHide",H)}}}}}};c.prototype._zoomed=function( ){this._verticalPositionChanged()};c.prototype._register=function(K,I){this.page s=K.pages;this.viewportManager.addEvent("vertical",this._verticalPositionChangeC allback);for(var H in this.pages){if(this.pages.hasOwnProperty(H)){var J=this.do cumentManager.pages[H];J.containerElem.style.display=""}}this.documentManager.se tPageMissingModulesVisible(true);this.documentManager._updatePageBoundingRects() ;this._verticalPositionChanged()};c.prototype.isTopPageInView=function(){var H=t his.documentManager.firstVisiblePage;if(H){if(this.documentManager._expectedFirs tPageNum>H.pageNum){return true}return H.boundingRect.top+5>=this.viewportManage r.viewRect.top}else{return true}};c.prototype._unregister=function(){this.viewpo

rtManager.removeEvent("vertical",this._verticalPositionChangeCallback);delete th is.pages};c.prototype._gotoPage=function(I,J){if(!this.pages.hasOwnProperty(I)){ return}var K=this.documentManager.pages[I];if(J.pretty){this.documentManager.set IsScrolling(true);var H=this;this._scrollEffect=F(K.containerElem,300,function() {H.documentManager.setIsScrolling(false);if(!H.isScrolling){H.documentManager.vi siblePagesChanged();delete H._scrollEffect}})}else{this.documentManager.setIsScr olling(true);K._updateBoundingRect();scrollTo(K.boundingRect.left,K.boundingRect .top);this.documentManager.setIsScrolling(false);this.documentManager.visiblePag esChanged()}return K.pageNum};c.prototype._gotoNextPage=function(){if(!this.docu mentManager.firstVisiblePage){return}this.documentManager.gotoPage(this.document Manager.firstVisiblePage.pageNum+1,{direction:1})};c.prototype._gotoPreviousPage =function(){if(!this.documentManager.firstVisiblePage){return}this.documentManag er.gotoPage(this.documentManager.firstVisiblePage.pageNum-1,{direction:-1})};c.p rototype._setWidth=function(H){this._currentPageWidth=H;this._updatePageWidths() ;this._checkBodyWidth()};c.prototype._fullscreenResized=function(){this._setWidt h((window.innerWidth||document.documentElement.clientWidth)-pagePadding)};c.prot otype._enterFullscreen=function(){this._previousPageWidth=this._currentWidth||de faultViewWidth};c.prototype._exitFullscreen=function(){this._setWidth(this._prev iousPageWidth)};function n(J,I,H){this.options=H||{};this.options.extrasWidth=th is.options.extrasWidth||extrasWidth;this.defaultViewMode=(J||"scroll");this.mobi le=(I||false);this.initEventHelper();this.pages={};this._pageWidths=null;this._f ontLoader=new B(this);this.viewManagers={scroll:new c(),slideshow:new x(),book:n ew l()};this.viewportManager=new z();this._currentFontAggregatorHostIdx=0;this.v isiblePages=[];this.firstVisiblePage=null;this.lastVisiblePage=null;this.current FontGroup=new a(0,this._fontLoader);this.isScrolling=false;this._scrollingCount= 0}p(n,["expectedFirstPageChanged","viewmodeChanged","enteredFullscreen","exitedF ullscreen","hideExtras","showExtras","preparePageFlip","zoomed","pageHide","page Loaded","allPagesAdded","pageView"]);n.prototype._fireZoomed=function(H){this.fi reEvent("zoomed",H)};n.prototype.nextFontAggregatorHost=function(){this._current FontAggregatorHostIdx=(this._currentFontAggregatorHostIdx+1)%this.fontAggregator Hosts.length;return this.fontAggregatorHosts[this._currentFontAggregatorHostIdx] };n.prototype._preparePageFlip=function(H){this.fireEvent("preparePageFlip",H)}; n.prototype._fireHideExtras=function(){this.fireEvent("hideExtras")};n.prototype ._fireShowExtras=function(){this.fireEvent("showExtras")};n.prototype._firePageF lip=function(I,H){this.fireEvent("pageFlip",I,H)};n.prototype.currentPageNum=fun ction(){return this._expectedFirstPageNum};n.prototype.setupTestElements=functio n(){this._fontLoader.setupTestElements()};n.prototype.pageCount=function(){if(th is.hasOwnProperty("_pageCount")){return this._pageCount}var H=0;for(var I in thi s.pages){if(this.pages.hasOwnProperty(I)){H++}}this._pageCount=H;return this._pa geCount};n.prototype.setupPaidDocument=function(J,I){this.allowedPages=J;this.or iginalPageCount=I;this._allowedPagesHash=[];this._maximumAllowedPage=Math.max.ap ply(null,this.allowedPages);this._minimumAllowedPage=Math.min.apply(null,this.al lowedPages);this._isPaidDocument=true;this._pageMissingElements=[];for(var H=0;H <J.length;H++){this._allowedPagesHash[J[H]]=true;if((H>0&&J[H]>J[H-1]+1)||(H===0 &&J[H]!=1)){this._pageMissingElements.push("page_missing_explanation_"+J[H].toSt ring())}}if(this._maximumAllowedPage!=this.originalPageCount){this._pageMissingE lements.push("page_missing_explanation_"+(this.originalPageCount+1).toString())} };n.prototype.maximumPageNumber=function(){if(this.allowedPages){return this.ori ginalPageCount}else{return this.pageCount()}};n.prototype.getClosestPageNumber=f unction(I,J){if(this.allowedPages){if(this._allowedPagesHash[I]){return I}else{i f(I>=this._maximumAllowedPage){return this._maximumAllowedPage}else{if(I<=this._ minimumAllowedPage){return this._minimumAllowedPage}}for(var H=1;H<=this.origina lPageCount;H++){if(J<=0&&this._allowedPagesHash[I-H]===true){return I-H}else{if( J>=0&&I+H<this.originalPageCount&&this._allowedPagesHash[I+H]===true){return I+H }}}}}else{return I}};n.prototype.setPageMissingModulesVisible=function(I){if(!th is._isPaidDocument){return}for(var H=0;H<this._pageMissingElements.length;H++){v ar J=$(this._pageMissingElements[H]);if(J){if(I){J.show()}else{J.hide()}}}};n.pr ototype.getNextAvailablePage=function(H){return getClosestPageNumber(H,1)};n.pro totype.getPreviousAvailablePage=function(H){return getClosestPageNumber(H,-1)};n .prototype.flushFontQueue=function(){this._fontLoader.flushFontQueue()};n.protot

ype.visiblePagesChanged=function(){var K=[];for(var J in this.pages){if(this.pag es.hasOwnProperty(J)){var I=this.pages[J];if(I.isVisible){K.push(I)}}}K.sort(fun ction(M,L){if(M.pageNum<L.pageNum){return -1}else{return 1}});this.visiblePages= K;var H=this.firstVisiblePage;this.firstVisiblePage=K.length>0?K[0]:null;this.la stVisiblePage=K.length>0?K[K.length-1]:null;if(!this.isScrolling){this._loadAdja centFonts();this._loadAdjacentPages()}if((this.firstVisiblePage!==H&&(!this.firs tVisiblePage||!H))||this.firstVisiblePage.pageNum!=H.pageNum){if(!this.isScrolli ng&&this.firstVisiblePage){this._updateExpectedFirstPage(this.firstVisiblePage.p ageNum)}}this.scheduleLogPageView()};function w(I,J,H){return Math.min(H,Math.ma x(J,I))}n.prototype.boundingRatioForPage=function(L){var H=this.viewportManager. viewRect;var J=L.boundingRect;var K=J.bottom-J.top;var I=J.right-J.left;return{l eft:(H.left-J.left)/I,right:(H.right-J.right)/I+1,top:w((H.top-J.top)/K+L.pageNu m,L.pageNum,L.pageNum+1),bottom:w((H.bottom-J.bottom)/K+L.pageNum+1,L.pageNum,L. pageNum+1)}};n.prototype.scheduleLogPageView=function(){if(this.logPageViewTimou t){window.clearTimeout(this.logPageViewTimout)}var H=this;this.logPageViewTimout =window.setTimeout(function(){H.logPageView();H.logPageViewTimout=null},1000)};f unction g(H){return Math.floor(H*100)/100}n.prototype.getVisibleBBox=function(){ var H={};if(this.firstVisiblePage){var J=this.boundingRatioForPage(this.firstVis iblePage);H.left=J.left;H.right=J.right;H.top=J.top}if(this.lastVisiblePage){var I=this.boundingRatioForPage(this.lastVisiblePage);H.bottom=I.bottom}return H};n .prototype.logPageView=function(){var K=this.getVisibleBBox();for(var H in K){if (K.hasOwnProperty(H)){K[H]=g(K[H])}}var I=window.$rat;if(I){var J;if(window.RAT_ API_VERSION=="2"){J=[[K.left,K.top],[K.right,K.bottom]]}else{J="("+K.left+" "+K. top+") ("+K.right+" "+K.bottom+")"}I("fourgen.viewchange",J)}this.fireEvent("pag eView");return K};n.prototype._updateExpectedFirstPage=function(H){this._expecte dFirstPageNum=H;this.fireEvent("expectedFirstPageChanged",this._expectedFirstPag eNum)};n.prototype._loadAdjacentFonts=function(){if(this.firstVisiblePage&&this. lastVisiblePage){var L=[];var H=this.firstVisiblePage.pageNum-adjacentFontLoadPa ges;var J=this.lastVisiblePage.pageNum+adjacentFontLoadPages;for(var I=H;I<=J;I+ +){var K=this.pages[I];if(K){K.loadFonts()}}}};n.prototype._loadAdjacentPages=fu nction(){if(this.firstVisiblePage&&this.lastVisiblePage){var L=[];var H=this.fir stVisiblePage.pageNum-adjacentLoadPages;var J=this.lastVisiblePage.pageNum+adjac entLoadPages;for(var I=H;I<=J;I++){var K=this.pages[I];if(K&&!K.loadHasStarted){ K.load();if(this.mobile){K.setWidth(this._pageWidths)}}}if(this.mobile){this._re moveUnusedPages()}}};n.prototype._removeUnusedPages=function(){var I=this.firstV isiblePage.pageNum-adjacentLoadPages;var K=this.lastVisiblePage.pageNum+adjacent LoadPages;var H=this.pages;var J=adjacentLoadPages+1;while(H[J]){if(J<I||J>K){H[ J].remove()}J++}};n.prototype._updatePageBoundingRects=function(){for(var H in t his.pages){if(this.pages.hasOwnProperty(H)){this.pages[H]._updateBoundingRect()} }};n.prototype.addPage=function(I){if(I.pageNum===undefined){throw"must have pag eNum param"}I.docManager=this;var H=new o(I);this.pages[I.pageNum]=H;if(this._pa geWidths){H.setWidth(this._pageWidths)}if(this.currentFontGroup.isFull()){this.c urrentFontGroup=this.currentFontGroup.newNextGroup()}H.setLoadFontGroup(this.cur rentFontGroup);return H};n.prototype.setIsScrolling=function(H){if(H){this._scro llingCount+=1}else{this._scrollingCount-=1}if(this._scrollingCount<0){this._scro llingCount=0}if(this._scrollingCount===0){this.isScrolling=false}else{this.isScr olling=true}};n.prototype.setViewManager=function(H){if(this._currentViewManager ){this._currentViewManager.unregister()}var I=this._currentViewManager;this._cur rentViewManager=this.viewManagers[H];this._currentViewManager.register(this,this .viewportManager);this.fireEvent("viewmodeChanged",this._currentViewManager.name (),I?I.name():null)};n.prototype.setDefaultWidth=function(H){this._currentViewMa nager._currentPageWidth=H;this._currentViewManager._currentZoomMultiplier=1;this ._currentViewManager._updatePageWidths()};n.prototype.subImageSrc=function(J){va r I,H=0;for(I=0;I<J.length;I++){H+=J.charCodeAt(I)}var K=this._imageDomainSubsti tutionList[H%this._imageDomainSubstitutionList.length];return J.replace(this._im ageDomainSubstitutionFrom,K)};n.prototype.allPagesAdded=function(){if(this._allP agesAddedCalled){throw"can only call allPagesAdded once"}this.viewportManager.en able();this._updatePageBoundingRects();this.setViewManager(this.defaultViewMode) ;this.fireEvent("allPagesAdded")};n.prototype.setEmbeddedDoc=function(H){this._i sEmbed=(H==="True")};n.prototype.setPageWidths=function(H){this._pageWidths=H;fo

r(var I in this.pages){if(this.pages.hasOwnProperty(I)){this.pages[I].setWidth(t his._pageWidths)}}this._updatePageBoundingRects()};n.prototype.addFont=function( M,K,I,L,J,H){this._fontLoader.addFont(M,K,I,L,J,H)};n.prototype.setNumFonts=func tion(H){this._fontLoader.setNumFonts(H)};n.prototype.initStyles=function(){this. _fontLoader.initStyles()};n.prototype.gotoPage=function(H,I){if(!I){I={}}if(I.pr etty===undefined){I.pretty=true}var K=I.direction||0;var J=this.pages[H];if(J=== undefined&&this._isPaidDocument){H=this.getClosestPageNumber(H,K);J=this.pages[H ]}if(this.pages[H]){this._updateExpectedFirstPage(H);this._currentViewManager.go toPage(this._expectedFirstPageNum,I);if(this.mobile){this.pages[H].setWidth(this ._pageWidths)}}};n.prototype.gotoPreviousPage=function(){if(this._currentViewMan ager.isTopPageInView()){this.gotoPage(this._expectedFirstPageNum-1,{direction:-1 })}else{this.gotoPage(this._expectedFirstPageNum,{direction:-1})}};n.prototype.g otoNextPage=function(){this.gotoPage(this._expectedFirstPageNum+1,{direction:1}) };n.prototype.enterFullscreen=function(){this._currentViewManager.enterFullscree n()};n.prototype.exitFullscreen=function(){this._currentViewManager.exitFullscre en()};n.prototype._fireEnteredFullscreen=function(){this.fireEvent("enteredFulls creen")};n.prototype._fireExitedFullscreen=function(){this.fireEvent("exitedFull screen")};n.prototype.viewMode=function(){if(this._currentViewManager){return th is._currentViewManager.name()}return null};n.prototype.zoom=function(H){this._cu rrentViewManager.zoom(H)};n.prototype.resetZoom=function(){this._currentViewMana ger.resetZoom()};n.prototype.setImageDomainSubstitution=function(H,I){this._imag eDomainSubstitutionFrom=H;this._imageDomainSubstitutionList=I};n.prototype.disab leViewManagerResizeWidth=function(){y.prototype._checkBodyWidth=function(){}};n. prototype.disable=function(){if(!this.disabled){this.disabled=true;this.viewport Manager.disable()}};return n})();window.DocumentManager=DocumentManager;

Вам также может понравиться