var atalaWebThumbnailViewerLoaded=true,atalaWebThumbnailViewerVersion="8.0",atalaThumbnailViewers=new Array(),atalaThumbnailCaptions=new Array();Atalasoft.Controls.WebThumbnailViewer=atalaWebThumbnailViewer;function atalaWebThumbnailViewer(controlID,currentPath,formID){this.typeOf='atalaWebThumbnailViewer';var _s=this,_id=controlID,_f=document.getElementById(formID);if(_f==null){_f=document.forms[0];};var _p=currentPath,_span=null,_m=null,_l=null,_tbr=null,_cn=null,_viewPort=null,_tlg;function __tla(s){if(_tlg==null)_tlg=window.open('','atalaTraceLog');_tlg.document.writeln(_id+': '+s+'<br/>');};var __trace=__tla;this.BackColorChanged=function(){};this.BorderColorChanged=function(){};this.BorderStyleChanged=function(){};this.BorderWidthChanged=function(){};this.CaptionChanged=function(){};this.CenteredChanged=function(){};this.CountChanged=function(){};this.FontChanged=function(){};this.ForeColorChanged=function(){};this.ScrollPositionChanged=function(){};this.SizeChanged=function(){};this.TitleBarChanged=function(){};this.UrlChanged=function(){};this.VisibilityChanged=function(){};this.OnLoad=function(){};this.OnError=function(){};this.SelectedIndexChanged=function(){};this.ThumbnailClicked=function(){};this.ThumbnailDoubleClicked=function(){};this.ThumbnailMouseDown=function(){};this.ThumbnailMouseDownLeft=function(){};this.ThumbnailMouseDownRight=function(){};this.ThumbnailMouseMove=function(){};this.ThumbnailMouseOut=function(){};this.ThumbnailMouseOver=function(){};this.ThumbnailMouseUp=function(){};this.ThumbnailRightClicked=function(){};this.ThumbnailLoaded=function(){};this.ThumbnailDrop=function(){};this.ThumbnailDropServer=function(){};this.KeyDown=function(){};this.KeyUp=function(){};this.KeyPress=function(){};this.FireEvent=__fe;function __fe(en,e){Atalasoft.Event.Fire(_s,en,e);};this.ThrowError=__throwError;function __throwError(fnc,err,val,msg,jse){var e=Atalasoft.Event.Throw(fnc,err,val,msg,jse);__fe('OnError',e);};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);};atalaThumbnailViewers.push(this);__i();function __i(){_m=document.getElementById(_id+'_om');if(_m!=null){_l=__getObj(_id+'_ol');_span=document.getElementById(_id);if(_span==null){_span=_m.parentNode;};_tbr=document.getElementById(_id+'_ot');_cn=document.getElementById(_id+'_oc');_viewPort=__getObj(_id+'_ov');if(__gw()==0){__sw(64);};if(__gh()==0){__sh(64);};if(__gvs()){__sv('visible');}else{__sv('hidden');};};};this.AtlasReload=__atr;function __atr(){__i();__l();};this.Load=__l;function __l(){__ic();var bc=__gbgc();if(bc!='')__bc('setBackColor("'+bc+'");');var force=false;if(__gu()==''&&__gct()>0){force=true;};__uc(force);__lv();__fe('OnLoad',null);};this.Dispose=__d;function __d(){_s=null;_id=null;_f=null;_p=null;_span=null;_m=null;_l=null;_tbr=null;_cn=null;_viewPort=null;this.BackColorChanged=null;this.BorderColorChanged=null;this.BorderStyleChanged=null;this.BorderWidthChanged=null;this.CaptionChanged=null;this.CenteredChanged=null;this.CountChanged=null;this.FontChanged=null;this.ForeColorChanged=null;this.ScrollPositionChanged=null;this.SizeChanged=null;this.TitleBarChanged=null;this.UrlChanged=null;this.VisibilityChanged=null;this.OnLoad=null;this.SelectedIndexChanged=null;this.ThumbnailClicked=null;};function __bc(exp){var s;if(document.all){s='document.frames[_viewPort.id]._child';}else{s='_viewPort.contentWindow._child';};if(eval(s)){s+='.'+exp;return eval(s);}else{return null;};};function __ic(){__bc('Init();');};function __uc(force){__bc('Update('+force+');');};function __gss(){return __bc('getScrollSize();');};this.ID=function(){return _id;};this.Form=function(){return _f;};this.getAllowMultiSelect=__gams;function __gams(){if(__getValue(_id+'_ams').toLowerCase()=='true'){return true;}else{return false;};};this.getAllowDragDrop=__getAllowDragDrop;function __getAllowDragDrop(){if(__getValue(_id+'_aro').toLowerCase()=='true'){return true;}else{return false;};};this.getBackColor=__gbgc;function __gbgc(){return __getValue(_id+'_bgc');};this.getBorderColor=__gbc;function __gbc(){return __getValue(_id+'_bc');};this.getBorderStyle=__gbs;function __gbs(){return __getValue(_id+'_bs');};this.getBorderWidth=__gbw;function __gbw(){return __getValueInt(_id+'_bw');};this.getBrowserFormat=__gbf;function __gbf(){return __getValueInt(_id+'_bf');};this.getCachePath=__gcp;function __gcp(){return __getValue(_id+'_cp');};this.getCaption=__gcn;function __gcn(){return __getValue(_id+'_ca');};this.getCentered=__gc;function __gc(){if(__getValue(_id+'_c').toLowerCase()=='true'){return true;}else{return false;};};this.getColumns=__gcl;function __gcl(){return __getValueInt(_id+'_cs');};this.getCount=__gct;function __gct(){return __getValueInt(_id+'_tc');};this.getFlowDirection=__gfd;function __gfd(){return __getValueInt(_id+'_tf');};this.getFont=__gf;function __gf(){return __getValue(_id+'_f');};this.getForeColor=__gfgc;function __gfgc(){return __getValue(_id+'_fc');};this.getHeight=__gh;function __gh(){return __getValue(_id+'_h');};this.getImageDisplayOrder=__gido;function __gido(){return __getValueInt(_id+'_tm');};this.getLayout=__gl;function __gl(){return __getValueInt(_id+'_tl');};this.getPathToResources=__gptr;function __gptr(){return __getValue(_id+'_pr');};this.getRows=__gr;function __gr(){return __getValueInt(_id+'_rs');};this.getScrollBarVisibility=__gsbv;function __gsbv(){return __getValueInt(_id+'_sv');};function __gsbh(){return __getValueInt(_id+'_sbh');};function __gsbw(){return __getValueInt(_id+'_sbw');};this.getScrollPosition=__gsp;function __gsp(){return new atalaPoint(-__getValueInt(_id+'_spx'),-__getValueInt(_id+'_spy'));};this.getSearchPattern=__gspn;function __gspn(){return __getValue(_id+'_dsp');};this.getSelectedIndex=__gsix;function __gsix(){return __getValueInt(_id+'_cin');};this.getSelectedIndexes=__gsis;function __gsis(){return __getValue(_id+'_cins').parseJSON();};this.getSize=__gs;function __gs(){return new atalaSize(__getValueInt(_id+'_w'),__getValueInt(_id+'_h'));};this.getThumbCaption=__gthc;function __gthc(i){var captions=__getValue(_id+'_tcj').parseJSON();if(i<captions.length){return captions[i];}else{return'';};};this.getThumbCaptionFormat=__getThumbCaptionFormat;function __getThumbCaptionFormat(){return __getValue(_id+'_tcf');};this.getThumbPadding=__gtp;function __gtp(){return __getValueInt(_id+'_tp');};this.getThumbSize=__gths;function __gths(){return new atalaSize(__getValueInt(_id+'_tw'),__getValueInt(_id+'_th'));};this.getThumbSpacing=__gtsp;function __gtsp(){return __getValueInt(_id+'_ts');};this.getTitleBar=__gtb;function __gtb(){return __getValue(_id+'_t');};this.getUrl=__gu;function __gu(){return __getValue(_id+'_uri');};this.getViewPortSize=__gvps;function __gvps(){return __bc('getViewPortSize();');};this.getVisibility=__gv;function __gv(){if(__gvs()==true){return'visible';}else{return'hidden';};};this.getViewerID=__gvid;function __gvid(){return __getValue(_id+'_wiv');};function __gvs(){if(__getValue(_id+'_v').toLowerCase()=='true'){return true;}else{return false;};};this.getWidth=__gw;function __gw(){return __getValue(_id+'_w');};function __gws(){return __bc('getWindowSize();');};this.setBackColor=__sbgc;function __sbgc(s){try{__setValue(_id+'_bgc',s);__bc('setBackColor("'+s+'");');__us();__fe('BackColorChanged');}catch(ex){__throwError('setBackColor',6,s,ex.message,ex);};};this.setBorderColor=__sbc;function __sbc(s){try{__setValue(_id+'_bc',s);__us();__fe('BorderColorChanged');}catch(ex){__throwError('setBorderColor',6,s,ex.message,ex);};};this.setBorderStyle=__sbs;function __sbs(s){try{__setValue(_id+'_bs',s);_m.style.border=s;__fe('BorderStyleChanged');}catch(ex){__throwError('setBorderStyle',6,s,ex.message,ex);};};this.setBorderWidth=__sbw;function __sbw(s){try{__setValue(_id+'_bw',s);__us();__fe('BorderWidthChanged');}catch(ex){__throwError('setBorderWidth',6,s,ex.message,ex);};};this.setCaption=__scn;function __scn(s){try{__setValue(_id+'_ca',s);if(_cn!=null){if(s.length!=0){_cn.innerHTML=s;}else{_m.deleteRow(_m.rows.length-1);_cn=null;};}else if(s.length!=0){test=_m.insertRow(_m.rows.length);_cn=test.insertCell(0);_cn.id=_id+'_oc';_cn.innerHTML=s;};__us();__fe('CaptionChanged');}catch(ex){__throwError('setCaption',6,s,ex.message,ex);};};this.setCentered=__scd;function __scd(b){if(atalaCheckBool(b)==true){__setValue(_id+'_c',b);__bc('Center('+b+');');__fe('CenteredChanged');}else{__throwError('setCentered',5,b,'');};};this.setFont=__sf;function __sf(s){try{__setValue(_id+'_f',s);__us();__fe('FontChanged');}catch(ex){__throwError('setFont',6,s,ex.message,ex);};};this.setForeColor=__sfgc;function __sfgc(s){try{__setValue(_id+'_fc',s);__us();__fe('ForeColorChanged');}catch(ex){__throwError('setForeColor',6,s,ex.message,ex);};};this.setHeight=__sh;function __sh(i){__setValue(_id+'_h',i);__avp();__fe('SizeChanged');};this.setScrollPosition=__ssp;function __ssp(p){if(p.typeOf=='atalaPoint'){var op=__gsp();if(p.X!=op.X||p.Y!=op.Y){__sspu(p,true);};}else{__throwError('setScrollPosition',4,p.typeOf,'atalaPoint expected.');};};function __sspu(p,u){try{var ss=__gss(),vs=__gvps(),mx=-(ss.Width-vs.Width),my=-(ss.Height-vs.Height);if(p.X<mx){p.X=mx;};if(p.X>0){p.X=0;};if(p.Y<my){p.Y=my;};if(p.Y>0){p.Y=0;};__setValue(_id+'_spx',-p.X);__setValue(_id+'_spy',-p.Y);if(u==true){__uc();};__fe('ScrollPositionChanged');}catch(ex){__throwError('setScrollPosition',6,p.X+"x"+p.Y,ex.message,ex);};};this.setTitleBar=__stb;function __stb(s){try{__setValue(_id+'_t',s);if(_tbr!=null){if(s.length!=0){_tbr.innerHTML=s;}else{_m.deleteRow(0);_tbr=null;};}else if(s.length!=0){test=_m.insertRow(0);_tbr=test.insertCell(0);_tbr.id=_id+'_ot';_tbr.innerHTML=s;};__us();__fe('TitleBarChanged');}catch(ex){__throwError('setTitleBar',6,s,ex.message,ex);};};this.setSearchPattern=__sspn;function __sspn(s,isCallBack){__sspf(s);if(!isCallBack){__ucn(__gu(),s);};};this.setVisibility=__sv;function __sv(s){try{if(s=='visible'||s=='inherit'){__setValue(_id+'_v','true');}else{__setValue(_id+'_v','false');};_span.style.visibility=s;_m.style.visibility='inherit';_viewPort.style.visibility='inherit';if(s=='visible'||s=='inherit'){__avp();};__fe('VisibilityChanged');}catch(ex){__throwError('setVisibility',6,s,ex.message,ex);};};this.setWidth=__sw;function __sw(i){__setValue(_id+'_w',i);__avp();__fe('SizeChanged');};this.Focus=__f;function __f(){__bc('Focus();');};this.OpenUrl=__ou;function __ou(u,s){if(s==null)s='';if(__gsix()!=-1){__sth(-1);};__sspf(s);__ucn(u,s);__su(u);};this.Update=__fu;function __fu(){__uc(true);};this.PauseRefresh=__pr;function __pr(){__bc('PauseRefresh();');};this.ResumeRefresh=__rr;function __rr(){__bc('ResumeRefresh();');};this.ScrollBy=__sb;function __sb(x,y){if(isFinite(x)&&isFinite(y)){__bc('ScrollBy('+x+','+y+');')};};this.ScrollTo=__st;function __st(x,y){if(isFinite(x)&&isFinite(y)){__bc('ScrollTo('+x+','+y+');')};};this.SelectThumb=__sth;function __sth(i){__bc('SelectThumb('+i+');');};this.UpdateThumb=__ut;function __ut(i){__bc('UpdateThumb('+i+');');};this.OpenSelected=__osth;function __osth(i){if(i>=0&&i<__gct()){var vid=__gvid();if(vid!=''){if(__gspn()!=''){var f=__getObj(_id+'_of');f.src=_p+'?atalaopenthumb=true'+'&atala_id='+_id+'&atala_tg='+vid+'&atala_si='+__gu()+'&atala_cin='+i+'&atala_dsp='+__gspn()+'&atala_rnd='+Math.round(Math.random()*100000000);}else{var s='if ('+vid+'.setParentControl){';s+=vid+'.setParentControl('+_id+');};';s+=vid+'.OpenUrl("'+__gu()+'",'+i;if(__gu()!=''){s+=');'}else{s+=', "'+__gisu()+'");'};if(eval(vid+' != null')){eval(s);}else window.setTimeout(s,1000);};};};};this.Invalidate=__invalidate;function __invalidate(){__bc('Invalidate();');};this.isReady=__isReady;function __isReady(){try{return(__bc('isInitialized')&&__bc('isInitialized()'));}catch(ex){return false;};};function __isDropTarget(){return true;};var _dropValue=255,_dropInc=25,_dropAni=false,_dropStyle='';function __showDropIndicator(){_dropAni=true;_dropStyle=_m.style.border;__animateDropIndicator();};function __hideDropIndicator(){_dropAni=false;_m.style.border=_dropStyle;};function __animateDropIndicator(){if(_dropAni){if(_dropValue+_dropInc<=0||_dropValue+_dropInc>=255){_dropInc=-_dropInc;};_dropValue+=_dropInc;_m.style.border='3px solid rgb('+255+', '+_dropValue+', '+_dropValue+')';setTimeout(__animateDropIndicator,50);};};function __copyObjectToChild(o){var n=_viewPort.ownerDocument.createElement(o.tagName);n.innerHTML=o.innerHTML;for(var i in o){try{n.setAttribute(i,o.getAttribute(i));}catch(e){};};for(var i in o.style){try{n.style[i]=o.style[i];}catch(e){};};return n;};this.clearThumbCaptions=__ctc;function __ctc(){atalaThumbnailCaptions=new Array();};function __sspf(s){__setValue(_id+'_dsp',s);};this.setThumbCaptions=__stc;function __stc(s){__setValue(_id+'_tcj',s);};this.DoCallBack=__dcb;function __dcb(qs){var f=__getObj(_id+'_of');f.src=qs;};this.DoServerDragDrop=__serverDragDrop;function __serverDragDrop(e){var qs=_p+'?ataladragdrop=true'+'&atala_id='+_id+'&atala_si='+__gu()+'&atala_cin='+e.index+'&atala_dgi='+e.dragIndex+'&atala_dpi='+e.dropIndex+'&atala_rnd='+Math.round(Math.random()*100000000),s=__gspn();if(s!=''){qs+='&atala_dsp='+s;};__dcb(qs);};this.ServerDragDropCallback=__serverDragDropCallback;function __serverDragDropCallback(dgi,dpi,b,msg){__bc('ServerDragDropCallback();');var e=new Object();e.dragIndex=dgi;e.dropIndex=dpi;e.success=b;e.error=msg;__fe('ThumbnailDropServer',e);};this.setUrl=__su;function __su(url){__setValue(_id+'_uri',url);};this.getPagePath=__gpp;function __gpp(){return _p;};this.getThumbDomObjects=__gtdo;function __gtdo(){return __bc('getThumbDomObjects();');};function __gisu(){return __getValue(_id+'_isu');};function __ucn(u,s){var qs=_p+'?atalagetcount=true'+'&atala_id='+_id+'&atala_si='+u+'&atala_rnd='+Math.round(Math.random()*100000000);if(s!=''){qs+='&atala_dsp='+s;};__dcb(qs);};this.setCount=__sc;function __sc(n){__setValue(_id+'_tc',n);__fe('CountChanged');};function __ssix(n){__setValue(_id+'_cin',n);};function __avp(){var w=__gw(),h=__gh();_span.style.width=w;_span.style.height=h;if(w.indexOf('%')>0){_m.style.width='100%';_l.style.width='100%';_viewPort.style.width='100%';}else{_m.style.width=w;_l.style.width=w;_viewPort.style.width=w;};if(h.indexOf('%')>0){_span.style.display='block';_m.style.height='100%';_l.style.height='100%';_viewPort.style.height='100%';}else{_m.style.height=h;_l.style.height=h;_viewPort.style.height=h;};};function __us(){var bg=__gbgc(),bc=__gbc(),bw=__gbw(),fg=__gfgc(),fn=__gf();if(_tbr!=null){_tbr.parentNode.style.background=bg;_tbr.style.color=fg;_tbr.style.fontFamily=fn;_tbr.style.fontWeight='bold';};if(_cn!=null){_cn.parentNode.style.background=bg;_cn.style.color=fg;_cn.style.fontFamily=fn;};_m.cellSpacing=parseInt(bw);_m.style.background=bc;_m.style.color=fg;_m.style.fontFamily=fn;};this.LinkViewer=__lv;function __lv(){var vid=__gvid();if(vid!=''){var viewer=eval(vid);if(viewer!=undefined){if(viewer.setParentControl){viewer.setParentControl(_s);};}else{setTimeout(_id+'.LinkViewer();',50);};viewer=null;};};};if(_atalaInUpdatePanel&&Sys&&Sys.Application){Sys.Application.notifyScriptLoaded();};
