
		function photoDel(TBId, FId, FilePath, FileRealName){
			//if (confirm("삭제하시겠습니까?")){
			if (confirm(twiplRes.get("js.service.delete_content"))){
				var url = '/my/img_delete_ajax_ok.do';

				var pars = 'numTBId='+TBId+'&numFId='+FId+'&strFilePath='+FilePath+'&strFileRealName='+FileRealName;
				var myAjax = new Ajax.Request(
							url,
							{
								method: 'get',
								asynchronous: true,
								parameters: pars,
								onSuccess: function(xmlHttp){

									if (xmlHttp.responseText == 1){
										var item = $('li_'+FId);
										if(item != null){  //사진 관리, 업로드 에서 삭제
											var parent = item.parentNode;
											$(item).parentNode.removeChild(item);
											if($('uploadImgList')){
												if ($('list').firstChild == null){
													$('uploadImgList').style.display = "none";
													$('divFileProgressContainer').style.display = "none";
													$('divInfo').style.display = "block";
												}
											}else{
												if ($('list').firstChild == null){
													$('uploadImgList_add').style.display = "none";
													$('divFileProgressContainer').style.display = "none";
													$('divInfo_add').style.display = "block";
												}												
											}
											$('subLoadingImg').style.display = "none";
											//생성된 hidden 값 삭제
											if(document.fmContent.arrFileIdList){
												var hiddenInputSize = document.fmContent.arrFileIdList.length;
												if(hiddenInputSize == "undefined" || hiddenInputSize == null){
													//hiddenInputSize = 1;
													$('shortUrlCnt').value = "0";
													CheckLen();
													var elem = document.fmContent.arrFileIdList;
													if(elem.value == FId){
														elem.parentNode.removeChild(elem);
													}												
												}else{
													for(var i=0; i<hiddenInputSize; i++){
														var elem = document.fmContent.arrFileIdList[i];
														if(elem.value == FId){
															elem.parentNode.removeChild(elem);
															break;
														}
													}												
												}
											}
										}else{  //낱장 보기에서 삭제
											location.reload();
										}											

									}else{
										alert("error");
									}									
								},
								onFailure: reportError
							});
			}
		}
		
		function photoRotate(TBId, FId, Direction){
			var url = '/my/img_rotate_ajax_ok.do';
			var newImg = $("img_"+FId);
			var src = newImg.src;
			var pars = 'numTBId='+TBId+'&numFId='+FId+'&numDirection='+Direction;
			var myAjax = new Ajax.Request(
						url,
						{
							method: 'get',
							asynchronous: true,
							parameters: pars,
							onSuccess: function(xmlHttp){
								
								if (newImg.filters) {
									try {
										newImg.filters.item("DXImageTransform.Microsoft.Alpha").opacity = 0;
									} catch (e) {
										newImg.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + 0 + ')';
									}
								} else {
									newImg.style.opacity = 0;
								}
							
								newImg.onload = function () {
									fadeIn(newImg, 0);
								};
								
								newImg.src = src + "?" + Math.random();	
																
							},
							onFailure: reportError
						});			
		}
		
		function reportError(request){
			alert('Sorry. There was an error.');
		}		