﻿function resizeFrame(iframeObj){
  var innerBody = iframeObj.contentWindow.document.documentElement;
  var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
  var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
    if(innerHeight>0 && innerWidth>0){
        iframeObj.style.height = innerHeight + "px";
        iframeObj.style.width = innerWidth + "px";
		ModeTour_setCenter(iframeObj);
	}
}

function MoaFramePop(obj,Params){
    /* str 파트너 여행사 (공통) */
	if (obj=='select_tour') {ModeTour('/Popup/Partner/PartnerSearch.aspx' + Params,'iframe','800px','620px','1',false);} //파트너 여행사 선택
	else if (obj=='select_tour_view') {ModeTour('/Popup/Partner/PartnerView.aspx' + Params,'iframe','750px','639px','0',false);} //파트너 제휴사 상세정보
	/* end 파트너 여행사 (공통) */

	/* str 상품 비교 관련 (공통) */
	else if (obj=='package_basket') {ModeTour('/Popup/Package/Pickon/PickBasket.aspx?' + Params,'iframe','630px','680px','1',true);} //여행상품 비교 바구니
	else if (obj=='package_combine') {ModeTour('/Popup/Package/Pickon/PickView.aspx?' + Params,'iframe','781px','843px','1',true);} //여행상품 비교하기
	else if (obj=='pop_combine') {    //여행상품비교
	    var pop_combine_msg = "<div style=\"display:none;\">";
        pop_combine_msg += "  <div id=\"pop_combine_msg\" class=\"pop01\">";
        pop_combine_msg += "      <div class=\"popintop01 forpng\">";
        pop_combine_msg += "          <img src=\"http://img.modetour.co.kr/mode2010/modetour/search/txt_product_pop01.gif\" alt=\"상품비교\" class=\"mgt30 mgl25\" />";
        pop_combine_msg += "          <a href=\"javascript:;\" class=\"closex01\" onclick=\"ModeTour();\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_x.gif\" alt=\"close\" /></a>";
        pop_combine_msg += "          <div class=\"tourprofile01\">";
        pop_combine_msg += "              <p class=\"textcont01\"><span class=\"bold\">선택하신 상품을 비교바구니에 담았습니다.</span><br />지금 바로 비교 바구니를 확인 하시겠습니까?</p>";
        pop_combine_msg += "              <p class=\"brdbtn01\"><a href=\"javascript:;\" onclick=\"MoaFramePop('package_basket'); parent.ModeTour();\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_confirm.gif\" alt=\"확인\" /></a><a href=\"#\" onclick=\"parent.ModeTour();\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_cancel.gif\" alt=\"취소\" /></a></p>";
        pop_combine_msg += "          </div>";
        pop_combine_msg += "      </div>";
        pop_combine_msg += "      <div class=\"popinbottom01 forpng\"></div>";
        pop_combine_msg += "  </div>";
        document.getElementById(obj).innerHTML += "</div>";
        document.getElementById(obj).innerHTML = pop_combine_msg;
	    ModeTour('pop_combine_msg','html');
	}
	else if (obj=='zzim') {    //찜상품 등록(여행상품)
	    var pop_combine_msg = "<div style=\"display:none;\">";
        pop_combine_msg += "  <div id=\"pop_combine_msg\" class=\"pop01\">";
        pop_combine_msg += "      <div class=\"popintop01 forpng\">";
        pop_combine_msg += "          <img src=\"http://img.modetour.co.kr/mode2010/modetour/search/txt_product_pop01.gif\" alt=\"상품\" class=\"mgt30 mgl25\" />";
        pop_combine_msg += "          <a href=\"javascript:;\" class=\"closex01\" onclick=\"ModeTour();\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_x.gif\" alt=\"close\" /></a>";
        pop_combine_msg += "          <div class=\"tourprofile01\">";
        pop_combine_msg += "              <p class=\"textcont01\"><span class=\"bold\">선택하신 상품을 상품찜에 담았습니다.</span><br />지금 바로 내가 찜한 상품을 확인 하시겠습니까?</p>";
        if(Params == 'D')
        {
            pop_combine_msg += "              <p class=\"brdbtn01\"><a href=\"#\" onclick=\"javascript:location.href='/MyPage/Myzzimtour.aspx?mloc=1507'\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_confirm.gif\" alt=\"확인\" /></a><a href=\"#\" onclick=\"parent.ModeTour();\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_cancel.gif\" alt=\"취소\" /></a></p>";
        }
        else if (Params == 'K')
        {
            pop_combine_msg += "              <p class=\"brdbtn01\"><a href=\"#\" onclick=\"javascript:location.href='/MyPage/Myzzimplan.aspx?mloc=1507'\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_confirm.gif\" alt=\"확인\" /></a><a href=\"#\" onclick=\"parent.ModeTour();\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_cancel.gif\" alt=\"취소\" /></a></p>";
        }
        pop_combine_msg += "          </div>";
        pop_combine_msg += "      </div>";
        pop_combine_msg += "      <div class=\"popinbottom01 forpng\"></div>";
        pop_combine_msg += "  </div>";
        document.getElementById(obj).innerHTML += "</div>";
        document.getElementById(obj).innerHTML = pop_combine_msg;
	    ModeTour('pop_combine_msg','html');
	}
	else if (obj=='scrap') {    //스크랩 등록
	    var pop_combine_msg = "<div style=\"display:none;\">";
        pop_combine_msg += "  <div id=\"pop_combine_msg\" class=\"pop01\">";
        pop_combine_msg += "      <div class=\"popintop01 forpng\">";
        pop_combine_msg += "          <img src=\"http://img.modetour.co.kr/mode2010/modetour/search/txt_product_pop01.gif\" alt=\"상품\" class=\"mgt30 mgl25\" />";
        pop_combine_msg += "          <a href=\"javascript:;\" class=\"closex01\" onclick=\"ModeTour();\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_x.gif\" alt=\"close\" /></a>";
        pop_combine_msg += "          <div class=\"tourprofile01\">";
        pop_combine_msg += "              <p class=\"textcont01\"><span class=\"bold\">선택하신 상품을 스크랩에 담았습니다.</span><br />지금 바로 내가 선택한 스크랩을 확인 하시겠습니까?</p>";
        pop_combine_msg += "              <p class=\"brdbtn01\"><a href=\"#\" onclick=\"javascript:location.href='/MyPage/Myscrap"+Params+".aspx?mloc=1506'\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_confirm.gif\" alt=\"확인\" /></a><a href=\"#\" onclick=\"parent.ModeTour();\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_cancel.gif\" alt=\"취소\" /></a></p>";
        pop_combine_msg += "          </div>";
        pop_combine_msg += "      </div>";
        pop_combine_msg += "      <div class=\"popinbottom01 forpng\"></div>";
        pop_combine_msg += "  </div>";
        document.getElementById(obj).innerHTML += "</div>";
        document.getElementById(obj).innerHTML = pop_combine_msg;
	    ModeTour('pop_combine_msg','html');
	}
	else if(obj=='tozzim')
	{
	    var pop_combine_msg = "<div style=\"display:none;\">";
		pop_combine_msg += "    <div id=\"tozzim\" class=\"pop01\">";
		pop_combine_msg += "	    <div class=\"popintop01 forpng\">";
		pop_combine_msg += "		    <a href=\"#\" class=\"closex01\" onclick=\"ModeTour();\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_x.gif\" alt=\"close\" /></a>";
		pop_combine_msg += "		    <div class=\"tourprofile01\">";
		pop_combine_msg += "			    <div class=\"textcont01\">로그인 후에 상품찜이 가능합니다.<br /><strong>로그인 하시겠습니까?</strong></div>";
		pop_combine_msg += "			    <div class=\"brdbtn01\"><a href=\"#\" onclick=\"javascript:gologin_tozzim()\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_confirm.gif\" alt=\"확인\" /></a><a href=\"#\" onclick=\"parent.ModeTour();\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_cancel.gif\" alt=\"취소\" class=\"mgl1\" /></a></div>";
		pop_combine_msg += "		    </div>";
		pop_combine_msg += "	    </div>";
		pop_combine_msg += "	    <div class=\"popinbottom01 forpng\"></div>";
		pop_combine_msg += "    </div>";
	    pop_combine_msg += " </div>";
	    document.getElementById("zzim").innerHTML += "</div>";
        document.getElementById("zzim").innerHTML = pop_combine_msg;
	    ModeTour('tozzim','html');
	}
	else if(obj=='toscrap')
	{
	    var pop_combine_msg = "<div style=\"display:none;\">";
		pop_combine_msg += "    <div id=\"toscrap\" class=\"pop01\">";
		pop_combine_msg += "	    <div class=\"popintop01 forpng\">";
		pop_combine_msg += "		    <a href=\"#\" class=\"closex01\" onclick=\"ModeTour();\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_x.gif\" alt=\"close\" /></a>";
		pop_combine_msg += "		    <div class=\"tourprofile01\">";
		pop_combine_msg += "			    <div class=\"textcont01\">로그인 후에 스크랩이 가능합니다.<br /><strong>로그인 하시겠습니까?</strong></div>";
		pop_combine_msg += "			    <div class=\"brdbtn01\"><a href=\"#\" onclick=\"javascript:gologin_toscrap()\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_confirm.gif\" alt=\"확인\" /></a><a href=\"#\" onclick=\"parent.ModeTour();\"><img src=\"http://img.modetour.co.kr/mode2010/modetour/common/btn_cancel.gif\" alt=\"취소\" class=\"mgl1\" /></a></div>";
		pop_combine_msg += "		    </div>";
		pop_combine_msg += "	    </div>";
		pop_combine_msg += "	    <div class=\"popinbottom01 forpng\"></div>";
		pop_combine_msg += "    </div>";
	    pop_combine_msg += " </div>";
	    document.getElementById("scrap").innerHTML += "</div>";
        document.getElementById("scrap").innerHTML = pop_combine_msg;
	    ModeTour('toscrap','html');
	}

	/* end 상품 비교 관련 (공통) */

	/* str 통합검색  팝업창 크기를 넘기지 않아도 됩니다. */
	//else if (obj=='search_copyaddr') {ModeTour('http://121.128.226.60/html/search/popup_copyaddr.html','iframe','350px','219px','0',false);} //메일 주소 복사
	//else if (obj=='search_aboutproduct') {ModeTour('http://121.128.226.60/html/search/popup_aboutproduct.html','iframe','487px','318px','0',false);} //관련 여행상품
    //else if (obj=='search_tax') {ModeTour('http://121.128.226.60/html/search/popup_tax.html','iframe','350px','239px','0',false);} //항공 TAX 정보 (★ 실시간 항공)
	//else if (obj=='search_ticket') {ModeTour('http://121.128.226.60/html/search/popup_ticket.html','iframe','443px','317px','0',false);} //항공권 조회 (★ 실시간 항공)
	//else if (obj=='search_airpay') {ModeTour('http://121.128.226.60/html/search/popup_airpay.html','iframe','707px','650px','0',true);} //항공요금 규정 (★ 실시간 항공)
	//else if (obj=='search_recommand') {ModeTour('http://121.128.226.60/html/search/popup_recommand.html','iframe','682px','960px','0',false);} //모두투어 호텔 추천 메일 미리 보기 (★ 호텔)
	//else if (obj=='search_recommand2') {ModeTour('http://121.128.226.60/html/search/popup_recommand2.html','iframe','681px','1145px','0',false);} //모두투어 여행상품 추천 메일 미리 보기 (★ 호텔)

	else if (obj=='Main_Sale') {ModeTour('/Popup/Main/DDaySale.aspx','iframe','770px','720px','1',false);} //당일할인 여행상품

	else if (obj=='pop_aboutproduct') {ModeTour(obj,'html');} //관련 여행상품
	else if (obj=='pop_copyaddr') {ModeTour(obj,'html');} //메일 주소 복사
	else if (obj=='pop_product') {ModeTour(obj,'html');} //상품비교
	else if (obj=='pop_scrap') {ModeTour(obj,'html');} //스크랩완료
	else if (obj=='pop_mailok') {ModeTour(obj,'html');} //메일 발송 확인
	else if (obj=='pop_hotel') {ModeTour(obj,'html');} //호텔팝업
	else if (obj=='pop_groupdiscount') {ModeTour(obj,'html');} // 20091012 단체 할인 항공권 정보 팝업 수정
	else if (obj=='pop_airpay') {ModeTour(obj,'html');} // 20091022 항공 요금 규정 팝업 수정
	else if (obj=='pop_airpay_tax') {ModeTour(obj,'html');} // 20091026 항공 TAX 정보
	else if (obj=='trip_level') {ModeTour(obj,'html');}
	else if (obj=='trip_select_level') {ModeTour(obj,'html');}
	else if (obj=='trip_card') {ModeTour(obj,'html');} //무이지 할부 안내
	else if (obj=='trip_guideprice') {ModeTour(obj,'html');} //요금 안내
	else if (obj=='trip_slideshow') {ModeTour(obj,'html');} // 20091110 슬라이드쇼
	/* end 통합검색 */

	/* str 여행일정 */
	else if (obj=='product_insurance') {ModeTour('/w3c/Insurance/Popup.aspx?gu=Overseas','iframe','780px','765px','1',false);}//해외여행보험
	else if (obj=='product_insurance2') {ModeTour('/w3c/Insurance/Popup.aspx?gu=Domestic','iframe','780px','765px','1',false);}//국내여행보험
	else if (obj=='product_agreement1') {ModeTour('/w3c/TravelAgreementOverseas.aspx','iframe','780px','765px','1',false);}//해외여행약관
	else if (obj=='product_agreement2') {ModeTour('/w3c/TravelAgreementDomestic.aspx','iframe','780px','765px','1',false);}//국내여행약관
	else if (obj=='product_agreement3') {ModeTour('/w3c/TravelAgreementGeumgang.aspx','iframe','780px','765px','1',false);}//금강산여행약관

	else if (obj=='product_photo') {ModeTour('/Popup/Package/Itinerary/Photo.html','iframe2','780px','765px','0',false);}//사진 확대보기
	else if (obj=='product_photo2') {ModeTour('/Popup/Package/Itinerary/Photo2.html?' + Params,'iframe','780px','770px','0',false);}//사진 확대보기
	else if (obj=='product_photo3') {ModeTour('/Popup/Package/Itinerary/PlaceZoomPhoto.html?' + Params,'iframe2','780px','770px','0',false);}//사진 확대보기

    else if (obj=='product_reserve_tourmall') {ModeTour(obj,'html');} //투어마일리지 전용몰상품 안내문구
	else if (obj=='product_reserve_request') {ModeTour(obj,'html');} //예약문의
	else if (obj=='product_reserve_wait') {ModeTour(obj,'html');} //대기예약
	else if (obj=='product_reserve_end') {ModeTour(obj,'html');} //예약마감
	else if (obj=='product_guide_info') {ModeTour('/Popup/Package/Itinerary/Guide_info.html?Pnum=' + Params,'iframe','352px','252px','0',false);} //인솔자 정보
	else if (obj=='trip_levelguide') {ModeTour('/Popup/Package/Itinerary/Product_Grade.html?Pnum=' + Params,'iframe','907px','650px','1',false);} //상품등급제 안내	
	else if (obj=='booking_stateinfo') {ModeTour('/Popup/Package/Itinerary/Product_StateInfo.html','iframe','700px','430px','0',false);} //예약상태 안내

    /***** 메일 공통 *****/
	else if (obj=='product_sendmail') {ModeTour('/Popup/Package/Itinerary/Mail_Input.aspx?' + Params,'iframe','770px','539px','1',false);} //메일 발송
	else if (obj=='product_preview2') {ModeTour('/Popup/Package/Itinerary/Mail_Content.html?' + Params,'iframe','750px','863px','1',false);} //모두투어 여행상품 추천 메일 미리 보기
		
	
	else if (obj=='product_setprint') {ModeTour('/Popup/Package/Itinerary/Print_Input.html?' + Params,'iframe','770px','625rpx','1',false);} //프린트 설정하기
	else if (obj=='product_Briefingprint') {ModeTour('/Popup/Package/Briefing/Print_Input.html?' + Params,'iframe2','590px','410rpx','1',false);} //프린트 설정하기2
	else if (obj=='product_Briefingsendmail') {ModeTour('/Popup/Package/Briefing/Mail_Input.html?' + Params,'iframe2','590px','410rpx','1',false);} //메일 발송2
	else if (obj=='product_Agreement') {ModeTour('/Popup/Package/Itinerary/Print.aspx?' + Params,'iframe','800px','800px','1',false);} //여행계약서
	else if (obj=='product_place') {ModeTour('/Popup/Package/Itinerary/Place.html?' + Params,'iframe','750px','497px','0',false);} //미팅장소	
	else if (obj=='product_other') {ModeTour('/Popup/Package/Itinerary/Product_Other.html','iframe','770px','513px','1',false);} //다른일정의 여행상품 보기
	else if (obj=='product_explain') {ModeTour('/Popup/Package/Briefing/Set_Item.html?' + Params,'iframe','790px','730px','1',false);} //여행설명회보기 선택
	else if (obj=='product_point1') {ModeTour('http://121.128.226.60/html/product/popup_point1.html','iframe','779px','1170px','0',false);} //여행설명 간략히 보기
	/* end 여행일정 */


	/* str 해외 호텔 */
	else if (obj=='hotel_search_city') {ModeTour('/Popup/Ticket/Hotel/HotelSearchCity.aspx?' + Params,'iframe','400px','288px','0',false);}         // 도시 직접검색
	else if (obj=='hotel_select_city') {ModeTour('/Popup/Ticket/Hotel/HotelSelectCity.aspx?' + Params,'iframe','708px','504px','1',false);}         // 주요도시 바로선택
	else if (obj=='hotel_search_map') {ModeTour('/Popup/Ticket/Hotel/HotelMapResult.aspx?' + Params,'iframe','960px','680px','1',false);}           // 검색된 호텔 지도보기
	else if (obj=='hotel_basket') {ModeTour('/Popup/Ticket/Hotel/HotelPickBasket.aspx','iframe','622px','460px','1',false);}                        // 호텔 비교 바구니
	else if (obj=='hotel_combine') {ModeTour('/Popup/Ticket/Hotel/HotelPickView.aspx?' + Params,'iframe','928px','460px','1',false);}               // 호텔 비교하기
	else if (obj=='hotel_sendmail') {ModeTour('/Popup/Ticket/Hotel/Mail_Input.html','iframe','770px','539px','1',false);}                           // 메일 발송
	else if (obj=='hotel_previewmail') {ModeTour('/Popup/Ticket/Hotel/Mail_Content.html?' + Params,'iframe','750px','863px','1',false);}            // 메일 미리 보기
	else if (obj=='hotel_pricedetail') {ModeTour('/Popup/Ticket/Hotel/HotelPriceDetail.aspx?' + Params,'iframe','717px','460px','1',false);}        // 상세 요금정보
	else if (obj=='hotel_alertcancel') {ModeTour('/Popup/Ticket/Hotel/HotelAlertCancel.aspx?' + Params,'iframe','400px','238px','0',false);}        // 예약취소에 대한 경고 메세지
	else if (obj=='air_pop_partner_info') {ModeTour(obj,'html');}
	/* end 해외 호텔 */

	/* str 국내 호텔 */
	else if (obj == 'hotelk_pricedetail') { ModeTour('/Popup/Ticket/Hotel/HotelKPriceDetail.aspx?' + Params, 'iframe', '717px', '460px', '1', false); }        // 상세 요금정보
	else if (obj == 'hotelk_search_map') { ModeTour('/Popup/Ticket/Hotel/HotelKMapResult.aspx?' + Params, 'iframe', '960px', '680px', '1', false); }           // 검색된 호텔 지도보기
	else if (obj == 'hotelK_basket') { ModeTour('/Popup/Ticket/Hotel/HotelKPickBasket.aspx', 'iframe', '622px', '460px', '1', false); }                       // 호텔 비교 바구니
	else if (obj == 'hotelK_combine') { ModeTour('/Popup/Ticket/Hotel/HotelKPickView.aspx?' + Params, 'iframe', '660px', '460px', '1', false); }               // 호텔 비교하기
	/* end 국내 호텔 */

	/* str 해외 할인호텔 */
	else if (obj=='hotelDSearch')  {ModeTour('/Popup/Ticket/Hotel/HotelDSearch.aspx' + Params,'iframe','680px','400px','0',true);}                  // 예약 설정 팝업
	/* end 해외 할인호텔 */

	/* str 해외 항공권 */
	else if (obj=='city_search_info')  {ModeTour('/Popup/Ticket/Air/OverseasSearchCity.aspx?' + Params,'iframe','379px','288px','0',false);}        // 도시 직접검색
	else if (obj=='air_search_city_info')  {ModeTour('/Popup/Ticket/Air/OverseasSelectCity.aspx?' + Params,'iframe','465px','377px','0',false);}    // 주요도시 바로선택
	/* end 해외 항공권 */

	/* str 해외 할인항공권 */
	else if (obj=='air_list_reserve')  {ModeTour('/Popup/Ticket/Air/DiscountSearch.aspx' + Params,'iframe','506px','550px','0',true);}     // 항공권 조회
	/* end 해외 할인항공권 */

    /* str 국내 항공권 */
    else if (obj=='air_search_info')  {ModeTour('/Popup/Ticket/Air/DomesticFlyingInfo.aspx' + Params,'iframe','401px','460px','0',false);}  // 운항정보 조회
    /* end 국내 항공권 */



	/* str 단체 할인 항공권 */
	else if (obj=='groupair_info') {ModeTour('/Popup/Ticket/GroupAirInfo.aspx' + Params,'iframe','537px','740px','0',false);} //단체 할인 항공권 정보
	/* end 단체 할인 항공권 */
	
    	
	/* str 매거진 */
	else if (obj=='popup_request_ok') {ModeTour('/popup/travelinfo/magazine/popup_request_ok.html','iframe','780px','765px','0',false);}// 정기구독 신청 완료기
	else if (obj=='popup_advertise_ok') {ModeTour('/popup/travelinfo/magazine/popup_advertise_ok.html','iframe','680px','590px','0',false);}//광고 문의 접수 완료
	/* end 매거진 */

	/* str 기획상품 */
	else if (obj=='popup_request_ok') {ModeTour('http://121.128.226.60/html/utility/magazine/popup_selectPlan.html','iframe','780px','765px','0',false);}//사진 확대보기
	/* end 기획상품 */

	/* str 로그인 */
	else if (obj=='login_re_pw') {ModeTour('http://121.128.226.60/html/member/popup_pw_re_ok.html','iframe','780px','765px','0',false);}// 비밀번호 재발급받기 요청
	else if (obj=='login_pw') {ModeTour('http://121.128.226.60/html/member/popup_pw_ok.html','iframe','680px','590px','0',false);}// 비밀번호 변경 완료
    else if (obj=='pop_login') {ModeTour('/popup/Member/Login2.aspx?ReUrl=' + Params,'iframe2','381px','419px','0',false);} // 로그인 레이어 팝업(비회원예약 부분있음) [03.15 김민경 추가]

    else if (obj=='pop_login2') {ModeTour('/popup/Member/Login.aspx?ReUrl=' + Params,'iframe','381px','340px','0',false);} // 로그인 일반팝업(비회원예약 부분없음)
    else if (obj=='pop_login3') {ModeTour('/popup/Member/Login2.aspx?ReUrl=' + Params,'iframe','381px','419px','0',false);} // 로그인 일반팝업(비회원예약 부분있음) (팝업 [07.13 김민경 추가]
	/* end 로그인 */

    /* str 예약 결제 및 기타문의 */
    else if (obj=='pop_counsel_del') {ModeTour(obj,'html');} // 삭제 확인 팝업
    /* 여행후기,포토팡팡 로그인 */
    else if (obj=='pop_login_check') {ModeTour(obj,'html');}
    /* 여행후기,포토팡팡 추천용 로그인 */
    else if (obj=='pop_login_check_recommend') {ModeTour(obj,'html');}
    /* end 예약 결제 및 기타문의 */

    /* str 할인권 */
    else if (obj=='discount_print_before' ) {ModeTour('/Popup/discount/DiscountPrintBefore.aspx' + Params,'iframe','750px','639px','0',false);} //할인권 출력버튼 보이는 화면
    else if (obj=='discount_print_before_bookingcheck' ) {ModeTour('/Popup/discount/DiscountPrintBefore.aspx' + Params,'iframe','750px','639px','0',false);} //할인권 출력버튼 보이는 화면
    /* end 할인원 */


    /*  20091123 예약확인/결제 */
	else if (obj=='payment_travel_reservation1') {ModeTour('/Popup/booking/Settlement.aspx'+Params,'iframe','817px','750','1',false);} // layerpopup_결제하기popup
	else if (obj=='payment_travel_reservation3') {ModeTour('/html/payment/popup_travel_reservation3.html','iframe','750px','459px','1',false);} // layerpopup_인보이스요청
	else if (obj=='payment_travel_reservation4') {ModeTour('/html/payment/popup_travel_reservation4.html','iframe','767px','460px','1',false);} // layerpopup_인보이스요청_미입력 (경고창 포함)
	else if (obj=='payment_travel_reservation5') {ModeTour('/html/payment/popup_travel_reservation5.html','iframe','750px','312px','0',false);} // layerpopup_인보이스처리내역_02
	else if (obj=='payment_travel_reservation6') {ModeTour('/html/payment/popup_travel_reservation6.html','iframe','750px','377px','0',false);} // layerpopup_인보이스처리내역_03
	else if (obj=='payment_travel_reservation7') {ModeTour('/html/payment/popup_travel_reservation7.html','iframe','817px','460px','1',false);} // layerpopup_인쇄하기
	else if (obj=='payment_travel_reservation8') {ModeTour('/html/payment/popup_travel_reservation8.html','iframe','767px','460px','1',false);} // layerpopup_미팅장소
	else if (obj=='payment_party_reservation1') {ModeTour('/html/payment/popup_party_reservation1.html','iframe','817px','460px','1',false);} // layerpopup_결제하기
	else if (obj=='payment_party_reservation3') {ModeTour('/html/payment/popup_party_reservation3.html','iframe','707px','460px','1',false);} // layerpopup_요금규정
	else if (obj=='payment_party_reservation4') {ModeTour('/html/payment/popup_party_reservation4.html','iframe','400px','274px','0',false);} // layerpopup_e티켓
	else if (obj=='payment_party_reservation5') {ModeTour('/html/payment/popup_party_reservation5.html','iframe','817px','460px','1',false);} // 단체항공_예약확인결제_02_인쇄하기
	else if (obj=='payment_overseas_reservation2') {ModeTour('/html/payment/popup_overseas_reservation2.html','iframe','707px','460px','1',false);} // laypopup_요금규정
	else if (obj=='payment_overseas_reservation3') {ModeTour('/html/payment/popup_overseas_reservation3.html','iframe','817px','460px','1',false);} // 해외항공권_예약확인결제_02_인쇄하기
	else if (obj=='payment_country_reservation2') {ModeTour('/html/payment/popup_country_reservation2.html','iframe','817px','460px','1',false);} // 국내항공권_예약확인결제_02_인쇄하기
	else if (obj=='payment_overseas_hotel1') {ModeTour('/html/payment/popup_overseas_hotel1.html','iframe','800px','460px','1',false);} // laypopup_결제_무통장입금기
	else if (obj=='payment_overseas_hotel2') {ModeTour('/html/payment/popup_overseas_hotel2.html','iframe','817px','460px','1',false);} // laypopup_결제_신용카드
	else if (obj=='payment_overseas_hotel4') {ModeTour('/html/payment/popup_overseas_hotel4.html','iframe','817px','460px','1',false);} // 해외호텔_예약확인결제_02_인쇄하기
	else if (obj=='payment_country_hotel') {ModeTour('/html/payment/popup_country_hotel.html','iframe','817px','460px','1',false);} // 국내호텔&콘도예약_예약확인결제_02_인쇄하기
	else if (obj=='payment_travel_car') {ModeTour('/html/payment/popup_travel_car.html','iframe','797px','460px','1',false);} // layerpopup_인쇄하기
	else if (obj=='payment_travel_car2') {ModeTour('/html/payment/popup_travel_car2.html','iframe','817px','460px','1',false);} // 여행상품_렌터카예약_02_인쇄하기
	else if (obj=='payment_travel_printing') {ModeTour('/html/payment/popup_travel_printing.html','iframe','817px','460px','1',false);} // 여행상품_철도&교통패스_02_인쇄하기
	else if (obj=='payment_spot_reservation2') {ModeTour('/html/payment/popup_spot_reservation2.html','iframe','817px','460px','1',false);} // 현지관광입장권_예약확인결제_02_인쇄하기
	else if (obj=='payment_reser_printing2') {ModeTour('/html/payment/popup_reser_printing2.html','iframe','817px','460px','1',false);} // 현지관광_예약확인결제_02_인쇄하기
	else if (obj=='payment_country_printing') {ModeTour('/html/payment/popup_country_printing.html','iframe','796px','460px','1',false);} // 국내호텔바우처_layerpopup_인쇄하기
	else if (obj=='payment_flight_printing') {ModeTour('/html/payment/popup_flight_printing.html','iframe','817px','460px','1',false);} // 항공권 E-TIKET_layerpopup_인쇄하기
	else if (obj=='payment_overseas_printing') {ModeTour('/html/payment/popup_overseas_printing.html','iframe','796px','460px','1',false);} // 해외호텔바우처_layerpopup_인쇄하기
	else if (obj=='payment_meeting_printing') {ModeTour('/html/payment/popup_meeting_printing.html ','iframe','817px','460px','1',false);} // 미팅시간및장소_layerpopup_인쇄하기
	else if (obj=='payment_railroad_printing') {ModeTour('/html/payment/popup_railroad_printing.html','iframe','817px','460px','1',false);} // 철도패스수령_layerpopup_인쇄하기

	else if (obj=='pop_reservaiton') {ModeTour(obj,'html');}
	else if (obj=='pop_overseas_hotel3') {ModeTour(obj,'html');}
	else if (obj=='pop_travel_railroad') {ModeTour(obj,'html');}
	else if (obj=='pop_overseas_re01') {ModeTour(obj,'html');}
	else if (obj=='pop_overseas_re02') {ModeTour(obj,'html');}
	else if (obj=='pop_overseas_message') {ModeTour(obj,'html');}
    else if (obj=='customer_eva') {ModeTour(obj,'html');} // 20091127 고객 만족도 평가 완료
    else if (obj=='product_choice') {ModeTour(obj,'html');} // 20091208 여행 상품 선택
	else if (obj=='product_reserve_city') {ModeTour(obj,'html');} // 20091208 결과 내 여행 지역별 보기
	else if (obj=='product_reserve_tema') {ModeTour(obj,'html');} // 20091208 결과 내 여행 테마별 보기
    else if (obj=='pop_pass_check') {ModeTour(obj,'html');}       // 2011.08.16 김민경 - 현지관광/전세버스에서 사용
  	else if (obj=='pop_overseas_pay') {ModeTour(obj,'html');}     // 2011.08.16 김민경 - 예약확인(특정상품 결제불가)
  	else if (obj=='pop_sample_write') {ModeTour(obj,'html');}     // 2011.08.22 김민경 - 현지관광/전세버스에서 사용
  	else if (obj=='pop_Agree') {ModeTour(obj,'html');}
   
    /* str JR & 유레일 패스 예약 */
	else if (obj=='search_section08') {ModeTour('/html/reserve/railroad/pop_railroad_section08.html','iframe','720px','440px','0',false);} //유럽 구간권 검색 결과 리스트 - 요금 규정 팝업
	else if (obj=='search_section09') {ModeTour('/html/reserve/railroad/pop_railroad_section09.html','iframe','580px','447px','0',false);} //유럽 구간권 검색 결과 리스트 - 운행 정보 팝업
	else if (obj=='search_section10') {ModeTour('/html/reserve/railroad/pop_railroad_section10.html','iframe','817px','460px','1',false);} //유럽 구간권 검색 결과 리스트 - 구간권 상품 상세 정보 팝업
	else if (obj=='search_pass21') {ModeTour('/html/reserve/railroad/pop_national_pass21.html','iframe','797px','460px','1',false);} //국가 패스 검색 결과 리스트 - 지도로 보기 팝업
	else if (obj=='search_pass22') {ModeTour('/html/reserve/railroad/pop_national_pass22.html','iframe','750px','375px','0',false);} //국가 패스 검색 결과 리스트 - 리스트로 보기 팝업
	else if (obj=='search_pass14') {ModeTour('/Popup/Ticket/PassRail.aspx?' + Params,'iframe','670px','400px','1',false);} //국가 패스 검색 결과 리스트 - 요금 계산 팝업(계산전)
	else if (obj=='search_pass15') {ModeTour('/Popup/Ticket/PassRail.aspx?' + Params,'iframe','650px','430px','1',false);} //국가 패스 검색 결과 리스트 - 요금 계산 팝업(계산전)
	//else if (obj=='search_pass15') {ModeTour('/html/reserve/railroad/pop_national_pass15.html','iframe','669px','460px','1',false);} //국가 패스 검색 결과 리스트 - 요금 계산 팝업(계산후)
	else if (obj=='search_pass16') {ModeTour('/Popup/Ticket/Saver.aspx'+ Params,'iframe','650px','223px','0',false);} //국가 패스 검색 결과 리스트 - 요금 후 최저 요금 자동 선택 팝업
	else if (obj=='search_booking06') {ModeTour('/Popup/Ticket/Map.aspx','iframe','565px','530px','0',false);} //철도교통패스 - 예약정보입력 - 티켓 수령장소 약도 보기 팝업
	else if (obj=='search_pass08') {ModeTour('/html/reserve/railroad/pop_others_pass08.html','iframe','817px','460px','1',false);} //기타교통패스 상품 상제 정보 팝업
	else if (obj=='search_pass17') {ModeTour('/html/reserve/railroad/pop_national_pass17.html','iframe','668px','460px','1',false);} //국가 패스 검색 결과 리스트 - 요금 계산 팝업(경고 메시지)
	else if (obj=='search_address') {ModeTour('/Popup/Member/Zip_Search.aspx'+Params,'iframe','350px','219px','0',false);} //주소검색
	/* end JR & 유레일 패스 예약 */

	/* str 블로그 */
	else if (obj=='blog_relatedgoods' ) {ModeTour('/Popup/TravelInfo/Blog/RelatedGoods.aspx' + Params,'iframe','800px','325px','0',false);} //블로그 관련 여행상품 팝업
	/* end 블로그 */

	/* str 동영상 */
	else if (obj=='product_video' ) {ModeTour('/Popup/Package/Itinerary/Product_Video.aspx' + Params,'iframe','680px','650px','0',false);} // 일정표 동영상
	else if (obj=='movie_related' ) {ModeTour('/travelinfo/movie/popup.aspx' + Params,'iframe','860px','835px','1',false);} // 관련동영상, 관련상품 팝업	
	/* end 동영상 */

	/* str 고객의소리 */
	else if (obj=='customMail') {ModeTour('/Board/Support/CustomWriteMail.htm','iframe','100px','100px','1',false);} //고객의소리 메일
	/* end 고객의소리 */
	/* str 회원가입 회사정보 */
	else if (obj=='pop_Agent') {ModeTour('/popup/member/Company_Add.aspx' + Params,'iframe','890px','700px','0',false);} // 로그인 팝업
    /* end 회원가입 회사정보 */
   // else if (obj=='change_name') {ModeTour('http://172.16.2.11:8012/MyPage/Member/Member_RealName_Check.aspx'+Params,'iframe','950px','310px','0',false);} //개명신청팝업(테스트경로)
    else if (obj=='change_name') {ModeTour('http://www.modetour.com/MyPage/Member/Member_RealName_Check.aspx'+Params,'iframe','940px','310px','0',false);} //개명신청팝업(실경로)
}

