getOtherConts = function (typeConts){
	$("typeConts").value=typeConts;
	//$("typeContsPage").value=1;
	resetOtherConts();
}

goPage = function (newPage){
	$("typeContsPage").value=newPage;
	resetOtherConts();
}

resetOtherConts = function () {
	var typeConts = $F("typeConts");
	//var typeContsPage = $F("typeContsPage");
	var user_idx = $F("user_idx");
	var filekey = $F("filekey");
	var folder_idx = $F("folder_idx");
	if (user_idx == "") return;
	var url = "/share/file/getOtherConts.php";
	//var pars = "user_idx=" + user_idx + "&typeContsPage="+typeContsPage+"&typeConts="+typeConts+"&fu="+filekey;
	var pars = "user_idx=" + user_idx + "&typeConts="+typeConts+"&fu="+filekey+"&folder_idx="+folder_idx;
	var mainContainer=$('otherFiles_list2');
	mainContainer.innerHTML="";

	var myAjax = new Ajax.Request(
		url,
		{
			method: 'post',
			parameters: pars,
			onComplete: function() {
				//mainContainer.stopWaiting();
			},
			onSuccess: setFileDisplay,
			onFailure: reportError,
			onLoading: function() {
				//mainContainer.startWaiting('bigWaiting');
			}
		}
	);

}

setFileDisplay = function (originalRequest) {
	var objRequest = originalRequest.responseText.evalJSON();
	var pageInfo=objRequest.pageInfo;
	var objFileList = objRequest.fileList;
	var objOtherContsCnt = $("otherContsCnt");
	var objPrevPage = $("goPrevPage");
	var objNextPage = $("goNextPage");

	//Display file Count
	if(pageInfo) $("otherContsCnt").innerHTML=pageInfo.totalRecord;
		else $("otherContsCnt").innerHTML="0";

	//Set Page Button
	/*
	if(pageInfo){
		if(pageInfo.currentPage==1){
			if(pageInfo.totalPage>1){
				objPrevPage.innerHTML="<a href='javascript:goPage("+pageInfo.totalPage+")'><img src='/images/share/prev_page_btn.gif' width='15' height='16' title='이전페이지'></a>";
				objNextPage.innerHTML="<a href='javascript:goPage(2)'><img src='/images/share/next_page_btn.gif' width='15' height='16' title='다음페이지'></a>";
			}else{
				objPrevPage.innerHTML="<img src='/images/share/prev_page_btn.gif' width='15' height='16' title='이전페이지'>";
				objNextPage.innerHTML="<img src='/images/share/next_page_btn.gif' width='15' height='16' title='다음페이지'>";
			}
		}else if(pageInfo.currentPage>1 && pageInfo.currentPage < pageInfo.totalPage){
			var nextPage = eval(pageInfo.currentPage)+1;
			var prevPage = pageInfo.currentPage-1;
			objPrevPage.innerHTML="<a href='javascript:goPage("+prevPage+")'><img src='/images/share/prev_page_btn.gif' width='15' height='16' title='이전페이지'></a>";
			objNextPage.innerHTML="<a href='javascript:goPage("+nextPage+")'><img src='/images/share/next_page_btn.gif' width='15' height='16' title='다음페이지'></a>";
		}else if(pageInfo.currentPage==pageInfo.totalPage){
			var prevPage = pageInfo.totalPage-1;
			objPrevPage.innerHTML="<a href='javascript:goPage("+prevPage+")'><img src='/images/share/prev_page_btn.gif' width='15' height='16' title='이전페이지'></a>";
			objNextPage.innerHTML="<a href='javascript:goPage(1)'><img src='/images/share/next_page_btn.gif' width='15' height='16' title='다음페이지'></a>";
		}else{
			objPrevPage.innerHTML="<img src='/images/share/prev_page_btn.gif' width='15' height='16' title='이전페이지'>";
			objNextPage.innerHTML="<img src='/images/share/next_page_btn.gif' width='15' height='16' title='다음페이지'>";
		}
	}
	*/
	var mainContainer=$('otherFiles_list2');
	mainContainer.innerHTML="";
	//Display File List
	if(pageInfo.totalRecord>0){
		displayFileList(mainContainer,objFileList);
	}else{
		var fileListWrapper = document.createElement("div");
		fileListWrapper.className = "other_file_empty2";
		//fileListWrapper.innerHTML = "<img src='/images/share/other_file_empty.gif'>";
		mainContainer.appendChild(fileListWrapper);
	}
}

