/////////////////// SSL º¸¾È»çÀÌÆ® Àû¿ë µµ¸ÞÀÎ °­Á¦ º¯°æ ///////////////////////////////
var my_hostname = location.hostname;
var my_location = location.href;
var real_hostname = "http://www.didwallpaper.com"
if (my_hostname=="didwallpaper.com" || my_hostname=="www.didwallpaper.co.kr" || my_hostname=="didwallpaper.co.kr" || my_hostname=="www.ondid.co.kr" || my_hostname=="ondid.co.kr"  )
{
          var full_path= my_location.split(my_hostname);
          location.href = real_hostname + full_path[1];
}
/////////////////// SSL º¸¾È»çÀÌÆ® Àû¿ë µµ¸ÞÀÎ °­Á¦ º¯°æ ///////////////////////////////

var sw = screen.availWidth;
var sh = screen.availHeight;

// À©µµ¿ì ¿ÀÇÂ
function openWindowCenter(url,name,width,height,scrollbars) {
	var posLt = (screen.availWidth-width)/2;
	var posTp = (screen.availHeight-height)/2;
	var pop = window.open(url,name,"top="+posTp+",left="+posLt+",width="+width+",height="+height+",scrollbars="+scrollbars);
	if(pop) {pop.focus();}
}

/* ¸Þ´º Á¤ÀÇ */
var SSLURL = "https://www.didwallpaper.com"
var DefaultURL = "http://www.didwallpaper.com"

var arrMnu = new Array();
//arrMnu.push({key:"Main",txt:"Home",url:"javscript:goMain();"})

//¿µ¹® »çÀÌÆ® ¸Þ´º Á¤ÀÇ

arrMnu.push({key:"e_home",		txt:"Home",							url:DefaultURL + "/eng/default.asp"});

//Product
arrMnu.push({key:"product0",		txt:"Product",					url:DefaultURL + "/eng/product/list.asp?nDivision=1"});
arrMnu.push({key:"product1",		txt:"PVC(paperback) Collection",url:DefaultURL + "/eng/product/list.asp?nDivision=1"});
arrMnu.push({key:"product1_1",		txt:"D&D",						url:DefaultURL + "/eng/product/list.asp?nDivision=1&SearchCategory1=3"});
arrMnu.push({key:"product1_2",		txt:"4U",						url:DefaultURL + "/eng/product/list.asp?nDivision=1&SearchCategory1=4"});
arrMnu.push({key:"product1_3",		txt:"COLORS",					url:DefaultURL + "/eng/product/list.asp?nDivision=1&SearchCategory1=33"});
arrMnu.push({key:"product2",		txt:"Duplex(paper) Collection",	url:DefaultURL + "/eng/product/list.asp?nDivision=2"});
arrMnu.push({key:"product2_1",		txt:"EPISODE",					url:DefaultURL + "/eng/product/list.asp?nDivision=2&SearchCategory1=5"});
arrMnu.push({key:"product2_2",		txt:"ECO",						url:DefaultURL + "/eng/product/list.asp?nDivision=2&SearchCategory1=6"});
arrMnu.push({key:"product3",		txt:"Luxury Collection",		url:DefaultURL + "/eng/product/list.asp?nDivision=3"});
arrMnu.push({key:"product3_1",		txt:"SIDUS POINT",				url:DefaultURL + "/eng/product/list.asp?nDivision=3&SearchCategory1=1"});
arrMnu.push({key:"product3_2",		txt:"SIDUS VELVET",				url:DefaultURL + "/eng/product/list.asp?nDivision=3&SearchCategory1=2"});
arrMnu.push({key:"product4",		txt:"All Product",				url:DefaultURL + "/eng/product/list.asp"});
arrMnu.push({key:"product5",		txt:"Product Gallery",			url:DefaultURL + "/eng/product/gallery/list.asp"});
arrMnu.push({key:"product6",		txt:"Collection Story",			url:DefaultURL + "/eng/product/collection.asp"});
arrMnu.push({key:"eng_seeview",		txt:"Detail",					url:DefaultURL + "/eng/product/read.asp?oidProduct="});