function MoaAlertPop(obj){
	ModeTour(obj, 'alert');
}

function MoaWarnPop(obj){
	ModeTour(obj, 'warn');
}

function MoaImagePop(obj){
	ModeTour(obj, 'image');
}

// 20101026 표경만 
function MoaImageLoding(obj){
	ModeTour(obj, 'loding');
}

function MoaFlashPop(obj){
	ModeTour(obj, 'flash');
}

var ModeTour_cnt = 0;

function ModeTour(url, type)
{
    /*레이어 팝업을 띄위기 위한 동적 Div 생성 -이권태- */
    var TempSw = true;
    if (document.getElementById('ModeTour_film') == null)
    {
        TempSw = false;
        var CreateDiv = document.createElement("div");
        CreateDiv.setAttribute("id","ModeTour_film");
        //CreateDiv.style.cssText="display:none; position:absolute; z-index:99997; background-color:#000;"; /* iframe인 경우에는 색상변경 없도록 처리 -윤선영- */
        //CreateDiv.className = "layerPopupBG";
        document.body.appendChild(CreateDiv);
        /* iframe인 경우에는 색상변경 없도록 처리 -윤선영- */
        if (type == 'iframe')
            CreateDiv.style.cssText="";
        else if (type == 'flash')
        {
            //CreateDiv.className = "alertOuterBoxflash";
            CreateDiv.style.cssText = "display:none; position:absolute; z-index:99997; background-color:#FFF;";
        }
        else
        {
            /*슬라이드쇼 BG 스타일 변경*/
            //CreateDiv.className = "alertOuterBoxNormal";
            CreateDiv.style.cssText = "display:none; position:absolute; z-index:99997; background-color:#9a9a9a; -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=30)'; filter:Alpha(Opacity=35); opacity:0.3; -moz-opacity:0.3;";
            /*if (url=='trip_slideshow')
                CreateDiv.style.cssText = "display:none; position:absolute; z-index:99997; background-color:#9a9a9a; filter:Alpha(opacity=35); opacity:0.3; -moz-opacity:0.3;";
            else
                CreateDiv.style.cssText = "display:none; position:absolute; z-index:99997; background-color:#9a9a9a; filter:Alpha(opacity=35); opacity:0.3; -moz-opacity:0.3;"; */
        }

        CreateDiv = document.createElement("div");
        CreateDiv.setAttribute("id","ModeTour_loading");
        document.body.appendChild(CreateDiv);

        CreateDiv = document.createElement("div");
        CreateDiv.setAttribute("id","ModeTour_content");
        CreateDiv.setAttribute("align","center");
        CreateDiv.style.cssText="z-index: 99999; position:absolute;";
        document.body.appendChild(CreateDiv);

        CreateDiv = document.createElement("div");
        CreateDiv.style.cssText="margin:0 auto; width:750px";
        with (CreateDiv.appendChild(document.createElement("div")))
        {
            setAttribute("id","ReStore");
            style.cssText="display:none;z-index:99998";
        }
        document.body.appendChild(CreateDiv);
    }//end if
    /*레이어 팝업을 띄위기 위한 동적 Div 생성 -이권태- */

	var a = document.getElementById('ModeTour_film');
	var b = document.getElementById('ModeTour_content');
	var c = document.getElementById('ModeTour_loading');
	var d = document.getElementById('ReStore');

    /* iframe인 경우에는 색상변경 없도록 처리 -윤선영- */
    if (type == 'iframe')
        a.style.cssText="";
    else if (type == 'flash')
    {
        //a.className = "alertOuterBoxflash";
        a.style.cssText = "display:none; position:absolute; z-index:99997; background-color:#FFF;";
    }
    else
    {
        //a.className = "alertOuterBoxNormal";
        a.style.cssText = "display:none; position:absolute; z-index:99997; background-color:#9a9a9a;  -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=30)'; filter:Alpha(Opacity=35); opacity:0.3; -moz-opacity:0.3;";
        /*슬라이드쇼 BG 스타일 변경*/
        /*if (url=='trip_slideshow')
            a.style.cssText = "display:none; position:absolute; z-index:99997; background-color:#9a9a9a; filter:Alpha(opacity=35); opacity:0.3; -moz-opacity:0.3;";
        else
            a.style.cssText = "display:none; position:absolute; z-index:99997; background-color:#9a9a9a; filter:Alpha(opacity=35); opacity:0.3; -moz-opacity:0.3;";
            //a.style.cssText = "display:none; position:absolute; z-index:99997; background-color:#FFF;";*/
    }
    

	/* films */
	a.style.position = "absolute";
	a.style.top = "-4px";
	a.style.left = "-21px";
	a.style.height = win.getScrollHeight()+"px";
	a.style.width = win.getScrollWidth()+"px";
	/* //films */
	if(url,type) {
		if (type=='iframe')
		{
			a.style.top = 0;
			a.style.left = 0;
			a.style.display = "none";
		}
		else {
			a.style.top = 0;
			a.style.left = 0;
			a.style.display = "";
		}
			
		if(type == 'iframe') {
		    //2010-12-27 이권태 수정 CRS에서 호출시 jQuery에서 arguments값을 추출하지 못하는 버그 대책
		    var popOption = "";			
		    if(arguments != null && arguments.length >= 4)
		        popOption="width="+arguments[2]+",height="+arguments[3]+", scrollbars="+arguments[4];
		    
		    var typeNm = type; // 팝업창안에서 새로운 팝업창을 열릴때 문제점 보완
			if (url.indexOf("PartnerView") > 0 || url.indexOf("Login2") > 0) typeNm += "_PartnerView";
			window.open(url,typeNm,popOption);

        } else if(type == 'iframe2') {/*2009-11-23 이권태 추가*/
		    var modal_html
			modal_html = '';
			modal_html += '<table id="PopupIframe" class="ModeTour_center" cellpadding="0" cellspacing="0" border="0"  onload="tryReHeight(\''+arguments[5]+'\');">';
			modal_html += '<tr>';
			modal_html += '<td>';
			modal_html += '<iframe src=\''+arguments[0]+'\' name="iPub_list" onload="resizeFrame(this);" frameborder="0"></iframe>';
			modal_html += '</td>';
			modal_html += '</tr>';
			modal_html += '</table>';
			b.innerHTML = modal_html;
			if(arguments[2]) a.onclick = function () { ModeTour() };
//			if(arguments[3]) b.innerHTML += "<div class='ModeTour_caption'>"+ arguments[3] +"</div>";

		} else if (type == 'image') {
			var modal_html
			modal_html = '';
			modal_html += '<table class="ModeTour_center" cellpadding="0" cellspacing="0" border="0"  onload="tryReHeight(\''+arguments[5]+'\');">';
			modal_html += '<tr>';
			modal_html += '<td>';
			modal_html += '<img src=\''+arguments[0]+'\'>';
			modal_html += '</td>';
			modal_html += '</tr>';
			modal_html += '</table>';
			b.innerHTML = modal_html;
//			if(arguments[0]) a.onclick = function () { ModeTour() };

        }
        else if (type == 'loding') {
			var modal_html
			modal_html = '';
			modal_html += '<table class="" cellpadding="0" cellspacing="0" border="0">';
			modal_html += '<tr>';
			modal_html += '<td>';
			modal_html += '<font><strong>처리중입니다...</strong></font>';
			modal_html += '</td>';
			modal_html += '</tr>';
			modal_html += '</table>';
			b.innerHTML = modal_html;
//			if(arguments[0]) a.onclick = function () { ModeTour() };

        }  else if (type == 'flash') {
			var modal_html
			modal_html = '';
			modal_html += '<table class="ModeTour_center" cellpadding="0" cellspacing="0" border="0"  onload="tryReHeight(\''+arguments[5]+'\');">';
			modal_html += '<tr>';
			modal_html += '<td>';


			modal_html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="640" height="400">';
			modal_html += '<param name="movie" value="http://img.modetour.co.kr/mode2010/modetour/loading/loading.swf">';
			modal_html += '<param name="quality" value="high">';
			modal_html += '<param name=FlashVars value=""/>';
			modal_html += '<param name="scale" value="noscale" />';
			modal_html += '<param name="wmode" value="transparent">';
			modal_html += '<embed src="http://img.modetour.co.kr/mode2010/modetour/loading/loading.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" FlashVars="fixed=2" type="application/x-shockwave-flash" width="640" height="400">';
			modal_html += '</embed>';
			modal_html += '</object>';

			/*modal_html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="165" height="100">';
			modal_html += '<param name="movie" value="http://img.modetour.co.kr/mode2010/modetour/swf/loading_m.swf">';
			modal_html += '<param name="quality" value="high">';
			modal_html += '<param name=FlashVars value=""/>';
			modal_html += '<param name="scale" value="noscale" />';
			modal_html += '<param name="wmode" value="transparent">';
			modal_html += '<embed src="http://img.modetour.co.kr/mode2010/modetour/swf/loading_m.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" FlashVars="fixed=2" type="application/x-shockwave-flash" height="100" width="165">';
			modal_html += '</embed>';
			modal_html += '</object>';
			*/
			modal_html += '</td>';
			modal_html += '</tr>';
			modal_html += '</table>';
			b.innerHTML = modal_html;
//			if(arguments[0]) a.onclick = function () { ModeTour() };

		} else if (type == 'html') {
			var openobject = document.getElementById(arguments[0]);
			var modal_html
			modal_html = '';
			modal_html += '<table class="ModeTour_center" cellpadding="0" cellspacing="0" border="0" onload="tryReHeight(\''+arguments[5]+'\');">';
			modal_html += '<tr>';
			modal_html += '<td>';
			modal_html += '<div style="text-align:left" id="LayerPoupContent">'+openobject.parentNode.innerHTML +'</div>';  //ID추가 2009-11-13 이권태 슬라이드 쇼에서 id값을 이용하기 위해
			modal_html += '</td>';
			modal_html += '</tr>';
			modal_html += '</table>';
			b.innerHTML = modal_html;
//			ModeTour_setCenter(b.firstChild);
//			if(arguments[3]) a.onclick = function() { ModeTour() };

		} else if (type == 'alert') {
		    var modal_html
			modal_html = '';
			modal_html += '<table class="ModeTour_center" cellpadding="0" cellspacing="0" border="0"  onload="tryReHeight(\''+arguments[5]+'\');">';
			modal_html += '<tr>';
			modal_html += '<td>';
			modal_html += '<div class="closebtn"><a href="#" onclick="ModeTour();"><img src="http://img.modetour.co.kr/mode2010/modetour/common/btn_x.gif" alt="close" /></a></div>';
			modal_html += '<div class="alert forpng">'+arguments[0]+'</div>';
			modal_html += '<div class="alert_inner forpng"></div>';
			modal_html += '</td>';
			modal_html += '</tr>';
			modal_html += '</table>';
			b.innerHTML = modal_html;
//			ModeTour_setCenter(b.firstChild);
			if(arguments[2]) a.onclick = function() { ModeTour() };

		} else if (type == 'warn') {

			var modal_html
			modal_html = '';
			modal_html += '<table class="ModeTour_center" cellpadding="0" cellspacing="0" border="0"  onload="tryReHeight(\''+arguments[5]+'\');">';
			modal_html += '<tr>';
			modal_html += '<td>';
			modal_html += '<div class="closebtn"><a href="#" onclick="ModeTour();"><img src="http://img.modetour.co.kr/mode2010/modetour/common/btn_x.gif" alt="close" /></a></div>';
			modal_html += '<div class="warn forpng">'+arguments[0]+'</div>';
			modal_html += '<div class="alert_inner forpng"></div>';
			modal_html += '</td>';
			modal_html += '</tr>';
			modal_html += '</table>';
			b.innerHTML = modal_html;
//			ModeTour_setCenter(b.firstChild);
			if(arguments[2]) a.onclick = function() { ModeTour() };
		}


		if (document.documentElement.scrollHeight > document.body.scrollHeight) {
			a.style.height = document.documentElement.scrollHeight + 'px';
		} else {
			a.style.height = document.body.scrollHeight + 'px';
		}
		c.style.display = "block";
		a.style.zIndex = "9997";
		if(d != null)       ///TravelInfo/Movie/Moviebest.aspx 에서 자바스크립트 에러로 추가(최경환)
		    d.style.zIndex = "9996";
		ModeTour_setCenter(b,true);

//		hideSelect();
	} else {
		a.onclick = '';
		if(d.style.display != "")
		{
			a.style.display = "none";
			a.style.height = '100%';
			a.style.width = '100%';
		}
		b.innerHTML = "";
		//b.onclick = function () { ModeTour() };   // {2011.05.26 윤선영} 닫기가 아닌 내용부분을 클릭해도 닫히게 됨 (내용부분에 선택하는 항목이 있는 경우,, 문제의 소지가 되어 수정함)
		c.style.display = "none";
		a.style.zIndex = "9995";
		d.style.zIndex = "9998";
		showSelect();
		ModeTour_cnt = 0;
	}
}

