//********************************************************************************************************** // EO.Web Script Library. Copyright (C) 2004-2006 Essential Objects, Inc. All rights reserved. // Visit Us on the Web: http://www.essentialobjects.com // Version: 5.0.16.2 //********************************************************************************************************** var eo_sg=0;var eo_sh=1;var eo_si=2;var eo_sj=3;var eo_sk=4;var eo_sl=100000;function _eofup_a(a,b,c,d){this.aasm=a;this.aasn=b;this.aaso=c;this.aasp=d;}function _eofup_b(a){var b=a;if(!b)b="{posted_file_name} - {posted_file_type} ({posted_file_size}bytes)";b=b.replace(/\{posted_file_name\}/g,this.aasn);b=b.replace(/\{posted_file_type\}/g,this.aaso);b=b.replace(/\{posted_file_size\}/g,this.aasp);return b;}function _eofup_c(){return this.aasn;}function _eofup_d(){return this.aaso;}function _eofup_e(){return this.aasp;}_eofup_a.prototype.aol=_eofup_b;_eofup_a.prototype.getClientFileName=_eofup_c;_eofup_a.prototype.getContentType=_eofup_d;_eofup_a.prototype.getFileSize=_eofup_e;function _eofup_f(a){if(a)this.aasq(a);}function _eofup_g(a){this.acv(a[0]);this.aasr(a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);}function _eofup_h(a,b,c,d,e,f,g,h,i,j,k){this.beb=a==null?1:a;this.aass=b;this.afg=eo_sg;this.aast=c;this.aasu=d;this.aasv=e;this.aasw=i;this.aasx=f;this.aasy=g;this.aasz=new Array();if(h){for(var l=0;l";e=document.getElementById(g);}else{e=document.createElement("INPUT");e.type="file";e.id=e.name=g;}if(this.aatk!=null){if(this.aatk>0){e.disabled=false;c.disabled=false;f.disabled=false;this.aatk--;}else{e.disabled=true;c.disabled=true;f.disabled=true;}}if(_eofi_au()=="IE"){if(_eofu_ee(document))b.rows[0].cells[1].style.paddingLeft="8px";}else if(_eofi_au()=="MZ"){var h=document.createElement("INPUT");h.type="file";h.style.position="absolute";h.style.left="0px";h.style.top="-3000px";h.size=10;this.aatl=h;d.appendChild(h);b.rows[0].cells[1].style.paddingLeft="8px";}e.eo_sn=c;c.value="";e.eo_so=this;if(_eofi_au()!="SA"){e.onkeyup=_eofup_q;e.onmouseout=_eofup_q;d.appendChild(e);c.style.width="100%";}e.style.display="block";if((_eofi_au()=="IE")||(_eofi_au()=="MZ")){b.style.display="block";_eofu_em(e,1);}else if(_eofi_au()){b.style.display="none";d.style.position="";}}_eofu_aq(this,eo_as,100);}function _eofup_q(){var a=this;var b=this.eo_sn;if(b.value!=a.value)b.value=a.value;if(this.eo_so.aatg)this.eo_so.aatg.disabled=!a.value;}function _eofup_r(){var a=this.parentElement;var b=_eofu_ac(a);if(!b){if(!_eofu_ee(this))return"100%";else return"auto";}else return _eofu_ab(b);}function _eofup_s(a){return _eofi_ep("4EF2A06E-5171-4166-82A6-242BD1985E8A")+"&uploader_data="+a.ba();}function _eofup_t(){if(this.afg!=eo_sg){this.aasd();return;}var a=this.aatm(true);if(!a){this.aatd();this.aagq();return;}this.aatn=null;if(this.aasv)this.aatn=EO.Web.getObject(this.aasv);if(!this.aatn)this.aato();else{this.aatn.aatp=this;this.aatn.show(true);}this.aatq=null;this.aatr=new _eofi_el();this.aats=new Array();this.aatt=this.aatu=null;this.aatv();this.aatw=new _eofup_az(0);if(this.aath)this.aath.disabled=true;this.afg=eo_sh;var b=new _eofi_bs("new_session");b.az(this.c,new _eofi_bs(this.aass));b.az("fc",new _eofi_bs(this.aatm(false)));this.aatx(b);_eofu_aq(this,eo_au,150,true);}function _eofup_u(a){this.aatp.aal("in_progress","An AJAX Uploading session is currently in progress.");}function _eofup_v(a){this.bpp=_eofc_a();if(this.bpp){var b=this;this.bpp.onreadystatechange=function(){b.aaty()};var c=_eofup_s(a);this.bpp.open("POST",c,true);this.bpp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");this.bpp.setRequestHeader("delta","true");this.bpp.setRequestHeader("Cache-Control","no-cache");this.bpp.send("");}}function _eofup_w(){if(this.bc)return;var a=this.bpp;if(a.readyState&&((a.readyState==4)||(a.readyState=="complete"))){if(a.responseXML){var b=this.aatz(a.responseXML);if(!b&&(this.afg!=eo_sg)){var c=a.responseText;if(!c){_eofi_k("AJAXUploader '"+this.c+"' has failed due to a "+"server or network problem.");}else{_eofi_k("AJAXUploader '"+this.c+"' has failed due to a "+"server side exception. Click OK to see the exception message.");this.bpw=c;window.setTimeout("eo_Callback_UpdateDocument(\""+this.c+"\");",100);}this.aagq();}}}}function _eofup_x(a,b){var c=_eofc_b(a,"Command");if(!c)return false;var d=_eofu_eo(c);return d==b;}function _eofup_y(a){var b=a.documentElement;if(b&&b.firstChild){if(this.afg==eo_sh){if(!this.aaua(b,"NewSession"))return;var c=_eofc_b(b,"Error");if(c){_eofi_k(c.firstChild.nodeValue);this.aagq();return true;}b=_eofc_b(b,"SessionID");this.aasi=b.firstChild.nodeValue;_eofu_aq(this,eo_ar,0);}else if(this.afg==eo_si){if(!this.aaua(b,"GetProgress"))return;this.aatt=parseInt(_eofc_b(b,"Total").firstChild.nodeValue);var d=parseInt(_eofc_b(b,"Received").firstChild.nodeValue);this.aaub=parseInt(_eofu_eo(_eofc_b(b,"TotalFiles")));this.aauc=parseInt(_eofu_eo(_eofc_b(b,"TransferredFiles")));this.aaud=_eofu_eo(_eofc_b(b,"CurrentFileName"));if((d>0)&&(d=0)&&(d>this.aatt))d=this.aatt;this.aatu=d;if(this.aatw){this.aatw.aagq(d);_eofi_v(this.aats,this.aatw);this.aatw=null;}if((this.aatt>0)&&(this.aatu>=0)){this.aatv();this.aatw=new _eofup_az(this.aatu);}if(this.aatt>=0){if(this.aatu<0){switch(this.aatu){case-1:this.aal("unknown_error","An unknown error has occurred.");break;case-2:this.aal("max_size_exceeded","The size of the submitted data exceeded MaxDataSize.");break;case-3:break;case-4:this.aal("aborted","The server has aborted the uploading process because httpRuntime -> executionTimeout has been met. Please modify your web.config to give it a larger value.");break;case-5:this.aal("module_required","EO.Web.Runtime must be added into your web.config's httpModules section because another HttpModule (Usually FormsAuthenticationModule) fetched the upload data before it reaches AJAXUploader. Please see \"Using AJAXUploader\" in the help file for details.");break;}this.aagq();return true;}else if(this.aatu>=this.aatt){this.aagq();this.aaue(_eofc_b(b,"PostedFiles"));this.aatf();_eofu_aq(this,eo_av,0);return true;}_eofu_aq(this,eo_at,eo_sl);}var e=0;if(this.aatr!=null)e=this.aatr.v();if(e<200)_eofu_aq(this,eo_aq,20);else if(e<1000)_eofu_aq(this,eo_aq,100);else if(e<3000)_eofu_aq(this,eo_aq,300);else _eofu_aq(this,eo_aq,1000);}else if(this.afg==eo_sj){if(!this.aaua(b,"DeleteFile"))return;this.afg=eo_sg;this.aaue(_eofc_b(b,"PostedFiles"));if(this.aatb)this.aatf();this.abv(eo_aw);}else if(this.afg==eo_sk){this.aagq();this.aatf();}return true;}return false;}function _eofup_z(a){if(a==eo_ar){var b=new _eofi_bs("upload");b.az(this.c,new _eofi_bs(this.aass));b.az("s",new _eofi_bs(this.aasi));eo_h.eo_sc=eo_h.target;eo_h.eo_sp=eo_h.action;eo_h.eo_sq=eo_h.enctype;eo_h.eo_sr=eo_h.encoding;eo_h.target=this.c+"_frame";eo_h.action=_eofup_s(b);eo_h.enctype="multipart/form-data";eo_h.encoding="multipart/form-data";try{eo_h.submit();this.afg=eo_si;_eofu_aq(this,eo_aq,10);_eofu_aq(this,eo_at,eo_sl);}catch(e){this.aagq();}}else if(a==eo_aq){if(this.aasi){var b=new _eofi_bs("get_progress");b.az(this.c,new _eofi_bs(this.aass));b.az("s",new _eofi_bs(this.aasi));b.az("ds",new _eofi_bs(this.aauf()));this.aatx(b);}}else if(a==eo_as){if(!this.aaug())_eofu_aq(this,eo_as,100);}else if(a==eo_at){if(this.afg==eo_si){this.aagq();this.aal("timeout","AJAX call to the server times out.");}}else if(a==eo_au){this.aatv();}else if(a==eo_av){if(this.aasw==null)this.aasw=new Array();this.aatt=this.aatu=null;this.aatv();_eofi_v(this.aasw,this.aasi);if(this.aasx)this.adu();}else if(a==eo_aw){var c=this.aatm(false);if(this.aatg)this.aatg.disabled=!c||(this.afg!=eo_sg);if(this.aath){var d=false;for(var e=0;eb){this.aatl.size=this.aatl.size-1;c=_eofu_ac(this.aatl);}c=this.aatl.size;for(var a=0;a0)&&(b>0)&&this.aats&&this.aats.length){var d=this.aats[this.aats.length-1];c=d.aaui(a);}if((a>0)&&(b>0)){if(c&&this.aatq&&(c0)f(this,a,c);else f(this,null,null);}catch(e){}}}}function _eofup_ad(a,b,c,d,e,f){if(c){if(b>0){var g=c.getMaximum()-c.getMinimum();var h=Math.round(b/a*g+c.getMinimum());c.setValue(h)}else c.setValue(c.getMinimum());}if(d){if(b>0){var i=e;if(!i)i="Uploading...{transferred} bytes of {total} bytes ({percentage}%) done.";i=i.replace(/\{transferred\}/g,b);i=i.replace(/\{total\}/g,a);i=i.replace(/\{percentage\}/g,this.getPercentage());i=i.replace(/\{current_file_name\}/g,this.getCurrentFileName());i=i.replace(/\{total_file_count\}/g,this.getTotalFileCount());i=i.replace(/\{transferred_file_count\}/g,this.getTransferredFileCount());i=i.replace(/\{elapsed_seconds\}/g,this.getElapsedSeconds());i=i.replace(/\{estimated_remaining_seconds\}/g,this.getEstimiatedSecondsRemaining());d.innerHTML=i;}else{d.innerHTML="";}}if(f)f.disabled=!(b>0);}function _eofup_ae(){_eofu_ar(this,eo_at);_eofu_ar(this,eo_aq);if(this.afg!=eo_sg){if(this.aasi){var a=new _eofi_bs("cancel");a.az(this.c,new _eofi_bs(this.aass));a.az("s",new _eofi_bs(this.aasi));this.aatx(a);this.afg=eo_sk;}}this.aatt=-1;this.aatu=-1;this.aats=null;this.aatv();if(!this.aasi)this.aagq();this.aasi=null;}function _eofup_af(){if(this.aatq>0)return Math.round(this.aatq*100/this.aatt);else if(this.aatu>0)return Math.round(this.aatu*100/this.aatt);else return null;}function _eofup_ag(){if(this.aatt<0)return null;return this.aatt;}function _eofup_ah(){if(this.aatu<0)return null;if(this.aatq>0)return this.aatq;return this.aatu;}function _eofup_ai(){if(this.aatr!=null)return Math.round(this.aatr.v()/1000);else return null;}function _eofup_aj(){if(!this.aats)return 0;var a=this.aats.length-3;if(a<0)a=0;var b=this.aats.length-1;var c=this.aats[a].aaul(this.aats[b]);return c;}function _eofup_ak(){if(!this.aats||!this.aatt)return null;var a=this.getSpeed();if(a==0)a=1;var b=this.getTotalBytes();var c=this.getTransferredBytes();var d=b-c;if(d<0)d=0;return Math.round(d/a);}function _eofup_al(){if(this.afg!=eo_sg)return;if(this.aath){for(var a=0;a=h.length)){var i=f.substring(f.length-h.length);if(i==h){e=true;break;}}}if(!e){this.aal("extension_not_allowed","File '"+f+"' has an extension that is not allowed.");return 0;}}b++;}}return b;}function _eofup_aq(){var a=null;if(this.aasw){for(var b=0;b"+k+"
";h+=k;}this.aatj.innerHTML=h;}if(this.aath){if(this.aasz.length)this.aath.style.display="block";else this.aath.style.display="none";}}function _eofup_at(){return this.aaud;}function _eofup_au(){return this.aaub;}function _eofup_av(){return this.aauc;}function _eofup_aw(){if(!this.aata)return null;var a="";for(var b=0;b0)a+="|";a+=this.aata[b];}return a;}function _eofup_ax(a){if(a){a=a.toLowerCase();this.aata=a.split("|");this.aaum=a;}else{this.aata=null;this.aaum=" ";}}function _eofup_ay(){return this.aasz;}_eofup_f.prototype=new _eofu_dm();_eofup_f.prototype.aasq=_eofup_g;_eofup_f.prototype.aasr=_eofup_h;_eofup_f.prototype.aasd=_eofup_i;_eofup_f.prototype.aas=_eofup_m;_eofup_f.prototype.aaun=_eofup_m;_eofup_f.prototype.bq=_eofup_o;_eofup_f.prototype.aatf=_eofup_p;_eofup_f.prototype.aatc=_eofup_t;_eofup_f.prototype.abv=_eofup_z;_eofup_f.prototype.aaty=_eofup_w;_eofup_f.prototype.aatx=_eofup_v;_eofup_f.prototype.aatz=_eofup_y;_eofup_f.prototype.aaua=_eofup_x;_eofup_f.prototype.aaug=_eofup_aa;_eofup_f.prototype.aagq=_eofup_ab;_eofup_f.prototype.aatv=_eofup_ac;_eofup_f.prototype.aauj=_eofup_ad;_eofup_f.prototype.aatd=_eofup_ae;_eofup_f.prototype.aate=_eofup_al;_eofup_f.prototype.aato=_eofup_am;_eofup_f.prototype.aasf=_eofup_an;_eofup_f.prototype.aatm=_eofup_ap;_eofup_f.prototype.bd=_eofup_ar;_eofup_f.prototype.bb=_eofi_cl;_eofup_f.prototype.aaue=_eofup_as;_eofup_f.prototype.aauf=_eofup_aq;_eofup_f.prototype.h=_eofup_n;_eofup_f.prototype.getPercentage=_eofup_af;_eofup_f.prototype.getTotalBytes=_eofup_ag;_eofup_f.prototype.getTransferredBytes=_eofup_ah;_eofup_f.prototype.getElapsedSeconds=_eofup_ai;_eofup_f.prototype.getEstimiatedSecondsRemaining=_eofup_ak;_eofup_f.prototype.getSpeed=_eofup_aj;_eofup_f.prototype.getCurrentFileName=_eofup_at;_eofup_f.prototype.getTotalFileCount=_eofup_au;_eofup_f.prototype.getTransferredFileCount=_eofup_av;_eofup_f.prototype.getAllowedExtension=_eofup_aw;_eofup_f.prototype.setAllowedExtension=_eofup_ax;_eofup_f.prototype.getPostedFiles=_eofup_ay;function _eofup_az(a){this.aatr=new _eofi_el();this.aauo=a?a:0;}function _eofup_ba(a){this.aaup=new _eofi_el();this.aauq=a;}function _eofup_bb(a){var b=a.aauq-this.aauo;var c=_eofi_em(this.aatr.al(),a.aaup.al());c=c/1000;var d=Math.round(b/c);return d;}function _eofup_bc(a){var b=this.aatr;var c=this.aaup;var d=new _eofi_el();var e=_eofi_em(b.al(),c.al());var f=_eofi_em(c.al(),d.al());if(e==0)return this.aauq;if(f>eo_sl)f=eo_sl;var g=(this.aauq-this.aauo)*(e+f)/e+this.aauo;g=Math.round(g);if(g>=a)g=a-1;return g;}_eofup_az.prototype.aagq=_eofup_ba;_eofup_az.prototype.aaul=_eofup_bb;_eofup_az.prototype.aaui=_eofup_bc;function _eofup_bd(a){if(a)this.aaur(a);}function _eofup_be(a){this.ahs(a[0]);this.aaus(a[1],a[2]);}function _eofup_bf(a){this.aasu=a;}function _eofup_bg(a,b){this.alk(a,b);this.aauk=EO.Web.getObject(this.c+"_ProgressBar");this.aati=document.getElementById(this.c+"_pt");this.aiu=document.getElementById(this.c+"_CancelButton");if(this.aiu){this.aiu.eo_ih=this;this.aiu.onclick=_eofup_bi;_eofc_am(this.aiu);}}function _eofup_bh(){this.all();if(this.aiu){this.aiu.eo_ih=null;this.aiu.onclick=null;}}function _eofup_bi(a){var b=this.eo_ih;if(b){b.end();b.aatp.aatd();}_eofi_dt(a);return false;}function fx_UploaderProgressDialog_OnVeilClick(a){if(this.aatp)this.aatp.aasd();}_eofup_bd.prototype=new _eofdg_a();_eofup_bd.prototype.aaur=_eofup_be;_eofup_bd.prototype.aaus=_eofup_bf;_eofup_bd.prototype.aas=_eofup_bg;_eofup_bd.prototype.bq=_eofup_bh;_eofup_bd.prototype.ako=fx_UploaderProgressDialog_OnVeilClick;eo_LoadModules();eo_ModuleLoaded('up');