/*
 * Agabang Community Link
 *
 * flash에서 사용할	경우 ex
 * > link =	"javascript:menulink('m1_1');";
 * > flash.extenal.ExternalInterface.call("함수명","인자값");
 */

function menulink( flag	){
	var	url;
	var s_ettoi = "";


	switch ( flag ){

		// common
		case "common_elle"     : url = "http://elle-shop.co.kr/baby"; break;		// elle
		case "common_basic"    : url = "http://elle-shop.co.kr/basicelle"; break;	// basic elle
		case "common_ettoi"    : url = "http://ettoi.co.kr"; break;					// ettoi

		case "common_agabang"  : url = "http://www.agabang.com"; break;				// agabang
		case "common_2ya2yao"  : url = "http://www.2ya2yao.com"; break;				// 2ya2yao
		case "common_dearBaby" : url = "http://www.dearbaby.co.kr"; break;			// dear	baby
		case "common_gymitt"   : url = "http://www.gymitt.com"; break;				// gymitt

		//case "common_aga_gallery" : url = ""; break;	// agabang gallery
		//case "common_littleorse"  : url = ""; break;	// littleorse


		// ettoi
		case "m0001" : url = s_ettoi + "index.jsp"; break;				// home
		case "m0101" : url = s_ettoi + "brand.jsp"; break;				// brand
		case "m0201" : url = s_ettoi + "catalogue.jsp"; break;			// catalogue(flash)
		case "m0301" : url = s_ettoi + "storeOpen.jsp"; break;			// store open
		case "m0302" : url = s_ettoi + "storeInfo.jsp"; break;			// store info
		case "m0401" : url = s_ettoi + "newsList.jsp"; break;				// news & event

	}

	if( flag == "common_elle" || flag == "common_basic" || flag == "common_ettoi" || flag == "common_agabang" || flag == "common_2ya2yao" || flag == "common_dearBaby" || flag == "common_gymitt" ){
		window.open( url );

	}else if( flag == "m0201" ){
//		wgn.openPopup( url, { width:800, height:600, top:0, left:0, scroll:0 } );
		wgn.openPopup( url, { scroll:0 } );

	}else if( flag == "m0401" ){
		view_board( "ETW_news", url );

	}else{
		if(	url	!= "" )	document.location.href = url;
		else			alert( "case : " + flag	);
	}

}
