var RepeatInterval = 0.5; //0.5ÃÊ¸¶´Ù °»½Å
var array_FileName = new Array();
var array_FileSize = new Array();
var array_Count = 0;
var last_TmpFileSize = 0;
var Cumul_FileSize = 0;

if(window.addEventListener) window.addEventListener("load", ZUonLoad, false);
else if(window.attachEvent) window.attachEvent("onload", ZUonLoad);

function ZUonLoad(){
	ZUimg1 = new Image();
	ZUimg2 = new Image();
	ZUimg3 = new Image();
	ZUimg4 = new Image();
	ZUimg5 = new Image();
	ZUimg6 = new Image();
	ZUimg7 = new Image();
	ZUimg8 = new Image();
	ZUimg9 = new Image();
	ZUimg10 = new Image();
	ZUimg11 = new Image();
	ZUimg12 = new Image();
	ZUimg13 = new Image();
	ZUimg14 = new Image();
	ZUimg1.src = "/zuprogress/images/progress_01.gif";
	ZUimg2.src = "/zuprogress/images/progress_02.gif";
	ZUimg3.src = "/zuprogress/images/progress_03.gif";
	ZUimg4.src = "/zuprogress/images/progress_04.gif";
	ZUimg5.src = "/zuprogress/images/progress_05.gif";
	ZUimg6.src = "/zuprogress/images/progress_06.gif";
	ZUimg7.src = "/zuprogress/images/progress_07.gif";
	ZUimg8.src = "/zuprogress/images/progress_08.gif";
	ZUimg9.src = "/zuprogress/images/progress_09.gif";
	ZUimg10.src = "/zuprogress/images/progress_10.gif";
	ZUimg11.src = "/zuprogress/images/progress_11.gif";
	ZUimg12.src = "/zuprogress/images/progress_12.gif";
	ZUimg13.src = "/zuprogress/images/bar.gif";
	ZUimg14.src = "/zuprogress/images/bar_slide.gif";

	//onSubmit="progress('Æû³×ÀÓ')" <= ÀÌ ¹®ÀåÀ» »ý·«ÇÏ±â À§ÇÑ ºÎºÐ A ½ÃÀÛ
	var FormObj = document.getElementsByTagName('form');
	for (var len=0;len<FormObj.length;len++){
		if(FormObj[len].getAttribute("onsubmit")){
			var already_onsubmit = String(FormObj[len].getAttribute("onsubmit")).replace(/^function anonymous\(\)|{|}|return |\n/g,'');
			FormObj[len].onsubmit=new Function("return progress('"+FormObj[len].getAttribute("name")+"','"+already_onsubmit+"');");
		}else{
			FormObj[len].onsubmit = new Function("return progress('"+FormObj[len].getAttribute("name")+"');");
		}
	}
	//onSubmit="progress('Æû³×ÀÓ')" <= ÀÌ ¹®ÀåÀ» »ý·«ÇÏ±â À§ÇÑ ºÎºÐ A Á¾·á

	//onChange="¹è¿­[ÆÄÀÏÀÌ¸§],¹è¿­[ÆÄÀÏÅ©±â]" <= ÀÌ ¹®ÀåÀ» »ý·«ÇÏ±â À§ÇÑ ºÎºÐ ½ÃÀÛ
	var FileObj = document.getElementsByTagName('input');
	for (var len=0;len<FileObj.length;len++){
		if(FileObj[len].getAttribute("type")=="file"){
			if(FileObj[len].getAttribute("onchange")){
				var already_onchange = String(FileObj[len].getAttribute("onchange")).replace(/^function anonymous\(\)|{|}|return |\n/g,'');
				FileObj[len].onchange = new Function(already_onchange+";array_FileName["+len+"]=ZU_getFileName(this.value);array_FileSize["+len+"]=ZU_getFileSize(this.value);");
			}else{
				FileObj[len].onchange = new Function("array_FileName["+len+"]=ZU_getFileName(this.value);array_FileSize["+len+"]=ZU_getFileSize(this.value);");
			}
		}
	}
	//onChange="¹è¿­[ÆÄÀÏÀÌ¸§]" <= ÀÌ ¹®ÀåÀ» »ý·«ÇÏ±â À§ÇÑ ºÎºÐ Á¾·á

	//<img id="zudynamic" width="1" height="1" src="tmp_read.php"> <= ÀÌ ¹®ÀåÀ» HTML¿¡¼­ »ý·«ÇÏ±â À§ÇÑ ºÎºÐ ½ÃÀÛ
	spyImg = document.createElement("img");
	spyImg.setAttribute("id","zudynamic");
	spyImg.setAttribute("width","1");
	spyImg.setAttribute("height","1");
	document.body.appendChild(spyImg);
	//<img id="zudynamic" width="1" height="1" src="tmp_read.php"> <= ÀÌ ¹®ÀåÀ» HTML¿¡¼­ »ý·«ÇÏ±â À§ÇÑ ºÎºÐ Á¾·á

	//<div id="ZU_div">¾÷·ÎµåÈ­¸éµðÀÚÀÎ ºÎºÐ</div> <= ÀÌ ¹®ÀåÀ» HTML¿¡¼­ »ý·«ÇÏ±â À§ÇÑ ºÎºÐ ½ÃÀÛ 
	progressDiv = document.createElement("div");
	progressDiv.setAttribute("id","ZU_div");
	document.body.appendChild(progressDiv);

	document.getElementById('ZU_div').style.position = "absolute";
	document.getElementById('ZU_div').style.width = "437px";
	document.getElementById('ZU_div').style.height = "350px";
	document.getElementById('ZU_div').style.zIndex = "3";
	document.getElementById('ZU_div').style.display = "none";

	document.getElementById('ZU_div').innerHTML="\
	<table width='437' height='57' cellspacing='0' cellpadding='0' border='0' background='/zuprogress/images/progress_01.gif'>\
	<td></td></table>\
	<table width='437' cellspacing='0' cellpadding='0' border='0' background='/zuprogress/images/progress_02.gif' style='font:9pt Arial;color:#000000;'>\
	<tr height='20' valign='top'><td width='90'></td><td width='320' id='ZFtakeName'></td><td width='27'></td></tr>\
	</table>\
	<table width='437' cellspacing='0' cellpadding='0' border='0' background='/zuprogress/images/progress_03.gif' style='font:9pt Arial;color:#000000;'>\
	<tr height='20' valign='top'><td width='90'></td><td width='137' id='ZFtakeSize'>0 KB</td><td width='70'></td><td width='140' id='ZFtakeElapSize'>0 KB</td></tr>\
	</table>\
	<table width='437' cellspacing='0' cellpadding='0' border='0' background='/zuprogress/images/progress_04.gif' style='font:9pt Arial;color:#000000;'>\
	<tr height='20' valign='top'><td width='90'></td><td width='137' id='ZFtakeEstiTime'>00 : 00 : 00</td><td width='70'></td><td width='140' id='ZFtakeSpeed'>0 KB/s</td></tr>\
	</table>\
	<table width='437' cellspacing='0' cellpadding='0' border='0' background='/zuprogress/images/progress_05.gif' style='font:9pt Arial;color:#000000;'>\
	<tr height='20' valign='top'>\
	<td width='97'></td>\
	<td width='275'><img id='ZFtakeGraph0' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph1' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph2' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph3' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph4' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph5' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph6' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph7' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph8' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph9' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph10' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph11' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph12' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph13' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph14' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph15' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph16' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph17' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph18' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph19' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph20' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph21' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph22' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph23' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph24' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph25' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph26' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph27' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph28' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph29' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph30' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph31' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtakeGraph32' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'></td>\
	<td width='65' id='ZFtakePercent'>0 %</td>\
	</tr>\
	</table>\
	<table width='437' height='35' cellspacing='0' cellpadding='0' border='0' background='/zuprogress/images/progress_06.gif'>\
	<td></td></table>\
	<table width='437' cellspacing='0' cellpadding='0' border='0' background='/zuprogress/images/progress_07.gif' style='font:9pt Arial;color:#000000;'>\
	<tr height='20' valign='top'><td width='90'></td><td width='137' id='ZFtotalSize'>0 KB</td><td width='70'></td><td width='140' id='ZFtotalElapSize'>0 KB</td></tr>\
	</table>\
	<table width='437' cellspacing='0' cellpadding='0' border='0' background='/zuprogress/images/progress_08.gif' style='font:9pt Arial;color:#000000;'>\
	<tr height='20' valign='top'><td width='90'></td><td width='137' id='ZFtotalEstiTime'>00 : 00 : 00</td><td width='70'></td><td width='140' id='ZFtotalEstiCount'>0 °³</td></tr>\
	</table>\
	<table width='437' cellspacing='0' cellpadding='0' border='0' background='/zuprogress/images/progress_09.gif' style='font:9pt Arial;color:#000000;'>\
	<tr height='20' valign='top'>\
	<td width='97'></td>\
	<td width='275'><img id='ZFtotalGraph0' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph1' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph2' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph3' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph4' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph5' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph6' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph7' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph8' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph9' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph10' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph11' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph12' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph13' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph14' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph15' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph16' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph17' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph18' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph19' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph20' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph21' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph22' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph23' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph24' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph25' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph26' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph27' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph28' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph29' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph30' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph31' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'><img id='ZFtotalGraph32' src='/zuprogress/images/bar.gif' style='display:none;margin-top:5;'></td>\
	</td>\
	<td width='65' id='ZFtotalPercent'>0 %</td>\
	</tr>\
	</table>\
	<table width='437' height='3' cellspacing='0' cellpadding='0' border='0' background='/zuprogress/images/progress_10.gif'>\
	<td></td></table>\
	<table width='437' cellspacing='0' cellpadding='0' border='0' background='/zuprogress/images/progress_11.gif' style='font:9pt Arial;color:#000000;'>\
	<tr height='18' valign='top'><td width='32'></td><td width='260' id='ZFname1'></td><td width='5'></td><td align='right' width='60' id='ZFsize1'></td><td width='10'></td><td width='70' id='ZFstatus1'></td></tr>\
	<tr height='18' valign='top'><td width='32'></td><td width='260' id='ZFname2'></td><td width='5'></td><td align='right' width='60' id='ZFsize2'></td><td width='10'></td><td width='70' id='ZFstatus2'></td></tr>\
	<tr height='18' valign='top'><td width='32'></td><td width='260' id='ZFname3'></td><td width='5'></td><td align='right' width='60' id='ZFsize3'></td><td width='10'></td><td width='70' id='ZFstatus3'></td></tr>\
	<tr height='18' valign='top'><td width='32'></td><td width='260' id='ZFname4'></td><td width='5'></td><td align='right' width='60' id='ZFsize4'></td><td width='10'></td><td width='70' id='ZFstatus4'></td></tr>\
	<tr height='18' valign='top'><td width='32'></td><td width='260' id='ZFname5'></td><td width='5'></td><td align='right' width='60' id='ZFsize5'></td><td width='10'></td><td width='70' id='ZFstatus5'></td></tr>\
	</table>\
	<table width='437' height='25' cellspacing='0' cellpadding='0' border='0' background='/zuprogress/images/progress_12.gif'>\
	<td></td></table>";
	//<div id="ZU_div">¾÷·ÎµåÈ­¸éµðÀÚÀÎ ºÎºÐ</div> <= ÀÌ ¹®ÀåÀ» HTML¿¡¼­ »ý·«ÇÏ±â À§ÇÑ ºÎºÐ Á¾·á
}