function ModeTour_setCenter(obj) {
	if (obj) {
		var h = (window.innerHeight || self.innerHeight || document.documentElement.clientHeight || document.body.clientHeight);
		var w = (window.innerWidth || self.innerWidth || document.documentElement.clientWidth || document.body.clientWidth);
		var l = ((window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft) + ((w-(obj.width||parseInt(obj.style.width)||obj.offsetWidth))/2));
		var t = ((window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop) + ((h-(obj.height||parseInt(obj.style.height)||obj.offsetHeight))/2));
		if((obj.width||parseInt(obj.style.width)||obj.offsetWidth) >= w) l = 0;
		if((obj.height||parseInt(obj.style.height)||obj.offsetHeight) >= h) t = (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);
		document.getElementById('ModeTour_content').style.left = l + "px";
		if(ModeTour_cnt == 0) {
			document.getElementById('ModeTour_content').style.top = t + "px";
			if(document.getElementById('ModeTour_content').offsetHeight >= h - 20) {
				ModeTour_cnt ++;
			}
			if(obj.nextSibling && (obj.nextSibling.className == 'ModeTour_close' || obj.nextSibling.className == 'ModeTour_caption')) {
				obj.nextSibling.style.display = 'block';
				if((t - (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop))>(obj.nextSibling.offsetHeight/2)) {
					document.getElementById('ModeTour_content').style.top = parseInt(document.getElementById('ModeTour_content').style.top) - (obj.nextSibling.offsetHeight/2) + "px";
				}
			}
		}
		obj.style.visibility = 'visible';
		if(!arguments[1]) {
			document.getElementById('ModeTour_loading').style.display = "none";
		} else {
			obj.style.left = l + "px";
			obj.style.top = t + "px";
		}
	}
}