displayFileList = function (mainContainer,objFileList){
	var objFileList_len = objFileList.length;
	for(var i=0;i<objFileList_len;i++){
		var fileNo=parseInt(objFileList[i].f_no);

		var fileListWrapper = document.createElement("div");
		if(objFileList[i].this_file=="N"){
			fileListWrapper.className = "listbox";
		}else if(objFileList[i].this_file=="Y"){
			fileListWrapper.className = "listbox_over";
		}
		fileListWrapper.id = "of_list_"+fileNo;

		var ulListElement = document.createElement("ul");
		ulListElement.className="filelist";

		var liThumbElement = document.createElement("li");
		liThumbElement.className = "thumb";
		if(objFileList[i].th_img){
			liThumbElement.innerHTML = "<a href='http://ideebee.com/filekey="+fileNo+"-"+objFileList[i].rewrite_code+"'><img src='"+objFileList[i].th_img+"' width='70' height='60'></a>";
		}else{
			switch(objFileList[i].file_type){
				case "video" : liThumbElement.innerHTML = "<a href='http://ideebee.com/filekey="+fileNo+"-"+objFileList[i].rewrite_code+"'><img src='/images/share/video_80.gif' width='70' height='60'></a>";break;
				case "image" : liThumbElement.innerHTML = "<a href='http://ideebee.com/filekey="+fileNo+"-"+objFileList[i].rewrite_code+"'><img src='/images/share/image_80.gif' width='70' height='60'></a>";break;
				case "audio" : liThumbElement.innerHTML = "<a href='http://ideebee.com/filekey="+fileNo+"-"+objFileList[i].rewrite_code+"'><img src='/images/share/audio_80.gif' width='70' height='60'></a>";break;
				case "docum" : liThumbElement.innerHTML = "<a href='http://ideebee.com/filekey="+fileNo+"-"+objFileList[i].rewrite_code+"'><img src='/images/share/docum_80.gif' width='70' height='60'></a>";break;
				case "appli" : liThumbElement.innerHTML = "<a href='http://ideebee.com/filekey="+fileNo+"-"+objFileList[i].rewrite_code+"'><img src='/images/share/appli_80.gif' width='70' height='60'></a>";break;
			}
		}

		var liNameElement = document.createElement("li");
		liNameElement.className = "name";
		liNameElement.innerHTML = "<a href='http://ideebee.com/filekey="+fileNo+"-"+objFileList[i].rewrite_code+"'>"+objFileList[i].org_file_name+"</a>";

		var liExtElement = document.createElement("li");
		liExtElement.className = "ext";
		switch(objFileList[i].file_type){
			case "video" : liExtElement.innerHTML = objFileList[i].file_size+"<img src='/images/share/ds.gif'>동영상<img src='/images/share/ds.gif'>"+objFileList[i].time_diff+"전"; break;
			case "image" : liExtElement.innerHTML = objFileList[i].file_size+"<img src='/images/share/ds.gif'>이미지<img src='/images/share/ds.gif'>"+objFileList[i].time_diff+"전"; break;
			case "audio" : liExtElement.innerHTML = objFileList[i].file_size+"<img src='/images/share/ds.gif'>사운드<img src='/images/share/ds.gif'>"+objFileList[i].time_diff+"전"; break;
			case "docum" : liExtElement.innerHTML = objFileList[i].file_size+"<img src='/images/share/ds.gif'>문서<img src='/images/share/ds.gif'>"+objFileList[i].time_diff+"전"; break;
			case "appli" : liExtElement.innerHTML = objFileList[i].file_size+"<img src='/images/share/ds.gif'>기타<img src='/images/share/ds.gif'>"+objFileList[i].time_diff+"전"; break;
		}

		ulListElement.appendChild(liThumbElement);
		ulListElement.appendChild(liNameElement);
		ulListElement.appendChild(liExtElement);

		fileListWrapper.appendChild(ulListElement);

		mainContainer.appendChild(fileListWrapper);
	}
}

reportError = function (){
	alert("실행에러");
}

normalDownLoad = function(fileUnique){
	$("normalDownFrame").src="/download/st_down.inc?fu="+fileUnique;
	openDivPopup('stDown');
}

fastDownLoad = function(fileUnique){
	var userType=$F("sUserType");
	var useFastDown=$F("useFastDown");
	if(useFastDown=="biz" || useFastDown=="std" || useFastDown=="cpn"){
		$("fastDownFrame").src="/download/ft_down.inc?fu="+fileUnique;
		openDivPopup('ftDown');
	}else{
		openDivPopup('ftDownAlert');
	}
}

