/**
*@param fileId 上传文件控件
*@param type 图片类型 1大图 2小图 3其他文件
*@param fileQueue 存放队列的DIV的id 显示上传进度条DIV
*@param auto 是否自动上传
*@param multi 是否是多文件上传
*@param showDIV 上传完后预览图片所在DIV中
*/
function initUploadify(fileId,type,fileQueue,auto,multi,showDIV){
		 
	 $("#"+fileId).uploadify({
	   'uploader'       : '/jslib/upload/uploadify.swf',
	   'script'         : '/jQueryUpload_fileUpload.system',//提交到的action	
	   'scriptData'		: {'type':type}, //1大图 2小图 3其他文件
	   'method'         : 'GET',		   
	   'cancelImg'      : '/jslib/upload/cancel.png',		//传图片取消X
	   'folder'         : 'temp',		//上传目录
	   'queueID'        : fileQueue,	//和存放队列的DIV的id一致   
	   'auto'           : auto,		//是否自动开始   	
	   'multi'          : multi,	//是否支持多文件上传  
	   'buttonText'     : 'Browse', //按钮上的文字
	   'fileDataName'   : 'picture',
	   'simUploadLimit' : 1, //一次同步上传的文件数目  		
	　  'sizeLimit': 19871202, //设置单个文件大小限制，单位为byte 		
	   'queueSizeLimit' : 10, //队列中同时存在的文件个数限制 	
	   'fileDesc': '支持格式:jpg/gif/jpeg/png/bmp.', //如果配置了以下的'fileExt'属性，那么这个属性是必须的  
	　  'fileExt': '*.jpg;*.gif;*.jpeg;*.png',//允许的格式		
	   　onComplete: function (event, queueID, fileObj, response, data) {		
	    	var value = response ;
	        $('#'+showDIV).append(value); 
	   　},  
	   　onError: function(event, queueID, fileObj) {
	   　 alert("文件:" + fileObj.name + "上传失败");  		
	   　},  		
	   　onCancel: function(event, queueID, fileObj){  		
	   　 alert("取消了" + fileObj.name);  		
	   　} 		
	});
}

/**
*@param fileId 上传文件控件
*@param type 图片类型 1大图 2小图 3其他文件
*@param fileQueue 存放队列的DIV的id 显示上传进度条DIV
*@param auto 是否自动上传
*@param multi 是否是多文件上传
*@param showDIV 上传完后预览图片所在DIV中
*/
function initUploadifyAnnex(fileId,type,fileQueue,auto,multi,showDIV){
		 
	 $("#"+fileId).uploadify({
	   'uploader'       : '/jslib/upload/uploadify.swf',
	   'script'         : '/jQueryUpload_fileUpload.system',//提交到的action	
	   'scriptData'		: {'type':type}, //1大图 2小图 3其他文件
	   'method'         : 'GET',		   
	   'cancelImg'      : '/jslib/upload/cancel.png',		//传图片取消X
	   'folder'         : 'temp',		//上传目录
	   'queueID'        : fileQueue,	//和存放队列的DIV的id一致   
	   'auto'           : auto,		//是否自动开始   	
	   'multi'          : multi,	//是否支持多文件上传  
	   'buttonText'     : 'Browse', //按钮上的文字
	   'fileDataName'   : 'picture',
	   'simUploadLimit' : 1, //一次同步上传的文件数目
	   'queueSizeLimit' : 10, //队列中同时存在的文件个数限制 	
	   'fileDesc': '仅支持flv流媒体格式.', //如果配置了以下的'fileExt'属性，那么这个属性是必须的  
	　  'fileExt': '*.flv',//允许的格式		
	   　onComplete: function (event, queueID, fileObj, response, data) {		
	    	var value = response ;
	        $('#'+showDIV).append(value); 
	   　},  
	   　onError: function(event, queueID, fileObj) {
	   　 alert("文件:" + fileObj.name + "上传失败");  		
	   　},  		
	   　onCancel: function(event, queueID, fileObj){  		
	   　 alert("取消了" + fileObj.name);  		
	   　} 		
	});
}


