var atalaWebAnnotationViewerLoaded=true,atalaWebAnnotationViewerVersion='8.0b';Atalasoft.Utils.ExtendClass(atalaWebAnnotationViewer,atalaWebImageViewer);function atalaWebAnnotationViewer(controlID,currentPath,formID){atalaWebAnnotationViewer.baseConstructor.call(this,controlID,currentPath,formID);this.typeOf='atalaWebAnnotationViewer';var _id=this.ID(),_f=this.Form(),_s=this,_viewPort=null,_dn=false,_pt=null,_tlg;function __tla(s){if(_tlg==null)_tlg=window.open('','atalaTraceLog');_tlg.document.writeln(_id+': '+s+'<br/>');};var __trace=__tla;Atalasoft.Event.Attach(this,_s,'ZoomChanged',__zc);Atalasoft.Event.Attach(this,_s,'OnLoad',__i);function __zc(e){__bc('setZoom('+_s.getZoom()+');');};this.AnnotationChanging=function(){};this.AnnotationChanged=function(){};this.AnnotationCreated=function(){};this.AnnotationLoaded=function(){};this.AnnotationEditorShown=function(){};this.AnnotationEditorHidden=function(){};this.AnnotationCommentsShown=function(){};this.AnnotationCommentsHidden=function(){};this.AnnotationsChanged=function(){};this.LayerChanged=function(){};this.LayersChanged=function(){};this.CurrentLayerChanged=function(){};this.AnnotationClicked=function(){};this.AnnotationDoubleClicked=function(){};this.AnnotationMouseDown=function(){};this.AnnotationMouseDownLeft=function(){};this.AnnotationMouseDownRight=function(){};this.AnnotationMouseMove=function(){};this.AnnotationMouseOut=function(){};this.AnnotationMouseOver=function(){};this.AnnotationMouseUp=function(){};this.AnnotationRightClicked=function(){};function __getObj(id){return Atalasoft.DOM.getObject(id);};function __getValue(id){return Atalasoft.Forms.getValue(_f,id);};function __getValueInt(id){return Atalasoft.Forms.getValueInt(_f,id);};function __getValueFloat(id){return Atalasoft.Forms.getValueFloat(_f,id);};function __setValue(id,value){Atalasoft.Forms.setValue(_f,id,value);};function __i(){_viewPort=_s.getViewPort();__bc('Init();');};function __bc(exp){var s;if(_viewPort!=null){if(document.all){s='document.frames[_viewPort.id]._controller';}else{s='_viewPort.contentWindow._controller';};};if(eval(s)){s+='.'+exp;return eval(s);}else{return null;};};this.getAnnotationDataUrl=__gandu;function __gandu(){return __getValue(_id+'_andu');};this.getAnnotationData=__gand;function __gand(){return __getValue(_id+'_ajs');};this.getAnnotations=__gans;function __gans(){return __bc('getAnnotations();');};this.getAnnotation=__gan;function __gan(l,g,i){if(isFinite(l)&&!isFinite(g)&&!isFinite(i)){i=l;g=-1;l=-1;}else if(isFinite(l)&&isFinite(g)&&!isFinite(i)){i=g;g=-1;};return __bc('getAnnotation('+l+','+g+','+i+');');};this.getAuthorMode=__gam;function __gam(){return __getValue(_id+'_aam');};this.getAutoLinkThumbnailViewer=__galtv;function __galtv(){if(__getValue(_id+'_alt').toLowerCase()=='true'){return true;}else{return false;};};this.getCurrentLayer=__gcly;function __gcly(){return __bc('getCurrentLayer();');};this.getCurrentUserName=__gcun;function __gcun(){return __getValue(_id+'_acu');};this.getDefaultAnnotationData=__getDefaultAnnotationData;function __getDefaultAnnotationData(){return __getValue(_id+'_andajs');};this.getDrawNative=__gdn;function __gdn(){return _dn;};this.getInteractMode=__gim;function __gim(){return __getValueInt(_id+'_aim');};this.getLayers=__glys;function __glys(){return __bc('getLayers();');};this.getSelectedAnnotations=__gsa;function __gsa(){return __bc('getSelectedAnnotations();');};this.setCurrentLayer=__scl;function __scl(o){if(o!=null&&typeof(o)=='object'&&o.typeOf=='atalaLayer'){__bc('setCurrentLayer('+o.getLayerIndex()+');');}else if(typeof(o)=='number'){__bc('setCurrentLayer('+o+');');}else{_s.ThrowError('WebAnnotationViewer.setCurrentLayer',4,o,'Either an atalaLayer or a number was expected.');};};this.setDrawNative=__sdn;function __sdn(b){if(Atalasoft.Utils.CheckBool(b)==true){_dn=b;}else{_s.ThrowError('WebAnnotationViewer.setDrawNative',5,b,'');};};this.setInteractMode=__sim;function __sim(i){if(i>=0&&i<4){__setValue(_id+'_aim',i);__bc('setInteractMode('+i+');');};};function __gsad(url){var qs=_s.getPagePath();qs+='?atalagetanno=-1'+'&atala_id='+_id+'&atala_andu='+url+'&atala_rnd='+Math.round(Math.random()*100000000);__dcb(qs);};function __gcr(){return __bc('getController();');};this.getThumbnailCount=__gtc;function __gtc(){if(_pt&&_pt.getCount){return _pt.getCount();}else{return-1;};};this.getSelectedThumbnailIndex=__gsti;function __gsti(){if(_pt&&_pt.getSelectedIndex){return _pt.getSelectedIndex();}else{return-1;};};this.setAnnotationJson=__sanj;function __sanj(l,g,i,s){__gcr().setAnnotationJson(l,g,i,s);};this.setAnnotationData=__sand;function __sand(s,b){__setValue(_id+'_ajs',s);if(s!=''){__bc('LoadAnnotations('+b+');');}else{__alut();};};this.setParentControl=__spc;function __spc(o){if(o.typeOf=='atalaWebThumbnailViewer'){if(_pt!=o){_pt=o;__bc('AutoLinkSynchronize();');};};};this.LoadAnnotations=__la;function __la(url){__gsad(url);};this.CountAnnotations=__cas;function __cas(){return __bc('CountAnnotations();');};this.CountLayers=__cl;function __cl(){return __bc('CountLayers();');};this.Clear=__ca;function __ca(){__csad();__bc('ClearAnnotations();');};this.SelectAll=__sa;function __sa(){__bc('SelectAll();');};this.DeselectAll=__dsa;function __dsa(){__bc('DeselectAll();');};this.CreateAnnotation=__can;function __can(s,n){return __bc('CreateAnnotation("'+s+'", "'+n+'");');};this.InsertAnnotation=__ian;function __ian(o,i){return __gcr().InsertAnnotation(o,i);};this.DeleteAnnotation=__da;function __da(i){return __bc('DeleteAnnotation('+i+');');};this.DeleteAnnotations=__dan;function __dan(a){return __gcr().DeleteAnnotations(a);};this.CreateLayer=__clr;function __clr(){return __bc('CreateLayer();');};this.AddLayer=__al;function __al(o){return __gcr().AddLayer(o);};function __ily(o,i){return __gcr().InsertLayer(o,i);};this.DeleteLayer=__dl;function __dl(i){return __bc('DeleteLayer('+i+');');};this.GroupAnnotations=__ga;function __ga(a){return __gcr().GroupAnnotations(a);};this.RemoteInvoke=__ri;function __ri(mthd,args){var qs=this.BuildRemoteQuery(mthd,args);qs+=__bsq();this.DoCallBack(qs);};this.ReInitializeLayers=__rils;function __rils(i){if(i>0){__bc('ClearAnnotations();');__csad(i);}else{__ca();};};this.AutoLinkUpdateThumb=__alut;function __alut(a){if(!a){a=new Array();};if(a.length==0){a.push(__gsti());};if(_pt&&_pt.UpdateThumb){for(var i=0;i<a.length;i++){if(a[i]>=0){_pt.UpdateThumb(a[i]);};};return a;}else{return-1;};};function __bsq(){var a=__gsa(),qs='';if(a.length!=0){qs='&atala_asa=';for(var i=0;i<a.length;i++){var li=a[i].getLayerIndex();qs+=li+':'+a[i].getZIndex()+':'+a[i].getUniqueID();if(i+1<a.length)qs+=',';};};a=null;return qs;};function __csad(i){var qs=_s.getPagePath();qs+='?atalasetanno=-1'+'&atala_id='+_id;if(i!=null){qs+='&atala_a_l='+i;};qs+='&atala_rnd='+Math.round(Math.random()*100000000);__dcb(qs);};this.doCallBack=__dcb;function __dcb(qs){var f=__getObj(_id+'_of');f.src=qs;};this.isThumbnailLinked=__itl;function __itl(){if(__galtv()==true&&_pt&&_pt.typeOf=='atalaWebThumbnailViewer'){return true;}else{return false;};};this.PauseAnnotationRefresh=__pauseAnnotationRefresh;function __pauseAnnotationRefresh(){__bc('PauseRefresh();');};this.ResumeAnnotationRefresh=__resumeAnnotationRefresh;function __resumeAnnotationRefresh(){__bc('ResumeRefresh();');};};if(_atalaInUpdatePanel&&Sys&&Sys.Application){Sys.Application.notifyScriptLoaded();};
