
/******************************************************************************
* common.js                                                                   *
*                                                                             *
* Copyright 2008 by macos adamas.                                             *
* Web address: http://www.macos.co.kr                                         *
* Last update: October 31, 2008.                                              *
*                                                                             *
******************************************************************************/

/*===========================================================================*
                                Common
*============================================================================*/

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


var nonHttpsLoc = "http://www.macosadamas.com";


/*===========================================================================*
                                Flash Link
*============================================================================*/


function pop_event(str){
	
	
	switch (str) {
		
		// ¸ÅÀåÅõ¾î ¿¹¾à 
		case "agree_btn_1":
			Tour();
			break;
		
		// ¸ÅÀå Åõ¾î ¿¹¾à °øÁö 
		case "gogo_btn_1":
			location.href = nonHttpsLoc + '/customer/news_view.asp?idx=5';
			break;

		//notice ¼Ò½Ä	
		case "gogo_btn_2" :
			location.href = nonHttpsLoc + '/customer/news_list.asp';
			break;

		//ÀÌº¥Æ® È®ÀÎ 	
		case "gogo_btn_3" :
			location.href = nonHttpsLoc + '/event/event_now_list.asp';
			break;	
	
	}
	
}



function goFlashToPage(str) {
	
	//Å¾¸Þ´º¿¡¼­ÀÇ ¸µÅ© 
	
	//alert(str);
	switch (str) {
		
		// ¸ÞÀÎÀ¸·Î
		case "0_0":
			location.href = '../index.asp?oneDepthN=0&twoDepthN=0&threeDepthN=1&main=1';
			break;
		
		
		
		// MACOS ADMAS
		//-----------------------------------------------------------------
		// ¸ÞÀÎÀ¸·Î
		//case "1_0": //Ç®ÇÃ·¡½Ã ¸¶ÄÚ½º½ºÅä¸® ¸ÞÀÎ
		//	location.href = '../index_3d.asp?oneDepthN=1&twoDepthN=0&threeDepthN=1';
		//	break;
			
		case "1_0" :
			//alert(url);
			location.href = nonHttpsLoc + '/macos/macosadamas.asp';
			break;

		case "1_1" :
			//alert(url);
			location.href = nonHttpsLoc + '/macos/macosadamas.asp';
			break;

		case "1_2" :
			location.href = nonHttpsLoc + '/macos/bi.asp';
			break;

		case "1_3" :
			location.href = '../index_3d.asp?oneDepthN=1&twoDepthN=3&threeDepthN=1';
			break;

		case "1_4" :
			//alert(url);
			location.href = '../index_3d.asp?oneDepthN=1&twoDepthN=4&threeDepthN=1';
			break;	

		case "1_5" :
			location.href = nonHttpsLoc + '/macos/product_concept.asp';
			break;
			
		case "1_6" :
			location.href = nonHttpsLoc + '/macos/store_concept.asp';
			break;

			
			


		// with star
		//-----------------------------------------------------------------
		// ¸ÞÀÎÀ¸·Î

		//case "2_0": //Ç®ÇÃ·¡½Ã ¸¶ÄÚ½º½ºÅä¸® ¸ÞÀÎ
		//	location.href = nonHttpsLoc + '/community/withStars_list.asp';
		//	break;			

		case "2_0" :
			location.href = nonHttpsLoc + '/community/withStars_list.asp';
			break;	
			
		case "2_1" :
			location.href = nonHttpsLoc + '/community/withStars_list.asp';
			break;	
			
		case "2_2" :
			location.href = nonHttpsLoc + '/community/StarAd_list.asp?flag=ad';
			break;				
			
		case "2_3" :
			location.href = nonHttpsLoc + '/story/media_list.asp';
			break;

		case "2_4" :
			location.href = nonHttpsLoc + '/community/press_list.asp';
			break;	
			
			
			
		/*	
		// MACOS Story
		// ¸ÞÀÎÀ¸·Î
		case "2_0": //Ç®ÇÃ·¡½Ã ¸¶ÄÚ½º½ºÅä¸® ¸ÞÀÎ
			location.href = '../index_3d.asp?oneDepthN=2&twoDepthN=0&threeDepthN=1';
			break;
			
		case "2_1" :
			//alert(url);
			location.href = '../index_3d.asp?oneDepthN=2&twoDepthN=1&threeDepthN=1';
			break;

		case "2_2" :
			location.href = '../index_3d.asp?oneDepthN=2&twoDepthN=2&threeDepthN=1';
			break;

		case "2_3" :
			location.href = '../story/media_list.asp';
			break;

		case "2_4" :
			location.href = nonHttpsLoc + '/community/press_list.asp';
			break;			
			
		*/	
			
			
			
			
		// PRODUCT	
		//-----------------------------------------------------------------
		// ¸ÞÀÎÀ¸·Î
		case "3_0":
			location.href = '../index_3d.asp?oneDepthN=3&twoDepthN=0&threeDepthN=1';		
			break;
			
		case "3_1" :
			location.href = nonHttpsLoc + '/product/jewelry_list.asp';
			break;
		
		case "3_2" :
			location.href = nonHttpsLoc + '/product/eyewear_list.asp';
			break;	

		case "3_3" :
			location.href = nonHttpsLoc + '/product/wallet_list.asp';
			break;	

		case "3_4" :
			location.href = nonHttpsLoc + '/product/watch_list.asp';
			break;	

		case "3_5" :
			location.href = nonHttpsLoc + '/product/deco_list.asp';
			break;	
		
		



		//4¹ø¸Þ´ºÀÎµ¥ ¾ÈÀâÇô¼­...3¹ø¿¡..»çÀÌÆ®¸Ê¿ë¸µÅ©
		case "3_6":
			window.open('http://www.macosadamas.co.kr','_blank');
		break;

		//4¹ø¸Þ´ºÀÎµ¥ ¾ÈÀâÇô¼­...3¹ø¿¡..»çÀÌÆ®¸Ê¿ë¸µÅ©
		case "3_7":
			window.open('http://www.macosadamas.co.kr','_blank');
		break;
	
		//4¹ø¸Þ´ºÀÎµ¥ ¾ÈÀâÇô¼­...3¹ø¿¡..»çÀÌÆ®¸Ê¿ë¸µÅ©
		case "3_8":
			location.href = '/index_3d.asp';
		break;

		//4¹ø¸Þ´ºÀÎµ¥ ¾ÈÀâÇô¼­...3¹ø¿¡..»çÀÌÆ®¸Ê¿ë¸µÅ©
		case "3_9":
			location.href = nonHttpsLoc + '/customer/location.asp';
		break;





			
		// SHOP	/// »çÀÌÆ®¸Ê¿¡¼­¾ÈÅëÇÔ...3_6ºÎÅÍ ÀÌ¾îºÙÀÓ
		//-----------------------------------------------------------------
		//eshop 
		case "4_0":
			window.open('http://www.macosadamas.co.kr','_blank');
			break;	
			
		//eshop
		case "4_1":
			window.open('http://www.macosadamas.co.kr','_blank');
			break;	
		
		//3dshop
		case "4_2":
			location.href = nonHttpsLoc + '/index_3d.asp';
			break;	

		//3dshop
		case "4_3":
			location.href = nonHttpsLoc + '/customer/location.asp';
		break;			
			
		
			
		
		// COMMUNITY	
		//-----------------------------------------------------------------
		// ¸ÞÀÎÀ¸·Î
		case "5_0":
			location.href = '../index_3d.asp?oneDepthN=5&twoDepthN=0&threeDepthN=1';
			break;
			
		case "5_1" :
			location.href = nonHttpsLoc + '/community/ucczone_list.asp';
			break;

		case "5_2" :
			location.href = nonHttpsLoc + '/community/photo_list.asp';
			break;

		case "5_3" :
			location.href = nonHttpsLoc + '/community/love_list.asp';
			break;
		case "5_4" :
			location.href = nonHttpsLoc + '/community/date_list.asp';
			break;
		case "5_5" :
			window.open('http://www.macosadamas.co.kr/shop/goods/goods_photo_review.php','_blank');
			break;


			
		// NEWS & EVENT
		//-----------------------------------------------------------------
		// ¸ÞÀÎÀ¸·Î
		case "6_0":
		location.href = nonHttpsLoc + '/customer/news_list.asp';
		break;
		
		case "6_1" :
		location.href = nonHttpsLoc + '/customer/news_list.asp';
		break;		
		
		case "6_2":
		//alert("ÁØºñÁßÀÔ´Ï´Ù");
		location.href = nonHttpsLoc + '/event/event_now_list.asp';
		break;	
		
		case "6_3":
		location.href = nonHttpsLoc + '/event/event_end_list.asp';
		break;	
		
		case "6_4":
		location.href = nonHttpsLoc + '/event/event_result_list.asp';
		break;	

			
			
					
		// CUSTOMER
		//-----------------------------------------------------------------
		// »çÀÌÆ®¸Ê Å¸ÀÌÆ²¿ë 
		case "7_1" :
		//location.href = '../index_3d.asp?oneDepthN=6&twoDepthN=0&threeDepthN=1';	
		location.href = 'http://www.macosadamas.com/customer/faq_list.asp';
		break;

		case "7_2" : //QNA
			window.open('http://www.macosadamas.co.kr/shop/mypage/mypage_qna.php','_blank');
			break;

		case "7_3" : //1:1
			window.open('http://www.macosadamas.co.kr/shop/mypage/mypage_qna.php','_blank');
			break;

		case "7_4" :
			location.href = '/customer/location.asp';
			break;		

			

		
		//Membership
		//-----------------------------------------------------------------
		// »çÀÌÆ®¸Ê Å¸ÀÌÆ²¿ë 	
		case "8_1":
		window.open('http://www.macosadamas.co.kr/shop/member/login.php','_blank');
		break;

		//¾ÆÀÌµð/ºñ¹Ð¹øÈ£Ã£±â 
		case "8_2":
		location.href = 'https://www.macosadamas.com/member/idpw_search.asp';
		break;
		
		//È¸¿ø°¡ÀÔ 
		case "8_3":
		window.open('http://www.macosadamas.co.kr/shop/member/join.php','_blank');
		break;
		
		//»çÀÌÆ® ÀÌ¿ë¾à°ü
		case "8_4":
		location.href = nonHttpsLoc + '/member/agreement.asp';
		break;		
		
		//°³ÀÎÁ¤º¸ Ãë±ÞÁöÄ§ 
		case "8_5":
		location.href = nonHttpsLoc + '/member/privacy.asp';
		break;
		
		//ÀÌ¸ÞÀÏ ¹«´Ü¼öÁý °ÅºÎ 
		case "8_6":
		location.href = nonHttpsLoc + '/member/no_mail.asp';
		break;
		
		
		//°³ÀÎÁ¤º¸ 
		//-----------------------------------------------------------------
		// »çÀÌÆ®¸Ê Å¸ÀÌÆ²¿ë 	
		case "9_1":
		location.href = 'https://www.macosadamas.com/mypage/my_modify.asp';
		break;


		//My Gallery
		case "9_2":
		location.href = nonHttpsLoc + '/mypage/my_gallery_list.asp';
		break;
		
		//»ç¶ûÀÇ »ç¿¬½ÅÃ» 
		case "9_3":
		location.href = nonHttpsLoc + '/mypage/my_love_list.asp';
		break;
		
		//My Q&A
		case "9_4":
		location.href = nonHttpsLoc + '/mypage/my_qna_list.asp';
		break;		
		
		//My Tour
		case "9_5":
		location.href = nonHttpsLoc + '/mypage/my_storeTour_list.asp';
		break;		

			

		//Site Map	
		//-----------------------------------------------------------------
		case "11_1":
		alert("ÁØºñÁßÀÔ´Ï´Ù");
		break;	
		

		//logout
		//-----------------------------------------------------------------
		case "12_1":
		location.href = '/member/logout.asp';
		break;
				

		//3dshop
		//-----------------------------------------------------------------
		case "13_1":
		//alert("ÁØºñÁßÀÔ´Ï´Ù");
		location.href = nonHttpsLoc + '/index_3d.asp';
		break;	
		
		
		//eshop
		//-----------------------------------------------------------------
		case "14_1":
		window.open('http://www.macosadamas.co.kr','_blank');
		//alert("ÁØºñÁßÀÔ´Ï´Ù");
		break;	
	}
	




}
function flashBottomLink(str){
		
	// bottom ÇÃ·¡½Ã¿¡¼­ÀÇ ¸µÅ© 	
	//alert(str);
	switch (str) {
			
		//°³ÀÎÁ¤º¸ Ãë±ÞÁöÄ§ 
		case "personalInfo":
		location.href = nonHttpsLoc + '/member/privacy.asp';
		break;
		
		//ÀÌ¸ÞÀÏ ¹«´Ü ¼öÁý °ÅºÎ 
		case "collectionRefusal":
		location.href = nonHttpsLoc + '/member/no_mail.asp';
		break;
		
		//½ÎÀÌÆ® ÀÌ¿ë ¾à°ü 
		case "agreeMent":
		location.href = nonHttpsLoc + '/member/agreement.asp';
		break;
		
		//Æä¹Ð¸®½ÎÀÌÆ® lookopics
		case "lookoptics":
		window.open('http://www.lookoptics.co.kr/','_blank');
		break;
		
		//Æä¹Ð¸®½ÎÀÌÆ® rainbow
		case "rainbow":
		window.open('http://www.lookrainbow.com','_blank');
		break;
	}
}
function flashLeftLink(str){
		
	// left ÇÃ·¡½Ã¿¡¼­ÀÇ ¸µÅ© & »çÀÌÆ®¸ÊÀ»À§ÇØ¼­ ÇÊ¿äÇÔ 
	//alert(str);
	switch (str) {
			
		//MacosAdamas
		case "1_1_1":
			location.href = nonHttpsLoc + '/macos/macosadamas.asp';
			break;

		//BI
		case "1_2_1":
			location.href = nonHttpsLoc + '/macos/bi.asp';
			break;
		
		case "1_3_1" :
			//alert(url);
			location.href = '../index_3d.asp?oneDepthN=1&twoDepthN=3&threeDepthN=1';
			break;

		case "1_4_1" :
			location.href = '../index_3d.asp?oneDepthN=1&twoDepthN=4&threeDepthN=1';
			break;
		
		//ProductConcept
		case "1_5_1":
			location.href = nonHttpsLoc + '/macos/product_concept.asp';
			break;
		
		//StoreConcept
		case "1_6_1":
			location.href = nonHttpsLoc + '/macos/store_concept.asp';
			break;		
			


		
		//----------------------------------------------------------------
		//withstar 	
	
		case "2_1_1":
			location.href = nonHttpsLoc + '/community/withStars_list.asp';
			break;		
		
		case "2_2_1":
			location.href = nonHttpsLoc + '/community/StarAd_list.asp?flag=ad';
			break;	

		case "2_3_1" :
			location.href = '../story/media_list.asp';
			break;

		case "2_4_1" :
			location.href = nonHttpsLoc + '/community/press_list.asp';
			break;		
			
			
		//----------------------------------------------------------------
		//Jewelry 

		case "3_1_1":
		location.href = nonHttpsLoc + '/product/jewelry_list.asp';
		break;
		
		//Eyewear
		case "3_2_1":
		location.href = nonHttpsLoc + '/product/eyewear_list.asp';
		break;		
		//Wallet 
		case "3_3_1":
		location.href = nonHttpsLoc + '/product/wallet_list.asp';
		break;
		
		//Watch
		case "3_4_1":
		location.href = nonHttpsLoc + '/product/watch_list.asp';
		break;		

		//Deco
		case "3_5_1":
		location.href = nonHttpsLoc + '/product/deco_list.asp';
		break;		



			
		
		//-----------------------------------------------------------------
		// ucczone 
		case "5_1_1":
		location.href = nonHttpsLoc + '/community/ucczone_list.asp';
		break;
		
		// PHOTO IN MACOS
		case "5_2_1":
		location.href = nonHttpsLoc + '/community/photo_list.asp';
		break;
		
		// Love, ½ÅºñÀÇ ¹æ ¼Ò°³ 
		case "5_3_1":
		location.href = nonHttpsLoc + '/community/love_list.asp';
		break;
		
		// µ¥ÀÌÆ® ÄÚ½º
		case "5_4_1":
		location.href = nonHttpsLoc + '/community/date_list.asp';
		break;
		
		// ÈÄ±â
		case "5_5_1":
		window.open('http://www.macosadamas.co.kr/shop/goods/goods_photo_review.php','_blank');
		break;		
		
				


			
		// SHOP	
		//-----------------------------------------------------------------
		//eshop
		case "4_1_1":
			window.open('http://www.macosadamas.co.kr','_blank');
			break;	
		
		//3dshop
		case "4_2_1":
			location.href = nonHttpsLoc + '/index_3d.asp';
			break;
			
		//3dshop
		case "4_3_1":
			location.href = nonHttpsLoc + '/index_3d.asp';
			break;	



		
		//-----------------------------------------------------------------		
		// NEWS & EVENT
		// ¸ÞÀÎÀ¸·Î
		case "6_1_1" :
		location.href = nonHttpsLoc + '/customer/news_list.asp';
		break;		
		
		case "6_2_1":
		//alert("ÁØºñÁßÀÔ´Ï´Ù");
		location.href = nonHttpsLoc + '/event/event_now_list.asp';
		break;	
		
		case "6_3_1":
		location.href = nonHttpsLoc + '/event/event_end_list.asp';
		break;	
		
		case "6_4_1":
		location.href = nonHttpsLoc + '/event/event_result_list.asp';
		break;			
			
			
		//-----------------------------------------------------------------			
		// CUSTOMER
		// ¸ÞÀÎÀ¸·Î
		
		case "7_1_1" :
			location.href = nonHttpsLoc + '/customer/faq_list.asp';
			break;

		case "7_2_1" : //QNA
			window.open('http://www.macosadamas.co.kr/shop/mypage/mypage_qna.php','_blank');
			break;

		case "7_3_1" : //1:1
			window.open('http://www.macosadamas.co.kr/shop/mypage/mypage_qna.php','_blank');
			break;

		case "7_4_1" :
			location.href = nonHttpsLoc + '/customer/location.asp';
			break;		
			

		
		//-----------------------------------------------------------------			
		//Member
		//·Î±×ÀÎ 
		case "8_1_1":
		window.open('http://www.macosadamas.co.kr/shop/member/login.php','_blank');
		break;
		
		//¾ÆÀÌµð/ºñ¹Ð¹øÈ£Ã£±â 
		case "8_2_1":
		location.href = 'https://www.macosadamas.com/member/idpw_search.asp';
		break;
		
		//È¸¿ø°¡ÀÔ 
		case "8_3_1":
		window.open('http://www.macosadamas.co.kr/shop/member/join.php','_blank');
		break;
		
		//»çÀÌÆ® ÀÌ¿ë¾à°ü
		case "8_4_1":
		location.href = nonHttpsLoc + '/member/agreement.asp';
		break;		
		
		//°³ÀÎÁ¤º¸ Ãë±ÞÁöÄ§ 
		case "8_5_1":
		location.href = nonHttpsLoc + '/member/privacy.asp';
		break;
		
		//ÀÌ¸ÞÀÏ ¹«´Ü¼öÁý °ÅºÎ 
		case "8_6_1":
		location.href = nonHttpsLoc + '/member/no_mail.asp';
		break;	
		
		
		
		//-----------------------------------------------------------------
		//°³ÀÎÁ¤º¸¼öÁ¤  
		case "9_1_1":
		location.href = 'https://www.macosadamas.com/mypage/my_modify.asp';
		break;
		
		//My Gallery
		case "9_2_1":
		location.href = nonHttpsLoc + '/mypage/my_gallery_list.asp';
		break;
		
		//»ç¶ûÀÇ »ç¿¬½ÅÃ» 
		case "9_3_1":
		location.href = nonHttpsLoc + '/mypage/my_love_list.asp';
		break;
		
		//My Q&A
		case "9_4_1":
		location.href = nonHttpsLoc + '/mypage/my_qna_list.asp';
		break;		
		
		//My Tour
		case "9_5_1":
		location.href = nonHttpsLoc + '/mypage/my_storeTour_list.asp';
		break;			
		

	}
}


function Tour() {
	
	window.open('/customer/storeTour.asp', 'popup02','toolbar=no,width=460,height=470,directories=no,status=yes,scrollbars=no,resizable=no,menubar=no,top=0,left=0');

}
