  function writeMainNavToday(td,upd){
    var so = new SWFObject(imageUrl+"/mi06/gnb/naviGNBList_10.swf", "mainGNBSwf", "890", "474", "8", "#FFFFFF",false);
    so.addParam("quality", "high");
    so.addParam("wmode", "transparent");
    so.addParam("allowScriptAccess", "always");
    so.addVariable("branchVar","bottom");
    so.addVariable("today",td);
    so.addVariable("update",upd);
	so.addVariable("mainFlag","true");
    so.write("mainNav");
  }

	function newGuide(){
	  window.open('/event/2006_12/apply_guidebook.jsp','','width=800,height=600, topmargin=0, leftmargin=0, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no');
	 }

  function executeAjax(nextProcess){
    var url = "/index_"+nextProcess+".gs";
    new Ajax(url,
      {
        method: 'get',
        evalScripts : true,
        onComplete:function(text){
          $('div_area_'+nextProcess).innerHTML = text;
        }
      }
    ).request();
  }

  function popupUnder() {
    if (getCookie("popunder") != "done") { var popUnder = windowOpen('/main/common/popunder.jsp','popUnder',300,300); self.focus();  }
  }
  
	function openVsWin(vsurl){
		window.open(vsurl,'vs','width=420,height=550,topmargin=0, leftmargin=0, toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=no, resizable=yes');
	}


	function maintabFunc(id,num,max) {
		$(id).className = 'tabbg'+num;
		for (i=1;i<max+1;i++) {
			if (i==num) {
				$(id+i).className = 'on';
				$(id+'L'+i).className = 'block';
			}
			else {
				$(id+i).className = '';
				$(id+'L'+i).className = 'none';
			}
		}
	}
	
	function brandtabFunc(id,num,max) {
		for (i=1;i<max+1;i++) {
			if (i==num) {
				$(id+i).className = 'on';
				$(id+'L'+i).className = 'block';
			}
			else {
				$(id+i).className = '';
				$(id+'L'+i).className = 'none';
			}
		}
	}
			
	function tabA(id,num,max) {
    for (i=1;i<max+1;i++) {
			if (i == num) {
				$(id+i).className='on';
				$(id+'L'+i).className='block hand';
			}
			else {
				$(id+i).className='';
				$(id+'L'+i).className='none';
			}
		}
	}
	
	
function goKnowBest(){
	var tq = $(search_tq).value;
	location.href="/sect/bestRanking/bestKnowMain.gs?tq="+tq+"#search";
}

function imageReplace(targetId, targetImage) {
	var t = document.getElementById(targetId);
	var txt = t.innerHTML;
	t.innerHTML = '';
	var el = document.createElement('img');
	el.src = targetImage;
	//el.alt = txt;
	el.usemap = '#Map'+targetId;
	t.appendChild(el);

	//if(isIE) {
		if ( /\.png$/.test( targetImage.toLowerCase() ) ) {
		  el.src = blankImage;
		  el.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', src='" + targetImage + "',sizingMethod='scale')";
		}
		else {
		  el.style.filter = "";
		}
	//}
}

function selectCodi(selnum, tImage){
	imageReplace('codi_img', tImage);
}

//DM Popup
function catvOrderPop(){
	window.open("/main/catvOrder.jsp?gsid=Ecmain-550-556-0","popUnder","width=490,height=380,left=0,top=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");	
}

function layerChange(id,num,max) {
		for (i=1;i<=max;i++) {
			if (i == num) {
				$(id+i).className = "on";
				$(id+'L'+i).className = "block";
			}
			else {
				$(id+i).className = "";
				$(id+'L'+i).className = "none";
			}
		}
}

function tvTab(id,index)
{
		if (index==2)	$(id).className='on';
		else	$(id).className='';
		for (i=1;i<=2;i++)
		{
			if (i==index)	$(id+'L'+i).className="block";
			else	$(id+'L'+i).className="none";
		}
}

// e½ºÅä¾î
function goEstoreURL(u) {
  var esurl = "/jsp/dummy_gate.jsp?media=qN&url=" +u;
	var newWin = window.open(esurl, 'estorewin', 'location=yes, linkbar=yes, menubar=yes, scrollbars=yes, status=yes, toolbar=yes, resizable=yes');
    newWin.focus();
   	return;
}