",b.target),xPreventDefault(a),xStopPropagation(a);break;case 13:if(xIE4Up){if("On"!=b.target.parentElement.document.designMode)return;return c=b.target.parentElement.document.selection.createRange(),c.pasteHTML("
"),c.select(),a.cancelBubble=!0,void(a.returnValue=!1)}break;case 98:editorDo("Bold",null,b.target),xPreventDefault(a),xStopPropagation(a);break;case 105:editorDo("Italic",null,b.target),xPreventDefault(a),xStopPropagation(a);break;case 117:editorDo("Underline",null,b.target),xPreventDefault(a),xStopPropagation(a);break;case 100:editorDo("RemoveFormat",null,b.target),xPreventDefault(a),xStopPropagation(a)}}}}}function editorDo(a,b,c){var d=null;if("object"==typeof c)d=xIE4Up?c.parentElement.document:c.parentNode;else{var e=editorGetIFrame(c);d=e.contentWindow.document}var f=d.body.getAttribute("editor_sequence");editorMode[f]||("object"==typeof c?c.focus():editorFocus(c),d.execCommand(a,!1,b),"object"==typeof c?c.focus():editorFocus(c))}function editorChangeFontName(a,b){var c=a.options[a.selectedIndex].value;c&&(editorDo("FontName",c,b),a.selectedIndex=0)}function editorChangeFontSize(a,b){var c=a.options[a.selectedIndex].value;c&&(editorDo("FontSize",c,b),a.selectedIndex=0)}function editorUnDo(a,b){editorDo("undo","",b),a.selectedIndex=0}function editorReDo(a,b){editorDo("redo","",b),a.selectedIndex=0}function editorChangeHeader(a,b){var c=a.options[a.selectedIndex].value;c&&(c="<"+c+">",editorDo("formatblock",c,b),a.selectedIndex=0)}function editorChangeMode(a,b){if("html"==a||""==a){var c=new Date;c.setTime(c.getTime()+6048e8),xSetCookie("editor_mode",a,c)}var d=editorGetIFrame(b);if(d){var e=editorGetTextArea(b),f=editorGetPreviewArea(b),g=d.contentWindow.document,h=null;if("html"==editorMode[b]?(h=e.value,g.body.innerHTML=e.value):"preview"==editorMode[b]?(h=e.value,f.contentWindow.document.body.innerHTML=""):(h=g.body.innerHTML,e.value=h,h=h.replace(/
/gi,"
\n"),h=h.replace(/
\n\n/gi,"
\n")),"html"==a&&e)f.style.display="none",xGetElementById("fileUploader_"+b)&&(xGetElementById("fileUploader_"+b).style.display="block"),e.value=h,xWidth(e,xWidth(d.parentNode)),xHeight(e,xHeight(d.parentNode)),editorMode[b]="html",xGetElementById("xeEditor_"+b)&&(xGetElementById("xeEditor_"+b).className="xeEditor html",xGetElementById("use_rich_"+b).className="",xGetElementById("preview_html_"+b).className="",xGetElementById("use_html_"+b).className="active");else if("preview"==a&&f){f.style.display="",xGetElementById("fileUploader_"+b)&&(xGetElementById("fileUploader_"+b).style.display="none");var i=xGetElementById("preview_form");i||(i=xCreateElement("form"),i.id="preview_form",i.method="post",i.action=request_uri,i.target="editor_preview_"+b,xInnerHtml(i,''),document.body.appendChild(i)),i.content.value=h,i.submit(),xWidth(f,xWidth(d.parentNode)),editorMode[b]="preview",xGetElementById("xeEditor_"+b)&&(xGetElementById("xeEditor_"+b).className="xeEditor preview",xGetElementById("use_rich_"+b).className="",xGetElementById("preview_html_"+b).className="active",xGetElementById("use_html_"+b)&&(xGetElementById("use_html_"+b).className=""))}else f.style.display="none",xGetElementById("fileUploader_"+b)&&(xGetElementById("fileUploader_"+b).style.display="block"),g.body.innerHTML=h,editorMode[b]=null,xGetElementById("xeEditor_"+b)&&(xGetElementById("xeEditor_"+b).className="xeEditor rich",xGetElementById("use_rich_"+b).className="active",xGetElementById("preview_html_"+b).className="",xGetElementById("use_html_"+b)&&(xGetElementById("use_html_"+b).className=""))}}function closeEditorInfo(a){xGetElementById("editorInfo_"+a).style.display="none";var b=new Date;b.setTime(b.getTime()+6048e8),xSetCookie("EditorInfo","1",b)}function showEditorHelp(a,b){jQuery("#helpList_"+b).toggleClass("open")}function showEditorExtension(a,b){var c="#editorExtension_"+b,d=new xEvent(a);jQuery(c).hasClass("extension2")?(jQuery(c).addClass("open"),d.pageX<=xWidth("editor_component_"+b)?jQuery("#editor_component_"+b).css("right","auto").css("left",0):jQuery("#editor_component_"+b).css("right",0).css("left","auto")):jQuery(c).attr("class","extension2")}function showPreviewContent(a){if("undefined"!=typeof a&&"undefined"!=typeof _editorFontColor[a]){var b=editorGetPreviewArea(a);b.contentWindow.document.body.style.color=_editorFontColor[a]}}function setPreviewHeight(a){var b=xGetElementById("editor_preview_"+a).contentWindow.document.body.scrollHeight;400>b&&(b=400),xHeight("editor_preview_"+a,b+20)}function getAutoSavedSrl(a){var b=a.editor_sequence,c=a.key,d=editorGetForm(b);d[c].value=a.document_srl,uploadSettingObj[b]&&editorUploadInit(uploadSettingObj[b],!0)}var _editorFontColor=[];
\ No newline at end of file
+function editorGetTextArea(a){return jQuery("#editor_textarea_"+a)[0]}function editorGetPreviewArea(a){return jQuery("#editor_preview_"+a)[0]}function editorGetForm(a){var b=editorGetIFrame(a);if(b){for(var c=b.parentNode;"FORM"!=c.nodeName;)c=c.parentNode;return"FORM"==c.nodeName?c:void 0}}function editorGetContent_xe(a){var b="";if("html"==editorMode[a]){var c=editorGetTextArea(a);if(!c)return"";b=c.value}else{var d=editorGetIFrame(a);if(!d)return"";b=jQuery(d.contentWindow.document.body).html().replace(/^
]*)>$/i,"")}return b}function editorGetSelectedNode(a){var b,c,d=editorGetIFrame(a);return b=d.contentWindow,b.document.selection?(c=b.document.selection.createRange(),jQuery("
",b.target),xPreventDefault(a),xStopPropagation(a);break;case 55:editorDo("formatblock","",b.target),xPreventDefault(a),xStopPropagation(a);break;case 13:if(xIE4Up){if("On"!=b.target.parentElement.document.designMode)return;return c=b.target.parentElement.document.selection.createRange(),c.pasteHTML("
"),c.select(),a.cancelBubble=!0,void(a.returnValue=!1)}break;case 98:editorDo("Bold",null,b.target),xPreventDefault(a),xStopPropagation(a);break;case 105:editorDo("Italic",null,b.target),xPreventDefault(a),xStopPropagation(a);break;case 117:editorDo("Underline",null,b.target),xPreventDefault(a),xStopPropagation(a);break;case 100:editorDo("RemoveFormat",null,b.target),xPreventDefault(a),xStopPropagation(a)}}}}}function editorDo(a,b,c){var d=null;if("object"==typeof c)d=xIE4Up?c.parentElement.document:c.parentNode;else{var e=editorGetIFrame(c);d=e.contentWindow.document}var f=d.body.getAttribute("editor_sequence");editorMode[f]||("object"==typeof c?c.focus():editorFocus(c),d.execCommand(a,!1,b),"object"==typeof c?c.focus():editorFocus(c))}function editorChangeFontName(a,b){var c=a.options[a.selectedIndex].value;c&&(editorDo("FontName",c,b),a.selectedIndex=0)}function editorChangeFontSize(a,b){var c=a.options[a.selectedIndex].value;c&&(editorDo("FontSize",c,b),a.selectedIndex=0)}function editorUnDo(a,b){editorDo("undo","",b),a.selectedIndex=0}function editorReDo(a,b){editorDo("redo","",b),a.selectedIndex=0}function editorChangeHeader(a,b){var c=a.options[a.selectedIndex].value;c&&(c="<"+c+">",editorDo("formatblock",c,b),a.selectedIndex=0)}function editorChangeMode(a,b){if("html"==a||""==a){var c=new Date;c.setTime(c.getTime()+6048e8),xSetCookie("editor_mode",a,c)}var d=editorGetIFrame(b);if(d){var e=editorGetTextArea(b),f=editorGetPreviewArea(b),g=d.contentWindow.document,h=null;if("html"==editorMode[b]?(h=e.value,g.body.innerHTML=e.value):"preview"==editorMode[b]?(h=e.value,f.contentWindow.document.body.innerHTML=""):(h=g.body.innerHTML,e.value=h,h=h.replace(/
/gi,"
\n"),h=h.replace(/
\n\n/gi,"
\n")),"html"==a&&e)f.style.display="none",xGetElementById("fileUploader_"+b)&&(xGetElementById("fileUploader_"+b).style.display="block"),e.value=h,xWidth(e,xWidth(d.parentNode)),xHeight(e,xHeight(d.parentNode)),editorMode[b]="html",xGetElementById("xeEditor_"+b)&&(xGetElementById("xeEditor_"+b).className="xeEditor html",xGetElementById("use_rich_"+b).className="",xGetElementById("preview_html_"+b).className="",xGetElementById("use_html_"+b).className="active");else if("preview"==a&&f){f.style.display="",xGetElementById("fileUploader_"+b)&&(xGetElementById("fileUploader_"+b).style.display="none");var i=xGetElementById("preview_form");i||(i=xCreateElement("form"),i.id="preview_form",i.method="post",i.action=request_uri,i.target="editor_preview_"+b,xInnerHtml(i,''),document.body.appendChild(i)),i.content.value=h,i.submit(),xWidth(f,xWidth(d.parentNode)),editorMode[b]="preview",xGetElementById("xeEditor_"+b)&&(xGetElementById("xeEditor_"+b).className="xeEditor preview",xGetElementById("use_rich_"+b).className="",xGetElementById("preview_html_"+b).className="active",xGetElementById("use_html_"+b)&&(xGetElementById("use_html_"+b).className=""))}else f.style.display="none",xGetElementById("fileUploader_"+b)&&(xGetElementById("fileUploader_"+b).style.display="block"),g.body.innerHTML=h,editorMode[b]=null,xGetElementById("xeEditor_"+b)&&(xGetElementById("xeEditor_"+b).className="xeEditor rich",xGetElementById("use_rich_"+b).className="active",xGetElementById("preview_html_"+b).className="",xGetElementById("use_html_"+b)&&(xGetElementById("use_html_"+b).className=""))}}function closeEditorInfo(a){xGetElementById("editorInfo_"+a).style.display="none";var b=new Date;b.setTime(b.getTime()+6048e8),xSetCookie("EditorInfo","1",b)}function showEditorHelp(a,b){jQuery("#helpList_"+b).toggleClass("open")}function showEditorExtension(a,b){var c="#editorExtension_"+b,d=new xEvent(a);jQuery(c).hasClass("extension2")?(jQuery(c).addClass("open"),d.pageX<=xWidth("editor_component_"+b)?jQuery("#editor_component_"+b).css("right","auto").css("left",0):jQuery("#editor_component_"+b).css("right",0).css("left","auto")):jQuery(c).attr("class","extension2")}function showPreviewContent(a){if("undefined"!=typeof a&&"undefined"!=typeof _editorFontColor[a]){var b=editorGetPreviewArea(a);b.contentWindow.document.body.style.color=_editorFontColor[a]}}function setPreviewHeight(a){var b=xGetElementById("editor_preview_"+a).contentWindow.document.body.scrollHeight;400>b&&(b=400),xHeight("editor_preview_"+a,b+20)}function getAutoSavedSrl(a,b,c){var d=a.editor_sequence,e=a.key,f=editorGetForm(d);f[e].value=a.document_srl,uploadSettingObj[d]&&editorUploadInit(uploadSettingObj[d],!0)}var _editorFontColor=[];
\ No newline at end of file
diff --git a/modules/editor/tpl/js/swfupload.min.js b/modules/editor/tpl/js/swfupload.min.js
index 270023971..c36f0d191 100644
--- a/modules/editor/tpl/js/swfupload.min.js
+++ b/modules/editor/tpl/js/swfupload.min.js
@@ -1 +1 @@
-var SWFUpload;void 0==SWFUpload&&(SWFUpload=function(a){this.initSWFUpload(a)}),SWFUpload.prototype.initSWFUpload=function(a){try{this.customSettings={},this.settings=a,this.eventQueue=[],this.movieName="SWFUpload_"+SWFUpload.movieCount++,this.movieElement=null,SWFUpload.instances[this.movieName]=this,this.initSettings(),this.loadFlash(),this.displayDebugInfo()}catch(b){throw delete SWFUpload.instances[this.movieName],b}},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(a){if("string"!=typeof a||a.match(/^https?:\/\//i)||a.match(/^\//))return a;var b=(window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""),window.location.pathname.lastIndexOf("/"));return path=0>=b?"/":window.location.pathname.substr(0,b)+"/",path+a},SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(a,b){this.settings[a]=void 0==this.settings[a]?b:this.settings[a]},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 a,b;if(null!==document.getElementById(this.movieName))throw"ID "+this.movieName+" is already in use. The Flash Object could not be added";if(a=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder,void 0==a)throw"Could not find the placeholder element: "+this.settings.button_placeholder_id;b=document.createElement("div"),b.innerHTML=this.getFlashHTML(),a.parentNode.replaceChild(b.firstChild,a),void 0==window[this.movieName]&&(window[this.movieName]=this.getMovieElement())},SWFUpload.prototype.getFlashHTML=function(){return['"].join("")},SWFUpload.prototype.getFlashVars=function(){var a=this.buildParamString(),b=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(b),"&assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"¶ms=",encodeURIComponent(a),"&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(void 0==this.movieElement&&(this.movieElement=document.getElementById(this.movieName)),null===this.movieElement)throw"Could not find Flash element";return this.movieElement},SWFUpload.prototype.buildParamString=function(){var a=this.settings.post_params,b=[];if("object"==typeof a)for(var c in a)a.hasOwnProperty(c)&&b.push(encodeURIComponent(c.toString())+"="+encodeURIComponent(a[c].toString()));return b.join("&")},SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,!1);var a=null;if(a=this.getMovieElement(),a&&"unknown"==typeof a.CallFunction){for(var b in a)try{"function"==typeof a[b]&&(a[b]=null)}catch(c){}try{a.parentNode.removeChild(a)}catch(d){}}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(e){return!1}},SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n"," ","upload_url: ",this.settings.upload_url,"\n"," ","flash_url: ",this.settings.flash_url,"\n"," ","use_query_string: ",this.settings.use_query_string.toString(),"\n"," ","requeue_on_error: ",this.settings.requeue_on_error.toString(),"\n"," ","http_success: ",this.settings.http_success.join(", "),"\n"," ","assume_success_timeout: ",this.settings.assume_success_timeout,"\n"," ","file_post_name: ",this.settings.file_post_name,"\n"," ","post_params: ",this.settings.post_params.toString(),"\n"," ","file_types: ",this.settings.file_types,"\n"," ","file_types_description: ",this.settings.file_types_description,"\n"," ","file_size_limit: ",this.settings.file_size_limit,"\n"," ","file_upload_limit: ",this.settings.file_upload_limit,"\n"," ","file_queue_limit: ",this.settings.file_queue_limit,"\n"," ","debug: ",this.settings.debug.toString(),"\n"," ","prevent_swf_caching: ",this.settings.prevent_swf_caching.toString(),"\n"," ","button_placeholder_id: ",this.settings.button_placeholder_id.toString(),"\n"," ","button_placeholder: ",this.settings.button_placeholder?"Set":"Not Set","\n"," ","button_image_url: ",this.settings.button_image_url.toString(),"\n"," ","button_width: ",this.settings.button_width.toString(),"\n"," ","button_height: ",this.settings.button_height.toString(),"\n"," ","button_text: ",this.settings.button_text.toString(),"\n"," ","button_text_style: ",this.settings.button_text_style.toString(),"\n"," ","button_text_top_padding: ",this.settings.button_text_top_padding.toString(),"\n"," ","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n"," ","button_action: ",this.settings.button_action.toString(),"\n"," ","button_disabled: ",this.settings.button_disabled.toString(),"\n"," ","custom_settings: ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n"," ","swfupload_loaded_handler assigned: ",("function"==typeof this.settings.swfupload_loaded_handler).toString(),"\n"," ","file_dialog_start_handler assigned: ",("function"==typeof this.settings.file_dialog_start_handler).toString(),"\n"," ","file_queued_handler assigned: ",("function"==typeof this.settings.file_queued_handler).toString(),"\n"," ","file_queue_error_handler assigned: ",("function"==typeof this.settings.file_queue_error_handler).toString(),"\n"," ","upload_start_handler assigned: ",("function"==typeof this.settings.upload_start_handler).toString(),"\n"," ","upload_progress_handler assigned: ",("function"==typeof this.settings.upload_progress_handler).toString(),"\n"," ","upload_error_handler assigned: ",("function"==typeof this.settings.upload_error_handler).toString(),"\n"," ","upload_success_handler assigned: ",("function"==typeof this.settings.upload_success_handler).toString(),"\n"," ","upload_complete_handler assigned: ",("function"==typeof this.settings.upload_complete_handler).toString(),"\n"," ","debug_handler assigned: ",("function"==typeof this.settings.debug_handler).toString(),"\n"].join(""))},SWFUpload.prototype.addSetting=function(a,b,c){return this.settings[a]=void 0==b?c:b},SWFUpload.prototype.getSetting=function(a){return void 0!=this.settings[a]?this.settings[a]:""},SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement(),returnValue,returnString;try{returnString=movieElement.CallFunction(''+__flash__argumentsToXML(argumentArray,0)+""),returnValue=eval(returnString)}catch(ex){throw"Call to "+functionName+" failed"}return void 0!=returnValue&&"object"==typeof returnValue.post&&(returnValue=this.unescapeFilePostParams(returnValue)),returnValue},SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")},SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")},SWFUpload.prototype.startUpload=function(a){this.callFlash("StartUpload",[a])},SWFUpload.prototype.cancelUpload=function(a,b){b!==!1&&(b=!0),this.callFlash("CancelUpload",[a,b])},SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")},SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")},SWFUpload.prototype.setStats=function(a){this.callFlash("SetStats",[a])},SWFUpload.prototype.getFile=function(a){return"number"==typeof a?this.callFlash("GetFileByIndex",[a]):this.callFlash("GetFile",[a])},SWFUpload.prototype.addFileParam=function(a,b,c){return this.callFlash("AddFileParam",[a,b,c])},SWFUpload.prototype.removeFileParam=function(a,b){this.callFlash("RemoveFileParam",[a,b])},SWFUpload.prototype.setUploadURL=function(a){this.settings.upload_url=a.toString(),this.callFlash("SetUploadURL",[a])},SWFUpload.prototype.setPostParams=function(a){this.settings.post_params=a,this.callFlash("SetPostParams",[a])},SWFUpload.prototype.addPostParam=function(a,b){this.settings.post_params[a]=b,this.callFlash("SetPostParams",[this.settings.post_params])},SWFUpload.prototype.removePostParam=function(a){delete this.settings.post_params[a],this.callFlash("SetPostParams",[this.settings.post_params])},SWFUpload.prototype.setFileTypes=function(a,b){this.settings.file_types=a,this.settings.file_types_description=b,this.callFlash("SetFileTypes",[a,b])},SWFUpload.prototype.setFileSizeLimit=function(a){this.settings.file_size_limit=a,this.callFlash("SetFileSizeLimit",[a])},SWFUpload.prototype.setFileUploadLimit=function(a){this.settings.file_upload_limit=a,this.callFlash("SetFileUploadLimit",[a])},SWFUpload.prototype.setFileQueueLimit=function(a){this.settings.file_queue_limit=a,this.callFlash("SetFileQueueLimit",[a])},SWFUpload.prototype.setFilePostName=function(a){this.settings.file_post_name=a,this.callFlash("SetFilePostName",[a])},SWFUpload.prototype.setUseQueryString=function(a){this.settings.use_query_string=a,this.callFlash("SetUseQueryString",[a])},SWFUpload.prototype.setRequeueOnError=function(a){this.settings.requeue_on_error=a,this.callFlash("SetRequeueOnError",[a])},SWFUpload.prototype.setHTTPSuccess=function(a){"string"==typeof a&&(a=a.replace(" ","").split(",")),this.settings.http_success=a,this.callFlash("SetHTTPSuccess",[a])},SWFUpload.prototype.setAssumeSuccessTimeout=function(a){this.settings.assume_success_timeout=a,this.callFlash("SetAssumeSuccessTimeout",[a])},SWFUpload.prototype.setDebugEnabled=function(a){this.settings.debug_enabled=a,this.callFlash("SetDebugEnabled",[a])},SWFUpload.prototype.setButtonImageURL=function(a){void 0==a&&(a=""),this.settings.button_image_url=a,this.callFlash("SetButtonImageURL",[a])},SWFUpload.prototype.setButtonDimensions=function(a,b){this.settings.button_width=a,this.settings.button_height=b;var c=this.getMovieElement();void 0!=c&&(c.style.width=a+"px",c.style.height=b+"px"),this.callFlash("SetButtonDimensions",[a,b])},SWFUpload.prototype.setButtonText=function(a){this.settings.button_text=a,this.callFlash("SetButtonText",[a])},SWFUpload.prototype.setButtonTextPadding=function(a,b){this.settings.button_text_top_padding=b,this.settings.button_text_left_padding=a,this.callFlash("SetButtonTextPadding",[a,b])},SWFUpload.prototype.setButtonTextStyle=function(a){this.settings.button_text_style=a,this.callFlash("SetButtonTextStyle",[a])},SWFUpload.prototype.setButtonDisabled=function(a){this.settings.button_disabled=a,this.callFlash("SetButtonDisabled",[a])},SWFUpload.prototype.setButtonAction=function(a){this.settings.button_action=a,this.callFlash("SetButtonAction",[a])},SWFUpload.prototype.setButtonCursor=function(a){this.settings.button_cursor=a,this.callFlash("SetButtonCursor",[a])},SWFUpload.prototype.queueEvent=function(a,b){void 0==b?b=[]:b instanceof Array||(b=[b]);var c=this;if("function"==typeof this.settings[a])this.eventQueue.push(function(){this.settings[a].apply(this,b)}),setTimeout(function(){c.executeNextEvent()},0);else if(null!==this.settings[a])throw"Event handler "+a+" is unknown or is not a function"},SWFUpload.prototype.executeNextEvent=function(){var a=this.eventQueue?this.eventQueue.shift():null;"function"==typeof a&&a.apply(this)},SWFUpload.prototype.unescapeFilePostParams=function(a){var b,c=/[$]([0-9a-f]{4})/i,d={};if(void 0!=a){for(var e in a.post)if(a.post.hasOwnProperty(e)){b=e;for(var f;null!==(f=c.exec(b));)b=b.replace(f[0],String.fromCharCode(parseInt("0x"+f[1],16)));d[b]=a.post[e]}a.post=d}return a},SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface")}catch(a){return!1}},SWFUpload.prototype.flashReady=function(){var a=this.getMovieElement();return a?(this.cleanUp(a),void this.queueEvent("swfupload_loaded_handler")):void this.debug("Flash called back ready but the flash movie can't be found.")},SWFUpload.prototype.cleanUp=function(a){try{if(this.movieElement&&"unknown"==typeof a.CallFunction){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var b in a)try{"function"==typeof a[b]&&(a[b]=null)}catch(c){}}}catch(d){}window.__flash__removeCallback=function(a,b){try{a&&(a[b]=null)}catch(c){}}},SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")},SWFUpload.prototype.fileQueued=function(a){a=this.unescapeFilePostParams(a),this.queueEvent("file_queued_handler",a)},SWFUpload.prototype.fileQueueError=function(a,b,c){a=this.unescapeFilePostParams(a),this.queueEvent("file_queue_error_handler",[a,b,c])},SWFUpload.prototype.fileDialogComplete=function(a,b,c){this.queueEvent("file_dialog_complete_handler",[a,b,c])},SWFUpload.prototype.uploadStart=function(a){a=this.unescapeFilePostParams(a),this.queueEvent("return_upload_start_handler",a)},SWFUpload.prototype.returnUploadStart=function(a){var b;if("function"==typeof this.settings.upload_start_handler)a=this.unescapeFilePostParams(a),b=this.settings.upload_start_handler.call(this,a);else if(void 0!=this.settings.upload_start_handler)throw"upload_start_handler must be a function";void 0===b&&(b=!0),b=!!b,this.callFlash("ReturnUploadStart",[b])},SWFUpload.prototype.uploadProgress=function(a,b,c){a=this.unescapeFilePostParams(a),this.queueEvent("upload_progress_handler",[a,b,c])},SWFUpload.prototype.uploadError=function(a,b,c){a=this.unescapeFilePostParams(a),this.queueEvent("upload_error_handler",[a,b,c])},SWFUpload.prototype.uploadSuccess=function(a,b,c){a=this.unescapeFilePostParams(a),this.queueEvent("upload_success_handler",[a,b,c])},SWFUpload.prototype.uploadComplete=function(a){a=this.unescapeFilePostParams(a),this.queueEvent("upload_complete_handler",a)},SWFUpload.prototype.debug=function(a){this.queueEvent("debug_handler",a)},SWFUpload.prototype.debugMessage=function(a){if(this.settings.debug){var b,c=[];if("object"==typeof a&&"string"==typeof a.name&&"string"==typeof a.message){for(var d in a)a.hasOwnProperty(d)&&c.push(d+": "+a[d]);b=c.join("\n")||"",c=b.split("\n"),b="EXCEPTION: "+c.join("\nEXCEPTION: "),SWFUpload.Console.writeLine(b)}else SWFUpload.Console.writeLine(a)}},SWFUpload.Console={},SWFUpload.Console.writeLine=function(a){var b,c;try{b=document.getElementById("SWFUpload_Console"),b||(c=document.createElement("form"),document.getElementsByTagName("body")[0].appendChild(c),b=document.createElement("textarea"),b.id="SWFUpload_Console",b.style.fontFamily="monospace",b.setAttribute("wrap","off"),b.wrap="off",b.style.overflow="auto",b.style.width="700px",b.style.height="350px",b.style.margin="5px",c.appendChild(b)),b.value+=a+"\n",b.scrollTop=b.scrollHeight-b.clientHeight}catch(d){alert("Exception: "+d.name+" Message: "+d.message)}};
\ No newline at end of file
+var SWFUpload;void 0==SWFUpload&&(SWFUpload=function(a){this.initSWFUpload(a)}),SWFUpload.prototype.initSWFUpload=function(a){try{this.customSettings={},this.settings=a,this.eventQueue=[],this.movieName="SWFUpload_"+SWFUpload.movieCount++,this.movieElement=null,SWFUpload.instances[this.movieName]=this,this.initSettings(),this.loadFlash(),this.displayDebugInfo()}catch(b){throw delete SWFUpload.instances[this.movieName],b}},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(a){if("string"!=typeof a||a.match(/^https?:\/\//i)||a.match(/^\//))return a;var b=(window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""),window.location.pathname.lastIndexOf("/"));return 0>=b?path="/":path=window.location.pathname.substr(0,b)+"/",path+a},SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(a,b){this.settings[a]=void 0==this.settings[a]?b:this.settings[a]},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 a,b;if(null!==document.getElementById(this.movieName))throw"ID "+this.movieName+" is already in use. The Flash Object could not be added";if(a=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder,void 0==a)throw"Could not find the placeholder element: "+this.settings.button_placeholder_id;b=document.createElement("div"),b.innerHTML=this.getFlashHTML(),a.parentNode.replaceChild(b.firstChild,a),void 0==window[this.movieName]&&(window[this.movieName]=this.getMovieElement())},SWFUpload.prototype.getFlashHTML=function(){return['"].join("")},SWFUpload.prototype.getFlashVars=function(){var a=this.buildParamString(),b=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(b),"&assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"¶ms=",encodeURIComponent(a),"&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(void 0==this.movieElement&&(this.movieElement=document.getElementById(this.movieName)),null===this.movieElement)throw"Could not find Flash element";return this.movieElement},SWFUpload.prototype.buildParamString=function(){var a=this.settings.post_params,b=[];if("object"==typeof a)for(var c in a)a.hasOwnProperty(c)&&b.push(encodeURIComponent(c.toString())+"="+encodeURIComponent(a[c].toString()));return b.join("&")},SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,!1);var a=null;if(a=this.getMovieElement(),a&&"unknown"==typeof a.CallFunction){for(var b in a)try{"function"==typeof a[b]&&(a[b]=null)}catch(c){}try{a.parentNode.removeChild(a)}catch(d){}}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(e){return!1}},SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n"," ","upload_url: ",this.settings.upload_url,"\n"," ","flash_url: ",this.settings.flash_url,"\n"," ","use_query_string: ",this.settings.use_query_string.toString(),"\n"," ","requeue_on_error: ",this.settings.requeue_on_error.toString(),"\n"," ","http_success: ",this.settings.http_success.join(", "),"\n"," ","assume_success_timeout: ",this.settings.assume_success_timeout,"\n"," ","file_post_name: ",this.settings.file_post_name,"\n"," ","post_params: ",this.settings.post_params.toString(),"\n"," ","file_types: ",this.settings.file_types,"\n"," ","file_types_description: ",this.settings.file_types_description,"\n"," ","file_size_limit: ",this.settings.file_size_limit,"\n"," ","file_upload_limit: ",this.settings.file_upload_limit,"\n"," ","file_queue_limit: ",this.settings.file_queue_limit,"\n"," ","debug: ",this.settings.debug.toString(),"\n"," ","prevent_swf_caching: ",this.settings.prevent_swf_caching.toString(),"\n"," ","button_placeholder_id: ",this.settings.button_placeholder_id.toString(),"\n"," ","button_placeholder: ",this.settings.button_placeholder?"Set":"Not Set","\n"," ","button_image_url: ",this.settings.button_image_url.toString(),"\n"," ","button_width: ",this.settings.button_width.toString(),"\n"," ","button_height: ",this.settings.button_height.toString(),"\n"," ","button_text: ",this.settings.button_text.toString(),"\n"," ","button_text_style: ",this.settings.button_text_style.toString(),"\n"," ","button_text_top_padding: ",this.settings.button_text_top_padding.toString(),"\n"," ","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n"," ","button_action: ",this.settings.button_action.toString(),"\n"," ","button_disabled: ",this.settings.button_disabled.toString(),"\n"," ","custom_settings: ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n"," ","swfupload_loaded_handler assigned: ",("function"==typeof this.settings.swfupload_loaded_handler).toString(),"\n"," ","file_dialog_start_handler assigned: ",("function"==typeof this.settings.file_dialog_start_handler).toString(),"\n"," ","file_queued_handler assigned: ",("function"==typeof this.settings.file_queued_handler).toString(),"\n"," ","file_queue_error_handler assigned: ",("function"==typeof this.settings.file_queue_error_handler).toString(),"\n"," ","upload_start_handler assigned: ",("function"==typeof this.settings.upload_start_handler).toString(),"\n"," ","upload_progress_handler assigned: ",("function"==typeof this.settings.upload_progress_handler).toString(),"\n"," ","upload_error_handler assigned: ",("function"==typeof this.settings.upload_error_handler).toString(),"\n"," ","upload_success_handler assigned: ",("function"==typeof this.settings.upload_success_handler).toString(),"\n"," ","upload_complete_handler assigned: ",("function"==typeof this.settings.upload_complete_handler).toString(),"\n"," ","debug_handler assigned: ",("function"==typeof this.settings.debug_handler).toString(),"\n"].join(""))},SWFUpload.prototype.addSetting=function(a,b,c){return void 0==b?this.settings[a]=c:this.settings[a]=b},SWFUpload.prototype.getSetting=function(a){return void 0!=this.settings[a]?this.settings[a]:""},SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement(),returnValue,returnString;try{returnString=movieElement.CallFunction(''+__flash__argumentsToXML(argumentArray,0)+""),returnValue=eval(returnString)}catch(ex){throw"Call to "+functionName+" failed"}return void 0!=returnValue&&"object"==typeof returnValue.post&&(returnValue=this.unescapeFilePostParams(returnValue)),returnValue},SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")},SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")},SWFUpload.prototype.startUpload=function(a){this.callFlash("StartUpload",[a])},SWFUpload.prototype.cancelUpload=function(a,b){b!==!1&&(b=!0),this.callFlash("CancelUpload",[a,b])},SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")},SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")},SWFUpload.prototype.setStats=function(a){this.callFlash("SetStats",[a])},SWFUpload.prototype.getFile=function(a){return"number"==typeof a?this.callFlash("GetFileByIndex",[a]):this.callFlash("GetFile",[a])},SWFUpload.prototype.addFileParam=function(a,b,c){return this.callFlash("AddFileParam",[a,b,c])},SWFUpload.prototype.removeFileParam=function(a,b){this.callFlash("RemoveFileParam",[a,b])},SWFUpload.prototype.setUploadURL=function(a){this.settings.upload_url=a.toString(),this.callFlash("SetUploadURL",[a])},SWFUpload.prototype.setPostParams=function(a){this.settings.post_params=a,this.callFlash("SetPostParams",[a])},SWFUpload.prototype.addPostParam=function(a,b){this.settings.post_params[a]=b,this.callFlash("SetPostParams",[this.settings.post_params])},SWFUpload.prototype.removePostParam=function(a){delete this.settings.post_params[a],this.callFlash("SetPostParams",[this.settings.post_params])},SWFUpload.prototype.setFileTypes=function(a,b){this.settings.file_types=a,this.settings.file_types_description=b,this.callFlash("SetFileTypes",[a,b])},SWFUpload.prototype.setFileSizeLimit=function(a){this.settings.file_size_limit=a,this.callFlash("SetFileSizeLimit",[a])},SWFUpload.prototype.setFileUploadLimit=function(a){this.settings.file_upload_limit=a,this.callFlash("SetFileUploadLimit",[a])},SWFUpload.prototype.setFileQueueLimit=function(a){this.settings.file_queue_limit=a,this.callFlash("SetFileQueueLimit",[a])},SWFUpload.prototype.setFilePostName=function(a){this.settings.file_post_name=a,this.callFlash("SetFilePostName",[a])},SWFUpload.prototype.setUseQueryString=function(a){this.settings.use_query_string=a,this.callFlash("SetUseQueryString",[a])},SWFUpload.prototype.setRequeueOnError=function(a){this.settings.requeue_on_error=a,this.callFlash("SetRequeueOnError",[a])},SWFUpload.prototype.setHTTPSuccess=function(a){"string"==typeof a&&(a=a.replace(" ","").split(",")),this.settings.http_success=a,this.callFlash("SetHTTPSuccess",[a])},SWFUpload.prototype.setAssumeSuccessTimeout=function(a){this.settings.assume_success_timeout=a,this.callFlash("SetAssumeSuccessTimeout",[a])},SWFUpload.prototype.setDebugEnabled=function(a){this.settings.debug_enabled=a,this.callFlash("SetDebugEnabled",[a])},SWFUpload.prototype.setButtonImageURL=function(a){void 0==a&&(a=""),this.settings.button_image_url=a,this.callFlash("SetButtonImageURL",[a])},SWFUpload.prototype.setButtonDimensions=function(a,b){this.settings.button_width=a,this.settings.button_height=b;var c=this.getMovieElement();void 0!=c&&(c.style.width=a+"px",c.style.height=b+"px"),this.callFlash("SetButtonDimensions",[a,b])},SWFUpload.prototype.setButtonText=function(a){this.settings.button_text=a,this.callFlash("SetButtonText",[a])},SWFUpload.prototype.setButtonTextPadding=function(a,b){this.settings.button_text_top_padding=b,this.settings.button_text_left_padding=a,this.callFlash("SetButtonTextPadding",[a,b])},SWFUpload.prototype.setButtonTextStyle=function(a){this.settings.button_text_style=a,this.callFlash("SetButtonTextStyle",[a])},SWFUpload.prototype.setButtonDisabled=function(a){this.settings.button_disabled=a,this.callFlash("SetButtonDisabled",[a])},SWFUpload.prototype.setButtonAction=function(a){this.settings.button_action=a,this.callFlash("SetButtonAction",[a])},SWFUpload.prototype.setButtonCursor=function(a){this.settings.button_cursor=a,this.callFlash("SetButtonCursor",[a])},SWFUpload.prototype.queueEvent=function(a,b){void 0==b?b=[]:b instanceof Array||(b=[b]);var c=this;if("function"==typeof this.settings[a])this.eventQueue.push(function(){this.settings[a].apply(this,b)}),setTimeout(function(){c.executeNextEvent()},0);else if(null!==this.settings[a])throw"Event handler "+a+" is unknown or is not a function"},SWFUpload.prototype.executeNextEvent=function(){var a=this.eventQueue?this.eventQueue.shift():null;"function"==typeof a&&a.apply(this)},SWFUpload.prototype.unescapeFilePostParams=function(a){var b,c=/[$]([0-9a-f]{4})/i,d={};if(void 0!=a){for(var e in a.post)if(a.post.hasOwnProperty(e)){b=e;for(var f;null!==(f=c.exec(b));)b=b.replace(f[0],String.fromCharCode(parseInt("0x"+f[1],16)));d[b]=a.post[e]}a.post=d}return a},SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface")}catch(a){return!1}},SWFUpload.prototype.flashReady=function(){var a=this.getMovieElement();return a?(this.cleanUp(a),void this.queueEvent("swfupload_loaded_handler")):void this.debug("Flash called back ready but the flash movie can't be found.")},SWFUpload.prototype.cleanUp=function(a){try{if(this.movieElement&&"unknown"==typeof a.CallFunction){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var b in a)try{"function"==typeof a[b]&&(a[b]=null)}catch(c){}}}catch(d){}window.__flash__removeCallback=function(a,b){try{a&&(a[b]=null)}catch(c){}}},SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")},SWFUpload.prototype.fileQueued=function(a){a=this.unescapeFilePostParams(a),this.queueEvent("file_queued_handler",a)},SWFUpload.prototype.fileQueueError=function(a,b,c){a=this.unescapeFilePostParams(a),this.queueEvent("file_queue_error_handler",[a,b,c])},SWFUpload.prototype.fileDialogComplete=function(a,b,c){this.queueEvent("file_dialog_complete_handler",[a,b,c])},SWFUpload.prototype.uploadStart=function(a){a=this.unescapeFilePostParams(a),this.queueEvent("return_upload_start_handler",a)},SWFUpload.prototype.returnUploadStart=function(a){var b;if("function"==typeof this.settings.upload_start_handler)a=this.unescapeFilePostParams(a),b=this.settings.upload_start_handler.call(this,a);else if(void 0!=this.settings.upload_start_handler)throw"upload_start_handler must be a function";void 0===b&&(b=!0),b=!!b,this.callFlash("ReturnUploadStart",[b])},SWFUpload.prototype.uploadProgress=function(a,b,c){a=this.unescapeFilePostParams(a),this.queueEvent("upload_progress_handler",[a,b,c])},SWFUpload.prototype.uploadError=function(a,b,c){a=this.unescapeFilePostParams(a),this.queueEvent("upload_error_handler",[a,b,c])},SWFUpload.prototype.uploadSuccess=function(a,b,c){a=this.unescapeFilePostParams(a),this.queueEvent("upload_success_handler",[a,b,c])},SWFUpload.prototype.uploadComplete=function(a){a=this.unescapeFilePostParams(a),this.queueEvent("upload_complete_handler",a)},SWFUpload.prototype.debug=function(a){this.queueEvent("debug_handler",a)},SWFUpload.prototype.debugMessage=function(a){if(this.settings.debug){var b,c=[];if("object"==typeof a&&"string"==typeof a.name&&"string"==typeof a.message){for(var d in a)a.hasOwnProperty(d)&&c.push(d+": "+a[d]);b=c.join("\n")||"",c=b.split("\n"),b="EXCEPTION: "+c.join("\nEXCEPTION: "),SWFUpload.Console.writeLine(b)}else SWFUpload.Console.writeLine(a)}},SWFUpload.Console={},SWFUpload.Console.writeLine=function(a){var b,c;try{b=document.getElementById("SWFUpload_Console"),b||(c=document.createElement("form"),document.getElementsByTagName("body")[0].appendChild(c),b=document.createElement("textarea"),b.id="SWFUpload_Console",b.style.fontFamily="monospace",b.setAttribute("wrap","off"),b.wrap="off",b.style.overflow="auto",b.style.width="700px",b.style.height="350px",b.style.margin="5px",c.appendChild(b)),b.value+=a+"\n",b.scrollTop=b.scrollHeight-b.clientHeight}catch(d){alert("Exception: "+d.name+" Message: "+d.message)}};
\ No newline at end of file
diff --git a/modules/editor/tpl/js/uploader.min.js b/modules/editor/tpl/js/uploader.min.js
index 95413a6b0..1da2905a8 100644
--- a/modules/editor/tpl/js/uploader.min.js
+++ b/modules/editor/tpl/js/uploader.min.js
@@ -1 +1 @@
-function previewFiles(a,b){var c,d,e,f,g,h,i=jQuery;if(!b){if(c=i(a.target).parent().addBack().filter("select").find(">option:selected"),!c.length)return;b=c.attr("value")}b&&is_def(e=uploadedFiles[b])&&(d=i("#"+e.previewAreaID).html(" "),d.length&&(f=e.download_url||"",g=f.match(/\.(?:(flv)|(swf)|(wmv|avi|mpe?g|as[fx]|mp3)|(jpe?g|png|gif))$/i),"Y"==e.direct_download&&g?g[1]?h='':g[2]?h='':g[3]?h='':g[4]&&(h='
'):h='
',h&&d.html(h)))}function removeUploadedFile(a){var b=uploaderSettings[a],c=b.fileListAreaID,d=get_by_id(c);if(d&&!(d.selectedIndex<0)){for(var e=[],f=0;f\r\n
\r\n",f.push(temp_code)):f.push('
'):f.push(''+i.source_filename+"\n")}}if("html"==editorMode[a])f.length>0&&get_by_id("editor_textarea_"+a)&&(get_by_id("editor_textarea_"+a).value+=f.join(""));else{var j=editorGetIFrame(a);if(!j)return;f.length>0&&editorReplaceHTML(j,f.join(""))}}}}var uploadedFiles=[],uploaderSettings=[],loaded_images=[],swfUploadObjs=[],uploadSettingObj=[],uploadAutosaveChecker=!1;!function(a){function b(b){var d=b.editorSequence;is_def(d)&&(b=a.extend({sessionName:"PHPSESSID",allowedFileSize:2097152,allowedFileTypes:"*.*",allowedFileTypesDescription:"All Files",replaceButtonID:"swfUploadButton"+b.editorSequence,insertedFiles:0},b),uploadSettingObj[d]=b,a(function(){c(b)}))}function c(b){var c,d,g,h,i,j,k,l,m,n,o,p;i=b.editorSequence,j=b.replaceButtonID,c=a("#"+j).wrap(''),d=c.width(),g=c.height(),h=a('').insertAfter(c),k={flash_url:request_uri+"modules/editor/tpl/images/SWFUpload.swf",upload_url:request_uri+"index.php",post_params:{mid:current_mid,act:"procFileUpload",editor_sequence:i,uploadTargetSrl:editorRelKeys[i].primary.value},http_success:[302],file_size_limit:Math.floor((parseInt(b.allowedFileSize,10)||1024)/1024),file_queue_limit:0,file_upload_limit:0,file_types:b.allowedFileTypes,file_types_description:b.allowedFileTypesDescription,custom_settings:{progressTarget:null,cancelButtonId:null},debug:!1,button_window_mode:"transparent",button_placeholder_id:h.attr("id"),button_text:null,button_image_url:request_uri+"common/img/blank.gif",button_width:d,button_height:g,button_text_style:null,button_text_left_padding:0,button_text_top_padding:0,button_cursor:-2,editorSequence:i,uploadTargetSrl:editorRelKeys[i].primary.value,fileListAreaID:b.fileListAreaID,previewAreaID:b.previewAreaID,uploaderStatusID:b.uploaderStatusID},"undefined"!=typeof enforce_ssl&&enforce_ssl&&(k.upload_url=request_uri+"index.php"),a("#"+b.fileListAreaID).click(previewFiles),l={file_queued:"FileQueued",file_queue_error:"FileQueueError",file_dialog_complete:"FileDialogComplete",upload_start:"UploadStart",upload_progress:"UploadProgress",upload_error:"UploadError",upload_success:"UploadSuccess",upload_complete:"UploadComplete",queue_complete:"QueueComplete"};for(m in l)l.hasOwnProperty(m)&&(n="on"+l[m],k[m+"_handler"]=b["on"+n]||f[n]);is_def(window.xeVid)&&(k.post_params.vid=xeVid),k.sessionName=b.sessionName,getCookie(b.sessionName)&&(k.post_params[b.sessionName]=getCookie(b.sessionName)),uploaderSettings[i]=k,o=new SWFUpload(k),p=a("#"+o.movieName),swfUploadObjs[i]=o.movieName,p.length&&(p.css({display:"block",cursor:"pointer",position:"absolute",left:0,top:0,width:d+"px",height:g+"px"}),(b.insertedFiles||editorRelKeys[i].primary.value)&&e(b))}function d(){return!0}function e(b){function c(){"function"==typeof _editorAutoSave&&(uploadAutosaveChecker=!0,_editorAutoSave(!0))}function d(d){var e,f,g,h,i,j,k,l,m,n,o;if(f=d.editor_sequence,g=d.files,i=d.upload_status,h=d.upload_target_srl,j=Math.floor((parseInt(d.left_size,10)||0)/1024),e=a("#"+b.fileListAreaID).empty(),h&&(editorRelKeys[f].primary.value!=h&&(editorRelKeys[f].primary.value=h,c()),editorRelKeys[f].primary.value=h,b.uploadTargetSrl=h),a("#"+b.uploaderStatusID).html(i),a("#"+b.previewAreaID).empty(),g&&g.item){for(k=g.item,a.isArray(k)||(k=[k]),l=0,m=k.length;m>l;l++)n=k[l],o=n.file_srl,uploadedFiles[o]=n,n.previewAreaID=b.previewAreaID,/\.(jpe?g|png|gif)$/i.test(n.download_url)&&(loaded_images[o]=a("
").attr("src",n.download_url).get(0)),a("").text(n.source_filename+" ("+n.disp_file_size+" )").attr("value",o).appendTo(e);l&&e.prop("selectedIndex",l-1).click()}uploadAutosaveChecker||c()}var e={mid:current_mid,file_list_area_id:b.fileListAreaID,editor_sequence:b.editorSequence,upload_target_srl:b.uploadTargetSrl};exec_xml("file","getFileList",e,d,"error,message,files,upload_status,upload_target_srl,editor_sequence,left_size".split(","))}var f;f={onFileQueued:d,onFileQueueError:function(a,b,c){try{switch(b){case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:alert("You have attempted to queue too many files.\n"+(0===c?"You have reached the upload limit.":"You may select "+(c>1?"up to "+c+" files.":"one file.")));break;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:alert("Error Code: File too big, File name: "+a.name+", File size: "+a.size+", Message: "+c);break;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:alert("Error Code: Zero byte file, File name: "+a.name+", File size: "+a.size+", Message: "+c);break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:alert("Error Code: Invalid File Type, File name: "+a.name+", File size: "+a.size+", Message: "+c);break;default:alert("Error Code: "+b+", File name: "+a.name+", File size: "+a.size+", Message: "+c)}}catch(d){this.debug(d)}},onFileDialogComplete:function(){try{getCookie(this.settings.sessionName)&&this.addPostParam(this.settings.sessionName,getCookie(this.settings.sessionName)),this.startUpload()}catch(a){this.debug(a)}},onUploadStart:d,onUploadProgress:function(b,c,d){getCookie(this.settings.sessionName)&&this.addPostParam(this.settings.sessionName,getCookie(this.settings.sessionName));try{var e,f,g,h;e=a("#"+this.settings.fileListAreaID),g=Math.ceil(c/d*100),h=b.name,f=e.find(">option:last"),h.length>20&&(h=h.substr(0,20)+"..."),f.length&&f.attr("value")==b.id||(f=a("").attr("value",b.id).appendTo(e)),f.text(h+" ("+g+"%)")}catch(i){this.debug(i)}},onUploadSuccess:function(){try{0!==this.getStats().files_queued&&this.startUpload()}catch(a){this.debug(a)}},onUploadError:function(a,b,c){try{switch(b){case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:alert("Error Code: HTTP Error, File name: "+a.name+", Message: "+c);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:alert("Error Code: Upload Failed, File name: "+a.name+", File size: "+a.size+", Message: "+c);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:alert("Error Code: IO Error, File name: "+a.name+", Message: "+c);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:alert("Error Code: Security Error, File name: "+a.name+", Message: "+c);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:alert("Error Code: Upload Limit Exceeded, File name: "+a.name+", File size: "+a.size+", Message: "+c);break;case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:alert("Error Code: File Validation Failed, File name: "+a.name+", File size: "+a.size+", Message: "+c);break;case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:0===this.getStats().files_queued&&(document.getElementById(this.customSettings.cancelButtonId).disabled=!0);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:break;default:alert("Error Code: "+b+", File name: "+a.name+", File size: "+a.size+", Message: "+c)}}catch(d){this.debug(d)}},onUploadComplete:function(){try{{this.settings.fileListAreaID,this.settings.uploadTargetSrl}e(this.settings)}catch(a){this.debug(ex)}}},window.editorUploadInit=b,window.reloadFileList=e,a(function(){try{document.execCommand("BackgroundImageCache",!1,!0)}catch(a){}})}(jQuery);
\ No newline at end of file
+function previewFiles(a,b){var c,d,e,f,g,h,i=jQuery;if(!b){if(c=i(a.target).parent().addBack().filter("select").find(">option:selected"),!c.length)return;b=c.attr("value")}b&&is_def(e=uploadedFiles[b])&&(d=i("#"+e.previewAreaID).html(" "),d.length&&(f=e.download_url||"",g=f.match(/\.(?:(flv)|(swf)|(wmv|avi|mpe?g|as[fx]|mp3)|(jpe?g|png|gif))$/i),"Y"==e.direct_download&&g?g[1]?h='':g[2]?h='':g[3]?h='':g[4]&&(h='
'):h='
',h&&d.html(h)))}function removeUploadedFile(a){var b=uploaderSettings[a],c=b.fileListAreaID,d=get_by_id(c);if(d&&!(d.selectedIndex<0)){for(var e=[],f=0;f\r\n
\r\n",f.push(temp_code)):f.push('
'):f.push(''+i.source_filename+"\n")}}if("html"==editorMode[a])f.length>0&&get_by_id("editor_textarea_"+a)&&(get_by_id("editor_textarea_"+a).value+=f.join(""));else{var j=editorGetIFrame(a);if(!j)return;f.length>0&&editorReplaceHTML(j,f.join(""))}}}}var uploadedFiles=[],uploaderSettings=[],loaded_images=[],swfUploadObjs=[],uploadSettingObj=[],uploadAutosaveChecker=!1;!function(a){function b(b,d){var e=b.editorSequence;is_def(e)&&(b=a.extend({sessionName:"PHPSESSID",allowedFileSize:2097152,allowedFileTypes:"*.*",allowedFileTypesDescription:"All Files",replaceButtonID:"swfUploadButton"+b.editorSequence,insertedFiles:0},b),uploadSettingObj[e]=b,a(function(){c(b)}))}function c(b){var c,d,g,h,i,j,k,l,m,n,o,p;i=b.editorSequence,j=b.replaceButtonID,c=a("#"+j).wrap(''),d=c.width(),g=c.height(),h=a('').insertAfter(c),k={flash_url:request_uri+"modules/editor/tpl/images/SWFUpload.swf",upload_url:request_uri+"index.php",post_params:{mid:current_mid,act:"procFileUpload",editor_sequence:i,uploadTargetSrl:editorRelKeys[i].primary.value},http_success:[302],file_size_limit:Math.floor((parseInt(b.allowedFileSize,10)||1024)/1024),file_queue_limit:0,file_upload_limit:0,file_types:b.allowedFileTypes,file_types_description:b.allowedFileTypesDescription,custom_settings:{progressTarget:null,cancelButtonId:null},debug:!1,button_window_mode:"transparent",button_placeholder_id:h.attr("id"),button_text:null,button_image_url:request_uri+"common/img/blank.gif",button_width:d,button_height:g,button_text_style:null,button_text_left_padding:0,button_text_top_padding:0,button_cursor:-2,editorSequence:i,uploadTargetSrl:editorRelKeys[i].primary.value,fileListAreaID:b.fileListAreaID,previewAreaID:b.previewAreaID,uploaderStatusID:b.uploaderStatusID},"undefined"!=typeof enforce_ssl&&enforce_ssl&&(k.upload_url=request_uri+"index.php"),a("#"+b.fileListAreaID).click(previewFiles),l={file_queued:"FileQueued",file_queue_error:"FileQueueError",file_dialog_complete:"FileDialogComplete",upload_start:"UploadStart",upload_progress:"UploadProgress",upload_error:"UploadError",upload_success:"UploadSuccess",upload_complete:"UploadComplete",queue_complete:"QueueComplete"};for(m in l)l.hasOwnProperty(m)&&(n="on"+l[m],k[m+"_handler"]=b["on"+n]||f[n]);is_def(window.xeVid)&&(k.post_params.vid=xeVid),k.sessionName=b.sessionName,getCookie(b.sessionName)&&(k.post_params[b.sessionName]=getCookie(b.sessionName)),uploaderSettings[i]=k,o=new SWFUpload(k),p=a("#"+o.movieName),swfUploadObjs[i]=o.movieName,p.length&&(p.css({display:"block",cursor:"pointer",position:"absolute",left:0,top:0,width:d+"px",height:g+"px"}),(b.insertedFiles||editorRelKeys[i].primary.value)&&e(b))}function d(){return!0}function e(b){function c(){"function"==typeof _editorAutoSave&&(uploadAutosaveChecker=!0,_editorAutoSave(!0))}function d(d,e){var f,g,h,i,j,k,l,m,n,o,p;if(g=d.editor_sequence,h=d.files,j=d.upload_status,i=d.upload_target_srl,k=Math.floor((parseInt(d.left_size,10)||0)/1024),f=a("#"+b.fileListAreaID).empty(),i&&(editorRelKeys[g].primary.value!=i&&(editorRelKeys[g].primary.value=i,c()),editorRelKeys[g].primary.value=i,b.uploadTargetSrl=i),a("#"+b.uploaderStatusID).html(j),a("#"+b.previewAreaID).empty(),h&&h.item){for(l=h.item,a.isArray(l)||(l=[l]),m=0,n=l.length;n>m;m++)o=l[m],p=o.file_srl,uploadedFiles[p]=o,o.previewAreaID=b.previewAreaID,/\.(jpe?g|png|gif)$/i.test(o.download_url)&&(loaded_images[p]=a("
").attr("src",o.download_url).get(0)),a("").text(o.source_filename+" ("+o.disp_file_size+" )").attr("value",p).appendTo(f);m&&f.prop("selectedIndex",m-1).click()}uploadAutosaveChecker||c()}var e={mid:current_mid,file_list_area_id:b.fileListAreaID,editor_sequence:b.editorSequence,upload_target_srl:b.uploadTargetSrl};exec_xml("file","getFileList",e,d,"error,message,files,upload_status,upload_target_srl,editor_sequence,left_size".split(","))}var f;f={onFileQueued:d,onFileQueueError:function(a,b,c){try{switch(b){case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:alert("You have attempted to queue too many files.\n"+(0===c?"You have reached the upload limit.":"You may select "+(c>1?"up to "+c+" files.":"one file.")));break;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:alert("Error Code: File too big, File name: "+a.name+", File size: "+a.size+", Message: "+c);break;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:alert("Error Code: Zero byte file, File name: "+a.name+", File size: "+a.size+", Message: "+c);break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:alert("Error Code: Invalid File Type, File name: "+a.name+", File size: "+a.size+", Message: "+c);break;default:alert("Error Code: "+b+", File name: "+a.name+", File size: "+a.size+", Message: "+c)}}catch(d){this.debug(d)}},onFileDialogComplete:function(a,b){try{getCookie(this.settings.sessionName)&&this.addPostParam(this.settings.sessionName,getCookie(this.settings.sessionName)),this.startUpload()}catch(c){this.debug(c)}},onUploadStart:d,onUploadProgress:function(b,c,d){getCookie(this.settings.sessionName)&&this.addPostParam(this.settings.sessionName,getCookie(this.settings.sessionName));try{var e,f,g,h;e=a("#"+this.settings.fileListAreaID),g=Math.ceil(c/d*100),h=b.name,f=e.find(">option:last"),h.length>20&&(h=h.substr(0,20)+"..."),f.length&&f.attr("value")==b.id||(f=a("").attr("value",b.id).appendTo(e)),f.text(h+" ("+g+"%)")}catch(i){this.debug(i)}},onUploadSuccess:function(a,b){try{0!==this.getStats().files_queued&&this.startUpload()}catch(c){this.debug(c)}},onUploadError:function(a,b,c){try{switch(b){case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:alert("Error Code: HTTP Error, File name: "+a.name+", Message: "+c);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:alert("Error Code: Upload Failed, File name: "+a.name+", File size: "+a.size+", Message: "+c);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:alert("Error Code: IO Error, File name: "+a.name+", Message: "+c);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:alert("Error Code: Security Error, File name: "+a.name+", Message: "+c);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:alert("Error Code: Upload Limit Exceeded, File name: "+a.name+", File size: "+a.size+", Message: "+c);break;case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:alert("Error Code: File Validation Failed, File name: "+a.name+", File size: "+a.size+", Message: "+c);break;case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:0===this.getStats().files_queued&&(document.getElementById(this.customSettings.cancelButtonId).disabled=!0);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:break;default:alert("Error Code: "+b+", File name: "+a.name+", File size: "+a.size+", Message: "+c)}}catch(d){this.debug(d)}},onUploadComplete:function(a){try{this.settings.fileListAreaID,this.settings.uploadTargetSrl;e(this.settings)}catch(b){this.debug(ex)}}},window.editorUploadInit=b,window.reloadFileList=e,a(function(){try{document.execCommand("BackgroundImageCache",!1,!0)}catch(a){}})}(jQuery);
\ No newline at end of file
diff --git a/modules/importer/tpl/js/importer_admin.min.js b/modules/importer/tpl/js/importer_admin.min.js
index 8da95b749..7071a1cfb 100644
--- a/modules/importer/tpl/js/importer_admin.min.js
+++ b/modules/importer/tpl/js/importer_admin.min.js
@@ -1 +1 @@
-function doSync(){return exec_xml("importer","procImporterAdminSync",[],function(a){alert(a.message),location.href=location.href}),!1}function doPreProcessing(a,b){function c(a){var c,d,e,g,i,j,k;if(h=!0,-1==a.status)return alert(a.message);for(c=get_by_id("fo_process"),d=c.elements,e=0,g=f.length;g>e;e++)i=f[e],d[i]?d[i].value=a[i]:0;if(k=get_by_id(b))for(j=["target_module","guestbook_target_module","user_id","unit_count"],e=0,g=j.length;g>e;e++)i=j[e],k.elements[i]&&(c.elements[i].value=k.elements[i].value);jQuery("#preProgressMsg").hide(),jQuery("#progressMsg").show(),doImport(b)}var d,e,f,g,h=!1,i=jQuery;return d=a.elements.xml_file.value,e=a.elements.type.value,d?(g=i("#process"),i("body").children(".x_modal-backdrop").length||i("body").append(''),i('a[href="#process"].modalAnchor').trigger("open.mw"),exec_xml("importer","procImporterAdminPreProcessing",{type:e,xml_file:d},c,f=["error","message","type","total","cur","key","status"]),!1):!1}function doImport(a){function b(b){function c(){alert(b.message),jQuery('a[href="#process"].modalAnchor').unbind("before-close.mw").trigger("close.mw").find("#progressBar").width(1).end().find("#progressPercent").html("0%").end();try{f.reset(),get_by_id(a).reset()}catch(c){}jQuery("span.btn > input[type=submit]").attr("disabled","disabled")}var d,i,j,k;for(d=0,i=e.length;i>d;d++)j=e[d],g[j]?g[j].value=b[j]:0;b.total=parseInt(b.total,10)||0,b.cur=parseInt(b.cur,10)||0,percent=parseInt(b.cur/b.total*100),jQuery("#totalCount").text(b.total),jQuery("#completeCount").text(b.cur),jQuery("#progressBar").width(percent+"%"),jQuery("#progressPercent").html(percent+"%"),b.total>b.cur?doImport(a):(k=get_by_id(a),null!=k&&k.isSync.checked?exec_xml("importer","procImporterAdminSync",h,function(a){!a||a.error&&"0"!=a.error||c()},e=["error","message"]):c())}var c,d,e,f=get_by_id("fo_process"),g=f.elements,h={};for(c=0,d=g.length;d>c;c++)h[g[c].name]=g[c].value;return show_waiting_message=!1,exec_xml("importer","procImporterAdminImport",h,b,e=["error","message","type","total","cur","key"]),show_waiting_message=!0,!1}function displayProgress(a,b){var c,d;c=Math.max(a?Math.round(b/a*100):100,1),d=jQuery("#status"),d.find("div.progress1").length||d.html(''),d.find("div.progress1").html(c+" ").css("width",c+"%").end().find("div.progress2").text(b+"/"+a)}jQuery(function(a){a(".checkxml").find("input:text").change(function(){a(this).closest(".checkxml").find(".x_help-inline").hide()}).end().find("button").click(function(){function b(a){var b,e;return e=g.find(">.xml"),b=g.find(">.ttxml"),$message.text(a.result_message),a.error||"true"!=a.exists?($message.attr("class","x_help-inline").fadeIn(300),b=b.filter(":visible"),b.eq(-1).slideUp(100,function(){b=b.slice(0,-1).eq(-1).slideUp(100,arguments.callee)}),g.find(":submit").attr("disabled","disabled"),c()):($message.attr("class","x_help-inline").fadeIn(300),g.find(":submit").removeAttr("disabled"),h=g.find(".syncmember:hidden"),f.prop("disabled",!1).removeClass("loading"),d.prop("disabled",!1),void("XML"==a.type?e.not(":visible").add(h).slideDown(300):"TTXML"==a.type&&(b.not(":visible").add(h).slideDown(300),g.find("input[name=type]").val("ttxml"))))}function c(){return f.prop("disabled",!1).removeClass("loading"),d.prop("disabled",!1),g.find(".syncmember:visible").slideUp(100),!1}var d,e,f,g,h;d=a(this).prop("disabled",!0),g=d.closest("form"),e=d.closest(".checkxml"),f=e.find("input").prop("disabled",!0).addClass("loading"),$message=e.find(".x_help-inline").hide(),show_waiting_message=!1,a.exec_json("importer.procImporterAdminCheckXmlFile",{filename:a.trim(f.val())},b)}).end().find(".x_help-inline").hide().end().closest("form").find(">.ttxml").hide().end().end().closest("form").find(":submit").attr("disabled","disabled"),a(".syncmember").hide()});
\ No newline at end of file
+function doSync(a){return exec_xml("importer","procImporterAdminSync",[],function(a){alert(a.message),location.href=location.href}),!1}function doPreProcessing(a,b){function c(a){var c,d,e,g,i,j,k;if(h=!0,-1==a.status)return alert(a.message);for(c=get_by_id("fo_process"),d=c.elements,e=0,g=f.length;g>e;e++)i=f[e],d[i]?d[i].value=a[i]:0;if(k=get_by_id(b))for(j=["target_module","guestbook_target_module","user_id","unit_count"],e=0,g=j.length;g>e;e++)i=j[e],k.elements[i]&&(c.elements[i].value=k.elements[i].value);jQuery("#preProgressMsg").hide(),jQuery("#progressMsg").show(),doImport(b)}var d,e,f,g,h=!1,i=jQuery;return d=a.elements.xml_file.value,e=a.elements.type.value,d?(g=i("#process"),i("body").children(".x_modal-backdrop").length||i("body").append(''),i('a[href="#process"].modalAnchor').trigger("open.mw"),exec_xml("importer","procImporterAdminPreProcessing",{type:e,xml_file:d},c,f=["error","message","type","total","cur","key","status"]),!1):!1}function doImport(a){function b(b,c){function d(){alert(b.message),jQuery('a[href="#process"].modalAnchor').unbind("before-close.mw").trigger("close.mw").find("#progressBar").width(1).end().find("#progressPercent").html("0%").end();try{f.reset(),get_by_id(a).reset()}catch(c){}jQuery("span.btn > input[type=submit]").attr("disabled","disabled")}var i,j,k,l;for(i=0,j=e.length;j>i;i++)k=e[i],g[k]?g[k].value=b[k]:0;b.total=parseInt(b.total,10)||0,b.cur=parseInt(b.cur,10)||0,percent=parseInt(b.cur/b.total*100),jQuery("#totalCount").text(b.total),jQuery("#completeCount").text(b.cur),jQuery("#progressBar").width(percent+"%"),jQuery("#progressPercent").html(percent+"%"),b.total>b.cur?doImport(a):(l=get_by_id(a),null!=l&&l.isSync.checked?exec_xml("importer","procImporterAdminSync",h,function(a){!a||a.error&&"0"!=a.error||d()},e=["error","message"]):d())}var c,d,e,f=get_by_id("fo_process"),g=f.elements,h={};for(c=0,d=g.length;d>c;c++)h[g[c].name]=g[c].value;return show_waiting_message=!1,exec_xml("importer","procImporterAdminImport",h,b,e=["error","message","type","total","cur","key"]),show_waiting_message=!0,!1}function displayProgress(a,b){var c,d;c=Math.max(a?Math.round(b/a*100):100,1),d=jQuery("#status"),d.find("div.progress1").length||d.html(''),d.find("div.progress1").html(c+" ").css("width",c+"%").end().find("div.progress2").text(b+"/"+a)}jQuery(function(a){a(".checkxml").find("input:text").change(function(){a(this).closest(".checkxml").find(".x_help-inline").hide()}).end().find("button").click(function(){function b(a){var b,e;return e=g.find(">.xml"),b=g.find(">.ttxml"),$message.text(a.result_message),a.error||"true"!=a.exists?($message.attr("class","x_help-inline").fadeIn(300),b=b.filter(":visible"),b.eq(-1).slideUp(100,function(){b=b.slice(0,-1).eq(-1).slideUp(100,arguments.callee)}),g.find(":submit").attr("disabled","disabled"),c()):($message.attr("class","x_help-inline").fadeIn(300),g.find(":submit").removeAttr("disabled"),h=g.find(".syncmember:hidden"),f.prop("disabled",!1).removeClass("loading"),d.prop("disabled",!1),void("XML"==a.type?e.not(":visible").add(h).slideDown(300):"TTXML"==a.type&&(b.not(":visible").add(h).slideDown(300),g.find("input[name=type]").val("ttxml"))))}function c(){return f.prop("disabled",!1).removeClass("loading"),d.prop("disabled",!1),g.find(".syncmember:visible").slideUp(100),!1}var d,e,f,g,h;d=a(this).prop("disabled",!0),g=d.closest("form"),e=d.closest(".checkxml"),f=e.find("input").prop("disabled",!0).addClass("loading"),$message=e.find(".x_help-inline").hide(),show_waiting_message=!1,a.exec_json("importer.procImporterAdminCheckXmlFile",{filename:a.trim(f.val())},b)}).end().find(".x_help-inline").hide().end().closest("form").find(">.ttxml").hide().end().end().closest("form").find(":submit").attr("disabled","disabled"),a(".syncmember").hide()});
\ No newline at end of file
diff --git a/modules/poll/tpl/js/poll_admin.min.js b/modules/poll/tpl/js/poll_admin.min.js
index 44cf5b68d..47059b72d 100644
--- a/modules/poll/tpl/js/poll_admin.min.js
+++ b/modules/poll/tpl/js/poll_admin.min.js
@@ -1 +1 @@
-function doDisplaySkinColorset(a,b){var c=a.options[a.selectedIndex].value,d=new Array;d.skin=c,d.colorset=b;var e=new Array("error","message","colorset_list");exec_xml("poll","getPollGetColorsetList",d,completeGetSkinColorset,e,d)}function completeGetSkinColorset(a,b,c){for(var d=get_by_id("fo_poll").poll_colorset,e=d.options.length,f=c.colorset,g=0;e>g;g++)d.remove(0);for(var h=a.colorset_list.split("\n"),i=0,g=0;gh;h++)e.remove(0);for(var i=a.colorset_list.split("\n"),j=0,h=0;hf;f++)c.remove(0);if(b.colorset_list){for(var g=b.colorset_list.split("\n"),h=0,f=0;f0||!i||0===h.indexOf("sizcache")||jQuery.inArray(h,g)>-1)){jQuery('').val(i).appendTo("#fo_widget").get(0)}}var j=[];jQuery("input,select,textarea","#fo_widget").each(function(){j.push(this)});for(var k=0;k0?n=l[0].type:m=0;var h=l.name;switch(n){case"hidden":case"number":case"text":case"textarea":var o=selected_node.getAttribute(h);if(!o)continue;var p=unescape(o);l.value=p?p:o,jQuery("#"+h).val(l.value);break;case"radio":case"checkbox":if(selected_node.getAttribute(h)){var o=selected_node.getAttribute(h).split(",");if(e[h].length){for(var q=0;q ",0===d)$(this).siblings("input").val(b[d].id);else{var e=$(this).siblings("input").val();$(this).siblings("input").val(e+","+b[d].id)}else if(b[d])if(c+='
",0===d)$(this).siblings("input").val(b[d]);else{var e=$(this).siblings("input").val();$(this).siblings("input").val(e+","+b[d])}}else c='
",$(this).siblings("input").val(b);$(this).before(c),$(".filebox_del").bind("click",function(){for(var a=$(this).prev("img").attr("src"),b=$(this).siblings("input").val().split(","),c="",d=0;df;f++)c.remove(0);if(b.colorset_list){for(var g=b.colorset_list.split("\n"),h=0,f=0;f0||!i||0===h.indexOf("sizcache")||jQuery.inArray(h,g)>-1)){jQuery('').val(i).appendTo("#fo_widget").get(0)}}var j=[];jQuery("input,select,textarea","#fo_widget").each(function(){j.push(this)});for(var k=0;k0?n=l[0].type:m=0;var h=l.name;switch(n){case"hidden":case"number":case"text":case"textarea":var o=selected_node.getAttribute(h);if(!o)continue;var p=unescape(o);p?l.value=p:l.value=o,jQuery("#"+h).val(l.value);break;case"radio":case"checkbox":if(selected_node.getAttribute(h)){var o=selected_node.getAttribute(h).split(",");if(e[h].length){for(var q=0;q ",0===d)$(this).siblings("input").val(b[d].id);else{var e=$(this).siblings("input").val();$(this).siblings("input").val(e+","+b[d].id)}else if(b[d])if(c+='
",0===d)$(this).siblings("input").val(b[d]);else{var e=$(this).siblings("input").val();$(this).siblings("input").val(e+","+b[d])}}else c='
",$(this).siblings("input").val(b);$(this).before(c),$(".filebox_del").bind("click",function(){for(var a=$(this).prev("img").attr("src"),b=$(this).siblings("input").val().split(","),c="",d=0;d').find(">form").submit(function(){return doApplyWidgetSize(this),!1}),jQuery("#zonePageContent").on("click",doCheckWidget).on("mousedown",doCheckWidgetDrag).on("mouseover",widgetSetup)}function removeAllWidget(){confirm(confirm_delete_msg)&&(restoreWidgetButtons(),jQuery(zonePageObj).html(""))}function getWidgetContent(a){var b="";"undefined"!=typeof a&&a||(a=zonePageObj);var c=null;return jQuery("div.widgetOutput",a).each(function(){if(jQuery(this).parent().get(0)==a)switch(c=jQuery(this).attr("widget")){case"widgetBox":b+=getWidgetBoxCode(this,c);break;case"widgetContent":b+=getContentWidgetCode(this,c);break;default:b+=getWidgetCode(this,c)}}),b}function getContentWidgetCode(a){var b,c=(a.firstChild,jQuery("div.widgetContent",a)),d="",e="",f=0,g="contenteditable,id,style,src,widget,body,class,widget_width,widget_width_type,xdpx,xdpy,height,document_srl,widget_padding_left,widget_padding_right,widget_padding_top,widget_padding_bottom,hascontent";if(c.size()>0){f=jQuery(a).attr("document_srl"),d=f>0?"":c.html();for(var h,i=new RegExp("^("+g.replace(/,/g,"|")+")$","i"),j=0;j"}return""}function getWidgetBoxCode(a){for(var b="",c=0;c0?(f=jQuery(".widget_inner",a),f=f.get(0)):f=jQuery(".nullWidget",a).get(0);var g=getWidgetContent(f);return'"}function getWidgetCode(a,b){for(var c="",d=0;d"}function doAddContent(a){var b=request_uri.setQuery("module","widget").setQuery("act","dispWidgetAdminAddContent").setQuery("module_srl",zoneModuleSrl).setQuery("mid",a);popopen(b,"addContent")}function doSyncPageContent(){if(opener&&opener.selectedWidget){var a=get_by_id("content_fo"),b=opener.selectedWidget;a.style.value=getStyle(opener.selectedWidget),a.widget_padding_left.value=getPadding(b,"left"),a.widget_padding_right.value=getPadding(b,"right"),a.widget_padding_bottom.value=getPadding(b,"bottom"),a.widget_padding_top.value=getPadding(b,"top");for(var c=b.firstChild;c&&!jQuery(c).hasClass("widgetContent");)c=c.nextSibling;if(c&&jQuery(c).hasClass("widgetContent")&&(!a.document_srl||"0"==a.document_srl.value))try{var d=Base64.decode(xInnerHtml(c));d=editorReplacePath(d),get_by_id("content_fo").content.value=d,xe.Editors[1].exec("SET_IR",[d])}catch(e){}}"undefined"!=typeof editorStart&&editorStart(1,"module_srl","content",!1,400)}function addContentWidget(a){var b=a.getAttribute("editor_sequence"),c=(a.mid.value,a.module_srl.value),d=a.document_srl.value,e=editorGetContent(b),f={editor_sequence:b,content:e,module_srl:c,document_srl:d};if(/^\s*.*<\/p>\s*$/i.test(f.content)){var g=f.content.toLowerCase(),h=g.indexOf("
"),i=g.lastIndexOf("");h>0&&i>0&&h==i&&(f.content=e=f.content.replace(/^\s*|<\/p>\s*$/gi,""))}return exec_xml("widget","procWidgetInsertDocument",f,function(b){if(b&&"0"==b.error){var c=b.document_srl,d=opener.jQuery("div.widgetOutput[widget=widgetContent][document_srl="+c+"]"),f=[];d.size()>0&&(f=d.get(0).attributes);for(var g='
',h=jQuery(g),i=0,j=f.length;j>i;i++)h.attr(f[i].name)||h.attr(f[i].name,f[i].value);g=jQuery("").append(h).html(),opener.doAddWidgetCode(g),window.close()}},"document_srl".split(",")),!1}function doAddWidgetBox(){var a='
';zonePageObj.innerHTML+=a}function doAddWidget(a){var b=a.widget_list,c=b.selectedIndex,d=b.options[c].value,e=a.module_srl.value,f=request_uri.setQuery("module","widget").setQuery("act","dispWidgetGenerateCodeInPage").setQuery("selected_widget",d).setQuery("module_srl",e);popopen(f,"GenerateWidgetCode")}function doAddWidgetCode(widget_code){restoreWidgetButtons();for(var tmp=widget_code;tmp.indexOf(""),cssfile=tmp.substr(10,eos-10);if(cssfile.indexOf(".js")>-1)tmp=tmp.substr(eos);else{if(!cssfile)break;if(tmp=tmp.substr(eos),cssfile=request_uri+cssfile,"undefined"==typeof document.createStyleSheet){var css='
',dummy=xCreateElement("DIV");xInnerHtml(dummy,css),document.body.appendChild(dummy)}else document.createStyleSheet(cssfile,0)}}for(checkDocumentWrite=!0,tmp=widget_code.toLowerCase();tmp.indexOf("")+9,script=widget_code.substr(pos,length);script=script.replace(/^")+9,script=widget_code.substr(pos,length);script=script.replace(/^