//<!------------------------------------------------------------------------------------
// @(#) cm_lesson.js
//
// Copyright 2007 by SBS Golf CH.
// All rights reserved.
// This software is the confidential and proprietary information of SBS MediaNet.
// You shall not disclose such Confidential Information and shall use it only in
// accordance with the terms of the license agreement you entered into with SBS.
//
// @author   Jinsoo,Kim (jskim@sbsmedianet.co.kr)
// @company  SBS MediaNet
// @used     ½ºÅ©¸³Æ®¸ðµâ¸í
//-------------------------------------------------------------------------------------->
// <script language='JavaScript' src="cm_lesson.js"></script>
// jsÆÄÀÏ°£¿¡´Â ÇÔ¼ö È£ÃâÀ» ÇÒ ¼ö¾ø´Ù.(°°Àº ±¸¿ª¾ÈÀÇ ÇÔ¼öµé°£¿¡¸¸ ¼­·Î È£Ãâ°¡´É)

var is_pwcall = true;  // ÆË¾÷È£Ãâ¿©ºÎ
var pw_file;           // ÆË¾÷ÆÄÀÏ¸í
var pw_name;           // ÆË¾÷À©µµ¿ì¸í
var pw_width;          // ÆË¾÷°¡·Î»çÀÌÁî
var pw_height;         // ÆË¾÷¼¼·Î»çÀÌÁî

function popupWindow(pw_file, pw_name, pw_width, pw_height)
{
	var url;
	var win;

	url = "/html/front/mbszone/onepoint/";
	url+= pw_file;

	//sbs_window = eval("window.open(url, "+win+", 'top=50, left=150, toolbar=0, location=0, directories=0, menubar=0, scrollbars=no, width="+pw_width+", height="+pw_height+"')");
	sbs_window = window.open(url, pw_name, 'top=50, left=150, toolbar=0, location=0, directories=0, menubar=0, scrollbars=no, width='+pw_width+', height='+pw_height+'');
	sbs_window.focus();
}


function popupCoupon(code)
{
	switch (code)
	{
		case 10  :
			warn_msg = "À¯·áÈ¸¿ø¸¸ ÀÌ¿ë °¡´ÉÇÕ´Ï´Ù.    ";
			alert(warn_msg);
			is_pwcall = false;
			break;
		case 11  :
			pw_file   = "pw_coupon_01.jsp";
			pw_name   = "ÄíÆù¹Þ±â1";
			pw_width  = 600;
			pw_height = 380;
			is_pwcall = true;
			break;
		case 20  :
			pw_file   = "pw_coupon_02.jsp?type=0";
			pw_name   = "ÄíÆù¹Þ±â2";
			pw_width  = 600;
			pw_height = 380;
			is_pwcall = true;
			break;
		case 21  :
			pw_file   = "pw_coupon_02.jsp?type=1";
			pw_name   = "ÄíÆù¹Þ±â2";
			pw_width  = 600;
			pw_height = 380;
			is_pwcall = true;
			break;
		default : break;
	}

	if (is_pwcall)
	{
		popupWindow(pw_file, pw_name, pw_width, pw_height);
	}
}


function popupLocate(code)
{
	switch (code)
	{
		case 10  :
			warn_msg = "À¯·áÈ¸¿ø¸¸ ÀÌ¿ë °¡´ÉÇÕ´Ï´Ù.    ";
			alert(warn_msg);
			is_pwcall = false;
			break;
		case 11  :
			pw_file   = "pw_location_01.jsp";
			pw_name   = "À§Ä¡È®ÀÎ1";
			pw_width  = 370;
			pw_height = 345;
			is_pwcall = true;
			break;
		case 20  :
			pw_file   = "pw_location_02.jsp";
			pw_name   = "À§Ä¡È®ÀÎ2";
			pw_width  = 370;
			pw_height = 360;
			is_pwcall = true;
			break;
		case 21  :
			pw_file   = "pw_location_02.jsp";
			pw_name   = "À§Ä¡È®ÀÎ2";
			pw_width  = 370;
			pw_height = 360;
			is_pwcall = true;
			break;
		default : break;
	}

	if (is_pwcall)
	{
		popupWindow(pw_file, pw_name, pw_width, pw_height);
	}
}