//About
arrMnu.push({key:"about0",			txt:"About did",		url:DefaultURL + "/eng/about_did/overview.asp"});
arrMnu.push({key:"about1",			txt:"OverView",			url:DefaultURL + "/eng/about_did/overview.asp"});
arrMnu.push({key:"about2",			txt:"CI",				url:DefaultURL + "/eng/about_did/ci.asp"});
arrMnu.push({key:"about3",			txt:"LPMC",				url:"/eng/about_did/lpmc/overview.asp"});
arrMnu.push({key:"about3_1",		txt:"Overview",			url:DefaultURL + "/eng/about_did/lpmc/overview.asp"});
arrMnu.push({key:"about3_2",		txt:"History",			url:DefaultURL + "/eng/about_did/lpmc/history.asp"});
arrMnu.push({key:"about3_3",		txt:"Product",			url:DefaultURL + "/eng/about_did/lpmc/product.asp"});
arrMnu.push({key:"about3_4",		txt:"Facility",			url:DefaultURL + "/eng/about_did/lpmc/facility.asp"});
arrMnu.push({key:"about3_5",		txt:"Q&A and News",		url:DefaultURL + "/eng/about_did/lpmc/list.asp"});

//Public Relation
arrMnu.push({key:"relation0",		txt:"Public Relation",	url:DefaultURL + "/eng/press/notice/list.asp"});
arrMnu.push({key:"relation1",		txt:"News",				url:DefaultURL + "/eng/press/notice/list.asp"});
arrMnu.push({key:"relation2",		txt:"Advertisement",	url:DefaultURL + "/eng/press/branding/list.asp"});

//Contact Us
arrMnu.push({key:"contact0",		txt:"Contact Us",		url:DefaultURL + "/eng/Contact_Us/contactus.asp"});



//ÇÑ±¹ »çÀÌÆ® ¸Þ´º Á¤ÀÇ

arrMnu.push({key:"Main",txt:"Home",url:"/default.asp"})

// È¸¿ø°¡ÀÔ
arrMnu.push({key:"member0", txt:"È¸¿ø",				url:SSLURL + "/member/register/agree.asp"});
arrMnu.push({key:"member1", txt:"È¸¿ø°¡ÀÔ",				url:SSLURL + "/member/register/agree.asp"});
arrMnu.push({key:"member2", txt:"·Î±×ÀÎ",				url:DefaultURL + "/member/login/login.asp"});
arrMnu.push({key:"member3", txt:"¾ÆÀÌµð/ºñ¹Ð¹øÈ£Ã£±â",  url:SSLURL + "/member/account/account_find.asp"});
arrMnu.push({key:"member4", txt:"ÀÌ¿ë¾à°ü",				url:"/member/use.asp"});
arrMnu.push({key:"member5", txt:"°³ÀÎÁ¤º¸Ãë±Þ¹æÄ§",     url:DefaultURL + "/member/private.asp"});
arrMnu.push({key:"member6", txt:"ÀÌ¸ÞÀÏ¹«´Ü¼öÁý°ÅºÎ",   url:DefaultURL + "/member/email.asp"});