// À¯Æ¿ÇÔ¼ö ½ÃÀÛ
function ZU_getFileName(path){
	var zuNameArray = path.split('\\');
	var zuSplitName = zuNameArray[zuNameArray.length - 1]; 
	return zuSplitName;
}

function ZU_getFileSize(path){
	var obj = new Image();
	obj.dynsrc = path;
	return obj.fileSize;
}

function array_sum(arr) {
    var ret = 0;
    for (var i=0; i<arr.length; i++) {
        ret += parseInt(arr[i]);
    }
    return ret;
}

function getCookie(name){
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length ){
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) {
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ){
				endOfCookie = document.cookie.length;
			}
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 )
		break;
	}
	return "";
}

function SetCookie (name, value) {
  var argv = SetCookie.arguments;
  var argc = SetCookie.arguments.length;
  var expires = (2 < argc) ? argv[2] : null;
  var path = (3 < argc) ? argv[3] : null;
  var domain = (4 < argc) ? argv[4] : null;
  var secure = (5 < argc) ? argv[5] : false;
  document.cookie = name + "=" + escape (value) +
      ((expires == null) ? "" : 
        ("; expires=" + expires.toGMTString())) +
      ((path == null) ? "" : ("; path=" + path)) +
      ((domain == null) ? "" : ("; domain=" + domain)) +
      ((secure == true) ? "; secure" : "");
} 

