/* flash menu link
------------------------------------------------------------------------------------------------------*/
function goUrl(urlType)
{
	var urlPath;
	var linkType = 1;
	var isScroll = "no";
	//alert(urlType);
	switch(urlType)
	{
		case "t1" : urlPath = "/member/login.asp"; break;
		case "t11" : urlPath = "/member/logout.asp"; break;
		case "t2" : urlPath = "/mypage/mypage.asp?goUrl=/mypage/mypage.asp"; break;
		case "t3" : urlPath = "mailto:wlee3@kr.loreal.com;"; break;
		case "t4" : urlPath = "/common/sitemap.asp"; break;
		case "t5" : urlPath = "/member/memberModify.asp?goUrl=/member/memberModify.asp"; break;
		case "t6" : urlPath = "/mileage/mileage_info.asp"; break;
		
		case 1 : urlPath = "/skinInfo/skinInfoList.asp"; break; // ÇÇºÎ°Ç°­Á¤º¸
			case 11 : urlPath = "/skinInfo/skinInfoList.asp"; break;
			case 12 : urlPath = "/skinInfo/skinInfo_1_1.asp"; break;
			//case 13 : urlPath = "/normaderm/ac3.html"; linkType = 2; winName = "winNor"; winW = 570; winH = 570; break;
			case 13 : urlPath = "http://www.vichy.co.kr/mini_normaderm/index.asp";
				linkType = 2; winName = "miniSite"; winW = 980; winH = 600; break;
			case 14 : urlPath = "http://vichy.co.kr/mini_homme/intro.asp";linkType = 2; winName = "winvichy"; winW = 980; winH = 600;break;
		case 2 : urlPath = "/diagnosis/diagnosis.asp"; break; // ÇÇºÎÁø´Ü
			case 21 : urlPath = "/diagnosis/diagnosis.asp"; break;
			case 22 : urlPath = "javascript:alert(ÁØºñÁßÀÔ´Ï´Ù.)"; break;// ÇÇºÎÀü¹®¼º
			case 23 : urlPath = "/normaderm/ac3.asp"; linkType = 2; winName = "winNor"; winW = 570; winH = 570; break;
			case 24 : urlPath = "http://vichy.co.kr/mini_homme/intro.asp";linkType = 2; winName = "winvichy"; winW = 980; winH = 600;break;
		case 3 : urlPath = "/main.asp?prod=0"; break; // Á¦Ç° ¼Ò°³
			case 31 : urlPath = "/main.asp?prod=0"; break;
			case 32 : urlPath = "/main.asp?prod=1"; break;
			case 33 : urlPath = "/main.asp?prod=2"; break;
			case 34 : urlPath = "/product/productUseOrder.asp"; break;
			case 35 : urlPath = "/product/reviewList.asp"; break;
		<!--case 4 : urlPath = "#"; linkType = 2; winName = "winCap"; winW = 825; winH = 575; break; // ÇÇºÎÀü¹®¼º-->
		case 4 : urlPath = "javascript:alert(ÁØºñÁßÀÔ´Ï´Ù.)"; break; // ÇÇºÎÀü¹®¼º
			case 41 : urlPath = "http://www.vichy.co.kr/mini_normaderm/index.asp";
				linkType = 2; winName = "miniSite"; winW = 980; winH = 600; break;
			case 46 : urlPath = "http://www.vichy.co.kr/mini_aqualia2/intro.asp";linkType = 2; winName = "winvichy"; winW = 980; winH = 600;break;
			case 42 : urlPath = "https://www.vichy.co.kr:446/mini_biwhite_renew/index.asp";linkType = 2; winName = "winvichy"; winW = 980; winH = 650;break;
			
			case 43 : urlPath = "http://vichy.co.kr/mini_homme/intro.asp";linkType = 2; winName = "winvichy"; winW = 980; winH = 600;break;
			//case 44 : urlPath = "https://www.vichy.co.kr:446/mini_liftactiv/index.asp"; linkType = 2; winName = "winOl"; winW = 970; winH = 640; break;
			case 44 : urlPath = "https://www.vichy.co.kr:446/mini_liftactiv/index.asp"; linkType = 2; winName = "winOl"; winW = 970; winH = 640; break;
			case 45 : urlPath = "/cap/flash/solaire.asp"; linkType = 2; winName = "winCap"; winW = 825; winH = 575; break;
			
		case 5 : urlPath = "/media/media_Tv.asp"; break; // ¹Ìµð¾î
			case 51 : urlPath = "/media/media_Tv.asp"; break;
			case 52 : urlPath = "/media/media_News.asp"; break;
			case 53 : urlPath = "/media/media_News.asp"; break;
		case 6 : urlPath = "/laboratory/laboratory1.asp"; break; // ¿¬±¸¼Ò
			case 61 : urlPath = "/laboratory/laboratory1.asp"; break;
			case 62 : urlPath = "/laboratory/laboratory2.asp"; break;
			case 63 : urlPath = "/laboratory/laboratory3.asp"; break;
			case 64 : urlPath = "/laboratory/laboratory4.asp"; break;
		case 7 : urlPath = "/customer/customer.asp"; break; // °í°´¼¾ÅÍ
			case 71 : urlPath = "/customer/counsel.asp"; break;
			case 72 : urlPath = "/customer/faq.asp?divPosition=0"; break;
			case 73 : urlPath = "/customer/pharm.asp"; break;
			case 74 : urlPath = "/customer/counselType6.asp"; break;

		case "a1" : urlPath = "/clickEvent/e200806/eventMain.asp"; break; // Å¬¸¯ÀÌº¥Æ®
		case "b1" : urlPath = "/clickClinic/e200503/eventMain.asp"; break; // Å¬¸¯¾ØÅ¬¸®´Ð
		case "c1" : urlPath = "/product/reviewList.asp"; break;
		case "c2" : urlPath = "/product/productUseOrder.asp"; break;
		case "d1" : urlPath = "/customer/customer.asp"; break;
	
		case "e1" : urlPath = "http://www.vichy.co.kr/mini_aqualia2/index.asp?mm=5";linkType = 2; winName = "winvichy2"; winW = 980; winH = 600;break;// event ¼öÁ¤µÈ°Å 
//		case "e1" : urlPath = "http://www.vichy.co.kr/mini_aqualia/02/02_aqualia_04.asp"; linkType = 2; winName = "winCap"; winW = "980"; winH = "600"; toolbar = "yes"; scrollbars = "no"; break;  // event;
//		case "e1_2" : urlPath = "/vichyMania/index.asp"; linkType = 2; winName = "winMania"; winW = 890; winH = 710; break; // event
		case "e2" : urlPath = "http://www.vichy.co.kr/mini_aqualia2/intro.asp";linkType = 2; winName = "winvichy2"; winW = 980; winH = 600;break;// product
		case "e3" : urlPath = "/media/media_News.asp"; break; // media
		case "e4" : urlPath = "/diagnosis/diagnosis.asp"; break; // Áø´Ü
		case "e5" : urlPath = "/product/reviewList.asp"; break; // »ç¿ëÈÄ±â
		case "e6" : urlPath = "/customer/pharm.asp"; break; // ¾à±¹


		case "privacy" : urlPath = "/common/privacy_new.asp"; linkType = 2; winName = "winPrivacy"; winW = 643; winH = 600; isScroll = "yes"; break;
		case "clause" : urlPath = "/common/privacy_02.asp"; linkType = 2; winName = "winPrivacy_02"; winW = 645; winH = 541; isScroll = "yes"; break;
		case "credit" : urlPath = "/common/credit.asp"; break;
		case 100 : urlPath = "/mania/intro.asp"; linkType = 2; winName = "winMania"; winW = 932; winH = 520; break;
	}
	
	if(linkType == 2) // ÆË¾÷ÇüÅÂ
	{
		var winSize = "width=" + winW + ",height=" + winH + ",scrollbars=" + isScroll;
		window.open(urlPath, winName, winSize);
	}

	else if(linkType == 3) // »õÃ¢ ¶ç¿ì±â
	{
		window.open(urlPath);
	}

/*
	else if(linkType == 4)
	{
		return;
	}
*/

	else // ÀÏ¹ÝÀû ÇüÅÂ
	{
		window.location.href = urlPath;
		//window.location.href = urlPath + "?goUrl=" + urlPath;
	}
}