initFrameSrc = function (){
	$("normalDownFrame").src="about:blank";
	$("fastDownFrame").src="about:blank";
}

openDivPopup = function (pop_id){
	window.scroll(0,0);
	Protoload.startCurtain(document.body,'justCutain',250,'0.7');
	switch(pop_id){
		case "emblem_upload" : break;
		case "sendMemo_popup" : break;
	}
	turnOnCenterLayer(pop_id);
}

closeDivPopup = function(pop_id){
	switch(pop_id){
		case "stDown" : case "ftDown" :
			initFrameSrc();
		break;
	}
	if(pop_id) turnOffLayer(pop_id);
	Protoload.stopWaiting(document.body);
}

turnOnLayer = function(objLayerId) {
	var objLayer = $(objLayerId);
	objLayer.style.display='block';
}

turnOnCenterLayer = function(objLayerId) {
	var objLayer = $(objLayerId);
	objLayer.style.display='block';

	var objWidth = objLayer.offsetWidth;
	var objHeight = 0;//objLayer.offsetHeight;
	var pos=getCenterPosition(objWidth,objHeight);
	objLayer.style.left = pos[0]+"px";
	/*
	if(pos[1]-150>0) objLayer.style.top = pos[1]-150+"px";
		else objLayer.style.top = "30px";
	*/
	objLayer.style.top = "200px";
}

getCenterPosition = function(objWidth,objHeight){
	var bodyWidth = document.body.clientWidth;
	var bodyHeight = document.body.clientHeight;
	var pos = new Array(0,0);
	pos[0] = (bodyWidth/2)-(objWidth/2);
	pos[1] = (bodyHeight/2)-(objHeight/2);
	return pos;
}

turnOffLayer = function(objLayerId) {
	$(objLayerId).style.display='none';
}

sendMemo = function (){
	if($F('sendMemoSubject').length==0){
		$("getid_Help").innerHTML="쪽지 제목을 입력해 주세요.";
		turnOnLayer('getid_Help');
		return;
	}
	if($F('sendMemoContents').length==0){
		$("getid_Help").innerHTML="쪽지 내용을 입력해 주세요.";
		turnOnLayer('getid_Help');
		return;
	}
	if(confirm("해당회원에게 쪽지를 발송합니다.")==true){
		var url = "/proc/file_detail_proc.php";
		var pars = "pg_mode=sendNewMemo";
		pars += "&user_idx="+$F('sendUserIdx');
		pars += "&recv_idx="+$F('recvUserIdx');
		pars += "&memoSubject="+encodeURIComponent($F('sendMemoSubject'));
		pars += "&memoContents="+encodeURIComponent($F('sendMemoContents'));
		var myAjax = new Ajax.Request(
			url,
			{
				method: 'post',
				parameters: pars,
				onComplete: function() {
					//Protoload.stopWaiting(objContainer);
				},
				onSuccess: function (returnValue){
					returnCode = returnValue.responseText;
					if(returnCode == "OK"){
						alert("쪽지를 발송하였습니다.");
						closeDivPopup('sendMemo_popup');
					}else{
						alert(returnCode);
					}
				},
				onFailure: reportError,
				onLoading: function() {
					//Protoload.startWaiting(objContainer,'bigWaiting',250,'0.7');
				}
			}
		);
	}else{
		return;
	}
}

openImgEditPopup = function(){
	var fileNo=$('fileNo').value;
	var filekey=$('fileKey').value;
	var opt = "width=985,height=600,status=no,menubar=no,scrollbars=no,toolbar=no,location=no,resizeable=yes";
	var editType = "no";
	if($('imgEditOver').checked==true) editType="yes";
	closeDivPopup("imgEditPopup");
	window.open("http://ideebee.com/share/file/popImgEdit.php?filekey="+filekey+"&overwrite="+editType,fileNo+"Edit2",opt);
	return;
}

openDocEditPopup = function(filekey){
	var fileNo=document.forms['frm_share'].f_no.value;
	var opt = "width=985,height=600,status=no,menubar=no,scrollbars=no,toolbar=no,location=no,resizable=yes";
	window.open("http://ideebee.com/share/file/popDocEdit.php?filekey="+filekey+"&overwrite=yes",fileNo+"Edit2",opt);
	return;
}

