var swfobject=function(){function v(){var i,r,n;if(!c){try{i=t.getElementsByTagName("body")[0].appendChild(h("span"));i.parentNode.removeChild(i)}catch(u){return}for(c=!0,r=w.length,n=0;n<r;n++)w[n]()}}function yt(n){c?n():w[w.length]=n}function pt(n){if(typeof r.addEventListener!=i)r.addEventListener("load",n,!1);else if(typeof t.addEventListener!=i)t.addEventListener("load",n,!1);else if(typeof r.attachEvent!=i)ui(r,"onload",n);else if(typeof r.onload=="function"){var u=r.onload;r.onload=function(){u();n()}}else r.onload=n}function gt(){lt?ni():it()}function ni(){var o=t.getElementsByTagName("body")[0],u=h(f),r,e;u.setAttribute("type",p);r=o.appendChild(u);r?(e=0,function(){if(typeof r.GetVariable!=i){var t=r.GetVariable("$version");t&&(t=t.split(" ")[1].split(","),n.pv=[parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)])}else if(e<10){e++;setTimeout(arguments.callee,10);return}o.removeChild(u);r=null;it()}()):it()}function it(){var y=s.length,r,t,h,c,v;if(y>0)for(r=0;r<y;r++){var f=s[r].id,e=s[r].callbackFn,o={success:!1,id:f};if(n.pv[0]>0){if(t=u(f),t)if(!g(s[r].swfVersion)||n.wk&&n.wk<312)if(s[r].expressInstall&&ut()){h={};h.data=s[r].expressInstall;h.width=t.getAttribute("width")||"0";h.height=t.getAttribute("height")||"0";t.getAttribute("class")&&(h.styleclass=t.getAttribute("class"));t.getAttribute("align")&&(h.align=t.getAttribute("align"));var p={},a=t.getElementsByTagName("param"),w=a.length;for(c=0;c<w;c++)a[c].getAttribute("name").toLowerCase()!="movie"&&(p[a[c].getAttribute("name")]=a[c].getAttribute("value"));ft(h,p,f,e)}else ti(t),e&&e(o);else l(f,!0),e&&(o.success=!0,o.ref=rt(f),e(o))}else l(f,!0),e&&(v=rt(f),v&&typeof v.SetVariable!=i&&(o.success=!0,o.ref=v),e(o))}}function rt(n){var r=null,t=u(n),e;return t&&t.nodeName=="OBJECT"&&(typeof t.SetVariable!=i?r=t:(e=t.getElementsByTagName(f)[0],e&&(r=e))),r}function ut(){return!d&&g("6.0.65")&&(n.win||n.mac)&&!(n.wk&&n.wk<312)}function ft(f,e,o,s){var c,v,l,a;d=!0;nt=s||null;at={success:!1,id:o};c=u(o);c&&(c.nodeName=="OBJECT"?(y=et(c),k=null):(y=c,k=o),f.id=ht,(typeof f.width==i||!/%$/.test(f.width)&&parseInt(f.width,10)<310)&&(f.width="310"),(typeof f.height==i||!/%$/.test(f.height)&&parseInt(f.height,10)<137)&&(f.height="137"),t.title=t.title.slice(0,47)+" - Flash Player Installation",v=n.ie&&n.win?"ActiveX":"PlugIn",l="MMredirectURL="+r.location.toString().replace(/&/g,"%26")+"&MMplayerType="+v+"&MMdoctitle="+t.title,typeof e.flashvars!=i?e.flashvars+="&"+l:e.flashvars=l,n.ie&&n.win&&c.readyState!=4&&(a=h("div"),o+="SWFObjectNew",a.setAttribute("id",o),c.parentNode.insertBefore(a,c),c.style.display="none",function(){c.readyState==4?c.parentNode.removeChild(c):setTimeout(arguments.callee,10)}()),ot(f,e,o))}function ti(t){if(n.ie&&n.win&&t.readyState!=4){var i=h("div");t.parentNode.insertBefore(i,t);i.parentNode.replaceChild(et(t),i);t.style.display="none",function(){t.readyState==4?t.parentNode.removeChild(t):setTimeout(arguments.callee,10)}()}else t.parentNode.replaceChild(et(t),t)}function et(t){var u=h("div"),e,i,o,r;if(n.win&&n.ie)u.innerHTML=t.innerHTML;else if(e=t.getElementsByTagName(f)[0],e&&(i=e.childNodes,i))for(o=i.length,r=0;r<o;r++)i[r].nodeType==1&&i[r].nodeName=="PARAM"||i[r].nodeType==8||u.appendChild(i[r].cloneNode(!0));return u}function ot(t,r,e){var v,y=u(e),w,o,k,a,c,s,l;if(n.wk&&n.wk<312)return v;if(y)if(typeof t.id==i&&(t.id=e),n.ie&&n.win){w="";for(o in t)t[o]!=Object.prototype[o]&&(o.toLowerCase()=="data"?r.movie=t[o]:o.toLowerCase()=="styleclass"?w+=' class="'+t[o]+'"':o.toLowerCase()!="classid"&&(w+=" "+o+'="'+t[o]+'"'));k="";for(a in r)r[a]!=Object.prototype[a]&&(k+='<param name="'+a+'" value="'+r[a]+'" />');y.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+w+">"+k+"<\/object>";b[b.length]=t.id;v=u(t.id)}else{c=h(f);c.setAttribute("type",p);for(s in t)t[s]!=Object.prototype[s]&&(s.toLowerCase()=="styleclass"?c.setAttribute("class",t[s]):s.toLowerCase()!="classid"&&c.setAttribute(s,t[s]));for(l in r)r[l]!=Object.prototype[l]&&l.toLowerCase()!="movie"&&ii(c,l,r[l]);y.parentNode.replaceChild(c,y);v=c}return v}function ii(n,t,i){var r=h("param");r.setAttribute("name",t);r.setAttribute("value",i);n.appendChild(r)}function wt(t){var i=u(t);i&&i.nodeName=="OBJECT"&&(n.ie&&n.win?(i.style.display="none",function(){i.readyState==4?ri(t):setTimeout(arguments.callee,10)}()):i.parentNode.removeChild(i))}function ri(n){var t=u(n),i;if(t){for(i in t)typeof t[i]=="function"&&(t[i]=null);t.parentNode.removeChild(t)}}function u(n){var i=null;try{i=t.getElementById(n)}catch(r){}return i}function h(n){return t.createElement(n)}function ui(n,t,i){n.attachEvent(t,i);a[a.length]=[n,t,i]}function g(t){var r=n.pv,i=t.split(".");return i[0]=parseInt(i[0],10),i[1]=parseInt(i[1],10)||0,i[2]=parseInt(i[2],10)||0,r[0]>i[0]||r[0]==i[0]&&r[1]>i[1]||r[0]==i[0]&&r[1]==i[1]&&r[2]>=i[2]?!0:!1}function bt(r,u,o,s){var a,c,l;n.ie&&n.mac||(a=t.getElementsByTagName("head")[0],a)&&(c=o&&typeof o=="string"?o:"screen",s&&(e=null,tt=null),e&&tt==c||(l=h("style"),l.setAttribute("type","text/css"),l.setAttribute("media",c),e=a.appendChild(l),n.ie&&n.win&&typeof t.styleSheets!=i&&t.styleSheets.length>0&&(e=t.styleSheets[t.styleSheets.length-1]),tt=c),n.ie&&n.win?e&&typeof e.addRule==f&&e.addRule(r,u):e&&typeof t.createTextNode!=i&&e.appendChild(t.createTextNode(r+" {"+u+"}")))}function l(n,t){if(vt){var i=t?"visible":"hidden";c&&u(n)?u(n).style.visibility=i:bt("#"+n,"visibility:"+i)}}function kt(n){var t=/[\\\"<>\.;]/.exec(n)!=null;return t&&typeof encodeURIComponent!=i?encodeURIComponent(n):n}var i="undefined",f="object",st="Shockwave Flash",dt="ShockwaveFlash.ShockwaveFlash",p="application/x-shockwave-flash",ht="SWFObjectExprInst",ct="onreadystatechange",r=window,t=document,o=navigator,lt=!1,w=[gt],s=[],b=[],a=[],y,k,nt,at,c=!1,d=!1,e,tt,vt=!0,n=function(){var l=typeof t.getElementById!=i&&typeof t.getElementsByTagName!=i&&typeof t.createElement!=i,e=o.userAgent.toLowerCase(),s=o.platform.toLowerCase(),a=s?/win/.test(s):/win/.test(e),v=s?/mac/.test(s):/mac/.test(e),y=/webkit/.test(e)?parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,h=!+"\v1",u=[0,0,0],n=null,c;if(typeof o.plugins!=i&&typeof o.plugins[st]==f)n=o.plugins[st].description,!n||typeof o.mimeTypes!=i&&o.mimeTypes[p]&&!o.mimeTypes[p].enabledPlugin||(lt=!0,h=!1,n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),u[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10),u[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10),u[2]=/[a-zA-Z]/.test(n)?parseInt(n.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof r.ActiveXObject!=i)try{c=new ActiveXObject(dt);c&&(n=c.GetVariable("$version"),n&&(h=!0,n=n.split(" ")[1].split(","),u=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]))}catch(w){}return{w3:l,pv:u,wk:y,ie:h,win:a,mac:v}}(),fi=function(){n.w3&&((typeof t.readyState!=i&&t.readyState=="complete"||typeof t.readyState==i&&(t.getElementsByTagName("body")[0]||t.body))&&v(),c||(typeof t.addEventListener!=i&&t.addEventListener("DOMContentLoaded",v,!1),n.ie&&n.win&&(t.attachEvent(ct,function(){t.readyState=="complete"&&(t.detachEvent(ct,arguments.callee),v())}),r==top&&function(){if(!c){try{t.documentElement.doScroll("left")}catch(n){setTimeout(arguments.callee,0);return}v()}}()),n.wk&&function(){if(!c){if(!/loaded|complete/.test(t.readyState)){setTimeout(arguments.callee,0);return}v()}}(),pt(v)))}(),ei=function(){n.ie&&n.win&&window.attachEvent("onunload",function(){for(var r,i,u,f,e=a.length,t=0;t<e;t++)a[t][0].detachEvent(a[t][1],a[t][2]);for(r=b.length,i=0;i<r;i++)wt(b[i]);for(u in n)n[u]=null;n=null;for(f in swfobject)swfobject[f]=null;swfobject=null})}();return{registerObject:function(t,i,r,u){if(n.w3&&t&&i){var f={};f.id=t;f.swfVersion=i;f.expressInstall=r;f.callbackFn=u;s[s.length]=f;l(t,!1)}else u&&u({success:!1,id:t})},getObjectById:function(t){if(n.w3)return rt(t)},embedSWF:function(t,r,u,e,o,s,h,c,a,v){var y={success:!1,id:r};n.w3&&!(n.wk&&n.wk<312)&&t&&r&&u&&e&&o?(l(r,!1),yt(function(){var n,b,p,k,w,d;if(u+="",e+="",n={},a&&typeof a===f)for(b in a)n[b]=a[b];if(n.data=t,n.width=u,n.height=e,p={},c&&typeof c===f)for(k in c)p[k]=c[k];if(h&&typeof h===f)for(w in h)typeof p.flashvars!=i?p.flashvars+="&"+w+"="+h[w]:p.flashvars=w+"="+h[w];if(g(o))d=ot(n,p,r),n.id==r&&l(r,!0),y.success=!0,y.ref=d;else{if(s&&ut()){n.data=s;ft(n,p,r,v);return}l(r,!0)}v&&v(y)})):v&&v(y)},switchOffAutoHideShow:function(){vt=!1},ua:n,getFlashPlayerVersion:function(){return{major:n.pv[0],minor:n.pv[1],release:n.pv[2]}},hasFlashPlayerVersion:g,createSWF:function(t,i,r){return n.w3?ot(t,i,r):undefined},showExpressInstall:function(t,i,r,u){n.w3&&ut()&&ft(t,i,r,u)},removeSWF:function(t){n.w3&&wt(t)},createCSS:function(t,i,r,u){n.w3&&bt(t,i,r,u)},addDomLoadEvent:yt,addLoadEvent:pt,getQueryParamValue:function(n){var r=t.location.search||t.location.hash,u,i;if(r){if(/\?/.test(r)&&(r=r.split("?")[1]),n==null)return kt(r);for(u=r.split("&"),i=0;i<u.length;i++)if(u[i].substring(0,u[i].indexOf("="))==n)return kt(u[i].substring(u[i].indexOf("=")+1))}return""},expressInstallCallback:function(){if(d){var t=u(ht);t&&y&&(t.parentNode.replaceChild(y,t),k&&(l(k,!0),n.ie&&n.win&&(y.style.display="block")),nt&&nt(at));d=!1}}}}(),SWFUpload;SWFUpload==undefined&&(SWFUpload=function(n){this.initSWFUpload(n)});SWFUpload.prototype.initSWFUpload=function(n){try{this.customSettings={};this.settings=n;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(t){delete SWFUpload.instances[this.movieName];throw t;}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 2009-03-25";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.completeURL=function(n){if(typeof n!="string"||n.match(/^https?:\/\//i)||n.match(/^\//))return n;var i=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""),t=window.location.pathname.lastIndexOf("/");return path=t<=0?"/":window.location.pathname.substr(0,t)+"/",path+n};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(n,t){this.settings[n]=this.settings[n]==undefined?t:this.settings[n]};this.ensureDefault("upload_url","");this.ensureDefault("preserve_relative_urls",!1);this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",!1);this.ensureDefault("requeue_on_error",!1);this.ensureDefault("http_success",[]);this.ensureDefault("assume_success_timeout",0);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",!0);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",!1);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_placeholder",null);this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",!1);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;!this.settings.prevent_swf_caching||(this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+(new Date).getTime());this.settings.preserve_relative_urls||(this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url),this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url));delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){var n,t;if(document.getElementById(this.movieName)!==null)throw"ID "+this.movieName+" is already in use. The Flash Object could not be added";if(n=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder,n==undefined)throw"Could not find the placeholder element: "+this.settings.button_placeholder_id;t=document.createElement("div");t.innerHTML=this.getFlashHTML();n.parentNode.replaceChild(t.firstChild,n);window[this.movieName]==undefined&&(window[this.movieName]=this.getMovieElement())};SWFUpload.prototype.getFlashHTML=function(){return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.settings.flash_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload">','<param name="wmode" value="',this.settings.button_window_mode,'" />','<param name="movie" value="',this.settings.flash_url,'" />','<param name="quality" value="high" />','<param name="menu" value="false" />','<param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+this.getFlashVars()+'" />',"<\/object>"].join("")};SWFUpload.prototype.getFlashVars=function(){var n=this.buildParamString(),t=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&uploadURL=",encodeURIComponent(this.settings.upload_url),"&useQueryString=",encodeURIComponent(this.settings.use_query_string),"&requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&httpSuccess=",encodeURIComponent(t),"&assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&params=",encodeURIComponent(n),"&filePostName=",encodeURIComponent(this.settings.file_post_name),"&fileTypes=",encodeURIComponent(this.settings.file_types),"&fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&buttonWidth=",encodeURIComponent(this.settings.button_width),"&buttonHeight=",encodeURIComponent(this.settings.button_height),"&buttonText=",encodeURIComponent(this.settings.button_text),"&buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&buttonAction=",encodeURIComponent(this.settings.button_action),"&buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("")};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined&&(this.movieElement=document.getElementById(this.movieName)),this.movieElement===null)throw"Could not find Flash element";return this.movieElement};SWFUpload.prototype.buildParamString=function(){var n=this.settings.post_params,i=[],t;if(typeof n=="object")for(t in n)n.hasOwnProperty(t)&&i.push(encodeURIComponent(t.toString())+"="+encodeURIComponent(n[t].toString()));return i.join("&")};SWFUpload.prototype.destroy=function(){var n,t;try{if(this.cancelUpload(null,!1),n=null,n=this.getMovieElement(),n&&typeof n.CallFunction=="unknown"){for(t in n)try{typeof n[t]=="function"&&(n[t]=null)}catch(i){}try{n.parentNode.removeChild(n)}catch(r){}}return window[this.movieName]=null,SWFUpload.instances[this.movieName]=null,delete SWFUpload.instances[this.movieName],this.movieElement=null,this.settings=null,this.customSettings=null,this.eventQueue=null,this.movieName=null,!0}catch(u){return!1}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url: ",this.settings.upload_url,"\n","\t","flash_url: ",this.settings.flash_url,"\n","\t","use_query_string: ",this.settings.use_query_string.toString(),"\n","\t","requeue_on_error: ",this.settings.requeue_on_error.toString(),"\n","\t","http_success: ",this.settings.http_success.join(", "),"\n","\t","assume_success_timeout: ",this.settings.assume_success_timeout,"\n","\t","file_post_name: ",this.settings.file_post_name,"\n","\t","post_params: ",this.settings.post_params.toString(),"\n","\t","file_types: ",this.settings.file_types,"\n","\t","file_types_description: ",this.settings.file_types_description,"\n","\t","file_size_limit: ",this.settings.file_size_limit,"\n","\t","file_upload_limit: ",this.settings.file_upload_limit,"\n","\t","file_queue_limit: ",this.settings.file_queue_limit,"\n","\t","debug: ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching: ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id: ",this.settings.button_placeholder_id.toString(),"\n","\t","button_placeholder: ",this.settings.button_placeholder?"Set":"Not Set","\n","\t","button_image_url: ",this.settings.button_image_url.toString(),"\n","\t","button_width: ",this.settings.button_width.toString(),"\n","\t","button_height: ",this.settings.button_height.toString(),"\n","\t","button_text: ",this.settings.button_text.toString(),"\n","\t","button_text_style: ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding: ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action: ",this.settings.button_action.toString(),"\n","\t","button_disabled: ",this.settings.button_disabled.toString(),"\n","\t","custom_settings: ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned: ",(typeof this.settings.swfupload_loaded_handler=="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler=="function").toString(),"\n","\t","file_queued_handler assigned: ",(typeof this.settings.file_queued_handler=="function").toString(),"\n","\t","file_queue_error_handler assigned: ",(typeof this.settings.file_queue_error_handler=="function").toString(),"\n","\t","upload_start_handler assigned: ",(typeof this.settings.upload_start_handler=="function").toString(),"\n","\t","upload_progress_handler assigned: ",(typeof this.settings.upload_progress_handler=="function").toString(),"\n","\t","upload_error_handler assigned: ",(typeof this.settings.upload_error_handler=="function").toString(),"\n","\t","upload_success_handler assigned: ",(typeof this.settings.upload_success_handler=="function").toString(),"\n","\t","upload_complete_handler assigned: ",(typeof this.settings.upload_complete_handler=="function").toString(),"\n","\t","debug_handler assigned: ",(typeof this.settings.debug_handler=="function").toString(),"\n"].join(""))};SWFUpload.prototype.addSetting=function(n,t,i){return this.settings[n]=t==undefined?i:t};SWFUpload.prototype.getSetting=function(n){return this.settings[n]!=undefined?this.settings[n]:""};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement(),returnValue,returnString;try{returnString=movieElement.CallFunction('<invoke name="'+functionName+'" returntype="javascript">'+__flash__argumentsToXML(argumentArray,0)+"<\/invoke>");returnValue=eval(returnString)}catch(ex){throw"Call to "+functionName+" failed";}return returnValue!=undefined&&typeof returnValue.post=="object"&&(returnValue=this.unescapeFilePostParams(returnValue)),returnValue};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")};SWFUpload.prototype.startUpload=function(n){this.callFlash("StartUpload",[n])};SWFUpload.prototype.cancelUpload=function(n,t){t!==!1&&(t=!0);this.callFlash("CancelUpload",[n,t])};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")};SWFUpload.prototype.setStats=function(n){this.callFlash("SetStats",[n])};SWFUpload.prototype.getFile=function(n){return typeof n=="number"?this.callFlash("GetFileByIndex",[n]):this.callFlash("GetFile",[n])};SWFUpload.prototype.addFileParam=function(n,t,i){return this.callFlash("AddFileParam",[n,t,i])};SWFUpload.prototype.removeFileParam=function(n,t){this.callFlash("RemoveFileParam",[n,t])};SWFUpload.prototype.setUploadURL=function(n){this.settings.upload_url=n.toString();this.callFlash("SetUploadURL",[n])};SWFUpload.prototype.setPostParams=function(n){this.settings.post_params=n;this.callFlash("SetPostParams",[n])};SWFUpload.prototype.addPostParam=function(n,t){this.settings.post_params[n]=t;this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(n){delete this.settings.post_params[n];this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(n,t){this.settings.file_types=n;this.settings.file_types_description=t;this.callFlash("SetFileTypes",[n,t])};SWFUpload.prototype.setFileSizeLimit=function(n){this.settings.file_size_limit=n;this.callFlash("SetFileSizeLimit",[n])};SWFUpload.prototype.setFileUploadLimit=function(n){this.settings.file_upload_limit=n;this.callFlash("SetFileUploadLimit",[n])};SWFUpload.prototype.setFileQueueLimit=function(n){this.settings.file_queue_limit=n;this.callFlash("SetFileQueueLimit",[n])};SWFUpload.prototype.setFilePostName=function(n){this.settings.file_post_name=n;this.callFlash("SetFilePostName",[n])};SWFUpload.prototype.setUseQueryString=function(n){this.settings.use_query_string=n;this.callFlash("SetUseQueryString",[n])};SWFUpload.prototype.setRequeueOnError=function(n){this.settings.requeue_on_error=n;this.callFlash("SetRequeueOnError",[n])};SWFUpload.prototype.setHTTPSuccess=function(n){typeof n=="string"&&(n=n.replace(" ","").split(","));this.settings.http_success=n;this.callFlash("SetHTTPSuccess",[n])};SWFUpload.prototype.setAssumeSuccessTimeout=function(n){this.settings.assume_success_timeout=n;this.callFlash("SetAssumeSuccessTimeout",[n])};SWFUpload.prototype.setDebugEnabled=function(n){this.settings.debug_enabled=n;this.callFlash("SetDebugEnabled",[n])};SWFUpload.prototype.setButtonImageURL=function(n){n==undefined&&(n="");this.settings.button_image_url=n;this.callFlash("SetButtonImageURL",[n])};SWFUpload.prototype.setButtonDimensions=function(n,t){this.settings.button_width=n;this.settings.button_height=t;var i=this.getMovieElement();i!=undefined&&(i.style.width=n+"px",i.style.height=t+"px");this.callFlash("SetButtonDimensions",[n,t])};SWFUpload.prototype.setButtonText=function(n){this.settings.button_text=n;this.callFlash("SetButtonText",[n])};SWFUpload.prototype.setButtonTextPadding=function(n,t){this.settings.button_text_top_padding=t;this.settings.button_text_left_padding=n;this.callFlash("SetButtonTextPadding",[n,t])};SWFUpload.prototype.setButtonTextStyle=function(n){this.settings.button_text_style=n;this.callFlash("SetButtonTextStyle",[n])};SWFUpload.prototype.setButtonDisabled=function(n){this.settings.button_disabled=n;this.callFlash("SetButtonDisabled",[n])};SWFUpload.prototype.setButtonAction=function(n){this.settings.button_action=n;this.callFlash("SetButtonAction",[n])};SWFUpload.prototype.setButtonCursor=function(n){this.settings.button_cursor=n;this.callFlash("SetButtonCursor",[n])};SWFUpload.prototype.queueEvent=function(n,t){t==undefined?t=[]:t instanceof Array||(t=[t]);var i=this;if(typeof this.settings[n]=="function")this.eventQueue.push(function(){this.settings[n].apply(this,t)}),setTimeout(function(){i.executeNextEvent()},0);else if(this.settings[n]!==null)throw"Event handler "+n+" is unknown or is not a function";};SWFUpload.prototype.executeNextEvent=function(){var n=this.eventQueue?this.eventQueue.shift():null;typeof n=="function"&&n.apply(this)};SWFUpload.prototype.unescapeFilePostParams=function(n){var u={},t,i,r;if(n!=undefined){for(i in n.post)if(n.post.hasOwnProperty(i)){for(t=i;(r=/[$]([0-9a-f]{4})/i.exec(t))!==null;)t=t.replace(r[0],String.fromCharCode(parseInt("0x"+r[1],16)));u[t]=n.post[i]}n.post=u}return n};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface")}catch(n){return!1}};SWFUpload.prototype.flashReady=function(){var n=this.getMovieElement();if(!n){this.debug("Flash called back ready but the flash movie can't be found.");return}this.cleanUp(n);this.queueEvent("swfupload_loaded_handler")};SWFUpload.prototype.cleanUp=function(n){try{if(this.movieElement&&typeof n.CallFunction=="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var t in n)try{typeof n[t]=="function"&&(n[t]=null)}catch(i){}}}catch(r){}window.__flash__removeCallback=function(n,t){try{n&&(n[t]=null)}catch(i){}}};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")};SWFUpload.prototype.fileQueued=function(n){n=this.unescapeFilePostParams(n);this.queueEvent("file_queued_handler",n)};SWFUpload.prototype.fileQueueError=function(n,t,i){n=this.unescapeFilePostParams(n);this.queueEvent("file_queue_error_handler",[n,t,i])};SWFUpload.prototype.fileDialogComplete=function(n,t,i){this.queueEvent("file_dialog_complete_handler",[n,t,i])};SWFUpload.prototype.uploadStart=function(n){n=this.unescapeFilePostParams(n);this.queueEvent("return_upload_start_handler",n)};SWFUpload.prototype.returnUploadStart=function(n){var t;if(typeof this.settings.upload_start_handler=="function")n=this.unescapeFilePostParams(n),t=this.settings.upload_start_handler.call(this,n);else if(this.settings.upload_start_handler!=undefined)throw"upload_start_handler must be a function";t===undefined&&(t=!0);t=!!t;this.callFlash("ReturnUploadStart",[t])};SWFUpload.prototype.uploadProgress=function(n,t,i){n=this.unescapeFilePostParams(n);this.queueEvent("upload_progress_handler",[n,t,i])};SWFUpload.prototype.uploadError=function(n,t,i){n=this.unescapeFilePostParams(n);this.queueEvent("upload_error_handler",[n,t,i])};SWFUpload.prototype.uploadSuccess=function(n,t,i){n=this.unescapeFilePostParams(n);this.queueEvent("upload_success_handler",[n,t,i])};SWFUpload.prototype.uploadComplete=function(n){n=this.unescapeFilePostParams(n);this.queueEvent("upload_complete_handler",n)};SWFUpload.prototype.debug=function(n){this.queueEvent("debug_handler",n)};SWFUpload.prototype.debugMessage=function(n){var i,t,r;if(this.settings.debug)if(t=[],typeof n=="object"&&typeof n.name=="string"&&typeof n.message=="string"){for(r in n)n.hasOwnProperty(r)&&t.push(r+": "+n[r]);i=t.join("\n")||"";t=i.split("\n");i="EXCEPTION: "+t.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(i)}else SWFUpload.Console.writeLine(n)};SWFUpload.Console={};SWFUpload.Console.writeLine=function(n){var t,i;try{t=document.getElementById("SWFUpload_Console");t||(i=document.createElement("form"),document.getElementsByTagName("body")[0].appendChild(i),t=document.createElement("textarea"),t.id="SWFUpload_Console",t.style.fontFamily="monospace",t.setAttribute("wrap","off"),t.wrap="off",t.style.overflow="auto",t.style.width="700px",t.style.height="350px",t.style.margin="5px",i.appendChild(t));t.value+=n+"\n";t.scrollTop=t.scrollHeight-t.clientHeight}catch(r){alert("Exception: "+r.name+" Message: "+r.message)}},function(n){var i={init:function(i,r){return this.each(function(){var o=n(this),v=o.clone(),u=n.extend({id:o.attr("id"),swf:"uploadify.swf",uploader:"uploadify.php",auto:!0,buttonClass:"",buttonCursor:"hand",buttonImage:null,buttonText:"SELECT FILES",checkExisting:!1,debug:!1,fileObjName:"Filedata",fileSizeLimit:0,fileTypeDesc:"All Files",fileTypeExts:"*.*",height:30,itemTemplate:!1,method:"post",multi:!0,formData:{},preventCaching:!0,progressData:"percentage",queueID:!1,queueSizeLimit:999,removeCompleted:!0,removeTimeout:3,requeueErrors:!1,successTimeout:30,uploadLimit:0,width:120,progresswidth:180,overrideEvents:[]},i),s={assume_success_timeout:u.successTimeout,button_placeholder_id:u.id,button_width:u.width,button_height:u.height,button_text:null,button_text_style:null,button_text_top_padding:0,button_text_left_padding:0,button_action:u.multi?SWFUpload.BUTTON_ACTION.SELECT_FILES:SWFUpload.BUTTON_ACTION.SELECT_FILE,button_disabled:!1,button_cursor:u.buttonCursor=="arrow"?SWFUpload.CURSOR.ARROW:SWFUpload.CURSOR.HAND,button_window_mode:SWFUpload.WINDOW_MODE.TRANSPARENT,debug:u.debug,requeue_on_error:u.requeueErrors,file_post_name:u.fileObjName,file_size_limit:u.fileSizeLimit,file_types:u.fileTypeExts,file_types_description:u.fileTypeDesc,file_queue_limit:u.queueSizeLimit,file_upload_limit:u.uploadLimit,flash_url:u.swf,prevent_swf_caching:u.preventCaching,post_params:u.formData,upload_url:u.uploader,use_query_string:u.method=="get",file_dialog_complete_handler:t.onDialogClose,file_dialog_start_handler:t.onDialogOpen,file_queued_handler:t.onSelect,file_queue_error_handler:t.onSelectError,swfupload_loaded_handler:u.onSWFReady,upload_complete_handler:t.onUploadComplete,upload_error_handler:t.onUploadError,upload_progress_handler:t.onUploadProgress,upload_start_handler:t.onUploadStart,upload_success_handler:t.onUploadSuccess},l,a,f,e,h,c;r&&(s=n.extend(s,r));s=n.extend(s,u);l=swfobject.getFlashPlayerVersion();a=l.major>=9;a?(window["uploadify_"+u.id]=new SWFUpload(s),f=window["uploadify_"+u.id],o.data("uploadify",f),e=n("<div />",{id:u.id,"class":"uploadify",css:{height:u.height+"px",width:u.width+"px"}}),n("#"+f.movieName).wrap(e),e=n("#"+u.id),e.data("uploadify",f),h=n("<div />",{id:u.id+"-button","class":"uploadify-button "+u.buttonClass}),u.buttonImage&&h.css({"background-image":"url('"+u.buttonImage+"')","text-indent":"-9999px"}),h.html('<span class="uploadify-button-text">'+u.buttonText+"<\/span>").css({height:u.height+"px","line-height":u.height+"px",width:u.width+"px"}),e.append(h),n("#"+f.movieName).css({position:"absolute","z-index":1}),u.queueID||(c=n("<div />",{id:u.id+"-queue","class":"uploadify-queue"}),e.after(c),f.settings.queueID=u.id+"-queue",f.settings.defaultQueue=!0),f.queueData={files:{},filesSelected:0,filesQueued:0,filesReplaced:0,filesCancelled:0,filesErrored:0,uploadsSuccessful:0,uploadsErrored:0,averageSpeed:0,queueLength:0,queueSize:0,uploadSize:0,queueBytesUploaded:0,uploadQueue:[],errorMsg:"Some files were not added to the queue:"},f.original=v,f.wrapper=e,f.button=h,f.queue=c,u.onInit&&u.onInit.call(o,f)):u.onFallback&&u.onFallback.call(o)})},cancel:function(){var t=arguments;this.each(function(){var f=n(this),i=f.data("uploadify"),u=i.settings,e=-1,o,r,s;if(t[0])if(t[0]=="*")o=i.queueData.queueLength,n("#"+u.queueID).find(".uploadify-queue-item").each(function(){e++;t[1]===!0?i.cancelUpload(n(this).attr("id"),!1):i.cancelUpload(n(this).attr("id"));n(this).find(".data").removeClass("data").html(" - Cancelled");n(this).find(".uploadify-progress-bar").remove();n(this).delay(1e3+100*e).fadeOut(500,function(){n(this).remove()})}),i.queueData.queueSize=0,i.queueData.queueLength=0,u.onClearQueue&&u.onClearQueue.call(f,o);else for(r=0;r<t.length;r++)i.cancelUpload(t[r]),n("#"+t[r]).find(".data").removeClass("data").html(" - Cancelled"),n("#"+t[r]).find(".uploadify-progress-bar").remove(),n("#"+t[r]).delay(1e3+100*r).fadeOut(500,function(){n(this).remove()});else s=n("#"+u.queueID).find(".uploadify-queue-item").get(0),$item=n(s),i.cancelUpload($item.attr("id")),$item.find(".data").removeClass("data").html(" - Cancelled"),$item.find(".uploadify-progress-bar").remove(),$item.delay(1e3).fadeOut(500,function(){n(this).remove()})})},destroy:function(){this.each(function(){var r=n(this),i=r.data("uploadify"),t=i.settings;i.destroy();t.defaultQueue&&n("#"+t.queueID).remove();n("#"+t.id).replaceWith(i.original);t.onDestroy&&t.onDestroy.call(this);delete i})},disable:function(t){this.each(function(){var u=n(this),i=u.data("uploadify"),r=i.settings;t?(i.button.addClass("disabled"),r.onDisable&&r.onDisable.call(this)):(i.button.removeClass("disabled"),r.onEnable&&r.onEnable.call(this));i.setButtonDisabled(t)})},settings:function(t,i,r){var u=arguments,f=i;return this.each(function(){var h=n(this),e=h.data("uploadify"),o=e.settings,s;if(typeof u[0]=="object")for(s in i)setData(s,i[s]);if(u.length===1)f=o[t];else{switch(t){case"uploader":e.setUploadURL(i);break;case"formData":r||(i=n.extend(o.formData,i));e.setPostParams(o.formData);break;case"method":i=="get"?e.setUseQueryString(!0):e.setUseQueryString(!1);break;case"fileObjName":e.setFilePostName(i);break;case"fileTypeExts":e.setFileTypes(i,o.fileTypeDesc);break;case"fileTypeDesc":e.setFileTypes(o.fileTypeExts,i);break;case"fileSizeLimit":e.setFileSizeLimit(i);break;case"uploadLimit":e.setFileUploadLimit(i);break;case"queueSizeLimit":e.setFileQueueLimit(i);break;case"buttonImage":e.button.css("background-image",settingValue);break;case"buttonCursor":i=="arrow"?e.setButtonCursor(SWFUpload.CURSOR.ARROW):e.setButtonCursor(SWFUpload.CURSOR.HAND);break;case"buttonText":n("#"+o.id+"-button").find(".uploadify-button-text").html(i);break;case"width":e.setButtonDimensions(i,o.height);break;case"height":e.setButtonDimensions(o.width,i);break;case"multi":i?e.setButtonAction(SWFUpload.BUTTON_ACTION.SELECT_FILES):e.setButtonAction(SWFUpload.BUTTON_ACTION.SELECT_FILE)}o[t]=i}}),u.length===1?f:void 0},stop:function(){this.each(function(){var i=n(this),t=i.data("uploadify");t.queueData.averageSpeed=0;t.queueData.uploadSize=0;t.queueData.bytesUploaded=0;t.queueData.uploadQueue=[];t.stopUpload()})},upload:function(){var t=arguments;this.each(function(){var u=n(this),i=u.data("uploadify"),r;if(i.queueData.averageSpeed=0,i.queueData.uploadSize=0,i.queueData.bytesUploaded=0,i.queueData.uploadQueue=[],t[0])if(t[0]=="*")i.queueData.uploadSize=i.queueData.queueSize,i.queueData.uploadQueue.push("*"),i.startUpload();else{for(r=0;r<t.length;r++)i.queueData.uploadSize+=i.queueData.files[t[r]].size,i.queueData.uploadQueue.push(t[r]);i.startUpload(i.queueData.uploadQueue.shift())}else i.startUpload()})}},t={onDialogOpen:function(){var n=this.settings;this.queueData.errorMsg="Some files were not added to the queue:";this.queueData.filesReplaced=0;this.queueData.filesCancelled=0;n.onDialogOpen&&n.onDialogOpen.call(this)},onDialogClose:function(t,i,r){var u=this.settings;this.queueData.filesErrored=t-i;this.queueData.filesSelected=t;this.queueData.filesQueued=i-this.queueData.filesCancelled;this.queueData.queueLength=r;n.inArray("onDialogClose",u.overrideEvents)<0&&this.queueData.filesErrored>0&&alert(this.queueData.errorMsg);u.onDialogClose&&u.onDialogClose.call(this,this.queueData);u.auto&&n("#"+u.id).uploadify("upload","*")},onSelect:function(t){var r=this.settings,u={},h,c,i,o,e,f,s;for(h in this.queueData.files)if(u=this.queueData.files[h],u.uploaded!=!0&&u.name==t.name)if(c=confirm('此文件:"'+t.name+'" 已在上传队列,请点击"确定"按钮重新上传'),c)n("#"+u.id).remove(),this.cancelUpload(u.id),this.queueData.filesReplaced++;else return this.cancelUpload(t.id),this.queueData.filesCancelled++,!1;if(i=Math.round(t.size/1024),o="KB",i>1e3&&(i=Math.round(i/1e3),o="MB"),e=i.toString().split("."),i=e[0],e.length>1&&(i+="."+e[1].substr(0,2)),i+=o,f=t.name,f.length>25&&(f=f.substr(0,25)+"..."),itemData={fileID:t.id,instanceID:r.id,fileName:f,fileSize:i},r.itemTemplate==!1&&(r.itemTemplate='<div id="${fileID}" class="uploadify-queue-item">\t\t\t\t\t<div class="cancel">\t\t\t\t\t\t<a href="javascript:$(\'#${instanceID}\').uploadify(\'cancel\', \'${fileID}\')">X<\/a>\t\t\t\t\t<\/div>\t\t\t\t\t<span class="fileName">${fileName} (${fileSize})<\/span><span class="data"><\/span>\t\t\t\t\t<div class="uploadify-progress">\t\t\t\t\t\t<div class="uploadify-progress-bar"><!--Progress Bar--><\/div>\t\t\t\t\t<\/div>\t\t\t\t<\/div>'),n.inArray("onSelect",r.overrideEvents)<0){itemHTML=r.itemTemplate;for(s in itemData)itemHTML=itemHTML.replace(new RegExp("\\$\\{"+s+"\\}","g"),itemData[s]);n("#"+r.queueID).append(itemHTML)}this.queueData.queueSize+=t.size;this.queueData.files[t.id]=t;r.onSelect&&r.onSelect.apply(this,arguments)},onSelectError:function(t,i,r){var u=this.settings;if(n.inArray("onSelectError",u.overrideEvents)<0)switch(i){case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:this.queueData.errorMsg+=u.queueSizeLimit>r?"\nThe number of files selected exceeds the remaining upload limit ("+r+").":"\nThe number of files selected exceeds the queue size limit ("+u.queueSizeLimit+").";break;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:this.queueData.errorMsg+='\nThe file "'+t.name+'" exceeds the size limit ('+u.fileSizeLimit+").";break;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:this.queueData.errorMsg+='\nThe file "'+t.name+'" is empty.';break;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:this.queueData.errorMsg+='\nThe file "'+t.name+'" is not an accepted file type ('+u.fileTypeDesc+")."}i!=SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED&&delete this.queueData.files[t.id];u.onSelectError&&u.onSelectError.apply(this,arguments)},onQueueComplete:function(){this.settings.onQueueComplete&&this.settings.onQueueComplete.call(this,this.settings.queueData)},onUploadComplete:function(t){var i=this.settings,r=this,u=this.getStats();if(this.queueData.queueLength=u.files_queued,this.queueData.uploadQueue[0]=="*"?this.queueData.queueLength>0?this.startUpload():(this.queueData.uploadQueue=[],i.onQueueComplete&&i.onQueueComplete.call(this,this.queueData)):this.queueData.uploadQueue.length>0?this.startUpload(this.queueData.uploadQueue.shift()):(this.queueData.uploadQueue=[],i.onQueueComplete&&i.onQueueComplete.call(this,this.queueData)),n.inArray("onUploadComplete",i.overrideEvents)<0)if(i.removeCompleted)switch(t.filestatus){case SWFUpload.FILE_STATUS.COMPLETE:setTimeout(function(){n("#"+t.id)&&(r.queueData.queueSize-=t.size,r.queueData.queueLength-=1,delete r.queueData.files[t.id],n("#"+t.id).fadeOut(500,function(){n(this).remove()}))},i.removeTimeout*1e3);break;case SWFUpload.FILE_STATUS.ERROR:i.requeueErrors||setTimeout(function(){n("#"+t.id)&&(r.queueData.queueSize-=t.size,r.queueData.queueLength-=1,delete r.queueData.files[t.id],n("#"+t.id).fadeOut(500,function(){n(this).remove()}))},i.removeTimeout*1e3)}else t.uploaded=!0;i.onUploadComplete&&i.onUploadComplete.call(this,t)},onUploadError:function(t,i,r){var f=this.settings,u="Error",e;switch(i){case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:u="HTTP Error ("+r+")";break;case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:u="Missing Upload URL";break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:u="IO Error";break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:u="Security Error";break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:alert("The upload limit has been reached ("+r+").");u="Exceeds Upload Limit";break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:u="Failed";break;case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:u="Validation Error";break;case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:u="Cancelled";this.queueData.queueSize-=t.size;this.queueData.queueLength-=1;(t.status==SWFUpload.FILE_STATUS.IN_PROGRESS||n.inArray(t.id,this.queueData.uploadQueue)>=0)&&(this.queueData.uploadSize-=t.size);f.onCancel&&f.onCancel.call(this,t);delete this.queueData.files[t.id];break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:u="Stopped"}n.inArray("onUploadError",f.overrideEvents)<0&&(i!=SWFUpload.UPLOAD_ERROR.FILE_CANCELLED&&i!=SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED&&n("#"+t.id).addClass("uploadify-error"),n("#"+t.id).find(".uploadify-progress-bar").css("width","1px"),i!=SWFUpload.UPLOAD_ERROR.SPECIFIED_FILE_ID_NOT_FOUND&&t.status!=SWFUpload.FILE_STATUS.COMPLETE&&n("#"+t.id).find(".data").html(" - "+u));e=this.getStats();this.queueData.uploadsErrored=e.upload_errors;f.onUploadError&&f.onUploadError.call(this,t,i,r,u)},onUploadProgress:function(t,i,r){var f=this.settings,a=new Date,o=a.getTime(),e=o-this.timer,s;e>500&&(this.timer=o);s=i-this.bytesLoaded;this.bytesLoaded=i;var v=this.queueData.queueBytesUploaded+i,h=Math.round(i/r*100),c="KB/s",l=0,u=s/1024/(e/1e3);u=Math.floor(u*10)/10;this.queueData.averageSpeed=this.queueData.averageSpeed>0?Math.floor((this.queueData.averageSpeed+u)/2):Math.floor(u);u>1e3&&(l=u*.001,this.queueData.averageSpeed=Math.floor(l),c="MB/s");n.inArray("onUploadProgress",f.overrideEvents)<0&&(f.progressData=="percentage"?n("#"+t.id).find(".data").html(" - "+h+"%"):f.progressData=="speed"&&e>500&&n("#"+t.id).find(".data").html(" - "+this.queueData.averageSpeed+c),n("#"+t.id).find(".uploadify-progress-bar").css("width",h+"%"));f.onUploadProgress&&f.onUploadProgress.call(this,t,i,r,v,this.queueData.uploadSize)},onUploadStart:function(t){var i=this.settings,r=new Date;this.timer=r.getTime();this.bytesLoaded=0;this.queueData.uploadQueue.length==0&&(this.queueData.uploadSize=t.size);i.checkExisting&&n.ajax({type:"POST",async:!1,url:i.checkExisting,data:{filename:t.name},success:function(i){if(i==1){var r=confirm('A file with the name "'+t.name+'" already exists on the server.\nWould you like to replace the existing file?');r||(this.cancelUpload(t.id),n("#"+t.id).remove(),this.queueData.uploadQueue.length>0&&this.queueData.queueLength>0&&(this.queueData.uploadQueue[0]=="*"?this.startUpload():this.startUpload(this.queueData.uploadQueue.shift())))}}});i.onUploadStart&&i.onUploadStart.call(this,t)},onUploadSuccess:function(t,i,r){var u=this.settings,f=this.getStats();this.queueData.uploadsSuccessful=f.successful_uploads;this.queueData.queueBytesUploaded+=t.size;n.inArray("onUploadSuccess",u.overrideEvents)<0&&n("#"+t.id).find(".data").html(" - Complete");u.onUploadSuccess&&u.onUploadSuccess.call(this,t,i,r)}};n.fn.uploadify=function(t){if(i[t])return i[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t!="object"&&t)n.error("The method "+t+" does not exist in $.uploadify");else return i.init.apply(this,arguments)}}($);
|