//Á¦Ç°¼Ò°³
arrMnu.push({key:"see0", txt:"Á¦Ç°¼Ò°³",				url:DefaultURL + "/see_did/index.asp"});
arrMnu.push({key:"see1", txt:"½ÇÅ©ºê·£µå",				url:DefaultURL + "/see_did/product/list.asp?nDivision=1"});
arrMnu.push({key:"see1_1", txt:"µð¾Øµð",					url:DefaultURL + "/see_did/product/list.asp?nDivision=1&SearchCategory1=4"});
arrMnu.push({key:"see1_2", txt:"Æ÷À¯",					url:DefaultURL + "/see_did/product/list.asp?nDivision=1&SearchCategory1=3"});
arrMnu.push({key:"see1_3", txt:"ÄÃ·¯½º",					url:DefaultURL + "/see_did/product/list.asp?nDivision=1&SearchCategory1=33"});
arrMnu.push({key:"see2", txt:"ÇÕÁöºê·£µå",				url:DefaultURL + "/see_did/product/list.asp?nDivision=2"});
arrMnu.push({key:"see2_1", txt:"¿¡ÇÇ¼Òµå",				url:DefaultURL + "/see_did/product/list.asp?nDivision=2&SearchCategory1=5"});
arrMnu.push({key:"see2_2", txt:"¿¡ÄÚ",					url:DefaultURL + "/see_did/product/list.asp?nDivision=2&SearchCategory1=6"});
arrMnu.push({key:"see3", txt:"¸íÇ°ºê·£µå",			url:DefaultURL + "/see_did/product/list.asp?nDivision=3"});
arrMnu.push({key:"see3_1", txt:"½ÃµÎ½ºÆ÷ÀÎÆ®",			url:DefaultURL + "/see_did/product/list.asp?nDivision=3&SearchCategory1=1"});
arrMnu.push({key:"see3_2", txt:"½ÃµÎ½ºº§ºª",			url:DefaultURL + "/see_did/product/list.asp?nDivision=3&SearchCategory1=2"});
arrMnu.push({key:"see4", txt:"ÀüÃ¼Á¦Ç°º¸±â",			url:DefaultURL + "/see_did/product/list.asp"});
arrMnu.push({key:"see5", txt:"did°¶·¯¸®",				url:DefaultURL + "/see_did/gallery/list.asp"});
arrMnu.push({key:"see6", txt:"ÄÃ·º¼Ç½ºÅä¸®",			url:"javascript:openWindowCenter('"+DefaultURL + "/see_did/collection_story.asp','ÄÃ·º¼Ç½ºÅä¸®',800,480,'no')"});
arrMnu.push({key:"see7", txt:"Á¦Ç°ÅÂ±×",				url:DefaultURL + "/see_did/product/list.asp?SearchTag="});
arrMnu.push({key:"seeview", txt:"Á¦Ç°»ó¼¼º¸±â",				url:DefaultURL + "/see_did/product/read.asp?oidProduct="});
arrMnu.push({key:"3dmall", txt:"3Dmall",				url:"javascript:window.open('http://www.didmall.com','didmall','')"});


//°í°´¶ó¿îÁö
arrMnu.push({key:"enjoy0", txt:"°í°´¶ó¿îÁö",			url:DefaultURL + "/enjoy_did/index.asp"});
arrMnu.push({key:"enjoy1", txt:"ÀÎÅ×¸®¾î»ó´ã",			url:DefaultURL + "/enjoy_did/counsel/list.asp?oidBoard=1"});
arrMnu.push({key:"enjoy2", txt:"¿ì¸®ÁýÀÚ¶û/³»°¡º»did",	url:DefaultURL + "/enjoy_did/proud/list.asp?oidBoard=2"});
arrMnu.push({key:"enjoy3", txt:"º£½ºÆ® ¿ì¸®ÁýÀÚ¶û",		url:DefaultURL + "/enjoy_did/bna/list.asp?oidBoard=2"});
//arrMnu.push({key:"enjoy4", txt:"On did",				url:"/enjoy_did/ondid/list.asp?oidBoard=3"});
arrMnu.push({key:"enjoy4", txt:"A4»ùÇÃ½ÅÃ»",			url:DefaultURL + "/enjoy_did/sample/list.asp?oidBoard=5"});
arrMnu.push({key:"enjoy4C", txt:"A4»ùÇÃ½ÅÃ»",			url:DefaultURL + "/enjoy_did/sample/write_step_1.asp?oidBoard=5"});
arrMnu.push({key:"enjoy5", txt:"µð¾ÆÀÌµð¿¡ ¹Ù¶õ´Ù",		url:DefaultURL + "/enjoy_did/question/list.asp?oidBoard=4"});
arrMnu.push({key:"enjoy6", txt:"Àå½ÄÁ¡È«º¸",			url:DefaultURL + "/enjoy_did/retailshop/list.asp?oidBoard=6"});