loadGMaps = function() {
	google.load("maps", "2", {"callback" : getGMapInfo});
}

getGMapInfo = function () {
	var frm = document.forms['frm_share'];
	var f_no = frm.f_no.value;
	var url = "/share/file/getGLatLng.php";
	var pars = "f_no=" + f_no;

	var myAjax = new Ajax.Request(
		url,
		{
			method: 'post',
			parameters: pars,
			onComplete: function() {
				//mainContainer.stopWaiting();
			},
			onSuccess: function (returnValue){
				returnCode = returnValue.responseText;
				displayGMap(returnValue);
			},
			onFailure: reportError,
			onLoading: function() {
				//mainContainer.startWaiting('bigWaiting');
			}
		}
	);
}

displayGMap = function(originalRequest){

	var objRequest = originalRequest.responseText.evalJSON();
	var upLocation = objRequest.uploadLocation;
	var zoomLevel = objRequest.zoomLevel;
	var viewLocationArr = objRequest.viewLocation;
	var downLocationArr = objRequest.downLocation;
	var copyLocationArr = objRequest.copyLocation;
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("map"),{ size: new GSize(290,160) } );

		var centerLatitude=upLocation.latitude;
		var centerLongitude=upLocation.longitude;
		var mapCenter = new GLatLng(centerLatitude,centerLongitude);
		var mapTypeControl = new GMapTypeControl(); //맵 보기 버튼
		var mapControl = new GSmallZoomControl(); //맵 Zoom 컨트롤

		var zoomLevel = zoomLevel;

		map.setCenter(mapCenter,zoomLevel);
		map.removeMapType(G_HYBRID_MAP); //중첩보기 제거
		map.addControl(mapTypeControl);
		map.addControl(mapControl);


		var uploadLocation = mapCenter; //위치 포인터
		var upIcon = new GIcon(G_DEFAULT_ICON);
		upIcon.image = "http://ideebee.com/images/share/pink-dot.png";
		upIcon.iconSize = new GSize(26, 30);
		upIcon.shadow = "http://chart.apis.google.com/chart?chst=d_map_pin_shadow";
		upIcon.shadowSize = new GSize(26, 25);
		markerOptions = { icon:upIcon };
		map.addOverlay(new GMarker(uploadLocation, markerOptions));

		if(viewLocationArr.length){
			for(var i=0; i<viewLocationArr.length;i++){
				var thisViewLocation=viewLocationArr[i];
				var thisViewLatitude=thisViewLocation.latitude;
				var thisViewLongitude=thisViewLocation.longitude;

				var thisViewPoint = new GLatLng(thisViewLatitude,thisViewLongitude);

				var thisViewIcon = new GIcon(G_DEFAULT_ICON);
				if(i%2==0){//짝수
					thisViewIcon.image = "http://ideebee.com/images/share/view1-dot.png";
				}else{//홀수
					thisViewIcon.image = "http://ideebee.com/images/share/view2-dot.png";
				}
				thisViewIcon.iconSize = new GSize(22, 28);
				thisViewIcon.shadow = "http://chart.apis.google.com/chart?chst=d_map_pin_shadow";
				thisViewIcon.shadowSize = new GSize(26, 25);
				thismarkerOptions = { icon:thisViewIcon };

				map.addOverlay(new GMarker(thisViewPoint, thismarkerOptions));
			}
		}

		if(downLocationArr.length){
			for(var i=0; i<downLocationArr.length;i++){
				var thisDownLocation=downLocationArr[i];
				var thisDownLatitude=thisDownLocation.latitude;
				var thisDownLongitude=thisDownLocation.longitude;

				var thisDownPoint = new GLatLng(thisDownLatitude,thisDownLongitude);

				var thisDownIcon = new GIcon(G_DEFAULT_ICON);
				if(i%2==0){//짝수
					thisDownIcon.image = "http://ideebee.com/images/share/blue1-dot.png";
				}else{//홀수
					thisDownIcon.image = "http://ideebee.com/images/share/blue2-dot.png";
				}
				thisDownIcon.iconSize = new GSize(22, 28);
				thisDownIcon.shadow = "http://chart.apis.google.com/chart?chst=d_map_pin_shadow";
				thisDownIcon.shadowSize = new GSize(26, 25);
				thismarkerOptions = { icon:thisDownIcon };

				map.addOverlay(new GMarker(thisDownPoint, thismarkerOptions));
			}
		}

		if(copyLocationArr.length){
			for(var i=0; i<copyLocationArr.length;i++){
				var thisCopyLocation=copyLocationArr[i];
				var thisCopyLatitude=thisCopyLocation.latitude;
				var thisCopyLongitude=thisCopyLocation.longitude;

				var thisCopyPoint = new GLatLng(thisCopyLatitude,thisCopyLongitude);

				var thisCopyIcon = new GIcon(G_DEFAULT_ICON);
				if(i%2==0){//짝수
					thisCopyIcon.image = "http://ideebee.com/images/share/copy1-dot.png";
				}else{//홀수
					thisCopyIcon.image = "http://ideebee.com/images/share/copy2-dot.png";
				}
				thisCopyIcon.iconSize = new GSize(22, 28);
				thisCopyIcon.shadow = "http://chart.apis.google.com/chart?chst=d_map_pin_shadow";
				thisCopyIcon.shadowSize = new GSize(26, 25);
				thismarkerOptions = { icon:thisCopyIcon };

				map.addOverlay(new GMarker(thisCopyPoint, thismarkerOptions));
			}
		}

	}
}