/* °Ë»ö
------------------------------------------------------------------------------------------------------*/
function search(inputText)
{
	window.location.href = "/product/productSearch.asp?keyword=" + inputText;
	//alert(inputText);
}


/* logo
------------------------------------------------------------------------------------------------------*/
function logoWrite()
{
	var logo = "\
	<table width='135' cellpadding='0' cellspacing='0'>\n\
	<tr><td><a href='/main.asp?prod=111'><img src='/images/blank.gif' width='135' height='135' style='margin: 0 0 10px 9px'></a></td></tr>\n\
	</table>\n\
	<div id='sub_logo' style='position: absolute; z-index: 30; top: 22px; left: 18px'>\n\
	<table width='221' cellpadding='0' cellspacing='0'>\n\
	<tr><td><a href='/main.asp?prod=111'><img src='/images/logo.gif' width='221' height='74'></a></td></tr>\n\
	</table>\n\
	</div>\n";
	document.write(logo);
}

/* top menu (privacy, credit)
------------------------------------------------------------------------------------------------------*/
function topMenu()
{
	var topMenu = "\
	<div id='topMenu' style='position: absolute; z-index: 20; top: 645px; left: 5px'>\n\
	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='240' height='40' align='middle'>\n\
	<param name='allowScriptAccess' value='sameDomain' />\n\
	<param name='movie' value='/images/left_bottom.swf' />\n\
	<param name='quality' value='high' />\n\
	<param name='wmode' value='transparent' />\n\
	<embed src='/images/left_bottom.swf' quality='high' bgcolor='#333333' width='240' height='40' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='https://www.macromedia.com/go/getflashplayer' wmode='transparent' />\n\
	</object>\n\
	</div>\n";
//\
//	<div style='position: absolute; z-index: 30; top: 25px; left: 796px'>\n\
//	<a href='#' onclick='goUrl(100); return false'><img src='/images/mc_button.gif' id='mc' onmouseover='overImg(this.id, this.src)' onmouseout='outImg(this.id, this.src)'></a>\n\
//	</div>\n
	document.write(topMenu);
}