//¾Ë¾ÆµÎ¸éÁÁ¾Æ¿ä
arrMnu.push({key:"share0",	 txt:"¾Ë¾ÆµÎ¸éÁÁ¾Æ¿ä",		url:DefaultURL + "/share_did/index.asp"});
arrMnu.push({key:"share1",	 txt:"ÀÎÅ×¸®¾îTIP",			url:DefaultURL + "/share_did/tip/list.asp?oidBoard=7"});
arrMnu.push({key:"share2",   txt:"½ÇÀü!µµ¹èÇÏ±â",		url:DefaultURL + "/share_did/papering/how.asp"});
arrMnu.push({key:"share2_1", txt:"²À!¾Ë°í°è¼¼¿ä",		url:DefaultURL + "/share_did/papering/how.asp"});
arrMnu.push({key:"share2_2", txt:"½ÇÀüµµ¹è°¡ÀÌµå",		url:DefaultURL + "/share_did/papering/list.asp?oidBoard=14"});
arrMnu.push({key:"share2_3", txt:"¼Ò¿ä·®°è»ê±â",	url:DefaultURL + "/share_did/papering/wallpaper_need.asp"});
arrMnu.push({key:"share3",	 txt:"Æ®·»µå¿³º¸±â",		url:DefaultURL + "/share_did/trend/list.asp?oidBoard=9"});
arrMnu.push({key:"share3_1", txt:"Æ®·»µåinÆ®·»µå",		url:DefaultURL + "/share_did/trend_in_trend/list.asp?oidBoard=8"});
arrMnu.push({key:"share3_2", txt:"ÇØ¿ÜÆ®·»µå",			url:DefaultURL + "/share_did/trend/list.asp?oidBoard=9"});

//did½ºÅä¸®
arrMnu.push({key:"welcome0",	txt:"did½ºÅä¸®",	url:DefaultURL + "/welcome/index.asp"});
arrMnu.push({key:"welcome1",	txt:"did½ºÅä¸®",	url:DefaultURL + "/welcome/story.asp"});
arrMnu.push({key:"welcome2",	txt:"CEO¸Þ¼¼Áö",	url:DefaultURL + "/welcome/ceo.asp"});
arrMnu.push({key:"welcome3",	txt:"CI",			url:DefaultURL + "/welcome/ci.asp"});
arrMnu.push({key:"welcome4",	txt:"±¤°íÀÌ¾ß±â",		url:DefaultURL + "/welcome/branding/list.asp?oidBoard=10&SearchCategory=1"});
arrMnu.push({key:"welcome4b",	txt:"±¤°íÀÌ¾ß±âbanner",		url:DefaultURL + "/welcome/branding/list.asp?oidBoard=10&rnCategory=25"});
arrMnu.push({key:"welcome5",	txt:"Ã£¾Æ¿À½Ã´Â±æ",	url:DefaultURL + "/welcome/contactus.asp"});
arrMnu.push({key:"welcome6",	txt:"LPMC",			url:DefaultURL + "/welcome/lpmc/intro.asp"});
arrMnu.push({key:"welcome6_1",	txt:"»ç¾÷ºÎ¼Ò°³",	url:DefaultURL + "/welcome/lpmc/intro.asp"});
arrMnu.push({key:"welcome6_2",	txt:"»ç¾÷¿¬Çõ",		url:DefaultURL + "/welcome/lpmc/history.asp"});
arrMnu.push({key:"welcome6_3",	txt:"Á¦Ç°¼Ò°³",		url:DefaultURL + "/welcome/lpmc/product_intro.asp"});
arrMnu.push({key:"welcome6_4",	txt:"¼³ºñ/ÀÎÁõÇöÈ²",url:DefaultURL + "/welcome/lpmc/status.asp"});
arrMnu.push({key:"welcome6_5",	txt:"ÀÚ·á½Ç",url:DefaultURL + "/welcome/lpmc/pds/list.asp?oidBoard=13"});

//ÀÌº¥Æ®Æ÷À¯
arrMnu.push({key:"do0",	txt:"ÀÌº¥Æ®Æ÷À¯",	url:DefaultURL + "/do_did/index.asp"});
arrMnu.push({key:"do1",	txt:"ÀÌº¥Æ®",		url:DefaultURL + "/do_did/event/list.asp"});
arrMnu.push({key:"do2",	txt:"°øÁö»çÇ×",		url:DefaultURL + "/do_did/notice/list.asp?oidBoard=12"});
arrMnu.push({key:"do2R",	txt:"°øÁö»çÇ×ÀÐ±â",		url:DefaultURL + "/do_did/notice/read.asp?oidBoard=12"});

