
function Img(n,tog){eval("document.m"+n+".src=m"+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 home(){location.href="/index.asp";} //
function login(){location.href="/my/login.asp";} //·Î±×ÀÎ


function object_links(w, h, url) {

	str = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+w+"' height='"+h+"'>"
	str = str + "<param name='movie' value='"+url+"'>"
	str = str + "<param name='wmode' value='transparent'>"
    str = str + "<param name='quality' value='high'>"
    str = str + "<embed src='"+url+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+w+"' height='"+h+"'></embed>"
	str = str + "</object>"

	document.write(str)
}
/*about*/
u1="/about/concept.asp";
u11="/about/concept.asp";
u111="/about/concept.asp";
u112="/about/logo.asp";
u113="/about/history.asp";

u12="/about/sesa.asp";
u13="/about/store.asp";
u14="/about/franchise.asp";

u2="/shop/shop.asp";
u21="/shop/shop_list.asp?cid=1&depth=1&cat_upper=440&cate1=440";
u22="/shop/shop_list.asp?cid=2&depth=1&cat_upper=439&cate1=439";
u23="/shop/shop_list.asp?cid=3&depth=1&cat_upper=441&cate1=441";
u24="/shop/shop_list.asp?cid=4&depth=1&cat_upper=442&cate1=442";
u25="/shop/shop_list.asp?cid=5&depth=1&cat_upper=443&cate1=443";
u26="/shop/shop_list.asp?cid=6&depth=1&cat_upper=444&cate1=444";

u3="/news/event.asp";
u31="/news/news.asp";
u32="/news/event.asp";
u33="/news/trend.asp";

u4="/cafe/board.asp";
u41="/supporters/template_main.asp";
u42="/cafe/estimate_list.asp";
u43="/cafe/board.asp";
u44="/cafe/photo_list.asp";
u45="/cafe/store.asp";

u5="/my/join.asp"; //È¸¿ø°¡ÀÔ
u6="/my/myinfo.asp"; //¸¶ÀÌ¼¼»ç
u61="/my/join_edit.asp";
u62="/my/shopcart.asp";
u63="/my/order.asp";
u64="/my/wishlist.asp";
u65="/my/coupon.asp";
u66="/my/cus_center.asp";
u7="/customer/customer.asp"; //°í°´¼¾ÅÍ

u81="/copyright/company.asp";
u82="/copyright/privacy.asp";
u83="/copyright/email.asp";
u84="/copyright/rule.asp";
u85="/copyright/sitemap.asp";
u86="/copyright/contact.asp";

function link(){ //link(1,2)
	var url = "";
	var depth = arguments.length;
	try {
		if(depth==0) return;

/*
if (arguments[0]=="5" && arguments[1] =="5") {
			window.open('/cyberpr/mania/living/living.jsp','living','width=765,height=570,scrollbars=no');
			return;
		}
*/

		else if(depth==1) url = eval("u"+ arguments[0]);
		else if(depth==2) url = eval("u"+ arguments[0]+arguments[1]);
		else if(depth==3) url = eval("u"+ arguments[0]+arguments[1]+arguments[2]);
		else if(depth==4) url = eval("u"+ arguments[0]+arguments[1]+arguments[2]+arguments[3]);


		if(url=="") alert("ÁØºñÁßÀÔ´Ï´Ù.");
		else location.href = url;

	}catch(e) { alert("ÁØºñÁßÀÔ´Ï´Ù."); }
}




//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);
}


function blur() {//ÀüÃ¼ ¸µÅ© Blur
for (i = 0; i < document.links.length; i++)
if(document.links[i].name!="focus")
document.links[i].onfocus = document.links[i].blur;
}
window.onload=blur;


// shop¸Þ´º
function submenu_show(str1){
	for(i=1 ;i<7 ;i++){
		if (i==str1)
		{
				eval("document.all['menu"+i+"'].style.display = 'block'");
		}
		else
		{
				eval("document.all['menu"+i+"'].style.display = 'none'");
		 }
	 }
}
function submenu_hide(str1){
	for(i=1 ;i<7 ;i++){
		if (i==str1)
		{
				eval("document.all['menu"+i+"'].style.display = 'none'");
		}
		else
		{
				eval("document.all['menu"+i+"'].style.display = 'none'");
		}
	}
}

// shop¸ÞÀÎ
function go_tab(disp_tab, block_tab) {
	disp_tab.style.display = "block";
	block_tab.style.display = "none";
}

