/*INISEAL:[GTu1J%2Fv57hZKFtnEAjls0V%2F87Ns%3D%0A]*/
/*****************************************************************************

 * ÆÄÀÏ¸í :  itd-abt.js

 * ÀÛ¼ºÀÏ : 2008. 10. 01

 * ÀÛ¼ºÀÚ : Á¤ÀÇÇÐ

 * ¼³  ¸í :  javascript function ÆÄÀÏ

 * =========================================================

 * º¯°æÀÌ·Â:

 * DATE				AUTHOR		DESCRIPTION

 * ---------------------------------------------------------------------------

 * º¯°æ ÀÌ·ÂÀº ÀÌ°÷¿¡ Ãß°¡ ÇÕ´Ï´Ù.

 *****************************************************************************/



/**

 * ¿µ¾÷Á¡Ã£±â¿¡ ÇÊ¿äÇÑ script¸¦ Á¤ÀÇ ##############################################

 */



itd = function() {



		var HANA_MAIN_DIV = 'hanaMainDiv';

   	 	var HANA_BODY_DIV = 'hanaBodyDiv';

   	 	var LEFT_MENU_DIV = "Left_menu";

		var TAB_LIST = "tabList";

		var TAB_MENU_DIV = 'tabMenuDiv';

    	var TAB_MENU_CONTENT_DIV = 'tabMenuContentDiv';  

    	var MOVIE_CONTENT_DIV = 'movieContentDiv';  

    	var POSTER_CONTENT_DIV = '2008Content';   

		var POP_CONTENT_DIV2 = 'pop_content_div2'; 
		
		var HANA_POPUP_DIV = 'hanapopupdiv';

    	var goUrl="";

    			

    return {

    

        selectBoxClick : function(type){

        	//	alert("/contents/itd/cul/cul_popup" + type+".jsp");

        	document.getElementById('imgCnt').value='1';

        	document.getElementById('hiddenYear').value=type;



        	goUrl = pbk.APPLICATION_CONTEXT_ROOT + "/contents/itd/cul/cul_popup" + type+".jsp";

			var hanaAjax = new hana.JHanaAjax(POP_CONTENT_DIV2, true, true);

          	hanaAjax.ajaxCommSubmit(goUrl, null);

        },
        
         isValidFormat: function(val, format) {
			if (val.search(format) != -1) return true;		// ¿Ã¹Ù¸¥Çü½Ä
			return false;
		},
        
        isValidEmail: function (val) {
			var format = /^((\w|[\-\.])+)@((\w|[\-\.])+)\.([A-Za-z]+)$/;
			if ( !itd.isValidFormat(val, format) ) {
				hana.JHanaUtils.message.alert("¿À·ù","ÀÌ¸ÞÀÏ Çü½ÄÀÌ ¸ÂÁö ¾Ê½À´Ï´Ù. È®ÀÎÈÄ ´Ù½Ã ÀÔ·Â¹Ù¶ø´Ï´Ù!");
				return false;
		}
			return true;
		},
		
        contactUsSubmit: function(formObj) { //È¸»ç ¼Ò°³ Press Contact
			var jForm = new hana.JForm(formObj);
			
			var email = formObj.emalAdr.value;
						
			if(formObj.manTite.value == "1"){
				formObj.recvEmalAdr.value = "spokesman@hanabank.com";
			}else {
				formObj.recvEmalAdr.value = "hanapr@hanabank.com";
			}
				
			if (itd.isValidEmail(email)) {
	            var hanaAjax = new hana.JHanaAjax(pbk.CONTENT_WRAP, true, true);
	            hanaAjax.ajaxSubmit('/portal/mkt/thm/adv_p69_1.do', formObj,true, function(res) {
	            	if (res.getResponseHeader('json-type') == 'normal') {
						pbk.extJS.messageBox.infoMsgBox({
							isConfirm: false,
							title: 'ContactUs',
							message: 'Áú¹®ÀÌ ¼º°øÀûÀ¸·Î Á¢¼öµÇ¾ú½À´Ï´Ù!',
							callback : function(e){
						
							var url = pbk.APPLICATION_CONTEXT_ROOT +  "/portal/mkt/thm/adv_p69.do";
							hanaAjax = new hana.JHanaAjax(pbk.CONTENT_WRAP, true, true);
							hanaAjax.ajaxCommSubmit(url, formObj);          
						}
					});
				}       
			});
	              
       } 			
	},
    
    chsbLendSubmit: function(formObj){
       var jForm = new hana.JForm(formObj);
       
       if (!jForm.add(new hana.JText('ÀÌ¸§',formObj.custNm).filter())
                        .add(new hana.JNumber('ÁÖ¹Îµî·Ï¹øÈ£',formObj.custAcnmNo).range(13,13))
                        .add(new hana.JNumber('ÀüÈ­¹øÈ£',formObj.custTelNo).limitLength(9,11))
                        .add(new hana.JText('ÀÌ¸ÞÀÏ',formObj.email01))
                        .validate()) {
                            return false;
                        }
       
       var newEmalAdr = "";
		if (formObj.emaildomainindex.options.value == '¼±ÅÃ' || formObj.emaildomainindex.options.value == 'Á÷Á¢ÀÔ·Â') {
			newEmalAdr = formObj.email01.value+"@"+formObj.email02.value;
		}else {
			newEmalAdr = formObj.email01.value+"@"+formObj.emaildomainindex.value;
		}

        formObj.custEmalAdr.value = newEmalAdr;
        formObj.custTelNoDvCd.value = formObj.custTelNoDvCdv.value;
        
          var hanaAjax = new hana.JHanaAjax(pbk.CONTENT_WRAP, true, true);
                hanaAjax.ajaxSubmit('/portal/mkt/thm/serv_p21_011.do', formObj,true, function(res) {
                    if (res.getResponseHeader('json-type') == 'normal') {
                        pbk.extJS.messageBox.infoMsgBox({
                            isConfirm: false,
                            title: 'ÃæÃ»»ç¾÷º»ºÎ °­´ç´ë¿©',
                            message: '¼º°øÀûÀ¸·Î µî·ÏµÇ¾ú½À´Ï´Ù!',
                            callback : function(e){
                        
                            var url = pbk.APPLICATION_CONTEXT_ROOT +  "/portal/mkt/thm/serv_p21_01.do";
                            hanaAjax = new hana.JHanaAjax(pbk.CONTENT_WRAP, true, true);
                            hanaAjax.ajaxCommSubmit(url, formObj);          
                        }
                    });
                }       
            });
              
    },
    

        selectBoxClickCMS : function(goUrl){

        	goUrl = pbk.APPLICATION_CONTEXT_ROOT + goUrl;

			var hanaAjax = new hana.JHanaAjax(POP_CONTENT_DIV2, true, true);

          	hanaAjax.ajaxCommSubmit(goUrl, null);

         	

        },        

        /*

		img_changeFnc : function(type){

				document.getElementById('hiddenYear').value=type;



				for (i=1 ; i<=15; i++){

					if (document.getElementById('0'+i) != undefined ){

						if (i == 1){

							document.getElementById('0'+i).src = '/resource/images/contents/itd/cul/img_cal'+ type +'_0'+i+'_on.gif';

						} else {

			 				document.getElementById('0'+i).src = '/resource/images/contents/itd/cul/img_cal'+ type +'_0'+ i +'_off.gif';

			 			}

					}

			 	}	

			 	

			document.getElementById('cal_top').src ='/resource/images/contents/itd/popup/stit_pop_cul'+ type +'.gif';	 	

			document.getElementById('cal_bottom').src = '/resource/images/contents/itd/cul/img_Lcal'+ type +'_01'+'.gif';

			var selectId = type.substring(6,7);  	

			document.getElementById('popChange').selectedIndex =Number(selectId)-1;

		},

		*/

		

     	goImg : function (type){

	            pbk.extJS.popup.open(pbk.APPLICATION_CONTEXT_ROOT + '/contents/itd/cul/cul_popup2007.jsp','popup02', 650, null,null);   

				document.getElementById('hiddenYear').value=type;

			   	//setTimeout("itd.img_changeFnc('" + type +"');", 400);  

    	},


		goImgCMS : function(goUrl){

	            pbk.extJS.popup.open(pbk.APPLICATION_CONTEXT_ROOT + goUrl,'popup02', 650, null,null);   

				document.getElementById('hiddenYear').value=goUrl;

    	},

    	

    	check_Img : function(type){

			var yearCheck=document.getElementById('hiddenYear').value;

    		document.getElementById('cal_bottom').src = '/resource/images/contents/itd/cul/img_Lcal'+yearCheck+"_"+ type + '.gif';

    		 var cnt = type.substring(1,2);

    		 itd.img_contest(cnt);

    	},

		check_Img_cms : function(imgSrc){
    		document.getElementById('cal_bottom').src = imgSrc;
    	},

    	

    	menuOutImg : function(obj){

			type='0'+document.getElementById('imgCnt').value ;

			if ( type != obj.id){

				obj.src = obj.src.replace("_on.gif", "_off.gif");

			}

		},

		

		img_contest : function(type){



			document.getElementById('imgCnt').value=type; 

			for(i=1 ; i<15 ; i++){

				if(document.getElementById('0'+i) != undefined){

					document.getElementById('0'+i).src = document.getElementById('0'+i).src.replace("_on.gif","_off.gif");

				}

			}

			document.getElementById('0'+type).src = document.getElementById('0'+type).src.replace("_off.gif","_on.gif");

    	},

    	

    	popChange : function(type){



    	},

    

    	goPoster : function (type,type2){

    		document.getElementById('poster').src = type;

    			goUrl = pbk.APPLICATION_CONTEXT_ROOT + "/contents/itd/adv/" + type2;

				var hanaAjax = new hana.JHanaAjax(POSTER_CONTENT_DIV, true, true);

          		hanaAjax.ajaxCommSubmit(goUrl, null);

    	},


        goPoster_cms : function (type,type2){

    		document.getElementById('poster').src = type;

    			goUrl = pbk.APPLICATION_CONTEXT_ROOT + type2;

				var hanaAjax = new hana.JHanaAjax(POSTER_CONTENT_DIV, true, true);

          		hanaAjax.ajaxCommSubmit(goUrl, null);

    	},
    

    	goCategoryImg : function (actionObj,type){

	      		

           	 	pbk.changeTabImage(actionObj, TAB_MENU_DIV);

           	 	

            	var formObj = form.createForm([{id: 'paramReturnType',value: type}]);

            	

    			goUrl = pbk.APPLICATION_CONTEXT_ROOT + "/contents/itd/" + type;



				var hanaAjax = new hana.JHanaAjax(TAB_MENU_CONTENT_DIV, true, true);

          		hanaAjax.ajaxCommSubmit(goUrl, formObj);

    	},

    



    	setPlayMarker : function ( type,type2 ){



	      	oPlayer = document.getElementById('Player');

      		oPlayer.stop();

	      	oPlayer.FileName = type;

	      	oPlayer.play();

	      	

	      	var formObj = form.createForm([{id: 'paramReturnType',value: type2}]);

	      	goUrl = pbk.APPLICATION_CONTEXT_ROOT + "/contents/itd/adv/" + type2;

			var hanaAjax = new hana.JHanaAjax(MOVIE_CONTENT_DIV, true, true);

          	hanaAjax.ajaxCommSubmit(goUrl, formObj);

	      	     

	    },

		setPlayMarker_cms : function ( type,type2 ){

			oPlayer = document.getElementById('Player');

      		oPlayer.stop();

	      	oPlayer.FileName = type;

	      	oPlayer.play();

	      	

	      	var formObj = form.createForm([{id: 'paramReturnType',value: type2}]);

	      	goUrl = pbk.APPLICATION_CONTEXT_ROOT + type2;

			var hanaAjax = new hana.JHanaAjax(MOVIE_CONTENT_DIV, true, true);

          	hanaAjax.ajaxCommSubmit(goUrl, formObj);

	     },


	    movieStop : function(){

	    

	    	 	oPlayer = document.getElementById('Player');

	      		oPlayer.stop();

	    		document.getElementById('moviePlayer').style.display="none";

	    },

 

    	goMovie : function (actionObj,type){

    	

    			oPlayer = document.getElementById('Player');

    			

	      		oPlayer.stop();

	      		

           	 	pbk.changeTabImage(actionObj, TAB_MENU_DIV);

           	 	

            	var formObj = form.createForm([{id: 'paramReturnType',value: type}]);

            	

    			goUrl = pbk.APPLICATION_CONTEXT_ROOT + "/contents/itd/" + type;



				var hanaAjax = new hana.JHanaAjax(TAB_MENU_CONTENT_DIV, true, true);

          		hanaAjax.ajaxCommSubmit(goUrl, formObj);

    	},

    

    	goForm : function(formObj){

    	

    		var jForm = new hana.JForm();

		 		if(!jForm.add(new hana.JText('¼º¸í',formObj.userNm).filter().range(1,10))

		 		            .add(new hana.JText('ÀÌ¸ÞÀÏ',formObj.email).isEmail())

		 		            .add(new hana.JText('È¸»ç¸í',formObj.corNm).filter().range(1,10))

		 		            .add(new hana.JText('³»¿ë',formObj.content).filter().range(1,2000))

		 		            .validate()) {

		 			return false; 

		 		}



		 	alert('¼º°ø');

    	},

    

    	contentCnt : function (type,obj){



			var cnt = document.getElementById('contentCnt').value;

			

			if(document.getElementById('dp' + type).style.display == "none"){

			

					for(var i=0 ; i < Number(cnt); i++){

					 	document.getElementById('dpTd'+i).style.borderBottomColor = "#E4E4E4";

						document.getElementById('dpTd'+i).style.borderBottomWidth = 0 ;

					 	document.getElementById('dpTd'+i).style.borderBottomStyle ="none";

						document.getElementById('dp'+i).style.display="none";

						document.getElementById('itd_img'+i).src = document.getElementById('itd_img'+i).src.replace('_up.gif','_view.gif');

					}

					

					document.getElementById('dpTd'+ type).style.borderBottomColor = "#E4E4E4";

					document.getElementById('dpTd'+ type).style.borderBottomWidth = 1 ;

					document.getElementById('dpTd'+ type).style.borderBottomStyle = "solid" ;

					

					document.getElementById('dp' + type).style.display="";

					document.getElementById('itd_img'+type).src = document.getElementById('itd_img'+type).src.replace('_view.gif','_up.gif');

					

			}else if (document.getElementById('dp' + type).style.display == ""){

			

					for(var i=0 ; i < Number(cnt); i++){

						document.getElementById('dpTd'+i).style.borderBottomColor = "#E4E4E4";

						document.getElementById('dpTd'+i).style.borderBottomWidth = 0 ;

					 	document.getElementById('dpTd'+i).style.borderBottomStyle ="none";

					 	

						document.getElementById('dp'+i).style.display="none";

						document.getElementById('itd_img'+i).src = document.getElementById('itd_img'+i).src.replace('_up.gif','_view.gif');

					}		

			}

		},

    

    	goMiddle : function(type){

	/*		if (type=="2007"){        // Çª¸¥ÀºÇà>Æ÷½ºÅÍ±×¸®±â´ëÈ¸>¹Ì¼ú½ÇµÑ·¯º¸±â select ¹Ú½º Ã³¸®ºÎºÐ

				goUrl="grn_p144_2007_01.jsp"

			} else if (type=="2006"){

				goUrl="grn_p144_2006_01.jsp"

			}else if (type=="2005"){

				goUrl="grn_p144_2005_01.jsp"

			}else if (type=="2004"){

				goUrl="grn_p144_2004_01.jsp"

			}else if (type=="2003_01"){

				goUrl="grn_p144_2003_01.jsp"

			}else if (type=="2003_02"){

				goUrl="grn_p144_2003_02.jsp"

			}else if (type=="2003_03"){

				goUrl="grn_p144_2003_03.jsp"

			}else if (type=="2002_01"){

				goUrl="grn_p144_2002_01.jsp"

			}else if (type=="2002_02"){

				goUrl="grn_p144_2002_02.jsp"

			}else if (type=="2002_03"){

				goUrl="grn_p144_2002_03.jsp"

			}else if (type=="2001_01"){

				goUrl="grn_p144_2001_01.jsp"

			}else if (type=="2001_02"){

				goUrl="grn_p144_2001_02.jsp"

			}else if (type=="2001_03"){

				goUrl="grn_p144_2001_03.jsp"

			} */
                
			   	goUrl = pbk.APPLICATION_CONTEXT_ROOT + type;

				var hanaAjax = new hana.JHanaAjax(HANA_MAIN_DIV, true, true);

          		hanaAjax.ajaxCommSubmit(goUrl, null);   		

    	},

    	

    	goPEH : function (type){

    		pbk.extJS.popup.open(pbk.APPLICATION_CONTEXT_ROOT + '/contents/itd/'+type,'popup03', 650, null,null);  		

    	},


		goPEHCMS : function (goUrl){

    		pbk.extJS.popup.open(pbk.APPLICATION_CONTEXT_ROOT + goUrl,'popup03', 650, null,null);  		

    	},

    	

    	culImgMove : function(type){

    			if (type==""){

    				alert('html ´ë±â');

    				return;

    			}

    		   	goUrl = pbk.APPLICATION_CONTEXT_ROOT + "/contents/itd/" + type;

				var hanaAjax = new hana.JHanaAjax(HANA_MAIN_DIV, true, true);

          		hanaAjax.ajaxCommSubmit(goUrl, null);

    	},

		culImgMoveCMS : function(goUrl){

    		   	goUrl = pbk.APPLICATION_CONTEXT_ROOT + goUrl;

				var hanaAjax = new hana.JHanaAjax(HANA_MAIN_DIV, true, true);

          		hanaAjax.ajaxCommSubmit(goUrl, null);

    	},

    	

    	toggleTabMenu : function (actionObj,type){

           	 	pbk.changeTabImage(actionObj, TAB_MENU_DIV);

            	var formObj = form.createForm([{id: 'paramReturnType',value: type}]);



    			goUrl = pbk.APPLICATION_CONTEXT_ROOT + type;



				var hanaAjax = new hana.JHanaAjax(TAB_MENU_CONTENT_DIV, true, true);

          		hanaAjax.ajaxCommSubmit(goUrl, formObj);

    	},
		
		toggleTabMenuList : function (type){

            	var formObj = form.createForm([{id: 'paramReturnTypeList',value: type}]);
    			goUrl = pbk.APPLICATION_CONTEXT_ROOT + type;
				var hanaAjax = new hana.JHanaAjax(TAB_LIST, true, true);
          		hanaAjax.ajaxCommSubmit(goUrl, formObj);

    	},

    

    	goDetail : function(type){

 	    		pbk.extJS.popup.open(pbk.APPLICATION_CONTEXT_ROOT + '/contents/itd/cul/cul_p100_' + type + '_popup.jsp','popup01', 650, null,null);  		

    	},

    	goDetailCMS : function(goUrl){

 	    		pbk.extJS.popup.open(pbk.APPLICATION_CONTEXT_ROOT + goUrl,'popup01', 650, null,null);  		

    	},

    	goArt : function (type) {

    			goUrl = pbk.APPLICATION_CONTEXT_ROOT + "/contents/itd/cul/cul_p99_" + type + ".jsp";

				var hanaAjax = new hana.JHanaAjax(HANA_MAIN_DIV, true, true);

          		hanaAjax.ajaxCommSubmit(goUrl, null);

    	},

    	goConCul : function(goUrl){

    			goUrl = pbk.APPLICATION_CONTEXT_ROOT  + goUrl;

				var hanaAjax = new hana.JHanaAjax(HANA_MAIN_DIV, true, true);

          		hanaAjax.ajaxCommSubmit(goUrl, null);

    	},
		
		//ÀÛÇ°ÀÌ¹ÌÁö º¯°æ 
		goImgChange : function(goUrl){

    			goUrl = pbk.APPLICATION_CONTEXT_ROOT  + goUrl;

				var hanaAjax = new hana.JHanaAjax(HANA_POPUP_DIV, true, true);

          		hanaAjax.ajaxCommSubmit(goUrl, null);

    	},

		

		menuOut: function(obj,actionObj){



			if (document.getElementById('checkClick').value != obj.id){

				obj.src = obj.src.replace("_on.gif", "_off.gif");

			}

		},

    			

		itdDepth : function(type,imgCnt,imgNm){   //type:Å¬¸¯µÈ ¸Þ´º ,imgCnt:Å¬¸¯µÈ¸Þ´ºÀÇ¼¼ºÐ·ù¼ö,imgNm:Å¬¸¯µÈ¸Þ´ºÀÇid°ª

			document.getElementById("checkClick").value="";	

    		var cnt=0;



    		var leftCnt = document.getElementById('leftCnt').value;



			for (i=0;i<Number(leftCnt);i++){



				if (document.getElementById("display"+i) != undefined ){

					document.getElementById("display"+i).style.display ='none';			

				}



    			document.getElementById("itd_on"+i).style.display='none';

    			document.getElementById("itd_off"+i).style.display='';

    		} //for



    		document.getElementById("itd_off"+type).style.display='none';

    		document.getElementById("itd_on"+type).style.display='';

    		

    		if (Number(imgCnt)!=0){

    			document.getElementById("display"+type).style.display='';

    		}

		},  

		  	

		goLeftContent : function(type,goUrl,goUrl1){   //´ëºÐ·ù¸¸ ÀÖÀ»°æ¿ì

		

			if (document.getElementById('Player') != undefined ){

				itd.movieStop();

			}

			

			document.getElementById("checkClick").value="";	

    		var leftCnt = document.getElementById('leftCnt').value;



			for (i=0;i<Number(leftCnt);i++){

				if (document.getElementById("display"+i) != undefined ){

					document.getElementById("display"+i).style.display ='none';			

				}

    			document.getElementById("itd_on"+i).style.display='none';

    			document.getElementById("itd_off"+i).style.display='';

    		}

			document.getElementById("itd_off"+type).style.display='none';

    		document.getElementById("itd_on"+type).style.display='';


			if(goUrl != ''){
				goUrl = goUrl;
			}else{
				goUrl = goUrl1;
			}

			var hanaAjax = new hana.JHanaAjax(HANA_MAIN_DIV, true, true);

          	hanaAjax.ajaxCommSubmit(goUrl, null);

		},



		leftMenu : function(type,goUrl,cnt){

		

			document.getElementById('checkClick').value=type; 


			
			var imgNm = type.substring(0, 5);

			for(i=0; i<Number(cnt);i++){

				document.getElementById(imgNm+i).src = document.getElementById(imgNm+i).src.replace("_on.gif","_off.gif");

			}

			

			document.getElementById(type).src = document.getElementById(type).src.replace("_off.gif","_on.gif");



			//goUrl = "/contents/itd/" + goUrl;
			goUrl = goUrl;

			var hanaAjax = new hana.JHanaAjax(HANA_MAIN_DIV, true, true);

          	hanaAjax.ajaxCommSubmit(goUrl, null);

    	},
    	
    	//goFromOutside : function(id, divId, type) {
		goFromOutside : function(type, url) {
        	
        	//alert(divId);
			//document.getElementById(divId).style.display = "none";
        	//document.getElementById(divId).style.display = "block";
        	url = url
        	var hanaAjax = new hana.JHanaAjax(HANA_MAIN_DIV, false, true);
        	hanaAjax.ajaxCommSubmit(url, null);
        	
        	if(type=="a"){
        	itd.itdDepth('0','5','itd_0');
        	document.getElementById("itd_00").src = document.getElementById("itd_00").src.replace("_off.gif","_on.gif");
        	}else if(type=="b"){
        	itd.itdDepth('1','3','itd_1');
        	document.getElementById("itd_10").src = document.getElementById("itd_10").src.replace("_off.gif","_on.gif");
        	}else if(type=="c"){
        	itd.itdDepth('2','2','itd_2');
        	document.getElementById("itd_20").src = document.getElementById("itd_20").src.replace("_off.gif","_on.gif");
        	}else if(type=="d"){
        	itd.itdDepth('3','5','itd_3');
        	document.getElementById("itd_30").src = document.getElementById("itd_30").src.replace("_off.gif","_on.gif");
        	}else if(type=="e"){
        	itd.itdDepth('4','2','itd_4');
        	document.getElementById("itd_40").src = document.getElementById("itd_40").src.replace("_off.gif","_on.gif");
        	
        	}else if(type=="f"){
        	itd.goLeftContent('0','','/contents/itd/prc/prc1/index.jsp');
        	document.getElementById("prc_10").src = document.getElementById("prc_10").src.replace("_off.gif","_on.gif");
        	}else if(type=="g"){
        	itd.goLeftContent('1','','/contents/itd/prc/prc2/index.jsp');
        	document.getElementById("prc_11").src = document.getElementById("prc_11").src.replace("_off.gif","_on.gif");
        	}else if(type=="h"){
        	itd.goLeftContent('2','','/contents/itd/prc/prc3/index.jsp');
        	document.getElementById("prc_12").src = document.getElementById("prc_12").src.replace("_off.gif","_on.gif");
        	}else if(type=="i"){
        	itd.goLeftContent('3','','/contents/itd/prc/prc4/index.jsp');
        	document.getElementById("prc_13").src = document.getElementById("prc_13").src.replace("_off.gif","_on.gif");
        	}else if(type=="j"){
        	itd.goLeftContent('4','','/contents/itd/prc/prc5/index.jsp');
        	document.getElementById("prc_14").src = document.getElementById("prc_14").src.replace("_off.gif","_on.gif");
        	
        	}else if(type=="k"){
        	itd.goLeftContent('0','','/contents/itd/cop/cop1/index.jsp');
        	document.getElementById("cop_10").src = document.getElementById("cop_10").src.replace("_off.gif","_on.gif");
        	}else if(type=="l"){
        	itd.goLeftContent('1','','/contents/itd/cop/cop2/index.jsp');
        	document.getElementById("cop_11").src = document.getElementById("cop_11").src.replace("_off.gif","_on.gif");
        	}else if(type=="m"){
        	itd.goLeftContent('2','','/contents/itd/cop/cop3/index.jsp');
        	document.getElementById("cop_12").src = document.getElementById("cop_12").src.replace("_off.gif","_on.gif");
        	}else if(type=="n"){
        	itd.goLeftContent('3','','/contents/itd/cop/cop4/index.jsp');
        	document.getElementById("cop_13").src = document.getElementById("cop_13").src.replace("_off.gif","_on.gif");
        	}else if(type=="o"){
        	itd.goLeftContent('4','','/contents/itd/cop/cop5/index.jsp');
        	document.getElementById("cop_14").src = document.getElementById("cop_14").src.replace("_off.gif","_on.gif");
        	}else if(type=="p"){
        	itd.itdDepth('5','3','itd_5');
        	document.getElementById("itd_50").src = document.getElementById("itd_50").src.replace("_off.gif","_on.gif");
        	
        	}else if(type=="q"){
        	itd.goLeftContent('0','','/contents/itd/adv/adv1/index.jsp');
        	document.getElementById("adv_10").src = document.getElementById("adv_10").src.replace("_off.gif","_on.gif");
        	}else if(type=="r"){
        	itd.goLeftContent('1','','/contents/itd/adv/adv2/index.jsp');
        	document.getElementById("adv_11").src = document.getElementById("adv_11").src.replace("_off.gif","_on.gif");
        	}else if(type=="s"){
        	itd.goLeftContent('2','','/contents/itd/adv/adv3/index.jsp');
        	document.getElementById("adv_12").src = document.getElementById("adv_12").src.replace("_off.gif","_on.gif");
        	}else if(type=="t"){
        	itd.goLeftContent('3','','/portal/mkt/thm/adv_p69.do');
        	document.getElementById("adv_13").src = document.getElementById("adv_13").src.replace("_off.gif","_on.gif");
        	
        	}else if(type=="u"){
        	itd.itdDepth('0','6','itd_0');
        	document.getElementById("itd_00").src = document.getElementById("itd_00").src.replace("_off.gif","_on.gif");
        	}else if(type=="u1"){
        	itd.leftMenu('itd_02','rct/rct_p84.jsp','6');
        	document.getElementById("itd_02").src = document.getElementById("itd_02").src.replace("_off.gif","_on.gif");
        	}else if(type=="u2"){
        	itd.leftMenu('itd_03','rct/rct_p85.jsp','6');
        	document.getElementById("itd_03").src = document.getElementById("itd_03").src.replace("_off.gif","_on.gif");
        	
        	}else if(type=="v"){
        	itd.goLeftContent('1','','/contents/itd/rct/rct2/index.jsp');
        	document.getElementById("rct_10").src = document.getElementById("rct_10").src.replace("_off.gif","_on.gif");
        	}else if(type=="w"){
        	itd.itdDepth('2','2','itd_2');
        	document.getElementById("itd_20").src = document.getElementById("itd_20").src.replace("_off.gif","_on.gif");
        	}else if(type=="x"){
        	itd.goLeftContent('1','','/contents/itd/gong/gong2/index.jsp');
        	document.getElementById("gong_11").src = document.getElementById("gong_11").src.replace("_off.gif","_on.gif");
        	}else if(type=="y"){
        	itd.goLeftContent('2','','/contents/itd/gong/gong3/index.jsp');
        	document.getElementById("gong_12").src = document.getElementById("gong_12").src.replace("_off.gif","_on.gif");
        	}else if(type=="z"){
        	itd.goLeftContent('3','','/contents/itd/gong/gong4/index.jsp');
        	document.getElementById("gong_13").src = document.getElementById("gong_13").src.replace("_off.gif","_on.gif");
        	}
        	
        	
        	/*
			if(type == 'left01_1'){
				ccd.crcrd.brf.ViewLayer1('left01_','left01_1',3);
        		hanaAjax.ajaxCommSubmit('/contents/ccd/product_detail/crcrd/cr_02.jsp', null);
        	}else if (type == 'left04_4'){        		
        		ccd.crcrd.brf.ViewLayer1('left04_','left04_4',6);
        		hanaAjax.ajaxCommSubmit('/contents/ccd/product_detail/crcrd/cr_14.jsp', null);
        	}else if (type == 'left04_6'){
        		ccd.crcrd.brf.ViewLayer1('left04_','left04_6',6);
        		hanaAjax.ajaxCommSubmit('/contents/ccd/product_detail/crcrd/cr_16.jsp', null);
        	}*/
        },
        insertFlashWithVersion:function (swf, width, height, bgcolor, id, flashvars, trans, verstr, base, div){
		
			var strFlashTag = new String();
			verstr = '9,0,0,0';
		
			if (navigator.appName.indexOf("Microsoft") != -1)
			{
				strFlashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+verstr+'" id="' + id + '" width="' + width + '" height="' + height + '" align="left">';
				strFlashTag += '<param name="allowScriptAccess" value="sameDomain"/>';
				strFlashTag += '<param name="movie" value="' + swf + '"/>';
				strFlashTag += '<param name="quality" value="high"/>';
				strFlashTag += '<param name="base" value="' + base +'"/>';
				strFlashTag += '<param name="bgcolor" value="' + bgcolor + '"/>';
				//strFlashTag += '<param name="flashVars" value="xmlPath=/resource/flash/itd/asset/xml/hana_history.xml" />';
				strFlashTag += '<param name="flashVars" value="xmlPath=/contents/ionresource/flash/itd/xml/hana_history.xml" />';
				strFlashTag += '</object>';
			}
			else
			{
				strFlashTag += '<embed src="' + swf + '" ';
				strFlashTag += 'quality="best" ';
				strFlashTag += 'bgcolor="' + bgcolor + '" ';
				strFlashTag += 'width="' + width + '" ';
				strFlashTag += 'height="' + height + '" ';
				strFlashTag += 'menu="false" ';
				strFlashTag += 'scale="noscale" ';
				strFlashTag += 'id="' + id + '" ';
				strFlashTag += 'salign="LT" ';
				strFlashTag += 'wmode="' + trans + '" ';
				strFlashTag += 'allowScriptAccess="sameDomain" ';
				if(flashvars != null) {strFlashTag += 'flashvars="' + flashvars + '" '};
				strFlashTag += 'type="application/x-shockwave-flash" ';
				strFlashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
				strFlashTag += '</embed>';
			}
			document.getElementById(div).innerHTML = strFlashTag;
			
		}
    	

    }           // End Reutn

}();            // End cor.soho