//¸¶ÀÌÆäÀÌÁö
arrMnu.push({key:"mypage0",	txt:"¸¶ÀÌÆäÀÌÁö",		url:DefaultURL + "/mypage/my_article.asp"});
arrMnu.push({key:"mypage1",	txt:"³ªÀÇ°Ô½Ã¹°",		url:DefaultURL + "/mypage/my_article.asp"});
arrMnu.push({key:"mypage2",	txt:"³ªÀÇ½ºÅ©·¦",		url:DefaultURL + "/mypage/my_scrap.asp"});
arrMnu.push({key:"mypage3",	txt:"didµî±Þ/Æ÷ÀÎÆ®",	url:DefaultURL + "/mypage/my_point.asp"});
arrMnu.push({key:"mypage4",	txt:"È¸¿øÁ¤º¸¼öÁ¤",		url:SSLURL + "/mypage/member_read.asp"});
arrMnu.push({key:"mypage5",	txt:"È¸¿øÅ»Åð",			url:SSLURL + "/mypage/member_withdraw.asp"});

//±âÅ¸
arrMnu.push({key:"etc1",	txt:"»çÀÌÆ®°¡ÀÌµå",		url:DefaultURL + "/etc/site_guide.asp"});
arrMnu.push({key:"etc2",	txt:"English",			url:"alert('##')"});
arrMnu.push({key:"etc3",	txt:"did eshop",		url:"http://eshop.didwallpaper.com/"});
arrMnu.push({key:"logout",	txt:"·Î±×¾Æ¿ô",			url:"/member/login/logout.asp"});

arrMnu.push({key:"how1",	txt:"½ÇÀüµµ¹èÇÏ±â",		url:"javascript:window.open(\"/share_did/papering/list.asp?oidBoard=14&rnCategory=17\")"});
arrMnu.push({key:"how2", txt:"º®Áö¼Ò¿ä·®°è»êÇØº¸±â",			url:"javascript:window.open(\"/share_did/papering/wallpaper_need.asp\")"});
arrMnu.push({key:"how3", txt:"µµ¹èºñ¿ëµûÁ®º¸±â",			url:"javascript:window.open(\"/share_did/papering/read.asp?oidArticle=14417&oidBoard=14\")"});
arrMnu.push({key:"how4", txt:"ºê·£µå",			url:"javascript:window.open(\"/share_did/papering/read.asp?oidArticle=15891&oidBoard=14\")"});
arrMnu.push({key:"how5", txt:"¼¿ÇÁÄÚµð",			url:"javascript:goSelf()"});
arrMnu.push({key:"how6", txt:"½ÇÅ©¿ÍÇÕÁöÂ÷ÀÌ",			url:"javascript:window.open(\"/share_did/papering/read.asp?oidArticle=14416&oidBoard=14\")"});
arrMnu.push({key:"how7", txt:"±×¿Üº®Áö",			url:"javascript:window.open(\"/share_did/papering/read.asp?oidArticle=14415&oidBoard=14\")"});
arrMnu.push({key:"how8", txt:"ÀÎÅ×¸®¾î»ó´ã",			url:"javascript:window.open(\"/enjoy_did/counsel/list.asp?oidBoard=1\")"});
arrMnu.push({key:"how9", txt:"»ùÇÃ½ÅÃ»",			url:"javascript:window.open(\"/enjoy_did/sample/list.asp?oidBoard=5\")"});
arrMnu.push({key:"how10", txt:"100%È°¿äÇÏ±â",			url:"javascript:window.open(\"/share_did/papering/read.asp?oidArticle=15890&oidBoard=14\")"});
arrMnu.push({key:"how11", txt:"½ÇÀüµµ¹èÇÏ±â¸®½ºÆ®",			url:"javascript:window.open(\"/share_did/papering/list.asp?oidBoard=14\")"});
arrMnu.push({key:"how12", txt:"µµ¹è¸¦À§ÇÑÀå½ÄÁ¡¼±ÅÃÇÏ±â",			url:"javascript:window.open(\"/share_did/papering/read.asp?oidArticle=15887&oidBoard=14\")"});
arrMnu.push({key:"how13", txt:"¿ì¸®ÁýÀÚ¶û",			url:"javascript:window.open(\"/enjoy_did/proud/list.asp?oidBoard=2\")"});
arrMnu.push({key:"how14", txt:"º£ÀÌÅ©¾Æ¿ô",			url:"javascript:window.open(\"/share_did/papering/read.asp?oidArticle=15888&oidBoard=14\")"});

/* ¸Þ´º Á¤ÀÇ */

function getMnuURL(param) {
	for(var i=0;i<arrMnu.length;i++) {
		if(arrMnu[i].key==param) {
			return arrMnu[i].url;
		}
	}
}

