/*************************

	iNum 

***************************/


function LoadManager(){

		var loadID = [];


		
		this.addProcess = function(id){
			var idx = this.chkProcess(id);
			if(idx >= 0) loadID[idx] = {id:id, stat : true};
			else loadID[loadID.length] = {id:id, stat : true};
			this.loadingChk();
		}

		this.delProcess = function(id){
			var idx = this.chkProcess(id);
			if(idx >= 0) loadID[idx] = {id:id, stat : false}
			this.loadingChk();
		}

		this.chkProcess = function(id){
			for(var i = 0 ; i < loadID.length ; i++){
				if(loadID[i].id == id) {
					return i;
				}
			}
		}

		this.chkTrueNum = function(){
			var c = 0;
			for(var i = 0 ; i < loadID.length ; i++){
				if(loadID[i].stat == true) c++;
			}
			return c;
		}

		this.loadingChk = function(){
			var c = this.chkTrueNum();
			if(c == 0){
				setTimeout("GEID('debugDiv3').innerHTML = \"\"", 1000);
			}else{
				GEID('debugDiv3').innerHTML = "<table cellpadding=0 cellspacing=0 border=0><tr><td valign=middle><img src='"+C_URL.image+"/checke_loader.gif' border=0 width=15 height=15></td>"
														+ "<td valign=middle>로딩중입니다..(" + c + " proc) </td></tr></table>";
			}
			this.positionChg();
		}

		this.positionChg = function(){
			var hInfo = getHtmlInfo();
//			alert("CW : " + hInfo.offsetWidth + "SWI : "+hInfo.scrollWidth);
			GEID('debugDiv3').style.left = 10 + "px";
			GEID('debugDiv3').style.top = 10 + hInfo.scrollTop + "px";
//			GEID('debugDiv3').style.top = hInfo.screenY + "px";

		}



}
