/************************************************************
*  
*  JavaScript 
*  
*  ÃÖÃÊ ÀÛ¼º : 2007. 04. 13
*  ÃÖÁ¾ ¼öÁ¤ : 2004. 04. 13
* 
************************************************************/

// ssl url mapping script
<!--
function url_protocol_mapping(get_url) {

	var get_protocol;
	var mapping_url_flag = "no"; 
	var mapping_url;

	//get_url = document.URL;
	//get_url = "https://www.orbis.co.kr/shop/step1.php?number=563";
	//alert("url ===> " + get_url);

	if ( get_url.length == 0 ) { //url ¿¡·¯
	
		//alert("get url error!!!");

	} else {

		get_protocol = get_url.substring(0, get_url.indexOf("://"));
		//alert(get_protocol);

		if ( get_protocol != "http" && get_protocol != "https" ) { //ÇÁ·ÎÅäÄÝ ¿¡·¯

			//alert("get protocol error!!!");

		} else { 
			
			/*
			if ( get_url.indexOf("/register/dream_poplogin.php") >=0 || get_url.indexOf("/register/step1.php") >= 0 || 
				 get_url.indexOf("/register/step1_3pop.php") >= 0 || get_url.indexOf("/register/step2.php") >= 0
			   ) { //https ÆäÀÌÁö
			*/

			if ( get_url.indexOf("/member/member_gaip1.php") >=0 || get_url.indexOf("/member/member_gaip2.php") >=0 || 
				 get_url.indexOf("/member/member_gaip3.php") >=0 || get_url.indexOf("/mypage/member_modify.php") >=0 || 
				 get_url.indexOf("/member/login.proc.php") >=0 
			   ) { //https ÆäÀÌÁö

				if ( get_protocol == "https" ) {
					mapping_url_flag = "no"; //https Á¤»ó
				} else {
					mapping_url_flag = "yes";
					mapping_url = get_url.replace("http","https")
				}

			} else { //http ÆäÀÌÁö

				if ( get_protocol == "http" ) {
					mapping_url_flag = "no"; //http Á¤»ó
				} else {
					mapping_url_flag = "yes";
					mapping_url = get_url.replace("https","http")
				}

			}

		}

	}

	//mapping action by mapping_url_flag
	if ( mapping_url_flag == "yes" ) {
		//alert("¸ÅÇÎurl case1 ===> " + mapping_url);
		document.location.replace(mapping_url);
	}

}
//-->

