title = "Dev µð¾ÆÁö¿ÀÄÚ¸®¾Æ";	//ÆäÀÌÁö Å¸ÀÌÆ²
str_ssl = "http://cooldrinker.org";
function mTop(cn,hn){	// cn : 1depthº¯¼ö(Ã¤³Îº¯¼ö) , hn : 2depthº¯¼ö

	// ÄíÅ°¿¡¼­ ·Î±×ÀÎÀ» È®ÀÎÇÑ´Ù.
	var SYSID = getCookieJs("name");

	if (SYSID == "-1") {
		//alert("·Î±×ÀÎ Ç¥½ÃÇÏ±â");
		loginck = 0;

	} else {
		//alert("·Î±×¾Æ¿ô Ç¥½ÃÇÏ±â");
		loginck = 1;
	}

	if(cn>=7) { sin=6;  }
	else	  { sin=cn; }

	document.write("\
	<div style='position:absolute;left:0;top:0;'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='862' height='84'>\
	  <param name='movie' value='/inc/fla/gnb.swf?loginck="+loginck+"&cn="+sin+"&hn="+hn+"''>\
	  <param name='quality' value='high'>\
		  <param name='menu' value='false'>\
	  <param name='wmode' value='transform'>\
	  <embed src='/inc/fla/gnb.swf?loginck="+loginck+"&cn="+sin+"&hn="+hn+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='862' height='84'></embed>\
	</object></div>\
	<div style='width:862;height:75'></div>\
	");
}
function mTop_ssl(cn,hn){	// cn : 1depthº¯¼ö(Ã¤³Îº¯¼ö) , hn : 2depthº¯¼ö

	// ÄíÅ°¿¡¼­ ·Î±×ÀÎÀ» È®ÀÎÇÑ´Ù.
	var SYSID = getCookieJs("name");

	if (SYSID == "-1") {
		//alert("·Î±×ÀÎ Ç¥½ÃÇÏ±â");
		loginck = 0;

	} else {
		//alert("·Î±×¾Æ¿ô Ç¥½ÃÇÏ±â");
		loginck = 1;
	}

	if(cn>=7) { sin=6;  }
	else	  { sin=cn; }

	document.write("\
	<div style='position:absolute;left:0;top:0;'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='862' height='84'>\
	  <param name='movie' value='"+str_ssl+"/inc/fla/gnb.swf?loginck="+loginck+"&cn="+sin+"&hn="+hn+"''>\
	  <param name='quality' value='high'>\
		  <param name='menu' value='false'>\
	  <param name='wmode' value='transform'>\
	  <embed src='"+str_ssl+"/inc/fla/gnb.swf?loginck="+loginck+"&cn="+sin+"&hn="+hn+"' quality='high' pluginspage='https://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='862' height='84'></embed>\
	</object></div>\
	<div style='width:862;height:75'></div>\
	");
}
 function getCookieJs( cookieName ){
	var search = cookieName + "=";
	var cookie = document.cookie;

	// ÇöÀç ÄíÅ°°¡ Á¸ÀçÇÒ °æ¿ì
	if( cookie.length > 0 ){
	// ÇØ´ç ÄíÅ°¸íÀÌ Á¸ÀçÇÏ´ÂÁö °Ë»öÇÑ ÈÄ Á¸ÀçÇÏ¸é À§Ä¡¸¦ ¸®ÅÏ.
	startIndex = cookie.indexOf( cookieName );

	// ¸¸¾à Á¸ÀçÇÑ´Ù¸é
	if( startIndex != -1 ){
		// °ªÀ» ¾ò¾î³»±â À§ÇØ ½ÃÀÛ ÀÎµ¦½º Á¶Àý
		startIndex += cookieName.length;

		// °ªÀ» ¾ò¾î³»±â À§ÇØ Á¾·á ÀÎµ¦½º ÃßÃâ
		endIndex = cookie.indexOf( ";", startIndex );

		// ¸¸¾à Á¾·á ÀÎµ¦½º¸¦ ¸øÃ£°Ô µÇ¸é ÄíÅ° ÀüÃ¼±æÀÌ·Î ¼³Á¤
		if( endIndex == -1) endIndex = cookie.length;

		// ÄíÅ°°ªÀ» ÃßÃâÇÏ¿© ¸®ÅÏ
	return unescape( cookie.substring( startIndex + 1, endIndex ) );
	}else{
		// ÄíÅ° ³»¿¡ ÇØ´ç ÄíÅ°°¡ Á¸ÀçÇÏÁö ¾ÊÀ» °æ¿ì
		return "-1";
	}
	}else{
	// ÄíÅ° ÀÚÃ¼°¡ ¾øÀ» °æ¿ì
	return "-1";
	}
 }

function mCopy(){
document.write("\
<div style='margin:44 0 20 28'><img src='/img/common/copyright02.gif' usemap='#mCopy'></div>\
<map name='mCopy'>\
  <area shape='rect' coords='0,0,37,15' href='javascript:link(6)' onfocus='blur()'>\
  <area shape='rect' coords='42,0,83,15' href='http://www.diageo.co.kr/html/company/intro/branch.asp' onfocus='blur()'>\
  <area shape='rect' coords='88,0,129,15' href='javascript:agree()' onfocus='blur()'>\
  <area shape='rect' coords='130,0,208,15' href='javascript:privacy()' onfocus='blur()'>\
  <area shape='rect' coords='212,0,250,15' href='http://www.cooldrinker.co.kr/' onfocus='blur()' target='_blank'>\
  <area shape='rect' coords='260,0,331,10' href='http://www.knowyourdiageodrink.com' onfocus='blur()' target='_blank'>\
</map>\
");
}


function sNav(cn,hn,sn){
	if(cn>=7) { sin=6;  }
	else		   { sin=cn; }
	document.write("\
	<table width='268' border='0' cellpadding='0' cellspacing='0'>\
	<tr><td width='160'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='160' height='500'>\
	  <param name='movie' value='/inc/fla/snav"+cn+".swf?hn="+hn+"&sn="+sn+"'>\
	  <param name='quality' value='high'>\
		<param name='menu' value='false'>\
		<param name='wmode' value='Transparent'>\
		<param name='scale' value='noscale'>\
		<param name='salign' value='t'>\
	  <embed src='/inc/fla/snav"+cn+".swf?hn="+hn+"&sn="+sn+"' salign='t' wmode='Transparent' scale='noscale' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='160' height='500'></embed>\
	</object></td>\
	<td width='108'><img src='/inc/fla/simg"+sin+".gif' width='108' height='500'></td></tr>\
	</table>\
	");
}
function sNav_ssl(cn,hn,sn){
	if(cn>=7) { sin=6;  }
	else		   { sin=cn; }
	document.write("\
	<table width='268' border='0' cellpadding='0' cellspacing='0'>\
	<tr><td width='160'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='160' height='500'>\
	  <param name='movie' value='"+str_ssl+"/inc/fla/snav"+cn+".swf?hn="+hn+"&sn="+sn+"'>\
	  <param name='quality' value='high'>\
		<param name='menu' value='false'>\
		<param name='wmode' value='Transparent'>\
		<param name='scale' value='noscale'>\
		<param name='salign' value='t'>\
	  <embed src='"+str_ssl+"/inc/fla/snav"+cn+".swf?hn="+hn+"&sn="+sn+"' salign='t' wmode='Transparent' scale='noscale' quality='high' pluginspage='https://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='160' height='500'></embed>\
	</object></td>\
	<td width='108'><img src='"+str_ssl+"/inc/fla/simg"+sin+".gif' width='108' height='500'></td></tr>\
	</table>\
	");
}

function sNav2(cn,hn,sn){
document.write("\
<div style='width:160'>\
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='160' height='513'>\
  <param name='movie' value='/inc/fla/snav"+cn+".swf?hn="+hn+"&sn="+sn+"'>\
  <param name='quality' value='high'>\
	<param name='menu' value='false'>\
	<param name='scale' value='noscale'>\
  <embed src='/inc/fla/snav"+cn+".swf?hn="+hn+"&sn="+sn+"' quality='high' scale='noscale' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='160' height='513'></embed>\
</object>\
</div>\
");
}

function Quick(){
document.write("\
<div style='position:absolute;left:880;top:89'><img src='/img/common/quick_02.gif' usemap='#MQuick'></div>\
<map name='MQuick'>\
  <area shape='rect' coords='5,20,79,86' href='javascript:BestCollection()' onfocus='blur()'>\
  <area shape='rect' coords='8,103,76,162' href='javascript:ShowRoom()' onfocus='blur()'>\
  <area shape='rect' coords='8,181,76,240' href=javascript:pop('/inc/fla/cy_cocktail_new/index.html','Cyberbar',700,432) onfocus='blur()'>\
  <area shape='rect' coords='8,258,76,317' href='javascript:link(6,5,4)' onfocus='blur()'>\
  <area shape='rect' coords='10,337,75,393' href='javascript:Windsor()' onfocus='blur()'>\
</map>\
");
}

function Img(n,tog){eval("document.m"+n+".src=m"+n+"_"+tog+".src"); } //ÀÌ¹ÌÁö ·Ñ¿À¹ö
function sImg(n,tog){eval("document.ms"+n+".src=ms"+n+"_"+tog+".src"); } //¼­ºê ÀÌ¹ÌÁö ·Ñ¿À¹ö
function pop(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=no') } //Popup(½ºÅ©·Ñ¹Ù¾øÀ½)
function pops(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=yes') } //Popup(½ºÅ©·Ñ¹ÙÀÖÀ½)
function popc(url,name,w,h,sb)
{
	var position ="width="+w+",height="+h+",left=" + ((screen.width-w)/2) + ",top=" + ((screen.height-h)/2) + ",toolbar=0,directories=0,status=0,menubar=0,scrollbars="+sb+",resizable=0";
	window.open( url,name,position);
}

//Select Box
function setSelectBox(selName){
	sel = eval("document.all."+selName);

	borderColor = sel.bordercolor;
	selWidth = parseInt(sel.width);
	bgColor = sel.bgcolor;
	rectLeft = selWidth-2;
	spanWidth = selWidth;

	//span tag
	header  = "<span style='position:relative;margin-right:0px;";
	header += "width:"+spanWidth+";height:18px;border:1px solid "+borderColor+";background-color:"+bgColor+";'>\n";
	header += "<span style='position: absolute;left:0px;top:-2px;";
	header += "width:"+selWidth+";height:17px;clip:rect(2,"+rectLeft+",18,2);'>\n";
	footer = "</span></span>";

	sel.style.backgroundColor = bgColor;
	sel.style.width = selWidth;

	sel.outerHTML = header+sel.outerHTML+footer;
}


/*¶ó¿îµåÅ×ÀÌºí*/
function roundTable(objID) {
       var obj = document.getElementById(objID);
       var Parent, objTmp, Table, TBody, TR, TD;
       var bdcolor, bgcolor, Space;
       var trIDX, tdIDX, MAX;
       var styleWidth, styleHeight;

       // get parent node
       Parent = obj.parentNode;
       objTmp = document.createElement('SPAN');
       Parent.insertBefore(objTmp, obj);
       Parent.removeChild(obj);

       // get attribute
       bdcolor = obj.getAttribute('rborder');
       bgcolor = obj.getAttribute('rbgcolor');
       radius = parseInt(obj.getAttribute('radius'));
       if (radius == null || radius < 1) radius = 1;
       else if (radius > 6) radius = 6;

       MAX = radius * 2 + 1;

       /*
              create table {{
       */
       Table = document.createElement('TABLE');
       TBody = document.createElement('TBODY');

       Table.cellSpacing = 0;
       Table.cellPadding = 0;

       for (trIDX=0; trIDX < MAX; trIDX++) {
              TR = document.createElement('TR');
              Space = Math.abs(trIDX - parseInt(radius));
              for (tdIDX=0; tdIDX < MAX; tdIDX++) {
                     TD = document.createElement('TD');

                     styleWidth = '1px'; styleHeight = '1px';
                     if (tdIDX == 0 || tdIDX == MAX - 1) styleHeight = null;
                     else if (trIDX == 0 || trIDX == MAX - 1) styleWidth = null;
                     else if (radius > 2) {
                            if (Math.abs(tdIDX - radius) == 1) styleWidth = '2px';
                            if (Math.abs(trIDX - radius) == 1) styleHeight = '2px';
                     }

                     if (styleWidth != null) TD.style.width = styleWidth;
                     if (styleHeight != null) TD.style.height = styleHeight;

                     if (Space == tdIDX || Space == MAX - tdIDX - 1) TD.style.backgroundColor = bdcolor;
                     else if (tdIDX > Space && Space < MAX - tdIDX - 1)  TD.style.backgroundColor = bgcolor;

                     if (Space == 0 && tdIDX == radius) TD.appendChild(obj);
                     TR.appendChild(TD);
              }
              TBody.appendChild(TR);
       }

       /*
              }}
       */

       Table.appendChild(TBody);

       // insert table and remove original table
       Parent.insertBefore(Table, objTmp);
}

/*ActiveX ÇÃ·¡½¬*/
// id: flash id
// url: source url
// w: source width
// h: source height
// t: wmode (none/transparent/opaque)
function Flash(id,url,w,h,bg,t){
document.write("\
<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width="+w+" height="+h+" id="+id+">\
<param name='movie' value="+url+" />\
<param name='wmode' value="+t+" />\
<param name='bgcolor' value="+bg+" />\
<param name='allowScriptAccess' value='sameDomain' />\
<param name='quality' value='high' />\
<param name='menu' value='false' />\
<embed src="+url+" width="+w+" height="+h+" name="+id+" bgcolor="+bg+" allowScriptAccess='sameDomain' quality='high' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />\
</object>\
");
}


//ºê·£µåÀÌ¾ß±â>½º¹Ì³ëÇÁ>±¤°íº¸±â:µ¿¿µ»ó
function Movie(src,w,h){
	html = '';
	//html += '<object id="video1" type="application/x-oleobject" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" CODEBASE="http://activex.microsoft.com/activex/controls/musa/en/nsmp2inf.cab#Version=5,1,52,701" width="'+w+'" height="'+h+'">';
	//html += '<param name="src" value="/html/brand/advertising/'+src+'.wmv">';
	//html += '<param name="autosize" value="false">';
	//html += '<param name="autostart" value="true">';
	//html += '<param name="nologo" value="true">';
	//html += '<param name="menu" value="false">';
	//html += '<param name="AllowChangeDisplaySize" value="true">';
	html += '<embed id="video1" src="/html/brand/advertising/'+src+'.wmv" autostart="true" autosize="false" type="application/x-oleobject" width="'+w+'" height="'+h+'" ><\/embed>';
	//html += '<\/object>';
	document.write(html);
}