function getMnuTXT(param) {
	for(var i=0;i<arrMnu.length;i++) {
		if(arrMnu[i].key==param) {
			return arrMnu[i].txt;
		}
	}
}

// ¿ÜºÎ¸µÅ©
function goURL(param,param2) {
	//alert(param+"::"+param2)
	if(!param) return;
	url = getMnuURL(param);
	//alert(url);
	if(!url) return;
	if(url.indexOf("javascript:")>-1) {
		eval(url.replace("javascript:",""));
	} else if(url.indexOf(".asp")<0) {
		goURL(url)	
	} else {
		if(param2==undefined)
		{
			location.href = url
		}
		else
		{
			location.href = url + param2;
		}
	}
}

function goURLBlank(param) {
	if(!param) return;
	url = getMnuURL(param);
	if(!url) return;
	if(url.indexOf(".asp")<0) {
		goURLBlank(url)	
	} else {
		window.open(url,'');
	}
}

function goURLParent(param) {
	if(!param) return;
	url = getMnuURL(param);
	if(!url) return;
	if(url.indexOf(".asp")<0) {
		goURLParent(url)	
	} else {
		parent.location.href = url
	}
}

function goLogin(){
	var retURL = document.location.href;
	document.location.href=DefaultURL+"/member/login/login.asp?retURL="+escape(retURL);
}

// navigation html generate ÇÔ¼ö
function navi(param) {
	if(!param) return;
	arrParam = param.split("|");
	var str  = "";
	str += "<a href=\"/\"><img src=\"/images/style_guide/navi/icn_home.gif\" class=\"vam\" /></a> "
	var prevstr = "";
	for(var i=0;i<arrParam.length;i++) {
		if(prevstr!=getMnuNM(arrParam[i]) && getMnuNM(arrParam[i])!=null ){
			str += " > "+"<a href=\""+ getMnuURL(arrParam[i]) +"\">" + getMnuNM(arrParam[i]) + "</a>";
		}
			prevstr = "<a href=\""+ getMnuURL(arrParam[i]) +"\">" + getMnuNM(arrParam[i]) + "</a>";
	}
	str += "";
	document.write(str);
}

function getMnuNM(param) {
	for(var i=0;i<arrMnu.length;i++) {
		if(arrMnu[i].key==param) {
			return arrMnu[i].txt;
		}
	}
}

// ¸ÞÀÎ ÀÌµ¿ÇÔ¼ö
function goMain(){

	location.href = DefaultURL+"/";
}
// ·Î±×ÀÎ Ã¼Å©
function chkLogin(){
	if(confirm('·Î±×ÀÎÇÑ °í°´ÀÌ ÀÌ¿ë°¡´ÉÇÑ ¼­ºñ½ºÀÔ´Ï´Ù.\n·Î±×ÀÎÀ» ÇÏ½Ã·Á¸é [È®ÀÎ]À» Å¬¸¯ ÇØÁÖ¼¼¿ä.')){
		document.location.href=DefaultURL+'/member/login/login.asp?retURL=' + escape(document.location.href);
	}
	else{}
}
function chkLogin2(){
	//alert('·Î±×ÀÎÇÑ °í°´ÀÌ ÀÌ¿ë°¡´ÉÇÑ ¼­ºñ½ºÀÔ´Ï´Ù.');
	if(confirm('·Î±×ÀÎÇÑ °í°´ÀÌ ÀÌ¿ë°¡´ÉÇÑ ¼­ºñ½ºÀÔ´Ï´Ù.\n·Î±×ÀÎÀ» ÇÏ½Ã·Á¸é [È®ÀÎ]À» Å¬¸¯ ÇØÁÖ¼¼¿ä.')){
		parent.document.location.href=DefaultURL+'/member/login/login.asp?retURL=' + escape(parent.document.location.href);
		return;
	}
	/*
	if(confirm('·Î±×ÀÎÇÑ °í°´ÀÌ ÀÌ¿ë°¡´ÉÇÑ ¼­ºñ½ºÀÔ´Ï´Ù.\n·Î±×ÀÎÀ» ÇÏ½Ã·Á¸é [È®ÀÎ]À» Å¬¸¯ ÇØÁÖ¼¼¿ä.')){
		parent.document.location.href=DefaultURL+'/member/login/login.asp?retURL=' + document.location.href}
	else{}
	*/
}