getOtherFiles = function (typeFiles){
	$("typeFiles").value=typeFiles;
	resetOtherFiles();
}

prevOtherFile = function(){
	var prevFileBlock = $F("prevFileBlock");
	var block = $("fileBlock");
	block.value=prevFileBlock;
	resetOtherFiles();
}

nextOtherFile = function(){
	var nextFileBlock = $F("nextFileBlock");
	var block = $("fileBlock");
	block.value=nextFileBlock;
	resetOtherFiles();
}

resetOtherFiles = function () {
	var typeFiles = $F("typeFiles");
	var userIdx = $F("userIdx");
	var fileKey = $F("fileKey");
	var folderIdx = $F("folderIdx");
	var prevFileBlock = $F("prevFileBlock");
	var nextFileBlock = $F("nextFileBlock");
	var block = $F("fileBlock");
	if (userIdx == "") return;
	var url = "/share/file/getOtherFiles.php";
	var pars = "userIdx=" + userIdx + "&typeFiles="+typeFiles+"&fileKey="+fileKey+"&folderIdx="+folderIdx+"&block="+block;
	var mainContainer=$('otherFiles');
	mainContainer.innerHTML="";

	var myAjax = new Ajax.Request(
		url,
		{
			method: 'post',
			parameters: pars,
			onComplete: function() {
				//mainContainer.stopWaiting();
			},
			onSuccess: function (returnValue){
				setFilesDisplay(returnValue);
			},
			onFailure: reportError,
			onLoading: function() {
				//mainContainer.startWaiting('bigWaiting');
			}
		}
	);
}

setFilesDisplay = function (originalRequest) {
	var objRequest = originalRequest.responseText.evalJSON();
	var pageInfo=objRequest.pageInfo;
	var blockInfo=objRequest.blockInfo;

	var objPrevBlock = $("prevBlockBtn");
	var objNextBlock = $("nextBlockBtn");
	var objPrevBlockValue = $("prevFileBlock");
	var objNextBlockValue = $("nextFileBlock");
	var objfileBlockValue = $("fileBlock");
	var objFileList = objRequest.fileList;
	//Display file Count
	if(pageInfo) $("otherFilesCnt").innerHTML=pageInfo.totalRecord;
		else $("otherFilesCnt").innerHTML="0";

	//Set Block Button

	if(blockInfo){
		if(blockInfo.prevBlockBtn=="Y") objPrevBlock.innerHTML="<a href=\"javascript:prevOtherFile();\"><img src='/images/share/of_left_btn.gif'></a>";
			else objPrevBlock.innerHTML="<img src='/images/share/of_left_dis_btn.gif'>";
		objPrevBlockValue.value=blockInfo.prevBlock;

		if(blockInfo.nextBlockBtn=="Y") objNextBlock.innerHTML="<a href=\"javascript:nextOtherFile();\"><img src='/images/share/of_right_btn.gif'></a>";
			else objNextBlock.innerHTML="<img src='/images/share/of_right_dis_btn.gif'>";
		objNextBlockValue.value=blockInfo.nextBlock;

		objfileBlockValue.value="";
	}

	var mainContainer=$('otherFiles');
	mainContainer.innerHTML="";
	//Display File List
	if(pageInfo.totalRecord>0){
		displayOtherFiles(mainContainer,objFileList);
	}else{
		var fileListWrapper = document.createElement("div");
		fileListWrapper.className = "other_file_empty2";
		//fileListWrapper.innerHTML = "<img src='/images/share/other_file_empty.gif'>";
		mainContainer.appendChild(fileListWrapper);
	}
}