function topMenu2()
{
	var topMenu = "\
	<div id='topMenu' style='position: absolute; z-index: 20; top: 645px; left: 795px'>\n\
	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='240' height='40' align='middle'>\n\
	<param name='allowScriptAccess' value='sameDomain' />\n\
	<param name='movie' value='/images/left_bottom.swf' />\n\
	<param name='quality' value='high' />\n\
	<param name='wmode' value='transparent' />\n\
	<embed src='/images/left_bottom.swf' quality='high' bgcolor='#333333' width='240' height='40' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='https://www.macromedia.com/go/getflashplayer' wmode='transparent' />\n\
	</object>\n\
	</div>\n";
//\
//	<div style='position: absolute; z-index: 30; top: 25px; left: 796px'>\n\
//	<a href='#' onclick='goUrl(100); return false'><img src='/images/mc_button.gif' id='mc' onmouseover='overImg(this.id, this.src)' onmouseout='outImg(this.id, this.src)'></a>\n\
//	</div>\n
	document.write(topMenu);
}

function topMenu_white()
{
	var topMenu = "\
	<div id='topMenu' style='position: absolute; z-index: 20; top: 645px; left: 5px'>\n\
	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='240' height='40' align='middle'>\n\
	<param name='allowScriptAccess' value='sameDomain' />\n\
	<param name='movie' value='/images/left_bottom_white.swf' />\n\
	<param name='quality' value='high' />\n\
	<param name='wmode' value='transparent' />\n\
	<embed src='/images/left_bottom_white.swf' quality='high' bgcolor='#333333' width='240' height='40' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='https://www.macromedia.com/go/getflashplayer' wmode='transparent' />\n\
	</object>\n\
	</div>\n";
//\
//	<div style='position: absolute; z-index: 30; top: 25px; left: 796px'>\n\
//	<a href='#' onclick='goUrl(100); return false'><img src='/images/mc_button.gif' id='mc' onmouseover='overImg(this.id, this.src)' onmouseout='outImg(this.id, this.src)'></a>\n\
//	</div>\n
	document.write(topMenu);
}

/* left menu
------------------------------------------------------------------------------------------------------*/
function leftMenu(d1)
{
	var leftMenuB;
	var leftMenuUrl;
	var leftMenuUrl_01 = "/diagnosis/diagnosis.asp";
	var leftMenuUrl_02 = "/customer/counsel.asp";
	var leftMenuUrl_03 = "/customer/counselForm.asp?counselType=1";
	var leftMenuUrl_04 = "/customer/counsel.asp";
	var leftMenuUrl_05 = "/customer/counselType6.asp";
	var leftMenuUrl_06 = "/customer/pharm.asp";

	switch(d1)
	{
		case "skinInfo" :                         leftMenuB = "01"; break;
		case "diagnosis" :                      leftMenuB = "02"; break;
		case "productCategory" :          leftMenuB = "01"; break;
		case "product" :                        leftMenuB = "03"; break;
		case "skinExper" :                      leftMenuB = "01"; break;
		case "media" :                           leftMenuB = "01"; break;
		case "laboratory" :                     leftMenuB = "01"; break;
		case "customer" :                      leftMenuB = "01"; break;
		case "customerCounsel" :         leftMenuB = "04"; break;
		case "customerPharm" :            leftMenuB = "05"; break;
		case "mypage" :                        leftMenuB = "06"; break;
		case "member" :                        leftMenuB = "01"; break;
	}
	leftMenuUrl = eval("leftMenuUrl_" + leftMenuB);
	leftMenuB = "text" + leftMenuB + ".gif";

	var leftMenu = "\
		<table width='135' cellpadding='0' cellspacing='0' style='margin: 0 0 0 9px; background-color: #FFF'>\n\
		<tr>\n\
			<td style='text-align: center' style='padding-top:50px'><img src='/images/leftMenu/left_mu_img_1.jpg' style='margin: 10 0 10px 0; cursor:hand;' onclick='goUrl(42)'></td>\n\
		</tr>\n\
	</table>\n";

	document.write(leftMenu);
}