function hideSelect() {
	var windows = window.frames.length;
	var selects = document.getElementsByTagName("SELECT");
	for (i=0;i < selects.length ;i++ )
	{
		selects[i].style.visibility = "hidden";
	}
	if (windows > 0) {
		for(i=0; i < windows; i++) {
			try {
				var selects = window.frames[i].document.getElementsByTagName("SELECT");
				for (j=0;j<selects.length ;j++ )
				{
					selects[j].style.visibility = "hidden";
				}
			} catch (e) {}
		}
	}
}

function showSelect() {
	var windows = window.frames.length;
	var selects = document.getElementsByTagName("SELECT");
	for (i=0;i < selects.length ;i++ )
	{
		selects[i].style.visibility = "visible";
	}
	if (windows > 0) {
		for(i=0; i < windows; i++) {
			try {
				var selects = window.frames[i].document.getElementsByTagName("SELECT");
				for (j=0;j<selects.length ;j++ )
				{
					selects[j].style.visibility = "visible";
				}
			} catch (e) {}
		}
	}
}

function tryReHeight(sign) {
	var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1];
	var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0;
	var currentfr=document.getElementById('ModeTour_iframe');
	var currentDiv=document.getElementById('ModeTour_content');
	if(sign) {
		try {
			if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) {
				setIframeSize(currentfr.contentDocument.body.offsetHeight+FFextraHeight);
			} else if (currentfr.Document && currentfr.Document.body.scrollHeight) {
				setIframeSize(currentfr.Document.body.scrollHeight);
			}
		}catch(e) { }
		ModeTour_setCenter(document.getElementById('ModeTour_content').firstChild);
	} else {
		ModeTour_setCenter(document.getElementById('ModeTour_content').firstChild);
	}
}