function number_format(numstr) {
  var numstr = String(numstr);
  var re0 = /(\d+)(\d{3})($|\..*)/;
  if (re0.test(numstr))
    return numstr.replace(
      re0,
      function(str,p1,p2,p3) { return number_format(p1) + "," + p2 + p3; }
    );
  else
    return numstr;
}

function fileUnit(size) {
    var num = parseInt(size,10);
	if(num>1024*1024*1024){
		num = number_format((num/(1024*1024*1024)).toFixed(1));
		unit = " GB";
	}else if(num>1024*1024){
		num = number_format((num/(1024*1024)).toFixed(1));
		unit = " MB";
	}else if(num>1024){
		num = number_format((num/1024).toFixed(1));
		unit = " KB";
	}else{
		num = number_format(num);
		unit = " Byte";
	}
    return num+unit;
}
// À¯Æ¿ÇÔ¼ö Á¾·á

function progress(Fname){
	//onSubmit="progress('Æû³×ÀÓ')" <= ÀÌ ¹®ÀåÀ» »ý·«ÇÏ±â À§ÇÑ ºÎºÐ B ½ÃÀÛ
	var argv = progress.arguments;
	if(argv[1]){
		result = eval(argv[1]);
		if(result==false) return false;
	}
	//onSubmit="progress('Æû³×ÀÓ')" <= ÀÌ ¹®ÀåÀ» »ý·«ÇÏ±â À§ÇÑ ºÎºÐ B Á¾·á

	var Extra_array_FileName = array_FileName;
	var Extra_array_FileSize = array_FileSize;
	array_FileName = new Array();
	array_FileSize = new Array();
	var FileObj = document.getElementsByTagName('input');
	var c = 0;
	for (var len=0;len<FileObj.length;len++){
		if(FileObj[len].getAttribute("type")=="file" && FileObj[len].form.getAttribute("name")==Fname && FileObj[len].value){
			array_FileName[c] = Extra_array_FileName[len]?Extra_array_FileName[len]:ZU_getFileName(FileObj[len].value);
			array_FileSize[c] = Extra_array_FileSize[len]?Extra_array_FileSize[len]:ZU_getFileSize(FileObj[len].value);
			c++;
		}
	}
	document.getElementById('ZU_div').style.left = document.body.clientWidth/2 - 220;
	document.getElementById('ZU_div').style.top = document.body.scrollTop + 100;
	window.status = "Àü¼ÛÁß";
	var ExpDate = new Date();
	ExpDate.setTime(ExpDate.getTime() + 1000*10);
	SetCookie('ZUfileSize', 0, ExpDate,'/');
	var StartTime = new Date();
	MicroStartTime = StartTime.getTime()/1000;
	var TakeStartTime = new Date();
	MicroTakeStartTime = TakeStartTime.getTime()/1000;
	setTimeout("ZU_repeat()", RepeatInterval*1000);
}

