// ****************************************************************** 
// ÀÛ¼ºÀÏ : 2009³â 2¿ù 1ÀÏ
// ´øÅ²µµ³ÊÃ÷ ¸Þ´º & °ü·Ã ½ºÅ©¸³Æ® js
// ¾ÆÀÌÆÄÆ®³ÊÁî : À¥ÆÛºí¸®¼Å Á¶¾Æ¸§ arumy@ipartners.co.kr
// ÃÖÁ¾¼öÁ¤ÀÏ : 2009³â ¿ù ¿ù
// ÃÖÁ¾¼öÁ¤ÀÚ : 
// ****************************************************************** 

// Browser Title
document.title="¡Å¡ñ Ä¿ÇÇ¿Í µµ³ÓÀÇ »õ·Î¿î °æÇè! ´øÅ²µµ³ÊÃ÷ ¡Å¡ñ";

// Url
document.write("<script type='text/javascript' src='/asset/js/common_url.js'></script>");

//¸Þ´º µµ³ÊÃ÷~¼¼Æ®/±âÅ¸»óÇ° ±îÁö ÇÏ´Ü ÅÂ±× °ü·Ã ÄÁÅÙÃ÷  
function tag_content(idx){  
	document.getElementById("frm_tag_content").contentWindow.document.location.href="/product/link_content.php?kidx="+idx  ;
} 


// js ¸µÅ©¿ë ÇÔ¼ö 
function GoMenu(name) {    

    if (eval(name) == "") {
        alert("¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù.");
        return;
    }
     else 
    {
        document.location.href = eval(name);
    }
}


function onError_smpic(v){
document.getElementById("smimg"+v).src='/asset/images/common/no_datas.gif';
}