// ÀÐ±â ÆäÀÌÁöÀÇ ³ÑÄ¡´Â ÀÌ¹ÌÁö¸¦ Á¶Á¤ÇÑ´Ù.
function reSizeImgContent(id,width){
	var dom = document.getElementById(id);
	if(dom==null) return false;
	var imgs = dom.getElementsByTagName("img");
	/*
	for (dd in imgs) {
		var tmpImg = new Image();
		tmpImg.src = imgs[dd].src;
		if(tmpImg.width>width) {
			imgs[dd].width=width;
		}
	} 
	*/
	for (i=0;i<imgs.length;i++) {
		var tmpImg = new Image();
		tmpImg.src = imgs[i].src;
		if(tmpImg.width>width) {
			imgs[i].width=width;
		}
	} 
}

/* ÄíÅ° Ã³¸® */
function getCookieVal (offset) 
{ 
	var endstr = document.cookie.indexOf (";", offset); 
	if (endstr == -1) 
		endstr = document.cookie.length; 
	return unescape(document.cookie.substring(offset, endstr)); 
} 
function GetCookie (name) 
{ 
	var arg = name + "="; 
	var alen = arg.length; 
	var clen = document.cookie.length; 
	var i = 0; 
	while (i < clen) 
	{ //while open 
		var j = i + alen; 
		if (document.cookie.substring(i, j) == arg) 
			return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; 
		if (i == 0) break; 
	} //while close 
	return null; 
} 
function SetCookie (name, value) 
{ 
	var argv = SetCookie.arguments; 
	var argc = SetCookie.arguments.length; 
	var expires = (2 < argc) ? argv[2] : null; 
	var path = (3 < argc) ? argv[3] : null; 
	var domain = (4 < argc) ? argv[4] : null; 
	var secure = (5 < argc) ? argv[5] : false; 
	document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); 
}
function GetCookieNameVal(name){
	var user = GetCookie("UserSession");
	var str = "";
	if(user!=null && user!=""){
		var user = user.split("&");
		for(var i=0;i<user.length;i++){
			var user_col = user[i].split("=");
			if(name==user_col[0]){
				str = user_col[1];
			}
		}
	}
	return str;
}
// ·Î±×ÀÎ Ã¼Å©
function IsLogin(){
	var no = GetCookieNameVal("oidMember");
	if(no!=null && no!=""){
		return true;
	}
	return false;
}

function copyAddress(url) {
	clipboardData.setData('Text',url); 
	alert("ÁÖ¼Ò°¡ º¹»çµÇ¾ú½À´Ï´Ù.\r\nºí·Î±×, ¹Ì´ÏÈ¨ÇÇ, Ä«Æä °Ô½ÃÆÇ¿¡¼­ ctrl+v(ºÙ¿©³Ö±â)¸¦ ÇÏ½Ã¸é\r\n¹Ù·Î ÁÖ¼Ò¸¦ È®ÀÎÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.");
}

function popupProdcut(){
	var posLt = (screen.availWidth-400)/2;
	var posTp = (screen.availHeight-100)/2;
	var pop = window.open("/lib/popup/product_list.asp","Á¦Ç°","top="+posTp+",left="+posLt+",width=720,height=710,scrollbars=no");
	if(pop) {pop.focus();}
}
function popupProdcut2(){
	var posLt = (screen.availWidth-400)/2;
	var posTp = (screen.availHeight-100)/2;
	var pop = window.open("/lib/popup/product_list_editor.asp","Á¦Ç°","top="+posTp+",left="+posLt+",width=720,height=710,scrollbars=no");
	if(pop) {pop.focus();}
}
function popupMyscrap(){
	var posLt = (screen.availWidth-400)/2;
	var posTp = (screen.availHeight-100)/2;
	var pop = window.open("/lib/popup/myscrap_list.asp","Á¦Ç°","top="+posTp+",left="+posLt+",width=720,height=710,scrollbars=no");
	if(pop) {pop.focus();}
}
function popupMyscrap2(){
	var posLt = (screen.availWidth-400)/2;
	var posTp = (screen.availHeight-100)/2;
	var pop = window.open("/lib/popup/myscrap_list_editor.asp","Á¦Ç°","top="+posTp+",left="+posLt+",width=720,height=710,scrollbars=no");
	if(pop) {pop.focus();}
}
function popupMySample(){
	var posLt = (screen.availWidth-400)/2;
	var posTp = (screen.availHeight-100)/2;
	var pop = window.open("/lib/popup/mysample_list.asp","Á¦Ç°","top="+posTp+",left="+posLt+",width=720,height=710,scrollbars=no");
	if(pop) {pop.focus();}
}
function popupMySample_scrap(){
	var posLt = (screen.availWidth-400)/2;
	var posTp = (screen.availHeight-100)/2;
	var pop = window.open("/lib/popup/mysample_list_by_scrap.asp","Á¦Ç°","top="+posTp+",left="+posLt+",width=720,height=710,scrollbars=no");
	if(pop) {pop.focus();}
}