/**
*@param fileId 上传文件控件
*@param type 图片类型 1大图 2小图 3其他文件
*@param fileQueue 存放队列的DIV的id 显示上传进度条DIV
*@param auto 是否自动上传
*@param multi 是否是多文件上传
*@param showDIV 上传完后预览图片所在DIV中
*/
function initUploadifyAllType(fileId,type,fileQueue,auto,multi,showDIV){
		 
	 $("#"+fileId).uploadify({
	   'uploader'       : '/jslib/upload/uploadify.swf',
	   'script'         : '/jQueryUpload_fileUpload.system',//提交到的action	
	   'scriptData'		: {'type':type}, //1大图 2小图 3其他文件
	   'method'         : 'GET',		   
	   'cancelImg'      : '/jslib/upload/cancel.png',		//传图片取消X
	   'folder'         : 'temp',		//上传目录
	   'queueID'        : fileQueue,	//和存放队列的DIV的id一致   
	   'auto'           : auto,		//是否自动开始   	
	   'multi'          : multi,	//是否支持多文件上传  
	   'buttonText'     : 'Browse', //按钮上的文字
	   'fileDataName'   : 'picture',
	   'simUploadLimit' : 1, //一次同步上传的文件数目
	   'queueSizeLimit' : 10, //队列中同时存在的文件个数限制 		
	   　onComplete: function (event, queueID, fileObj, response, data) {		
	    	var value = response ;
	        $('#'+showDIV).append(value); 
	   　},  
	   　onError: function(event, queueID, fileObj) {
	   　 alert("文件:" + fileObj.name + "上传失败");  		
	   　},  		
	   　onCancel: function(event, queueID, fileObj){  		
	   　 alert("取消了" + fileObj.name);  		
	   　} 		
	});
}

function delImg(id,name){
	try {
		jQuery.ajax({
		type: "POST",
		url: "jQueryUpload_deleteImage.system",
		data:"name="+name,
		success: function(msg){
			if(msg=="suc"){
			  var ss = $("#span" + id);
			  $("#span"+id).remove();
			}
		} 
		});
	} catch(e) {
	}
}

/**
*@param fileId 上传文件控件
*@param type 图片类型 1大图 2小图 3其他文件
*@param fileQueue 存放队列的DIV的id 显示上传进度条DIV
*@param auto 是否自动上传
*@param multi 是否是多文件上传
*@param showDIV 上传完后预览图片所在DIV中
*/
function initUploadifyJianLi(fileId,type,fileQueue,auto,multi,showDIV){
	   $("#"+fileId).uploadify({
	   'uploader'       : '/jslib/upload/uploadify.swf',
	   'script'         : '/jQueryUpload_fileUpload.system',//提交到的action	
	   'scriptData'		: {'type':type}, //1大图 2小图 3其他文件
	   'method'         : 'GET',		   
	   'cancelImg'      : '/jslib/upload/cancel.png',		//传图片取消X
	   'folder'         : 'temp',		//上传目录
	   'queueID'        : fileQueue,	//和存放队列的DIV的id一致   
	   'auto'           : auto,		//是否自动开始   	
	   'multi'          : multi,	//是否支持多文件上传  
	   'buttonText'     : 'Browse', //按钮上的文字
	   'fileDataName'   : 'picture',
	   'simUploadLimit' : 1, //一次同步上传的文件数目
	   'queueSizeLimit' : 10, //队列中同时存在的文件个数限制 	
	   'fileDesc': 'Microsoft Word, Text 格式', //如果配置了以下的'fileExt'属性，那么这个属性是必须的  
	　  'fileExt': '*.doc;*.docx;*.txt',//允许的格式		
	   　onComplete: function (event, queueID, fileObj, response, data) {		
	    	var value = response ;
	        $('#'+showDIV).append(value); 
	   　},  
	   　onError: function(event, queueID, fileObj) {
	   　 alert("文件:" + fileObj.name + "上传失败");  		
	   　},  		
	   　onCancel: function(event, queueID, fileObj){  		
	   　 alert("取消了" + fileObj.name);  		
	   　} 		
	});
}

function delImgUpdate(id,name){
	try {
		jQuery.ajax({
		type: "POST",
		url: "jQueryUpload_deleteImageUpdate.system",
		data:"name="+name,
		success: function(msg){
			if(msg=="suc"){
			  var ss = $("#span" + id);
			  $("#span"+id).remove();
			}
		} 
		});
	} catch(e) {
	}
}

//initUploadify("uploadify",1,"fileQueue",true,true,"preImage");
//initUploadify("logo",1,"fileQueueSmall",true,false,"preImageSmall");