function setIframeSize(h, w) {
	ModeTour_cnt = 0;
	var ifr = currentfr=document.getElementById('ModeTour_iframe');
	if (ifr) {
		if(w) {
			ifr.width = w;
		}
		if(h) {
			ifr.height = h;
		}
		ModeTour_setCenter(ifr);
	}
}

var prevOnScroll = window.onscroll;
window.onscroll = function () {
	try
	{
		if(prevOnScroll != undefined) prevOnScroll();
		if (document.documentElement.scrollHeight > document.body.scrollHeight) {
			document.getElementById('ModeTour_film').style.height = document.documentElement.scrollHeight + 'px';
			//document.getElementById('lp_film').style.height = document.documentElement.scrollHeight + 'px';
		} else {
			document.getElementById('ModeTour_film').style.height = document.body.scrollHeight + 'px';
			//document.getElementById('lp_film').style.height = document.body.scrollHeight + 'px';
		}
		document.getElementById('ModeTour_film').style.width = document.body.scrollWidth + 'px';
		//document.getElementById('lp_film').style.width = document.body.scrollWidth + 'px';
		ModeTour_setCenter(document.getElementById('ModeTour_content').firstChild);
	}
	catch (e)
	{
	}
}

var prevOnResize = window.onresize;
window.onresize = function () {
	try
	{
		if(prevOnResize != undefined) prevOnResize();
		if (document.documentElement.scrollHeight > document.body.scrollHeight) {
			document.getElementById('ModeTour_film').style.height = document.documentElement.scrollHeight + 'px';
		} else {
			document.getElementById('ModeTour_film').style.height = document.body.scrollHeight + 'px';
		}
		document.getElementById('ModeTour_film').style.width = document.body.offsetWidth + 'px';
		ModeTour_setCenter(document.getElementById('ModeTour_content').firstChild);
	}
	catch (e)
	{
	}
}

