function setCookie( name, value, expiredays ) 
	{ 
	var todayDate = new Date(); 
	todayDate.setDate( todayDate.getDate() + expiredays ); 
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
	} 

function menu(idx) {
	switch(idx){
		case 1: document.location.href="/main.jsp"; break;
		case 2: document.location.href="/07sitemap/sitemap.jsp"; break;
		case 3: document.location.href="/01company/fam.jsp"; break;   // a
		case 4: setCookie( "languageCP", "en" , 1); window.open("http://eng.changsung.com/", "EnglishPage", ""); break;
		case 5: setCookie( "languageCP", "ja" , 1); window.open("http://japan.changsung.com/", "JapanPage", ""); break;
		case 6: setCookie( "languageCP", "cn" , 1); window.open("http://china.changsung.com/", "ChinaPage", ""); break;
	}
}

function menu_01(idx) {
	switch(idx){
		case 1: document.location.href="/01company/info.jsp?_top_menu=01&_sub_menu=01"; break;
		case 2: document.location.href="/01company/ceo.jsp?_top_menu=01&_sub_menu=02"; break;
		case 3: document.location.href="/01company/history.jsp?_top_menu=01&_sub_menu=03"; break;
		case 4: document.location.href="/01company/award.jsp?_top_menu=01&_sub_menu=07"; break;
		case 5: document.location.href="/01company/facinfo.jsp?_top_menu=01&_sub_menu=05"; break;
		case 6: document.location.href="/01company/fam.jsp?_top_menu=01&_sub_menu=06"; break;

	}
}

