
	var MainImageIdArray = null;
	var SubMenuArray = null;
	var MainDefaultImageArray = null;

	if(document.getElementById("MainImageId") && document.getElementById("MainImageId") != null){
		MainImageIdArray = document.getElementById("MainImageId").value;
		MainImageIdArray = MainImageIdArray.substring(0,MainImageIdArray.lastIndexOf("|"));
		MainImageIdArray = MainImageIdArray.split("|");
	}

	if(document.getElementById("depthId") && document.getElementById("depthId") != null){
		SubMenuArray = document.getElementById("depthId").value;
		SubMenuArray = SubMenuArray.substring(0,SubMenuArray.lastIndexOf("|"));
		SubMenuArray = SubMenuArray.split("|");
	}

	if(document.getElementById("MainDefaultImage") && document.getElementById("MainDefaultImage") != null){
		MainDefaultImageArray = document.getElementById("MainDefaultImage").value;
		MainDefaultImageArray = MainDefaultImageArray.substring(0,MainDefaultImageArray.lastIndexOf("|"));
		MainDefaultImageArray = MainDefaultImageArray.split("|");
	}

	function TopNavigator(obj, id, NaviType, defaultImage ,overImage){

		if(eval("document.getElementById('"+id+"')").style.display == 'none'){
			if(NaviType != null && NaviType == '2'){
				imageChange(obj, defaultImage, overImage);
			}
		}

		for(i=0; i<SubMenuArray.length; i++){
			if(SubMenuArray[i] == id){
				if(document.getElementById(id)){
					eval("document.getElementById('"+id+"')").style.display = "block";
				}
			}else{
				if(document.getElementById(SubMenuArray[i])){
					document.getElementById(SubMenuArray[i]).style.display = "none";
				}
			}
		}
	}

	function TopNavigatorClose(){

		for(i=0; i<SubMenuArray.length; i++){
			if(document.getElementById(SubMenuArray[i])){

				if(SubMenuArray[i] == 'naviTop_whiteSpace'){
					document.getElementById(SubMenuArray[i]).style.display = "block";
				}else{
					document.getElementById(SubMenuArray[i]).style.display = "none";
				}
			}
		}
		closeTopNavigatorImage();
	}

	function TopNavigatorOuter(obj, id, NaviType, defaultImage ,overImage){
		TopNavigatorClose();

		if(NaviType != null && NaviType == '2'){
			imageChange(obj, defaultImage, overImage);
		}
	}

	function TopNavigatorImage(obj, id, NaviType, defaultImage ,overImage){
		if(NaviType != null && NaviType == '2'){
			imageChange(obj, defaultImage, overImage);
		}
	}

	function imageChange(obj, defaultImage, overImage){
		var img = null;
		var imgName = null;
		var imgPath = null;
		
		// A 객체에서 IMG객체를 추출
		// 접근성을 위해 오버 이미지의 컨트롤은 A에서 이벤트를 걸어 처리되도록 함.
		if(obj != null){
			for(i=0; i<obj.childNodes.length; i++){

				if(obj.childNodes[i].nodeName == "IMG"){
					img = obj.childNodes[i];
				}

				/*
				if(obj.childNodes[i].nodeName == "A"){
					//alert(obj.childNodes[i].childNodes[0].nodeName);
					//img = obj.childNodes[i];
					if(obj.childNodes[i].childNodes[0].nodeName == "IMG"){
						img = obj.childNodes[i].childNodes[0];
					}
				}
				*/
			}
		}
		
		if(img != null){
			imgName = img.src;
			imgPath = imgName.substring(0,imgName.substring(0,imgName.lastIndexOf("/")).lastIndexOf("/")+1);
			imgPath = imgPath.substring(imgPath.indexOf("://")+3);
			imgPath = imgPath.substring(imgPath.indexOf("/"));

			closeTopNavigatorImage();

			/** 프로잭트동작은 자동 업로드 메뉴이미지를 사용하지 않고 메뉴 절대 경로를 입력하여 네비이미지를 노출한다. */
			if(imgName.indexOf("_over") > -1){
				//img.src = imgPath+defaultImage;
				img.src = defaultImage;
				//alert("상단 : " + img.src);
			}else{
				//img.src = imgPath+overImage;
				img.src = overImage;
				//alert("상단 : " + img.src);
			}
		}
	}
	
	function closeTopNavigatorImage(){
		var mainImageId = null;
		for(var i=0;i<MainImageIdArray.length;i++){
			//alert(obj.id+" / "+MainImageIdArray[i]);
			mainImageId = document.getElementById(MainImageIdArray[i]);
			mainImageId.src = MainDefaultImageArray[i];
		}
	}

	//alert("SubMenuArray : " + SubMenuArray);
	if(SubMenuArray != null){
		TopNavigatorClose();
		document.onclick = TopNavigatorClose;
	}