itd.common = function() {
	
    return {
		
		// 1Depth È°¼ºÈ­ (type:Å¬¸¯µÈ ¸Þ´º ,imgCnt:Å¬¸¯µÈ¸Þ´ºÀÇ ÇÏÀ§(2Depth)¸Þ´ººÐ·ù¼ö)
		oneDepth : function(type,imgCnt){   

			document.getElementById("checkClick").value="";				//Å¬¸¯µÈ 1depth ¹ë·ù°ª ÃÊ±âÈ­ 

    		var leftCnt = document.getElementById('leftCnt').value;		//ÆäÀÌÁö¿¡¼­ ¹Ì¸® Á¤ÀÇÇØ³õÀº ÀüÃ¼ 1Depth °¹¼ö

			for (i=0;i<Number(leftCnt);i++){
				
				//ÀüÃ¼ 1Depth ÇÏÀ§ 2Depth style => none 
				if (document.getElementById("2depth_"+i) != undefined ){
					document.getElementById("2depth_"+i).style.display ='none';			
				}
				
				//ÀüÃ¼ 1Depth on_image => none , off_image => block 
    			document.getElementById("1depth_on"+i).style.display='none';
    			document.getElementById("1depth_off"+i).style.display='';

    		} //end for
    		
			//ÇØ´ç 1Depth image block
    		document.getElementById("1depth_off"+type).style.display='none';
    		document.getElementById("1depth_on"+type).style.display='';
			
			//ÇØ´ç 2Depth block
    		if (Number(imgCnt)!=0){
    			document.getElementById("2depth_"+type).style.display='';
    		}

		},
				
		// 2Depth È°¼ºÈ­ (type:ÇØ´ç 2depth image °íÀ¯ Id, cnt:ÇØ´ç 2depth¸Þ´ººÐ·ù¼ö)
		twoDepth : function(type,cnt){
			
			//Å¬¸¯µÈ ¸Þ´º(2depth)ÀÇ °íÀ¯Id => page¿­·Á ÀÖ´Â ÇØ´çimage mouseOver½Ã off_image·Î º¯ÇÏ´Â°Í ¸·±â À§ÇØ Å¸ÀÔºÎ¿© 
			document.getElementById('checkClick').value=type; 
			
			var twoDepth = type.substring(0, 8);	//(°á°ú ex : 2depth_00 =>  2depth_0)
			
			//ÀüÃ¼ 2Depth imgge style => off 
			for(i=0; i<Number(cnt);i++){
				document.getElementById(twoDepth+i).src = document.getElementById(twoDepth+i).src.replace("_on.gif","_off.gif");
			}
			
			//ÇØ´ç 2Depth imgge style => on 
			document.getElementById(type).src = document.getElementById(type).src.replace("_off.gif","_on.gif");

    	},
		
			
		menuOut: function(obj){

			if (document.getElementById('checkClick').value != obj.id){
				obj.src = obj.src.replace("_on.gif", "_off.gif");
			}

		}
      
    }          // End Reutn

}();            // End cor.soho