function toggleMypage(opt){
	var obj = document.getElementById("mypage");
	if(!obj) return false;
	if(opt=="view")
		obj.style.display = "block";
	else
		obj.style.display = "none";
}
function toggleMypageTxt(id,ev){
	var obj = document.getElementById(id);
	if(!obj) return false;
	initMypage();
	toggleMypage("view");
	if(ev=="over"){
		obj.src = "/images/style_guide/sub/txt_"+ id +"_on.gif";
	}
}
function initMypage(){
	var arr = new Array("myarticle","myscrap","mypoint","myinfo");
	for(var i=0;i<arr.length;i++){
		var obj = document.getElementById(arr[i]);
		obj.src = "/images/style_guide/sub/txt_"+ arr[i] +"_off.gif";
	}
}
function openSiteGuide(){
	var bg_highlight = document.getElementById("bg_highlight");
	var site_guide = document.getElementById("site_guide");
	bg_highlight.style.display = "block";
	var scroll = getScrollSize().toString().split(",");
	bg_highlight.style.height = scroll[1] + "px";
	site_guide.style.left = ((scroll[0] / 2) - 410) +"px";
	site_guide.style.display = "block";
}
function closeSiteGuide(){
	var bg_highlight = document.getElementById("bg_highlight");
	var site_guide = document.getElementById("site_guide");
	bg_highlight.style.display = "none";
	site_guide.style.display = "none";
}
function getScrollSize() {
 
  var oDoc = document[document.compatMode == 'CSS1Compat' ? 'documentElement' : 'body'];
  if (/Opera|Safari/.test(navigator.userAgent)) oDoc = document.body;
 
  // IE6 ¹Ì¸¸ÀÌ¸é
  if (/MSIE\s([0-9]+(\.[0-9]+)*)/.test(navigator.userAgent) && parseFloat(RegExp.$1) < 6) {
   
    var aOld = [ oDoc.scrollLeft, oDoc.scrollTop ];
    var aClient = getClientSize();
   
    oDoc.scrollLeft = 999999;
    oDoc.scrollTop = 999999;
   
    var aRet = [
      oDoc.scrollLeft + aClient[0],
      oDoc.scrollTop + aClient[1]
    ];
   
    oDoc.scrollLeft = aOld[0];
    oDoc.scrollTop = aOld[1];
   
    return aRet;
   
  }
 
  return [
    oDoc.scrollWidth,
    oDoc.scrollHeight
  ];
 
}

function goSelf(){
	openWindowCenter(DefaultURL+'/selfcodi/selfcodi.asp','¼¿ÇÁÄÚµð',1000,700,'no');
}

function resizeThumbnail(img,objWidth,objHeight)
{
	var iWidth = img.width;
	var iHeight = img.height;
	
	if(iWidth > objWidth){
		img.width = objWidth;
		
		if(img.height > objHeight)
			img.height = objHeight;
	}
	else if(iHeight > objHeight) {
		img.height = objHeight;
		
		if(img.width > objWidth)
			img.width = objWidth;
	}
	/*
	if(iWidth > 130)
		img.width = 130;
	else (iHeight > 185)
		img.height = 185;
	*/
}

// ÀÌÀü °Ô½Ã¹° ¿¬µ¿ Á¦Ç°º¸±â ÆË¾÷Ã¢
function popWindow(url,name,width,height,scorll){
	openWindowCenter(url,name,width,height,scorll)
}