function menu_02(idx) {
	switch(idx){
		case 0: document.location.href="/02products/prodinfo.jsp?_top_menu=02"; break;
		case 1: document.location.href="/02products/cont1.jsp?_top_menu=02&_sub_menu=01"; break;
		case 101: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=01&_prod_menu1=01"; break;
		case 102: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=01&_prod_menu1=02"; break;
		case 103: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=01&_prod_menu1=03"; break;
		case 104: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=01&_prod_menu1=04"; break;
		case 105: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=01&_prod_menu1=05"; break;
		case 106: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=01&_prod_menu1=06"; break;
		case 107: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=01&_prod_menu1=07"; break;
		case 108: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=01&_prod_menu1=08"; break;
		case 109: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=01&_prod_menu1=09"; break;//
		case 110: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=01&_prod_menu1=10"; break;//
		case 111: document.location.href="/02products/TechInfo/list.jsp?menu=1"; break;
		case 112: document.location.href="/servlet/MainSvl?tc=kr.co.webstory.changsung.cmd.rohs.RohsPageListCmd&_top_menu=02&_sub_menu=01&_prod_menu1=12&part=A"; break;
		case 2: document.location.href="/02products/cont2.jsp?_top_menu=02&_sub_menu=02"; break;
		case 201: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=02&_prod_menu1=01"; break;
		case 211: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=02&_prod_menu1=01&_prod_menu2=01"; break;
		case 212: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=02&_prod_menu1=01&_prod_menu2=02"; break;
		case 213: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=02&_prod_menu1=01&_prod_menu2=03"; break;
		case 214: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=02&_prod_menu1=01&_prod_menu2=04"; break;

		case 221: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=02&_prod_menu1=02&_prod_menu2=01"; break;
		case 222: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=02&_prod_menu1=02&_prod_menu2=02"; break;
		case 223: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=02&_prod_menu1=02&_prod_menu2=03"; break;
		case 224: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=02&_prod_menu1=04&_prod_menu2=01"; break;
		
		//case 242: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=02&_prod_menu1=04&_prod_menu2=02"; break;
		//case 243: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=02&_prod_menu1=04&_prod_menu2=03"; break;
		//case 244: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=02&_prod_menu1=04&_prod_menu2=04"; break;

		case 202: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=02&_prod_menu1=02"; break;
		case 203: document.location.href="/02products/TechInfo/list.jsp?menu=2"; break;//
		case 204: document.location.href="/servlet/MainSvl?tc=kr.co.webstory.changsung.cmd.rohs.RohsPageListCmd&_top_menu=02&_sub_menu=02&_prod_menu1=14&part=B"; break;//
		case 3: document.location.href="/02products/cont3.jsp?_top_menu=02&_sub_menu=03"; break;
		case 301: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=03&_prod_menu1=01"; break;
		case 302: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=03&_prod_menu1=02"; break;
		case 303: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=03&_prod_menu1=03"; break;
		case 304: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=03&_prod_menu1=04"; break;
		case 305: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=03&_prod_menu1=05"; break;
		case 306: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=03&_prod_menu1=06"; break;
		case 307: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=03&_prod_menu1=07"; break;
		case 308: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=03&_prod_menu1=08"; break;
		case 309: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=03&_prod_menu1=09"; break;
		case 310: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=03&_prod_menu1=10"; break;
		case 311: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=03&_prod_menu1=11"; break;
		case 312: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=03&_prod_menu1=12"; break;
		case 313: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=03&_prod_menu1=13"; break;
		case 314: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=03&_prod_menu1=14"; break;
		case 315: document.location.href="/02products/TechInfo/list.jsp?menu=3"; break;
		case 316: document.location.href="/servlet/MainSvl?tc=kr.co.webstory.changsung.cmd.rohs.RohsPageListCmd&_top_menu=02&_sub_menu=03&_prod_menu1=16&part=C"; break;
		case 4: document.location.href="/02products/cont4.jsp?_top_menu=02&_sub_menu=04"; break;
		case 401: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=04&_prod_menu1=01"; break;
		case 402: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=04&_prod_menu1=02"; break;
		case 403: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=04&_prod_menu1=03"; break;
		case 404: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=04&_prod_menu1=04"; break;
		case 405: document.location.href="/02products/TechInfo/list.jsp?menu=4"; break;
		case 406: document.location.href="/servlet/MainSvl?tc=kr.co.webstory.changsung.cmd.rohs.RohsPageListCmd&_top_menu=02&_sub_menu=04&_prod_menu1=06&part=D"; break;
		case 5: document.location.href="/02products/cont5.jsp?_top_menu=02&_sub_menu=05"; break;
		case 501: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=05&_prod_menu1=01"; break;
		case 502: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=05&_prod_menu1=02"; break;
		case 503: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=05&_prod_menu1=03"; break;
		case 504: document.location.href="/02products/TechInfo/list.jsp?menu=5"; break;
		case 505: document.location.href="/servlet/MainSvl?tc=kr.co.webstory.changsung.cmd.rohs.RohsPageListCmd&_top_menu=02&_sub_menu=05&_prod_menu1=05&part=E"; break;
		case 6: document.location.href="/02products/cont6.jsp?_top_menu=02&_sub_menu=06"; break;
		case 601: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=06&_prod_menu1=01"; break;
		case 602: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=06&_prod_menu1=02"; break;
		case 603: document.location.href="/02products/product_new_detail.jsp?_top_menu=02&_sub_menu=06&_prod_menu1=03"; break;
		case 604: document.location.href="/02products/TechInfo/list.jsp?menu=6"; break;
		case 605: document.location.href="/servlet/MainSvl?tc=kr.co.webstory.changsung.cmd.rohs.RohsPageListCmd&_top_menu=02&_sub_menu=06&_prod_menu1=05&part=F"; break
		
	}
}

function menu_03(idx) {
	switch(idx){
		case 1: document.location.href="/03rnd/rndinfo.jsp?_top_menu=03&_sub_menu=01"; break;
		case 2: document.location.href="/03rnd/rndfield.jsp?_top_menu=03&_sub_menu=02"; break;
		case 21: document.location.href="/03rnd/rndfield_01.jsp?_top_menu=03&_sub_menu=02&_prod_menu1=01"; break;
		case 22: document.location.href="/03rnd/rndfield_02.jsp?_top_menu=03&_sub_menu=02&_prod_menu1=02"; break;
		case 23: document.location.href="/03rnd/rndfield_03.jsp?_top_menu=03&_sub_menu=02&_prod_menu1=03"; break;
		case 24: document.location.href="/03rnd/rndfield_04.jsp?_top_menu=03&_sub_menu=02&_prod_menu1=04"; break;
		case 25: document.location.href="/03rnd/rndfield_05.jsp?_top_menu=03&_sub_menu=02&_prod_menu1=05"; break;
		case 3: document.location.href="/03rnd/rndeq.jsp?_top_menu=03&_sub_menu=03"; break;
	}
}

