
var SWFU=function(){};SWFU._aHolder=[];SWFU.BTN_DEF='http://images2.ensight.co.kr/helizet/profile/keyword/btn_find_img.gif';SWFU.BTN_CHANGE='http://images2.ensight.co.kr/helizet/profile/keyword/btn_edit_img.gif';SWFU.setBtnImage=function(s)
{this._sDefBtnImage=s;}
SWFU.load=function(o)
{this._aHolder[o.rt]=(new SWFUpload({upload_url:"http://upload.helizet.com/upload.php",file_post_name:"Filedata",post_params:{'t':'d','i':o.inst,'k':Cookie.get('_NS_WDG_AUTH'),'rt':o.rt},file_size_limit:"3 MB",file_types:"*.gif;*.jpg;*.png;",file_types_description:"Image Files",file_upload_limit:"0",file_queue_limit:"1",file_queue_error_handler:SWFU.error,upload_start_handler:SWFU.startUpload,upload_progress_handler:SWFU.progress,upload_error_handler:SWFU.error,upload_success_handler:SWFU.success,button_image_url:(o.button||SWFU.BTN_DEF),button_placeholder_id:o.holder,button_width:68,button_height:19,button_cursor:SWFUpload.CURSOR.HAND,button_action:SWFUpload.BUTTON_ACTION.SELECT_FILE,button_disabled:false,flash_url:"http://images2.ensight.co.kr/swfupload/swfupload_f10.swf",custom_settings:{progress_target:"fsUploadProgress",upload_successful:true,progress_panel_cont:(o.progressCont||"box-message")},debug:false}));if(o.change){this._aHolder[this._aHolder.length-1].setButtonImageURL}}
SWFU.fileDialogComplete=function(nFilesSelected,nFilesQueued)
{}
SWFU.error=function(oFile,nErrorCode,sMessage)
{switch(nErrorCode){case-110:alert('이미지 크기가 3MB 를 초과하는 파일입니다.');break;default:alert('['+nErrorCode+'] '+sMessage);}}
SWFU.changeBtnImageAll=function()
{for(var i=0,iMax=SWFU._aHolder.length;i<iMax;i++){SWFU._aHolder[i].setButtonImageURL(this.BTN_CHANGE);}}
SWFU.changeBtnImage=function(n)
{for(var i=0,iMax=SWFU._aHolder.length;i<iMax;i++){if(i==n){this._aHolder[i].setButtonImageURL(this.BTN_CHANGE);return;}}}
SWFU.startUpload=function(o)
{}
SWFU.success=function(o,serverData)
{alert('You must be redefined this method before loading');}
SWFU.destroy=function()
{var cont=j$(container);jQuery.each(cont.find("form[class='frmComment']"),function(){var inputBox=j$(this).find("a[id=select]");inputBox.text("글");j$(this).find(".find").hide();});}
SWFU.startUpload=function(o,serverData)
{this.customSettings.progress_panel_cont.show();};SWFU.success=function(o,serverData)
{try{var res=eval("("+serverData+")");this.customSettings.progress_panel_cont.hide();if(res.error==0){NSComment.makeupProfileImg(res.rt,res.thumbnail_urls['105x80']);}
else{alert(res.msg);}}catch(ex){alert('죄송합니다. 현재는 지원하지 않는 이미지 파일입니다. 다른 이미지를 선택해 주세요.');}};SWFU.progress=function(file,bytesLoaded,bytesTotal)
{var percent=Math.ceil((bytesLoaded/bytesTotal)*100);this.customSettings.progress_panel_cont.html('업로드 진행중: <span>'+percent+'%</span>');}