function ZU_repeat(){ 
	if(array_FileName.length>0) document.getElementById('ZU_div').style.display = "inline";  //IE¿¡¼­ "ÆäÀÌÁö¿­¶§¸¶´Ù"·Î ¹®Á¦·Î ·çÇÁ ¾ÈÀ¸·Î ÀÌµ¿. 
	document.getElementById('ZU_div').style.left = document.body.clientWidth/2 - 220;
	document.getElementById('ZU_div').style.top = document.body.scrollTop + 100;
	document.getElementById('zudynamic').src="/zuprogress/tmp_reader.php";
	var TmpFileSize = parseInt(getCookie('ZUfileSize'),10);
	if(isNaN(TmpFileSize) || TmpFileSize<1){
		ZUrepeat = setTimeout("ZU_repeat()", RepeatInterval*1000);
		return;
	}

	if(last_TmpFileSize>TmpFileSize || TmpFileSize>array_FileSize[array_Count]){ // ÇÑ ÆÄÀÏ Àü¼Û¿Ï·á or Ã¼Å©°£°Ý º¸´Ù ÀÛÀºÆÄÀÏ
		Cumul_FileSize += parseInt(last_TmpFileSize,10);
		for(var i=0;i<33;i++){
			if(array_sum(array_FileSize)) document.getElementById('ZFtakeGraph'+i).style.display="none";
		}
		var TakeStartTime = new Date();
		MicroTakeStartTime = TakeStartTime.getTime()/1000;
		array_Count++;

		last_TmpFileSize = TmpFileSize;	
		ZUrepeat = setTimeout("ZU_repeat()", RepeatInterval*1000);
		return;
	}
	//ÆÄÀÏ ÀÌ¸§
	document.getElementById('ZFtakeName').innerHTML = array_FileName[array_Count];
	//ÆÄÀÏ Å©±â
	if(array_sum(array_FileSize)) document.getElementById('ZFtakeSize').innerHTML = number_format(Math.round(array_FileSize[array_Count]/1024))+" KB";
	if(!array_sum(array_FileSize)) document.getElementById('ZFtakeSize').innerHTML = "¾Ë ¼ö ¾øÀ½";
	//º¸³½ Å©±â
	document.getElementById('ZFtakeElapSize').innerHTML = number_format(Math.round(TmpFileSize/1024))+" KB";
	//Àü¼Û¼Óµµ
	var ElapTime = new Date();
	var MicroElapTime = ElapTime.getTime()/1000;
	var TakeDiffTime = MicroElapTime - MicroTakeStartTime;
	var DiffTime = MicroElapTime - MicroStartTime;
	if(TmpFileSize>0 && TakeDiffTime>0){
		document.getElementById('ZFtakeSpeed').innerHTML = number_format(Math.round(TmpFileSize/TakeDiffTime/1024))+" KB/s";
	}
	//³²Àº½Ã°£
	var DiffEsti = (array_FileSize[array_Count]-TmpFileSize)/(TmpFileSize/DiffTime);
	if(array_sum(array_FileSize)) document.getElementById('ZFtakeEstiTime').innerHTML = (parseInt(DiffEsti/3600,10)+100+"").substring(1,3) +" : "+ (parseInt((DiffEsti%3600)/60,10)+100+"").substring(1,3) +" : "+ ((DiffEsti%60)+100+"").substring(1,3);
	if(!array_sum(array_FileSize)) document.getElementById('ZFtakeEstiTime').innerHTML = "¾Ë ¼ö ¾øÀ½";
	//ÆÄÀÏ ÆÛ¼¾Æ®
	var Takeper = Math.round(TmpFileSize*100/array_FileSize[array_Count]);
	if(array_sum(array_FileSize)) document.getElementById('ZFtakePercent').innerHTML = Takeper+" %";
	if(!array_sum(array_FileSize)) document.getElementById('ZFtakePercent').innerHTML = "Àü¼ÛÁß";
	//ÆÄÀÏ ÇÁ·Î±×·¹½º
	if(array_sum(array_FileSize)){
		for(var i=0;i<33;i++){
			if(i<Math.round(Takeper/3)){
				document.getElementById('ZFtakeGraph'+i).style.display="inline";
			}else{
				break;
			}
		}
	}
	if(!array_sum(array_FileSize)){
		if(!last_TmpFileSize || last_TmpFileSize>TmpFileSize){
			document.getElementById('ZFtakeGraph0').src = "/zuprogress/images/bar_slide.gif";
			document.getElementById('ZFtakeGraph0').style.display="inline";
		}
	}
	//ÆÄÀÏ Å©±â
	if(array_sum(array_FileSize)) document.getElementById('ZFtotalSize').innerHTML = number_format(Math.round(array_sum(array_FileSize)/1024))+" KB";
	if(!array_sum(array_FileSize)) document.getElementById('ZFtotalSize').innerHTML = "¾Ë ¼ö ¾øÀ½";
	//º¸³½ Å©±â
	document.getElementById('ZFtotalElapSize').innerHTML = number_format(Math.round((Cumul_FileSize+TmpFileSize)/1024))+" KB";
	//³²Àº½Ã°£
	var TotalDiffEsti = (array_sum(array_FileSize)-Cumul_FileSize-TmpFileSize)/((Cumul_FileSize+TmpFileSize)/DiffTime);
	if(array_sum(array_FileSize)) document.getElementById('ZFtotalEstiTime').innerHTML = (parseInt(TotalDiffEsti/3600,10)+100+"").substring(1,3) +" : "+ (parseInt((TotalDiffEsti%3600)/60,10)+100+"").substring(1,3) +" : "+ ((TotalDiffEsti%60)+100+"").substring(1,3);
	if(!array_sum(array_FileSize)) document.getElementById('ZFtotalEstiTime').innerHTML = "¾Ë ¼ö ¾øÀ½";
	//³²Àº °¹¼ö
	if(array_sum(array_FileSize)) document.getElementById('ZFtotalEstiCount').innerHTML = parseInt(array_FileName.length-array_Count,10)+" °³";
	if(!array_sum(array_FileSize)) document.getElementById('ZFtotalEstiCount').innerHTML = "¾Ë ¼ö ¾øÀ½";
	//ÀüÃ¼ ÆÛ¼¾Æ®
	var Totalper = Math.round((Cumul_FileSize+TmpFileSize)*100/array_sum(array_FileSize));
	if(array_sum(array_FileSize))  document.getElementById('ZFtotalPercent').innerHTML = Totalper+" %";
	if(!array_sum(array_FileSize)) document.getElementById('ZFtotalPercent').innerHTML = "Àü¼ÛÁß";
	//ÀüÃ¼ ÇÁ·Î±×·¹½º
	if(array_sum(array_FileSize)){
		for(var i=0;i<33;i++){
			if(i<Math.round(Totalper/3)){
				document.getElementById('ZFtotalGraph'+i).style.display="inline";
			}else{
				break;
			}
		}
	}
	if(!array_sum(array_FileSize)){
		if(!last_TmpFileSize || last_TmpFileSize>TmpFileSize){
			document.getElementById('ZFtotalGraph0').src = "/zuprogress/images/bar_slide.gif";
			document.getElementById('ZFtotalGraph0').style.display="inline";
		}
	}
	//´ë±â¸®½ºÆ®(ÆÄÀÏÀÌ ¸¹´õ¶óµµ 5°³±îÁö¸¸ º¸¿©ÁÝ´Ï´Ù.)
	for(var i=0;i<5;i++){
		if(array_sum(array_FileSize)){
			if(i<array_FileName.length-array_Count){
				document.getElementById('ZFname'+(i+1)).innerHTML = array_FileName[array_Count+i];
				document.getElementById('ZFsize'+(i+1)).innerHTML = fileUnit(array_FileSize[array_Count+i]);
				document.getElementById('ZFstatus'+(i+1)).innerHTML = (i==0)?"Àü¼ÛÁß":"´ë±âÁß";
			}else{
				document.getElementById('ZFname'+(i+1)).innerHTML = "";
				document.getElementById('ZFsize'+(i+1)).innerHTML = "";
				document.getElementById('ZFstatus'+(i+1)).innerHTML = "";
			}
		}
		if(!array_sum(array_FileSize)){
			if(i<array_FileName.length){
				document.getElementById('ZFname'+(i+1)).innerHTML = array_FileName[i];
				document.getElementById('ZFsize'+(i+1)).innerHTML = "¾Ë ¼ö ¾øÀ½";
				document.getElementById('ZFstatus'+(i+1)).innerHTML = "Àü¼ÛÁß";
			}
		}
	}

	last_TmpFileSize = TmpFileSize;	
	ZUrepeat = setTimeout("ZU_repeat()", RepeatInterval*1000);
}
