var atalaWebThumbnailViewerLoaded=true,atalaWebThumbnailViewerVersion="5.0a",atalaThumbnailViewers=new Array(),atalaThumbnailCaptions=new Array();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,_vp=null,_traceLog;function __tla(s){if(_traceLog==null)_traceLog=window.open('','atalaTraceLog');_traceLog.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.SelectedIndexChanged=function(){};this.ThumbnailClicked=function(){};this.FireEvent=__fe;function __fe(en){var f;try{f=eval('_s.'+en);f();}catch(ex){atalaThrowError(_id+'.'+en,-1,'\n'+f,ex.message);};f=null};atalaThumbnailViewers.push(this);__i();function __i(){_m=document.getElementById(_id+'_om');if(_m!=null){_l=atalaGetObject(_id+'_ol');_span=document.getElementById(_id);if(_span==null){_span=_m.parentNode;};_tbr=document.getElementById(_id+'_ot');_cn=document.getElementById(_id+'_oc');_vp=atalaGetObject(_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+'");');__uc();__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;_vp=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[_vp.id]._child.'+exp;}else{s='_vp.contentWindow._child.'+exp;};return eval(s);};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=__getAllowMultiSelect;function __getAllowMultiSelect(){if(atalaGetFormValue(_f,_id+'_ams').toLowerCase()=='true'){return true;}else{return false;};};this.getBackColor=__gbgc;function __gbgc(){return atalaGetFormValue(_f,_id+'_bgc');};this.getBorderColor=__gbc;function __gbc(){return atalaGetFormValue(_f,_id+'_bc');};this.getBorderStyle=__gbs;function __gbs(){return atalaGetFormValue(_f,_id+'_bs');};this.getBorderWidth=__gbw;function __gbw(){return atalaGetFormValueInt(_f,_id+'_bw');};this.getBrowserFormat=__gbf;function __gbf(){return atalaGetFormValueInt(_f,_id+'_bf');};this.getCachePath=__gcp;function __gcp(){return atalaGetFormValue(_f,_id+'_cp');};this.getCaption=__gcn;function __gcn(){return atalaGetFormValue(_f,_id+'_ca');};this.getCentered=__gc;function __gc(){if(atalaGetFormValue(_f,_id+'_c').toLowerCase()=='true'){return true;}else{return false;};};this.getColumns=__gcl;function __gcl(){return atalaGetFormValueInt(_f,_id+'_cs');};this.getCount=__gct;function __gct(){return atalaGetFormValueInt(_f,_id+'_tc');};this.getFont=__gf;function __gf(){return atalaGetFormValue(_f,_id+'_f');};this.getForeColor=__gfgc;function __gfgc(){return atalaGetFormValue(_f,_id+'_fc');};this.getHeight=__gh;function __gh(){return atalaGetFormValue(_f,_id+'_h');};this.getScrollPosition=__gsp;function __gsp(){return new atalaPoint(-atalaGetFormValueInt(_f,_id+'_spx'),-atalaGetFormValueInt(_f,_id+'_spy'));};this.getPathToResources=__gptr;function __gptr(){return atalaGetFormValue(_f,_id+'_pr');};this.getRows=__gr;function __gr(){return atalaGetFormValueInt(_f,_id+'_rs');};this.getScrollBarVisibility=__gsbv;function __gsbv(){return atalaGetFormValueInt(_f,_id+'_sv');};function __gsbh(){return atalaGetFormValueInt(_f,_id+'_sbh');};function __gsbw(){return atalaGetFormValueInt(_f,_id+'_sbw');};this.getSize=__gs;function __gs(){return new atalaSize(atalaGetFormValueInt(_f,_id+'_w'),atalaGetFormValueInt(_f,_id+'_h'));};this.getImageDisplayOrder=__gido;function __gido(){return atalaGetFormValueInt(_f,_id+'_tm');};this.getLayout=__gl;function __gl(){return atalaGetFormValueInt(_f,_id+'_tl');};this.getFlowDirection=__gfd;function __gfd(){return atalaGetFormValueInt(_f,_id+'_tf');};this.getSearchPattern=__gspn;function __gspn(){return atalaGetFormValue(_f,_id+'_dsp');};this.getSelectedIndex=__gsix;function __gsix(){return atalaGetFormValueInt(_f,_id+'_cin');};this.getSelectedIndexes=__getSelectedIndexes;function __getSelectedIndexes(){return atalaGetFormValue(_f,_id+'_cins').parseJSON();};this.getThumbPadding=__gtp;function __gtp(){return atalaGetFormValueInt(_f,_id+'_tp');};this.getThumbSize=__gths;function __gths(){return new atalaSize(atalaGetFormValueInt(_f,_id+'_tw'),atalaGetFormValueInt(_f,_id+'_th'));};this.getThumbSpacing=__gtsp;function __gtsp(){return atalaGetFormValueInt(_f,_id+'_ts');};this.getTitleBar=__gtb;function __gtb(){return atalaGetFormValue(_f,_id+'_t');};this.getUrl=__gu;function __gu(){return atalaGetFormValue(_f,_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 atalaGetFormValue(_f,_id+'_wiv');};function __gvs(){if(atalaGetFormValue(_f,_id+'_v').toLowerCase()=='true'){return true;}else{return false;};};this.getWidth=__gw;function __gw(){return atalaGetFormValue(_f,_id+'_w');};function __gws(){return __bc('getWindowSize();');};this.setBackColor=__sbgc;function __sbgc(s){try{atalaSetFormValue(_f,_id+'_bgc',s);__bc('setBackColor("'+s+'");');__updateStyle();__fe('BackColorChanged');}catch(ex){atalaThrowError('setBackColor',6,s,ex.message);};};this.setBorderColor=__sbc;function __sbc(s){try{atalaSetFormValue(_f,_id+'_bc',s);__updateStyle();__fe('BorderColorChanged');}catch(ex){atalaThrowError('setBorderColor',6,s,ex.message);};};this.setBorderStyle=__sbs;function __sbs(s){try{atalaSetFormValue(_f,_id+'_bs',s);_m.style.border=s;__fe('BorderStyleChanged');}catch(ex){atalaThrowError('setBorderStyle',6,s,ex.message);};};this.setBorderWidth=__sbw;function __sbw(s){try{atalaSetFormValue(_f,_id+'_bw',s);__updateStyle();__fe('BorderWidthChanged');}catch(ex){atalaThrowError('setBorderWidth',6,s,ex.message);};};this.setCaption=__scn;function __scn(s){try{atalaSetFormValue(_f,_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;};__updateStyle();__fe('CaptionChanged');}catch(ex){atalaThrowError('setCaption',6,s,ex.message);};};this.setCentered=__scd;function __scd(b){if(atalaCheckBool(b)==true){atalaSetFormValue(_f,_id+'_c',b);__bc('Center('+b+');');__fe('CenteredChanged');}else{atalaThrowError('setCentered',5,b,'');};};this.setFont=__sf;function __sf(s){try{atalaSetFormValue(_f,_id+'_f',s);__updateStyle();__fe('FontChanged');}catch(ex){atalaThrowError('setFont',6,s,ex.message);};};this.setForeColor=__sfgc;function __sfgc(s){try{atalaSetFormValue(_f,_id+'_fc',s);__updateStyle();__fe('ForeColorChanged');}catch(ex){atalaThrowError('setForeColor',6,s,ex.message);};};this.setHeight=__sh;function __sh(i){atalaSetFormValue(_f,_id+'_h',i);__avp();__fe('SizeChanged');};function __su(url){atalaSetFormValue(_f,_id+'_uri',url);};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{atalaThrowError('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;};atalaSetFormValue(_f,_id+'_spx',-p.X);atalaSetFormValue(_f,_id+'_spy',-p.Y);if(u==true){__uc();};__fe('ScrollPositionChanged');}catch(ex){atalaThrowError('setScrollPosition',6,p.X+"x"+p.Y,ex.message);};};this.setTitleBar=__stb;function __stb(s){try{atalaSetFormValue(_f,_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;};__updateStyle();__fe('TitleBarChanged');}catch(ex){atalaThrowError('setTitleBar',6,s,ex.message);};};this.setSearchPattern=__sspn;function __sspn(s,isCallBack){__setSearchPatternForm(s);if(!isCallBack){__ucn(__gu(),s);};};function __setSearchPatternForm(s){atalaSetFormValue(_f,_id+'_dsp',s);};this.setThumbCaptions=__stc;function __stc(s){atalaSetFormValue(_f,_id+'_tcf',s);};this.getThumbCaption=__gthc;function __gthc(i){var captions=atalaGetFormValue(_f,_id+'_tcf').parseJSON();if(i<captions.length){return captions[i];}else{return'';};};this.clearThumbCaptions=__ctc;function __ctc(){atalaThumbnailCaptions=new Array();};this.setVisibility=__sv;function __sv(s){try{if(s=='visible'){atalaSetFormValue(_f,_id+'_v','true');}else{atalaSetFormValue(_f,_id+'_v','false');};_span.style.visibility=s;_m.style.visibility=s;_vp.style.visibility=s;if(s=='visible'){__avp();};__fe('VisibilityChanged');}catch(ex){atalaThrowError('setVisibility',6,s,ex.message);};};this.setWidth=__sw;function __sw(i){atalaSetFormValue(_f,_id+'_w',i);__avp();__fe('SizeChanged');};this.OpenUrl=__ou;function __ou(u,s){if(s==null)s='';if(__gsix()!=-1){__sth(-1);};__setSearchPatternForm(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.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=atalaGetObject(_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=vid+'.OpenUrl("'+__gu()+'",'+i+');';if(eval(vid+' != null'))eval(s);else window.setTimeout(s,1000);};};};};this.getPagePath=__gpp;function __gpp(){return _p;};this.getThumbDomObjects=__getThumbDomObjects;function __getThumbDomObjects(){return __bc('getThumbDomObjects();');};function __ucn(u,s){var f=atalaGetObject(_id+'_of'),np=_p+'?atalagetcount=true'+'&atala_id='+_id+'&atala_si='+u+'&atala_rnd='+Math.round(Math.random()*100000000);if(s!='')np+='&atala_dsp='+s;f.src=np;};this.setCount=__sc;function __sc(n){atalaSetFormValue(_f,_id+'_tc',n);__fe('CountChanged');};function __ssix(n){atalaSetFormValue(_f,_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%';_vp.style.width='100%';}else{_m.style.width=w;_l.style.width=w;_vp.style.width=w;};if(h.indexOf('%')>0){_span.style.display='block';_m.style.height='100%';_l.style.height='100%';_vp.style.height='100%';}else{_m.style.height=h;_l.style.height=h;_vp.style.height=h;};};function __updateStyle(){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;};};