/* Div Control
------------------------------------------------------------------------------------------------------*/
var oldN = "n1";
function chN(numN)
{
	var selN = "n" + numN;

	document.getElementById(oldN).style.display = "none";
	document.getElementById(selN).style.display = "block";
	oldN = selN;
}

/* Div Control 2
------------------------------------------------------------------------------------------------------*/
var oldN = "n1";
var oldN2 = "n1_1";
function chN2(numN)
{
	var selN = "n" + numN;
	var selN2 = "n" + numN + "_1";

	document.getElementById(oldN).style.display = "none";
	document.getElementById(selN).style.display = "block";
	document.getElementById(oldN2).style.display = "none";
	document.getElementById(selN2).style.display = "block";
	oldN = selN;
	oldN2 = selN2;
}


/* Å¬¸¯½Ã Á¡¼± ¾È³ª¿À°Ô
------------------------------------------------------------------------------------------------------*/
var A_tag = document.all.tags("A");

function blur_all(){
	for (i=0;i<A_tag.length;i++)
	{
		A_tag[i].onfocus=new Function("A_tag["+i+"].blur()");
	}
}

window.onload = blur_all;


/* Mouse over & Mouse out
------------------------------------------------------------------------------------------------------*/
// mouse over
function overImg(idObj, srcObj)
{
	var orginImg = srcObj;
	var endNum = orginImg.length - 4;
	var chImg = orginImg.substring(0, endNum);
	var srcOverImg = chImg + "_on.gif";
	document.getElementById(idObj).src = srcOverImg;
}

// mouse over(jpg)
function jpgoverImg(idObj, srcObj)
{
	var orginImg = srcObj;
	var endNum = orginImg.length - 4;
	var chImg = orginImg.substring(0, endNum);
	var srcOverImg = chImg + "_on.jpg";
	document.getElementById(idObj).src = srcOverImg;
}

// mouse out
function outImg(idObj, srcObj)
{
	var orginImg = srcObj;
	var endNum = orginImg.length - 7;
	var chImg = orginImg.substring(0, endNum);
	var srcOverImg = chImg + ".gif";
	document.getElementById(idObj).src = srcOverImg;
}

// mouse out(jpg)
function jpgoutImg(idObj, srcObj)
{
	var orginImg = srcObj;
	var endNum = orginImg.length - 7;
	var chImg = orginImg.substring(0, endNum);
	var srcOverImg = chImg + ".jpg";
	document.getElementById(idObj).src = srcOverImg;
}

// ¿À¹ö
function imgOver(imgObj)
{
	var imgSrc = imgObj.src;
	var imgSrcOver = imgSrc.replace("_off.gif", "_on.gif");
	imgObj.src = imgSrcOver;
}


// ¾Æ¿ô
function imgOut(imgObj)
{
	var imgSrc = imgObj.src;
	var imgSrcOut = imgSrc.replace("_on.gif", "_off.gif");
	imgObj.src = imgSrcOut;
}

/* Product Popup
------------------------------------------------------------------------------------------------------*/
function popProduct(imgName)
{
	var imgObj;
	imgObj = "/product/images/" + imgName;

	var imgWin = window.open("","winVichyImg","width=300,height=600");
	imgWin.focus();
    imgWin.document.write("<html><head><title>ºñ½¬ . °Ç°­Àº ÇÇºÎ·Î Ç¥ÇöµË´Ï´Ù.</title></head>");
    imgWin.document.write("<body topmargin=0 leftmargin=0 marginwidth=0, marginheight=0>");
    imgWin.document.write("<img src='"+imgObj+"' width='300' height='600' border='0' usemap='#closeWin'><map name='closeWin'><area shape='rect' coords='233,562,290,590' href='#' onclick='self.close(); return false' onfocus='this.blur()'></map></body></html>");
    imgWin.document.close();
}

function pop_dairy()
{
	var dairy = window.open("/vichyMania/index.asp","","width=890, height=710, left=0, top=0");	
	dairy.focus();
}

/*function pop_event2()
{
	var mania_vote= window.open("/vichyMania/votebest.asp?maniaId=cleo1979","","width=890, height=710, left=0, top=0");	
	mania_vote.focus();
}*/