//width and height value on window from mootools
var win ={
	getWidth: function(){
		if (document.childNodes && !document.all && !navigator.taintEnabled) return window.innerWidth;
		if (window.opera) return document.body.clientWidth;
		return document.documentElement.clientWidth;
	},

	getHeight: function(){
		if (document.childNodes && !document.all && !navigator.taintEnabled) return window.innerHeight;
		if (window.opera) return document.body.clientHeight;
		return document.documentElement.clientHeight;
	},

	getScrollWidth: function(){
		if (window.ActiveXObject) return Math.max(document.documentElement.offsetWidth, document.documentElement.scrollWidth);
		if (document.childNodes && !document.all && !navigator.taintEnabled) return document.body.scrollWidth;
		return document.documentElement.scrollWidth;
	},

	getScrollHeight: function(){
		if (window.ActiveXObject) return Math.max(document.documentElement.offsetHeight, document.documentElement.scrollHeight);
		if (document.childNodes && !document.all && !navigator.taintEnabled) return document.body.scrollHeight;
		return document.documentElement.scrollHeight;
	},

	getScrollLeft: function(){
		return window.pageXOffset || document.documentElement.scrollLeft;
	},

	getScrollTop: function(){
		return window.pageYOffset || document.documentElement.scrollTop;
	},
	getPosition: function(){return {'x': 0, 'y': 0}}

};