// ÇÃ·¡½Ã ½ºÅ©¸³Æ®
function Swf_View(URL,SizeX,SizeY,LnkId,Frm,Flag) // quick
{
 
    document.write('            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
    document.write('                    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
    document.write('                    width="'+SizeX+'" height="'+SizeY+'"  id="'+LnkId+'" align="middle">');
    document.write('            <param name="movie"     value="'+URL+'" />');
    document.write('            <param name="quality"   value="high" />');
    if ( Flag == null || Flag != 'N' )
    {
        document.write('        <param name="wmode"     value="transparent"/>');
    }
	document.write('			<param name="allowScriptAccess" value="always"/> ');
    document.write('			<param name="flashVars" value="movVol=50" />'); //¸ÞÀÎ º¼·ý Á¶Àý
	document.write('			<param name="base" value="." />');
    document.write('            <embed base="." src="'+URL+'" quality="high" width="'+SizeX+'" height="'+SizeY+'"  align="middle" ');
	 if ( Flag == null || Flag != 'N' )
    {
        document.write('       		wmode="transparent" ');
    }
    document.write('           		type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" swLiveConnect=true name="'+LnkId+'"  />');
    document.write('            </embed></object>');
	if ( Frm == 'Y' ) { // form ÅÂ±× µé¾î°¡´Â ÆäÀÌÁö¿¡ Àû¿ë
		eval("window." + LnkId + " = document.forms[0]."+ LnkId +"; ");
	}
}

var depth1="0",depth2="0",depth3="0",depth4="0",globalId="0",flaFarm="0";

/* ÇÃ·¡½Ã ¸Þ´º È°¼ºÈ­ °ª + ÁÖ¼Ò À§Ä¡°ª ³ª¿À°Ô ÇØÁÖ´Â °÷ÀÓ!! */
/* URLÇÔ¼ö°ªÀ» ÇÃ·¡½Ã ÇÔ¼ö°ªÀ¸·Î ¹Þ¾Æ¼­ ÁöÁ¤ÇÏ±â ¶§¹®¿¡  */

// ³ëµå ¼ÂÆÃ 
function setString(node){
	var spStr = "" , last="";
	try{
		var url  = eval(node+"[0]");
		var name = eval(node+"[1]");
	}
	catch(e){
		document.write("The id does not exist : " + node);
	}
	var nodeId  = node;
	var spStr = " > ";
	if(node.lastIndexOf('_') != -1) setString(node.substring(0,node.lastIndexOf('_')));
	else lineMapStr += "<a href='"+eval("u0[0]")+"'>"+ eval("u0[1]")+"</a>" + spStr;
	if(currentPath != nodeId)
		lineMapStr += "<a href='"+url+"'>"+ name+"</a>" + spStr;
	else
		lineMapStr += "<span class='last'>"+name+"</span>";
}

// ·ÎÄÉÀÌ¼Ç
function Path(){
	try{
		lineMapStr = "";
		index = 0;
		currentPath="u"+globalId;
		setString("u"+globalId);
		document.write("<img src='/asset/images/common/dot_path.gif' alt='' align='absmiddle' />");
		document.write(lineMapStr);
	}catch(e){
		document.write("¿¹¿ÜÃ³¸®¹ß»ý : " +  e);
	}
}

// ÇÃ·¡½Ã ¸Þ´º¸µÅ© ÇÔ¼ö°ª link·Î ³Ñ±é´Ï´Ù link(1,2,3,4)ÀÌ·±½Ä.. 
function link(){
	var url = "";
	var depth = arguments.length;
	try {
		if(depth==0) return;
		else if(depth==1) url = eval("u"+arguments[0]+"[0]");
		else if(depth==2) url = eval("u"+arguments[0]+"_"+arguments[1]+"[0]");
		else if(depth==3) url = eval("u"+arguments[0]+"_"+arguments[1]+"_"+arguments[2]+"[0]");
		if(url=="") alert("ÁØºñÁßÀÔ´Ï´Ù!");
		else location.href = url;
	}catch(e) { alert("ÁØºñÁßÀÔ´Ï´Ù!"); }
}



/* Top ¸ÞÀÎ¸Þ´ºÇÃ·¡½Ã */
/* 3µª½º±îÁö¸¸ ³Ö¾ú½À´Ï´Ù. 4µª½º´Â Ãß°¡ÇÏ½Ã¸é µË´Ï´Ù. */
function Mnav(){
	try{
		Depth = arguments.length;
		//var DepthName = new Array("depth1","depth2","depth3");
		var DepthName = new Array("depth1","depth2","depth3");

		//0°ªÀ» °ø¹éÃ³¸®, ¾ÕÀÇ ³ëµå¸¦ »èÁ¦ ¼ø¼­ °Å²Ù·Î ÇØ¾ß ¸ÔÈû..¤Ð_¤Ð
		if(arguments[2] == 0) Depth = arguments.length-1;
		if(arguments[1] == 0) Depth = arguments.length-2;

		for(i=0;i<Depth;i++)
			{
				if(i==0) depth1 =  arguments[i];
				if(i==1) depth2 =  arguments[i];
				if(i==2) depth3 =  arguments[i];
				
				
				globalId = (i==0) ? arguments[i] : globalId+"_"+arguments[i] ;
				flaFarm = (i==0) ?  DepthName[i]+"="+arguments[i] : flaFarm+"&"+DepthName[i]+"="+arguments[i] ;
			}
		//alert("ÃÑ ³ëµå°ª ="+Depth);
		//swfobject.embedSWF('/krs/images/swf/gnb_mc.swf?xmlURL=/krs/inc/js/gnbMenu.xml&'+flaFarm,'swf_mnav','170','520', "9.0.0", false, false, {wmode:"transparent", bgcolor:"#FFFFFF", allowScriptAccess:"always"});
		//swfobject.embedSWF('/asset/flash/gnb.swf&'+flaFarm,'swf_mnav','80','690', "9.0.0", false, false, {wmode:"transparent", bgcolor:"#FFFFFF", allowScriptAccess:"always"});
		

		Swf_View('/asset/flash/gnb_sub_2.swf?'+flaFarm,'690','80');//¼³¹®Á¶»ç°¡ ¾ø´Â°æ¿ì
		//Swf_View('/asset/flash/gnb_sub.swf?'+flaFarm,'690','80');
		// 1 = DD¸Þ´º
		// 2 = DDÀÌº¥Æ®
		// 3 = DD¸ÅÀå
		// 4 = DD¼Ò°³
		// 5 = Á¡Æ÷°³¼³¾È³»
		// 6 = ¸¶ÀÌDD
		// 7 = °í°´¼¾ÅÍ
		// 8 = ¼­Æ÷ÅÍÁî
		// 9 = ·Î±×ÀÎ
		// 10 = ÀÌ¿ë¾à°ü
		// 11 = °³ÀÎÁ¤º¸º¸È£Á¤Ã¥
		// 12 = »çÀÌÆ®¸Ê
		// 13 = Search

		//ÇÃ·¡½Ã ¾ò±â Àü±îÁöÀÇ ÀÓ½Ã¼Ò½º
		//if(depth1 == 1)	{ document.write("<img src='/asset/images/sample/top1.jpg' alt='Top¸Þ´º ÇÃ·¡½Ã1' />"); }
		//else if(depth1 == 2)	{ document.write("<img src='/asset/images/sample/top2.jpg' alt='Top¸Þ´º2' />"); }
		//else if(depth1 == 3)	{ document.write("<img src='/asset/images/sample/top3.jpg' alt='Top¸Þ´º3' />"); }
		//else if(depth1 == 4)	{ document.write("<img src='/asset/images/sample/top4.jpg' alt='Top¸Þ´º4' />"); }
		//else if(depth1 == 5)	{ document.write("<img src='/asset/images/sample/top5.jpg' alt='Top¸Þ´º5' />"); }
	}catch(e){}
}

/* ¿ÞÂÊ¼­ºê¸Þ´ºÇÃ·¡½Ã */
function Snav(){
	try{
		var Depth = arguments.length;
		var DepthName = new Array("depth1","depth2","depth3");
		for(i=0;i<Depth;i++){
			if(i==0) 
				depth1 =  arguments[i];
			if(i==1) 
				depth2 =  arguments[i];
			if(i==2) 
				depth3 =  arguments[i];
			if(i==3) 
				depth4 =  arguments[i];
			
			globalId = (i==0) ? arguments[i] : globalId+"_"+arguments[i] ;
			flaFarm = (i==0) ?  DepthName[i]+"="+arguments[i] : flaFarm+"&"+DepthName[i]+"="+arguments[i] ;
		}
		
		//¼Ó¼º°ª È®ÀÎ¿ë alert(flaFarm);
		if(depth1 == 1)	
			{ Swf_View('/asset/flash/menu.swf?'+flaFarm,'170','235'); } //dd¸Þ´º ¼­ºê
		if(depth1 == 2)	
			{ Swf_View('/asset/flash/event_2.swf?'+flaFarm,'170','166'); } //¼³¹®Á¶»ç ¼û±è
			//{ Swf_View('/asset/flash/event.swf?'+flaFarm,'170','166'); } //ddÀÌº¥Æ® ¼­ºê
		if(depth1 == 3)	
			{ Swf_View('/asset/flash/store.swf?'+flaFarm,'170','120'); } //dd¸ÅÀå ¼­ºê
		if(depth1 == 4)	
			{ Swf_View('/asset/flash/dunkin.swf?'+flaFarm,'170','212'); } //dd¼Ò°³ ¼­ºê
		if(depth1 == 5)
			{ Swf_View('/asset/flash/franchise.swf?'+flaFarm,'170','235'); } //Á¡Æ÷°³¼³¾È³» ¼­ºê
		if(depth1 == 6)
			{ Swf_View('/asset/flash/mydd.swf?'+flaFarm,'170','212'); } // MY DD
		if(depth1 == 7)
			{ Swf_View('/asset/flash/customer.swf?'+flaFarm,'170','143'); } // °í°´¼¾ÅÍ
		if(depth1 == 8)
			{ Swf_View('/asset/flash/DDsupporters.swf?'+flaFarm,'170','143'); } // DD¼­Æ÷ÅÍÁî
		if(depth1 == 9)
			{ Swf_View('/asset/flash/etc.swf?'+flaFarm,'170','189'); } // ETC
		if(depth1 == 10)
			{ Swf_View('/asset/flash/etc.swf?'+flaFarm,'170','189'); } // ÀÌ¿ë¾à°ü
		if(depth1 == 11)
			{ Swf_View('/asset/flash/etc.swf?'+flaFarm,'170','189'); } // °³ÀÎÁ¤º¸º¸È£Á¤Ã¥
		if(depth1 == 12)
			{ Swf_View('/asset/flash/etc.swf?'+flaFarm,'170','189'); } // »çÀÌÆ®¸Ê
		if(depth1 == 13)
			{ Swf_View('/asset/flash/etc.swf?'+flaFarm,'170','189'); } // search
			

		//swfobject.embedSWF('/krs/images/swf/gnb_mc.swf?xmlURL=/krs/inc/js/gnbMenu.xml&'+flaFarm,'swf_mnav','170','520', "9.0.0", false, false, {wmode:"transparent", bgcolor:"#FFFFFF", allowScriptAccess:"always"});			
		
		//ÇÃ·¡½Ã ¾ò±â Àü±îÁöÀÇ ÀÓ½Ã¼Ò½º ÀÌ¹ÌÁö¿ë
		//if(depth1 == 1)	{ document.write("<img src='/asset/images/sample/left1.jpg' alt='Left¸Þ´º ÇÃ·¡½Ã1' />"); }
		//else if(depth1 == 2)	{ document.write("<img src='/asset/images/sample/left2.jpg' alt='Left¸Þ´º ÇÃ·¡½Ã2' />"); }
		//else if(depth1 == 3)	{ document.write("<img src='/asset/images/sample/left3.jpg' alt='Left¸Þ´º ÇÃ·¡½Ã3' />"); }
		//else if(depth1 == 4)	{ document.write("<img src='/asset/images/sample/left4.jpg' alt='Left¸Þ´º ÇÃ·¡½Ã4' />"); }
		//else if(depth1 == 5)	{ document.write("<img src='/asset/images/sample/left5.jpg' alt='Left¸Þ´º ÇÃ·¡½Ã5' />"); }
	}catch(e){}
}

/* ¼­ºê Áß¾Ó ÇÃ·¡½Ã */
function Cnav(depth){
	try{
		//cument.write("<img src='/asset/images/sample/center1.jpg' alt='Áß¾ÓÇÃ·¡½Ã À§Ä¡' />");
		if (depth =="1" ||depth =="2" ||depth =="3" ||depth =="4" ||depth =="5")	{
			Swf_View('/asset/flash/subV/subVisual.swf?depth1='+depth,'855','240');
		}else{
			Swf_View('/asset/flash/subV/subVisual.swf?depth1=6','855','240');
		}
		

		//if(depth1 == 1)	{ Swf_View('/asset/flash/subV/subVisual.swf','855','240');}
		//else if(depth1 == 2)	{ Swf_View('/asset/flash/subV/subVisual.swf','855','240');}
		//else if(depth1 == 3)	{ Swf_View('/asset/flash/subV/subVisual.swf','855','240');}
		//else if(depth1 == 4)	{ Swf_View('/asset/flash/subV/subVisual.swf','855','240');}
		//else if(depth1 == 5)	{ Swf_View('/asset/flash/subV/subVisual.swf','855','240');}
	}catch(e){}
}

//Äü¸Þ´º ÇÃ·¡½Ã */
function Qnav(){
	try{
		//document.write("<img src='/asset/images/sample/quick.jpg' alt='Äü¸Þ´º' />");
		Swf_View('/asset/flash/quick_menu.swf','62','500');
	}catch(e){}
}
function Qnav_m(){
	try{
		//document.write("<img src='/asset/images/sample/quick.jpg' alt='Äü¸Þ´º' />");
		Swf_View('/asset/flash/quick_menu_main.swf','62','370');
	}catch(e){}
}

//Äü¸Þ´º ÇÃ·¡½Ã ÇÔ¼ö
//´­·¶À» ¶§ »õÃ¢À¸·Î °¡°Ô ÇÒ·Á¸é window.open('http://ÁÖ¼Ò','_blank');
function quickLink(Qlink)
	{
		if(Qlink == "1")
			{ 
				window.open('http://www.spceshop.co.kr/front/Brand_Shop.asp?cmacode=000002','_blank');  //´øÅ² ¿Â¶óÀÎ ¼îÇÎ¸ô
			}
		if(Qlink == "2")
			{ 
				window.open('http://gifticon.nate.com/natecom/brandshop/brandProductList.do?prodDispId=001013','_blank'); //´øÅ² ±âÇÁÆ¼ÄÜ
			}
		if(Qlink == "3")
			{
				window.open('http://gifti.show.co.kr/shop/brandshop_detail.asp?brand=dunkin','_blank'); //´øÅ² ±âÇÁÆ¼¼î
			}
		if(Qlink == "4")//Ãß°¡ ´øÅ²ÇÏÆ®ÄÜ
			{
				window.open('http://heartcon.paran.com/goods/goodsBrandList.hc?menu=dunkindonuts','_blank'); //´øÅ² ÇÏÆ®ÄÜ
			}
		if(Qlink == "5")//Ãß°¡ ´øÅ² Å¥ÇÇÄÜ
			{
				window.open('http://www.qpcon.com','_blank'); //´øÅ² Å¥ÇÇÄÜ
			}
		if(Qlink == "6")//º¯°æ 4 -> 6
			{
				link(5,3); //´øÅ² Á¡Æ÷°³¼³¾È³» Ä«Å×°í¸® ¸µÅ©
			}
		if(Qlink == "7")
			{ 
				window.open('http://www.happyconpoint.com/prdt/prdtList.action?searchType=B0003','_blank'); //´øÅ² ÇØÇÇÄÜ
			}	
	}

function FooterMenu(Go)
	{
		if(Go == '1')
			{
				window.open('http://www.happypointcard.com/','_blank'); //ÇØÇÇÆ÷ÀÎÆ® Ä«µå »õÃ¢
			}
		if(Go == '2')
			{
				link(4,6); //Ã¤¿ë¾È³»
			}
		if(Go == '3')
			{
				link(5); //Ã¢¾÷¾È³» ÇÁ·»Â÷ÀÌÁî	
			}
		if(Go == '4')
			{
				link(10); //ÀÌ¿ë¾à°ü	
			}
		if(Go == '5')
			{
				link(11); //°³ÀÎÁ¤º¸ º¸È£Á¤Ã¥
			}
		if(Go == '6')
			{
				PopUp('emailtrPop'); //ÀÌ¸ÞÀÏ¼öÁý¹«´Ü°ÅºÎ ÆË¾÷Ã¢	
			}
		if(Go == '7')
			{
				window.open('http://www.spc.co.kr/html/system/sys_01.html','_blank'); //°Å·¡Èñ¸ÁÈ¸»ç »çÀüµî·Ï
			}
		if(Go == '8')
			{
				link(4,1,3); //Ã¤¿ë¾È³»
			}
	}
// DD ¹Ì¼Ç °ÔÀÓ ÇÃ·¡½Ã
function DDMission(idx){
	try{
		//document.write("<a href='javascript:Item_ViewDDmission(1);'><img src='/asset/images/sample/sample_ddmi.gif' alt='DD ¹Ì¼Ç ÇÃ·¡½Ã ¿µ¿ª ÀÓ½Ã' /></a>");
		Swf_View('/asset/flash/dd_mission.swf?data_nSeq='+idx,'612','446');
	}catch(e){}
}

//´øÅ²Á¡Æ÷ °Ë»ö ÇÃ·¡½Ã
function StoreNav(){
	try{
		//document.write("<img src='/asset/images/sample/sample_store.gif' alt='Á¡Æ÷ Ã£±â ÇÃ·¡½Ã ÀÓ½Ã¿ë' />");
		Swf_View('/asset/flash/map.swf','350','326');
	}catch(e){}
}
//´øÅ² µµ³ÊÃ÷ Á¦Ç°¼Ò°³ ÇÃ·¡½Ã
function Mbr_donuts(){
	try{
		//document.write("<img src='/asset/images/sample/sample_dd.gif' alt='ÇÃ·¡½Ã µé¾î°¡´Â °÷!~' />");
		Swf_View('/asset/flash/ddmenu/donuts.swf','660','1330');
	}catch(e){}
}
//´øÅ² Ä¿ÇÇ Á¦Ç°¼Ò°³ ÇÃ·¡½Ã
function Mbr_coffee(){
	try{
		//document.write("<img src='/asset/images/sample/sample_dd.gif' alt='ÇÃ·¡½Ã µé¾î°¡´Â °÷!~' />");
		Swf_View('/asset/flash/ddmenu/coffee.swf','660','800');
	}catch(e){}
}
//´øÅ² À½·á Á¦Ç°¼Ò°³ ÇÃ·¡½Ã
function Mbr_drink(){
	try{
		//document.write("<img src='/asset/images/sample/sample_dd.gif' alt='ÇÃ·¡½Ã µé¾î°¡´Â °÷!~' />");
		Swf_View('/asset/flash/ddmenu/drink.swf','660','755');
	}catch(e){}
}
//´øÅ² º£ÀÌÄ¿¸®·ù Á¦Ç°¼Ò°³ ÇÃ·¡½Ã
function Mbr_bakery(){
	try{
		//document.write("<img src='/asset/images/sample/sample_dd.gif' alt='ÇÃ·¡½Ã µé¾î°¡´Â °÷!~' />");
		Swf_View('/asset/flash/ddmenu/bakery.swf','660','950');
	}catch(e){}
}
//´øÅ² ¼¼Æ®±âÅ¸»óÇ° Á¦Ç°¼Ò°³ ÇÃ·¡½Ã
function Mbr_etc(){
	try{
		//document.write("<img src='/asset/images/sample/sample_dd.gif' alt='ÇÃ·¡½Ã µé¾î°¡´Â °÷!~' />");
		Swf_View('/asset/flash/ddmenu/etc.swf','660','479');
	}catch(e){}
}

//Ä¿ÇÇ¼Ò°³
function report_info(){
	try{
		Swf_View('/asset/flash/introCoffee.swf','640','452');
	}catch(e){}
}

// RollOver 
function ImageOver(imgEL){
	imgEL.src = imgEL.src.replace(".gif", "_.gif");
	//imgEL.style.marginRight = "-2px";
	//imgEL.style.marginLeft = "-2px";
}
function ImageOut(imgEL){
	imgEL.src = imgEL.src.replace("_.gif", ".gif");
	//imgEL.style.marginRight = "0px";
	//imgEL.style.marginLeft = "0px";
}

/* PNG Img 
function setPNG24(obj) {
	obj.width=obj.height=1;
	obj.className=obj.className.replace(/\bPNG24\b/i,'');
	obj.style.filter =
	"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
	obj.src='';
	return '';
}
*/
function setPNG24(obj) { 
var request_os = window.navigator.userAgent; 
var os_array = request_os.split(";"); 
if(os_array[1] != " MSIE 7.0") { 
obj.width=obj.height=1; 
obj.className=obj.className.replace(/PNG24/i,''); 
obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"; 
obj.src=''; 
} 
return ''; 
}


// Quick Menu 
function initMoving(target, position, topLimit, btmLimit) {
	if (!target)
		return false;

	var obj = target;
	obj.initTop = position;
	obj.topLimit = topLimit;
	obj.bottomLimit = document.documentElement.scrollHeight - btmLimit;

	obj.style.position = "absolute";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;

	if (typeof(window.pageYOffset) == "number") {
		obj.getTop = function() {
			return window.pageYOffset;
		}
	} else if (typeof(document.documentElement.scrollTop) == "number") {
		obj.getTop = function() {
			return document.documentElement.scrollTop;
		}
	} else {
		obj.getTop = function() {
			return 0;
		}
	}

	if (self.innerHeight) {
		obj.getHeight = function() {
			return self.innerHeight;
		}
	} else if(document.documentElement.clientHeight) {
		obj.getHeight = function() {
			return document.documentElement.clientHeight;
		}
	} else {
		obj.getHeight = function() {
			return 500;
		}
	}

//ÀÌº¥Æ® ±â°£µ¿¾È Äü¸Þ´º ÀÌµ¿±ÝÁö½ÃÅ´ 
	obj.move = setInterval(function() {
		if (obj.initTop > 0) {
			pos = obj.getTop() + obj.initTop;
		} else {
			pos = obj.getTop() + obj.getHeight() + obj.initTop;
			//pos = obj.getTop() + obj.getHeight() / 2 - 15;
		}

		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit;
		if (pos < obj.topLimit)
			pos = obj.topLimit;

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;
		obj.style.top = obj.top + "px";
	}, 30)


}

//±¸±Û¿ë ÃßÀûÄÚµå
/*
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
try {
var pageTracker = _gat._getTracker("UA-7620831-1");
pageTracker._trackPageview();
} catch(err) {}

*/



// ÆË¾÷Ã¢ ¿ÀÇÂ
function PopUp(sc) {
	var popurl = false;
	var popnm = false;
	var pwidth = false;
	var pheight = false;
	// sc°ª¿¡ µû¸¥ url ¹× Å©±âÁ¤º¸ ´ëÀÔ
	switch (sc) {
		case "promPop" : popurl = "/company/pop_promotion_d.html"; popnm = "Promotion_pop"; pwidth = "495"; pheight = "760"; break;	//ÇÁ·Î¸ð¼Ç¿ë ÆË¾÷ »ùÇÃ
		case "campPop" : popurl = "/company/pop_campaign_d.html"; popnm = "Promotion_pop"; pwidth = "495"; pheight = "625"; break;	//ÇÁ·Î¸ð¼Ç¿ë ÆË¾÷ »ùÇÃ
		case "emailtrPop" : popurl = "/etc/pop_emailtr.html"; popnm = "Promotion_pop"; pwidth = "500"; pheight = "305"; break;	//ÇÁ·Î¸ð¼Ç¿ë ÆË¾÷ »ùÇÃ
		
		case "2006Contest_1" : popurl = "/company/c2006-1.html"; popnm = "contest_pop1"; pwidth = "500"; pheight = "402"; break;	//ÄÜÅ×½ºÆ®2006 1
		case "2006Contest_2" : popurl = "/company/c2006-2.html"; popnm = "contest_pop2"; pwidth = "500"; pheight = "402"; break;	//ÄÜÅ×½ºÆ®2006 2
		case "2006Contest_3" : popurl = "/company/c2006-3.html"; popnm = "contest_pop3"; pwidth = "500"; pheight = "402"; break;	//ÄÜÅ×½ºÆ®2006 3
		case "2006Contest_4" : popurl = "/company/c2006-4.html"; popnm = "contest_pop4"; pwidth = "500"; pheight = "402"; break;	//ÄÜÅ×½ºÆ®2006 4
		
		case "2007Contest_1" : popurl = "/company/c2007-1.html"; popnm = "contest_pop5"; pwidth = "500"; pheight = "402"; break;	//ÄÜÅ×½ºÆ®2007 1
		case "2007Contest_2" : popurl = "/company/c2007-2.html"; popnm = "contest_pop6"; pwidth = "500"; pheight = "402"; break;	//ÄÜÅ×½ºÆ®2007 2
		case "2007Contest_3" : popurl = "/company/c2007-3.html"; popnm = "contest_pop7"; pwidth = "500"; pheight = "402"; break;	//ÄÜÅ×½ºÆ®2007 3
		case "2007Contest_4" : popurl = "/company/c2007-4.html"; popnm = "contest_pop8"; pwidth = "500"; pheight = "402"; break;	//ÄÜÅ×½ºÆ®2007 4
		case "2007Contest_5" : popurl = "/company/c2007-5.html"; popnm = "contest_pop9"; pwidth = "500"; pheight = "402"; break;	//ÄÜÅ×½ºÆ®2007 5
		case "2007Contest_6" : popurl = "/company/c2007-6.html"; popnm = "contest_pop10"; pwidth = "500"; pheight = "402"; break;	//ÄÜÅ×½ºÆ®2007 6
		case "2007Contest_7" : popurl = "/company/c2007-7.html"; popnm = "contest_pop11"; pwidth = "500"; pheight = "402"; break;	//ÄÜÅ×½ºÆ®2007 7
		case "2007Contest_8" : popurl = "/company/c2007-8.html"; popnm = "contest_pop12"; pwidth = "500"; pheight = "402"; break;	//ÄÜÅ×½ºÆ®2007 8
		case "2007Contest_9" : popurl = "/company/c2007-9.html"; popnm = "contest_pop13"; pwidth = "500"; pheight = "402"; break;	//ÄÜÅ×½ºÆ®2007 9

	}
	// ÆË¾÷Ã¢À» ¶Ù¿ì´Âµ¥ ÇÊ¿äÇÑ ¸ðµç ¿ä¼Ò°¡ ÀÖÀ» ½Ã ÆË¾÷Ã¢ ½ÇÇà
	if (popurl && popnm && pwidth && pheight) 
		{
			window.open(popurl, popnm, "width=" + pwidth + ", height=" + pheight + ",scrollbars=no,resizable=no,status=no");
		} 		
}


//Á¦Ç° »ó¼¼º¸±â ·¹ÀÌ¾î ÆË¾÷ ¿­±â(¾ÆÀÌÅÛ Å¬¸¯½Ã »ó¼¼ º¸±â ·¹ÀÌ¾î ÆË¾÷ º¸ÀÌ±â) 
function Item_VieeMode(bkid)
	{
		//alert("Á¦Ç° »ó¼¼º¸±â Ã¢ ·¹ÀÌ¾î ÆË¾÷ ¶ß±â"+s);
		if (bkid != '')
		{ 
		document.getElementById("ViewPopipProductItem").style.display ="block"	;
		document.getElementById("frm_item_vm").contentWindow.document.location.href = "/product/item_vm.html?bkid="+bkid  ;
		}

	}



//Á¦Ç° »ó¼¼º¸±â ·¹ÀÌ¾î ÆË¾÷ ´Ý±â(¾ÆÀÌÅÛ Å¬¸¯½Ã »ó¼¼ º¸±â ·¹ÀÌ¾î ÆË¾÷ ´Ý±â ¹öÆ°)
function ClosePopProductItem()
	{		
		document.getElementById("ViewPopipProductItem").style.display ="none";
		parent.document.getElementById("frm_item_vm").contentWindow.document.location.href="about:blank"; 
	}
//Á¦Ç° »ó¼¼º¸±â ·¹ÀÌ¾î ÆË¾÷ _ ³»ºÎ ÅÇ ÀÌº¥Æ®
function ViewInfoTab(idx)
	{
		if(idx == '1')
			{
				document.getElementById("Rvs1").style.display ="block";
				document.getElementById("Rvs2").style.display ="none";
				document.getElementById("tab_m1").src = "/images/product/tabr01_.gif";
				document.getElementById("tab_m2").src = "/images/product/tabr02.gif";
			}
		if(idx == '2')
			{
				document.getElementById("Rvs1").style.display ="none";
				document.getElementById("Rvs2").style.display ="block";
				document.getElementById("tab_m1").src = "/images/product/tabr01.gif";
				document.getElementById("tab_m2").src = "/images/product/tabr02_.gif";
			}
	}
	
//DD¹Ì¼Ç Á¦Ç° »ó¼¼º¸±â ´Ý±â ¹öÆ°
function ClosePopDDmission()
	{
		document.getElementById("DDMission_View").style.display ="none";
	}
 
//DD¹Ì¼Ç Á¦Ç° »ó¼¼º¸±â ·¹ÀÌ¾î ÆË¾÷ ¶ß±â
function Item_ViewDDmission(idx)
	{
		if (idx != '')
		{
		document.getElementById("DDMission_View").style.display ="block"	;
		document.getElementById("frm_item_vm").contentWindow.document.location.href = "/event/mission_pop.html?idx="+idx  ;
	//	document.frames.frm_item_vm.location="/event/mission_pop.html?idx="+idx  ;
		}
 
	}



//ÀÌ´ÞÀÇ ½ÅÁ¦Ç° > Á¦Ç°»ó¼¼ º¸ÀÌ±â
function Viewitemv(idx_n)
	{
		document.getElementById("vMini_Info_"+idx_n).style.display ="block";
		//document.getElementById("item"+idx_n).style.zIndex = 30;
		document.getElementById("item"+idx_n).style.backgroundImage = 'url(/asset/images/common/sitembg_on.gif)';
	}

//ÀÌ´ÞÀÇ ½ÅÁ¦Ç° > Á¦Ç°»ó¼¼ ¼û±â±â
function Hideitemv(idx_m)
	{
		document.getElementById("vMini_Info_"+idx_m).style.display ="none";
		//document.getElementById("item"+idx_m).style.zIndex = -1;
		document.getElementById("item"+idx_m).style.backgroundImage = 'url(/asset/images/common/sitembg_off.gif)';
	}
//°í°´»ç¶û¼¾ÅÍ FAQ Å×ÀÌºí Á¢Çô´Ù ÆîÃÄÁö´Â ½ºÅ©¸³Æ®
function View_tbr(idx_cnt) 
{
	var i = 0;
	var Faq_ListMax = 15; //¸®½ºÆ® ÃÖ´ë°ª
	for(i = 1; i<=Faq_ListMax; i++) 
		{
			obj = document.getElementById('Tbr_'+i); //¿ÀºêÁ§Æ® ¼±¾ð
				
				if (idx_cnt == i) 
					{
						if(obj.style.display == "block")
					 		{ obj.style.display = "none"; }
						else { obj.style.display = "block"; }
					} 
				else 
					{ try{obj.style.display = "none"; }catch(e){}}
		}
}


//My Love DD Á¦Ç° ·¹ÀÌ¾î º¸ÀÌ±â 
function ViewMyLdd(bkid, ddseq)
	{
		if (bkid != '')
		{  
		document.getElementById("MyddView_ret").style.display ="block"	;
		document.getElementById("frm_item_vm").contentWindow.document.location.href="/mypage/mylovedd_item.php?bkid="+bkid+"&mydd_seq="+ddseq  ;
		}
 
	}

//My Love DD Á¦Ç° ·¹ÀÌ¾î ´Ý±â
function CloseMyLoveDDView()
	{
		document.getElementById("MyddView_ret").style.display ="none";
		document.getElementById("frm_item_vm").contentWindow.document.location.href="/mypage/mylovedd_item.php?bkid=";
	}

//My Love DD ¸¶¿ì½º ¿Â ÆÁ º¸ÀÌ±â
function OnItemMyDD(anx)
	{
		if(anx == '4' || anx == '7' || anx == '14' || anx == '21' )
			{
				document.getElementById("myd_"+anx).style.backgroundImage = 'url(/asset/images/common/bg_myb2.gif)';
				document.getElementById("dda"+anx).style.zIndex = 30;
				document.getElementById("vMini_Info"+anx).style.display ="block";
			}
		else 
			{
				document.getElementById("myd_"+anx).style.backgroundImage = 'url(/asset/images/common/bt_mys2.gif)';
				document.getElementById("dda"+anx).style.zIndex = 30;
				document.getElementById("vMini_Info"+anx).style.display ="block";
			}
	}

//My Love DD ¸¶¿ì½º ¾Æ¿ô ÆÁ »ç¶óÁö±â
function OutOtemMyDD(bnx)
	{
		if(bnx == '4' || bnx == '7' || bnx == '14' || bnx == '21' )
			{
				document.getElementById("myd_"+bnx).style.backgroundImage = 'url(/asset/images/common/bg_myb.gif)';
				document.getElementById("dda"+bnx).style.zIndex = 1;
				document.getElementById("vMini_Info"+bnx).style.display ="none";
			}
		else 
			{
				document.getElementById("myd_"+bnx).style.backgroundImage ='url(/asset/images/common/bt_mys.gif)';
				document.getElementById("dda"+bnx).style.zIndex = 1;
				document.getElementById("vMini_Info"+bnx).style.display ="none";
			}
	}

//°³¼³°ü·Ã FAQ º¸ÀÌ±â
function ViewShopFAQ(aue)
	{	
		var w = 0;
		var Faq_ListMax2 = 12; //¸®½ºÆ® ÃÖ´ë°ª
		for(w = 1; w<=Faq_ListMax2; w++) 
			{
				obj = document.getElementById('Faq_'+w); //¿ÀºêÁ§Æ® ¼±¾ð
					
					if (aue == w) 
						{
							if(obj.style.display == "block")
								{ obj.style.display = "none"; }
							else { obj.style.display = "block"; }
						} 
					else 
						{ obj.style.display = "none"; }
			}
	}
//°³¼³°ü·Ã FAQ º¸ÀÌ±â
function ViewLoanFAQ(kue)
	{	
		var w = 0;
		var Faq_ListMax3 = 9; //¸®½ºÆ® ÃÖ´ë°ª
		for(w = 1; w<=Faq_ListMax3; w++) 
			{
				obj = document.getElementById('Faq_'+w); //¿ÀºêÁ§Æ® ¼±¾ð
					
					if (kue == w) 
						{
							if(obj.style.display == "block")
								{ obj.style.display = "none"; }
							else { obj.style.display = "block"; }
						} 
					else 
						{ obj.style.display = "none"; }
			}
	}

//tv cf ÇÃ·¡½Ã (ÇÃ·¡½ÃURL, ÀÌ¹ÌÁö URL1, ÀÌ¹ÌÁö URL2, ÀÌ¹ÌÁö URL3)
function tv_cf(flvURL,picURL1,picURL2,picURL3){
	try{
		//document.write("<img src='/asset/images/sample/sample_dd.gif' alt='' />");

		//alert('/asset/flash/tv_cf.swf?flvURL='+flvURL+'&picURL1='+picURL1+'&picURL2='+picURL2+'&pricURL3='+picURL3);
		Swf_View('/asset/flash/tv_cf.swf?flvURL='+flvURL+'&picURL1='+picURL1+'&picURL2='+picURL2+'&picURL3='+picURL3,'617','270');
	}catch(e){}
}

//¸ÞÀÎ ÇÃ·¡½Ã
function CMnav(){
	try{
		//document.write("<img src='/asset/images/sample/maincenter1.jpg' alt='Áß¾ÓÇÃ·¡½Ã À§Ä¡' />");
		Swf_View('/asset/flash/main.swf','925','480');
	}catch(e){}
}

//¸ÞÀÎ_SUMMER
function Summer(){
	try{
		Swf_View('/asset/flash/summer01.swf','100%','100%');
	}catch(e){}
}


//radio cf ÇÃ·¡½Ã
function radio_cf(sndURL){
	try{
	//	alert(sndURL);
		//document.write("<img src='/asset/images/sample/maincenter1.jpg' alt='Áß¾ÓÇÃ·¡½Ã À§Ä¡' />");
		Swf_View('/asset/flash/radio_cf.swf?sndURL='+sndURL,'184','140');
	}catch(e){}
}


//family site ÇÃ·¡½Ã
function familySite(){
	try{
		//document.write("<img src='/asset/images/sample/maincenter1.jpg' alt='Áß¾ÓÇÃ·¡½Ã À§Ä¡' />");
		Swf_View('/asset/flash/footer.swf','104','178');
	}catch(e){}
}

/* ¸ÞÀÎÆäÀÌÁö Å¾¸Þ´ºÇÃ·¡½Ã */
/* 3µª½º±îÁö¸¸ ³Ö¾ú½À´Ï´Ù. 4µª½º´Â Ãß°¡ÇÏ½Ã¸é µË´Ï´Ù. */
function MainNav(){
	try{
		Depth = arguments.length;
		var DepthName = new Array("depth1","depth2","depth3");

		//0°ªÀ» °ø¹éÃ³¸®, ¾ÕÀÇ ³ëµå¸¦ »èÁ¦ ¼ø¼­ °Å²Ù·Î ÇØ¾ß ¸ÔÈû..¤Ð_¤Ð
		if(arguments[2] == 0) Depth = arguments.length-1;
		if(arguments[1] == 0) Depth = arguments.length-2;

		for(i=0;i<Depth;i++)
			{
				if(i==0) depth1 =  arguments[i];
				if(i==1) depth2 =  arguments[i];
				if(i==2) depth3 =  arguments[i];
				
				
				globalId = (i==0) ? arguments[i] : globalId+"_"+arguments[i] ;
				flaFarm = (i==0) ?  DepthName[i]+"="+arguments[i] : flaFarm+"&"+DepthName[i]+"="+arguments[i] ;
			}
		//alert("ÃÑ ³ëµå°ª ="+Depth);
		//swfobject.embedSWF('/krs/images/swf/gnb_mc.swf?xmlURL=/krs/inc/js/gnbMenu.xml&'+flaFarm,'swf_mnav','170','520', "9.0.0", false, false, {wmode:"transparent", bgcolor:"#FFFFFF", allowScriptAccess:"always"});
		//swfobject.embedSWF('/asset/flash/gnb.swf&'+flaFarm,'swf_mnav','80','690', "9.0.0", false, false, {wmode:"transparent", bgcolor:"#FFFFFF", allowScriptAccess:"always"});
		
		Swf_View('/asset/flash/gnb_main_2.swf?'+flaFarm,'690','80');	//¼³¹®Á¶»ç°¡ ¾ø´Â°æ¿ì
		//Swf_View('/asset/flash/gnb_main.swf?'+flaFarm,'690','80');
		// 1 = DD¸Þ´º
		// 2 = DDÀÌº¥Æ®
		// 3 = DD¸ÅÀå
		// 4 = DD¼Ò°³
		// 5 = Á¡Æ÷°³¼³¾È³»
		// 6 = ¸¶ÀÌDD
		// 7 = °í°´¼¾ÅÍ
		// 8 = ¼­Æ÷ÅÍÁî
		// 9 = ·Î±×ÀÎ
		// 10 = ÀÌ¿ë¾à°ü
		// 11 = °³ÀÎÁ¤º¸º¸È£Á¤Ã¥
		// 12 = »çÀÌÆ®¸Ê
		// 13 = Search

		//ÇÃ·¡½Ã ¾ò±â Àü±îÁöÀÇ ÀÓ½Ã¼Ò½º
		//if(depth1 == 1)	{ document.write("<img src='/asset/images/sample/top1.jpg' alt='Top¸Þ´º ÇÃ·¡½Ã1' />"); }
		//else if(depth1 == 2)	{ document.write("<img src='/asset/images/sample/top2.jpg' alt='Top¸Þ´º2' />"); }
		//else if(depth1 == 3)	{ document.write("<img src='/asset/images/sample/top3.jpg' alt='Top¸Þ´º3' />"); }
		//else if(depth1 == 4)	{ document.write("<img src='/asset/images/sample/top4.jpg' alt='Top¸Þ´º4' />"); }
		//else if(depth1 == 5)	{ document.write("<img src='/asset/images/sample/top5.jpg' alt='Top¸Þ´º5' />"); }
	}catch(e){}
}


// 090302 ÀÍ½º6 png ³ª¿À±â
var clear="/asset/images/common/clear.gif" //path to clear.gif

pngfix=function(){var els=document.getElementsByTagName('*');var ip=/\.png/i;var i=els.length;while(i-- >0){var el=els[i];var es=el.style;if(el.src&&el.src.match(ip)&&!es.filter){es.height=el.height;es.width=el.width;es.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+el.src+"',sizingMethod='crop')";el.src=clear;}else{var elb=el.currentStyle.backgroundImage;if(elb.match(ip)){var path=elb.split('"');var rep=(el.currentStyle.backgroundRepeat=='no-repeat')?'crop':'scale';es.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+path[1]+"',sizingMethod='"+rep+"')";es.height=el.clientHeight+'px';es.backgroundImage='none';var elkids=el.getElementsByTagName('*');if (elkids){var j=elkids.length;if(el.currentStyle.position!="absolute")es.position='static';while (j-- >0)if(!elkids[j].style.position)elkids[j].style.position="relative";}}}}}
window.attachEvent('onload',pngfix);



//UCC ÀÌº¥Æ® 
//function open_event_ucc(){
//	window.open("/event/090305_2/song_main.html", "open_event", "width=850 , height=650,scrollbars=no,resizable=no,status=no");
//}
//Ä¿ÇÇºó ÀÌº¥Æ® 
function open_event(){
	window.open("/event/090413/roasting_event01.html", "open_event", "width=900 , height=710,scrollbars=no,resizable=no,status=no");
}

