function swfUploadLoaded(){}
function fileDialogStart(){var txtFileName=$(this.customSettings.inputId);txtFileName.value="";}
function fileQueueError(file,errorCode,message){try{switch(errorCode){case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:alert("Limite du nombre d'envois attente. \n"+(message===0?"":"Vous ne pouvez importer "+(message>1?"que "+message+" fichiers.":"qu'un fichier.")));return;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:alert("Taille du fichier trop importante");this.debug("Error Code: File too big, File name: "+file.name+", File size: "+file.size+", Message: "+message);return;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:alert("Le fichier est corrompu, veuillez en choisir un autre");this.debug("Error Code: Zero byte file, File name: "+file.name+", File size: "+file.size+", Message: "+message);return;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:alert("Type de fichier incorrect");this.debug("Error Code: Invalid File Type, File name: "+file.name+", File size: "+file.size+", Message: "+message);return;default:alert("Un erreur est intervenue, veuillez essayer plus tard");this.debug("Error Code: "+errorCode+", File name: "+file.name+", File size: "+file.size+", Message: "+message);return;}}catch(e){}}
function fileQueued(file){try{var txtFileName=$(this.customSettings.inputId).value;txtFileName.value=file.name;this.startUpload();}catch(e){}}
function fileDialogComplete(numFilesSelected,numFilesQueued){}
function uploadProgress(file,bytesLoaded,bytesTotal){try{var percent=Math.ceil((bytesLoaded/bytesTotal)*100);file.id="singlefile_"+this.customSettings.inputId;var progress=new FileProgress(file,this.customSettings.progress_target);progress.setProgress(percent);if($(this.customSettings.inputId+"_todo"))$(this.customSettings.inputId+"_todo").value=file.name+' ('+this.getStats().files_queued+' fichier(s) restant)';}catch(e){alert(e);}}
function uploadSuccess(file,serverData){try{file.id="singlefile_"+this.customSettings.inputId;var progress=new FileProgress(file,this.customSettings.progress_target);progress.setComplete();if(serverData===" "){this.customSettings.upload_successful=false;}else{this.customSettings.upload_successful=true;$(this.customSettings.inputId).value=serverData;}
if($(this.customSettings.inputId+"_todo"))$(this.customSettings.inputId+"_todo").value="";}catch(e){}}
function uploadComplete(file){if(this.getStats().files_queued===0){}else{this.startUpload();}
if(this.customSettings.callback!=undefined){this.customSettings.callback.call();}}
function uploadError(file,errorCode,message){try{if(errorCode===SWFUpload.UPLOAD_ERROR.FILE_CANCELLED){return;}
var txtFileName=$(this.customSettings.inputId).value;txtFileName.value="";switch(errorCode){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:alert("There was a configuration error.  You will not be able to upload a resume at this time.");this.debug("Error Code: No backend file, File name: "+file.name+", Message: "+message);return;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:alert("You may only upload 1 file.");this.debug("Error Code: Upload Limit Exceeded, File name: "+file.name+", File size: "+file.size+", Message: "+message);return;case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:break;default:alert("An error occurred in the upload. Try again later.");this.debug("Error Code: "+errorCode+", File name: "+file.name+", File size: "+file.size+", Message: "+message);return;}
file.id="singlefile_"+this.customSettings.inputId;var progress=new FileProgress(file,this.customSettings.progress_target);progress.setError();switch(errorCode){case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:alert("Upload Error");this.debug("Error Code: HTTP Error, File name: "+file.name+", Message: "+message);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:alert("Upload Failed.");this.debug("Error Code: Upload Failed, File name: "+file.name+", File size: "+file.size+", Message: "+message);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:alert("Server (IO) Error");this.debug("Error Code: IO Error, File name: "+file.name+", Message: "+message);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:alert("Security Error");this.debug("Error Code: Security Error, File name: "+file.name+", Message: "+message);break;case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:alert("Upload Cancelled");this.debug("Error Code: Upload Cancelled, File name: "+file.name+", Message: "+message);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:alert("Upload Stopped");this.debug("Error Code: Upload Stopped, File name: "+file.name+", Message: "+message);break;}}catch(ex){}}