displayOtherFiles = function (mainContainer,objFileList){
	var objFileList_len = objFileList.length;
	for(var i=0;i<objFileList_len;i++){
		var fileNo=parseInt(objFileList[i].f_no);
		var fileCode=objFileList[i].rewrite_code;
		var fileExt=objFileList[i].file_ext.toLowerCase();
		var thisFile=objFileList[i].this_file;
		var fileListWrapper = document.createElement("div");
		fileListWrapper.className = "drive_icon_object";
		fileListWrapper.id = "ff_list_"+fileNo;
		fileListWrapper.style.cursor = "pointer";
		if(thisFile=="Y"){
			fileListWrapper.style.background = "#FFFFE6";
			fileListWrapper.style.border = "2px solid #FF6000";
		}

		var ulListElement = document.createElement("ul");


		var liIconElement = document.createElement("li");
		if(objFileList[i].th_img){
			liIconElement.className = "thumb_icon";
			if(objFileList[i].file_type=="image"){
				liIconElement.innerHTML = "<img src='"+objFileList[i].th_img+"' onClick=\"goOtherFile('"+fileNo+"-"+fileCode+"')\">";
			}else{
				liIconElement.innerHTML = "<img src='"+objFileList[i].th_img+"' width='84' height='78' onClick=\"goOtherFile('"+fileNo+"-"+fileCode+"')\">";
			}


		}else{
			liIconElement.className = objFileList[i].file_type+"_ff_icon";
			liIconElement.id = fileNo+"-"+fileCode;
			liIconElement.onclick = function (){goOtherFile(this.id)};
			liIconElement.innerHTML = objFileList[i].file_ext.toUpperCase();
		}

		var liNameElement = document.createElement("li");
		liNameElement.className = "ff_name";
		liNameElement.innerHTML = "<a href='javascript:;' onClick=\"goOtherFile('"+fileNo+"-"+fileCode+"')\">"+objFileList[i].org_file_name+"</a>";
		if(objFileList[i].is_new=="Y") liNameElement.innerHTML +="&nbsp;<img src='/images/mydrive/btn/new_icon.gif' align='absmiddle'>";

		ulListElement.appendChild(liIconElement);
		ulListElement.appendChild(liNameElement);

		fileListWrapper.appendChild(ulListElement);

		mainContainer.appendChild(fileListWrapper);
	}
}

goOtherFile = function(filekey){
	location.href="http://ideebee.com/filekey="+filekey;
}

getUploaderCount = function(user_idx){
	var url = "/share/file/getUploaderTotalCount.php";
	var pars = "user_idx=" + user_idx;

	var myAjax = new Ajax.Request(
		url,
		{
			method: 'post',
			parameters: pars,
			onComplete: function() {
				//mainContainer.stopWaiting();
			},
			onSuccess: function (returnValue){
				returnCode = returnValue.responseText;
				displayUploaderCount(returnValue);
			},
			onFailure: reportError,
			onLoading: function() {
				//mainContainer.startWaiting('bigWaiting');
			}
		}
	);

}

displayUploaderCount = function(originalRequest){
	var objRequest = originalRequest.responseText.evalJSON();
	var uploadCount = objRequest.file_cnt;
	var downCount = objRequest.down_cnt;
	var copyCount = objRequest.copy_cnt;

	$('totalUplodCount').innerHTML=uploadCount;
	$('totalDownCount').innerHTML=downCount;
	$('totalCopyCount').innerHTML=copyCount;
}

requestTranscode = function(fileKey){
	var url = "/proc/file_detail_proc.php";
	var pars = "pg_mode=reqTranscode";
	//pars+="&user_idx=" + $F('userIdx');
	pars+="&fileKey="+fileKey;
	var myAjax = new Ajax.Request(
		url,
		{
			method: 'post',
			parameters: pars,
			onComplete: function() {
				//Protoload.stopWaiting(document.body);
			},
			onSuccess: function (returnValue){
				var returnCode = returnValue.responseText;
				//Protoload.stopWaiting(document.body);
				if(returnCode=="OK"){
					location.reload();
				}
			},
			onFailure: reportError,
			onLoading: function() {
				//Protoload.startWaiting(document.body,'bigWaiting',250,'0.8');
			}
		}
	);

}