function menu_04(idx) {
	switch(idx){
		//case 1: document.location.href="/04news/ne.jsp?_top_menu=04&_sub_menu=01"; break;
		case 1: document.location.href="/servlet/MainSvl?tc=kr.co.webstory.changsung.cmd.board.BoardPageListCmd&_top_menu=04&_sub_menu=01&board_part=A001&locale=ko"; break;
	}
}

function menu_05(idx) {
	switch(idx){
		case 1: document.location.href="/06con/cont.jsp?_top_menu=05&_sub_menu=01"; break;
		//case 1: document.location.href="/servlet/MainSvl?tc=kr.co.webstory.changsung.cmd.customer.WriteCheckCmd&_top_menu=05&_sub_menu=01"; break;
	}
}

function menu_06(idx) {
	switch(idx){

		case 1: document.location.href="/servlet/MainSvl?tc=kr.co.webstory.changsung.cmd.employ.EmployPageListCmd&locale=ko&_top_menu=06&_sub_menu=00"; break;
		//case 1: document.location.href="/05eng/eng01.jsp?_top_menu=06&_sub_menu=01"; break;
		case 2: document.location.href="/05eng/eng02.jsp?_top_menu=06&_sub_menu=01"; break;
		case 3: document.location.href="/05eng/eng05.jsp?_top_menu=06&_sub_menu=02"; break;
		//case 4: document.location.href="/05eng/eng03.jsp?_top_menu=06&_sub_menu=03&_prod_menu1=01"; break;
		case 4: document.location.href="/servlet/MainSvl?tc=kr.co.webstory.changsung.cmd.faq.FaqListCmd&locale=ko&_top_menu=06&_sub_menu=03&_prod_menu1=01&part=A001"; break;
		case 41: document.location.href="/servlet/MainSvl?tc=kr.co.webstory.changsung.cmd.faq.FaqListCmd&locale=ko&_top_menu=06&_sub_menu=03&_prod_menu1=01&part=A001"; break;
		//case 32: document.location.href="/05eng/QnA/list.jsp?_top_menu=06&_sub_menu=03&_prod_menu1=02"; break;
		case 42 : document.location.href="/servlet/MainSvl?tc=kr.co.webstory.changsung.cmd.qna.QnaPageListCmd&locale=ko&_top_menu=06&_sub_menu=03&_prod_menu1=02"; break;
	}
}

function menu_07(idx) {
	switch(idx){
		case 1: document.location.href="/07sitemap/sitemap.jsp"; break;
	}
}

function menu_08(idx) {
	switch(idx){
		case 1: document.location.href="/11greenreport/list.jsp"; break;
	}
}

function fn_siteGo() {
	var bottomSite = document.getElementById("bottomSite");
	if(bottomSite.value != "" && bottomSite.value.length != 0) {
		window.open(bottomSite.value, "NewSite", "");
	}
}


function fn_search() {
	var frm = document.frmSearch;

	frm.submit();
}

function fn_boardDetail() {

	var frm = document.frmDetail;
	var arg = fn_boardDetail.arguments;
	/*frm.idx.value = idx;
	if(locale) {
		frm.locale.value = locale;
	}
	if(board_part) {
		frm.board_part.value = board_part;
	}
	if(part) {
		frm.part.value = part;
	}*/
	for(i = 0; i < arg.length; i++) {
		if(i == 0) {
			frm.idx.value = arg[i];
		} else if(i == 1) {
			frm.locale.value = arg[i];
		} else if(i == 2) {
			frm.board_part.value = arg[i];
		} else if(i == 3) {
			frm.part.value = arg[i];
		}
	}
	frm.submit();
}

function fn_list() {
	var frm = document.frmList;

	frm.submit();
}