itd.common = function() {
	
    return {
		
		// 1Depth È°¼ºÈ­ (type:Å¬¸¯µÈ ¸Þ´º ,imgCnt:Å¬¸¯µÈ¸Þ´ºÀÇ ÇÏÀ§(2Depth)¸Þ´ººÐ·ù¼ö)
		oneDepth : function(type,imgCnt){   

			document.getElementById("checkClick").value="";				//Å¬¸¯µÈ 1depth ¹ë·ù°ª ÃÊ±âÈ­ 

    		var leftCnt = document.getElementById('leftCnt').value;		//ÆäÀÌÁö¿¡¼­ ¹Ì¸® Á¤ÀÇÇØ³õÀº ÀüÃ¼ 1Depth °¹¼ö

			for (i=0;i<Number(leftCnt);i++){
				
				//ÀüÃ¼ 1Depth ÇÏÀ§ 2Depth style => none 
				if (document.getElementById("2depth_"+i) != undefined ){
					document.getElementById("2depth_"+i).style.display ='none';			
				}
				
				//ÀüÃ¼ 1Depth on_image => none , off_image => block 
    			document.getElementById("1depth_on"+i).style.display='none';
    			document.getElementById("1depth_off"+i).style.display='';

    		} //end for
    		
			//ÇØ´ç 1Depth image block
    		document.getElementById("1depth_off"+type).style.display='none';
    		document.getElementById("1depth_on"+type).style.display='';
			
			//ÇØ´ç 2Depth block
    		if (Number(imgCnt)!=0){
    			document.getElementById("2depth_"+type).style.display='';
    		}

		},
				
		// 2Depth È°¼ºÈ­ (type:ÇØ´ç 2depth image °íÀ¯ Id, cnt:ÇØ´ç 2depth¸Þ´ººÐ·ù¼ö)
		twoDepth : function(type,cnt){
			
			//Å¬¸¯µÈ ¸Þ´º(2depth)ÀÇ °íÀ¯Id => page¿­·Á ÀÖ´Â ÇØ´çimage mouseOver½Ã off_image·Î º¯ÇÏ´Â°Í ¸·±â À§ÇØ Å¸ÀÔºÎ¿© 
			document.getElementById('checkClick').value=type; 
			
			var twoDepth = type.substring(0, 8);	//(°á°ú ex : 2depth_00 =>  2depth_0)
			
			//ÀüÃ¼ 2Depth imgge style => off 
			for(i=0; i<Number(cnt);i++){
				document.getElementById(twoDepth+i).src = document.getElementById(twoDepth+i).src.replace("_on.gif","_off.gif");
			}
			
			//ÇØ´ç 2Depth imgge style => on 
			document.getElementById(type).src = document.getElementById(type).src.replace("_off.gif","_on.gif");

    	},
		
			
		menuOut: function(obj){

			if (document.getElementById('checkClick').value != obj.id){
				obj.src = obj.src.replace("_on.gif", "_off.gif");
			}

		}
      
    }          // End Reutn

}();            // End cor.soho
